@nextclaw/ui 0.3.15 → 0.3.16
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/CHANGELOG.md +6 -0
- package/dist/assets/index-DuW0OWcM.js +298 -0
- package/dist/assets/index-xwCviEXg.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/api/config.ts +3 -2
- package/src/components/config/ModelConfig.tsx +1 -1
- package/src/components/config/SessionsConfig.tsx +285 -251
- package/src/components/ui/select.tsx +135 -0
- package/dist/assets/index-AVHp7I-v.js +0 -266
- package/dist/assets/index-MxqXd9ts.css +0 -1
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
var zh=n=>{throw TypeError(n)};var Wu=(n,r,s)=>r.has(n)||zh("Cannot "+s);var N=(n,r,s)=>(Wu(n,r,"read from private field"),s?s.call(n):r.get(n)),he=(n,r,s)=>r.has(n)?zh("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),oe=(n,r,s,i)=>(Wu(n,r,"write to private field"),i?i.call(n,s):r.set(n,s),s),ke=(n,r,s)=>(Wu(n,r,"access private method"),s);var Li=(n,r,s,i)=>({set _(u){oe(n,r,u,s)},get _(){return N(n,r,i)}});function jv(n,r){for(var s=0;s<r.length;s++){const i=r[s];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(i,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function Yp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hu={exports:{}},Zs={},Vu={exports:{}},Ee={};/**
|
|
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 _h;function Mv(){if(_h)return Ee;_h=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,b={};function E(j,A,ae){this.props=j,this.context=A,this.refs=b,this.updater=ae||x}E.prototype.isReactComponent={},E.prototype.setState=function(j,A){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,A,"setState")},E.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function _(){}_.prototype=E.prototype;function U(j,A,ae){this.props=j,this.context=A,this.refs=b,this.updater=ae||x}var I=U.prototype=new _;I.constructor=U,z(I,E.prototype),I.isPureReactComponent=!0;var F=Array.isArray,q=Object.prototype.hasOwnProperty,ee={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function re(j,A,ae){var de,ye={},Ce=null,ge=null;if(A!=null)for(de in A.ref!==void 0&&(ge=A.ref),A.key!==void 0&&(Ce=""+A.key),A)q.call(A,de)&&!V.hasOwnProperty(de)&&(ye[de]=A[de]);var Pe=arguments.length-2;if(Pe===1)ye.children=ae;else if(1<Pe){for(var Le=Array(Pe),nt=0;nt<Pe;nt++)Le[nt]=arguments[nt+2];ye.children=Le}if(j&&j.defaultProps)for(de in Pe=j.defaultProps,Pe)ye[de]===void 0&&(ye[de]=Pe[de]);return{$$typeof:n,type:j,key:Ce,ref:ge,props:ye,_owner:ee.current}}function $(j,A){return{$$typeof:n,type:j.type,key:A,ref:j.ref,props:j.props,_owner:j._owner}}function X(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function M(j){var A={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ae){return A[ae]})}var T=/\/+/g;function G(j,A){return typeof j=="object"&&j!==null&&j.key!=null?M(""+j.key):A.toString(36)}function ne(j,A,ae,de,ye){var Ce=typeof j;(Ce==="undefined"||Ce==="boolean")&&(j=null);var ge=!1;if(j===null)ge=!0;else switch(Ce){case"string":case"number":ge=!0;break;case"object":switch(j.$$typeof){case n:case r:ge=!0}}if(ge)return ge=j,ye=ye(ge),j=de===""?"."+G(ge,0):de,F(ye)?(ae="",j!=null&&(ae=j.replace(T,"$&/")+"/"),ne(ye,A,ae,"",function(nt){return nt})):ye!=null&&(X(ye)&&(ye=$(ye,ae+(!ye.key||ge&&ge.key===ye.key?"":(""+ye.key).replace(T,"$&/")+"/")+j)),A.push(ye)),1;if(ge=0,de=de===""?".":de+":",F(j))for(var Pe=0;Pe<j.length;Pe++){Ce=j[Pe];var Le=de+G(Ce,Pe);ge+=ne(Ce,A,ae,Le,ye)}else if(Le=C(j),typeof Le=="function")for(j=Le.call(j),Pe=0;!(Ce=j.next()).done;)Ce=Ce.value,Le=de+G(Ce,Pe++),ge+=ne(Ce,A,ae,Le,ye);else if(Ce==="object")throw A=String(j),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return ge}function ie(j,A,ae){if(j==null)return j;var de=[],ye=0;return ne(j,de,"","",function(Ce){return A.call(ae,Ce,ye++)}),de}function Se(j){if(j._status===-1){var A=j._result;A=A(),A.then(function(ae){(j._status===0||j._status===-1)&&(j._status=1,j._result=ae)},function(ae){(j._status===0||j._status===-1)&&(j._status=2,j._result=ae)}),j._status===-1&&(j._status=0,j._result=A)}if(j._status===1)return j._result.default;throw j._result}var we={current:null},Z={transition:null},K={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:Z,ReactCurrentOwner:ee};function J(){throw Error("act(...) is not supported in production builds of React.")}return Ee.Children={map:ie,forEach:function(j,A,ae){ie(j,function(){A.apply(this,arguments)},ae)},count:function(j){var A=0;return ie(j,function(){A++}),A},toArray:function(j){return ie(j,function(A){return A})||[]},only:function(j){if(!X(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Ee.Component=E,Ee.Fragment=s,Ee.Profiler=u,Ee.PureComponent=U,Ee.StrictMode=i,Ee.Suspense=v,Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,Ee.act=J,Ee.cloneElement=function(j,A,ae){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var de=z({},j.props),ye=j.key,Ce=j.ref,ge=j._owner;if(A!=null){if(A.ref!==void 0&&(Ce=A.ref,ge=ee.current),A.key!==void 0&&(ye=""+A.key),j.type&&j.type.defaultProps)var Pe=j.type.defaultProps;for(Le in A)q.call(A,Le)&&!V.hasOwnProperty(Le)&&(de[Le]=A[Le]===void 0&&Pe!==void 0?Pe[Le]:A[Le])}var Le=arguments.length-2;if(Le===1)de.children=ae;else if(1<Le){Pe=Array(Le);for(var nt=0;nt<Le;nt++)Pe[nt]=arguments[nt+2];de.children=Pe}return{$$typeof:n,type:j.type,key:ye,ref:Ce,props:de,_owner:ge}},Ee.createContext=function(j){return j={$$typeof:p,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:d,_context:j},j.Consumer=j},Ee.createElement=re,Ee.createFactory=function(j){var A=re.bind(null,j);return A.type=j,A},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(j){return{$$typeof:h,render:j}},Ee.isValidElement=X,Ee.lazy=function(j){return{$$typeof:w,_payload:{_status:-1,_result:j},_init:Se}},Ee.memo=function(j,A){return{$$typeof:g,type:j,compare:A===void 0?null:A}},Ee.startTransition=function(j){var A=Z.transition;Z.transition={};try{j()}finally{Z.transition=A}},Ee.unstable_act=J,Ee.useCallback=function(j,A){return we.current.useCallback(j,A)},Ee.useContext=function(j){return we.current.useContext(j)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(j){return we.current.useDeferredValue(j)},Ee.useEffect=function(j,A){return we.current.useEffect(j,A)},Ee.useId=function(){return we.current.useId()},Ee.useImperativeHandle=function(j,A,ae){return we.current.useImperativeHandle(j,A,ae)},Ee.useInsertionEffect=function(j,A){return we.current.useInsertionEffect(j,A)},Ee.useLayoutEffect=function(j,A){return we.current.useLayoutEffect(j,A)},Ee.useMemo=function(j,A){return we.current.useMemo(j,A)},Ee.useReducer=function(j,A,ae){return we.current.useReducer(j,A,ae)},Ee.useRef=function(j){return we.current.useRef(j)},Ee.useState=function(j){return we.current.useState(j)},Ee.useSyncExternalStore=function(j,A,ae){return we.current.useSyncExternalStore(j,A,ae)},Ee.useTransition=function(){return we.current.useTransition()},Ee.version="18.3.1",Ee}var Dh;function Tc(){return Dh||(Dh=1,Vu.exports=Mv()),Vu.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 Ah;function Tv(){if(Ah)return Zs;Ah=1;var n=Tc(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,v,g){var w,S={},C=null,x=null;g!==void 0&&(C=""+g),v.key!==void 0&&(C=""+v.key),v.ref!==void 0&&(x=v.ref);for(w in v)i.call(v,w)&&!d.hasOwnProperty(w)&&(S[w]=v[w]);if(h&&h.defaultProps)for(w in v=h.defaultProps,v)S[w]===void 0&&(S[w]=v[w]);return{$$typeof:r,type:h,key:C,ref:x,props:S,_owner:u.current}}return Zs.Fragment=s,Zs.jsx=p,Zs.jsxs=p,Zs}var Fh;function Lv(){return Fh||(Fh=1,Hu.exports=Tv()),Hu.exports}var f=Lv(),y=Tc();const te=Yp(y),Xp=jv({__proto__:null,default:te},[y]);var Ii={},Qu={exports:{}},jt={},Ku={exports:{}},qu={};/**
|
|
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 Uh;function Iv(){return Uh||(Uh=1,(function(n){function r(Z,K){var J=Z.length;Z.push(K);e:for(;0<J;){var j=J-1>>>1,A=Z[j];if(0<u(A,K))Z[j]=K,Z[J]=A,J=j;else break e}}function s(Z){return Z.length===0?null:Z[0]}function i(Z){if(Z.length===0)return null;var K=Z[0],J=Z.pop();if(J!==K){Z[0]=J;e:for(var j=0,A=Z.length,ae=A>>>1;j<ae;){var de=2*(j+1)-1,ye=Z[de],Ce=de+1,ge=Z[Ce];if(0>u(ye,J))Ce<A&&0>u(ge,ye)?(Z[j]=ge,Z[Ce]=J,j=Ce):(Z[j]=ye,Z[de]=J,j=de);else if(Ce<A&&0>u(ge,J))Z[j]=ge,Z[Ce]=J,j=Ce;else break e}}return K}function u(Z,K){var J=Z.sortIndex-K.sortIndex;return J!==0?J:Z.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var v=[],g=[],w=1,S=null,C=3,x=!1,z=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(Z){for(var K=s(g);K!==null;){if(K.callback===null)i(g);else if(K.startTime<=Z)i(g),K.sortIndex=K.expirationTime,r(v,K);else break;K=s(g)}}function F(Z){if(b=!1,I(Z),!z)if(s(v)!==null)z=!0,Se(q);else{var K=s(g);K!==null&&we(F,K.startTime-Z)}}function q(Z,K){z=!1,b&&(b=!1,_(re),re=-1),x=!0;var J=C;try{for(I(K),S=s(v);S!==null&&(!(S.expirationTime>K)||Z&&!M());){var j=S.callback;if(typeof j=="function"){S.callback=null,C=S.priorityLevel;var A=j(S.expirationTime<=K);K=n.unstable_now(),typeof A=="function"?S.callback=A:S===s(v)&&i(v),I(K)}else i(v);S=s(v)}if(S!==null)var ae=!0;else{var de=s(g);de!==null&&we(F,de.startTime-K),ae=!1}return ae}finally{S=null,C=J,x=!1}}var ee=!1,V=null,re=-1,$=5,X=-1;function M(){return!(n.unstable_now()-X<$)}function T(){if(V!==null){var Z=n.unstable_now();X=Z;var K=!0;try{K=V(!0,Z)}finally{K?G():(ee=!1,V=null)}}else ee=!1}var G;if(typeof U=="function")G=function(){U(T)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,ie=ne.port2;ne.port1.onmessage=T,G=function(){ie.postMessage(null)}}else G=function(){E(T,0)};function Se(Z){V=Z,ee||(ee=!0,G())}function we(Z,K){re=E(function(){Z(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Z){Z.callback=null},n.unstable_continueExecution=function(){z||x||(z=!0,Se(q))},n.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<Z?Math.floor(1e3/Z):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_getFirstCallbackNode=function(){return s(v)},n.unstable_next=function(Z){switch(C){case 1:case 2:case 3:var K=3;break;default:K=C}var J=C;C=K;try{return Z()}finally{C=J}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Z,K){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var J=C;C=Z;try{return K()}finally{C=J}},n.unstable_scheduleCallback=function(Z,K,J){var j=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?j+J:j):J=j,Z){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=J+A,Z={id:w++,callback:K,priorityLevel:Z,startTime:J,expirationTime:A,sortIndex:-1},J>j?(Z.sortIndex=J,r(g,Z),s(v)===null&&Z===s(g)&&(b?(_(re),re=-1):b=!0,we(F,J-j))):(Z.sortIndex=A,r(v,Z),z||x||(z=!0,Se(q))),Z},n.unstable_shouldYield=M,n.unstable_wrapCallback=function(Z){var K=C;return function(){var J=C;C=K;try{return Z.apply(this,arguments)}finally{C=J}}}})(qu)),qu}var Bh;function Ov(){return Bh||(Bh=1,Ku.exports=Iv()),Ku.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 $h;function zv(){if($h)return jt;$h=1;var n=Tc(),r=Ov();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,u={};function d(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(u[e]=t,e=0;e<t.length;e++)i.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,g=/^[: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]*$/,w={},S={};function C(e){return v.call(S,e)?!0:v.call(w,e)?!1:g.test(e)?S[e]=!0:(w[e]=!0,!1)}function x(e,t,o,a){if(o!==null&&o.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,t,o,a){if(t===null||typeof t>"u"||x(e,t,o,a))return!0;if(a)return!1;if(o!==null)switch(o.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,o,a,l,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=l,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];E[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){E[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function U(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_,U);E[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_,U);E[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_,U);E[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function I(e,t,o,a){var l=E.hasOwnProperty(t)?E[t]:null;(l!==null?l.type!==0:a||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(z(t,o,l,a)&&(o=null),a||l===null?C(t)&&(o===null?e.removeAttribute(t):e.setAttribute(t,""+o)):l.mustUseProperty?e[l.propertyName]=o===null?l.type===3?!1:"":o:(t=l.attributeName,a=l.attributeNamespace,o===null?e.removeAttribute(t):(l=l.type,o=l===3||l===4&&o===!0?"":""+o,a?e.setAttributeNS(a,t,o):e.setAttribute(t,o))))}var F=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),ee=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),M=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),Z=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var J=Object.assign,j;function A(e){if(j===void 0)try{throw Error()}catch(o){var t=o.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return`
|
|
34
|
-
`+j+e}var ae=!1;function de(e,t){if(!e||ae)return"";ae=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(D){var a=D}Reflect.construct(e,[],t)}else{try{t.call()}catch(D){a=D}e.call(t.prototype)}else{try{throw Error()}catch(D){a=D}e()}}catch(D){if(D&&a&&typeof D.stack=="string"){for(var l=D.stack.split(`
|
|
35
|
-
`),c=a.stack.split(`
|
|
36
|
-
`),m=l.length-1,k=c.length-1;1<=m&&0<=k&&l[m]!==c[k];)k--;for(;1<=m&&0<=k;m--,k--)if(l[m]!==c[k]){if(m!==1||k!==1)do if(m--,k--,0>k||l[m]!==c[k]){var P=`
|
|
37
|
-
`+l[m].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=m&&0<=k);break}}}finally{ae=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?A(e):""}function ye(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=de(e.type,!1),e;case 11:return e=de(e.type.render,!1),e;case 1:return e=de(e.type,!0),e;default:return""}}function Ce(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case ee:return"Portal";case $:return"Profiler";case re:return"StrictMode";case G:return"Suspense";case ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M:return(e.displayName||"Context")+".Consumer";case X:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case Se:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}function ge(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(t);case 8:return t===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Le(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nt(e){var t=Le(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var l=o.get,c=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(m){a=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cn(e){e._valueTracker||(e._valueTracker=nt(e))}function po(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),a="";return e&&(a=Le(e)?e.checked?"true":"false":e.value),e=a,e!==o?(t.setValue(e),!0):!1}function Ir(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hs(e,t){var o=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function va(e,t){var o=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;o=Pe(t.value!=null?t.value:o),e._wrapperState={initialChecked:a,initialValue:o,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ps(e,t){t=t.checked,t!=null&&I(e,"checked",t,!1)}function ms(e,t){ps(e,t);var o=Pe(t.value),a=t.type;if(o!=null)a==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gs(e,t.type,o):t.hasOwnProperty("defaultValue")&&gs(e,t.type,Pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mo(e,t,o){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,o||t===e.value||(e.value=t),e.defaultValue=t}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function gs(e,t,o){(t!=="number"||Ir(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Gn=Array.isArray;function At(e,t,o,a){if(e=e.options,t){t={};for(var l=0;l<o.length;l++)t["$"+o[l]]=!0;for(o=0;o<e.length;o++)l=t.hasOwnProperty("$"+e[o].value),e[o].selected!==l&&(e[o].selected=l),l&&a&&(e[o].defaultSelected=!0)}else{for(o=""+Pe(o),t=null,l=0;l<e.length;l++){if(e[l].value===o){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function go(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return J({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dn(e,t){var o=t.value;if(o==null){if(o=t.children,t=t.defaultValue,o!=null){if(t!=null)throw Error(s(92));if(Gn(o)){if(1<o.length)throw Error(s(93));o=o[0]}t=o}t==null&&(t=""),o=t}e._wrapperState={initialValue:Pe(o)}}function xa(e,t){var o=Pe(t.value),a=Pe(t.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),t.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),a!=null&&(e.defaultValue=""+a)}function wa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yo,ba=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,o,a,l){MSApp.execUnsafeLocalFunction(function(){return e(t,o,a,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(yo=yo||document.createElement("div"),yo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hn(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var Or={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},Sa=["Webkit","ms","Moz","O"];Object.keys(Or).forEach(function(e){Sa.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Or[t]=Or[e]})});function vo(e,t,o){return t==null||typeof t=="boolean"||t===""?"":o||typeof t!="number"||t===0||Or.hasOwnProperty(e)&&Or[e]?(""+t).trim():t+"px"}function Pn(e,t){e=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=o.indexOf("--")===0,l=vo(o,t[o],a);o==="float"&&(o="cssFloat"),a?e.setProperty(o,l):e[o]=l}}var ka=J({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 pn(e,t){if(t){if(ka[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function ys(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vs=null;function xo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wo=null,Yn=null,mn=null;function qt(e){if(e=As(e)){if(typeof wo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Ka(t),wo(e.stateNode,e.type,t))}}function Ca(e){Yn?mn?mn.push(e):mn=[e]:Yn=e}function xe(){if(Yn){var e=Yn,t=mn;if(mn=Yn=null,qt(e),t)for(e=0;e<t.length;e++)qt(t[e])}}function Te(e,t){return e(t)}function _e(){}var yt=!1;function St(e,t,o){if(yt)return e(t,o);yt=!0;try{return Te(e,t,o)}finally{yt=!1,(Yn!==null||mn!==null)&&(_e(),xe())}}function kt(e,t){var o=e.stateNode;if(o===null)return null;var a=Ka(o);if(a===null)return null;o=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(s(231,t,typeof o));return o}var Gt=!1;if(h)try{var it={};Object.defineProperty(it,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",it,it),window.removeEventListener("test",it,it)}catch{Gt=!1}function gn(e,t,o,a,l,c,m,k,P){var D=Array.prototype.slice.call(arguments,3);try{t.apply(o,D)}catch(H){this.onError(H)}}var xs=!1,Ea=null,Na=!1,ll=null,_g={onError:function(e){xs=!0,Ea=e}};function Dg(e,t,o,a,l,c,m,k,P){xs=!1,Ea=null,gn.apply(_g,arguments)}function Ag(e,t,o,a,l,c,m,k,P){if(Dg.apply(this,arguments),xs){if(xs){var D=Ea;xs=!1,Ea=null}else throw Error(s(198));Na||(Na=!0,ll=D)}}function zr(e){var t=e,o=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(o=t.return),e=t.return;while(e)}return t.tag===3?o:null}function rd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function od(e){if(zr(e)!==e)throw Error(s(188))}function Fg(e){var t=e.alternate;if(!t){if(t=zr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var o=e,a=t;;){var l=o.return;if(l===null)break;var c=l.alternate;if(c===null){if(a=l.return,a!==null){o=a;continue}break}if(l.child===c.child){for(c=l.child;c;){if(c===o)return od(l),e;if(c===a)return od(l),t;c=c.sibling}throw Error(s(188))}if(o.return!==a.return)o=l,a=c;else{for(var m=!1,k=l.child;k;){if(k===o){m=!0,o=l,a=c;break}if(k===a){m=!0,a=l,o=c;break}k=k.sibling}if(!m){for(k=c.child;k;){if(k===o){m=!0,o=c,a=l;break}if(k===a){m=!0,a=c,o=l;break}k=k.sibling}if(!m)throw Error(s(189))}}if(o.alternate!==a)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:t}function sd(e){return e=Fg(e),e!==null?ad(e):null}function ad(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ad(e);if(t!==null)return t;e=e.sibling}return null}var id=r.unstable_scheduleCallback,ld=r.unstable_cancelCallback,Ug=r.unstable_shouldYield,Bg=r.unstable_requestPaint,qe=r.unstable_now,$g=r.unstable_getCurrentPriorityLevel,ul=r.unstable_ImmediatePriority,ud=r.unstable_UserBlockingPriority,Pa=r.unstable_NormalPriority,Wg=r.unstable_LowPriority,cd=r.unstable_IdlePriority,Ra=null,yn=null;function Hg(e){if(yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(Ra,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:Kg,Vg=Math.log,Qg=Math.LN2;function Kg(e){return e>>>=0,e===0?32:31-(Vg(e)/Qg|0)|0}var ja=64,Ma=4194304;function ws(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ta(e,t){var o=e.pendingLanes;if(o===0)return 0;var a=0,l=e.suspendedLanes,c=e.pingedLanes,m=o&268435455;if(m!==0){var k=m&~l;k!==0?a=ws(k):(c&=m,c!==0&&(a=ws(c)))}else m=o&~l,m!==0?a=ws(m):c!==0&&(a=ws(c));if(a===0)return 0;if(t!==0&&t!==a&&(t&l)===0&&(l=a&-a,c=t&-t,l>=c||l===16&&(c&4194240)!==0))return t;if((a&4)!==0&&(a|=o&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0<t;)o=31-Yt(t),l=1<<o,a|=e[o],t&=~l;return a}function qg(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gg(e,t){for(var o=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes;0<c;){var m=31-Yt(c),k=1<<m,P=l[m];P===-1?((k&o)===0||(k&a)!==0)&&(l[m]=qg(k,t)):P<=t&&(e.expiredLanes|=k),c&=~k}}function cl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dd(){var e=ja;return ja<<=1,(ja&4194240)===0&&(ja=64),e}function dl(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function bs(e,t,o){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=o}function Yg(e,t){var o=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<o;){var l=31-Yt(o),c=1<<l;t[l]=0,a[l]=-1,e[l]=-1,o&=~c}}function fl(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var a=31-Yt(o),l=1<<a;l&t|e[a]&t&&(e[a]|=t),o&=~l}}var ze=0;function fd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var hd,hl,pd,md,gd,pl=!1,La=[],Xn=null,Jn=null,Zn=null,Ss=new Map,ks=new Map,er=[],Xg="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 yd(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Ss.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.delete(t.pointerId)}}function Cs(e,t,o,a,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:o,eventSystemFlags:a,nativeEvent:c,targetContainers:[l]},t!==null&&(t=As(t),t!==null&&hl(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Jg(e,t,o,a,l){switch(t){case"focusin":return Xn=Cs(Xn,e,t,o,a,l),!0;case"dragenter":return Jn=Cs(Jn,e,t,o,a,l),!0;case"mouseover":return Zn=Cs(Zn,e,t,o,a,l),!0;case"pointerover":var c=l.pointerId;return Ss.set(c,Cs(Ss.get(c)||null,e,t,o,a,l)),!0;case"gotpointercapture":return c=l.pointerId,ks.set(c,Cs(ks.get(c)||null,e,t,o,a,l)),!0}return!1}function vd(e){var t=_r(e.target);if(t!==null){var o=zr(t);if(o!==null){if(t=o.tag,t===13){if(t=rd(o),t!==null){e.blockedOn=t,gd(e.priority,function(){pd(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ia(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=gl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o);vs=a,o.target.dispatchEvent(a),vs=null}else return t=As(o),t!==null&&hl(t),e.blockedOn=o,!1;t.shift()}return!0}function xd(e,t,o){Ia(e)&&o.delete(t)}function Zg(){pl=!1,Xn!==null&&Ia(Xn)&&(Xn=null),Jn!==null&&Ia(Jn)&&(Jn=null),Zn!==null&&Ia(Zn)&&(Zn=null),Ss.forEach(xd),ks.forEach(xd)}function Es(e,t){e.blockedOn===t&&(e.blockedOn=null,pl||(pl=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Zg)))}function Ns(e){function t(l){return Es(l,e)}if(0<La.length){Es(La[0],e);for(var o=1;o<La.length;o++){var a=La[o];a.blockedOn===e&&(a.blockedOn=null)}}for(Xn!==null&&Es(Xn,e),Jn!==null&&Es(Jn,e),Zn!==null&&Es(Zn,e),Ss.forEach(t),ks.forEach(t),o=0;o<er.length;o++)a=er[o],a.blockedOn===e&&(a.blockedOn=null);for(;0<er.length&&(o=er[0],o.blockedOn===null);)vd(o),o.blockedOn===null&&er.shift()}var bo=F.ReactCurrentBatchConfig,Oa=!0;function ey(e,t,o,a){var l=ze,c=bo.transition;bo.transition=null;try{ze=1,ml(e,t,o,a)}finally{ze=l,bo.transition=c}}function ty(e,t,o,a){var l=ze,c=bo.transition;bo.transition=null;try{ze=4,ml(e,t,o,a)}finally{ze=l,bo.transition=c}}function ml(e,t,o,a){if(Oa){var l=gl(e,t,o,a);if(l===null)Il(e,t,a,za,o),yd(e,a);else if(Jg(l,e,t,o,a))a.stopPropagation();else if(yd(e,a),t&4&&-1<Xg.indexOf(e)){for(;l!==null;){var c=As(l);if(c!==null&&hd(c),c=gl(e,t,o,a),c===null&&Il(e,t,a,za,o),c===l)break;l=c}l!==null&&a.stopPropagation()}else Il(e,t,a,null,o)}}var za=null;function gl(e,t,o,a){if(za=null,e=xo(a),e=_r(e),e!==null)if(t=zr(e),t===null)e=null;else if(o=t.tag,o===13){if(e=rd(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return za=e,null}function wd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($g()){case ul:return 1;case ud:return 4;case Pa:case Wg:return 16;case cd:return 536870912;default:return 16}default:return 16}}var tr=null,yl=null,_a=null;function bd(){if(_a)return _a;var e,t=yl,o=t.length,a,l="value"in tr?tr.value:tr.textContent,c=l.length;for(e=0;e<o&&t[e]===l[e];e++);var m=o-e;for(a=1;a<=m&&t[o-a]===l[c-a];a++);return _a=l.slice(e,1<a?1-a:void 0)}function Da(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Aa(){return!0}function Sd(){return!1}function It(e){function t(o,a,l,c,m){this._reactName=o,this._targetInst=l,this.type=a,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(o=e[k],this[k]=o?o(c):c[k]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Aa:Sd,this.isPropagationStopped=Sd,this}return J(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Aa)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Aa)},persist:function(){},isPersistent:Aa}),t}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vl=It(So),Ps=J({},So,{view:0,detail:0}),ny=It(Ps),xl,wl,Rs,Fa=J({},Ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Rs&&(Rs&&e.type==="mousemove"?(xl=e.screenX-Rs.screenX,wl=e.screenY-Rs.screenY):wl=xl=0,Rs=e),xl)},movementY:function(e){return"movementY"in e?e.movementY:wl}}),kd=It(Fa),ry=J({},Fa,{dataTransfer:0}),oy=It(ry),sy=J({},Ps,{relatedTarget:0}),bl=It(sy),ay=J({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),iy=It(ay),ly=J({},So,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uy=It(ly),cy=J({},So,{data:0}),Cd=It(cy),dy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fy={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"},hy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function py(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hy[e])?!!t[e]:!1}function Sl(){return py}var my=J({},Ps,{key:function(e){if(e.key){var t=dy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Da(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sl,charCode:function(e){return e.type==="keypress"?Da(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Da(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gy=It(my),yy=J({},Fa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ed=It(yy),vy=J({},Ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sl}),xy=It(vy),wy=J({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),by=It(wy),Sy=J({},Fa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ky=It(Sy),Cy=[9,13,27,32],kl=h&&"CompositionEvent"in window,js=null;h&&"documentMode"in document&&(js=document.documentMode);var Ey=h&&"TextEvent"in window&&!js,Nd=h&&(!kl||js&&8<js&&11>=js),Pd=" ",Rd=!1;function jd(e,t){switch(e){case"keyup":return Cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Md(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ko=!1;function Ny(e,t){switch(e){case"compositionend":return Md(t);case"keypress":return t.which!==32?null:(Rd=!0,Pd);case"textInput":return e=t.data,e===Pd&&Rd?null:e;default:return null}}function Py(e,t){if(ko)return e==="compositionend"||!kl&&jd(e,t)?(e=bd(),_a=yl=tr=null,ko=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nd&&t.locale!=="ko"?null:t.data;default:return null}}var Ry={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 Td(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ry[e.type]:t==="textarea"}function Ld(e,t,o,a){Ca(a),t=Ha(t,"onChange"),0<t.length&&(o=new vl("onChange","change",null,o,a),e.push({event:o,listeners:t}))}var Ms=null,Ts=null;function jy(e){Yd(e,0)}function Ua(e){var t=Ro(e);if(po(t))return e}function My(e,t){if(e==="change")return t}var Id=!1;if(h){var Cl;if(h){var El="oninput"in document;if(!El){var Od=document.createElement("div");Od.setAttribute("oninput","return;"),El=typeof Od.oninput=="function"}Cl=El}else Cl=!1;Id=Cl&&(!document.documentMode||9<document.documentMode)}function zd(){Ms&&(Ms.detachEvent("onpropertychange",_d),Ts=Ms=null)}function _d(e){if(e.propertyName==="value"&&Ua(Ts)){var t=[];Ld(t,Ts,e,xo(e)),St(jy,t)}}function Ty(e,t,o){e==="focusin"?(zd(),Ms=t,Ts=o,Ms.attachEvent("onpropertychange",_d)):e==="focusout"&&zd()}function Ly(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ua(Ts)}function Iy(e,t){if(e==="click")return Ua(t)}function Oy(e,t){if(e==="input"||e==="change")return Ua(t)}function zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:zy;function Ls(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var l=o[a];if(!v.call(t,l)||!Xt(e[l],t[l]))return!1}return!0}function Dd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ad(e,t){var o=Dd(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=t&&a>=t)return{node:o,offset:t-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Dd(o)}}function Fd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(){for(var e=window,t=Ir();t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=Ir(e.document)}return t}function Nl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _y(e){var t=Ud(),o=e.focusedElem,a=e.selectionRange;if(t!==o&&o&&o.ownerDocument&&Fd(o.ownerDocument.documentElement,o)){if(a!==null&&Nl(o)){if(t=a.start,e=a.end,e===void 0&&(e=t),"selectionStart"in o)o.selectionStart=t,o.selectionEnd=Math.min(e,o.value.length);else if(e=(t=o.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=o.textContent.length,c=Math.min(a.start,l);a=a.end===void 0?c:Math.min(a.end,l),!e.extend&&c>a&&(l=a,a=c,c=l),l=Ad(o,c);var m=Ad(o,a);l&&m&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),c>a?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=o;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<t.length;o++)e=t[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Dy=h&&"documentMode"in document&&11>=document.documentMode,Co=null,Pl=null,Is=null,Rl=!1;function Bd(e,t,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Rl||Co==null||Co!==Ir(a)||(a=Co,"selectionStart"in a&&Nl(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Is&&Ls(Is,a)||(Is=a,a=Ha(Pl,"onSelect"),0<a.length&&(t=new vl("onSelect","select",null,t,o),e.push({event:t,listeners:a}),t.target=Co)))}function Ba(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var Eo={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionend:Ba("Transition","TransitionEnd")},jl={},$d={};h&&($d=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function $a(e){if(jl[e])return jl[e];if(!Eo[e])return e;var t=Eo[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in $d)return jl[e]=t[o];return e}var Wd=$a("animationend"),Hd=$a("animationiteration"),Vd=$a("animationstart"),Qd=$a("transitionend"),Kd=new Map,qd="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 nr(e,t){Kd.set(e,t),d(t,[e])}for(var Ml=0;Ml<qd.length;Ml++){var Tl=qd[Ml],Ay=Tl.toLowerCase(),Fy=Tl[0].toUpperCase()+Tl.slice(1);nr(Ay,"on"+Fy)}nr(Wd,"onAnimationEnd"),nr(Hd,"onAnimationIteration"),nr(Vd,"onAnimationStart"),nr("dblclick","onDoubleClick"),nr("focusin","onFocus"),nr("focusout","onBlur"),nr(Qd,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Os="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(" "),Uy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Os));function Gd(e,t,o){var a=e.type||"unknown-event";e.currentTarget=o,Ag(a,t,void 0,e),e.currentTarget=null}function Yd(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var a=e[o],l=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var m=a.length-1;0<=m;m--){var k=a[m],P=k.instance,D=k.currentTarget;if(k=k.listener,P!==c&&l.isPropagationStopped())break e;Gd(l,k,D),c=P}else for(m=0;m<a.length;m++){if(k=a[m],P=k.instance,D=k.currentTarget,k=k.listener,P!==c&&l.isPropagationStopped())break e;Gd(l,k,D),c=P}}}if(Na)throw e=ll,Na=!1,ll=null,e}function Fe(e,t){var o=t[Fl];o===void 0&&(o=t[Fl]=new Set);var a=e+"__bubble";o.has(a)||(Xd(t,e,2,!1),o.add(a))}function Ll(e,t,o){var a=0;t&&(a|=4),Xd(o,e,a,t)}var Wa="_reactListening"+Math.random().toString(36).slice(2);function zs(e){if(!e[Wa]){e[Wa]=!0,i.forEach(function(o){o!=="selectionchange"&&(Uy.has(o)||Ll(o,!1,e),Ll(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wa]||(t[Wa]=!0,Ll("selectionchange",!1,t))}}function Xd(e,t,o,a){switch(wd(t)){case 1:var l=ey;break;case 4:l=ty;break;default:l=ml}o=l.bind(null,t,o,e),l=void 0,!Gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,o,{capture:!0,passive:l}):e.addEventListener(t,o,!0):l!==void 0?e.addEventListener(t,o,{passive:l}):e.addEventListener(t,o,!1)}function Il(e,t,o,a,l){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var m=a.tag;if(m===3||m===4){var k=a.stateNode.containerInfo;if(k===l||k.nodeType===8&&k.parentNode===l)break;if(m===4)for(m=a.return;m!==null;){var P=m.tag;if((P===3||P===4)&&(P=m.stateNode.containerInfo,P===l||P.nodeType===8&&P.parentNode===l))return;m=m.return}for(;k!==null;){if(m=_r(k),m===null)return;if(P=m.tag,P===5||P===6){a=c=m;continue e}k=k.parentNode}}a=a.return}St(function(){var D=c,H=xo(o),Q=[];e:{var W=Kd.get(e);if(W!==void 0){var se=vl,ue=e;switch(e){case"keypress":if(Da(o)===0)break e;case"keydown":case"keyup":se=gy;break;case"focusin":ue="focus",se=bl;break;case"focusout":ue="blur",se=bl;break;case"beforeblur":case"afterblur":se=bl;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=oy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=xy;break;case Wd:case Hd:case Vd:se=iy;break;case Qd:se=by;break;case"scroll":se=ny;break;case"wheel":se=ky;break;case"copy":case"cut":case"paste":se=uy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=Ed}var ce=(t&4)!==0,Ge=!ce&&e==="scroll",L=ce?W!==null?W+"Capture":null:W;ce=[];for(var R=D,O;R!==null;){O=R;var Y=O.stateNode;if(O.tag===5&&Y!==null&&(O=Y,L!==null&&(Y=kt(R,L),Y!=null&&ce.push(_s(R,Y,O)))),Ge)break;R=R.return}0<ce.length&&(W=new se(W,ue,null,o,H),Q.push({event:W,listeners:ce}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",W&&o!==vs&&(ue=o.relatedTarget||o.fromElement)&&(_r(ue)||ue[Rn]))break e;if((se||W)&&(W=H.window===H?H:(W=H.ownerDocument)?W.defaultView||W.parentWindow:window,se?(ue=o.relatedTarget||o.toElement,se=D,ue=ue?_r(ue):null,ue!==null&&(Ge=zr(ue),ue!==Ge||ue.tag!==5&&ue.tag!==6)&&(ue=null)):(se=null,ue=D),se!==ue)){if(ce=kd,Y="onMouseLeave",L="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(ce=Ed,Y="onPointerLeave",L="onPointerEnter",R="pointer"),Ge=se==null?W:Ro(se),O=ue==null?W:Ro(ue),W=new ce(Y,R+"leave",se,o,H),W.target=Ge,W.relatedTarget=O,Y=null,_r(H)===D&&(ce=new ce(L,R+"enter",ue,o,H),ce.target=O,ce.relatedTarget=Ge,Y=ce),Ge=Y,se&&ue)t:{for(ce=se,L=ue,R=0,O=ce;O;O=No(O))R++;for(O=0,Y=L;Y;Y=No(Y))O++;for(;0<R-O;)ce=No(ce),R--;for(;0<O-R;)L=No(L),O--;for(;R--;){if(ce===L||L!==null&&ce===L.alternate)break t;ce=No(ce),L=No(L)}ce=null}else ce=null;se!==null&&Jd(Q,W,se,ce,!1),ue!==null&&Ge!==null&&Jd(Q,Ge,ue,ce,!0)}}e:{if(W=D?Ro(D):window,se=W.nodeName&&W.nodeName.toLowerCase(),se==="select"||se==="input"&&W.type==="file")var fe=My;else if(Td(W))if(Id)fe=Oy;else{fe=Ly;var pe=Ty}else(se=W.nodeName)&&se.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(fe=Iy);if(fe&&(fe=fe(e,D))){Ld(Q,fe,o,H);break e}pe&&pe(e,W,D),e==="focusout"&&(pe=W._wrapperState)&&pe.controlled&&W.type==="number"&&gs(W,"number",W.value)}switch(pe=D?Ro(D):window,e){case"focusin":(Td(pe)||pe.contentEditable==="true")&&(Co=pe,Pl=D,Is=null);break;case"focusout":Is=Pl=Co=null;break;case"mousedown":Rl=!0;break;case"contextmenu":case"mouseup":case"dragend":Rl=!1,Bd(Q,o,H);break;case"selectionchange":if(Dy)break;case"keydown":case"keyup":Bd(Q,o,H)}var me;if(kl)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ko?jd(e,o)&&(ve="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(ve="onCompositionStart");ve&&(Nd&&o.locale!=="ko"&&(ko||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ko&&(me=bd()):(tr=H,yl="value"in tr?tr.value:tr.textContent,ko=!0)),pe=Ha(D,ve),0<pe.length&&(ve=new Cd(ve,e,null,o,H),Q.push({event:ve,listeners:pe}),me?ve.data=me:(me=Md(o),me!==null&&(ve.data=me)))),(me=Ey?Ny(e,o):Py(e,o))&&(D=Ha(D,"onBeforeInput"),0<D.length&&(H=new Cd("onBeforeInput","beforeinput",null,o,H),Q.push({event:H,listeners:D}),H.data=me))}Yd(Q,t)})}function _s(e,t,o){return{instance:e,listener:t,currentTarget:o}}function Ha(e,t){for(var o=t+"Capture",a=[];e!==null;){var l=e,c=l.stateNode;l.tag===5&&c!==null&&(l=c,c=kt(e,o),c!=null&&a.unshift(_s(e,c,l)),c=kt(e,t),c!=null&&a.push(_s(e,c,l))),e=e.return}return a}function No(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jd(e,t,o,a,l){for(var c=t._reactName,m=[];o!==null&&o!==a;){var k=o,P=k.alternate,D=k.stateNode;if(P!==null&&P===a)break;k.tag===5&&D!==null&&(k=D,l?(P=kt(o,c),P!=null&&m.unshift(_s(o,P,k))):l||(P=kt(o,c),P!=null&&m.push(_s(o,P,k)))),o=o.return}m.length!==0&&e.push({event:t,listeners:m})}var By=/\r\n?/g,$y=/\u0000|\uFFFD/g;function Zd(e){return(typeof e=="string"?e:""+e).replace(By,`
|
|
38
|
-
`).replace($y,"")}function Va(e,t,o){if(t=Zd(t),Zd(e)!==t&&o)throw Error(s(425))}function Qa(){}var Ol=null,zl=null;function _l(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Dl=typeof setTimeout=="function"?setTimeout:void 0,Wy=typeof clearTimeout=="function"?clearTimeout:void 0,ef=typeof Promise=="function"?Promise:void 0,Hy=typeof queueMicrotask=="function"?queueMicrotask:typeof ef<"u"?function(e){return ef.resolve(null).then(e).catch(Vy)}:Dl;function Vy(e){setTimeout(function(){throw e})}function Al(e,t){var o=t,a=0;do{var l=o.nextSibling;if(e.removeChild(o),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(a===0){e.removeChild(l),Ns(t);return}a--}else o!=="$"&&o!=="$?"&&o!=="$!"||a++;o=l}while(o);Ns(t)}function rr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(t===0)return e;t--}else o==="/$"&&t++}e=e.previousSibling}return null}var Po=Math.random().toString(36).slice(2),vn="__reactFiber$"+Po,Ds="__reactProps$"+Po,Rn="__reactContainer$"+Po,Fl="__reactEvents$"+Po,Qy="__reactListeners$"+Po,Ky="__reactHandles$"+Po;function _r(e){var t=e[vn];if(t)return t;for(var o=e.parentNode;o;){if(t=o[Rn]||o[vn]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=tf(e);e!==null;){if(o=e[vn])return o;e=tf(e)}return t}e=o,o=e.parentNode}return null}function As(e){return e=e[vn]||e[Rn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ro(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Ka(e){return e[Ds]||null}var Ul=[],jo=-1;function or(e){return{current:e}}function Ue(e){0>jo||(e.current=Ul[jo],Ul[jo]=null,jo--)}function Ae(e,t){jo++,Ul[jo]=e.current,e.current=t}var sr={},dt=or(sr),Ct=or(!1),Dr=sr;function Mo(e,t){var o=e.type.contextTypes;if(!o)return sr;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var l={},c;for(c in o)l[c]=t[c];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Et(e){return e=e.childContextTypes,e!=null}function qa(){Ue(Ct),Ue(dt)}function nf(e,t,o){if(dt.current!==sr)throw Error(s(168));Ae(dt,t),Ae(Ct,o)}function rf(e,t,o){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return o;a=a.getChildContext();for(var l in a)if(!(l in t))throw Error(s(108,ge(e)||"Unknown",l));return J({},o,a)}function Ga(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Dr=dt.current,Ae(dt,e),Ae(Ct,Ct.current),!0}function of(e,t,o){var a=e.stateNode;if(!a)throw Error(s(169));o?(e=rf(e,t,Dr),a.__reactInternalMemoizedMergedChildContext=e,Ue(Ct),Ue(dt),Ae(dt,e)):Ue(Ct),Ae(Ct,o)}var jn=null,Ya=!1,Bl=!1;function sf(e){jn===null?jn=[e]:jn.push(e)}function qy(e){Ya=!0,sf(e)}function ar(){if(!Bl&&jn!==null){Bl=!0;var e=0,t=ze;try{var o=jn;for(ze=1;e<o.length;e++){var a=o[e];do a=a(!0);while(a!==null)}jn=null,Ya=!1}catch(l){throw jn!==null&&(jn=jn.slice(e+1)),id(ul,ar),l}finally{ze=t,Bl=!1}}return null}var To=[],Lo=0,Xa=null,Ja=0,Ft=[],Ut=0,Ar=null,Mn=1,Tn="";function Fr(e,t){To[Lo++]=Ja,To[Lo++]=Xa,Xa=e,Ja=t}function af(e,t,o){Ft[Ut++]=Mn,Ft[Ut++]=Tn,Ft[Ut++]=Ar,Ar=e;var a=Mn;e=Tn;var l=32-Yt(a)-1;a&=~(1<<l),o+=1;var c=32-Yt(t)+l;if(30<c){var m=l-l%5;c=(a&(1<<m)-1).toString(32),a>>=m,l-=m,Mn=1<<32-Yt(t)+l|o<<l|a,Tn=c+e}else Mn=1<<c|o<<l|a,Tn=e}function $l(e){e.return!==null&&(Fr(e,1),af(e,1,0))}function Wl(e){for(;e===Xa;)Xa=To[--Lo],To[Lo]=null,Ja=To[--Lo],To[Lo]=null;for(;e===Ar;)Ar=Ft[--Ut],Ft[Ut]=null,Tn=Ft[--Ut],Ft[Ut]=null,Mn=Ft[--Ut],Ft[Ut]=null}var Ot=null,zt=null,$e=!1,Jt=null;function lf(e,t){var o=Ht(5,null,null,0);o.elementType="DELETED",o.stateNode=t,o.return=e,t=e.deletions,t===null?(e.deletions=[o],e.flags|=16):t.push(o)}function uf(e,t){switch(e.tag){case 5:var o=e.type;return t=t.nodeType!==1||o.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ot=e,zt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ot=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(o=Ar!==null?{id:Mn,overflow:Tn}:null,e.memoizedState={dehydrated:t,treeContext:o,retryLane:1073741824},o=Ht(18,null,null,0),o.stateNode=t,o.return=e,e.child=o,Ot=e,zt=null,!0):!1;default:return!1}}function Hl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Vl(e){if($e){var t=zt;if(t){var o=t;if(!uf(e,t)){if(Hl(e))throw Error(s(418));t=rr(o.nextSibling);var a=Ot;t&&uf(e,t)?lf(a,o):(e.flags=e.flags&-4097|2,$e=!1,Ot=e)}}else{if(Hl(e))throw Error(s(418));e.flags=e.flags&-4097|2,$e=!1,Ot=e}}}function cf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ot=e}function Za(e){if(e!==Ot)return!1;if(!$e)return cf(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_l(e.type,e.memoizedProps)),t&&(t=zt)){if(Hl(e))throw df(),Error(s(418));for(;t;)lf(e,t),t=rr(t.nextSibling)}if(cf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(t===0){zt=rr(e.nextSibling);break e}t--}else o!=="$"&&o!=="$!"&&o!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Ot?rr(e.stateNode.nextSibling):null;return!0}function df(){for(var e=zt;e;)e=rr(e.nextSibling)}function Io(){zt=Ot=null,$e=!1}function Ql(e){Jt===null?Jt=[e]:Jt.push(e)}var Gy=F.ReactCurrentBatchConfig;function Fs(e,t,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(s(309));var a=o.stateNode}if(!a)throw Error(s(147,e));var l=a,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(m){var k=l.refs;m===null?delete k[c]:k[c]=m},t._stringRef=c,t)}if(typeof e!="string")throw Error(s(284));if(!o._owner)throw Error(s(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ff(e){var t=e._init;return t(e._payload)}function hf(e){function t(L,R){if(e){var O=L.deletions;O===null?(L.deletions=[R],L.flags|=16):O.push(R)}}function o(L,R){if(!e)return null;for(;R!==null;)t(L,R),R=R.sibling;return null}function a(L,R){for(L=new Map;R!==null;)R.key!==null?L.set(R.key,R):L.set(R.index,R),R=R.sibling;return L}function l(L,R){return L=pr(L,R),L.index=0,L.sibling=null,L}function c(L,R,O){return L.index=O,e?(O=L.alternate,O!==null?(O=O.index,O<R?(L.flags|=2,R):O):(L.flags|=2,R)):(L.flags|=1048576,R)}function m(L){return e&&L.alternate===null&&(L.flags|=2),L}function k(L,R,O,Y){return R===null||R.tag!==6?(R=Du(O,L.mode,Y),R.return=L,R):(R=l(R,O),R.return=L,R)}function P(L,R,O,Y){var fe=O.type;return fe===V?H(L,R,O.props.children,Y,O.key):R!==null&&(R.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Se&&ff(fe)===R.type)?(Y=l(R,O.props),Y.ref=Fs(L,R,O),Y.return=L,Y):(Y=Ci(O.type,O.key,O.props,null,L.mode,Y),Y.ref=Fs(L,R,O),Y.return=L,Y)}function D(L,R,O,Y){return R===null||R.tag!==4||R.stateNode.containerInfo!==O.containerInfo||R.stateNode.implementation!==O.implementation?(R=Au(O,L.mode,Y),R.return=L,R):(R=l(R,O.children||[]),R.return=L,R)}function H(L,R,O,Y,fe){return R===null||R.tag!==7?(R=Kr(O,L.mode,Y,fe),R.return=L,R):(R=l(R,O),R.return=L,R)}function Q(L,R,O){if(typeof R=="string"&&R!==""||typeof R=="number")return R=Du(""+R,L.mode,O),R.return=L,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case q:return O=Ci(R.type,R.key,R.props,null,L.mode,O),O.ref=Fs(L,null,R),O.return=L,O;case ee:return R=Au(R,L.mode,O),R.return=L,R;case Se:var Y=R._init;return Q(L,Y(R._payload),O)}if(Gn(R)||K(R))return R=Kr(R,L.mode,O,null),R.return=L,R;ei(L,R)}return null}function W(L,R,O,Y){var fe=R!==null?R.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return fe!==null?null:k(L,R,""+O,Y);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case q:return O.key===fe?P(L,R,O,Y):null;case ee:return O.key===fe?D(L,R,O,Y):null;case Se:return fe=O._init,W(L,R,fe(O._payload),Y)}if(Gn(O)||K(O))return fe!==null?null:H(L,R,O,Y,null);ei(L,O)}return null}function se(L,R,O,Y,fe){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return L=L.get(O)||null,k(R,L,""+Y,fe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case q:return L=L.get(Y.key===null?O:Y.key)||null,P(R,L,Y,fe);case ee:return L=L.get(Y.key===null?O:Y.key)||null,D(R,L,Y,fe);case Se:var pe=Y._init;return se(L,R,O,pe(Y._payload),fe)}if(Gn(Y)||K(Y))return L=L.get(O)||null,H(R,L,Y,fe,null);ei(R,Y)}return null}function ue(L,R,O,Y){for(var fe=null,pe=null,me=R,ve=R=0,st=null;me!==null&&ve<O.length;ve++){me.index>ve?(st=me,me=null):st=me.sibling;var je=W(L,me,O[ve],Y);if(je===null){me===null&&(me=st);break}e&&me&&je.alternate===null&&t(L,me),R=c(je,R,ve),pe===null?fe=je:pe.sibling=je,pe=je,me=st}if(ve===O.length)return o(L,me),$e&&Fr(L,ve),fe;if(me===null){for(;ve<O.length;ve++)me=Q(L,O[ve],Y),me!==null&&(R=c(me,R,ve),pe===null?fe=me:pe.sibling=me,pe=me);return $e&&Fr(L,ve),fe}for(me=a(L,me);ve<O.length;ve++)st=se(me,L,ve,O[ve],Y),st!==null&&(e&&st.alternate!==null&&me.delete(st.key===null?ve:st.key),R=c(st,R,ve),pe===null?fe=st:pe.sibling=st,pe=st);return e&&me.forEach(function(mr){return t(L,mr)}),$e&&Fr(L,ve),fe}function ce(L,R,O,Y){var fe=K(O);if(typeof fe!="function")throw Error(s(150));if(O=fe.call(O),O==null)throw Error(s(151));for(var pe=fe=null,me=R,ve=R=0,st=null,je=O.next();me!==null&&!je.done;ve++,je=O.next()){me.index>ve?(st=me,me=null):st=me.sibling;var mr=W(L,me,je.value,Y);if(mr===null){me===null&&(me=st);break}e&&me&&mr.alternate===null&&t(L,me),R=c(mr,R,ve),pe===null?fe=mr:pe.sibling=mr,pe=mr,me=st}if(je.done)return o(L,me),$e&&Fr(L,ve),fe;if(me===null){for(;!je.done;ve++,je=O.next())je=Q(L,je.value,Y),je!==null&&(R=c(je,R,ve),pe===null?fe=je:pe.sibling=je,pe=je);return $e&&Fr(L,ve),fe}for(me=a(L,me);!je.done;ve++,je=O.next())je=se(me,L,ve,je.value,Y),je!==null&&(e&&je.alternate!==null&&me.delete(je.key===null?ve:je.key),R=c(je,R,ve),pe===null?fe=je:pe.sibling=je,pe=je);return e&&me.forEach(function(Rv){return t(L,Rv)}),$e&&Fr(L,ve),fe}function Ge(L,R,O,Y){if(typeof O=="object"&&O!==null&&O.type===V&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case q:e:{for(var fe=O.key,pe=R;pe!==null;){if(pe.key===fe){if(fe=O.type,fe===V){if(pe.tag===7){o(L,pe.sibling),R=l(pe,O.props.children),R.return=L,L=R;break e}}else if(pe.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Se&&ff(fe)===pe.type){o(L,pe.sibling),R=l(pe,O.props),R.ref=Fs(L,pe,O),R.return=L,L=R;break e}o(L,pe);break}else t(L,pe);pe=pe.sibling}O.type===V?(R=Kr(O.props.children,L.mode,Y,O.key),R.return=L,L=R):(Y=Ci(O.type,O.key,O.props,null,L.mode,Y),Y.ref=Fs(L,R,O),Y.return=L,L=Y)}return m(L);case ee:e:{for(pe=O.key;R!==null;){if(R.key===pe)if(R.tag===4&&R.stateNode.containerInfo===O.containerInfo&&R.stateNode.implementation===O.implementation){o(L,R.sibling),R=l(R,O.children||[]),R.return=L,L=R;break e}else{o(L,R);break}else t(L,R);R=R.sibling}R=Au(O,L.mode,Y),R.return=L,L=R}return m(L);case Se:return pe=O._init,Ge(L,R,pe(O._payload),Y)}if(Gn(O))return ue(L,R,O,Y);if(K(O))return ce(L,R,O,Y);ei(L,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,R!==null&&R.tag===6?(o(L,R.sibling),R=l(R,O),R.return=L,L=R):(o(L,R),R=Du(O,L.mode,Y),R.return=L,L=R),m(L)):o(L,R)}return Ge}var Oo=hf(!0),pf=hf(!1),ti=or(null),ni=null,zo=null,Kl=null;function ql(){Kl=zo=ni=null}function Gl(e){var t=ti.current;Ue(ti),e._currentValue=t}function Yl(e,t,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===o)break;e=e.return}}function _o(e,t){ni=e,Kl=zo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Nt=!0),e.firstContext=null)}function Bt(e){var t=e._currentValue;if(Kl!==e)if(e={context:e,memoizedValue:t,next:null},zo===null){if(ni===null)throw Error(s(308));zo=e,ni.dependencies={lanes:0,firstContext:e}}else zo=zo.next=e;return t}var Ur=null;function Xl(e){Ur===null?Ur=[e]:Ur.push(e)}function mf(e,t,o,a){var l=t.interleaved;return l===null?(o.next=o,Xl(t)):(o.next=l.next,l.next=o),t.interleaved=o,Ln(e,a)}function Ln(e,t){e.lanes|=t;var o=e.alternate;for(o!==null&&(o.lanes|=t),o=e,e=e.return;e!==null;)e.childLanes|=t,o=e.alternate,o!==null&&(o.childLanes|=t),o=e,e=e.return;return o.tag===3?o.stateNode:null}var ir=!1;function Jl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function In(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,Ln(e,o)}return l=a.interleaved,l===null?(t.next=t,Xl(a)):(t.next=l.next,l.next=t),a.interleaved=t,Ln(e,o)}function ri(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194240)!==0)){var a=t.lanes;a&=e.pendingLanes,o|=a,t.lanes=o,fl(e,o)}}function yf(e,t){var o=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,o===a)){var l=null,c=null;if(o=o.firstBaseUpdate,o!==null){do{var m={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};c===null?l=c=m:c=c.next=m,o=o.next}while(o!==null);c===null?l=c=t:c=c.next=t}else l=c=t;o={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:a.shared,effects:a.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}function oi(e,t,o,a){var l=e.updateQueue;ir=!1;var c=l.firstBaseUpdate,m=l.lastBaseUpdate,k=l.shared.pending;if(k!==null){l.shared.pending=null;var P=k,D=P.next;P.next=null,m===null?c=D:m.next=D,m=P;var H=e.alternate;H!==null&&(H=H.updateQueue,k=H.lastBaseUpdate,k!==m&&(k===null?H.firstBaseUpdate=D:k.next=D,H.lastBaseUpdate=P))}if(c!==null){var Q=l.baseState;m=0,H=D=P=null,k=c;do{var W=k.lane,se=k.eventTime;if((a&W)===W){H!==null&&(H=H.next={eventTime:se,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var ue=e,ce=k;switch(W=t,se=o,ce.tag){case 1:if(ue=ce.payload,typeof ue=="function"){Q=ue.call(se,Q,W);break e}Q=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ce.payload,W=typeof ue=="function"?ue.call(se,Q,W):ue,W==null)break e;Q=J({},Q,W);break e;case 2:ir=!0}}k.callback!==null&&k.lane!==0&&(e.flags|=64,W=l.effects,W===null?l.effects=[k]:W.push(k))}else se={eventTime:se,lane:W,tag:k.tag,payload:k.payload,callback:k.callback,next:null},H===null?(D=H=se,P=Q):H=H.next=se,m|=W;if(k=k.next,k===null){if(k=l.shared.pending,k===null)break;W=k,k=W.next,W.next=null,l.lastBaseUpdate=W,l.shared.pending=null}}while(!0);if(H===null&&(P=Q),l.baseState=P,l.firstBaseUpdate=D,l.lastBaseUpdate=H,t=l.shared.interleaved,t!==null){l=t;do m|=l.lane,l=l.next;while(l!==t)}else c===null&&(l.shared.lanes=0);Wr|=m,e.lanes=m,e.memoizedState=Q}}function vf(e,t,o){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var a=e[t],l=a.callback;if(l!==null){if(a.callback=null,a=o,typeof l!="function")throw Error(s(191,l));l.call(a)}}}var Us={},xn=or(Us),Bs=or(Us),$s=or(Us);function Br(e){if(e===Us)throw Error(s(174));return e}function Zl(e,t){switch(Ae($s,t),Ae(Bs,e),Ae(xn,Us),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fn(t,e)}Ue(xn),Ae(xn,t)}function Do(){Ue(xn),Ue(Bs),Ue($s)}function xf(e){Br($s.current);var t=Br(xn.current),o=fn(t,e.type);t!==o&&(Ae(Bs,e),Ae(xn,o))}function eu(e){Bs.current===e&&(Ue(xn),Ue(Bs))}var He=or(0);function si(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tu=[];function nu(){for(var e=0;e<tu.length;e++)tu[e]._workInProgressVersionPrimary=null;tu.length=0}var ai=F.ReactCurrentDispatcher,ru=F.ReactCurrentBatchConfig,$r=0,Ve=null,Je=null,rt=null,ii=!1,Ws=!1,Hs=0,Yy=0;function ft(){throw Error(s(321))}function ou(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!Xt(e[o],t[o]))return!1;return!0}function su(e,t,o,a,l,c){if($r=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ai.current=e===null||e.memoizedState===null?ev:tv,e=o(a,l),Ws){c=0;do{if(Ws=!1,Hs=0,25<=c)throw Error(s(301));c+=1,rt=Je=null,t.updateQueue=null,ai.current=nv,e=o(a,l)}while(Ws)}if(ai.current=ci,t=Je!==null&&Je.next!==null,$r=0,rt=Je=Ve=null,ii=!1,t)throw Error(s(300));return e}function au(){var e=Hs!==0;return Hs=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?Ve.memoizedState=rt=e:rt=rt.next=e,rt}function $t(){if(Je===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=rt===null?Ve.memoizedState:rt.next;if(t!==null)rt=t,Je=e;else{if(e===null)throw Error(s(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},rt===null?Ve.memoizedState=rt=e:rt=rt.next=e}return rt}function Vs(e,t){return typeof t=="function"?t(e):t}function iu(e){var t=$t(),o=t.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=Je,l=a.baseQueue,c=o.pending;if(c!==null){if(l!==null){var m=l.next;l.next=c.next,c.next=m}a.baseQueue=l=c,o.pending=null}if(l!==null){c=l.next,a=a.baseState;var k=m=null,P=null,D=c;do{var H=D.lane;if(($r&H)===H)P!==null&&(P=P.next={lane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),a=D.hasEagerState?D.eagerState:e(a,D.action);else{var Q={lane:H,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null};P===null?(k=P=Q,m=a):P=P.next=Q,Ve.lanes|=H,Wr|=H}D=D.next}while(D!==null&&D!==c);P===null?m=a:P.next=k,Xt(a,t.memoizedState)||(Nt=!0),t.memoizedState=a,t.baseState=m,t.baseQueue=P,o.lastRenderedState=a}if(e=o.interleaved,e!==null){l=e;do c=l.lane,Ve.lanes|=c,Wr|=c,l=l.next;while(l!==e)}else l===null&&(o.lanes=0);return[t.memoizedState,o.dispatch]}function lu(e){var t=$t(),o=t.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=e;var a=o.dispatch,l=o.pending,c=t.memoizedState;if(l!==null){o.pending=null;var m=l=l.next;do c=e(c,m.action),m=m.next;while(m!==l);Xt(c,t.memoizedState)||(Nt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),o.lastRenderedState=c}return[c,a]}function wf(){}function bf(e,t){var o=Ve,a=$t(),l=t(),c=!Xt(a.memoizedState,l);if(c&&(a.memoizedState=l,Nt=!0),a=a.queue,uu(Cf.bind(null,o,a,e),[e]),a.getSnapshot!==t||c||rt!==null&&rt.memoizedState.tag&1){if(o.flags|=2048,Qs(9,kf.bind(null,o,a,l,t),void 0,null),ot===null)throw Error(s(349));($r&30)!==0||Sf(o,t,l)}return l}function Sf(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function kf(e,t,o,a){t.value=o,t.getSnapshot=a,Ef(t)&&Nf(e)}function Cf(e,t,o){return o(function(){Ef(t)&&Nf(e)})}function Ef(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!Xt(e,o)}catch{return!0}}function Nf(e){var t=Ln(e,1);t!==null&&nn(t,e,1,-1)}function Pf(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vs,lastRenderedState:e},t.queue=e,e=e.dispatch=Zy.bind(null,Ve,e),[t.memoizedState,e]}function Qs(e,t,o,a){return e={tag:e,create:t,destroy:o,deps:a,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(o=t.lastEffect,o===null?t.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,t.lastEffect=e)),e}function Rf(){return $t().memoizedState}function li(e,t,o,a){var l=wn();Ve.flags|=e,l.memoizedState=Qs(1|t,o,void 0,a===void 0?null:a)}function ui(e,t,o,a){var l=$t();a=a===void 0?null:a;var c=void 0;if(Je!==null){var m=Je.memoizedState;if(c=m.destroy,a!==null&&ou(a,m.deps)){l.memoizedState=Qs(t,o,c,a);return}}Ve.flags|=e,l.memoizedState=Qs(1|t,o,c,a)}function jf(e,t){return li(8390656,8,e,t)}function uu(e,t){return ui(2048,8,e,t)}function Mf(e,t){return ui(4,2,e,t)}function Tf(e,t){return ui(4,4,e,t)}function Lf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function If(e,t,o){return o=o!=null?o.concat([e]):null,ui(4,4,Lf.bind(null,t,e),o)}function cu(){}function Of(e,t){var o=$t();t=t===void 0?null:t;var a=o.memoizedState;return a!==null&&t!==null&&ou(t,a[1])?a[0]:(o.memoizedState=[e,t],e)}function zf(e,t){var o=$t();t=t===void 0?null:t;var a=o.memoizedState;return a!==null&&t!==null&&ou(t,a[1])?a[0]:(e=e(),o.memoizedState=[e,t],e)}function _f(e,t,o){return($r&21)===0?(e.baseState&&(e.baseState=!1,Nt=!0),e.memoizedState=o):(Xt(o,t)||(o=dd(),Ve.lanes|=o,Wr|=o,e.baseState=!0),t)}function Xy(e,t){var o=ze;ze=o!==0&&4>o?o:4,e(!0);var a=ru.transition;ru.transition={};try{e(!1),t()}finally{ze=o,ru.transition=a}}function Df(){return $t().memoizedState}function Jy(e,t,o){var a=fr(e);if(o={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null},Af(e))Ff(t,o);else if(o=mf(e,t,o,a),o!==null){var l=xt();nn(o,e,a,l),Uf(o,t,a)}}function Zy(e,t,o){var a=fr(e),l={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null};if(Af(e))Ff(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,k=c(m,o);if(l.hasEagerState=!0,l.eagerState=k,Xt(k,m)){var P=t.interleaved;P===null?(l.next=l,Xl(t)):(l.next=P.next,P.next=l),t.interleaved=l;return}}catch{}finally{}o=mf(e,t,l,a),o!==null&&(l=xt(),nn(o,e,a,l),Uf(o,t,a))}}function Af(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Ff(e,t){Ws=ii=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function Uf(e,t,o){if((o&4194240)!==0){var a=t.lanes;a&=e.pendingLanes,o|=a,t.lanes=o,fl(e,o)}}var ci={readContext:Bt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},ev={readContext:Bt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:jf,useImperativeHandle:function(e,t,o){return o=o!=null?o.concat([e]):null,li(4194308,4,Lf.bind(null,t,e),o)},useLayoutEffect:function(e,t){return li(4194308,4,e,t)},useInsertionEffect:function(e,t){return li(4,2,e,t)},useMemo:function(e,t){var o=wn();return t=t===void 0?null:t,e=e(),o.memoizedState=[e,t],e},useReducer:function(e,t,o){var a=wn();return t=o!==void 0?o(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=Jy.bind(null,Ve,e),[a.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Pf,useDebugValue:cu,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Pf(!1),t=e[0];return e=Xy.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,o){var a=Ve,l=wn();if($e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=t(),ot===null)throw Error(s(349));($r&30)!==0||Sf(a,t,o)}l.memoizedState=o;var c={value:o,getSnapshot:t};return l.queue=c,jf(Cf.bind(null,a,c,e),[e]),a.flags|=2048,Qs(9,kf.bind(null,a,c,o,t),void 0,null),o},useId:function(){var e=wn(),t=ot.identifierPrefix;if($e){var o=Tn,a=Mn;o=(a&~(1<<32-Yt(a)-1)).toString(32)+o,t=":"+t+"R"+o,o=Hs++,0<o&&(t+="H"+o.toString(32)),t+=":"}else o=Yy++,t=":"+t+"r"+o.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tv={readContext:Bt,useCallback:Of,useContext:Bt,useEffect:uu,useImperativeHandle:If,useInsertionEffect:Mf,useLayoutEffect:Tf,useMemo:zf,useReducer:iu,useRef:Rf,useState:function(){return iu(Vs)},useDebugValue:cu,useDeferredValue:function(e){var t=$t();return _f(t,Je.memoizedState,e)},useTransition:function(){var e=iu(Vs)[0],t=$t().memoizedState;return[e,t]},useMutableSource:wf,useSyncExternalStore:bf,useId:Df,unstable_isNewReconciler:!1},nv={readContext:Bt,useCallback:Of,useContext:Bt,useEffect:uu,useImperativeHandle:If,useInsertionEffect:Mf,useLayoutEffect:Tf,useMemo:zf,useReducer:lu,useRef:Rf,useState:function(){return lu(Vs)},useDebugValue:cu,useDeferredValue:function(e){var t=$t();return Je===null?t.memoizedState=e:_f(t,Je.memoizedState,e)},useTransition:function(){var e=lu(Vs)[0],t=$t().memoizedState;return[e,t]},useMutableSource:wf,useSyncExternalStore:bf,useId:Df,unstable_isNewReconciler:!1};function Zt(e,t){if(e&&e.defaultProps){t=J({},t),e=e.defaultProps;for(var o in e)t[o]===void 0&&(t[o]=e[o]);return t}return t}function du(e,t,o,a){t=e.memoizedState,o=o(a,t),o=o==null?t:J({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var di={isMounted:function(e){return(e=e._reactInternals)?zr(e)===e:!1},enqueueSetState:function(e,t,o){e=e._reactInternals;var a=xt(),l=fr(e),c=In(a,l);c.payload=t,o!=null&&(c.callback=o),t=lr(e,c,l),t!==null&&(nn(t,e,l,a),ri(t,e,l))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var a=xt(),l=fr(e),c=In(a,l);c.tag=1,c.payload=t,o!=null&&(c.callback=o),t=lr(e,c,l),t!==null&&(nn(t,e,l,a),ri(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=xt(),a=fr(e),l=In(o,a);l.tag=2,t!=null&&(l.callback=t),t=lr(e,l,a),t!==null&&(nn(t,e,a,o),ri(t,e,a))}};function Bf(e,t,o,a,l,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,m):t.prototype&&t.prototype.isPureReactComponent?!Ls(o,a)||!Ls(l,c):!0}function $f(e,t,o){var a=!1,l=sr,c=t.contextType;return typeof c=="object"&&c!==null?c=Bt(c):(l=Et(t)?Dr:dt.current,a=t.contextTypes,c=(a=a!=null)?Mo(e,l):sr),t=new t(o,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=di,e.stateNode=t,t._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=c),t}function Wf(e,t,o,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,a),t.state!==e&&di.enqueueReplaceState(t,t.state,null)}function fu(e,t,o,a){var l=e.stateNode;l.props=o,l.state=e.memoizedState,l.refs={},Jl(e);var c=t.contextType;typeof c=="object"&&c!==null?l.context=Bt(c):(c=Et(t)?Dr:dt.current,l.context=Mo(e,c)),l.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(du(e,t,c,o),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&di.enqueueReplaceState(l,l.state,null),oi(e,o,l,a),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Ao(e,t){try{var o="",a=t;do o+=ye(a),a=a.return;while(a);var l=o}catch(c){l=`
|
|
39
|
-
Error generating stack: `+c.message+`
|
|
40
|
-
`+c.stack}return{value:e,source:t,stack:l,digest:null}}function hu(e,t,o){return{value:e,source:null,stack:o??null,digest:t??null}}function pu(e,t){try{console.error(t.value)}catch(o){setTimeout(function(){throw o})}}var rv=typeof WeakMap=="function"?WeakMap:Map;function Hf(e,t,o){o=In(-1,o),o.tag=3,o.payload={element:null};var a=t.value;return o.callback=function(){vi||(vi=!0,ju=a),pu(e,t)},o}function Vf(e,t,o){o=In(-1,o),o.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var l=t.value;o.payload=function(){return a(l)},o.callback=function(){pu(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(o.callback=function(){pu(e,t),typeof a!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),o}function Qf(e,t,o){var a=e.pingCache;if(a===null){a=e.pingCache=new rv;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(o)||(l.add(o),e=yv.bind(null,e,t,o),t.then(e,e))}function Kf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qf(e,t,o,a,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(t=In(-1,1),t.tag=2,lr(o,t,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var ov=F.ReactCurrentOwner,Nt=!1;function vt(e,t,o,a){t.child=e===null?pf(t,null,o,a):Oo(t,e.child,o,a)}function Gf(e,t,o,a,l){o=o.render;var c=t.ref;return _o(t,l),a=su(e,t,o,a,c,l),o=au(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,On(e,t,l)):($e&&o&&$l(t),t.flags|=1,vt(e,t,a,l),t.child)}function Yf(e,t,o,a,l){if(e===null){var c=o.type;return typeof c=="function"&&!_u(c)&&c.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(t.tag=15,t.type=c,Xf(e,t,c,a,l)):(e=Ci(o.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&l)===0){var m=c.memoizedProps;if(o=o.compare,o=o!==null?o:Ls,o(m,a)&&e.ref===t.ref)return On(e,t,l)}return t.flags|=1,e=pr(c,a),e.ref=t.ref,e.return=t,t.child=e}function Xf(e,t,o,a,l){if(e!==null){var c=e.memoizedProps;if(Ls(c,a)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=a=c,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,On(e,t,l)}return mu(e,t,o,a,l)}function Jf(e,t,o){var a=t.pendingProps,l=a.children,c=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(Uo,_t),_t|=o;else{if((o&1073741824)===0)return e=c!==null?c.baseLanes|o:o,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ae(Uo,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=c!==null?c.baseLanes:o,Ae(Uo,_t),_t|=a}else c!==null?(a=c.baseLanes|o,t.memoizedState=null):a=o,Ae(Uo,_t),_t|=a;return vt(e,t,l,o),t.child}function Zf(e,t){var o=t.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(t.flags|=512,t.flags|=2097152)}function mu(e,t,o,a,l){var c=Et(o)?Dr:dt.current;return c=Mo(t,c),_o(t,l),o=su(e,t,o,a,c,l),a=au(),e!==null&&!Nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,On(e,t,l)):($e&&a&&$l(t),t.flags|=1,vt(e,t,o,l),t.child)}function eh(e,t,o,a,l){if(Et(o)){var c=!0;Ga(t)}else c=!1;if(_o(t,l),t.stateNode===null)hi(e,t),$f(t,o,a),fu(t,o,a,l),a=!0;else if(e===null){var m=t.stateNode,k=t.memoizedProps;m.props=k;var P=m.context,D=o.contextType;typeof D=="object"&&D!==null?D=Bt(D):(D=Et(o)?Dr:dt.current,D=Mo(t,D));var H=o.getDerivedStateFromProps,Q=typeof H=="function"||typeof m.getSnapshotBeforeUpdate=="function";Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==a||P!==D)&&Wf(t,m,a,D),ir=!1;var W=t.memoizedState;m.state=W,oi(t,a,m,l),P=t.memoizedState,k!==a||W!==P||Ct.current||ir?(typeof H=="function"&&(du(t,o,H,a),P=t.memoizedState),(k=ir||Bf(t,o,k,a,W,P,D))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=P),m.props=a,m.state=P,m.context=D,a=k):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,gf(e,t),k=t.memoizedProps,D=t.type===t.elementType?k:Zt(t.type,k),m.props=D,Q=t.pendingProps,W=m.context,P=o.contextType,typeof P=="object"&&P!==null?P=Bt(P):(P=Et(o)?Dr:dt.current,P=Mo(t,P));var se=o.getDerivedStateFromProps;(H=typeof se=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==Q||W!==P)&&Wf(t,m,a,P),ir=!1,W=t.memoizedState,m.state=W,oi(t,a,m,l);var ue=t.memoizedState;k!==Q||W!==ue||Ct.current||ir?(typeof se=="function"&&(du(t,o,se,a),ue=t.memoizedState),(D=ir||Bf(t,o,D,a,W,ue,P)||!1)?(H||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,ue,P),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,ue,P)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=ue),m.props=a,m.state=ue,m.context=P,a=D):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),a=!1)}return gu(e,t,o,a,c,l)}function gu(e,t,o,a,l,c){Zf(e,t);var m=(t.flags&128)!==0;if(!a&&!m)return l&&of(t,o,!1),On(e,t,c);a=t.stateNode,ov.current=t;var k=m&&typeof o.getDerivedStateFromError!="function"?null:a.render();return t.flags|=1,e!==null&&m?(t.child=Oo(t,e.child,null,c),t.child=Oo(t,null,k,c)):vt(e,t,k,c),t.memoizedState=a.state,l&&of(t,o,!0),t.child}function th(e){var t=e.stateNode;t.pendingContext?nf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nf(e,t.context,!1),Zl(e,t.containerInfo)}function nh(e,t,o,a,l){return Io(),Ql(l),t.flags|=256,vt(e,t,o,a),t.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function vu(e){return{baseLanes:e,cachePool:null,transitions:null}}function rh(e,t,o){var a=t.pendingProps,l=He.current,c=!1,m=(t.flags&128)!==0,k;if((k=m)||(k=e!==null&&e.memoizedState===null?!1:(l&2)!==0),k?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Ae(He,l&1),e===null)return Vl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=a.children,e=a.fallback,c?(a=t.mode,c=t.child,m={mode:"hidden",children:m},(a&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=m):c=Ei(m,a,0,null),e=Kr(e,a,o,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=vu(o),t.memoizedState=yu,e):xu(t,m));if(l=e.memoizedState,l!==null&&(k=l.dehydrated,k!==null))return sv(e,t,m,a,k,l,o);if(c){c=a.fallback,m=t.mode,l=e.child,k=l.sibling;var P={mode:"hidden",children:a.children};return(m&1)===0&&t.child!==l?(a=t.child,a.childLanes=0,a.pendingProps=P,t.deletions=null):(a=pr(l,P),a.subtreeFlags=l.subtreeFlags&14680064),k!==null?c=pr(k,c):(c=Kr(c,m,o,null),c.flags|=2),c.return=t,a.return=t,a.sibling=c,t.child=a,a=c,c=t.child,m=e.child.memoizedState,m=m===null?vu(o):{baseLanes:m.baseLanes|o,cachePool:null,transitions:m.transitions},c.memoizedState=m,c.childLanes=e.childLanes&~o,t.memoizedState=yu,a}return c=e.child,e=c.sibling,a=pr(c,{mode:"visible",children:a.children}),(t.mode&1)===0&&(a.lanes=o),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a}function xu(e,t){return t=Ei({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fi(e,t,o,a){return a!==null&&Ql(a),Oo(t,e.child,null,o),e=xu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sv(e,t,o,a,l,c,m){if(o)return t.flags&256?(t.flags&=-257,a=hu(Error(s(422))),fi(e,t,m,a)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=a.fallback,l=t.mode,a=Ei({mode:"visible",children:a.children},l,0,null),c=Kr(c,l,m,null),c.flags|=2,a.return=t,c.return=t,a.sibling=c,t.child=a,(t.mode&1)!==0&&Oo(t,e.child,null,m),t.child.memoizedState=vu(m),t.memoizedState=yu,c);if((t.mode&1)===0)return fi(e,t,m,null);if(l.data==="$!"){if(a=l.nextSibling&&l.nextSibling.dataset,a)var k=a.dgst;return a=k,c=Error(s(419)),a=hu(c,a,void 0),fi(e,t,m,a)}if(k=(m&e.childLanes)!==0,Nt||k){if(a=ot,a!==null){switch(m&-m){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(a.suspendedLanes|m))!==0?0:l,l!==0&&l!==c.retryLane&&(c.retryLane=l,Ln(e,l),nn(a,e,l,-1))}return zu(),a=hu(Error(s(421))),fi(e,t,m,a)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=vv.bind(null,e),l._reactRetry=t,null):(e=c.treeContext,zt=rr(l.nextSibling),Ot=t,$e=!0,Jt=null,e!==null&&(Ft[Ut++]=Mn,Ft[Ut++]=Tn,Ft[Ut++]=Ar,Mn=e.id,Tn=e.overflow,Ar=t),t=xu(t,a.children),t.flags|=4096,t)}function oh(e,t,o){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Yl(e.return,t,o)}function wu(e,t,o,a,l){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:l}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=o,c.tailMode=l)}function sh(e,t,o){var a=t.pendingProps,l=a.revealOrder,c=a.tail;if(vt(e,t,a.children,o),a=He.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oh(e,o,t);else if(e.tag===19)oh(e,o,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Ae(He,a),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(o=t.child,l=null;o!==null;)e=o.alternate,e!==null&&si(e)===null&&(l=o),o=o.sibling;o=l,o===null?(l=t.child,t.child=null):(l=o.sibling,o.sibling=null),wu(t,!1,l,o,c);break;case"backwards":for(o=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&si(e)===null){t.child=l;break}e=l.sibling,l.sibling=o,o=l,l=e}wu(t,!0,o,null,c);break;case"together":wu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function On(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),Wr|=t.lanes,(o&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,o=pr(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=pr(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function av(e,t,o){switch(t.tag){case 3:th(t),Io();break;case 5:xf(t);break;case 1:Et(t.type)&&Ga(t);break;case 4:Zl(t,t.stateNode.containerInfo);break;case 10:var a=t.type._context,l=t.memoizedProps.value;Ae(ti,a._currentValue),a._currentValue=l;break;case 13:if(a=t.memoizedState,a!==null)return a.dehydrated!==null?(Ae(He,He.current&1),t.flags|=128,null):(o&t.child.childLanes)!==0?rh(e,t,o):(Ae(He,He.current&1),e=On(e,t,o),e!==null?e.sibling:null);Ae(He,He.current&1);break;case 19:if(a=(o&t.childLanes)!==0,(e.flags&128)!==0){if(a)return sh(e,t,o);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ae(He,He.current),a)break;return null;case 22:case 23:return t.lanes=0,Jf(e,t,o)}return On(e,t,o)}var ah,bu,ih,lh;ah=function(e,t){for(var o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},bu=function(){},ih=function(e,t,o,a){var l=e.memoizedProps;if(l!==a){e=t.stateNode,Br(xn.current);var c=null;switch(o){case"input":l=hs(e,l),a=hs(e,a),c=[];break;case"select":l=J({},l,{value:void 0}),a=J({},a,{value:void 0}),c=[];break;case"textarea":l=go(e,l),a=go(e,a),c=[];break;default:typeof l.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=Qa)}pn(o,a);var m;o=null;for(D in l)if(!a.hasOwnProperty(D)&&l.hasOwnProperty(D)&&l[D]!=null)if(D==="style"){var k=l[D];for(m in k)k.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else D!=="dangerouslySetInnerHTML"&&D!=="children"&&D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&D!=="autoFocus"&&(u.hasOwnProperty(D)?c||(c=[]):(c=c||[]).push(D,null));for(D in a){var P=a[D];if(k=l!=null?l[D]:void 0,a.hasOwnProperty(D)&&P!==k&&(P!=null||k!=null))if(D==="style")if(k){for(m in k)!k.hasOwnProperty(m)||P&&P.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in P)P.hasOwnProperty(m)&&k[m]!==P[m]&&(o||(o={}),o[m]=P[m])}else o||(c||(c=[]),c.push(D,o)),o=P;else D==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,k=k?k.__html:void 0,P!=null&&k!==P&&(c=c||[]).push(D,P)):D==="children"?typeof P!="string"&&typeof P!="number"||(c=c||[]).push(D,""+P):D!=="suppressContentEditableWarning"&&D!=="suppressHydrationWarning"&&(u.hasOwnProperty(D)?(P!=null&&D==="onScroll"&&Fe("scroll",e),c||k===P||(c=[])):(c=c||[]).push(D,P))}o&&(c=c||[]).push("style",o);var D=c;(t.updateQueue=D)&&(t.flags|=4)}},lh=function(e,t,o,a){o!==a&&(t.flags|=4)};function Ks(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,a=0;if(t)for(var l=e.child;l!==null;)o|=l.lanes|l.childLanes,a|=l.subtreeFlags&14680064,a|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)o|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=o,t}function iv(e,t,o){var a=t.pendingProps;switch(Wl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return Et(t.type)&&qa(),ht(t),null;case 3:return a=t.stateNode,Do(),Ue(Ct),Ue(dt),nu(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Za(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jt!==null&&(Lu(Jt),Jt=null))),bu(e,t),ht(t),null;case 5:eu(t);var l=Br($s.current);if(o=t.type,e!==null&&t.stateNode!=null)ih(e,t,o,a,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!a){if(t.stateNode===null)throw Error(s(166));return ht(t),null}if(e=Br(xn.current),Za(t)){a=t.stateNode,o=t.type;var c=t.memoizedProps;switch(a[vn]=t,a[Ds]=c,e=(t.mode&1)!==0,o){case"dialog":Fe("cancel",a),Fe("close",a);break;case"iframe":case"object":case"embed":Fe("load",a);break;case"video":case"audio":for(l=0;l<Os.length;l++)Fe(Os[l],a);break;case"source":Fe("error",a);break;case"img":case"image":case"link":Fe("error",a),Fe("load",a);break;case"details":Fe("toggle",a);break;case"input":va(a,c),Fe("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!c.multiple},Fe("invalid",a);break;case"textarea":dn(a,c),Fe("invalid",a)}pn(o,c),l=null;for(var m in c)if(c.hasOwnProperty(m)){var k=c[m];m==="children"?typeof k=="string"?a.textContent!==k&&(c.suppressHydrationWarning!==!0&&Va(a.textContent,k,e),l=["children",k]):typeof k=="number"&&a.textContent!==""+k&&(c.suppressHydrationWarning!==!0&&Va(a.textContent,k,e),l=["children",""+k]):u.hasOwnProperty(m)&&k!=null&&m==="onScroll"&&Fe("scroll",a)}switch(o){case"input":cn(a),mo(a,c,!0);break;case"textarea":cn(a),wa(a);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(a.onclick=Qa)}a=l,t.updateQueue=a,a!==null&&(t.flags|=4)}else{m=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gt(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=m.createElement(o,{is:a.is}):(e=m.createElement(o),o==="select"&&(m=e,a.multiple?m.multiple=!0:a.size&&(m.size=a.size))):e=m.createElementNS(e,o),e[vn]=t,e[Ds]=a,ah(e,t,!1,!1),t.stateNode=e;e:{switch(m=ys(o,a),o){case"dialog":Fe("cancel",e),Fe("close",e),l=a;break;case"iframe":case"object":case"embed":Fe("load",e),l=a;break;case"video":case"audio":for(l=0;l<Os.length;l++)Fe(Os[l],e);l=a;break;case"source":Fe("error",e),l=a;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),l=a;break;case"details":Fe("toggle",e),l=a;break;case"input":va(e,a),l=hs(e,a),Fe("invalid",e);break;case"option":l=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},l=J({},a,{value:void 0}),Fe("invalid",e);break;case"textarea":dn(e,a),l=go(e,a),Fe("invalid",e);break;default:l=a}pn(o,l),k=l;for(c in k)if(k.hasOwnProperty(c)){var P=k[c];c==="style"?Pn(e,P):c==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&ba(e,P)):c==="children"?typeof P=="string"?(o!=="textarea"||P!=="")&&hn(e,P):typeof P=="number"&&hn(e,""+P):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(u.hasOwnProperty(c)?P!=null&&c==="onScroll"&&Fe("scroll",e):P!=null&&I(e,c,P,m))}switch(o){case"input":cn(e),mo(e,a,!1);break;case"textarea":cn(e),wa(e);break;case"option":a.value!=null&&e.setAttribute("value",""+Pe(a.value));break;case"select":e.multiple=!!a.multiple,c=a.value,c!=null?At(e,!!a.multiple,c,!1):a.defaultValue!=null&&At(e,!!a.multiple,a.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Qa)}switch(o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ht(t),null;case 6:if(e&&t.stateNode!=null)lh(e,t,e.memoizedProps,a);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(o=Br($s.current),Br(xn.current),Za(t)){if(a=t.stateNode,o=t.memoizedProps,a[vn]=t,(c=a.nodeValue!==o)&&(e=Ot,e!==null))switch(e.tag){case 3:Va(a.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Va(a.nodeValue,o,(e.mode&1)!==0)}c&&(t.flags|=4)}else a=(o.nodeType===9?o:o.ownerDocument).createTextNode(a),a[vn]=t,t.stateNode=a}return ht(t),null;case 13:if(Ue(He),a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&zt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)df(),Io(),t.flags|=98560,c=!1;else if(c=Za(t),a!==null&&a.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[vn]=t}else Io(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),c=!1}else Jt!==null&&(Lu(Jt),Jt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=o,t):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(He.current&1)!==0?Ze===0&&(Ze=3):zu())),t.updateQueue!==null&&(t.flags|=4),ht(t),null);case 4:return Do(),bu(e,t),e===null&&zs(t.stateNode.containerInfo),ht(t),null;case 10:return Gl(t.type._context),ht(t),null;case 17:return Et(t.type)&&qa(),ht(t),null;case 19:if(Ue(He),c=t.memoizedState,c===null)return ht(t),null;if(a=(t.flags&128)!==0,m=c.rendering,m===null)if(a)Ks(c,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=si(e),m!==null){for(t.flags|=128,Ks(c,!1),a=m.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),t.subtreeFlags=0,a=o,o=t.child;o!==null;)c=o,e=a,c.flags&=14680066,m=c.alternate,m===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=m.childLanes,c.lanes=m.lanes,c.child=m.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=m.memoizedProps,c.memoizedState=m.memoizedState,c.updateQueue=m.updateQueue,c.type=m.type,e=m.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ae(He,He.current&1|2),t.child}e=e.sibling}c.tail!==null&&qe()>Bo&&(t.flags|=128,a=!0,Ks(c,!1),t.lanes=4194304)}else{if(!a)if(e=si(m),e!==null){if(t.flags|=128,a=!0,o=e.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),Ks(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!$e)return ht(t),null}else 2*qe()-c.renderingStartTime>Bo&&o!==1073741824&&(t.flags|=128,a=!0,Ks(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(o=c.last,o!==null?o.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=qe(),t.sibling=null,o=He.current,Ae(He,a?o&1|2:o&1),t):(ht(t),null);case 22:case 23:return Ou(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&(t.mode&1)!==0?(_t&1073741824)!==0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function lv(e,t){switch(Wl(t),t.tag){case 1:return Et(t.type)&&qa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Do(),Ue(Ct),Ue(dt),nu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return eu(t),null;case 13:if(Ue(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(He),null;case 4:return Do(),null;case 10:return Gl(t.type._context),null;case 22:case 23:return Ou(),null;case 24:return null;default:return null}}var pi=!1,pt=!1,uv=typeof WeakSet=="function"?WeakSet:Set,le=null;function Fo(e,t){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(a){Qe(e,t,a)}else o.current=null}function Su(e,t,o){try{o()}catch(a){Qe(e,t,a)}}var uh=!1;function cv(e,t){if(Ol=Oa,e=Ud(),Nl(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var l=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{o.nodeType,c.nodeType}catch{o=null;break e}var m=0,k=-1,P=-1,D=0,H=0,Q=e,W=null;t:for(;;){for(var se;Q!==o||l!==0&&Q.nodeType!==3||(k=m+l),Q!==c||a!==0&&Q.nodeType!==3||(P=m+a),Q.nodeType===3&&(m+=Q.nodeValue.length),(se=Q.firstChild)!==null;)W=Q,Q=se;for(;;){if(Q===e)break t;if(W===o&&++D===l&&(k=m),W===c&&++H===a&&(P=m),(se=Q.nextSibling)!==null)break;Q=W,W=Q.parentNode}Q=se}o=k===-1||P===-1?null:{start:k,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(zl={focusedElem:e,selectionRange:o},Oa=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var ue=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ue!==null){var ce=ue.memoizedProps,Ge=ue.memoizedState,L=t.stateNode,R=L.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Zt(t.type,ce),Ge);L.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Y){Qe(t,t.return,Y)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return ue=uh,uh=!1,ue}function qs(e,t,o){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var l=a=a.next;do{if((l.tag&e)===e){var c=l.destroy;l.destroy=void 0,c!==void 0&&Su(t,o,c)}l=l.next}while(l!==a)}}function mi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var o=t=t.next;do{if((o.tag&e)===e){var a=o.create;o.destroy=a()}o=o.next}while(o!==t)}}function ku(e){var t=e.ref;if(t!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof t=="function"?t(e):t.current=e}}function ch(e){var t=e.alternate;t!==null&&(e.alternate=null,ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vn],delete t[Ds],delete t[Fl],delete t[Qy],delete t[Ky])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dh(e){return e.tag===5||e.tag===3||e.tag===4}function fh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cu(e,t,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?o.nodeType===8?o.parentNode.insertBefore(e,t):o.insertBefore(e,t):(o.nodeType===8?(t=o.parentNode,t.insertBefore(e,o)):(t=o,t.appendChild(e)),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=Qa));else if(a!==4&&(e=e.child,e!==null))for(Cu(e,t,o),e=e.sibling;e!==null;)Cu(e,t,o),e=e.sibling}function Eu(e,t,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Eu(e,t,o),e=e.sibling;e!==null;)Eu(e,t,o),e=e.sibling}var lt=null,en=!1;function ur(e,t,o){for(o=o.child;o!==null;)hh(e,t,o),o=o.sibling}function hh(e,t,o){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Ra,o)}catch{}switch(o.tag){case 5:pt||Fo(o,t);case 6:var a=lt,l=en;lt=null,ur(e,t,o),lt=a,en=l,lt!==null&&(en?(e=lt,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):lt.removeChild(o.stateNode));break;case 18:lt!==null&&(en?(e=lt,o=o.stateNode,e.nodeType===8?Al(e.parentNode,o):e.nodeType===1&&Al(e,o),Ns(e)):Al(lt,o.stateNode));break;case 4:a=lt,l=en,lt=o.stateNode.containerInfo,en=!0,ur(e,t,o),lt=a,en=l;break;case 0:case 11:case 14:case 15:if(!pt&&(a=o.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){l=a=a.next;do{var c=l,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&Su(o,t,m),l=l.next}while(l!==a)}ur(e,t,o);break;case 1:if(!pt&&(Fo(o,t),a=o.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(k){Qe(o,t,k)}ur(e,t,o);break;case 21:ur(e,t,o);break;case 22:o.mode&1?(pt=(a=pt)||o.memoizedState!==null,ur(e,t,o),pt=a):ur(e,t,o);break;default:ur(e,t,o)}}function ph(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new uv),t.forEach(function(a){var l=xv.bind(null,e,a);o.has(a)||(o.add(a),a.then(l,l))})}}function tn(e,t){var o=t.deletions;if(o!==null)for(var a=0;a<o.length;a++){var l=o[a];try{var c=e,m=t,k=m;e:for(;k!==null;){switch(k.tag){case 5:lt=k.stateNode,en=!1;break e;case 3:lt=k.stateNode.containerInfo,en=!0;break e;case 4:lt=k.stateNode.containerInfo,en=!0;break e}k=k.return}if(lt===null)throw Error(s(160));hh(c,m,l),lt=null,en=!1;var P=l.alternate;P!==null&&(P.return=null),l.return=null}catch(D){Qe(l,t,D)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)mh(t,e),t=t.sibling}function mh(e,t){var o=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(t,e),bn(e),a&4){try{qs(3,e,e.return),mi(3,e)}catch(ce){Qe(e,e.return,ce)}try{qs(5,e,e.return)}catch(ce){Qe(e,e.return,ce)}}break;case 1:tn(t,e),bn(e),a&512&&o!==null&&Fo(o,o.return);break;case 5:if(tn(t,e),bn(e),a&512&&o!==null&&Fo(o,o.return),e.flags&32){var l=e.stateNode;try{hn(l,"")}catch(ce){Qe(e,e.return,ce)}}if(a&4&&(l=e.stateNode,l!=null)){var c=e.memoizedProps,m=o!==null?o.memoizedProps:c,k=e.type,P=e.updateQueue;if(e.updateQueue=null,P!==null)try{k==="input"&&c.type==="radio"&&c.name!=null&&ps(l,c),ys(k,m);var D=ys(k,c);for(m=0;m<P.length;m+=2){var H=P[m],Q=P[m+1];H==="style"?Pn(l,Q):H==="dangerouslySetInnerHTML"?ba(l,Q):H==="children"?hn(l,Q):I(l,H,Q,D)}switch(k){case"input":ms(l,c);break;case"textarea":xa(l,c);break;case"select":var W=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!c.multiple;var se=c.value;se!=null?At(l,!!c.multiple,se,!1):W!==!!c.multiple&&(c.defaultValue!=null?At(l,!!c.multiple,c.defaultValue,!0):At(l,!!c.multiple,c.multiple?[]:"",!1))}l[Ds]=c}catch(ce){Qe(e,e.return,ce)}}break;case 6:if(tn(t,e),bn(e),a&4){if(e.stateNode===null)throw Error(s(162));l=e.stateNode,c=e.memoizedProps;try{l.nodeValue=c}catch(ce){Qe(e,e.return,ce)}}break;case 3:if(tn(t,e),bn(e),a&4&&o!==null&&o.memoizedState.isDehydrated)try{Ns(t.containerInfo)}catch(ce){Qe(e,e.return,ce)}break;case 4:tn(t,e),bn(e);break;case 13:tn(t,e),bn(e),l=e.child,l.flags&8192&&(c=l.memoizedState!==null,l.stateNode.isHidden=c,!c||l.alternate!==null&&l.alternate.memoizedState!==null||(Ru=qe())),a&4&&ph(e);break;case 22:if(H=o!==null&&o.memoizedState!==null,e.mode&1?(pt=(D=pt)||H,tn(t,e),pt=D):tn(t,e),bn(e),a&8192){if(D=e.memoizedState!==null,(e.stateNode.isHidden=D)&&!H&&(e.mode&1)!==0)for(le=e,H=e.child;H!==null;){for(Q=le=H;le!==null;){switch(W=le,se=W.child,W.tag){case 0:case 11:case 14:case 15:qs(4,W,W.return);break;case 1:Fo(W,W.return);var ue=W.stateNode;if(typeof ue.componentWillUnmount=="function"){a=W,o=W.return;try{t=a,ue.props=t.memoizedProps,ue.state=t.memoizedState,ue.componentWillUnmount()}catch(ce){Qe(a,o,ce)}}break;case 5:Fo(W,W.return);break;case 22:if(W.memoizedState!==null){vh(Q);continue}}se!==null?(se.return=W,le=se):vh(Q)}H=H.sibling}e:for(H=null,Q=e;;){if(Q.tag===5){if(H===null){H=Q;try{l=Q.stateNode,D?(c=l.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(k=Q.stateNode,P=Q.memoizedProps.style,m=P!=null&&P.hasOwnProperty("display")?P.display:null,k.style.display=vo("display",m))}catch(ce){Qe(e,e.return,ce)}}}else if(Q.tag===6){if(H===null)try{Q.stateNode.nodeValue=D?"":Q.memoizedProps}catch(ce){Qe(e,e.return,ce)}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===e)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===e)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===e)break e;H===Q&&(H=null),Q=Q.return}H===Q&&(H=null),Q.sibling.return=Q.return,Q=Q.sibling}}break;case 19:tn(t,e),bn(e),a&4&&ph(e);break;case 21:break;default:tn(t,e),bn(e)}}function bn(e){var t=e.flags;if(t&2){try{e:{for(var o=e.return;o!==null;){if(dh(o)){var a=o;break e}o=o.return}throw Error(s(160))}switch(a.tag){case 5:var l=a.stateNode;a.flags&32&&(hn(l,""),a.flags&=-33);var c=fh(e);Eu(e,c,l);break;case 3:case 4:var m=a.stateNode.containerInfo,k=fh(e);Cu(e,k,m);break;default:throw Error(s(161))}}catch(P){Qe(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dv(e,t,o){le=e,gh(e)}function gh(e,t,o){for(var a=(e.mode&1)!==0;le!==null;){var l=le,c=l.child;if(l.tag===22&&a){var m=l.memoizedState!==null||pi;if(!m){var k=l.alternate,P=k!==null&&k.memoizedState!==null||pt;k=pi;var D=pt;if(pi=m,(pt=P)&&!D)for(le=l;le!==null;)m=le,P=m.child,m.tag===22&&m.memoizedState!==null?xh(l):P!==null?(P.return=m,le=P):xh(l);for(;c!==null;)le=c,gh(c),c=c.sibling;le=l,pi=k,pt=D}yh(e)}else(l.subtreeFlags&8772)!==0&&c!==null?(c.return=l,le=c):yh(e)}}function yh(e){for(;le!==null;){var t=le;if((t.flags&8772)!==0){var o=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:pt||mi(5,t);break;case 1:var a=t.stateNode;if(t.flags&4&&!pt)if(o===null)a.componentDidMount();else{var l=t.elementType===t.type?o.memoizedProps:Zt(t.type,o.memoizedProps);a.componentDidUpdate(l,o.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&vf(t,c,a);break;case 3:var m=t.updateQueue;if(m!==null){if(o=null,t.child!==null)switch(t.child.tag){case 5:o=t.child.stateNode;break;case 1:o=t.child.stateNode}vf(t,m,o)}break;case 5:var k=t.stateNode;if(o===null&&t.flags&4){o=k;var P=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&o.focus();break;case"img":P.src&&(o.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var D=t.alternate;if(D!==null){var H=D.memoizedState;if(H!==null){var Q=H.dehydrated;Q!==null&&Ns(Q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}pt||t.flags&512&&ku(t)}catch(W){Qe(t,t.return,W)}}if(t===e){le=null;break}if(o=t.sibling,o!==null){o.return=t.return,le=o;break}le=t.return}}function vh(e){for(;le!==null;){var t=le;if(t===e){le=null;break}var o=t.sibling;if(o!==null){o.return=t.return,le=o;break}le=t.return}}function xh(e){for(;le!==null;){var t=le;try{switch(t.tag){case 0:case 11:case 15:var o=t.return;try{mi(4,t)}catch(P){Qe(t,o,P)}break;case 1:var a=t.stateNode;if(typeof a.componentDidMount=="function"){var l=t.return;try{a.componentDidMount()}catch(P){Qe(t,l,P)}}var c=t.return;try{ku(t)}catch(P){Qe(t,c,P)}break;case 5:var m=t.return;try{ku(t)}catch(P){Qe(t,m,P)}}}catch(P){Qe(t,t.return,P)}if(t===e){le=null;break}var k=t.sibling;if(k!==null){k.return=t.return,le=k;break}le=t.return}}var fv=Math.ceil,gi=F.ReactCurrentDispatcher,Nu=F.ReactCurrentOwner,Wt=F.ReactCurrentBatchConfig,Re=0,ot=null,Ye=null,ut=0,_t=0,Uo=or(0),Ze=0,Gs=null,Wr=0,yi=0,Pu=0,Ys=null,Pt=null,Ru=0,Bo=1/0,zn=null,vi=!1,ju=null,cr=null,xi=!1,dr=null,wi=0,Xs=0,Mu=null,bi=-1,Si=0;function xt(){return(Re&6)!==0?qe():bi!==-1?bi:bi=qe()}function fr(e){return(e.mode&1)===0?1:(Re&2)!==0&&ut!==0?ut&-ut:Gy.transition!==null?(Si===0&&(Si=dd()),Si):(e=ze,e!==0||(e=window.event,e=e===void 0?16:wd(e.type)),e)}function nn(e,t,o,a){if(50<Xs)throw Xs=0,Mu=null,Error(s(185));bs(e,o,a),((Re&2)===0||e!==ot)&&(e===ot&&((Re&2)===0&&(yi|=o),Ze===4&&hr(e,ut)),Rt(e,a),o===1&&Re===0&&(t.mode&1)===0&&(Bo=qe()+500,Ya&&ar()))}function Rt(e,t){var o=e.callbackNode;Gg(e,t);var a=Ta(e,e===ot?ut:0);if(a===0)o!==null&&ld(o),e.callbackNode=null,e.callbackPriority=0;else if(t=a&-a,e.callbackPriority!==t){if(o!=null&&ld(o),t===1)e.tag===0?qy(bh.bind(null,e)):sf(bh.bind(null,e)),Hy(function(){(Re&6)===0&&ar()}),o=null;else{switch(fd(a)){case 1:o=ul;break;case 4:o=ud;break;case 16:o=Pa;break;case 536870912:o=cd;break;default:o=Pa}o=jh(o,wh.bind(null,e))}e.callbackPriority=t,e.callbackNode=o}}function wh(e,t){if(bi=-1,Si=0,(Re&6)!==0)throw Error(s(327));var o=e.callbackNode;if($o()&&e.callbackNode!==o)return null;var a=Ta(e,e===ot?ut:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||t)t=ki(e,a);else{t=a;var l=Re;Re|=2;var c=kh();(ot!==e||ut!==t)&&(zn=null,Bo=qe()+500,Vr(e,t));do try{mv();break}catch(k){Sh(e,k)}while(!0);ql(),gi.current=c,Re=l,Ye!==null?t=0:(ot=null,ut=0,t=Ze)}if(t!==0){if(t===2&&(l=cl(e),l!==0&&(a=l,t=Tu(e,l))),t===1)throw o=Gs,Vr(e,0),hr(e,a),Rt(e,qe()),o;if(t===6)hr(e,a);else{if(l=e.current.alternate,(a&30)===0&&!hv(l)&&(t=ki(e,a),t===2&&(c=cl(e),c!==0&&(a=c,t=Tu(e,c))),t===1))throw o=Gs,Vr(e,0),hr(e,a),Rt(e,qe()),o;switch(e.finishedWork=l,e.finishedLanes=a,t){case 0:case 1:throw Error(s(345));case 2:Qr(e,Pt,zn);break;case 3:if(hr(e,a),(a&130023424)===a&&(t=Ru+500-qe(),10<t)){if(Ta(e,0)!==0)break;if(l=e.suspendedLanes,(l&a)!==a){xt(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Dl(Qr.bind(null,e,Pt,zn),t);break}Qr(e,Pt,zn);break;case 4:if(hr(e,a),(a&4194240)===a)break;for(t=e.eventTimes,l=-1;0<a;){var m=31-Yt(a);c=1<<m,m=t[m],m>l&&(l=m),a&=~c}if(a=l,a=qe()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*fv(a/1960))-a,10<a){e.timeoutHandle=Dl(Qr.bind(null,e,Pt,zn),a);break}Qr(e,Pt,zn);break;case 5:Qr(e,Pt,zn);break;default:throw Error(s(329))}}}return Rt(e,qe()),e.callbackNode===o?wh.bind(null,e):null}function Tu(e,t){var o=Ys;return e.current.memoizedState.isDehydrated&&(Vr(e,t).flags|=256),e=ki(e,t),e!==2&&(t=Pt,Pt=o,t!==null&&Lu(t)),e}function Lu(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function hv(e){for(var t=e;;){if(t.flags&16384){var o=t.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var a=0;a<o.length;a++){var l=o[a],c=l.getSnapshot;l=l.value;try{if(!Xt(c(),l))return!1}catch{return!1}}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hr(e,t){for(t&=~Pu,t&=~yi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var o=31-Yt(t),a=1<<o;e[o]=-1,t&=~a}}function bh(e){if((Re&6)!==0)throw Error(s(327));$o();var t=Ta(e,0);if((t&1)===0)return Rt(e,qe()),null;var o=ki(e,t);if(e.tag!==0&&o===2){var a=cl(e);a!==0&&(t=a,o=Tu(e,a))}if(o===1)throw o=Gs,Vr(e,0),hr(e,t),Rt(e,qe()),o;if(o===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qr(e,Pt,zn),Rt(e,qe()),null}function Iu(e,t){var o=Re;Re|=1;try{return e(t)}finally{Re=o,Re===0&&(Bo=qe()+500,Ya&&ar())}}function Hr(e){dr!==null&&dr.tag===0&&(Re&6)===0&&$o();var t=Re;Re|=1;var o=Wt.transition,a=ze;try{if(Wt.transition=null,ze=1,e)return e()}finally{ze=a,Wt.transition=o,Re=t,(Re&6)===0&&ar()}}function Ou(){_t=Uo.current,Ue(Uo)}function Vr(e,t){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,Wy(o)),Ye!==null)for(o=Ye.return;o!==null;){var a=o;switch(Wl(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&qa();break;case 3:Do(),Ue(Ct),Ue(dt),nu();break;case 5:eu(a);break;case 4:Do();break;case 13:Ue(He);break;case 19:Ue(He);break;case 10:Gl(a.type._context);break;case 22:case 23:Ou()}o=o.return}if(ot=e,Ye=e=pr(e.current,null),ut=_t=t,Ze=0,Gs=null,Pu=yi=Wr=0,Pt=Ys=null,Ur!==null){for(t=0;t<Ur.length;t++)if(o=Ur[t],a=o.interleaved,a!==null){o.interleaved=null;var l=a.next,c=o.pending;if(c!==null){var m=c.next;c.next=l,a.next=m}o.pending=a}Ur=null}return e}function Sh(e,t){do{var o=Ye;try{if(ql(),ai.current=ci,ii){for(var a=Ve.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}ii=!1}if($r=0,rt=Je=Ve=null,Ws=!1,Hs=0,Nu.current=null,o===null||o.return===null){Ze=1,Gs=t,Ye=null;break}e:{var c=e,m=o.return,k=o,P=t;if(t=ut,k.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var D=P,H=k,Q=H.tag;if((H.mode&1)===0&&(Q===0||Q===11||Q===15)){var W=H.alternate;W?(H.updateQueue=W.updateQueue,H.memoizedState=W.memoizedState,H.lanes=W.lanes):(H.updateQueue=null,H.memoizedState=null)}var se=Kf(m);if(se!==null){se.flags&=-257,qf(se,m,k,c,t),se.mode&1&&Qf(c,D,t),t=se,P=D;var ue=t.updateQueue;if(ue===null){var ce=new Set;ce.add(P),t.updateQueue=ce}else ue.add(P);break e}else{if((t&1)===0){Qf(c,D,t),zu();break e}P=Error(s(426))}}else if($e&&k.mode&1){var Ge=Kf(m);if(Ge!==null){(Ge.flags&65536)===0&&(Ge.flags|=256),qf(Ge,m,k,c,t),Ql(Ao(P,k));break e}}c=P=Ao(P,k),Ze!==4&&(Ze=2),Ys===null?Ys=[c]:Ys.push(c),c=m;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var L=Hf(c,P,t);yf(c,L);break e;case 1:k=P;var R=c.type,O=c.stateNode;if((c.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(cr===null||!cr.has(O)))){c.flags|=65536,t&=-t,c.lanes|=t;var Y=Vf(c,k,t);yf(c,Y);break e}}c=c.return}while(c!==null)}Eh(o)}catch(fe){t=fe,Ye===o&&o!==null&&(Ye=o=o.return);continue}break}while(!0)}function kh(){var e=gi.current;return gi.current=ci,e===null?ci:e}function zu(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),ot===null||(Wr&268435455)===0&&(yi&268435455)===0||hr(ot,ut)}function ki(e,t){var o=Re;Re|=2;var a=kh();(ot!==e||ut!==t)&&(zn=null,Vr(e,t));do try{pv();break}catch(l){Sh(e,l)}while(!0);if(ql(),Re=o,gi.current=a,Ye!==null)throw Error(s(261));return ot=null,ut=0,Ze}function pv(){for(;Ye!==null;)Ch(Ye)}function mv(){for(;Ye!==null&&!Ug();)Ch(Ye)}function Ch(e){var t=Rh(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?Eh(e):Ye=t,Nu.current=null}function Eh(e){var t=e;do{var o=t.alternate;if(e=t.return,(t.flags&32768)===0){if(o=iv(o,t,_t),o!==null){Ye=o;return}}else{if(o=lv(o,t),o!==null){o.flags&=32767,Ye=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Ye=null;return}}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Ze===0&&(Ze=5)}function Qr(e,t,o){var a=ze,l=Wt.transition;try{Wt.transition=null,ze=1,gv(e,t,o,a)}finally{Wt.transition=l,ze=a}return null}function gv(e,t,o,a){do $o();while(dr!==null);if((Re&6)!==0)throw Error(s(327));o=e.finishedWork;var l=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var c=o.lanes|o.childLanes;if(Yg(e,c),e===ot&&(Ye=ot=null,ut=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||xi||(xi=!0,jh(Pa,function(){return $o(),null})),c=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||c){c=Wt.transition,Wt.transition=null;var m=ze;ze=1;var k=Re;Re|=4,Nu.current=null,cv(e,o),mh(o,e),_y(zl),Oa=!!Ol,zl=Ol=null,e.current=o,dv(o),Bg(),Re=k,ze=m,Wt.transition=c}else e.current=o;if(xi&&(xi=!1,dr=e,wi=l),c=e.pendingLanes,c===0&&(cr=null),Hg(o.stateNode),Rt(e,qe()),t!==null)for(a=e.onRecoverableError,o=0;o<t.length;o++)l=t[o],a(l.value,{componentStack:l.stack,digest:l.digest});if(vi)throw vi=!1,e=ju,ju=null,e;return(wi&1)!==0&&e.tag!==0&&$o(),c=e.pendingLanes,(c&1)!==0?e===Mu?Xs++:(Xs=0,Mu=e):Xs=0,ar(),null}function $o(){if(dr!==null){var e=fd(wi),t=Wt.transition,o=ze;try{if(Wt.transition=null,ze=16>e?16:e,dr===null)var a=!1;else{if(e=dr,dr=null,wi=0,(Re&6)!==0)throw Error(s(331));var l=Re;for(Re|=4,le=e.current;le!==null;){var c=le,m=c.child;if((le.flags&16)!==0){var k=c.deletions;if(k!==null){for(var P=0;P<k.length;P++){var D=k[P];for(le=D;le!==null;){var H=le;switch(H.tag){case 0:case 11:case 15:qs(8,H,c)}var Q=H.child;if(Q!==null)Q.return=H,le=Q;else for(;le!==null;){H=le;var W=H.sibling,se=H.return;if(ch(H),H===D){le=null;break}if(W!==null){W.return=se,le=W;break}le=se}}}var ue=c.alternate;if(ue!==null){var ce=ue.child;if(ce!==null){ue.child=null;do{var Ge=ce.sibling;ce.sibling=null,ce=Ge}while(ce!==null)}}le=c}}if((c.subtreeFlags&2064)!==0&&m!==null)m.return=c,le=m;else e:for(;le!==null;){if(c=le,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:qs(9,c,c.return)}var L=c.sibling;if(L!==null){L.return=c.return,le=L;break e}le=c.return}}var R=e.current;for(le=R;le!==null;){m=le;var O=m.child;if((m.subtreeFlags&2064)!==0&&O!==null)O.return=m,le=O;else e:for(m=R;le!==null;){if(k=le,(k.flags&2048)!==0)try{switch(k.tag){case 0:case 11:case 15:mi(9,k)}}catch(fe){Qe(k,k.return,fe)}if(k===m){le=null;break e}var Y=k.sibling;if(Y!==null){Y.return=k.return,le=Y;break e}le=k.return}}if(Re=l,ar(),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(Ra,e)}catch{}a=!0}return a}finally{ze=o,Wt.transition=t}}return!1}function Nh(e,t,o){t=Ao(o,t),t=Hf(e,t,1),e=lr(e,t,1),t=xt(),e!==null&&(bs(e,1,t),Rt(e,t))}function Qe(e,t,o){if(e.tag===3)Nh(e,e,o);else for(;t!==null;){if(t.tag===3){Nh(t,e,o);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(cr===null||!cr.has(a))){e=Ao(o,e),e=Vf(t,e,1),t=lr(t,e,1),e=xt(),t!==null&&(bs(t,1,e),Rt(t,e));break}}t=t.return}}function yv(e,t,o){var a=e.pingCache;a!==null&&a.delete(t),t=xt(),e.pingedLanes|=e.suspendedLanes&o,ot===e&&(ut&o)===o&&(Ze===4||Ze===3&&(ut&130023424)===ut&&500>qe()-Ru?Vr(e,0):Pu|=o),Rt(e,t)}function Ph(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ma,Ma<<=1,(Ma&130023424)===0&&(Ma=4194304)));var o=xt();e=Ln(e,t),e!==null&&(bs(e,t,o),Rt(e,o))}function vv(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),Ph(e,o)}function xv(e,t){var o=0;switch(e.tag){case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(o=l.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(s(314))}a!==null&&a.delete(t),Ph(e,o)}var Rh;Rh=function(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ct.current)Nt=!0;else{if((e.lanes&o)===0&&(t.flags&128)===0)return Nt=!1,av(e,t,o);Nt=(e.flags&131072)!==0}else Nt=!1,$e&&(t.flags&1048576)!==0&&af(t,Ja,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;hi(e,t),e=t.pendingProps;var l=Mo(t,dt.current);_o(t,o),l=su(null,t,a,e,l,o);var c=au();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(a)?(c=!0,Ga(t)):c=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Jl(t),l.updater=di,t.stateNode=l,l._reactInternals=t,fu(t,a,e,o),t=gu(null,t,a,!0,c,o)):(t.tag=0,$e&&c&&$l(t),vt(null,t,l,o),t=t.child),t;case 16:a=t.elementType;e:{switch(hi(e,t),e=t.pendingProps,l=a._init,a=l(a._payload),t.type=a,l=t.tag=bv(a),e=Zt(a,e),l){case 0:t=mu(null,t,a,e,o);break e;case 1:t=eh(null,t,a,e,o);break e;case 11:t=Gf(null,t,a,e,o);break e;case 14:t=Yf(null,t,a,Zt(a.type,e),o);break e}throw Error(s(306,a,""))}return t;case 0:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:Zt(a,l),mu(e,t,a,l,o);case 1:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:Zt(a,l),eh(e,t,a,l,o);case 3:e:{if(th(t),e===null)throw Error(s(387));a=t.pendingProps,c=t.memoizedState,l=c.element,gf(e,t),oi(t,a,null,o);var m=t.memoizedState;if(a=m.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){l=Ao(Error(s(423)),t),t=nh(e,t,a,o,l);break e}else if(a!==l){l=Ao(Error(s(424)),t),t=nh(e,t,a,o,l);break e}else for(zt=rr(t.stateNode.containerInfo.firstChild),Ot=t,$e=!0,Jt=null,o=pf(t,null,a,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Io(),a===l){t=On(e,t,o);break e}vt(e,t,a,o)}t=t.child}return t;case 5:return xf(t),e===null&&Vl(t),a=t.type,l=t.pendingProps,c=e!==null?e.memoizedProps:null,m=l.children,_l(a,l)?m=null:c!==null&&_l(a,c)&&(t.flags|=32),Zf(e,t),vt(e,t,m,o),t.child;case 6:return e===null&&Vl(t),null;case 13:return rh(e,t,o);case 4:return Zl(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Oo(t,null,a,o):vt(e,t,a,o),t.child;case 11:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:Zt(a,l),Gf(e,t,a,l,o);case 7:return vt(e,t,t.pendingProps,o),t.child;case 8:return vt(e,t,t.pendingProps.children,o),t.child;case 12:return vt(e,t,t.pendingProps.children,o),t.child;case 10:e:{if(a=t.type._context,l=t.pendingProps,c=t.memoizedProps,m=l.value,Ae(ti,a._currentValue),a._currentValue=m,c!==null)if(Xt(c.value,m)){if(c.children===l.children&&!Ct.current){t=On(e,t,o);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var k=c.dependencies;if(k!==null){m=c.child;for(var P=k.firstContext;P!==null;){if(P.context===a){if(c.tag===1){P=In(-1,o&-o),P.tag=2;var D=c.updateQueue;if(D!==null){D=D.shared;var H=D.pending;H===null?P.next=P:(P.next=H.next,H.next=P),D.pending=P}}c.lanes|=o,P=c.alternate,P!==null&&(P.lanes|=o),Yl(c.return,o,t),k.lanes|=o;break}P=P.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(s(341));m.lanes|=o,k=m.alternate,k!==null&&(k.lanes|=o),Yl(m,o,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}vt(e,t,l.children,o),t=t.child}return t;case 9:return l=t.type,a=t.pendingProps.children,_o(t,o),l=Bt(l),a=a(l),t.flags|=1,vt(e,t,a,o),t.child;case 14:return a=t.type,l=Zt(a,t.pendingProps),l=Zt(a.type,l),Yf(e,t,a,l,o);case 15:return Xf(e,t,t.type,t.pendingProps,o);case 17:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:Zt(a,l),hi(e,t),t.tag=1,Et(a)?(e=!0,Ga(t)):e=!1,_o(t,o),$f(t,a,l),fu(t,a,l,o),gu(null,t,a,!0,e,o);case 19:return sh(e,t,o);case 22:return Jf(e,t,o)}throw Error(s(156,t.tag))};function jh(e,t){return id(e,t)}function wv(e,t,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,t,o,a){return new wv(e,t,o,a)}function _u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bv(e){if(typeof e=="function")return _u(e)?1:0;if(e!=null){if(e=e.$$typeof,e===T)return 11;if(e===ie)return 14}return 2}function pr(e,t){var o=e.alternate;return o===null?(o=Ht(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Ci(e,t,o,a,l,c){var m=2;if(a=e,typeof e=="function")_u(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case V:return Kr(o.children,l,c,t);case re:m=8,l|=8;break;case $:return e=Ht(12,o,t,l|2),e.elementType=$,e.lanes=c,e;case G:return e=Ht(13,o,t,l),e.elementType=G,e.lanes=c,e;case ne:return e=Ht(19,o,t,l),e.elementType=ne,e.lanes=c,e;case we:return Ei(o,l,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:m=10;break e;case M:m=9;break e;case T:m=11;break e;case ie:m=14;break e;case Se:m=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Ht(m,o,t,l),t.elementType=e,t.type=a,t.lanes=c,t}function Kr(e,t,o,a){return e=Ht(7,e,a,t),e.lanes=o,e}function Ei(e,t,o,a){return e=Ht(22,e,a,t),e.elementType=we,e.lanes=o,e.stateNode={isHidden:!1},e}function Du(e,t,o){return e=Ht(6,e,null,t),e.lanes=o,e}function Au(e,t,o){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sv(e,t,o,a,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dl(0),this.expirationTimes=dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.identifierPrefix=a,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fu(e,t,o,a,l,c,m,k,P){return e=new Sv(e,t,o,k,P),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Ht(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:a,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jl(c),e}function kv(e,t,o){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:a==null?null:""+a,children:e,containerInfo:t,implementation:o}}function Mh(e){if(!e)return sr;e=e._reactInternals;e:{if(zr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var o=e.type;if(Et(o))return rf(e,o,t)}return t}function Th(e,t,o,a,l,c,m,k,P){return e=Fu(o,a,!0,e,l,c,m,k,P),e.context=Mh(null),o=e.current,a=xt(),l=fr(o),c=In(a,l),c.callback=t??null,lr(o,c,l),e.current.lanes=l,bs(e,l,a),Rt(e,a),e}function Ni(e,t,o,a){var l=t.current,c=xt(),m=fr(l);return o=Mh(o),t.context===null?t.context=o:t.pendingContext=o,t=In(c,m),t.payload={element:e},a=a===void 0?null:a,a!==null&&(t.callback=a),e=lr(l,t,m),e!==null&&(nn(e,l,m,c),ri(e,l,m)),m}function Pi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Uu(e,t){Lh(e,t),(e=e.alternate)&&Lh(e,t)}function Cv(){return null}var Ih=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bu(e){this._internalRoot=e}Ri.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Ni(e,t,null,null)},Ri.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hr(function(){Ni(null,e,null,null)}),t[Rn]=null}};function Ri(e){this._internalRoot=e}Ri.prototype.unstable_scheduleHydration=function(e){if(e){var t=md();e={blockedOn:null,target:e,priority:t};for(var o=0;o<er.length&&t!==0&&t<er[o].priority;o++);er.splice(o,0,e),o===0&&vd(e)}};function $u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ji(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Oh(){}function Ev(e,t,o,a,l){if(l){if(typeof a=="function"){var c=a;a=function(){var D=Pi(m);c.call(D)}}var m=Th(t,a,e,0,null,!1,!1,"",Oh);return e._reactRootContainer=m,e[Rn]=m.current,zs(e.nodeType===8?e.parentNode:e),Hr(),m}for(;l=e.lastChild;)e.removeChild(l);if(typeof a=="function"){var k=a;a=function(){var D=Pi(P);k.call(D)}}var P=Fu(e,0,!1,null,null,!1,!1,"",Oh);return e._reactRootContainer=P,e[Rn]=P.current,zs(e.nodeType===8?e.parentNode:e),Hr(function(){Ni(t,P,o,a)}),P}function Mi(e,t,o,a,l){var c=o._reactRootContainer;if(c){var m=c;if(typeof l=="function"){var k=l;l=function(){var P=Pi(m);k.call(P)}}Ni(t,m,e,l)}else m=Ev(o,t,e,l,a);return Pi(m)}hd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var o=ws(t.pendingLanes);o!==0&&(fl(t,o|1),Rt(t,qe()),(Re&6)===0&&(Bo=qe()+500,ar()))}break;case 13:Hr(function(){var a=Ln(e,1);if(a!==null){var l=xt();nn(a,e,1,l)}}),Uu(e,1)}},hl=function(e){if(e.tag===13){var t=Ln(e,134217728);if(t!==null){var o=xt();nn(t,e,134217728,o)}Uu(e,134217728)}},pd=function(e){if(e.tag===13){var t=fr(e),o=Ln(e,t);if(o!==null){var a=xt();nn(o,e,t,a)}Uu(e,t)}},md=function(){return ze},gd=function(e,t){var o=ze;try{return ze=e,t()}finally{ze=o}},wo=function(e,t,o){switch(t){case"input":if(ms(e,o),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<o.length;t++){var a=o[t];if(a!==e&&a.form===e.form){var l=Ka(a);if(!l)throw Error(s(90));po(a),ms(a,l)}}}break;case"textarea":xa(e,o);break;case"select":t=o.value,t!=null&&At(e,!!o.multiple,t,!1)}},Te=Iu,_e=Hr;var Nv={usingClientEntryPoint:!1,Events:[As,Ro,Ka,Ca,xe,Iu]},Js={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Pv={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:F.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=sd(e),e===null?null:e.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||Cv,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 Ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ti.isDisabled&&Ti.supportsFiber)try{Ra=Ti.inject(Pv),yn=Ti}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nv,jt.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$u(t))throw Error(s(200));return kv(e,t,null,o)},jt.createRoot=function(e,t){if(!$u(e))throw Error(s(299));var o=!1,a="",l=Ih;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Fu(e,1,!1,null,null,o,!1,a,l),e[Rn]=t.current,zs(e.nodeType===8?e.parentNode:e),new Bu(t)},jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=sd(t),e=e===null?null:e.stateNode,e},jt.flushSync=function(e){return Hr(e)},jt.hydrate=function(e,t,o){if(!ji(t))throw Error(s(200));return Mi(null,e,t,!0,o)},jt.hydrateRoot=function(e,t,o){if(!$u(e))throw Error(s(405));var a=o!=null&&o.hydratedSources||null,l=!1,c="",m=Ih;if(o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onRecoverableError!==void 0&&(m=o.onRecoverableError)),t=Th(t,null,e,1,o??null,l,!1,c,m),e[Rn]=t.current,zs(e),a)for(e=0;e<a.length;e++)o=a[e],l=o._getVersion,l=l(o._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[o,l]:t.mutableSourceEagerHydrationData.push(o,l);return new Ri(t)},jt.render=function(e,t,o){if(!ji(t))throw Error(s(200));return Mi(null,e,t,!1,o)},jt.unmountComponentAtNode=function(e){if(!ji(e))throw Error(s(40));return e._reactRootContainer?(Hr(function(){Mi(null,null,e,!1,function(){e._reactRootContainer=null,e[Rn]=null})}),!0):!1},jt.unstable_batchedUpdates=Iu,jt.unstable_renderSubtreeIntoContainer=function(e,t,o,a){if(!ji(o))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return Mi(e,t,o,!1,a)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var Wh;function Jp(){if(Wh)return Qu.exports;Wh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Qu.exports=zv(),Qu.exports}var Hh;function _v(){if(Hh)return Ii;Hh=1;var n=Jp();return Ii.createRoot=n.createRoot,Ii.hydrateRoot=n.hydrateRoot,Ii}var Dv=_v();/**
|
|
41
|
-
* react-router v7.13.0
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/var Vh="popstate";function Av(n={}){function r(i,u){let{pathname:d,search:p,hash:h}=i.location;return lc("",{pathname:d,search:p,hash:h},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function s(i,u){return typeof u=="string"?u:oa(u)}return Uv(r,s,null,n)}function We(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function ln(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Fv(){return Math.random().toString(36).substring(2,10)}function Qh(n,r){return{usr:n.state,key:n.key,idx:r}}function lc(n,r,s=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?as(r):r,state:s,key:r&&r.key||i||Fv()}}function oa({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function as(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function Uv(n,r,s,i={}){let{window:u=document.defaultView,v5Compat:d=!1}=i,p=u.history,h="POP",v=null,g=w();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function w(){return(p.state||{idx:null}).idx}function S(){h="POP";let E=w(),_=E==null?null:E-g;g=E,v&&v({action:h,location:b.location,delta:_})}function C(E,_){h="PUSH";let U=lc(b.location,E,_);g=w()+1;let I=Qh(U,g),F=b.createHref(U);try{p.pushState(I,"",F)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;u.location.assign(F)}d&&v&&v({action:h,location:b.location,delta:1})}function x(E,_){h="REPLACE";let U=lc(b.location,E,_);g=w();let I=Qh(U,g),F=b.createHref(U);p.replaceState(I,"",F),d&&v&&v({action:h,location:b.location,delta:0})}function z(E){return Bv(E)}let b={get action(){return h},get location(){return n(u,p)},listen(E){if(v)throw new Error("A history only accepts one active listener");return u.addEventListener(Vh,S),v=E,()=>{u.removeEventListener(Vh,S),v=null}},createHref(E){return r(u,E)},createURL:z,encodeLocation(E){let _=z(E);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:C,replace:x,go(E){return p.go(E)}};return b}function Bv(n,r=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),We(s,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:oa(n);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function Zp(n,r,s="/"){return $v(n,r,s,!1)}function $v(n,r,s,i){let u=typeof r=="string"?as(r):r,d=Qn(u.pathname||"/",s);if(d==null)return null;let p=em(n);Wv(p);let h=null;for(let v=0;h==null&&v<p.length;++v){let g=e0(d);h=Jv(p[v],g,i)}return h}function em(n,r=[],s=[],i="",u=!1){let d=(p,h,v=u,g)=>{let w={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:h,route:p};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(i)&&v)return;We(w.relativePath.startsWith(i),`Absolute route path "${w.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(i.length)}let S=Wn([i,w.relativePath]),C=s.concat(w);p.children&&p.children.length>0&&(We(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),em(p.children,r,C,S,v)),!(p.path==null&&!p.index)&&r.push({path:S,score:Yv(S,p.index),routesMeta:C})};return n.forEach((p,h)=>{var v;if(p.path===""||!((v=p.path)!=null&&v.includes("?")))d(p,h);else for(let g of tm(p.path))d(p,h,!0,g)}),r}function tm(n){let r=n.split("/");if(r.length===0)return[];let[s,...i]=r,u=s.endsWith("?"),d=s.replace(/\?$/,"");if(i.length===0)return u?[d,""]:[d];let p=tm(i.join("/")),h=[];return h.push(...p.map(v=>v===""?d:[d,v].join("/"))),u&&h.push(...p),h.map(v=>n.startsWith("/")&&v===""?"/":v)}function Wv(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:Xv(r.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var Hv=/^:[\w-]+$/,Vv=3,Qv=2,Kv=1,qv=10,Gv=-2,Kh=n=>n==="*";function Yv(n,r){let s=n.split("/"),i=s.length;return s.some(Kh)&&(i+=Gv),r&&(i+=Qv),s.filter(u=>!Kh(u)).reduce((u,d)=>u+(Hv.test(d)?Vv:d===""?Kv:qv),i)}function Xv(n,r){return n.length===r.length&&n.slice(0,-1).every((i,u)=>i===r[u])?n[n.length-1]-r[r.length-1]:0}function Jv(n,r,s=!1){let{routesMeta:i}=n,u={},d="/",p=[];for(let h=0;h<i.length;++h){let v=i[h],g=h===i.length-1,w=d==="/"?r:r.slice(d.length)||"/",S=Yi({path:v.relativePath,caseSensitive:v.caseSensitive,end:g},w),C=v.route;if(!S&&g&&s&&!i[i.length-1].route.index&&(S=Yi({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},w)),!S)return null;Object.assign(u,S.params),p.push({params:u,pathname:Wn([d,S.pathname]),pathnameBase:o0(Wn([d,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(d=Wn([d,S.pathnameBase]))}return p}function Yi(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,i]=Zv(n.path,n.caseSensitive,n.end),u=r.match(s);if(!u)return null;let d=u[0],p=d.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:i.reduce((g,{paramName:w,isOptional:S},C)=>{if(w==="*"){let z=h[C]||"";p=d.slice(0,d.length-z.length).replace(/(.)\/+$/,"$1")}const x=h[C];return S&&!x?g[w]=void 0:g[w]=(x||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:p,pattern:n}}function Zv(n,r=!1,s=!0){ln(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,h,v)=>(i.push({paramName:h,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),i]}function e0(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return ln(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function Qn(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}var t0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function n0(n,r="/"){let{pathname:s,search:i="",hash:u=""}=typeof n=="string"?as(n):n,d;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?d=qh(s.substring(1),"/"):d=qh(s,r)):d=r,{pathname:d,search:s0(i),hash:a0(u)}}function qh(n,r){let s=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Gu(n,r,s,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function r0(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function Lc(n){let r=r0(n);return r.map((s,i)=>i===r.length-1?s.pathname:s.pathnameBase)}function Ic(n,r,s,i=!1){let u;typeof n=="string"?u=as(n):(u={...n},We(!u.pathname||!u.pathname.includes("?"),Gu("?","pathname","search",u)),We(!u.pathname||!u.pathname.includes("#"),Gu("#","pathname","hash",u)),We(!u.search||!u.search.includes("#"),Gu("#","search","hash",u)));let d=n===""||u.pathname==="",p=d?"/":u.pathname,h;if(p==null)h=s;else{let S=r.length-1;if(!i&&p.startsWith("..")){let C=p.split("/");for(;C[0]==="..";)C.shift(),S-=1;u.pathname=C.join("/")}h=S>=0?r[S]:"/"}let v=n0(u,h),g=p&&p!=="/"&&p.endsWith("/"),w=(d||p===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||w)&&(v.pathname+="/"),v}var Wn=n=>n.join("/").replace(/\/\/+/g,"/"),o0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),s0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,a0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,i0=class{constructor(n,r,s,i=!1){this.status=n,this.statusText=r||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function l0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function u0(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var nm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rm(n,r){let s=n;if(typeof s!="string"||!t0.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,u=!1;if(nm)try{let d=new URL(window.location.href),p=s.startsWith("//")?new URL(d.protocol+s):new URL(s),h=Qn(p.pathname,r);p.origin===d.origin&&h!=null?s=h+p.search+p.hash:u=!0}catch{ln(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:u,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var om=["POST","PUT","PATCH","DELETE"];new Set(om);var c0=["GET",...om];new Set(c0);var is=y.createContext(null);is.displayName="DataRouter";var rl=y.createContext(null);rl.displayName="DataRouterState";var d0=y.createContext(!1),sm=y.createContext({isTransitioning:!1});sm.displayName="ViewTransition";var f0=y.createContext(new Map);f0.displayName="Fetchers";var h0=y.createContext(null);h0.displayName="Await";var Dt=y.createContext(null);Dt.displayName="Navigation";var pa=y.createContext(null);pa.displayName="Location";var Nn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Nn.displayName="Route";var Oc=y.createContext(null);Oc.displayName="RouteError";var am="REACT_ROUTER_ERROR",p0="REDIRECT",m0="ROUTE_ERROR_RESPONSE";function g0(n){if(n.startsWith(`${am}:${p0}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function y0(n){if(n.startsWith(`${am}:${m0}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new i0(r.status,r.statusText,r.data)}catch{}}function v0(n,{relative:r}={}){We(ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=y.useContext(Dt),{hash:u,pathname:d,search:p}=ma(n,{relative:r}),h=d;return s!=="/"&&(h=d==="/"?s:Wn([s,d])),i.createHref({pathname:h,search:p,hash:u})}function ls(){return y.useContext(pa)!=null}function Kn(){return We(ls(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(pa).location}var im="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lm(n){y.useContext(Dt).static||y.useLayoutEffect(n)}function um(){let{isDataRoute:n}=y.useContext(Nn);return n?T0():x0()}function x0(){We(ls(),"useNavigate() may be used only in the context of a <Router> component.");let n=y.useContext(is),{basename:r,navigator:s}=y.useContext(Dt),{matches:i}=y.useContext(Nn),{pathname:u}=Kn(),d=JSON.stringify(Lc(i)),p=y.useRef(!1);return lm(()=>{p.current=!0}),y.useCallback((v,g={})=>{if(ln(p.current,im),!p.current)return;if(typeof v=="number"){s.go(v);return}let w=Ic(v,JSON.parse(d),u,g.relative==="path");n==null&&r!=="/"&&(w.pathname=w.pathname==="/"?r:Wn([r,w.pathname])),(g.replace?s.replace:s.push)(w,g.state,g)},[r,s,d,u,n])}y.createContext(null);function ma(n,{relative:r}={}){let{matches:s}=y.useContext(Nn),{pathname:i}=Kn(),u=JSON.stringify(Lc(s));return y.useMemo(()=>Ic(n,JSON.parse(u),i,r==="path"),[n,u,i,r])}function w0(n,r){return cm(n,r)}function cm(n,r,s,i,u){var U;We(ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=y.useContext(Dt),{matches:p}=y.useContext(Nn),h=p[p.length-1],v=h?h.params:{},g=h?h.pathname:"/",w=h?h.pathnameBase:"/",S=h&&h.route;{let I=S&&S.path||"";fm(g,!S||I.endsWith("*")||I.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${I}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${I}"> to <Route path="${I==="/"?"*":`${I}/*`}">.`)}let C=Kn(),x;if(r){let I=typeof r=="string"?as(r):r;We(w==="/"||((U=I.pathname)==null?void 0:U.startsWith(w)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${w}" but pathname "${I.pathname}" was given in the \`location\` prop.`),x=I}else x=C;let z=x.pathname||"/",b=z;if(w!=="/"){let I=w.replace(/^\//,"").split("/");b="/"+z.replace(/^\//,"").split("/").slice(I.length).join("/")}let E=Zp(n,{pathname:b});ln(S||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),ln(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=E0(E&&E.map(I=>Object.assign({},I,{params:Object.assign({},v,I.params),pathname:Wn([w,d.encodeLocation?d.encodeLocation(I.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathname]),pathnameBase:I.pathnameBase==="/"?w:Wn([w,d.encodeLocation?d.encodeLocation(I.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathnameBase])})),p,s,i,u);return r&&_?y.createElement(pa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},_):_}function b0(){let n=M0(),r=l0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},d={padding:"2px 4px",backgroundColor:i},p=null;return console.error("Error handled by React Router default ErrorBoundary:",n),p=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:d},"ErrorBoundary")," or"," ",y.createElement("code",{style:d},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),s?y.createElement("pre",{style:u},s):null,p)}var S0=y.createElement(b0,null),dm=class extends y.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=y0(n.digest);s&&(n=s)}let r=n!==void 0?y.createElement(Nn.Provider,{value:this.props.routeContext},y.createElement(Oc.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?y.createElement(k0,{error:n},r):r}};dm.contextType=d0;var Yu=new WeakMap;function k0({children:n,error:r}){let{basename:s}=y.useContext(Dt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=g0(r.digest);if(i){let u=Yu.get(r);if(u)throw u;let d=rm(i.location,s);if(nm&&!Yu.get(r))if(d.isExternal||i.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:i.replace}));throw Yu.set(r,p),p}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function C0({routeContext:n,match:r,children:s}){let i=y.useContext(is);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Nn.Provider,{value:n},s)}function E0(n,r=[],s=null,i=null,u=null){if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,p=s==null?void 0:s.errors;if(p!=null){let w=d.findIndex(S=>S.route.id&&(p==null?void 0:p[S.route.id])!==void 0);We(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),d=d.slice(0,Math.min(d.length,w+1))}let h=!1,v=-1;if(s)for(let w=0;w<d.length;w++){let S=d[w];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(v=w),S.route.id){let{loaderData:C,errors:x}=s,z=S.route.loader&&!C.hasOwnProperty(S.route.id)&&(!x||x[S.route.id]===void 0);if(S.route.lazy||z){h=!0,v>=0?d=d.slice(0,v+1):d=[d[0]];break}}}let g=s&&i?(w,S)=>{var C,x;i(w,{location:s.location,params:((x=(C=s.matches)==null?void 0:C[0])==null?void 0:x.params)??{},unstable_pattern:u0(s.matches),errorInfo:S})}:void 0;return d.reduceRight((w,S,C)=>{let x,z=!1,b=null,E=null;s&&(x=p&&S.route.id?p[S.route.id]:void 0,b=S.route.errorElement||S0,h&&(v<0&&C===0?(fm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,E=null):v===C&&(z=!0,E=S.route.hydrateFallbackElement||null)));let _=r.concat(d.slice(0,C+1)),U=()=>{let I;return x?I=b:z?I=E:S.route.Component?I=y.createElement(S.route.Component,null):S.route.element?I=S.route.element:I=w,y.createElement(C0,{match:S,routeContext:{outlet:w,matches:_,isDataRoute:s!=null},children:I})};return s&&(S.route.ErrorBoundary||S.route.errorElement||C===0)?y.createElement(dm,{location:s.location,revalidation:s.revalidation,component:b,error:x,children:U(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:g}):U()},null)}function zc(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function N0(n){let r=y.useContext(is);return We(r,zc(n)),r}function P0(n){let r=y.useContext(rl);return We(r,zc(n)),r}function R0(n){let r=y.useContext(Nn);return We(r,zc(n)),r}function _c(n){let r=R0(n),s=r.matches[r.matches.length-1];return We(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function j0(){return _c("useRouteId")}function M0(){var i;let n=y.useContext(Oc),r=P0("useRouteError"),s=_c("useRouteError");return n!==void 0?n:(i=r.errors)==null?void 0:i[s]}function T0(){let{router:n}=N0("useNavigate"),r=_c("useNavigate"),s=y.useRef(!1);return lm(()=>{s.current=!0}),y.useCallback(async(u,d={})=>{ln(s.current,im),s.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:r,...d}))},[n,r])}var Gh={};function fm(n,r,s){!r&&!Gh[n]&&(Gh[n]=!0,ln(!1,s))}y.memo(L0);function L0({routes:n,future:r,state:s,onError:i}){return cm(n,void 0,s,i,r)}function Yh({to:n,replace:r,state:s,relative:i}){We(ls(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=y.useContext(Dt);ln(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=y.useContext(Nn),{pathname:p}=Kn(),h=um(),v=Ic(n,Lc(d),p,i==="path"),g=JSON.stringify(v);return y.useEffect(()=>{h(JSON.parse(g),{replace:r,state:s,relative:i})},[h,g,i,r,s]),null}function vr(n){We(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function I0({basename:n="/",children:r=null,location:s,navigationType:i="POP",navigator:u,static:d=!1,unstable_useTransitions:p}){We(!ls(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),v=y.useMemo(()=>({basename:h,navigator:u,static:d,unstable_useTransitions:p,future:{}}),[h,u,d,p]);typeof s=="string"&&(s=as(s));let{pathname:g="/",search:w="",hash:S="",state:C=null,key:x="default"}=s,z=y.useMemo(()=>{let b=Qn(g,h);return b==null?null:{location:{pathname:b,search:w,hash:S,state:C,key:x},navigationType:i}},[h,g,w,S,C,x,i]);return ln(z!=null,`<Router basename="${h}"> is not able to match the URL "${g}${w}${S}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:y.createElement(Dt.Provider,{value:v},y.createElement(pa.Provider,{children:r,value:z}))}function O0({children:n,location:r}){return w0(uc(n),r)}function uc(n,r=[]){let s=[];return y.Children.forEach(n,(i,u)=>{if(!y.isValidElement(i))return;let d=[...r,u];if(i.type===y.Fragment){s.push.apply(s,uc(i.props.children,d));return}We(i.type===vr,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),We(!i.props.index||!i.props.children,"An index route cannot have child routes.");let p={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(p.children=uc(i.props.children,d)),s.push(p)}),s}var Wi="get",Hi="application/x-www-form-urlencoded";function ol(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function z0(n){return ol(n)&&n.tagName.toLowerCase()==="button"}function _0(n){return ol(n)&&n.tagName.toLowerCase()==="form"}function D0(n){return ol(n)&&n.tagName.toLowerCase()==="input"}function A0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function F0(n,r){return n.button===0&&(!r||r==="_self")&&!A0(n)}var Oi=null;function U0(){if(Oi===null)try{new FormData(document.createElement("form"),0),Oi=!1}catch{Oi=!0}return Oi}var B0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xu(n){return n!=null&&!B0.has(n)?(ln(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hi}"`),null):n}function $0(n,r){let s,i,u,d,p;if(_0(n)){let h=n.getAttribute("action");i=h?Qn(h,r):null,s=n.getAttribute("method")||Wi,u=Xu(n.getAttribute("enctype"))||Hi,d=new FormData(n)}else if(z0(n)||D0(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||h.getAttribute("action");if(i=v?Qn(v,r):null,s=n.getAttribute("formmethod")||h.getAttribute("method")||Wi,u=Xu(n.getAttribute("formenctype"))||Xu(h.getAttribute("enctype"))||Hi,d=new FormData(h,n),!U0()){let{name:g,type:w,value:S}=n;if(w==="image"){let C=g?`${g}.`:"";d.append(`${C}x`,"0"),d.append(`${C}y`,"0")}else g&&d.append(g,S)}}else{if(ol(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Wi,i=null,u=Hi,p=n}return d&&u==="text/plain"&&(p=d,d=void 0),{action:i,method:s.toLowerCase(),encType:u,formData:d,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Dc(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function W0(n,r,s,i){let u=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${i}`:u.pathname=`${u.pathname}.${i}`:u.pathname==="/"?u.pathname=`_root.${i}`:r&&Qn(u.pathname,r)==="/"?u.pathname=`${r.replace(/\/$/,"")}/_root.${i}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${i}`,u}async function H0(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function V0(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Q0(n,r,s){let i=await Promise.all(n.map(async u=>{let d=r.routes[u.route.id];if(d){let p=await H0(d,s);return p.links?p.links():[]}return[]}));return Y0(i.flat(1).filter(V0).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Xh(n,r,s,i,u,d){let p=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,h=(v,g)=>{var w;return s[g].pathname!==v.pathname||((w=s[g].route.path)==null?void 0:w.endsWith("*"))&&s[g].params["*"]!==v.params["*"]};return d==="assets"?r.filter((v,g)=>p(v,g)||h(v,g)):d==="data"?r.filter((v,g)=>{var S;let w=i.routes[v.route.id];if(!w||!w.hasLoader)return!1;if(p(v,g)||h(v,g))return!0;if(v.route.shouldRevalidate){let C=v.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((S=s[0])==null?void 0:S.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function K0(n,r,{includeHydrateFallback:s}={}){return q0(n.map(i=>{let u=r.routes[i.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),s&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function q0(n){return[...new Set(n)]}function G0(n){let r={},s=Object.keys(n).sort();for(let i of s)r[i]=n[i];return r}function Y0(n,r){let s=new Set;return new Set(r),n.reduce((i,u)=>{let d=JSON.stringify(G0(u));return s.has(d)||(s.add(d),i.push({key:d,link:u})),i},[])}function hm(){let n=y.useContext(is);return Dc(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function X0(){let n=y.useContext(rl);return Dc(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Ac=y.createContext(void 0);Ac.displayName="FrameworkContext";function pm(){let n=y.useContext(Ac);return Dc(n,"You must render this element inside a <HydratedRouter> element"),n}function J0(n,r){let s=y.useContext(Ac),[i,u]=y.useState(!1),[d,p]=y.useState(!1),{onFocus:h,onBlur:v,onMouseEnter:g,onMouseLeave:w,onTouchStart:S}=r,C=y.useRef(null);y.useEffect(()=>{if(n==="render"&&p(!0),n==="viewport"){let b=_=>{_.forEach(U=>{p(U.isIntersecting)})},E=new IntersectionObserver(b,{threshold:.5});return C.current&&E.observe(C.current),()=>{E.disconnect()}}},[n]),y.useEffect(()=>{if(i){let b=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(b)}}},[i]);let x=()=>{u(!0)},z=()=>{u(!1),p(!1)};return s?n!=="intent"?[d,C,{}]:[d,C,{onFocus:ea(h,x),onBlur:ea(v,z),onMouseEnter:ea(g,x),onMouseLeave:ea(w,z),onTouchStart:ea(S,x)}]:[!1,C,{}]}function ea(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function Z0({page:n,...r}){let{router:s}=hm(),i=y.useMemo(()=>Zp(s.routes,n,s.basename),[s.routes,n,s.basename]);return i?y.createElement(tx,{page:n,matches:i,...r}):null}function ex(n){let{manifest:r,routeModules:s}=pm(),[i,u]=y.useState([]);return y.useEffect(()=>{let d=!1;return Q0(n,r,s).then(p=>{d||u(p)}),()=>{d=!0}},[n,r,s]),i}function tx({page:n,matches:r,...s}){let i=Kn(),{future:u,manifest:d,routeModules:p}=pm(),{basename:h}=hm(),{loaderData:v,matches:g}=X0(),w=y.useMemo(()=>Xh(n,r,g,d,i,"data"),[n,r,g,d,i]),S=y.useMemo(()=>Xh(n,r,g,d,i,"assets"),[n,r,g,d,i]),C=y.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let b=new Set,E=!1;if(r.forEach(U=>{var F;let I=d.routes[U.route.id];!I||!I.hasLoader||(!w.some(q=>q.route.id===U.route.id)&&U.route.id in v&&((F=p[U.route.id])!=null&&F.shouldRevalidate)||I.hasClientLoader?E=!0:b.add(U.route.id))}),b.size===0)return[];let _=W0(n,h,u.unstable_trailingSlashAwareDataRequests,"data");return E&&b.size>0&&_.searchParams.set("_routes",r.filter(U=>b.has(U.route.id)).map(U=>U.route.id).join(",")),[_.pathname+_.search]},[h,u.unstable_trailingSlashAwareDataRequests,v,i,d,w,r,n,p]),x=y.useMemo(()=>K0(S,d),[S,d]),z=ex(S);return y.createElement(y.Fragment,null,C.map(b=>y.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...s})),x.map(b=>y.createElement("link",{key:b,rel:"modulepreload",href:b,...s})),z.map(({key:b,link:E})=>y.createElement("link",{key:b,nonce:s.nonce,...E,crossOrigin:E.crossOrigin??s.crossOrigin})))}function nx(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var rx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{rx&&(window.__reactRouterVersion="7.13.0")}catch{}function ox({basename:n,children:r,unstable_useTransitions:s,window:i}){let u=y.useRef();u.current==null&&(u.current=Av({window:i,v5Compat:!0}));let d=u.current,[p,h]=y.useState({action:d.action,location:d.location}),v=y.useCallback(g=>{s===!1?h(g):y.startTransition(()=>h(g))},[s]);return y.useLayoutEffect(()=>d.listen(v),[d,v]),y.createElement(I0,{basename:n,children:r,location:p.location,navigationType:p.action,navigator:d,unstable_useTransitions:s})}var mm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gm=y.forwardRef(function({onClick:r,discover:s="render",prefetch:i="none",relative:u,reloadDocument:d,replace:p,state:h,target:v,to:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:C,...x},z){let{basename:b,unstable_useTransitions:E}=y.useContext(Dt),_=typeof g=="string"&&mm.test(g),U=rm(g,b);g=U.to;let I=v0(g,{relative:u}),[F,q,ee]=J0(i,x),V=ix(g,{replace:p,state:h,target:v,preventScrollReset:w,relative:u,viewTransition:S,unstable_defaultShouldRevalidate:C,unstable_useTransitions:E});function re(X){r&&r(X),X.defaultPrevented||V(X)}let $=y.createElement("a",{...x,...ee,href:U.absoluteURL||I,onClick:U.isExternal||d?r:re,ref:nx(z,q),target:v,"data-discover":!_&&s==="render"?"true":void 0});return F&&!_?y.createElement(y.Fragment,null,$,y.createElement(Z0,{page:I})):$});gm.displayName="Link";var ym=y.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:i="",end:u=!1,style:d,to:p,viewTransition:h,children:v,...g},w){let S=ma(p,{relative:g.relative}),C=Kn(),x=y.useContext(rl),{navigator:z,basename:b}=y.useContext(Dt),E=x!=null&&fx(S)&&h===!0,_=z.encodeLocation?z.encodeLocation(S).pathname:S.pathname,U=C.pathname,I=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;s||(U=U.toLowerCase(),I=I?I.toLowerCase():null,_=_.toLowerCase()),I&&b&&(I=Qn(I,b)||I);const F=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let q=U===_||!u&&U.startsWith(_)&&U.charAt(F)==="/",ee=I!=null&&(I===_||!u&&I.startsWith(_)&&I.charAt(_.length)==="/"),V={isActive:q,isPending:ee,isTransitioning:E},re=q?r:void 0,$;typeof i=="function"?$=i(V):$=[i,q?"active":null,ee?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let X=typeof d=="function"?d(V):d;return y.createElement(gm,{...g,"aria-current":re,className:$,ref:w,style:X,to:p,viewTransition:h},typeof v=="function"?v(V):v)});ym.displayName="NavLink";var sx=y.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:i,replace:u,state:d,method:p=Wi,action:h,onSubmit:v,relative:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:C,...x},z)=>{let{unstable_useTransitions:b}=y.useContext(Dt),E=cx(),_=dx(h,{relative:g}),U=p.toLowerCase()==="get"?"get":"post",I=typeof h=="string"&&mm.test(h),F=q=>{if(v&&v(q),q.defaultPrevented)return;q.preventDefault();let ee=q.nativeEvent.submitter,V=(ee==null?void 0:ee.getAttribute("formmethod"))||p,re=()=>E(ee||q.currentTarget,{fetcherKey:r,method:V,navigate:s,replace:u,state:d,relative:g,preventScrollReset:w,viewTransition:S,unstable_defaultShouldRevalidate:C});b&&s!==!1?y.startTransition(()=>re()):re()};return y.createElement("form",{ref:z,method:U,action:_,onSubmit:i?v:F,...x,"data-discover":!I&&n==="render"?"true":void 0})});sx.displayName="Form";function ax(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vm(n){let r=y.useContext(is);return We(r,ax(n)),r}function ix(n,{target:r,replace:s,state:i,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:h,unstable_useTransitions:v}={}){let g=um(),w=Kn(),S=ma(n,{relative:d});return y.useCallback(C=>{if(F0(C,r)){C.preventDefault();let x=s!==void 0?s:oa(w)===oa(S),z=()=>g(n,{replace:x,state:i,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:h});v?y.startTransition(()=>z()):z()}},[w,g,S,s,i,r,n,u,d,p,h,v])}var lx=0,ux=()=>`__${String(++lx)}__`;function cx(){let{router:n}=vm("useSubmit"),{basename:r}=y.useContext(Dt),s=j0(),i=n.fetch,u=n.navigate;return y.useCallback(async(d,p={})=>{let{action:h,method:v,encType:g,formData:w,body:S}=$0(d,r);if(p.navigate===!1){let C=p.fetcherKey||ux();await i(C,s,p.action||h,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:w,body:S,formMethod:p.method||v,formEncType:p.encType||g,flushSync:p.flushSync})}else await u(p.action||h,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:w,body:S,formMethod:p.method||v,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:s,flushSync:p.flushSync,viewTransition:p.viewTransition})},[i,u,r,s])}function dx(n,{relative:r}={}){let{basename:s}=y.useContext(Dt),i=y.useContext(Nn);We(i,"useFormAction must be used inside a RouteContext");let[u]=i.matches.slice(-1),d={...ma(n||".",{relative:r})},p=Kn();if(n==null){d.search=p.search;let h=new URLSearchParams(d.search),v=h.getAll("index");if(v.some(w=>w==="")){h.delete("index"),v.filter(S=>S).forEach(S=>h.append("index",S));let w=h.toString();d.search=w?`?${w}`:""}}return(!n||n===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:Wn([s,d.pathname])),oa(d)}function fx(n,{relative:r}={}){let s=y.useContext(sm);We(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=vm("useViewTransitionState"),u=ma(n,{relative:r});if(!s.isTransitioning)return!1;let d=Qn(s.currentLocation.pathname,i)||s.currentLocation.pathname,p=Qn(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Yi(u.pathname,p)!=null||Yi(u.pathname,d)!=null}var xm=Jp();const wm=Yp(xm);var us=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hx={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},br,Mc,Fp,px=(Fp=class{constructor(){he(this,br,hx);he(this,Mc,!1)}setTimeoutProvider(n){oe(this,br,n)}setTimeout(n,r){return N(this,br).setTimeout(n,r)}clearTimeout(n){N(this,br).clearTimeout(n)}setInterval(n,r){return N(this,br).setInterval(n,r)}clearInterval(n){N(this,br).clearInterval(n)}},br=new WeakMap,Mc=new WeakMap,Fp),qr=new px;function mx(n){setTimeout(n,0)}var lo=typeof window>"u"||"Deno"in globalThis;function bt(){}function gx(n,r){return typeof n=="function"?n(r):n}function cc(n){return typeof n=="number"&&n>=0&&n!==1/0}function bm(n,r){return Math.max(n+(r||0)-Date.now(),0)}function Mr(n,r){return typeof n=="function"?n(r):n}function Qt(n,r){return typeof n=="function"?n(r):n}function Jh(n,r){const{type:s="all",exact:i,fetchStatus:u,predicate:d,queryKey:p,stale:h}=n;if(p){if(i){if(r.queryHash!==Fc(p,r.options))return!1}else if(!sa(r.queryKey,p))return!1}if(s!=="all"){const v=r.isActive();if(s==="active"&&!v||s==="inactive"&&v)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||u&&u!==r.state.fetchStatus||d&&!d(r))}function Zh(n,r){const{exact:s,status:i,predicate:u,mutationKey:d}=n;if(d){if(!r.options.mutationKey)return!1;if(s){if(uo(r.options.mutationKey)!==uo(d))return!1}else if(!sa(r.options.mutationKey,d))return!1}return!(i&&r.state.status!==i||u&&!u(r))}function Fc(n,r){return((r==null?void 0:r.queryKeyHashFn)||uo)(n)}function uo(n){return JSON.stringify(n,(r,s)=>dc(s)?Object.keys(s).sort().reduce((i,u)=>(i[u]=s[u],i),{}):s)}function sa(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>sa(n[s],r[s])):!1}var yx=Object.prototype.hasOwnProperty;function Sm(n,r,s=0){if(n===r)return n;if(s>500)return r;const i=ep(n)&&ep(r);if(!i&&!(dc(n)&&dc(r)))return r;const d=(i?n:Object.keys(n)).length,p=i?r:Object.keys(r),h=p.length,v=i?new Array(h):{};let g=0;for(let w=0;w<h;w++){const S=i?w:p[w],C=n[S],x=r[S];if(C===x){v[S]=C,(i?w<d:yx.call(n,S))&&g++;continue}if(C===null||x===null||typeof C!="object"||typeof x!="object"){v[S]=x;continue}const z=Sm(C,x,s+1);v[S]=z,z===C&&g++}return d===h&&g===d?n:v}function Xi(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function ep(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function dc(n){if(!tp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!tp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function tp(n){return Object.prototype.toString.call(n)==="[object Object]"}function vx(n){return new Promise(r=>{qr.setTimeout(r,n)})}function fc(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?Sm(n,r):r}function xx(n,r,s=0){const i=[...n,r];return s&&i.length>s?i.slice(1):i}function wx(n,r,s=0){const i=[r,...n];return s&&i.length>s?i.slice(0,-1):i}var Uc=Symbol();function km(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Uc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Bc(n,r){return typeof n=="function"?n(...r):!!n}function bx(n,r,s){let i=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=r()),i||(i=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}var Gr,Sr,qo,Up,Sx=(Up=class extends us{constructor(){super();he(this,Gr);he(this,Sr);he(this,qo);oe(this,qo,r=>{if(!lo&&window.addEventListener){const s=()=>r();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){N(this,Sr)||this.setEventListener(N(this,qo))}onUnsubscribe(){var r;this.hasListeners()||((r=N(this,Sr))==null||r.call(this),oe(this,Sr,void 0))}setEventListener(r){var s;oe(this,qo,r),(s=N(this,Sr))==null||s.call(this),oe(this,Sr,r(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(r){N(this,Gr)!==r&&(oe(this,Gr,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(s=>{s(r)})}isFocused(){var r;return typeof N(this,Gr)=="boolean"?N(this,Gr):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Gr=new WeakMap,Sr=new WeakMap,qo=new WeakMap,Up),$c=new Sx;function hc(){let n,r;const s=new Promise((u,d)=>{n=u,r=d});s.status="pending",s.catch(()=>{});function i(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{i({status:"fulfilled",value:u}),n(u)},s.reject=u=>{i({status:"rejected",reason:u}),r(u)},s}var kx=mx;function Cx(){let n=[],r=0,s=h=>{h()},i=h=>{h()},u=kx;const d=h=>{r?n.push(h):u(()=>{s(h)})},p=()=>{const h=n;n=[],h.length&&u(()=>{i(()=>{h.forEach(v=>{s(v)})})})};return{batch:h=>{let v;r++;try{v=h()}finally{r--,r||p()}return v},batchCalls:h=>(...v)=>{d(()=>{h(...v)})},schedule:d,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{u=h}}}var et=Cx(),Go,kr,Yo,Bp,Ex=(Bp=class extends us{constructor(){super();he(this,Go,!0);he(this,kr);he(this,Yo);oe(this,Yo,r=>{if(!lo&&window.addEventListener){const s=()=>r(!0),i=()=>r(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){N(this,kr)||this.setEventListener(N(this,Yo))}onUnsubscribe(){var r;this.hasListeners()||((r=N(this,kr))==null||r.call(this),oe(this,kr,void 0))}setEventListener(r){var s;oe(this,Yo,r),(s=N(this,kr))==null||s.call(this),oe(this,kr,r(this.setOnline.bind(this)))}setOnline(r){N(this,Go)!==r&&(oe(this,Go,r),this.listeners.forEach(i=>{i(r)}))}isOnline(){return N(this,Go)}},Go=new WeakMap,kr=new WeakMap,Yo=new WeakMap,Bp),Ji=new Ex;function Nx(n){return Math.min(1e3*2**n,3e4)}function Cm(n){return(n??"online")==="online"?Ji.isOnline():!0}var pc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Em(n){let r=!1,s=0,i;const u=hc(),d=()=>u.status!=="pending",p=b=>{var E;if(!d()){const _=new pc(b);C(_),(E=n.onCancel)==null||E.call(n,_)}},h=()=>{r=!0},v=()=>{r=!1},g=()=>$c.isFocused()&&(n.networkMode==="always"||Ji.isOnline())&&n.canRun(),w=()=>Cm(n.networkMode)&&n.canRun(),S=b=>{d()||(i==null||i(),u.resolve(b))},C=b=>{d()||(i==null||i(),u.reject(b))},x=()=>new Promise(b=>{var E;i=_=>{(d()||g())&&b(_)},(E=n.onPause)==null||E.call(n)}).then(()=>{var b;i=void 0,d()||(b=n.onContinue)==null||b.call(n)}),z=()=>{if(d())return;let b;const E=s===0?n.initialPromise:void 0;try{b=E??n.fn()}catch(_){b=Promise.reject(_)}Promise.resolve(b).then(S).catch(_=>{var ee;if(d())return;const U=n.retry??(lo?0:3),I=n.retryDelay??Nx,F=typeof I=="function"?I(s,_):I,q=U===!0||typeof U=="number"&&s<U||typeof U=="function"&&U(s,_);if(r||!q){C(_);return}s++,(ee=n.onFail)==null||ee.call(n,s,_),vx(F).then(()=>g()?void 0:x()).then(()=>{r?C(_):z()})})};return{promise:u,status:()=>u.status,cancel:p,continue:()=>(i==null||i(),u),cancelRetry:h,continueRetry:v,canStart:w,start:()=>(w()?z():x().then(z),u)}}var Yr,$p,Nm=($p=class{constructor(){he(this,Yr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cc(this.gcTime)&&oe(this,Yr,qr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(lo?1/0:300*1e3))}clearGcTimeout(){N(this,Yr)&&(qr.clearTimeout(N(this,Yr)),oe(this,Yr,void 0))}},Yr=new WeakMap,$p),Xr,Xo,Vt,Jr,at,ua,Zr,sn,Dn,Wp,Px=(Wp=class extends Nm{constructor(r){super();he(this,sn);he(this,Xr);he(this,Xo);he(this,Vt);he(this,Jr);he(this,at);he(this,ua);he(this,Zr);oe(this,Zr,!1),oe(this,ua,r.defaultOptions),this.setOptions(r.options),this.observers=[],oe(this,Jr,r.client),oe(this,Vt,N(this,Jr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,oe(this,Xr,rp(this.options)),this.state=r.state??N(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=N(this,at))==null?void 0:r.promise}setOptions(r){if(this.options={...N(this,ua),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=rp(this.options);s.data!==void 0&&(this.setState(np(s.data,s.dataUpdatedAt)),oe(this,Xr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Vt).remove(this)}setData(r,s){const i=fc(this.state.data,r,this.options);return ke(this,sn,Dn).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(r,s){ke(this,sn,Dn).call(this,{type:"setState",state:r,setStateOptions:s})}cancel(r){var i,u;const s=(i=N(this,at))==null?void 0:i.promise;return(u=N(this,at))==null||u.cancel(r),s?s.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,Xr))}isActive(){return this.observers.some(r=>Qt(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>Mr(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!bm(this.state.dataUpdatedAt,r)}onFocus(){var s;const r=this.observers.find(i=>i.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(s=N(this,at))==null||s.continue()}onOnline(){var s;const r=this.observers.find(i=>i.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(s=N(this,at))==null||s.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),N(this,Vt).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(s=>s!==r),this.observers.length||(N(this,at)&&(N(this,Zr)?N(this,at).cancel({revert:!0}):N(this,at).cancelRetry()),this.scheduleGc()),N(this,Vt).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,sn,Dn).call(this,{type:"invalidate"})}async fetch(r,s){var v,g,w,S,C,x,z,b,E,_,U,I;if(this.state.fetchStatus!=="idle"&&((v=N(this,at))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(N(this,at))return N(this,at).continueRetry(),N(this,at).promise}if(r&&this.setOptions(r),!this.options.queryFn){const F=this.observers.find(q=>q.options.queryFn);F&&this.setOptions(F.options)}const i=new AbortController,u=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>(oe(this,Zr,!0),i.signal)})},d=()=>{const F=km(this.options,s),ee=(()=>{const V={client:N(this,Jr),queryKey:this.queryKey,meta:this.meta};return u(V),V})();return oe(this,Zr,!1),this.options.persister?this.options.persister(F,ee,this):F(ee)},h=(()=>{const F={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:N(this,Jr),state:this.state,fetchFn:d};return u(F),F})();(g=this.options.behavior)==null||g.onFetch(h,this),oe(this,Xo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=h.fetchOptions)==null?void 0:w.meta))&&ke(this,sn,Dn).call(this,{type:"fetch",meta:(S=h.fetchOptions)==null?void 0:S.meta}),oe(this,at,Em({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:F=>{F instanceof pc&&F.revert&&this.setState({...N(this,Xo),fetchStatus:"idle"}),i.abort()},onFail:(F,q)=>{ke(this,sn,Dn).call(this,{type:"failed",failureCount:F,error:q})},onPause:()=>{ke(this,sn,Dn).call(this,{type:"pause"})},onContinue:()=>{ke(this,sn,Dn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const F=await N(this,at).start();if(F===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(F),(x=(C=N(this,Vt).config).onSuccess)==null||x.call(C,F,this),(b=(z=N(this,Vt).config).onSettled)==null||b.call(z,F,this.state.error,this),F}catch(F){if(F instanceof pc){if(F.silent)return N(this,at).promise;if(F.revert){if(this.state.data===void 0)throw F;return this.state.data}}throw ke(this,sn,Dn).call(this,{type:"error",error:F}),(_=(E=N(this,Vt).config).onError)==null||_.call(E,F,this),(I=(U=N(this,Vt).config).onSettled)==null||I.call(U,this.state.data,F,this),F}finally{this.scheduleGc()}}},Xr=new WeakMap,Xo=new WeakMap,Vt=new WeakMap,Jr=new WeakMap,at=new WeakMap,ua=new WeakMap,Zr=new WeakMap,sn=new WeakSet,Dn=function(r){const s=i=>{switch(r.type){case"failed":return{...i,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Pm(i.data,this.options),fetchMeta:r.meta??null};case"success":const u={...i,...np(r.data,r.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,Xo,r.manual?u:void 0),u;case"error":const d=r.error;return{...i,error:d,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...r.state}}};this.state=s(this.state),et.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),N(this,Vt).notify({query:this,type:"updated",action:r})})},Wp);function Pm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cm(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function np(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Mt,Ne,ca,wt,eo,Jo,An,Cr,da,Zo,es,to,no,Er,ts,Ie,ra,mc,gc,yc,vc,xc,wc,bc,Rm,Hp,Rx=(Hp=class extends us{constructor(r,s){super();he(this,Ie);he(this,Mt);he(this,Ne);he(this,ca);he(this,wt);he(this,eo);he(this,Jo);he(this,An);he(this,Cr);he(this,da);he(this,Zo);he(this,es);he(this,to);he(this,no);he(this,Er);he(this,ts,new Set);this.options=s,oe(this,Mt,r),oe(this,Cr,null),oe(this,An,hc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Ne).addObserver(this),op(N(this,Ne),this.options)?ke(this,Ie,ra).call(this):this.updateResult(),ke(this,Ie,vc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sc(N(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sc(N(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,Ie,xc).call(this),ke(this,Ie,wc).call(this),N(this,Ne).removeObserver(this)}setOptions(r){const s=this.options,i=N(this,Ne);if(this.options=N(this,Mt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,N(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,Ie,bc).call(this),N(this,Ne).setOptions(this.options),s._defaulted&&!Xi(this.options,s)&&N(this,Mt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Ne),observer:this});const u=this.hasListeners();u&&sp(N(this,Ne),i,this.options,s)&&ke(this,Ie,ra).call(this),this.updateResult(),u&&(N(this,Ne)!==i||Qt(this.options.enabled,N(this,Ne))!==Qt(s.enabled,N(this,Ne))||Mr(this.options.staleTime,N(this,Ne))!==Mr(s.staleTime,N(this,Ne)))&&ke(this,Ie,mc).call(this);const d=ke(this,Ie,gc).call(this);u&&(N(this,Ne)!==i||Qt(this.options.enabled,N(this,Ne))!==Qt(s.enabled,N(this,Ne))||d!==N(this,Er))&&ke(this,Ie,yc).call(this,d)}getOptimisticResult(r){const s=N(this,Mt).getQueryCache().build(N(this,Mt),r),i=this.createResult(s,r);return Mx(this,i)&&(oe(this,wt,i),oe(this,Jo,this.options),oe(this,eo,N(this,Ne).state)),i}getCurrentResult(){return N(this,wt)}trackResult(r,s){return new Proxy(r,{get:(i,u)=>(this.trackProp(u),s==null||s(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,An).status==="pending"&&N(this,An).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,u))})}trackProp(r){N(this,ts).add(r)}getCurrentQuery(){return N(this,Ne)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const s=N(this,Mt).defaultQueryOptions(r),i=N(this,Mt).getQueryCache().build(N(this,Mt),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(r){return ke(this,Ie,ra).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,wt)))}createResult(r,s){var $;const i=N(this,Ne),u=this.options,d=N(this,wt),p=N(this,eo),h=N(this,Jo),g=r!==i?r.state:N(this,ca),{state:w}=r;let S={...w},C=!1,x;if(s._optimisticResults){const X=this.hasListeners(),M=!X&&op(r,s),T=X&&sp(r,i,s,u);(M||T)&&(S={...S,...Pm(w.data,r.options)}),s._optimisticResults==="isRestoring"&&(S.fetchStatus="idle")}let{error:z,errorUpdatedAt:b,status:E}=S;x=S.data;let _=!1;if(s.placeholderData!==void 0&&x===void 0&&E==="pending"){let X;d!=null&&d.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(X=d.data,_=!0):X=typeof s.placeholderData=="function"?s.placeholderData(($=N(this,es))==null?void 0:$.state.data,N(this,es)):s.placeholderData,X!==void 0&&(E="success",x=fc(d==null?void 0:d.data,X,s),C=!0)}if(s.select&&x!==void 0&&!_)if(d&&x===(p==null?void 0:p.data)&&s.select===N(this,da))x=N(this,Zo);else try{oe(this,da,s.select),x=s.select(x),x=fc(d==null?void 0:d.data,x,s),oe(this,Zo,x),oe(this,Cr,null)}catch(X){oe(this,Cr,X)}N(this,Cr)&&(z=N(this,Cr),x=N(this,Zo),b=Date.now(),E="error");const U=S.fetchStatus==="fetching",I=E==="pending",F=E==="error",q=I&&U,ee=x!==void 0,re={status:E,fetchStatus:S.fetchStatus,isPending:I,isSuccess:E==="success",isError:F,isInitialLoading:q,isLoading:q,data:x,dataUpdatedAt:S.dataUpdatedAt,error:z,errorUpdatedAt:b,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>g.dataUpdateCount||S.errorUpdateCount>g.errorUpdateCount,isFetching:U,isRefetching:U&&!I,isLoadingError:F&&!ee,isPaused:S.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:F&&ee,isStale:Wc(r,s),refetch:this.refetch,promise:N(this,An),isEnabled:Qt(s.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const X=re.data!==void 0,M=re.status==="error"&&!X,T=ie=>{M?ie.reject(re.error):X&&ie.resolve(re.data)},G=()=>{const ie=oe(this,An,re.promise=hc());T(ie)},ne=N(this,An);switch(ne.status){case"pending":r.queryHash===i.queryHash&&T(ne);break;case"fulfilled":(M||re.data!==ne.value)&&G();break;case"rejected":(!M||re.error!==ne.reason)&&G();break}}return re}updateResult(){const r=N(this,wt),s=this.createResult(N(this,Ne),this.options);if(oe(this,eo,N(this,Ne).state),oe(this,Jo,this.options),N(this,eo).data!==void 0&&oe(this,es,N(this,Ne)),Xi(s,r))return;oe(this,wt,s);const i=()=>{if(!r)return!0;const{notifyOnChangeProps:u}=this.options,d=typeof u=="function"?u():u;if(d==="all"||!d&&!N(this,ts).size)return!0;const p=new Set(d??N(this,ts));return this.options.throwOnError&&p.add("error"),Object.keys(N(this,wt)).some(h=>{const v=h;return N(this,wt)[v]!==r[v]&&p.has(v)})};ke(this,Ie,Rm).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,Ie,vc).call(this)}},Mt=new WeakMap,Ne=new WeakMap,ca=new WeakMap,wt=new WeakMap,eo=new WeakMap,Jo=new WeakMap,An=new WeakMap,Cr=new WeakMap,da=new WeakMap,Zo=new WeakMap,es=new WeakMap,to=new WeakMap,no=new WeakMap,Er=new WeakMap,ts=new WeakMap,Ie=new WeakSet,ra=function(r){ke(this,Ie,bc).call(this);let s=N(this,Ne).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(bt)),s},mc=function(){ke(this,Ie,xc).call(this);const r=Mr(this.options.staleTime,N(this,Ne));if(lo||N(this,wt).isStale||!cc(r))return;const i=bm(N(this,wt).dataUpdatedAt,r)+1;oe(this,to,qr.setTimeout(()=>{N(this,wt).isStale||this.updateResult()},i))},gc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Ne)):this.options.refetchInterval)??!1},yc=function(r){ke(this,Ie,wc).call(this),oe(this,Er,r),!(lo||Qt(this.options.enabled,N(this,Ne))===!1||!cc(N(this,Er))||N(this,Er)===0)&&oe(this,no,qr.setInterval(()=>{(this.options.refetchIntervalInBackground||$c.isFocused())&&ke(this,Ie,ra).call(this)},N(this,Er)))},vc=function(){ke(this,Ie,mc).call(this),ke(this,Ie,yc).call(this,ke(this,Ie,gc).call(this))},xc=function(){N(this,to)&&(qr.clearTimeout(N(this,to)),oe(this,to,void 0))},wc=function(){N(this,no)&&(qr.clearInterval(N(this,no)),oe(this,no,void 0))},bc=function(){const r=N(this,Mt).getQueryCache().build(N(this,Mt),this.options);if(r===N(this,Ne))return;const s=N(this,Ne);oe(this,Ne,r),oe(this,ca,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},Rm=function(r){et.batch(()=>{r.listeners&&this.listeners.forEach(s=>{s(N(this,wt))}),N(this,Mt).getQueryCache().notify({query:N(this,Ne),type:"observerResultsUpdated"})})},Hp);function jx(n,r){return Qt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function op(n,r){return jx(n,r)||n.state.data!==void 0&&Sc(n,r,r.refetchOnMount)}function Sc(n,r,s){if(Qt(r.enabled,n)!==!1&&Mr(r.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&Wc(n,r)}return!1}function sp(n,r,s,i){return(n!==r||Qt(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Wc(n,s)}function Wc(n,r){return Qt(r.enabled,n)!==!1&&n.isStaleByTime(Mr(r.staleTime,n))}function Mx(n,r){return!Xi(n.getCurrentResult(),r)}function ap(n){return{onFetch:(r,s)=>{var w,S,C,x,z;const i=r.options,u=(C=(S=(w=r.fetchOptions)==null?void 0:w.meta)==null?void 0:S.fetchMore)==null?void 0:C.direction,d=((x=r.state.data)==null?void 0:x.pages)||[],p=((z=r.state.data)==null?void 0:z.pageParams)||[];let h={pages:[],pageParams:[]},v=0;const g=async()=>{let b=!1;const E=I=>{bx(I,()=>r.signal,()=>b=!0)},_=km(r.options,r.fetchOptions),U=async(I,F,q)=>{if(b)return Promise.reject();if(F==null&&I.pages.length)return Promise.resolve(I);const V=(()=>{const M={client:r.client,queryKey:r.queryKey,pageParam:F,direction:q?"backward":"forward",meta:r.options.meta};return E(M),M})(),re=await _(V),{maxPages:$}=r.options,X=q?wx:xx;return{pages:X(I.pages,re,$),pageParams:X(I.pageParams,F,$)}};if(u&&d.length){const I=u==="backward",F=I?Tx:ip,q={pages:d,pageParams:p},ee=F(i,q);h=await U(q,ee,I)}else{const I=n??d.length;do{const F=v===0?p[0]??i.initialPageParam:ip(i,h);if(v>0&&F==null)break;h=await U(h,F),v++}while(v<I)}return h};r.options.persister?r.fetchFn=()=>{var b,E;return(E=(b=r.options).persister)==null?void 0:E.call(b,g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=g}}}function ip(n,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?n.getNextPageParam(r[i],r,s[i],s):void 0}function Tx(n,{pages:r,pageParams:s}){var i;return r.length>0?(i=n.getPreviousPageParam)==null?void 0:i.call(n,r[0],r,s[0],s):void 0}var fa,Sn,mt,ro,kn,xr,Vp,Lx=(Vp=class extends Nm{constructor(r){super();he(this,kn);he(this,fa);he(this,Sn);he(this,mt);he(this,ro);oe(this,fa,r.client),this.mutationId=r.mutationId,oe(this,mt,r.mutationCache),oe(this,Sn,[]),this.state=r.state||jm(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){N(this,Sn).includes(r)||(N(this,Sn).push(r),this.clearGcTimeout(),N(this,mt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){oe(this,Sn,N(this,Sn).filter(s=>s!==r)),this.scheduleGc(),N(this,mt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){N(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():N(this,mt).remove(this))}continue(){var r;return((r=N(this,ro))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var p,h,v,g,w,S,C,x,z,b,E,_,U,I,F,q,ee,V;const s=()=>{ke(this,kn,xr).call(this,{type:"continue"})},i={client:N(this,fa),meta:this.options.meta,mutationKey:this.options.mutationKey};oe(this,ro,Em({fn:()=>this.options.mutationFn?this.options.mutationFn(r,i):Promise.reject(new Error("No mutationFn found")),onFail:(re,$)=>{ke(this,kn,xr).call(this,{type:"failed",failureCount:re,error:$})},onPause:()=>{ke(this,kn,xr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,mt).canRun(this)}));const u=this.state.status==="pending",d=!N(this,ro).canStart();try{if(u)s();else{ke(this,kn,xr).call(this,{type:"pending",variables:r,isPaused:d}),N(this,mt).config.onMutate&&await N(this,mt).config.onMutate(r,this,i);const $=await((h=(p=this.options).onMutate)==null?void 0:h.call(p,r,i));$!==this.state.context&&ke(this,kn,xr).call(this,{type:"pending",context:$,variables:r,isPaused:d})}const re=await N(this,ro).start();return await((g=(v=N(this,mt).config).onSuccess)==null?void 0:g.call(v,re,r,this.state.context,this,i)),await((S=(w=this.options).onSuccess)==null?void 0:S.call(w,re,r,this.state.context,i)),await((x=(C=N(this,mt).config).onSettled)==null?void 0:x.call(C,re,null,this.state.variables,this.state.context,this,i)),await((b=(z=this.options).onSettled)==null?void 0:b.call(z,re,null,r,this.state.context,i)),ke(this,kn,xr).call(this,{type:"success",data:re}),re}catch(re){try{await((_=(E=N(this,mt).config).onError)==null?void 0:_.call(E,re,r,this.state.context,this,i))}catch($){Promise.reject($)}try{await((I=(U=this.options).onError)==null?void 0:I.call(U,re,r,this.state.context,i))}catch($){Promise.reject($)}try{await((q=(F=N(this,mt).config).onSettled)==null?void 0:q.call(F,void 0,re,this.state.variables,this.state.context,this,i))}catch($){Promise.reject($)}try{await((V=(ee=this.options).onSettled)==null?void 0:V.call(ee,void 0,re,r,this.state.context,i))}catch($){Promise.reject($)}throw ke(this,kn,xr).call(this,{type:"error",error:re}),re}finally{N(this,mt).runNext(this)}}},fa=new WeakMap,Sn=new WeakMap,mt=new WeakMap,ro=new WeakMap,kn=new WeakSet,xr=function(r){const s=i=>{switch(r.type){case"failed":return{...i,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...i,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:r.error,failureCount:i.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=s(this.state),et.batch(()=>{N(this,Sn).forEach(i=>{i.onMutationUpdate(r)}),N(this,mt).notify({mutation:this,type:"updated",action:r})})},Vp);function jm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fn,an,ha,Qp,Ix=(Qp=class extends us{constructor(r={}){super();he(this,Fn);he(this,an);he(this,ha);this.config=r,oe(this,Fn,new Set),oe(this,an,new Map),oe(this,ha,0)}build(r,s,i){const u=new Lx({client:r,mutationCache:this,mutationId:++Li(this,ha)._,options:r.defaultMutationOptions(s),state:i});return this.add(u),u}add(r){N(this,Fn).add(r);const s=zi(r);if(typeof s=="string"){const i=N(this,an).get(s);i?i.push(r):N(this,an).set(s,[r])}this.notify({type:"added",mutation:r})}remove(r){if(N(this,Fn).delete(r)){const s=zi(r);if(typeof s=="string"){const i=N(this,an).get(s);if(i)if(i.length>1){const u=i.indexOf(r);u!==-1&&i.splice(u,1)}else i[0]===r&&N(this,an).delete(s)}}this.notify({type:"removed",mutation:r})}canRun(r){const s=zi(r);if(typeof s=="string"){const i=N(this,an).get(s),u=i==null?void 0:i.find(d=>d.state.status==="pending");return!u||u===r}else return!0}runNext(r){var i;const s=zi(r);if(typeof s=="string"){const u=(i=N(this,an).get(s))==null?void 0:i.find(d=>d!==r&&d.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){et.batch(()=>{N(this,Fn).forEach(r=>{this.notify({type:"removed",mutation:r})}),N(this,Fn).clear(),N(this,an).clear()})}getAll(){return Array.from(N(this,Fn))}find(r){const s={exact:!0,...r};return this.getAll().find(i=>Zh(s,i))}findAll(r={}){return this.getAll().filter(s=>Zh(r,s))}notify(r){et.batch(()=>{this.listeners.forEach(s=>{s(r)})})}resumePausedMutations(){const r=this.getAll().filter(s=>s.state.isPaused);return et.batch(()=>Promise.all(r.map(s=>s.continue().catch(bt))))}},Fn=new WeakMap,an=new WeakMap,ha=new WeakMap,Qp);function zi(n){var r;return(r=n.options.scope)==null?void 0:r.id}var Un,Nr,Tt,Bn,Vn,Vi,kc,Kp,Ox=(Kp=class extends us{constructor(s,i){super();he(this,Vn);he(this,Un);he(this,Nr);he(this,Tt);he(this,Bn);oe(this,Un,s),this.setOptions(i),this.bindMethods(),ke(this,Vn,Vi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var u;const i=this.options;this.options=N(this,Un).defaultMutationOptions(s),Xi(this.options,i)||N(this,Un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,Tt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&uo(i.mutationKey)!==uo(this.options.mutationKey)?this.reset():((u=N(this,Tt))==null?void 0:u.state.status)==="pending"&&N(this,Tt).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=N(this,Tt))==null||s.removeObserver(this)}onMutationUpdate(s){ke(this,Vn,Vi).call(this),ke(this,Vn,kc).call(this,s)}getCurrentResult(){return N(this,Nr)}reset(){var s;(s=N(this,Tt))==null||s.removeObserver(this),oe(this,Tt,void 0),ke(this,Vn,Vi).call(this),ke(this,Vn,kc).call(this)}mutate(s,i){var u;return oe(this,Bn,i),(u=N(this,Tt))==null||u.removeObserver(this),oe(this,Tt,N(this,Un).getMutationCache().build(N(this,Un),this.options)),N(this,Tt).addObserver(this),N(this,Tt).execute(s)}},Un=new WeakMap,Nr=new WeakMap,Tt=new WeakMap,Bn=new WeakMap,Vn=new WeakSet,Vi=function(){var i;const s=((i=N(this,Tt))==null?void 0:i.state)??jm();oe(this,Nr,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},kc=function(s){et.batch(()=>{var i,u,d,p,h,v,g,w;if(N(this,Bn)&&this.hasListeners()){const S=N(this,Nr).variables,C=N(this,Nr).context,x={client:N(this,Un),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(u=(i=N(this,Bn)).onSuccess)==null||u.call(i,s.data,S,C,x)}catch(z){Promise.reject(z)}try{(p=(d=N(this,Bn)).onSettled)==null||p.call(d,s.data,null,S,C,x)}catch(z){Promise.reject(z)}}else if((s==null?void 0:s.type)==="error"){try{(v=(h=N(this,Bn)).onError)==null||v.call(h,s.error,S,C,x)}catch(z){Promise.reject(z)}try{(w=(g=N(this,Bn)).onSettled)==null||w.call(g,void 0,s.error,S,C,x)}catch(z){Promise.reject(z)}}}this.listeners.forEach(S=>{S(N(this,Nr))})})},Kp),Cn,qp,zx=(qp=class extends us{constructor(r={}){super();he(this,Cn);this.config=r,oe(this,Cn,new Map)}build(r,s,i){const u=s.queryKey,d=s.queryHash??Fc(u,s);let p=this.get(d);return p||(p=new Px({client:r,queryKey:u,queryHash:d,options:r.defaultQueryOptions(s),state:i,defaultOptions:r.getQueryDefaults(u)}),this.add(p)),p}add(r){N(this,Cn).has(r.queryHash)||(N(this,Cn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const s=N(this,Cn).get(r.queryHash);s&&(r.destroy(),s===r&&N(this,Cn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){et.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return N(this,Cn).get(r)}getAll(){return[...N(this,Cn).values()]}find(r){const s={exact:!0,...r};return this.getAll().find(i=>Jh(s,i))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(i=>Jh(r,i)):s}notify(r){et.batch(()=>{this.listeners.forEach(s=>{s(r)})})}onFocus(){et.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){et.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Cn=new WeakMap,qp),Ke,Pr,Rr,ns,rs,jr,os,ss,Gp,_x=(Gp=class{constructor(n={}){he(this,Ke);he(this,Pr);he(this,Rr);he(this,ns);he(this,rs);he(this,jr);he(this,os);he(this,ss);oe(this,Ke,n.queryCache||new zx),oe(this,Pr,n.mutationCache||new Ix),oe(this,Rr,n.defaultOptions||{}),oe(this,ns,new Map),oe(this,rs,new Map),oe(this,jr,0)}mount(){Li(this,jr)._++,N(this,jr)===1&&(oe(this,os,$c.subscribe(async n=>{n&&(await this.resumePausedMutations(),N(this,Ke).onFocus())})),oe(this,ss,Ji.subscribe(async n=>{n&&(await this.resumePausedMutations(),N(this,Ke).onOnline())})))}unmount(){var n,r;Li(this,jr)._--,N(this,jr)===0&&((n=N(this,os))==null||n.call(this),oe(this,os,void 0),(r=N(this,ss))==null||r.call(this),oe(this,ss,void 0))}isFetching(n){return N(this,Ke).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return N(this,Pr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=N(this,Ke).get(r.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=N(this,Ke).build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Mr(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(n){return N(this,Ke).findAll(n).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(n,r,s){const i=this.defaultQueryOptions({queryKey:n}),u=N(this,Ke).get(i.queryHash),d=u==null?void 0:u.state.data,p=gx(r,d);if(p!==void 0)return N(this,Ke).build(this,i).setData(p,{...s,manual:!0})}setQueriesData(n,r,s){return et.batch(()=>N(this,Ke).findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(n){var s;const r=this.defaultQueryOptions({queryKey:n});return(s=N(this,Ke).get(r.queryHash))==null?void 0:s.state}removeQueries(n){const r=N(this,Ke);et.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=N(this,Ke);return et.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},i=et.batch(()=>N(this,Ke).findAll(n).map(u=>u.cancel(s)));return Promise.all(i).then(bt).catch(bt)}invalidateQueries(n,r={}){return et.batch(()=>(N(this,Ke).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=et.batch(()=>N(this,Ke).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,s);return s.throwOnError||(d=d.catch(bt)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(i).then(bt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=N(this,Ke).build(this,r);return s.isStaleByTime(Mr(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(bt).catch(bt)}fetchInfiniteQuery(n){return n.behavior=ap(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(bt).catch(bt)}ensureInfiniteQueryData(n){return n.behavior=ap(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ji.isOnline()?N(this,Pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Ke)}getMutationCache(){return N(this,Pr)}getDefaultOptions(){return N(this,Rr)}setDefaultOptions(n){oe(this,Rr,n)}setQueryDefaults(n,r){N(this,ns).set(uo(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...N(this,ns).values()],s={};return r.forEach(i=>{sa(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,r){N(this,rs).set(uo(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...N(this,rs).values()],s={};return r.forEach(i=>{sa(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...N(this,Rr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=Fc(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Uc&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...N(this,Rr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){N(this,Ke).clear(),N(this,Pr).clear()}},Ke=new WeakMap,Pr=new WeakMap,Rr=new WeakMap,ns=new WeakMap,rs=new WeakMap,jr=new WeakMap,os=new WeakMap,ss=new WeakMap,Gp),Mm=y.createContext(void 0),Lr=n=>{const r=y.useContext(Mm);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Dx=({client:n,children:r})=>(y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Mm.Provider,{value:n,children:r})),Tm=y.createContext(!1),Ax=()=>y.useContext(Tm);Tm.Provider;function Fx(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ux=y.createContext(Fx()),Bx=()=>y.useContext(Ux),$x=(n,r,s)=>{const i=s!=null&&s.state.error&&typeof n.throwOnError=="function"?Bc(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(r.isReset()||(n.retryOnMount=!1))},Wx=n=>{y.useEffect(()=>{n.clearReset()},[n])},Hx=({result:n,errorResetBoundary:r,throwOnError:s,query:i,suspense:u})=>n.isError&&!r.isReset()&&!n.isFetching&&i&&(u&&n.data===void 0||Bc(s,[n.error,i])),Vx=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...u)=>s(i(...u)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Qx=(n,r)=>n.isLoading&&n.isFetching&&!r,Kx=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,lp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function qx(n,r,s){var C,x,z,b;const i=Ax(),u=Bx(),d=Lr(),p=d.defaultQueryOptions(n);(x=(C=d.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||x.call(C,p);const h=d.getQueryCache().get(p.queryHash);p._optimisticResults=i?"isRestoring":"optimistic",Vx(p),$x(p,u,h),Wx(u);const v=!d.getQueryCache().get(p.queryHash),[g]=y.useState(()=>new r(d,p)),w=g.getOptimisticResult(p),S=!i&&n.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(E=>{const _=S?g.subscribe(et.batchCalls(E)):bt;return g.updateResult(),_},[g,S]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),y.useEffect(()=>{g.setOptions(p)},[p,g]),Kx(p,w))throw lp(p,g,u);if(Hx({result:w,errorResetBoundary:u,throwOnError:p.throwOnError,query:h,suspense:p.suspense}))throw w.error;if((b=(z=d.getDefaultOptions().queries)==null?void 0:z._experimental_afterQuery)==null||b.call(z,p,w),p.experimental_prefetchInRender&&!lo&&Qx(w,i)){const E=v?lp(p,g,u):h==null?void 0:h.promise;E==null||E.catch(bt).finally(()=>{g.updateResult()})}return p.notifyOnChangeProps?w:g.trackResult(w)}function ga(n,r){return qx(n,Rx)}function fo(n,r){const s=Lr(),[i]=y.useState(()=>new Ox(s,n));y.useEffect(()=>{i.setOptions(n)},[i,n]);const u=y.useSyncExternalStore(y.useCallback(p=>i.subscribe(et.batchCalls(p)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=y.useCallback((p,h)=>{i.mutate(p,h).catch(bt)},[i]);if(u.error&&Bc(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}function Lm(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(s=Lm(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function Im(){for(var n,r,s=0,i="",u=arguments.length;s<u;s++)(n=arguments[s])&&(r=Lm(n))&&(i&&(i+=" "),i+=r);return i}const Hc="-",Gx=n=>{const r=Xx(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:p=>{const h=p.split(Hc);return h[0]===""&&h.length!==1&&h.shift(),Om(h,r)||Yx(p)},getConflictingClassGroupIds:(p,h)=>{const v=s[p]||[];return h&&i[p]?[...v,...i[p]]:v}}},Om=(n,r)=>{var p;if(n.length===0)return r.classGroupId;const s=n[0],i=r.nextPart.get(s),u=i?Om(n.slice(1),i):void 0;if(u)return u;if(r.validators.length===0)return;const d=n.join(Hc);return(p=r.validators.find(({validator:h})=>h(d)))==null?void 0:p.classGroupId},up=/^\[(.+)\]$/,Yx=n=>{if(up.test(n)){const r=up.exec(n)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},Xx=n=>{const{theme:r,prefix:s}=n,i={nextPart:new Map,validators:[]};return Zx(Object.entries(n.classGroups),s).forEach(([d,p])=>{Cc(p,i,d,r)}),i},Cc=(n,r,s,i)=>{n.forEach(u=>{if(typeof u=="string"){const d=u===""?r:cp(r,u);d.classGroupId=s;return}if(typeof u=="function"){if(Jx(u)){Cc(u(i),r,s,i);return}r.validators.push({validator:u,classGroupId:s});return}Object.entries(u).forEach(([d,p])=>{Cc(p,cp(r,d),s,i)})})},cp=(n,r)=>{let s=n;return r.split(Hc).forEach(i=>{s.nextPart.has(i)||s.nextPart.set(i,{nextPart:new Map,validators:[]}),s=s.nextPart.get(i)}),s},Jx=n=>n.isThemeGetter,Zx=(n,r)=>r?n.map(([s,i])=>{const u=i.map(d=>typeof d=="string"?r+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([p,h])=>[r+p,h])):d);return[s,u]}):n,ew=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,i=new Map;const u=(d,p)=>{s.set(d,p),r++,r>n&&(r=0,i=s,s=new Map)};return{get(d){let p=s.get(d);if(p!==void 0)return p;if((p=i.get(d))!==void 0)return u(d,p),p},set(d,p){s.has(d)?s.set(d,p):u(d,p)}}},zm="!",tw=n=>{const{separator:r,experimentalParseClassName:s}=n,i=r.length===1,u=r[0],d=r.length,p=h=>{const v=[];let g=0,w=0,S;for(let E=0;E<h.length;E++){let _=h[E];if(g===0){if(_===u&&(i||h.slice(E,E+d)===r)){v.push(h.slice(w,E)),w=E+d;continue}if(_==="/"){S=E;continue}}_==="["?g++:_==="]"&&g--}const C=v.length===0?h:h.substring(w),x=C.startsWith(zm),z=x?C.substring(1):C,b=S&&S>w?S-w:void 0;return{modifiers:v,hasImportantModifier:x,baseClassName:z,maybePostfixModifierPosition:b}};return s?h=>s({className:h,parseClassName:p}):p},nw=n=>{if(n.length<=1)return n;const r=[];let s=[];return n.forEach(i=>{i[0]==="["?(r.push(...s.sort(),i),s=[]):s.push(i)}),r.push(...s.sort()),r},rw=n=>({cache:ew(n.cacheSize),parseClassName:tw(n),...Gx(n)}),ow=/\s+/,sw=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:u}=r,d=[],p=n.trim().split(ow);let h="";for(let v=p.length-1;v>=0;v-=1){const g=p[v],{modifiers:w,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:x}=s(g);let z=!!x,b=i(z?C.substring(0,x):C);if(!b){if(!z){h=g+(h.length>0?" "+h:h);continue}if(b=i(C),!b){h=g+(h.length>0?" "+h:h);continue}z=!1}const E=nw(w).join(":"),_=S?E+zm:E,U=_+b;if(d.includes(U))continue;d.push(U);const I=u(b,z);for(let F=0;F<I.length;++F){const q=I[F];d.push(_+q)}h=g+(h.length>0?" "+h:h)}return h};function aw(){let n=0,r,s,i="";for(;n<arguments.length;)(r=arguments[n++])&&(s=_m(r))&&(i&&(i+=" "),i+=s);return i}const _m=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=_m(n[i]))&&(s&&(s+=" "),s+=r);return s};function iw(n,...r){let s,i,u,d=p;function p(v){const g=r.reduce((w,S)=>S(w),n());return s=rw(g),i=s.cache.get,u=s.cache.set,d=h,h(v)}function h(v){const g=i(v);if(g)return g;const w=sw(v,s);return u(v,w),w}return function(){return d(aw.apply(null,arguments))}}const Be=n=>{const r=s=>s[n]||[];return r.isThemeGetter=!0,r},Dm=/^\[(?:([a-z-]+):)?(.+)\]$/i,lw=/^\d+\/\d+$/,uw=new Set(["px","full","screen"]),cw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dw=/\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$/,fw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=n=>Qo(n)||uw.has(n)||lw.test(n),gr=n=>cs(n,"length",Sw),Qo=n=>!!n&&!Number.isNaN(Number(n)),Ju=n=>cs(n,"number",Qo),ta=n=>!!n&&Number.isInteger(Number(n)),mw=n=>n.endsWith("%")&&Qo(n.slice(0,-1)),be=n=>Dm.test(n),yr=n=>cw.test(n),gw=new Set(["length","size","percentage"]),yw=n=>cs(n,gw,Am),vw=n=>cs(n,"position",Am),xw=new Set(["image","url"]),ww=n=>cs(n,xw,Cw),bw=n=>cs(n,"",kw),na=()=>!0,cs=(n,r,s)=>{const i=Dm.exec(n);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):s(i[2]):!1},Sw=n=>dw.test(n)&&!fw.test(n),Am=()=>!1,kw=n=>hw.test(n),Cw=n=>pw.test(n),Ew=()=>{const n=Be("colors"),r=Be("spacing"),s=Be("blur"),i=Be("brightness"),u=Be("borderColor"),d=Be("borderRadius"),p=Be("borderSpacing"),h=Be("borderWidth"),v=Be("contrast"),g=Be("grayscale"),w=Be("hueRotate"),S=Be("invert"),C=Be("gap"),x=Be("gradientColorStops"),z=Be("gradientColorStopPositions"),b=Be("inset"),E=Be("margin"),_=Be("opacity"),U=Be("padding"),I=Be("saturate"),F=Be("scale"),q=Be("sepia"),ee=Be("skew"),V=Be("space"),re=Be("translate"),$=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",be,r],T=()=>[be,r],G=()=>["",_n,gr],ne=()=>["auto",Qo,be],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",be],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Qo,be];return{cacheSize:500,separator:":",theme:{colors:[na],spacing:[_n,gr],blur:["none","",yr,be],brightness:j(),borderColor:[n],borderRadius:["none","","full",yr,be],borderSpacing:T(),borderWidth:G(),contrast:j(),grayscale:K(),hueRotate:j(),invert:K(),gap:T(),gradientColorStops:[n],gradientColorStopPositions:[mw,gr],inset:M(),margin:M(),opacity:j(),padding:T(),saturate:j(),scale:j(),sepia:K(),skew:j(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[yr]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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(),be]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ta,be]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",ta,be]}],"grid-cols":[{"grid-cols":[na]}],"col-start-end":[{col:["auto",{span:["full",ta,be]},be]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[na]}],"row-start-end":[{row:["auto",{span:[ta,be]},be]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[U]}],px:[{px:[U]}],py:[{py:[U]}],ps:[{ps:[U]}],pe:[{pe:[U]}],pt:[{pt:[U]}],pr:[{pr:[U]}],pb:[{pb:[U]}],pl:[{pl:[U]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,r]}],"min-w":[{"min-w":[be,r,"min","max","fit"]}],"max-w":[{"max-w":[be,r,"none","full","min","max","fit","prose",{screen:[yr]},yr]}],h:[{h:[be,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,r,"auto","min","max","fit"]}],"font-size":[{text:["base",yr,gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ju]}],"font-family":[{font:[na]}],"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",be]}],"line-clamp":[{"line-clamp":["none",Qo,Ju]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,gr]}],"underline-offset":[{"underline-offset":["auto",_n,be]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),vw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ww]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:Se()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[_n,be]}],"outline-w":[{outline:[_n,gr]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[_n,gr]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",yr,bw]}],"shadow-color":[{shadow:[na]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...we(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":we()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[i]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",yr,be]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[S]}],saturate:[{saturate:[I]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[p]}],"border-spacing-x":[{"border-spacing-x":[p]}],"border-spacing-y":[{"border-spacing-y":[p]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[ta,be]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",n]}],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",be]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",be]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[_n,gr,Ju]}],stroke:[{stroke:[n,"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"]}}},Nw=iw(Ew);function Me(...n){return Nw(Im(n))}const dp={model:{zh:"模型",en:"Model"},providers:{zh:"提供商",en:"Providers"},channels:{zh:"渠道",en:"Channels"},enabled:{zh:"启用",en:"Enabled"},disabled:{zh:"禁用",en:"Disabled"},save:{zh:"保存",en:"Save"},cancel:{zh:"取消",en:"Cancel"},delete:{zh:"删除",en:"Delete"},add:{zh:"添加",en:"Add"},edit:{zh:"编辑",en:"Edit"},loading:{zh:"加载中...",en:"Loading..."},success:{zh:"成功",en:"Success"},error:{zh:"错误",en:"Error"},modelName:{zh:"模型",en:"Model"},workspace:{zh:"工作空间",en:"Workspace"},maxTokens:{zh:"最大 Token 数",en:"Max Tokens"},maxToolIterations:{zh:"最大工具迭代次数",en:"Max Tool Iterations"},apiKey:{zh:"API 密钥",en:"API Key"},apiBase:{zh:"API Base",en:"API Base"},extraHeaders:{zh:"额外请求头",en:"Extra Headers"},wireApi:{zh:"请求接口",en:"Wire API"},wireApiAuto:{zh:"自动(优先 Chat,必要时 Responses)",en:"Auto (Chat with fallback)"},wireApiChat:{zh:"Chat Completions",en:"Chat Completions"},wireApiResponses:{zh:"Responses",en:"Responses"},apiKeySet:{zh:"已设置",en:"Set"},apiKeyNotSet:{zh:"未设置",en:"Not Set"},showKey:{zh:"显示密钥",en:"Show Key"},hideKey:{zh:"隐藏密钥",en:"Hide Key"},allowFrom:{zh:"允许来源",en:"Allow From"},token:{zh:"Token",en:"Token"},botToken:{zh:"Bot Token",en:"Bot Token"},appToken:{zh:"App Token",en:"App Token"},appId:{zh:"App ID",en:"App ID"},corpId:{zh:"企业 ID",en:"Corp ID"},agentId:{zh:"应用 Agent ID",en:"Agent ID"},appSecret:{zh:"App Secret",en:"App Secret"},markdownSupport:{zh:"Markdown 支持",en:"Markdown Support"},clientId:{zh:"Client ID",en:"Client ID"},clientSecret:{zh:"Client Secret",en:"Client Secret"},encryptKey:{zh:"加密密钥",en:"Encrypt Key"},verificationToken:{zh:"验证令牌",en:"Verification Token"},bridgeUrl:{zh:"桥接 URL",en:"Bridge URL"},gatewayUrl:{zh:"网关 URL",en:"Gateway URL"},proxy:{zh:"代理",en:"Proxy"},intents:{zh:"Intents",en:"Intents"},mode:{zh:"模式",en:"Mode"},webhookPath:{zh:"Webhook 路径",en:"Webhook Path"},callbackPort:{zh:"回调端口",en:"Callback Port"},callbackPath:{zh:"回调路径",en:"Callback Path"},groupPolicy:{zh:"群组策略",en:"Group Policy"},consentGranted:{zh:"同意条款",en:"Consent Granted"},imapHost:{zh:"IMAP 服务器",en:"IMAP Host"},imapPort:{zh:"IMAP 端口",en:"IMAP Port"},imapUsername:{zh:"IMAP 用户名",en:"IMAP Username"},imapPassword:{zh:"IMAP 密码",en:"IMAP Password"},imapMailbox:{zh:"IMAP 邮箱",en:"IMAP Mailbox"},imapUseSsl:{zh:"IMAP 使用 SSL",en:"IMAP Use SSL"},smtpHost:{zh:"SMTP 服务器",en:"SMTP Host"},smtpPort:{zh:"SMTP 端口",en:"SMTP Port"},smtpUsername:{zh:"SMTP 用户名",en:"SMTP Username"},smtpPassword:{zh:"SMTP 密码",en:"SMTP Password"},smtpUseTls:{zh:"SMTP 使用 TLS",en:"SMTP Use TLS"},smtpUseSsl:{zh:"SMTP 使用 SSL",en:"SMTP Use SSL"},fromAddress:{zh:"发件地址",en:"From Address"},autoReplyEnabled:{zh:"自动回复已启用",en:"Auto Reply Enabled"},pollIntervalSeconds:{zh:"轮询间隔(秒)",en:"Poll Interval (s)"},markSeen:{zh:"标记为已读",en:"Mark Seen"},maxBodyChars:{zh:"最大正文字符数",en:"Max Body Chars"},subjectPrefix:{zh:"主题前缀",en:"Subject Prefix"},baseUrl:{zh:"Base URL",en:"Base URL"},socketUrl:{zh:"Socket URL",en:"Socket URL"},socketPath:{zh:"Socket 路径",en:"Socket Path"},socketDisableMsgpack:{zh:"禁用 Msgpack",en:"Disable Msgpack"},socketReconnectDelayMs:{zh:"重连延迟(ms)",en:"Reconnect Delay (ms)"},socketMaxReconnectDelayMs:{zh:"最大重连延迟(ms)",en:"Max Reconnect Delay (ms)"},socketConnectTimeoutMs:{zh:"连接超时(ms)",en:"Connect Timeout (ms)"},refreshIntervalMs:{zh:"刷新间隔(ms)",en:"Refresh Interval (ms)"},watchTimeoutMs:{zh:"监视超时(ms)",en:"Watch Timeout (ms)"},watchLimit:{zh:"监视限制",en:"Watch Limit"},retryDelayMs:{zh:"重试延迟(ms)",en:"Retry Delay (ms)"},maxRetryAttempts:{zh:"最大重试次数",en:"Max Retry Attempts"},clawToken:{zh:"Claw Token",en:"Claw Token"},agentUserId:{zh:"代理用户ID",en:"Agent User ID"},sessions:{zh:"会话",en:"Sessions"},panels:{zh:"面板",en:"Panels"},mentionRequireInGroups:{zh:"群组中需要@",en:"Require Mention in Groups"},groups:{zh:"群组",en:"Groups"},replyDelayMode:{zh:"回复延迟模式",en:"Reply Delay Mode"},replyDelayMs:{zh:"回复延迟(ms)",en:"Reply Delay (ms)"},secret:{zh:"密钥",en:"Secret"},sessionsPageTitle:{zh:"会话管理",en:"Sessions"},sessionsPageDescription:{zh:"管理会话:筛选、按渠道分组、查看历史、改标签/偏好模型、清空和删除。",en:"Manage sessions: filter, group by channel, inspect history, edit metadata, clear, and delete."},sessionsFiltersTitle:{zh:"筛选",en:"Filters"},sessionsFiltersDescription:{zh:"按关键词、活跃窗口和分组方式筛选会话。",en:"Filter sessions by query, activity window, and grouping mode."},sessionsSearchPlaceholder:{zh:"搜索 key 或标签",en:"Search session key or label"},sessionsActiveMinutesPlaceholder:{zh:"活跃分钟(0=不限)",en:"Active minutes (0 = no limit)"},sessionsLimitPlaceholder:{zh:"展示上限",en:"Limit"},sessionsGroupModeLabel:{zh:"分组方式",en:"Grouping"},sessionsGroupModeAll:{zh:"不分组 / 全部",en:"All (No grouping)"},sessionsGroupModeByChannel:{zh:"按渠道分组",en:"Group by channel"},sessionsListTitle:{zh:"会话列表",en:"Session list"},sessionsTotalLabel:{zh:"总数",en:"Total"},sessionsCurrentLabel:{zh:"当前展示",en:"Showing"},sessionsLoading:{zh:"加载会话中...",en:"Loading sessions..."},sessionsEmpty:{zh:"暂无会话。",en:"No sessions yet."},sessionsKeyLabel:{zh:"键",en:"Key"},sessionsChannelLabel:{zh:"渠道",en:"Channel"},sessionsMessagesLabel:{zh:"消息数",en:"Messages"},sessionsUpdatedLabel:{zh:"更新时间",en:"Updated"},sessionsLastRoleLabel:{zh:"最后角色",en:"Last Role"},sessionsLabelPlaceholder:{zh:"会话标签(可选)",en:"Session label (optional)"},sessionsModelPlaceholder:{zh:"偏好模型(可选)",en:"Preferred model (optional)"},sessionsShowHistory:{zh:"查看历史",en:"View history"},sessionsHideHistory:{zh:"隐藏历史",en:"Hide history"},sessionsSaveMeta:{zh:"保存元信息",en:"Save metadata"},sessionsClearHistory:{zh:"清空历史",en:"Clear history"},sessionsDeleteConfirm:{zh:"确认删除会话",en:"Delete session"},sessionsHistoryTitle:{zh:"历史",en:"History"},sessionsHistoryDescription:{zh:"最近 200 条消息(展示窗口)。",en:"Latest 200 messages (display window)."},sessionsHistoryLoading:{zh:"加载历史中...",en:"Loading history..."},sessionsApplyingChanges:{zh:"正在应用会话变更...",en:"Applying session changes..."},sessionsUnknownChannel:{zh:"未知渠道",en:"Unknown channel"},saveVerifyConnect:{zh:"保存并验证 / 连接",en:"Save & Verify / Connect"},connected:{zh:"已连接",en:"Connected"},disconnected:{zh:"未连接",en:"Disconnected"},connecting:{zh:"连接中...",en:"Connecting..."},feishuConnecting:{zh:"验证 / 连接中...",en:"Verifying / connecting..."},configSaved:{zh:"配置已保存",en:"Configuration saved"},configSavedApplied:{zh:"配置已保存并已应用",en:"Configuration saved and applied"},configSaveFailed:{zh:"保存配置失败",en:"Failed to save configuration"},configReloaded:{zh:"配置已重载",en:"Configuration reloaded"},configReloadFailed:{zh:"重载配置失败",en:"Failed to reload configuration"},feishuVerifySuccess:{zh:"验证成功,请到飞书开放平台完成事件订阅与发布后再开始使用。",en:"Verified. Please finish Feishu event subscription and app publishing before using."},feishuVerifyFailed:{zh:"验证失败",en:"Verification failed"},enterTag:{zh:"输入后按回车...",en:"Type and press Enter..."},headerName:{zh:"Header 名称",en:"Header Name"},headerValue:{zh:"Header 值",en:"Header Value"}};function B(n,r="en"){var s,i;return((s=dp[n])==null?void 0:s[r])||((i=dp[n])==null?void 0:i.en)||n}/**
|
|
52
|
-
* @license lucide-react v0.462.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Pw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fm=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.462.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
|
-
*/var Rw={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"};/**
|
|
62
|
-
* @license lucide-react v0.462.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
|
-
*/const jw=y.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:u="",children:d,iconNode:p,...h},v)=>y.createElement("svg",{ref:v,...Rw,width:r,height:r,stroke:n,strokeWidth:i?Number(s)*24/Number(r):s,className:Fm("lucide",u),...h},[...p.map(([g,w])=>y.createElement(g,w)),...Array.isArray(d)?d:[d]]));/**
|
|
67
|
-
* @license lucide-react v0.462.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 Oe=(n,r)=>{const s=y.forwardRef(({className:i,...u},d)=>y.createElement(jw,{ref:d,iconNode:r,className:Fm(`lucide-${Pw(n)}`,i),...u}));return s.displayName=`${n}`,s};/**
|
|
72
|
-
* @license lucide-react v0.462.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 Um=Oe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
77
|
-
* @license lucide-react v0.462.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 Mw=Oe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
82
|
-
* @license lucide-react v0.462.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 Tw=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
87
|
-
* @license lucide-react v0.462.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 Lw=Oe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
92
|
-
* @license lucide-react v0.462.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 Iw=Oe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
97
|
-
* @license lucide-react v0.462.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 Ow=Oe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
102
|
-
* @license lucide-react v0.462.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 zw=Oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
107
|
-
* @license lucide-react v0.462.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 _w=Oe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
112
|
-
* @license lucide-react v0.462.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 Dw=Oe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
117
|
-
* @license lucide-react v0.462.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 Bm=Oe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
122
|
-
* @license lucide-react v0.462.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 Ec=Oe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
127
|
-
* @license lucide-react v0.462.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 Aw=Oe("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
132
|
-
* @license lucide-react v0.462.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 Zi=Oe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
137
|
-
* @license lucide-react v0.462.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 Fw=Oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
142
|
-
* @license lucide-react v0.462.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 Vc=Oe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
147
|
-
* @license lucide-react v0.462.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 Qi=Oe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
|
|
152
|
-
* @license lucide-react v0.462.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 Qc=Oe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
157
|
-
* @license lucide-react v0.462.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 Nc=Oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
162
|
-
* @license lucide-react v0.462.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 Uw=Oe("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
167
|
-
* @license lucide-react v0.462.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 Bw=Oe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
172
|
-
* @license lucide-react v0.462.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 $m=Oe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
177
|
-
* @license lucide-react v0.462.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 $w=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
182
|
-
* @license lucide-react v0.462.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 Wm=Oe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
187
|
-
* @license lucide-react v0.462.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 Ww=Oe("Slack",[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]]);/**
|
|
192
|
-
* @license lucide-react v0.462.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 Hw=Oe("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
|
197
|
-
* @license lucide-react v0.462.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 Hm=Oe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
202
|
-
* @license lucide-react v0.462.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 Vw=Oe("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
|
|
207
|
-
* @license lucide-react v0.462.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 el=Oe("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"}]]);/**
|
|
212
|
-
* @license lucide-react v0.462.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 Vm=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
217
|
-
* @license lucide-react v0.462.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 Qw=Oe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Kw=[{target:"/model",label:"Models",icon:Lw},{target:"/providers",label:"Providers",icon:Hm},{target:"/channels",label:"Channels",icon:Qc},{target:"/runtime",label:"Routing & Runtime",icon:Dw},{target:"/sessions",label:B("sessions"),icon:Aw}];function qw(){return f.jsxs("aside",{className:"w-[240px] bg-transparent flex flex-col h-full py-6 px-4",children:[f.jsx("div",{className:"px-3 mb-8",children:f.jsxs("div",{className:"flex items-center gap-2.5 group cursor-pointer",children:[f.jsx("div",{className:"h-7 w-7 rounded-lg overflow-hidden flex items-center justify-center transition-transform duration-fast group-hover:scale-110",children:f.jsx("img",{src:"/logo.svg",alt:"NextClaw",className:"h-full w-full object-contain"})}),f.jsx("span",{className:"text-[15px] font-bold bg-gradient-to-r from-primary to-indigo-500 bg-clip-text text-transparent tracking-[-0.02em]",children:"NextClaw"})]})}),f.jsx("nav",{className:"flex-1",children:f.jsx("ul",{className:"space-y-1",children:Kw.map(n=>{const r=n.icon;return f.jsx("li",{children:f.jsx(ym,{to:n.target,className:({isActive:s})=>Me("group w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-fast",s?"bg-primary-100 text-primary-700":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"),children:({isActive:s})=>f.jsxs(f.Fragment,{children:[f.jsx(r,{className:Me("h-4 w-4 transition-transform duration-fast group-hover:scale-110",s?"text-primary":"text-gray-500")}),f.jsx("span",{className:"flex-1 text-left",children:n.label})]})})},n.target)})})})]})}function Gw({children:n}){return f.jsxs("div",{className:"h-screen flex bg-[hsl(40,20%,98%)] p-2",children:[f.jsx(qw,{}),f.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-white rounded-[2rem] shadow-sm overflow-hidden border border-[hsl(40,10%,94%)]",children:f.jsx("main",{className:"flex-1 overflow-auto custom-scrollbar p-8",children:f.jsx("div",{className:"max-w-6xl mx-auto animate-fade-in h-full",children:n})})})]})}const fp=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,hp=Im,Yw=(n,r)=>s=>{var i;if((r==null?void 0:r.variants)==null)return hp(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:u,defaultVariants:d}=r,p=Object.keys(u).map(g=>{const w=s==null?void 0:s[g],S=d==null?void 0:d[g];if(w===null)return null;const C=fp(w)||fp(S);return u[g][C]}),h=s&&Object.entries(s).reduce((g,w)=>{let[S,C]=w;return C===void 0||(g[S]=C),g},{}),v=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((g,w)=>{let{class:S,className:C,...x}=w;return Object.entries(x).every(z=>{let[b,E]=z;return Array.isArray(E)?E.includes({...d,...h}[b]):{...d,...h}[b]===E})?[...g,S,C]:g},[]);return hp(n,p,v,s==null?void 0:s.class,s==null?void 0:s.className)},Xw=Yw("inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-all duration-fast 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-600 active:bg-primary-700 shadow-sm",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-secondary hover:text-secondary-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-gray-200",ghost:"hover:bg-secondary hover:text-secondary-foreground",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm",subtle:"bg-secondary text-secondary-foreground hover:bg-gray-200","primary-outline":"border-2 border-primary text-primary hover:bg-primary hover:text-primary-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-12 rounded-xl px-6 text-base",xl:"h-14 rounded-xl px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Xe=y.forwardRef(({className:n,variant:r,size:s,...i},u)=>f.jsx("button",{className:Me(Xw({variant:r,size:s,className:n})),ref:u,...i}));Xe.displayName="Button";const Hn=y.forwardRef(({className:n,hover:r=!0,...s},i)=>f.jsx("div",{ref:i,className:Me("rounded-xl border border-gray-200 bg-white text-card-foreground shadow-card transition-all duration-base",r&&"hover:shadow-card-hover hover:border-gray-300",n),...s}));Hn.displayName="Card";const oo=y.forwardRef(({className:n,...r},s)=>f.jsx("div",{ref:s,className:Me("flex flex-col space-y-2 p-6",n),...r}));oo.displayName="CardHeader";const so=y.forwardRef(({className:n,...r},s)=>f.jsx("h3",{ref:s,className:Me("text-lg font-semibold leading-tight tracking-tight text-gray-900",n),...r}));so.displayName="CardTitle";const ao=y.forwardRef(({className:n,...r},s)=>f.jsx("p",{ref:s,className:Me("text-sm text-gray-500 leading-relaxed",n),...r}));ao.displayName="CardDescription";const io=y.forwardRef(({className:n,...r},s)=>f.jsx("div",{ref:s,className:Me("p-6 pt-0",n),...r}));io.displayName="CardContent";const Jw=y.forwardRef(({className:n,...r},s)=>f.jsx("div",{ref:s,className:Me("flex items-center justify-between p-6 pt-0",n),...r}));Jw.displayName="CardFooter";const De=y.forwardRef(({className:n,type:r,...s},i)=>f.jsx("input",{type:r,className:Me("flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),ref:i,...s}));De.displayName="Input";const $n=y.forwardRef(({className:n,...r},s)=>f.jsx("label",{ref:s,className:Me("text-sm font-medium leading-none text-gray-700 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...r}));$n.displayName="Label";function rn({className:n,...r}){return f.jsx("div",{className:Me("animate-pulse rounded-md bg-slate-200",n),...r})}const Zw="http://127.0.0.1:18791",Ki=(()=>{var n;return typeof window<"u"&&((n=window.location)!=null&&n.origin)?window.location.origin:Zw})();async function _i(n,r={}){const s=`${Ki}${n}`,i=await fetch(s,{headers:{"Content-Type":"application/json",...r.headers},...r}),u=await i.text();let d=null;if(u)try{d=JSON.parse(u)}catch{}if(!d){const p=u?u.slice(0,200):"";return{ok:!1,error:{code:"INVALID_RESPONSE",message:`Non-JSON response (${i.status} ${i.statusText})${p?`: ${p}`:""}`}}}return i.ok,d}const Kt={get:n=>_i(n,{method:"GET"}),put:(n,r)=>_i(n,{method:"PUT",body:JSON.stringify(r)}),post:(n,r)=>_i(n,{method:"POST",body:JSON.stringify(r)}),delete:n=>_i(n,{method:"DELETE"})};async function e1(){const n=await Kt.get("/api/config");if(!n.ok)throw new Error(n.error.message);return n.data}async function t1(){const n=await Kt.get("/api/config/meta");if(!n.ok)throw new Error(n.error.message);return n.data}async function n1(){const n=await Kt.get("/api/config/schema");if(!n.ok)throw new Error(n.error.message);return n.data}async function r1(n){const r=await Kt.put("/api/config/model",n);if(!r.ok)throw new Error(r.error.message);return r.data}async function o1(n,r){const s=await Kt.put(`/api/config/providers/${n}`,r);if(!s.ok)throw new Error(s.error.message);return s.data}async function s1(n,r){const s=await Kt.put(`/api/config/channels/${n}`,r);if(!s.ok)throw new Error(s.error.message);return s.data}async function a1(n){const r=await Kt.put("/api/config/runtime",n);if(!r.ok)throw new Error(r.error.message);return r.data}async function i1(n,r){const s=await Kt.post(`/api/config/actions/${n}/execute`,r);if(!s.ok)throw new Error(s.error.message);return s.data}async function l1(n){var u;const r=new URLSearchParams;(u=n==null?void 0:n.q)!=null&&u.trim()&&r.set("q",n.q.trim()),typeof(n==null?void 0:n.limit)=="number"&&Number.isFinite(n.limit)&&r.set("limit",String(Math.max(0,Math.trunc(n.limit)))),typeof(n==null?void 0:n.activeMinutes)=="number"&&Number.isFinite(n.activeMinutes)&&r.set("activeMinutes",String(Math.max(0,Math.trunc(n.activeMinutes))));const s=r.toString(),i=await Kt.get(s?"/api/sessions?"+s:"/api/sessions");if(!i.ok)throw new Error(i.error.message);return i.data}async function u1(n,r=200){const s=await Kt.get(`/api/sessions/${encodeURIComponent(n)}/history?limit=${Math.max(1,Math.trunc(r))}`);if(!s.ok)throw new Error(s.error.message);return s.data}async function c1(n,r){const s=await Kt.put(`/api/sessions/${encodeURIComponent(n)}`,r);if(!s.ok)throw new Error(s.error.message);return s.data}async function d1(n){const r=await Kt.delete(`/api/sessions/${encodeURIComponent(n)}`);if(!r.ok)throw new Error(r.error.message);return r.data}var f1=n=>{switch(n){case"success":return m1;case"info":return y1;case"warning":return g1;case"error":return v1;default:return null}},h1=Array(12).fill(0),p1=({visible:n,className:r})=>te.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},te.createElement("div",{className:"sonner-spinner"},h1.map((s,i)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),m1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),g1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),y1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),v1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),x1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),w1=()=>{let[n,r]=te.useState(document.hidden);return te.useEffect(()=>{let s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n},Pc=1,b1=class{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{let r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;let{message:s,...i}=n,u=typeof(n==null?void 0:n.id)=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Pc++,d=this.toasts.find(h=>h.id===u),p=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),d?this.toasts=this.toasts.map(h=>h.id===u?(this.publish({...h,...n,id:u,title:s}),{...h,...n,id:u,dismissible:p,title:s}):h):this.addToast({title:s,...i,dismissible:p,id:u}),u},this.dismiss=n=>(this.dismissedToasts.add(n),n||this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:n,dismiss:!0})),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let i=n instanceof Promise?n:n(),u=s!==void 0,d,p=i.then(async v=>{if(d=["resolve",v],te.isValidElement(v))u=!1,this.create({id:s,type:"default",message:v});else if(k1(v)&&!v.ok){u=!1;let g=typeof r.error=="function"?await r.error(`HTTP error! status: ${v.status}`):r.error,w=typeof r.description=="function"?await r.description(`HTTP error! status: ${v.status}`):r.description;this.create({id:s,type:"error",message:g,description:w})}else if(r.success!==void 0){u=!1;let g=typeof r.success=="function"?await r.success(v):r.success,w=typeof r.description=="function"?await r.description(v):r.description;this.create({id:s,type:"success",message:g,description:w})}}).catch(async v=>{if(d=["reject",v],r.error!==void 0){u=!1;let g=typeof r.error=="function"?await r.error(v):r.error,w=typeof r.description=="function"?await r.description(v):r.description;this.create({id:s,type:"error",message:g,description:w})}}).finally(()=>{var v;u&&(this.dismiss(s),s=void 0),(v=r.finally)==null||v.call(r)}),h=()=>new Promise((v,g)=>p.then(()=>d[0]==="reject"?g(d[1]):v(d[1])).catch(g));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(n,r)=>{let s=(r==null?void 0:r.id)||Pc++;return this.create({jsx:n(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Lt=new b1,S1=(n,r)=>{let s=(r==null?void 0:r.id)||Pc++;return Lt.addToast({title:n,...r,id:s}),s},k1=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",C1=S1,E1=()=>Lt.toasts,N1=()=>Lt.getActiveToasts(),tt=Object.assign(C1,{success:Lt.success,info:Lt.info,warning:Lt.warning,error:Lt.error,custom:Lt.custom,message:Lt.message,promise:Lt.promise,dismiss:Lt.dismiss,loading:Lt.loading},{getHistory:E1,getToasts:N1});function P1(n,{insertAt:r}={}){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n))}P1(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
222
|
-
`);function Di(n){return n.label!==void 0}var R1=3,j1="32px",M1="16px",pp=4e3,T1=356,L1=14,I1=20,O1=200;function on(...n){return n.filter(Boolean).join(" ")}function z1(n){let[r,s]=n.split("-"),i=[];return r&&i.push(r),s&&i.push(s),i}var _1=n=>{var r,s,i,u,d,p,h,v,g,w,S;let{invert:C,toast:x,unstyled:z,interacting:b,setHeights:E,visibleToasts:_,heights:U,index:I,toasts:F,expanded:q,removeToast:ee,defaultRichColors:V,closeButton:re,style:$,cancelButtonStyle:X,actionButtonStyle:M,className:T="",descriptionClassName:G="",duration:ne,position:ie,gap:Se,loadingIcon:we,expandByDefault:Z,classNames:K,icons:J,closeButtonAriaLabel:j="Close toast",pauseWhenPageIsHidden:A}=n,[ae,de]=te.useState(null),[ye,Ce]=te.useState(null),[ge,Pe]=te.useState(!1),[Le,nt]=te.useState(!1),[cn,po]=te.useState(!1),[Ir,hs]=te.useState(!1),[va,ps]=te.useState(!1),[ms,mo]=te.useState(0),[gs,Gn]=te.useState(0),At=te.useRef(x.duration||ne||pp),go=te.useRef(null),dn=te.useRef(null),xa=I===0,wa=I+1<=_,gt=x.type,fn=x.dismissible!==!1,yo=x.className||"",ba=x.descriptionClassName||"",hn=te.useMemo(()=>U.findIndex(xe=>xe.toastId===x.id)||0,[U,x.id]),Or=te.useMemo(()=>{var xe;return(xe=x.closeButton)!=null?xe:re},[x.closeButton,re]),Sa=te.useMemo(()=>x.duration||ne||pp,[x.duration,ne]),vo=te.useRef(0),Pn=te.useRef(0),ka=te.useRef(0),pn=te.useRef(null),[ys,vs]=ie.split("-"),xo=te.useMemo(()=>U.reduce((xe,Te,_e)=>_e>=hn?xe:xe+Te.height,0),[U,hn]),wo=w1(),Yn=x.invert||C,mn=gt==="loading";Pn.current=te.useMemo(()=>hn*Se+xo,[hn,xo]),te.useEffect(()=>{At.current=Sa},[Sa]),te.useEffect(()=>{Pe(!0)},[]),te.useEffect(()=>{let xe=dn.current;if(xe){let Te=xe.getBoundingClientRect().height;return Gn(Te),E(_e=>[{toastId:x.id,height:Te,position:x.position},..._e]),()=>E(_e=>_e.filter(yt=>yt.toastId!==x.id))}},[E,x.id]),te.useLayoutEffect(()=>{if(!ge)return;let xe=dn.current,Te=xe.style.height;xe.style.height="auto";let _e=xe.getBoundingClientRect().height;xe.style.height=Te,Gn(_e),E(yt=>yt.find(St=>St.toastId===x.id)?yt.map(St=>St.toastId===x.id?{...St,height:_e}:St):[{toastId:x.id,height:_e,position:x.position},...yt])},[ge,x.title,x.description,E,x.id]);let qt=te.useCallback(()=>{nt(!0),mo(Pn.current),E(xe=>xe.filter(Te=>Te.toastId!==x.id)),setTimeout(()=>{ee(x)},O1)},[x,ee,E,Pn]);te.useEffect(()=>{if(x.promise&>==="loading"||x.duration===1/0||x.type==="loading")return;let xe;return q||b||A&&wo?(()=>{if(ka.current<vo.current){let Te=new Date().getTime()-vo.current;At.current=At.current-Te}ka.current=new Date().getTime()})():At.current!==1/0&&(vo.current=new Date().getTime(),xe=setTimeout(()=>{var Te;(Te=x.onAutoClose)==null||Te.call(x,x),qt()},At.current)),()=>clearTimeout(xe)},[q,b,x,gt,A,wo,qt]),te.useEffect(()=>{x.delete&&qt()},[qt,x.delete]);function Ca(){var xe,Te,_e;return J!=null&&J.loading?te.createElement("div",{className:on(K==null?void 0:K.loader,(xe=x==null?void 0:x.classNames)==null?void 0:xe.loader,"sonner-loader"),"data-visible":gt==="loading"},J.loading):we?te.createElement("div",{className:on(K==null?void 0:K.loader,(Te=x==null?void 0:x.classNames)==null?void 0:Te.loader,"sonner-loader"),"data-visible":gt==="loading"},we):te.createElement(p1,{className:on(K==null?void 0:K.loader,(_e=x==null?void 0:x.classNames)==null?void 0:_e.loader),visible:gt==="loading"})}return te.createElement("li",{tabIndex:0,ref:dn,className:on(T,yo,K==null?void 0:K.toast,(r=x==null?void 0:x.classNames)==null?void 0:r.toast,K==null?void 0:K.default,K==null?void 0:K[gt],(s=x==null?void 0:x.classNames)==null?void 0:s[gt]),"data-sonner-toast":"","data-rich-colors":(i=x.richColors)!=null?i:V,"data-styled":!(x.jsx||x.unstyled||z),"data-mounted":ge,"data-promise":!!x.promise,"data-swiped":va,"data-removed":Le,"data-visible":wa,"data-y-position":ys,"data-x-position":vs,"data-index":I,"data-front":xa,"data-swiping":cn,"data-dismissible":fn,"data-type":gt,"data-invert":Yn,"data-swipe-out":Ir,"data-swipe-direction":ye,"data-expanded":!!(q||Z&&ge),style:{"--index":I,"--toasts-before":I,"--z-index":F.length-I,"--offset":`${Le?ms:Pn.current}px`,"--initial-height":Z?"auto":`${gs}px`,...$,...x.style},onDragEnd:()=>{po(!1),de(null),pn.current=null},onPointerDown:xe=>{mn||!fn||(go.current=new Date,mo(Pn.current),xe.target.setPointerCapture(xe.pointerId),xe.target.tagName!=="BUTTON"&&(po(!0),pn.current={x:xe.clientX,y:xe.clientY}))},onPointerUp:()=>{var xe,Te,_e,yt;if(Ir||!fn)return;pn.current=null;let St=Number(((xe=dn.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),kt=Number(((Te=dn.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Gt=new Date().getTime()-((_e=go.current)==null?void 0:_e.getTime()),it=ae==="x"?St:kt,gn=Math.abs(it)/Gt;if(Math.abs(it)>=I1||gn>.11){mo(Pn.current),(yt=x.onDismiss)==null||yt.call(x,x),Ce(ae==="x"?St>0?"right":"left":kt>0?"down":"up"),qt(),hs(!0),ps(!1);return}po(!1),de(null)},onPointerMove:xe=>{var Te,_e,yt,St;if(!pn.current||!fn||((Te=window.getSelection())==null?void 0:Te.toString().length)>0)return;let kt=xe.clientY-pn.current.y,Gt=xe.clientX-pn.current.x,it=(_e=n.swipeDirections)!=null?_e:z1(ie);!ae&&(Math.abs(Gt)>1||Math.abs(kt)>1)&&de(Math.abs(Gt)>Math.abs(kt)?"x":"y");let gn={x:0,y:0};ae==="y"?(it.includes("top")||it.includes("bottom"))&&(it.includes("top")&&kt<0||it.includes("bottom")&&kt>0)&&(gn.y=kt):ae==="x"&&(it.includes("left")||it.includes("right"))&&(it.includes("left")&&Gt<0||it.includes("right")&&Gt>0)&&(gn.x=Gt),(Math.abs(gn.x)>0||Math.abs(gn.y)>0)&&ps(!0),(yt=dn.current)==null||yt.style.setProperty("--swipe-amount-x",`${gn.x}px`),(St=dn.current)==null||St.style.setProperty("--swipe-amount-y",`${gn.y}px`)}},Or&&!x.jsx?te.createElement("button",{"aria-label":j,"data-disabled":mn,"data-close-button":!0,onClick:mn||!fn?()=>{}:()=>{var xe;qt(),(xe=x.onDismiss)==null||xe.call(x,x)},className:on(K==null?void 0:K.closeButton,(u=x==null?void 0:x.classNames)==null?void 0:u.closeButton)},(d=J==null?void 0:J.close)!=null?d:x1):null,x.jsx||y.isValidElement(x.title)?x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title:te.createElement(te.Fragment,null,gt||x.icon||x.promise?te.createElement("div",{"data-icon":"",className:on(K==null?void 0:K.icon,(p=x==null?void 0:x.classNames)==null?void 0:p.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||Ca():null,x.type!=="loading"?x.icon||(J==null?void 0:J[gt])||f1(gt):null):null,te.createElement("div",{"data-content":"",className:on(K==null?void 0:K.content,(h=x==null?void 0:x.classNames)==null?void 0:h.content)},te.createElement("div",{"data-title":"",className:on(K==null?void 0:K.title,(v=x==null?void 0:x.classNames)==null?void 0:v.title)},typeof x.title=="function"?x.title():x.title),x.description?te.createElement("div",{"data-description":"",className:on(G,ba,K==null?void 0:K.description,(g=x==null?void 0:x.classNames)==null?void 0:g.description)},typeof x.description=="function"?x.description():x.description):null),y.isValidElement(x.cancel)?x.cancel:x.cancel&&Di(x.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||X,onClick:xe=>{var Te,_e;Di(x.cancel)&&fn&&((_e=(Te=x.cancel).onClick)==null||_e.call(Te,xe),qt())},className:on(K==null?void 0:K.cancelButton,(w=x==null?void 0:x.classNames)==null?void 0:w.cancelButton)},x.cancel.label):null,y.isValidElement(x.action)?x.action:x.action&&Di(x.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||M,onClick:xe=>{var Te,_e;Di(x.action)&&((_e=(Te=x.action).onClick)==null||_e.call(Te,xe),!xe.defaultPrevented&&qt())},className:on(K==null?void 0:K.actionButton,(S=x==null?void 0:x.classNames)==null?void 0:S.actionButton)},x.action.label):null))};function mp(){if(typeof window>"u"||typeof document>"u")return"ltr";let n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function D1(n,r){let s={};return[n,r].forEach((i,u)=>{let d=u===1,p=d?"--mobile-offset":"--offset",h=d?M1:j1;function v(g){["top","right","bottom","left"].forEach(w=>{s[`${p}-${w}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?s[`${p}-${g}`]=h:s[`${p}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):v(h)}),s}var A1=y.forwardRef(function(n,r){let{invert:s,position:i="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:p,className:h,offset:v,mobileOffset:g,theme:w="light",richColors:S,duration:C,style:x,visibleToasts:z=R1,toastOptions:b,dir:E=mp(),gap:_=L1,loadingIcon:U,icons:I,containerAriaLabel:F="Notifications",pauseWhenPageIsHidden:q}=n,[ee,V]=te.useState([]),re=te.useMemo(()=>Array.from(new Set([i].concat(ee.filter(A=>A.position).map(A=>A.position)))),[ee,i]),[$,X]=te.useState([]),[M,T]=te.useState(!1),[G,ne]=te.useState(!1),[ie,Se]=te.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),we=te.useRef(null),Z=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=te.useRef(null),J=te.useRef(!1),j=te.useCallback(A=>{V(ae=>{var de;return(de=ae.find(ye=>ye.id===A.id))!=null&&de.delete||Lt.dismiss(A.id),ae.filter(({id:ye})=>ye!==A.id)})},[]);return te.useEffect(()=>Lt.subscribe(A=>{if(A.dismiss){V(ae=>ae.map(de=>de.id===A.id?{...de,delete:!0}:de));return}setTimeout(()=>{wm.flushSync(()=>{V(ae=>{let de=ae.findIndex(ye=>ye.id===A.id);return de!==-1?[...ae.slice(0,de),{...ae[de],...A},...ae.slice(de+1)]:[A,...ae]})})})}),[]),te.useEffect(()=>{if(w!=="system"){Se(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Se("dark"):Se("light")),typeof window>"u")return;let A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:ae})=>{Se(ae?"dark":"light")})}catch{A.addListener(({matches:de})=>{try{Se(de?"dark":"light")}catch(ye){console.error(ye)}})}},[w]),te.useEffect(()=>{ee.length<=1&&T(!1)},[ee]),te.useEffect(()=>{let A=ae=>{var de,ye;u.every(Ce=>ae[Ce]||ae.code===Ce)&&(T(!0),(de=we.current)==null||de.focus()),ae.code==="Escape"&&(document.activeElement===we.current||(ye=we.current)!=null&&ye.contains(document.activeElement))&&T(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[u]),te.useEffect(()=>{if(we.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,J.current=!1)}},[we.current]),te.createElement("section",{ref:r,"aria-label":`${F} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},re.map((A,ae)=>{var de;let[ye,Ce]=A.split("-");return ee.length?te.createElement("ol",{key:A,dir:E==="auto"?mp():E,tabIndex:-1,ref:we,className:h,"data-sonner-toaster":!0,"data-theme":ie,"data-y-position":ye,"data-lifted":M&&ee.length>1&&!d,"data-x-position":Ce,style:{"--front-toast-height":`${((de=$[0])==null?void 0:de.height)||0}px`,"--width":`${T1}px`,"--gap":`${_}px`,...x,...D1(v,g)},onBlur:ge=>{J.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(J.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||J.current||(J.current=!0,K.current=ge.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{G||T(!1)},onDragEnd:()=>T(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},ee.filter(ge=>!ge.position&&ae===0||ge.position===A).map((ge,Pe)=>{var Le,nt;return te.createElement(_1,{key:ge.id,icons:I,index:Pe,toast:ge,defaultRichColors:S,duration:(Le=b==null?void 0:b.duration)!=null?Le:C,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:z,closeButton:(nt=b==null?void 0:b.closeButton)!=null?nt:p,interacting:G,position:A,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,removeToast:j,toasts:ee.filter(cn=>cn.position==ge.position),heights:$.filter(cn=>cn.position==ge.position),setHeights:X,expandByDefault:d,gap:_,loadingIcon:U,expanded:M,pauseWhenPageIsHidden:q,swipeDirections:n.swipeDirections})})):null}))});function ds(){return ga({queryKey:["config"],queryFn:e1,staleTime:3e4,refetchOnWindowFocus:!0})}function Kc(){return ga({queryKey:["config-meta"],queryFn:t1,staleTime:1/0})}function fs(){return ga({queryKey:["config-schema"],queryFn:n1,staleTime:1/0})}function F1(){const n=Lr();return fo({mutationFn:r1,onSuccess:()=>{n.invalidateQueries({queryKey:["config"]}),tt.success(B("configSaved"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function U1(){const n=Lr();return fo({mutationFn:({provider:r,data:s})=>o1(r,s),onSuccess:()=>{n.invalidateQueries({queryKey:["config"]}),tt.success(B("configSaved"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function B1(){const n=Lr();return fo({mutationFn:({channel:r,data:s})=>s1(r,s),onSuccess:()=>{n.invalidateQueries({queryKey:["config"]}),tt.success(B("configSavedApplied"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function $1(){const n=Lr();return fo({mutationFn:({data:r})=>a1(r),onSuccess:()=>{n.invalidateQueries({queryKey:["config"]}),tt.success(B("configSavedApplied"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function W1(){return fo({mutationFn:({actionId:n,data:r})=>i1(n,r),onError:n=>{tt.error(B("error")+": "+n.message)}})}function H1(n){return ga({queryKey:["sessions",n],queryFn:()=>l1(n),staleTime:1e4})}function V1(n,r=200){return ga({queryKey:["session-history",n,r],queryFn:()=>u1(n,r),enabled:!!n,staleTime:5e3})}function Q1(){const n=Lr();return fo({mutationFn:({key:r,data:s})=>c1(r,s),onSuccess:(r,s)=>{n.invalidateQueries({queryKey:["sessions"]}),n.invalidateQueries({queryKey:["session-history",s.key]}),tt.success(B("configSavedApplied"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function K1(){const n=Lr();return fo({mutationFn:({key:r})=>d1(r),onSuccess:()=>{n.invalidateQueries({queryKey:["sessions"]}),n.invalidateQueries({queryKey:["session-history"]}),tt.success(B("configSavedApplied"))},onError:r=>{tt.error(B("configSaveFailed")+": "+r.message)}})}function q1(n){return Array.isArray(n)?n.filter(r=>typeof r=="string").join("."):n}function ct(n,r){if(!r)return;const s=q1(n),i=r[s];if(i)return i;const u=s.split(".");for(const[d,p]of Object.entries(r)){if(!d.includes("*"))continue;const h=d.split(".");if(h.length!==u.length)continue;let v=!0;for(let g=0;g<u.length;g+=1)if(h[g]!=="*"&&h[g]!==u[g]){v=!1;break}if(v)return p}}function G1(){const{data:n,isLoading:r}=ds(),{data:s}=fs(),i=F1(),[u,d]=y.useState(""),[p,h]=y.useState(""),[v,g]=y.useState(8192),w=s==null?void 0:s.uiHints,S=ct("agents.defaults.model",w),C=ct("agents.defaults.workspace",w),x=ct("agents.defaults.maxTokens",w);y.useEffect(()=>{var b;(b=n==null?void 0:n.agents)!=null&&b.defaults&&(d(n.agents.defaults.model||""),h(n.agents.defaults.workspace||""),g(n.agents.defaults.maxTokens||8192))},[n]);const z=b=>{b.preventDefault(),i.mutate({model:u})};return r?f.jsxs("div",{className:"max-w-2xl space-y-6",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(rn,{className:"h-8 w-32"}),f.jsx(rn,{className:"h-4 w-48"})]}),f.jsxs(Hn,{className:"rounded-2xl border-gray-200 p-6",children:[f.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[f.jsx(rn,{className:"h-12 w-12 rounded-xl"}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(rn,{className:"h-5 w-24"}),f.jsx(rn,{className:"h-3 w-32"})]})]}),f.jsx(rn,{className:"h-4 w-20 mb-2"}),f.jsx(rn,{className:"h-10 w-full rounded-xl"})]}),f.jsxs(Hn,{className:"rounded-2xl border-gray-200 p-6",children:[f.jsx(rn,{className:"h-5 w-24 mb-2"}),f.jsx(rn,{className:"h-3 w-40 mb-6"}),f.jsx("div",{className:"space-y-6",children:f.jsxs("div",{children:[f.jsx(rn,{className:"h-4 w-28 mb-3"}),f.jsx(rn,{className:"h-2 w-full rounded-full"})]})})]})]}):f.jsxs("div",{className:"max-w-4xl animate-fade-in pb-20",children:[f.jsxs("div",{className:"mb-10",children:[f.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Model Configuration"}),f.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Configure default AI model and runtime limits"})]}),f.jsxs("form",{onSubmit:z,className:"space-y-8",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[f.jsxs("div",{className:"p-8 rounded-2xl bg-gray-50 border border-gray-200",children:[f.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[f.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:f.jsx(Hm,{className:"h-5 w-5"})}),f.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Default Model"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx($n,{htmlFor:"model",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(S==null?void 0:S.label)??"Model Name"}),f.jsx(De,{id:"model",value:u,onChange:b=>d(b.target.value),placeholder:(S==null?void 0:S.placeholder)??"minimax/MiniMax-M2.1",className:"h-12 px-4 rounded-xl"}),f.jsx("p",{className:"text-xs text-gray-400",children:(S==null?void 0:S.help)??"Examples: minimax/MiniMax-M2.5 · minimax/MiniMax-M2.1 · openrouter/anthropic/claude-3.5-sonnet · openrouter/openai/gpt-4o-mini"})]})]}),f.jsxs("div",{className:"p-8 rounded-2xl bg-gray-50 border border-gray-200",children:[f.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[f.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:f.jsx(_w,{className:"h-5 w-5"})}),f.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Workspace"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx($n,{htmlFor:"workspace",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(C==null?void 0:C.label)??"Default Path"}),f.jsx(De,{id:"workspace",value:p,onChange:b=>h(b.target.value),placeholder:(C==null?void 0:C.placeholder)??"/path/to/workspace",className:"h-12 px-4 rounded-xl"})]})]})]}),f.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[f.jsxs("div",{className:"flex items-center gap-4 mb-10",children:[f.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:f.jsx(Hw,{className:"h-5 w-5"})}),f.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Generation Parameters"})]}),f.jsx("div",{className:"grid grid-cols-1 gap-12",children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex justify-between items-center mb-2",children:[f.jsx($n,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(x==null?void 0:x.label)??"Max Tokens"}),f.jsx("span",{className:"text-sm font-semibold text-gray-900",children:v.toLocaleString()})]}),f.jsx("input",{type:"range",min:"1000",max:"32000",step:"1000",value:v,onChange:b=>g(parseInt(b.target.value)),className:"w-full h-1 bg-gray-200 rounded-full appearance-none cursor-pointer accent-primary"})]})})]}),f.jsx("div",{className:"flex justify-end pt-4",children:f.jsx(Xe,{type:"submit",disabled:i.isPending,size:"lg",children:i.isPending?f.jsx(Fw,{className:"h-5 w-5 animate-spin"}):"Save Changes"})})]})]})}const gp=n=>{let r;const s=new Set,i=(g,w)=>{const S=typeof g=="function"?g(r):g;if(!Object.is(S,r)){const C=r;r=w??(typeof S!="object"||S===null)?S:Object.assign({},r,S),s.forEach(x=>x(r,C))}},u=()=>r,h={setState:i,getState:u,getInitialState:()=>v,subscribe:g=>(s.add(g),()=>s.delete(g))},v=r=n(i,u,h);return h},Y1=(n=>n?gp(n):gp),X1=n=>n;function J1(n,r=X1){const s=te.useSyncExternalStore(n.subscribe,te.useCallback(()=>r(n.getState()),[n,r]),te.useCallback(()=>r(n.getInitialState()),[n,r]));return te.useDebugValue(s),s}const yp=n=>{const r=Y1(n),s=i=>J1(r,i);return Object.assign(s,r),s},Z1=(n=>n?yp(n):yp),ya=Z1(n=>({connectionStatus:"disconnected",setConnectionStatus:r=>n({connectionStatus:r}),providerModal:{open:!1},openProviderModal:r=>n({providerModal:{open:!0,provider:r}}),closeProviderModal:()=>n({providerModal:{open:!1}}),channelModal:{open:!1},openChannelModal:r=>n({channelModal:{open:!0,channel:r}}),closeChannelModal:()=>n({channelModal:{open:!1}})}));function Tr(n,r,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n==null||n(u),s===!1||!u.defaultPrevented)return r==null?void 0:r(u)}}function vp(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function Qm(...n){return r=>{let s=!1;const i=n.map(u=>{const d=vp(u,r);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u<i.length;u++){const d=i[u];typeof d=="function"?d():vp(n[u],null)}}}}function ho(...n){return y.useCallback(Qm(...n),n)}function eb(n,r){const s=y.createContext(r),i=d=>{const{children:p,...h}=d,v=y.useMemo(()=>h,Object.values(h));return f.jsx(s.Provider,{value:v,children:p})};i.displayName=n+"Provider";function u(d){const p=y.useContext(s);if(p)return p;if(r!==void 0)return r;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[i,u]}function tb(n,r=[]){let s=[];function i(d,p){const h=y.createContext(p),v=s.length;s=[...s,p];const g=S=>{var _;const{scope:C,children:x,...z}=S,b=((_=C==null?void 0:C[n])==null?void 0:_[v])||h,E=y.useMemo(()=>z,Object.values(z));return f.jsx(b.Provider,{value:E,children:x})};g.displayName=d+"Provider";function w(S,C){var b;const x=((b=C==null?void 0:C[n])==null?void 0:b[v])||h,z=y.useContext(x);if(z)return z;if(p!==void 0)return p;throw new Error(`\`${S}\` must be used within \`${d}\``)}return[g,w]}const u=()=>{const d=s.map(p=>y.createContext(p));return function(h){const v=(h==null?void 0:h[n])||d;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:v}}),[h,v])}};return u.scopeName=n,[i,nb(u,...r)]}function nb(...n){const r=n[0];if(n.length===1)return r;const s=()=>{const i=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=i.reduce((h,{useScope:v,scopeName:g})=>{const S=v(d)[`__scope${g}`];return{...h,...S}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:p}),[p])}};return s.scopeName=r.scopeName,s}var aa=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},rb=Xp[" useId ".trim().toString()]||(()=>{}),ob=0;function Zu(n){const[r,s]=y.useState(rb());return aa(()=>{s(i=>i??String(ob++))},[n]),n||(r?`radix-${r}`:"")}var sb=Xp[" useInsertionEffect ".trim().toString()]||aa;function ab({prop:n,defaultProp:r,onChange:s=()=>{},caller:i}){const[u,d,p]=ib({defaultProp:r,onChange:s}),h=n!==void 0,v=h?n:u;{const w=y.useRef(n!==void 0);y.useEffect(()=>{const S=w.current;S!==h&&console.warn(`${i} is changing from ${S?"controlled":"uncontrolled"} to ${h?"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.`),w.current=h},[h,i])}const g=y.useCallback(w=>{var S;if(h){const C=lb(w)?w(n):w;C!==n&&((S=p.current)==null||S.call(p,C))}else d(w)},[h,n,d,p]);return[v,g]}function ib({defaultProp:n,onChange:r}){const[s,i]=y.useState(n),u=y.useRef(s),d=y.useRef(r);return sb(()=>{d.current=r},[r]),y.useEffect(()=>{var p;u.current!==s&&((p=d.current)==null||p.call(d,s),u.current=s)},[s,u]),[s,i,d]}function lb(n){return typeof n=="function"}function Km(n){const r=ub(n),s=y.forwardRef((i,u)=>{const{children:d,...p}=i,h=y.Children.toArray(d),v=h.find(db);if(v){const g=v.props.children,w=h.map(S=>S===v?y.Children.count(g)>1?y.Children.only(null):y.isValidElement(g)?g.props.children:null:S);return f.jsx(r,{...p,ref:u,children:y.isValidElement(g)?y.cloneElement(g,void 0,w):null})}return f.jsx(r,{...p,ref:u,children:d})});return s.displayName=`${n}.Slot`,s}function ub(n){const r=y.forwardRef((s,i)=>{const{children:u,...d}=s;if(y.isValidElement(u)){const p=hb(u),h=fb(d,u.props);return u.type!==y.Fragment&&(h.ref=i?Qm(i,p):p),y.cloneElement(u,h)}return y.Children.count(u)>1?y.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var cb=Symbol("radix.slottable");function db(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===cb}function fb(n,r){const s={...r};for(const i in r){const u=n[i],d=r[i];/^on[A-Z]/.test(i)?u&&d?s[i]=(...h)=>{const v=d(...h);return u(...h),v}:u&&(s[i]=u):i==="style"?s[i]={...u,...d}:i==="className"&&(s[i]=[u,d].filter(Boolean).join(" "))}return{...n,...s}}function hb(n){var i,u;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?n.ref:(r=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var pb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qn=pb.reduce((n,r)=>{const s=Km(`Primitive.${r}`),i=y.forwardRef((u,d)=>{const{asChild:p,...h}=u,v=p?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(v,{...h,ref:d})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{});function mb(n,r){n&&xm.flushSync(()=>n.dispatchEvent(r))}function ia(n){const r=y.useRef(n);return y.useEffect(()=>{r.current=n}),y.useMemo(()=>(...s)=>{var i;return(i=r.current)==null?void 0:i.call(r,...s)},[])}function gb(n,r=globalThis==null?void 0:globalThis.document){const s=ia(n);y.useEffect(()=>{const i=u=>{u.key==="Escape"&&s(u)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[s,r])}var yb="DismissableLayer",Rc="dismissableLayer.update",vb="dismissableLayer.pointerDownOutside",xb="dismissableLayer.focusOutside",xp,qm=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gm=y.forwardRef((n,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,...v}=n,g=y.useContext(qm),[w,S]=y.useState(null),C=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),z=ho(r,V=>S(V)),b=Array.from(g.layers),[E]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),_=b.indexOf(E),U=w?b.indexOf(w):-1,I=g.layersWithOutsidePointerEventsDisabled.size>0,F=U>=_,q=Sb(V=>{const re=V.target,$=[...g.branches].some(X=>X.contains(re));!F||$||(u==null||u(V),p==null||p(V),V.defaultPrevented||h==null||h())},C),ee=kb(V=>{const re=V.target;[...g.branches].some(X=>X.contains(re))||(d==null||d(V),p==null||p(V),V.defaultPrevented||h==null||h())},C);return gb(V=>{U===g.layers.size-1&&(i==null||i(V),!V.defaultPrevented&&h&&(V.preventDefault(),h()))},C),y.useEffect(()=>{if(w)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(xp=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(w)),g.layers.add(w),wp(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=xp)}},[w,C,s,g]),y.useEffect(()=>()=>{w&&(g.layers.delete(w),g.layersWithOutsidePointerEventsDisabled.delete(w),wp())},[w,g]),y.useEffect(()=>{const V=()=>x({});return document.addEventListener(Rc,V),()=>document.removeEventListener(Rc,V)},[]),f.jsx(qn.div,{...v,ref:z,style:{pointerEvents:I?F?"auto":"none":void 0,...n.style},onFocusCapture:Tr(n.onFocusCapture,ee.onFocusCapture),onBlurCapture:Tr(n.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:Tr(n.onPointerDownCapture,q.onPointerDownCapture)})});Gm.displayName=yb;var wb="DismissableLayerBranch",bb=y.forwardRef((n,r)=>{const s=y.useContext(qm),i=y.useRef(null),u=ho(r,i);return y.useEffect(()=>{const d=i.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),f.jsx(qn.div,{...n,ref:u})});bb.displayName=wb;function Sb(n,r=globalThis==null?void 0:globalThis.document){const s=ia(n),i=y.useRef(!1),u=y.useRef(()=>{});return y.useEffect(()=>{const d=h=>{if(h.target&&!i.current){let v=function(){Ym(vb,s,g,{discrete:!0})};const g={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=v,r.addEventListener("click",u.current,{once:!0})):v()}else r.removeEventListener("click",u.current);i.current=!1},p=window.setTimeout(()=>{r.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(p),r.removeEventListener("pointerdown",d),r.removeEventListener("click",u.current)}},[r,s]),{onPointerDownCapture:()=>i.current=!0}}function kb(n,r=globalThis==null?void 0:globalThis.document){const s=ia(n),i=y.useRef(!1);return y.useEffect(()=>{const u=d=>{d.target&&!i.current&&Ym(xb,s,{originalEvent:d},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function wp(){const n=new CustomEvent(Rc);document.dispatchEvent(n)}function Ym(n,r,s,{discrete:i}){const u=s.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});r&&u.addEventListener(n,r,{once:!0}),i?mb(u,d):u.dispatchEvent(d)}var ec="focusScope.autoFocusOnMount",tc="focusScope.autoFocusOnUnmount",bp={bubbles:!1,cancelable:!0},Cb="FocusScope",Xm=y.forwardRef((n,r)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=n,[h,v]=y.useState(null),g=ia(u),w=ia(d),S=y.useRef(null),C=ho(r,b=>v(b)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let b=function(I){if(x.paused||!h)return;const F=I.target;h.contains(F)?S.current=F:wr(S.current,{select:!0})},E=function(I){if(x.paused||!h)return;const F=I.relatedTarget;F!==null&&(h.contains(F)||wr(S.current,{select:!0}))},_=function(I){if(document.activeElement===document.body)for(const q of I)q.removedNodes.length>0&&wr(h)};document.addEventListener("focusin",b),document.addEventListener("focusout",E);const U=new MutationObserver(_);return h&&U.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",E),U.disconnect()}}},[i,h,x.paused]),y.useEffect(()=>{if(h){kp.add(x);const b=document.activeElement;if(!h.contains(b)){const _=new CustomEvent(ec,bp);h.addEventListener(ec,g),h.dispatchEvent(_),_.defaultPrevented||(Eb(Mb(Jm(h)),{select:!0}),document.activeElement===b&&wr(h))}return()=>{h.removeEventListener(ec,g),setTimeout(()=>{const _=new CustomEvent(tc,bp);h.addEventListener(tc,w),h.dispatchEvent(_),_.defaultPrevented||wr(b??document.body,{select:!0}),h.removeEventListener(tc,w),kp.remove(x)},0)}}},[h,g,w,x]);const z=y.useCallback(b=>{if(!s&&!i||x.paused)return;const E=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,_=document.activeElement;if(E&&_){const U=b.currentTarget,[I,F]=Nb(U);I&&F?!b.shiftKey&&_===F?(b.preventDefault(),s&&wr(I,{select:!0})):b.shiftKey&&_===I&&(b.preventDefault(),s&&wr(F,{select:!0})):_===U&&b.preventDefault()}},[s,i,x.paused]);return f.jsx(qn.div,{tabIndex:-1,...p,ref:C,onKeyDown:z})});Xm.displayName=Cb;function Eb(n,{select:r=!1}={}){const s=document.activeElement;for(const i of n)if(wr(i,{select:r}),document.activeElement!==s)return}function Nb(n){const r=Jm(n),s=Sp(r,n),i=Sp(r.reverse(),n);return[s,i]}function Jm(n){const r=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Sp(n,r){for(const s of n)if(!Pb(s,{upTo:r}))return s}function Pb(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function Rb(n){return n instanceof HTMLInputElement&&"select"in n}function wr(n,{select:r=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&Rb(n)&&r&&n.select()}}var kp=jb();function jb(){let n=[];return{add(r){const s=n[0];r!==s&&(s==null||s.pause()),n=Cp(n,r),n.unshift(r)},remove(r){var s;n=Cp(n,r),(s=n[0])==null||s.resume()}}}function Cp(n,r){const s=[...n],i=s.indexOf(r);return i!==-1&&s.splice(i,1),s}function Mb(n){return n.filter(r=>r.tagName!=="A")}var Tb="Portal",Zm=y.forwardRef((n,r)=>{var h;const{container:s,...i}=n,[u,d]=y.useState(!1);aa(()=>d(!0),[]);const p=s||u&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return p?wm.createPortal(f.jsx(qn.div,{...i,ref:r}),p):null});Zm.displayName=Tb;function Lb(n,r){return y.useReducer((s,i)=>r[s][i]??s,n)}var sl=n=>{const{present:r,children:s}=n,i=Ib(r),u=typeof s=="function"?s({present:i.isPresent}):y.Children.only(s),d=ho(i.ref,Ob(u));return typeof s=="function"||i.isPresent?y.cloneElement(u,{ref:d}):null};sl.displayName="Presence";function Ib(n){const[r,s]=y.useState(),i=y.useRef(null),u=y.useRef(n),d=y.useRef("none"),p=n?"mounted":"unmounted",[h,v]=Lb(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const g=Ai(i.current);d.current=h==="mounted"?g:"none"},[h]),aa(()=>{const g=i.current,w=u.current;if(w!==n){const C=d.current,x=Ai(g);n?v("MOUNT"):x==="none"||(g==null?void 0:g.display)==="none"?v("UNMOUNT"):v(w&&C!==x?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,v]),aa(()=>{if(r){let g;const w=r.ownerDocument.defaultView??window,S=x=>{const b=Ai(i.current).includes(CSS.escape(x.animationName));if(x.target===r&&b&&(v("ANIMATION_END"),!u.current)){const E=r.style.animationFillMode;r.style.animationFillMode="forwards",g=w.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=E)})}},C=x=>{x.target===r&&(d.current=Ai(i.current))};return r.addEventListener("animationstart",C),r.addEventListener("animationcancel",S),r.addEventListener("animationend",S),()=>{w.clearTimeout(g),r.removeEventListener("animationstart",C),r.removeEventListener("animationcancel",S),r.removeEventListener("animationend",S)}}else v("ANIMATION_END")},[r,v]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(g=>{i.current=g?getComputedStyle(g):null,s(g)},[])}}function Ai(n){return(n==null?void 0:n.animationName)||"none"}function Ob(n){var i,u;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?n.ref:(r=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var nc=0;function zb(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ep()),document.body.insertAdjacentElement("beforeend",n[1]??Ep()),nc++,()=>{nc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),nc--}},[])}function Ep(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var En=function(){return En=Object.assign||function(r){for(var s,i=1,u=arguments.length;i<u;i++){s=arguments[i];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(r[d]=s[d])}return r},En.apply(this,arguments)};function eg(n,r){var s={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(s[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(n);u<i.length;u++)r.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(n,i[u])&&(s[i[u]]=n[i[u]]);return s}function _b(n,r,s){if(s||arguments.length===2)for(var i=0,u=r.length,d;i<u;i++)(d||!(i in r))&&(d||(d=Array.prototype.slice.call(r,0,i)),d[i]=r[i]);return n.concat(d||Array.prototype.slice.call(r))}var qi="right-scroll-bar-position",Gi="width-before-scroll-bar",Db="with-scroll-bars-hidden",Ab="--removed-body-scroll-bar-size";function rc(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function Fb(n,r){var s=y.useState(function(){return{value:n,callback:r,facade:{get current(){return s.value},set current(i){var u=s.value;u!==i&&(s.value=i,s.callback(i,u))}}}})[0];return s.callback=r,s.facade}var Ub=typeof window<"u"?y.useLayoutEffect:y.useEffect,Np=new WeakMap;function Bb(n,r){var s=Fb(null,function(i){return n.forEach(function(u){return rc(u,i)})});return Ub(function(){var i=Np.get(s);if(i){var u=new Set(i),d=new Set(n),p=s.current;u.forEach(function(h){d.has(h)||rc(h,null)}),d.forEach(function(h){u.has(h)||rc(h,p)})}Np.set(s,n)},[n]),s}function $b(n){return n}function Wb(n,r){r===void 0&&(r=$b);var s=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:n},useMedium:function(d){var p=r(d,i);return s.push(p),function(){s=s.filter(function(h){return h!==p})}},assignSyncMedium:function(d){for(i=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(h){return d(h)},filter:function(){return s}}},assignMedium:function(d){i=!0;var p=[];if(s.length){var h=s;s=[],h.forEach(d),p=s}var v=function(){var w=p;p=[],w.forEach(d)},g=function(){return Promise.resolve().then(v)};g(),s={push:function(w){p.push(w),g()},filter:function(w){return p=p.filter(w),s}}}};return u}function Hb(n){n===void 0&&(n={});var r=Wb(null);return r.options=En({async:!0,ssr:!1},n),r}var tg=function(n){var r=n.sideCar,s=eg(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,En({},s))};tg.isSideCarExport=!0;function Vb(n,r){return n.useMedium(r),tg}var ng=Hb(),oc=function(){},al=y.forwardRef(function(n,r){var s=y.useRef(null),i=y.useState({onScrollCapture:oc,onWheelCapture:oc,onTouchMoveCapture:oc}),u=i[0],d=i[1],p=n.forwardProps,h=n.children,v=n.className,g=n.removeScrollBar,w=n.enabled,S=n.shards,C=n.sideCar,x=n.noRelative,z=n.noIsolation,b=n.inert,E=n.allowPinchZoom,_=n.as,U=_===void 0?"div":_,I=n.gapMode,F=eg(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),q=C,ee=Bb([s,r]),V=En(En({},F),u);return y.createElement(y.Fragment,null,w&&y.createElement(q,{sideCar:ng,removeScrollBar:g,shards:S,noRelative:x,noIsolation:z,inert:b,setCallbacks:d,allowPinchZoom:!!E,lockRef:s,gapMode:I}),p?y.cloneElement(y.Children.only(h),En(En({},V),{ref:ee})):y.createElement(U,En({},V,{className:v,ref:ee}),h))});al.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};al.classNames={fullWidth:Gi,zeroRight:qi};var Qb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Kb(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=Qb();return r&&n.setAttribute("nonce",r),n}function qb(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function Gb(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var Yb=function(){var n=0,r=null;return{add:function(s){n==0&&(r=Kb())&&(qb(r,s),Gb(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Xb=function(){var n=Yb();return function(r,s){y.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&s])}},rg=function(){var n=Xb(),r=function(s){var i=s.styles,u=s.dynamic;return n(i,u),null};return r},Jb={left:0,top:0,right:0,gap:0},sc=function(n){return parseInt(n||"",10)||0},Zb=function(n){var r=window.getComputedStyle(document.body),s=r[n==="padding"?"paddingLeft":"marginLeft"],i=r[n==="padding"?"paddingTop":"marginTop"],u=r[n==="padding"?"paddingRight":"marginRight"];return[sc(s),sc(i),sc(u)]},eS=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return Jb;var r=Zb(n),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-s+r[2]-r[0])}},tS=rg(),Ko="data-scroll-locked",nS=function(n,r,s,i){var u=n.left,d=n.top,p=n.right,h=n.gap;return s===void 0&&(s="margin"),`
|
|
223
|
-
.`.concat(Db,` {
|
|
224
|
-
overflow: hidden `).concat(i,`;
|
|
225
|
-
padding-right: `).concat(h,"px ").concat(i,`;
|
|
226
|
-
}
|
|
227
|
-
body[`).concat(Ko,`] {
|
|
228
|
-
overflow: hidden `).concat(i,`;
|
|
229
|
-
overscroll-behavior: contain;
|
|
230
|
-
`).concat([r&&"position: relative ".concat(i,";"),s==="margin"&&`
|
|
231
|
-
padding-left: `.concat(u,`px;
|
|
232
|
-
padding-top: `).concat(d,`px;
|
|
233
|
-
padding-right: `).concat(p,`px;
|
|
234
|
-
margin-left:0;
|
|
235
|
-
margin-top:0;
|
|
236
|
-
margin-right: `).concat(h,"px ").concat(i,`;
|
|
237
|
-
`),s==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.`).concat(qi,` {
|
|
241
|
-
right: `).concat(h,"px ").concat(i,`;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.`).concat(Gi,` {
|
|
245
|
-
margin-right: `).concat(h,"px ").concat(i,`;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.`).concat(qi," .").concat(qi,` {
|
|
249
|
-
right: 0 `).concat(i,`;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.`).concat(Gi," .").concat(Gi,` {
|
|
253
|
-
margin-right: 0 `).concat(i,`;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
body[`).concat(Ko,`] {
|
|
257
|
-
`).concat(Ab,": ").concat(h,`px;
|
|
258
|
-
}
|
|
259
|
-
`)},Pp=function(){var n=parseInt(document.body.getAttribute(Ko)||"0",10);return isFinite(n)?n:0},rS=function(){y.useEffect(function(){return document.body.setAttribute(Ko,(Pp()+1).toString()),function(){var n=Pp()-1;n<=0?document.body.removeAttribute(Ko):document.body.setAttribute(Ko,n.toString())}},[])},oS=function(n){var r=n.noRelative,s=n.noImportant,i=n.gapMode,u=i===void 0?"margin":i;rS();var d=y.useMemo(function(){return eS(u)},[u]);return y.createElement(tS,{styles:nS(d,!r,u,s?"":"!important")})},jc=!1;if(typeof window<"u")try{var Fi=Object.defineProperty({},"passive",{get:function(){return jc=!0,!0}});window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{jc=!1}var Wo=jc?{passive:!1}:!1,sS=function(n){return n.tagName==="TEXTAREA"},og=function(n,r){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!sS(n)&&s[r]==="visible")},aS=function(n){return og(n,"overflowY")},iS=function(n){return og(n,"overflowX")},Rp=function(n,r){var s=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=sg(n,i);if(u){var d=ag(n,i),p=d[1],h=d[2];if(p>h)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},lS=function(n){var r=n.scrollTop,s=n.scrollHeight,i=n.clientHeight;return[r,s,i]},uS=function(n){var r=n.scrollLeft,s=n.scrollWidth,i=n.clientWidth;return[r,s,i]},sg=function(n,r){return n==="v"?aS(r):iS(r)},ag=function(n,r){return n==="v"?lS(r):uS(r)},cS=function(n,r){return n==="h"&&r==="rtl"?-1:1},dS=function(n,r,s,i,u){var d=cS(n,window.getComputedStyle(r).direction),p=d*i,h=s.target,v=r.contains(h),g=!1,w=p>0,S=0,C=0;do{if(!h)break;var x=ag(n,h),z=x[0],b=x[1],E=x[2],_=b-E-d*z;(z||_)&&sg(n,h)&&(S+=_,C+=z);var U=h.parentNode;h=U&&U.nodeType===Node.DOCUMENT_FRAGMENT_NODE?U.host:U}while(!v&&h!==document.body||v&&(r.contains(h)||r===h));return(w&&Math.abs(S)<1||!w&&Math.abs(C)<1)&&(g=!0),g},Ui=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},jp=function(n){return[n.deltaX,n.deltaY]},Mp=function(n){return n&&"current"in n?n.current:n},fS=function(n,r){return n[0]===r[0]&&n[1]===r[1]},hS=function(n){return`
|
|
260
|
-
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
261
|
-
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
262
|
-
`)},pS=0,Ho=[];function mS(n){var r=y.useRef([]),s=y.useRef([0,0]),i=y.useRef(),u=y.useState(pS++)[0],d=y.useState(rg)[0],p=y.useRef(n);y.useEffect(function(){p.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var b=_b([n.lockRef.current],(n.shards||[]).map(Mp),!0).filter(Boolean);return b.forEach(function(E){return E.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),b.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var h=y.useCallback(function(b,E){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!p.current.allowPinchZoom;var _=Ui(b),U=s.current,I="deltaX"in b?b.deltaX:U[0]-_[0],F="deltaY"in b?b.deltaY:U[1]-_[1],q,ee=b.target,V=Math.abs(I)>Math.abs(F)?"h":"v";if("touches"in b&&V==="h"&&ee.type==="range")return!1;var re=window.getSelection(),$=re&&re.anchorNode,X=$?$===ee||$.contains(ee):!1;if(X)return!1;var M=Rp(V,ee);if(!M)return!0;if(M?q=V:(q=V==="v"?"h":"v",M=Rp(V,ee)),!M)return!1;if(!i.current&&"changedTouches"in b&&(I||F)&&(i.current=q),!q)return!0;var T=i.current||q;return dS(T,E,b,T==="h"?I:F)},[]),v=y.useCallback(function(b){var E=b;if(!(!Ho.length||Ho[Ho.length-1]!==d)){var _="deltaY"in E?jp(E):Ui(E),U=r.current.filter(function(q){return q.name===E.type&&(q.target===E.target||E.target===q.shadowParent)&&fS(q.delta,_)})[0];if(U&&U.should){E.cancelable&&E.preventDefault();return}if(!U){var I=(p.current.shards||[]).map(Mp).filter(Boolean).filter(function(q){return q.contains(E.target)}),F=I.length>0?h(E,I[0]):!p.current.noIsolation;F&&E.cancelable&&E.preventDefault()}}},[]),g=y.useCallback(function(b,E,_,U){var I={name:b,delta:E,target:_,should:U,shadowParent:gS(_)};r.current.push(I),setTimeout(function(){r.current=r.current.filter(function(F){return F!==I})},1)},[]),w=y.useCallback(function(b){s.current=Ui(b),i.current=void 0},[]),S=y.useCallback(function(b){g(b.type,jp(b),b.target,h(b,n.lockRef.current))},[]),C=y.useCallback(function(b){g(b.type,Ui(b),b.target,h(b,n.lockRef.current))},[]);y.useEffect(function(){return Ho.push(d),n.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:C}),document.addEventListener("wheel",v,Wo),document.addEventListener("touchmove",v,Wo),document.addEventListener("touchstart",w,Wo),function(){Ho=Ho.filter(function(b){return b!==d}),document.removeEventListener("wheel",v,Wo),document.removeEventListener("touchmove",v,Wo),document.removeEventListener("touchstart",w,Wo)}},[]);var x=n.removeScrollBar,z=n.inert;return y.createElement(y.Fragment,null,z?y.createElement(d,{styles:hS(u)}):null,x?y.createElement(oS,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function gS(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const yS=Vb(ng,mS);var ig=y.forwardRef(function(n,r){return y.createElement(al,En({},n,{ref:r,sideCar:yS}))});ig.classNames=al.classNames;var vS=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},Vo=new WeakMap,Bi=new WeakMap,$i={},ac=0,lg=function(n){return n&&(n.host||lg(n.parentNode))},xS=function(n,r){return r.map(function(s){if(n.contains(s))return s;var i=lg(s);return i&&n.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},wS=function(n,r,s,i){var u=xS(r,Array.isArray(n)?n:[n]);$i[s]||($i[s]=new WeakMap);var d=$i[s],p=[],h=new Set,v=new Set(u),g=function(S){!S||h.has(S)||(h.add(S),g(S.parentNode))};u.forEach(g);var w=function(S){!S||v.has(S)||Array.prototype.forEach.call(S.children,function(C){if(h.has(C))w(C);else try{var x=C.getAttribute(i),z=x!==null&&x!=="false",b=(Vo.get(C)||0)+1,E=(d.get(C)||0)+1;Vo.set(C,b),d.set(C,E),p.push(C),b===1&&z&&Bi.set(C,!0),E===1&&C.setAttribute(s,"true"),z||C.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",C,_)}})};return w(r),h.clear(),ac++,function(){p.forEach(function(S){var C=Vo.get(S)-1,x=d.get(S)-1;Vo.set(S,C),d.set(S,x),C||(Bi.has(S)||S.removeAttribute(i),Bi.delete(S)),x||S.removeAttribute(s)}),ac--,ac||(Vo=new WeakMap,Vo=new WeakMap,Bi=new WeakMap,$i={})}},bS=function(n,r,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),u=vS(n);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),wS(i,u,s,"aria-hidden")):function(){return null}},il="Dialog",[ug]=tb(il),[SS,un]=ug(il),cg=n=>{const{__scopeDialog:r,children:s,open:i,defaultOpen:u,onOpenChange:d,modal:p=!0}=n,h=y.useRef(null),v=y.useRef(null),[g,w]=ab({prop:i,defaultProp:u??!1,onChange:d,caller:il});return f.jsx(SS,{scope:r,triggerRef:h,contentRef:v,contentId:Zu(),titleId:Zu(),descriptionId:Zu(),open:g,onOpenChange:w,onOpenToggle:y.useCallback(()=>w(S=>!S),[w]),modal:p,children:s})};cg.displayName=il;var dg="DialogTrigger",kS=y.forwardRef((n,r)=>{const{__scopeDialog:s,...i}=n,u=un(dg,s),d=ho(r,u.triggerRef);return f.jsx(qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":Yc(u.open),...i,ref:d,onClick:Tr(n.onClick,u.onOpenToggle)})});kS.displayName=dg;var qc="DialogPortal",[CS,fg]=ug(qc,{forceMount:void 0}),hg=n=>{const{__scopeDialog:r,forceMount:s,children:i,container:u}=n,d=un(qc,r);return f.jsx(CS,{scope:r,forceMount:s,children:y.Children.map(i,p=>f.jsx(sl,{present:s||d.open,children:f.jsx(Zm,{asChild:!0,container:u,children:p})}))})};hg.displayName=qc;var tl="DialogOverlay",pg=y.forwardRef((n,r)=>{const s=fg(tl,n.__scopeDialog),{forceMount:i=s.forceMount,...u}=n,d=un(tl,n.__scopeDialog);return d.modal?f.jsx(sl,{present:i||d.open,children:f.jsx(NS,{...u,ref:r})}):null});pg.displayName=tl;var ES=Km("DialogOverlay.RemoveScroll"),NS=y.forwardRef((n,r)=>{const{__scopeDialog:s,...i}=n,u=un(tl,s);return f.jsx(ig,{as:ES,allowPinchZoom:!0,shards:[u.contentRef],children:f.jsx(qn.div,{"data-state":Yc(u.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),co="DialogContent",mg=y.forwardRef((n,r)=>{const s=fg(co,n.__scopeDialog),{forceMount:i=s.forceMount,...u}=n,d=un(co,n.__scopeDialog);return f.jsx(sl,{present:i||d.open,children:d.modal?f.jsx(PS,{...u,ref:r}):f.jsx(RS,{...u,ref:r})})});mg.displayName=co;var PS=y.forwardRef((n,r)=>{const s=un(co,n.__scopeDialog),i=y.useRef(null),u=ho(r,s.contentRef,i);return y.useEffect(()=>{const d=i.current;if(d)return bS(d)},[]),f.jsx(gg,{...n,ref:u,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tr(n.onCloseAutoFocus,d=>{var p;d.preventDefault(),(p=s.triggerRef.current)==null||p.focus()}),onPointerDownOutside:Tr(n.onPointerDownOutside,d=>{const p=d.detail.originalEvent,h=p.button===0&&p.ctrlKey===!0;(p.button===2||h)&&d.preventDefault()}),onFocusOutside:Tr(n.onFocusOutside,d=>d.preventDefault())})}),RS=y.forwardRef((n,r)=>{const s=un(co,n.__scopeDialog),i=y.useRef(!1),u=y.useRef(!1);return f.jsx(gg,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var p,h;(p=n.onCloseAutoFocus)==null||p.call(n,d),d.defaultPrevented||(i.current||(h=s.triggerRef.current)==null||h.focus(),d.preventDefault()),i.current=!1,u.current=!1},onInteractOutside:d=>{var v,g;(v=n.onInteractOutside)==null||v.call(n,d),d.defaultPrevented||(i.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const p=d.target;((g=s.triggerRef.current)==null?void 0:g.contains(p))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})}),gg=y.forwardRef((n,r)=>{const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:u,onCloseAutoFocus:d,...p}=n,h=un(co,s),v=y.useRef(null),g=ho(r,v);return zb(),f.jsxs(f.Fragment,{children:[f.jsx(Xm,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:u,onUnmountAutoFocus:d,children:f.jsx(Gm,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Yc(h.open),...p,ref:g,onDismiss:()=>h.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(jS,{titleId:h.titleId}),f.jsx(TS,{contentRef:v,descriptionId:h.descriptionId})]})]})}),Gc="DialogTitle",yg=y.forwardRef((n,r)=>{const{__scopeDialog:s,...i}=n,u=un(Gc,s);return f.jsx(qn.h2,{id:u.titleId,...i,ref:r})});yg.displayName=Gc;var vg="DialogDescription",xg=y.forwardRef((n,r)=>{const{__scopeDialog:s,...i}=n,u=un(vg,s);return f.jsx(qn.p,{id:u.descriptionId,...i,ref:r})});xg.displayName=vg;var wg="DialogClose",bg=y.forwardRef((n,r)=>{const{__scopeDialog:s,...i}=n,u=un(wg,s);return f.jsx(qn.button,{type:"button",...i,ref:r,onClick:Tr(n.onClick,()=>u.onOpenChange(!1))})});bg.displayName=wg;function Yc(n){return n?"open":"closed"}var Sg="DialogTitleWarning",[l2,kg]=eb(Sg,{contentName:co,titleName:Gc,docsSlug:"dialog"}),jS=({titleId:n})=>{const r=kg(Sg),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
263
|
-
|
|
264
|
-
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
265
|
-
|
|
266
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return y.useEffect(()=>{n&&(document.getElementById(n)||console.error(s))},[s,n]),null},MS="DialogDescriptionWarning",TS=({contentRef:n,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kg(MS).contentName}}.`;return y.useEffect(()=>{var d;const u=(d=n.current)==null?void 0:d.getAttribute("aria-describedby");r&&u&&(document.getElementById(r)||console.warn(i))},[i,n,r]),null},LS=cg,IS=hg,Cg=pg,Eg=mg,Ng=yg,Pg=xg,OS=bg;const Rg=LS,zS=IS,jg=y.forwardRef(({className:n,...r},s)=>f.jsx(Cg,{ref:s,className:Me("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...r}));jg.displayName=Cg.displayName;const Xc=y.forwardRef(({className:n,children:r,...s},i)=>f.jsxs(zS,{children:[f.jsx(jg,{}),f.jsxs(Eg,{ref:i,className:Me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-xl duration-base 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%] rounded-xl",n),...s,children:[r,f.jsxs(OS,{className:"absolute right-4 top-4 rounded-lg p-1 opacity-70 ring-offset-white transition-all duration-fast hover:opacity-100 hover:bg-gray-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none",children:[f.jsx(Vm,{className:"h-4 w-4 text-gray-500"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xc.displayName=Eg.displayName;const Jc=({className:n,...r})=>f.jsx("div",{className:Me("flex flex-col space-y-2 text-center sm:text-left",n),...r});Jc.displayName="DialogHeader";const Zc=({className:n,...r})=>f.jsx("div",{className:Me("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-3",n),...r});Zc.displayName="DialogFooter";const ed=y.forwardRef(({className:n,...r},s)=>f.jsx(Ng,{ref:s,className:Me("text-lg font-semibold leading-tight tracking-tight text-gray-900",n),...r}));ed.displayName=Ng.displayName;const td=y.forwardRef(({className:n,...r},s)=>f.jsx(Pg,{ref:s,className:Me("text-sm text-gray-500 leading-relaxed",n),...r}));td.displayName=Pg.displayName;function _S({maskedValue:n,isSet:r,className:s,...i}){const[u,d]=y.useState(!1);return f.jsxs("div",{className:"relative",children:[f.jsx(De,{type:u?"text":"password",className:Me("pr-20",s),placeholder:r?`${B("apiKeySet")} (Unchanged)`:"",...i}),f.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:(r||n)&&f.jsx(Xe,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>d(!u),children:u?f.jsx(Ow,{className:"h-4 w-4"}):f.jsx(zw,{className:"h-4 w-4"})})})]})}function DS({value:n,onChange:r,className:s}){const i=n?Object.entries(n):[],u=(h,v,g)=>{const w=[...i];w[h]=[v,g],r(Object.fromEntries(w))},d=()=>{r({...n,"":""})},p=h=>{const v=i.filter((g,w)=>w!==h);r(Object.fromEntries(v))};return f.jsxs("div",{className:Me("space-y-2",s),children:[i.map(([h,v],g)=>f.jsxs("div",{className:"flex gap-2",children:[f.jsx(De,{type:"text",value:h,onChange:w=>u(g,w.target.value,v),placeholder:B("headerName"),className:"flex-1"}),f.jsx(De,{type:"text",value:v,onChange:w=>u(g,h,w.target.value),placeholder:B("headerValue"),className:"flex-1"}),f.jsx(Xe,{type:"button",variant:"ghost",size:"icon",onClick:()=>p(g),children:f.jsx(el,{className:"h-4 w-4 text-red-500"})})]},g)),f.jsxs(Xe,{type:"button",variant:"outline",size:"sm",onClick:d,children:[f.jsx(Nc,{className:"h-4 w-4 mr-2"}),B("add")]})]})}function AS(){const{providerModal:n,closeProviderModal:r}=ya(),{data:s}=ds(),{data:i}=Kc(),{data:u}=fs(),d=U1(),[p,h]=y.useState(""),[v,g]=y.useState(""),[w,S]=y.useState(null),[C,x]=y.useState("auto"),z=n.provider,b=i==null?void 0:i.providers.find(V=>V.name===z),E=z?s==null?void 0:s.providers[z]:null,_=u==null?void 0:u.uiHints,U=z?ct(`providers.${z}.apiKey`,_):void 0,I=z?ct(`providers.${z}.apiBase`,_):void 0,F=z?ct(`providers.${z}.extraHeaders`,_):void 0,q=z?ct(`providers.${z}.wireApi`,_):void 0;y.useEffect(()=>{if(E){g(E.apiBase||(b==null?void 0:b.defaultApiBase)||""),S(E.extraHeaders||null),h("");const V=E.wireApi||(b==null?void 0:b.defaultWireApi)||"auto";x(V)}},[E,b]);const ee=V=>{V.preventDefault();const re={};if(p!==""&&(re.apiKey=p),v&&v!==(b==null?void 0:b.defaultApiBase)&&(re.apiBase=v),w&&Object.keys(w).length>0&&(re.extraHeaders=w),b!=null&&b.supportsWireApi){const $=(E==null?void 0:E.wireApi)||b.defaultWireApi||"auto";C!==$&&(re.wireApi=C)}z&&d.mutate({provider:z,data:re},{onSuccess:()=>r()})};return f.jsx(Rg,{open:n.open,onOpenChange:r,children:f.jsxs(Xc,{className:"sm:max-w-[500px]",children:[f.jsx(Jc,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center",children:f.jsx(Zi,{className:"h-5 w-5 text-white"})}),f.jsxs("div",{children:[f.jsx(ed,{children:(b==null?void 0:b.displayName)||z}),f.jsx(td,{children:"Configure API keys and parameters for AI provider"})]})]})}),f.jsxs("form",{onSubmit:ee,className:"flex flex-col pt-2",children:[f.jsxs("div",{className:"space-y-5 max-h-[60vh] overflow-y-auto pr-1",children:[f.jsxs("div",{className:"space-y-2.5",children:[f.jsxs($n,{htmlFor:"apiKey",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[f.jsx(Zi,{className:"h-3.5 w-3.5 text-gray-500"}),(U==null?void 0:U.label)??B("apiKey")]}),f.jsx(_S,{id:"apiKey",value:p,isSet:E==null?void 0:E.apiKeySet,onChange:V=>h(V.target.value),placeholder:E!=null&&E.apiKeySet?B("apiKeySet"):(U==null?void 0:U.placeholder)??"Enter API Key",className:"rounded-xl"})]}),f.jsxs("div",{className:"space-y-2.5",children:[f.jsxs($n,{htmlFor:"apiBase",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[f.jsx(Bm,{className:"h-3.5 w-3.5 text-gray-500"}),(I==null?void 0:I.label)??B("apiBase")]}),f.jsx(De,{id:"apiBase",type:"text",value:v,onChange:V=>g(V.target.value),placeholder:(b==null?void 0:b.defaultApiBase)||(I==null?void 0:I.placeholder)||"https://api.example.com",className:"rounded-xl"}),(I==null?void 0:I.help)&&f.jsx("p",{className:"text-xs text-gray-500",children:I.help})]}),(b==null?void 0:b.supportsWireApi)&&f.jsxs("div",{className:"space-y-2.5",children:[f.jsxs($n,{htmlFor:"wireApi",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[f.jsx(Ec,{className:"h-3.5 w-3.5 text-gray-500"}),(q==null?void 0:q.label)??B("wireApi")]}),f.jsx("select",{id:"wireApi",value:C,onChange:V=>x(V.target.value),className:"flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:(b.wireApiOptions||["auto","chat","responses"]).map(V=>f.jsx("option",{value:V,children:B(V==="chat"?"wireApiChat":V==="responses"?"wireApiResponses":"wireApiAuto")},V))})]}),f.jsxs("div",{className:"space-y-2.5",children:[f.jsxs($n,{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[f.jsx(Ec,{className:"h-3.5 w-3.5 text-gray-500"}),(F==null?void 0:F.label)??B("extraHeaders")]}),f.jsx(DS,{value:w,onChange:S})]})]}),f.jsxs(Zc,{className:"pt-4 flex-shrink-0",children:[f.jsx(Xe,{type:"button",variant:"outline",onClick:r,children:B("cancel")}),f.jsx(Xe,{type:"submit",disabled:d.isPending,children:d.isPending?"Saving...":B("save")})]})]})]})})}function Mg({tabs:n,activeTab:r,onChange:s,className:i}){return f.jsx("div",{className:Me("flex items-center gap-8 border-b border-gray-200 mb-8",i),children:n.map(u=>{const d=r===u.id;return f.jsxs("button",{onClick:()=>s(u.id),className:Me("relative pb-4 text-[15px] font-semibold transition-all duration-fast flex items-center gap-2",d?"text-primary":"text-gray-500 hover:text-gray-700"),children:[u.label,u.count!==void 0&&f.jsx("span",{className:"text-[11px] font-medium text-gray-400",children:u.count.toLocaleString()}),d&&f.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary animate-in fade-in slide-in-from-left-2 duration-300"})]},u.id)})})}function Tg({name:n,src:r,className:s,imgClassName:i,fallback:u}){const[d,p]=y.useState(!1),h=!!r&&!d;return f.jsx("div",{className:Me("flex items-center justify-center",s),children:h?f.jsx("img",{src:r,alt:`${n} logo`,className:Me("h-6 w-6 object-contain",i),onError:()=>p(!0),draggable:!1}):u??f.jsx("span",{className:"text-lg font-bold uppercase",children:n.slice(0,1)})})}const FS={openrouter:"openrouter.svg",aihubmix:"aihubmix.png",anthropic:"anthropic.svg",openai:"openai.svg",gemini:"gemini.svg",deepseek:"deepseek.png",zhipu:"zhipu.svg",dashscope:"dashscope.png",moonshot:"moonshot.png",minimax:"minimax.svg",vllm:"vllm.svg",groq:"groq.svg"},US={telegram:"telegram.svg",slack:"slack.svg",discord:"discord.svg",whatsapp:"whatsapp.svg",qq:"qq.svg",feishu:"feishu.svg",dingtalk:"dingtalk.svg",wecom:"wecom.svg",mochat:"mochat.svg",email:"email.svg"};function Lg(n,r){const s=r.toLowerCase(),i=n[s];return i?`/logos/${i}`:null}function BS(n){return Lg(FS,n)}function $S(n){return Lg(US,n)}function WS(){const{data:n}=ds(),{data:r}=Kc(),{data:s}=fs(),{openProviderModal:i}=ya(),[u,d]=y.useState("installed"),p=s==null?void 0:s.uiHints;if(!n||!r)return f.jsx("div",{className:"p-8",children:"Loading..."});const h=[{id:"installed",label:"Configured",count:n.providers?Object.keys(n.providers).filter(g=>n.providers[g].apiKeySet).length:0},{id:"all",label:"All Providers"}],v=u==="installed"?r.providers.filter(g=>{var w;return(w=n.providers[g.name])==null?void 0:w.apiKeySet}):r.providers;return f.jsxs("div",{className:"animate-fade-in pb-20",children:[f.jsx("div",{className:"flex items-center justify-between mb-8",children:f.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"AI Providers"})}),f.jsx(Mg,{tabs:h,activeTab:u,onChange:d}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:v.map(g=>{const w=n.providers[g.name],S=w==null?void 0:w.apiKeySet,C=ct(`providers.${g.name}`,p),x=(C==null?void 0:C.help)||"Configure AI services for your agents";return f.jsxs("div",{className:Me("group relative flex flex-col p-5 rounded-2xl border transition-all duration-base cursor-pointer","hover:shadow-card-hover hover:-translate-y-0.5",S?"bg-white border-gray-200 hover:border-gray-300":"bg-gray-50 border-gray-200 hover:border-gray-300 hover:bg-white"),onClick:()=>i(g.name),children:[f.jsxs("div",{className:"flex items-start justify-between mb-4",children:[f.jsx(Tg,{name:g.name,src:BS(g.name),className:Me("h-12 w-12 rounded-xl border transition-all",S?"bg-white border-primary":"bg-white border-gray-200 group-hover:border-gray-300"),imgClassName:"h-7 w-7",fallback:f.jsx("span",{className:Me("text-lg font-bold uppercase",S?"text-gray-900":"text-gray-500"),children:g.name[0]})}),S?f.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-600",children:[f.jsx(Tw,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"text-[11px] font-bold",children:"Ready"})]}):f.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-gray-100 text-gray-500",children:[f.jsx(Wm,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"text-[11px] font-bold",children:"Setup"})]})]}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"text-[15px] font-bold text-gray-900 mb-1",children:g.displayName||g.name}),f.jsx("p",{className:"text-[12px] text-gray-500 leading-relaxed line-clamp-2",children:x})]}),f.jsx("div",{className:"mt-4 pt-3",children:f.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] font-semibold text-gray-600 group-hover:text-primary transition-colors cursor-pointer",children:[S?"Configure":"Add Provider",f.jsx(Um,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})})]},g.name)})}),v.length===0&&f.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[f.jsx("div",{className:"h-16 w-16 flex items-center justify-center rounded-2xl bg-gray-100 mb-4",children:f.jsx(Zi,{className:"h-8 w-8 text-gray-400"})}),f.jsx("h3",{className:"text-[15px] font-bold text-gray-900 mb-2",children:"No providers configured"}),f.jsx("p",{className:"text-[13px] text-gray-500 max-w-sm",children:"Add an AI provider to start using the platform. Click on any provider to configure it."})]}),f.jsx(AS,{})]})}const nd=y.forwardRef(({className:n,checked:r=!1,onCheckedChange:s,...i},u)=>f.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:u,className:Me("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",r?"bg-primary":"bg-gray-200 hover:bg-gray-300",n),onClick:()=>s==null?void 0:s(!r),...i,children:f.jsx("span",{className:Me("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform duration-fast",r?"translate-x-5":"translate-x-0")})}));nd.displayName="Switch";function HS({value:n,onChange:r,className:s,placeholder:i="Type and press Enter..."}){const[u,d]=y.useState(""),p=v=>{v.key==="Enter"&&u.trim()?(v.preventDefault(),r([...n,u.trim()]),d("")):v.key==="Backspace"&&!u&&n.length>0&&r(n.slice(0,-1))},h=v=>{r(n.filter((g,w)=>w!==v))};return f.jsxs("div",{className:Me("flex flex-wrap gap-2 p-2 border rounded-md min-h-[42px]",s),children:[n.map((v,g)=>f.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded text-sm",children:[v,f.jsx("button",{type:"button",onClick:()=>h(g),className:"hover:text-red-300 transition-colors",children:f.jsx(Vm,{className:"h-3 w-3"})})]},g)),f.jsx("input",{type:"text",value:u,onChange:v=>d(v.target.value),onKeyDown:p,className:"flex-1 outline-none min-w-[100px] bg-transparent text-sm",placeholder:i})]})}const Tp=[{value:"pairing",label:"pairing"},{value:"allowlist",label:"allowlist"},{value:"open",label:"open"},{value:"disabled",label:"disabled"}],Lp=[{value:"open",label:"open"},{value:"allowlist",label:"allowlist"},{value:"disabled",label:"disabled"}],VS=n=>n.includes("token")||n.includes("secret")||n.includes("password")?f.jsx(Zi,{className:"h-3.5 w-3.5 text-gray-500"}):n.includes("url")||n.includes("host")?f.jsx(Bm,{className:"h-3.5 w-3.5 text-gray-500"}):n.includes("email")||n.includes("mail")?f.jsx(Vc,{className:"h-3.5 w-3.5 text-gray-500"}):n.includes("id")||n.includes("from")?f.jsx(Ec,{className:"h-3.5 w-3.5 text-gray-500"}):n==="enabled"||n==="consentGranted"?f.jsx(Vw,{className:"h-3.5 w-3.5 text-gray-500"}):f.jsx(Wm,{className:"h-3.5 w-3.5 text-gray-500"}),QS={telegram:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"token",type:"password",label:B("botToken")},{name:"allowFrom",type:"tags",label:B("allowFrom")},{name:"proxy",type:"text",label:B("proxy")},{name:"accountId",type:"text",label:"Account ID"},{name:"dmPolicy",type:"select",label:"DM Policy",options:Tp},{name:"groupPolicy",type:"select",label:"Group Policy",options:Lp},{name:"groupAllowFrom",type:"tags",label:"Group Allow From"},{name:"requireMention",type:"boolean",label:"Require Mention"},{name:"mentionPatterns",type:"tags",label:"Mention Patterns"},{name:"groups",type:"json",label:"Group Rules (JSON)"}],discord:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"token",type:"password",label:B("botToken")},{name:"allowBots",type:"boolean",label:"Allow Bot Messages"},{name:"allowFrom",type:"tags",label:B("allowFrom")},{name:"gatewayUrl",type:"text",label:B("gatewayUrl")},{name:"intents",type:"number",label:B("intents")},{name:"proxy",type:"text",label:B("proxy")},{name:"mediaMaxMb",type:"number",label:"Attachment Max Size (MB)"},{name:"accountId",type:"text",label:"Account ID"},{name:"dmPolicy",type:"select",label:"DM Policy",options:Tp},{name:"groupPolicy",type:"select",label:"Group Policy",options:Lp},{name:"groupAllowFrom",type:"tags",label:"Group Allow From"},{name:"requireMention",type:"boolean",label:"Require Mention"},{name:"mentionPatterns",type:"tags",label:"Mention Patterns"},{name:"groups",type:"json",label:"Group Rules (JSON)"}],whatsapp:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"bridgeUrl",type:"text",label:B("bridgeUrl")},{name:"allowFrom",type:"tags",label:B("allowFrom")}],feishu:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"appId",type:"text",label:B("appId")},{name:"appSecret",type:"password",label:B("appSecret")},{name:"encryptKey",type:"password",label:B("encryptKey")},{name:"verificationToken",type:"password",label:B("verificationToken")},{name:"allowFrom",type:"tags",label:B("allowFrom")}],dingtalk:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"clientId",type:"text",label:B("clientId")},{name:"clientSecret",type:"password",label:B("clientSecret")},{name:"allowFrom",type:"tags",label:B("allowFrom")}],wecom:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"corpId",type:"text",label:B("corpId")},{name:"agentId",type:"text",label:B("agentId")},{name:"secret",type:"password",label:B("secret")},{name:"token",type:"password",label:B("token")},{name:"callbackPort",type:"number",label:B("callbackPort")},{name:"callbackPath",type:"text",label:B("callbackPath")},{name:"allowFrom",type:"tags",label:B("allowFrom")}],slack:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"mode",type:"text",label:B("mode")},{name:"webhookPath",type:"text",label:B("webhookPath")},{name:"allowBots",type:"boolean",label:"Allow Bot Messages"},{name:"botToken",type:"password",label:B("botToken")},{name:"appToken",type:"password",label:B("appToken")}],email:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"consentGranted",type:"boolean",label:B("consentGranted")},{name:"imapHost",type:"text",label:B("imapHost")},{name:"imapPort",type:"number",label:B("imapPort")},{name:"imapUsername",type:"text",label:B("imapUsername")},{name:"imapPassword",type:"password",label:B("imapPassword")},{name:"fromAddress",type:"email",label:B("fromAddress")}],mochat:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"baseUrl",type:"text",label:B("baseUrl")},{name:"clawToken",type:"password",label:B("clawToken")},{name:"agentUserId",type:"text",label:B("agentUserId")},{name:"allowFrom",type:"tags",label:B("allowFrom")}],qq:[{name:"enabled",type:"boolean",label:B("enabled")},{name:"appId",type:"text",label:B("appId")},{name:"secret",type:"password",label:B("appSecret")},{name:"markdownSupport",type:"boolean",label:B("markdownSupport")},{name:"allowFrom",type:"tags",label:B("allowFrom")}]},Ip={telegram:Qi,slack:Qi,email:Vc,default:Qi},Op={telegram:"from-sky-400 to-blue-500",slack:"from-purple-400 to-indigo-500",email:"from-rose-400 to-pink-500",default:"from-slate-400 to-gray-500"};function nl(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Ig(n,r){const s={...n};for(const[i,u]of Object.entries(r)){const d=s[i];if(nl(d)&&nl(u)){s[i]=Ig(d,u);continue}s[i]=u}return s}function KS(n,r){const s=n.split("."),i={};let u=i;for(let d=0;d<s.length-1;d+=1){const p=s[d];u[p]={},u=u[p]}return u[s[s.length-1]]=r,i}function qS(){var $,X;const{channelModal:n,closeChannelModal:r}=ya(),{data:s}=ds(),{data:i}=fs(),u=B1(),d=W1(),[p,h]=y.useState({}),[v,g]=y.useState({}),[w,S]=y.useState(null),C=n.channel,x=C?s==null?void 0:s.channels[C]:null,z=y.useMemo(()=>C?QS[C]:[],[C]),b=i==null?void 0:i.uiHints,E=C?`channels.${C}`:null,_=(($=i==null?void 0:i.actions)==null?void 0:$.filter(M=>M.scope===E))??[],U=C&&(((X=ct(`channels.${C}`,b))==null?void 0:X.label)??C);y.useEffect(()=>{if(x){h({...x});const M={};z.filter(T=>T.type==="json").forEach(T=>{const G=x[T.name];M[T.name]=JSON.stringify(G??{},null,2)}),g(M)}else h({}),g({})},[x,C,z]);const I=(M,T)=>{h(G=>({...G,[M]:T}))},F=M=>{if(M.preventDefault(),!C)return;const T={...p};for(const G of z){if(G.type!=="json")continue;const ne=v[G.name]??"";try{T[G.name]=ne.trim()?JSON.parse(ne):{}}catch{tt.error(`Invalid JSON for ${G.name}`);return}}u.mutate({channel:C,data:T},{onSuccess:()=>r()})},q=M=>{if(!M||!C)return;const T=M.channels;if(!nl(T))return;const G=T[C];nl(G)&&h(ne=>Ig(ne,G))},ee=async M=>{if(!(!C||!E)){S(M.id);try{let T={...p};M.saveBeforeRun&&(T={...T,...M.savePatch??{}},h(T),await u.mutateAsync({channel:C,data:T}));const G=await d.mutateAsync({actionId:M.id,data:{scope:E,draftConfig:KS(E,T)}});q(G.patch),G.ok?tt.success(G.message||B("success")):tt.error(G.message||B("error"))}catch(T){const G=T instanceof Error?T.message:String(T);tt.error(`${B("error")}: ${G}`)}finally{S(null)}}},V=Ip[C||""]||Ip.default,re=Op[C||""]||Op.default;return f.jsx(Rg,{open:n.open,onOpenChange:r,children:f.jsxs(Xc,{className:"sm:max-w-[550px] max-h-[85vh] overflow-hidden flex flex-col",children:[f.jsx(Jc,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`h-10 w-10 rounded-xl bg-gradient-to-br ${re} flex items-center justify-center`,children:f.jsx(V,{className:"h-5 w-5 text-white"})}),f.jsxs("div",{children:[f.jsx(ed,{className:"capitalize",children:U}),f.jsx(td,{children:"Configure message channel parameters"})]})]})}),f.jsxs("form",{onSubmit:F,className:"flex flex-col flex-1 overflow-hidden",children:[f.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar py-2 pr-2 space-y-5",children:z.map(M=>{const T=C?ct(`channels.${C}.${M.name}`,b):void 0,G=(T==null?void 0:T.label)??M.label,ne=T==null?void 0:T.placeholder;return f.jsxs("div",{className:"space-y-2.5",children:[f.jsxs($n,{htmlFor:M.name,className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[VS(M.name),G]}),M.type==="boolean"&&f.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-gray-50",children:[f.jsx("span",{className:"text-sm text-gray-500",children:p[M.name]?B("enabled"):B("disabled")}),f.jsx(nd,{id:M.name,checked:p[M.name]||!1,onCheckedChange:ie=>I(M.name,ie),className:"data-[state=checked]:bg-emerald-500"})]}),(M.type==="text"||M.type==="email")&&f.jsx(De,{id:M.name,type:M.type,value:p[M.name]||"",onChange:ie=>I(M.name,ie.target.value),placeholder:ne,className:"rounded-xl"}),M.type==="password"&&f.jsx(De,{id:M.name,type:"password",value:p[M.name]||"",onChange:ie=>I(M.name,ie.target.value),placeholder:ne??"Leave blank to keep unchanged",className:"rounded-xl"}),M.type==="number"&&f.jsx(De,{id:M.name,type:"number",value:p[M.name]||0,onChange:ie=>I(M.name,parseInt(ie.target.value)||0),placeholder:ne,className:"rounded-xl"}),M.type==="tags"&&f.jsx(HS,{value:p[M.name]||[],onChange:ie=>I(M.name,ie)}),M.type==="select"&&f.jsx("select",{id:M.name,value:p[M.name]||"",onChange:ie=>I(M.name,ie.target.value),className:"flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm",children:(M.options??[]).map(ie=>f.jsx("option",{value:ie.value,children:ie.label},ie.value))}),M.type==="json"&&f.jsx("textarea",{id:M.name,value:v[M.name]??"{}",onChange:ie=>g(Se=>({...Se,[M.name]:ie.target.value})),className:"min-h-[120px] w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono"})]},M.name)})}),f.jsxs(Zc,{className:"pt-4 flex-shrink-0",children:[f.jsx(Xe,{type:"button",variant:"outline",onClick:r,children:B("cancel")}),f.jsx(Xe,{type:"submit",disabled:u.isPending||!!w,children:u.isPending?"Saving...":B("save")}),_.filter(M=>M.trigger==="manual").map(M=>f.jsx(Xe,{type:"button",onClick:()=>ee(M),disabled:u.isPending||!!w,variant:"secondary",children:w===M.id?B("connecting"):M.title},M.id))]})]})]})})}const zp={telegram:Qi,slack:Ww,email:Vc,webhook:Mw,default:Qc},GS={telegram:"Connect with Telegram bots for instant messaging",slack:"Integrate with Slack workspaces for team collaboration",email:"Send and receive messages via email protocols",webhook:"Receive HTTP webhooks for custom integrations",discord:"Connect Discord bots to your community servers",feishu:"Enterprise messaging and collaboration platform"};function YS(){const{data:n}=ds(),{data:r}=Kc(),{data:s}=fs(),{openChannelModal:i}=ya(),[u,d]=y.useState("active"),p=s==null?void 0:s.uiHints;if(!n||!r)return f.jsx("div",{className:"p-8 text-gray-400",children:"Loading channels..."});const h=[{id:"active",label:"Enabled",count:r.channels.filter(g=>{var w;return(w=n.channels[g.name])==null?void 0:w.enabled}).length},{id:"all",label:"All Channels",count:r.channels.length}],v=r.channels.filter(g=>{var S;const w=((S=n.channels[g.name])==null?void 0:S.enabled)||!1;return u==="all"||w});return f.jsxs("div",{className:"animate-fade-in pb-20",children:[f.jsx("div",{className:"flex items-center justify-between mb-8",children:f.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Message Channels"})}),f.jsx(Mg,{tabs:h,activeTab:u,onChange:d}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:v.map(g=>{const w=n.channels[g.name],S=(w==null?void 0:w.enabled)||!1,C=zp[g.name]||zp.default,x=ct(`channels.${g.name}`,p),z=(x==null?void 0:x.help)||GS[g.name]||"Configure this communication channel";return f.jsxs("div",{className:Me("group relative flex flex-col p-5 rounded-2xl border transition-all duration-base cursor-pointer","hover:shadow-card-hover hover:-translate-y-0.5",S?"bg-white border-gray-200 hover:border-gray-300":"bg-gray-50 border-gray-200 hover:border-gray-300 hover:bg-white"),onClick:()=>i(g.name),children:[f.jsxs("div",{className:"flex items-start justify-between mb-4",children:[f.jsx(Tg,{name:g.name,src:$S(g.name),className:Me("h-12 w-12 rounded-xl border transition-all",S?"bg-white border-primary":"bg-white border-gray-200 group-hover:border-gray-300"),imgClassName:"h-6 w-6",fallback:f.jsx(C,{className:"h-6 w-6"})}),S?f.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-600",children:[f.jsx(Qw,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"text-[11px] font-bold",children:"Active"})]}):f.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-gray-100 text-gray-500",children:[f.jsx(Uw,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"text-[11px] font-bold",children:"Inactive"})]})]}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"text-[15px] font-bold text-gray-900 mb-1",children:g.displayName||g.name}),f.jsx("p",{className:"text-[12px] text-gray-500 leading-relaxed line-clamp-2",children:z})]}),f.jsxs("div",{className:"mt-4 pt-3 flex items-center justify-between",children:[f.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] font-semibold text-gray-600 group-hover:text-primary transition-colors cursor-pointer",children:[S?"Configure":"Enable",f.jsx(Um,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]}),g.tutorialUrl&&f.jsx("a",{href:g.tutorialUrl,target:"_blank",rel:"noreferrer",onClick:b=>b.stopPropagation(),className:"flex items-center justify-center h-7 w-7 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",title:"View Guide",children:f.jsx(Iw,{className:"h-3.5 w-3.5"})})]})]},g.name)})}),v.length===0&&f.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[f.jsx("div",{className:"h-16 w-16 flex items-center justify-center rounded-2xl bg-gray-100 mb-4",children:f.jsx(Qc,{className:"h-8 w-8 text-gray-400"})}),f.jsx("h3",{className:"text-[15px] font-bold text-gray-900 mb-2",children:"No channels enabled"}),f.jsx("p",{className:"text-[13px] text-gray-500 max-w-sm",children:"Enable a messaging channel to start receiving messages. Click on any channel to configure it."})]}),f.jsx(qS,{})]})}const XS=[{value:"main",label:"main"},{value:"per-peer",label:"per-peer"},{value:"per-channel-peer",label:"per-channel-peer"},{value:"per-account-channel-peer",label:"per-account-channel-peer"}];function JS(){return{id:"",default:!1,workspace:"",model:"",maxTokens:void 0,contextTokens:void 0,maxToolIterations:void 0}}function ZS(){return{agentId:"",match:{channel:"",accountId:""}}}function ic(n){const r=n.trim();if(!r)return;const s=Number.parseInt(r,10);return Number.isFinite(s)?s:void 0}function e2(){const{data:n,isLoading:r}=ds(),{data:s}=fs(),i=$1(),[u,d]=y.useState([]),[p,h]=y.useState([]),[v,g]=y.useState("per-channel-peer"),[w,S]=y.useState(0),[C,x]=y.useState(2e5);y.useEffect(()=>{var $,X,M;n&&(d((n.agents.list??[]).map(T=>({id:T.id??"",default:!!T.default,workspace:T.workspace??"",model:T.model??"",maxTokens:T.maxTokens,contextTokens:T.contextTokens,maxToolIterations:T.maxToolIterations}))),h((n.bindings??[]).map(T=>{var G,ne,ie;return{agentId:T.agentId??"",match:{channel:((G=T.match)==null?void 0:G.channel)??"",accountId:((ne=T.match)==null?void 0:ne.accountId)??"",peer:(ie=T.match)!=null&&ie.peer?{kind:T.match.peer.kind,id:T.match.peer.id}:void 0}}})),g((($=n.session)==null?void 0:$.dmScope)??"per-channel-peer"),S(((M=(X=n.session)==null?void 0:X.agentToAgent)==null?void 0:M.maxPingPongTurns)??0),x(n.agents.defaults.contextTokens??2e5))},[n]);const z=s==null?void 0:s.uiHints,b=ct("session.dmScope",z),E=ct("session.agentToAgent.maxPingPongTurns",z),_=ct("agents.defaults.contextTokens",z),U=ct("agents.list.*.contextTokens",z),I=ct("agents.list",z),F=ct("bindings",z),q=y.useMemo(()=>{const $=new Set(["main"]);return u.forEach(X=>{const M=X.id.trim();M&&$.add(M)}),$},[u]),ee=($,X)=>{d(M=>M.map((T,G)=>G===$?{...T,...X}:T))},V=($,X)=>{h(M=>M.map((T,G)=>G===$?X:T))},re=()=>{try{const $=u.map((T,G)=>{var Se,we;const ne=T.id.trim();if(!ne)throw new Error(`agents.list[${G}].id is required`);const ie={id:ne};return T.default&&(ie.default=!0),(Se=T.workspace)!=null&&Se.trim()&&(ie.workspace=T.workspace.trim()),(we=T.model)!=null&&we.trim()&&(ie.model=T.model.trim()),typeof T.maxTokens=="number"&&(ie.maxTokens=T.maxTokens),typeof T.contextTokens=="number"&&(ie.contextTokens=Math.max(1e3,T.contextTokens)),typeof T.maxToolIterations=="number"&&(ie.maxToolIterations=T.maxToolIterations),ie}),X=$.map(T=>T.id).filter((T,G,ne)=>ne.indexOf(T)!==G);if(X.length>0){tt.error(`Duplicate agent id: ${X[0]}`);return}const M=p.map((T,G)=>{var J,j,A,ae;const ne=T.agentId.trim(),ie=T.match.channel.trim(),Se=((J=T.match.accountId)==null?void 0:J.trim())??"",we=(j=T.match.peer)==null?void 0:j.kind,Z=((ae=(A=T.match.peer)==null?void 0:A.id)==null?void 0:ae.trim())??"";if(!ne)throw new Error(`bindings[${G}].agentId is required`);if(!q.has(ne))throw new Error(`bindings[${G}].agentId '${ne}' not found in agents.list/main`);if(!ie)throw new Error(`bindings[${G}].match.channel is required`);const K={agentId:ne,match:{channel:ie}};if(Se&&(K.match.accountId=Se),we){if(!Z)throw new Error(`bindings[${G}].match.peer.id is required when peer.kind is set`);K.match.peer={kind:we,id:Z}}return K});i.mutate({data:{agents:{defaults:{contextTokens:Math.max(1e3,C)},list:$},bindings:M,session:{dmScope:v,agentToAgent:{maxPingPongTurns:Math.min(5,Math.max(0,w))}}}})}catch($){const X=$ instanceof Error?$.message:String($);tt.error(X)}};return r||!n?f.jsx("div",{className:"p-8 text-gray-400",children:"Loading runtime settings..."}):f.jsxs("div",{className:"space-y-6 pb-20 animate-fade-in",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Routing & Runtime"}),f.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Align multi-agent routing with OpenClaw: bindings, agent pool, and DM scope."})]}),f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsx(so,{children:(b==null?void 0:b.label)??"DM Scope"}),f.jsx(ao,{children:(b==null?void 0:b.help)??"Control how direct-message sessions are isolated."})]}),f.jsxs(io,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium text-gray-800",children:(_==null?void 0:_.label)??"Default Context Tokens"}),f.jsx(De,{type:"number",min:1e3,step:1e3,value:C,onChange:$=>x(Math.max(1e3,Number.parseInt($.target.value,10)||1e3))}),f.jsx("p",{className:"text-xs text-gray-500",children:(_==null?void 0:_.help)??"Input context budget for agents when no per-agent override is set."})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium text-gray-800",children:(b==null?void 0:b.label)??"DM Scope"}),f.jsx("select",{value:v,onChange:$=>g($.target.value),className:"flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm",children:XS.map($=>f.jsx("option",{value:$.value,children:$.label},$.value))})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("label",{className:"text-sm font-medium text-gray-800",children:(E==null?void 0:E.label)??"Max Ping-Pong Turns"}),f.jsx(De,{type:"number",min:0,max:5,value:w,onChange:$=>S(Math.max(0,Number.parseInt($.target.value,10)||0))}),f.jsx("p",{className:"text-xs text-gray-500",children:(E==null?void 0:E.help)??"Set to 0 to block automatic agent-to-agent ping-pong loops."})]})]})]}),f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsx(so,{children:(I==null?void 0:I.label)??"Agent List"}),f.jsx(ao,{children:(I==null?void 0:I.help)??"Run multiple fixed-role agents in one gateway process."})]}),f.jsxs(io,{className:"space-y-3",children:[u.map(($,X)=>f.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[f.jsx(De,{value:$.id,onChange:M=>ee(X,{id:M.target.value}),placeholder:"Agent ID (e.g. engineer)"}),f.jsx(De,{value:$.workspace??"",onChange:M=>ee(X,{workspace:M.target.value}),placeholder:"Workspace override (optional)"}),f.jsx(De,{value:$.model??"",onChange:M=>ee(X,{model:M.target.value}),placeholder:"Model override (optional)"}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[f.jsx(De,{type:"number",min:1,value:$.maxTokens??"",onChange:M=>ee(X,{maxTokens:ic(M.target.value)}),placeholder:"Max tokens"}),f.jsx(De,{type:"number",min:1e3,step:1e3,value:$.contextTokens??"",onChange:M=>ee(X,{contextTokens:ic(M.target.value)}),placeholder:(U==null?void 0:U.label)??"Context tokens"}),f.jsx(De,{type:"number",min:1,value:$.maxToolIterations??"",onChange:M=>ee(X,{maxToolIterations:ic(M.target.value)}),placeholder:"Max tools"})]})]}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[f.jsx(nd,{checked:!!$.default,onCheckedChange:M=>{if(!M){ee(X,{default:!1});return}d(T=>T.map((G,ne)=>({...G,default:ne===X})))}}),f.jsx("span",{children:"Default agent"})]}),f.jsxs(Xe,{type:"button",variant:"outline",size:"sm",onClick:()=>d(M=>M.filter((T,G)=>G!==X)),children:[f.jsx(el,{className:"h-4 w-4 mr-1"}),"Remove"]})]})]},`${X}-${$.id}`)),f.jsxs(Xe,{type:"button",variant:"outline",onClick:()=>d($=>[...$,JS()]),children:[f.jsx(Nc,{className:"h-4 w-4 mr-2"}),"Add Agent"]})]})]}),f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsx(so,{children:(F==null?void 0:F.label)??"Bindings"}),f.jsx(ao,{children:(F==null?void 0:F.help)??"Route inbound message by channel + account + peer to target agent."})]}),f.jsxs(io,{className:"space-y-3",children:[p.map(($,X)=>{var T,G;const M=((T=$.match.peer)==null?void 0:T.kind)??"";return f.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[f.jsx(De,{value:$.agentId,onChange:ne=>V(X,{...$,agentId:ne.target.value}),placeholder:"Target agent ID"}),f.jsx(De,{value:$.match.channel,onChange:ne=>V(X,{...$,match:{...$.match,channel:ne.target.value}}),placeholder:"Channel (e.g. discord)"}),f.jsx(De,{value:$.match.accountId??"",onChange:ne=>V(X,{...$,match:{...$.match,accountId:ne.target.value}}),placeholder:"Account ID (optional)"}),f.jsxs("select",{value:M,onChange:ne=>{var Se;const ie=ne.target.value;if(!ie){V(X,{...$,match:{...$.match,peer:void 0}});return}V(X,{...$,match:{...$.match,peer:{kind:ie,id:((Se=$.match.peer)==null?void 0:Se.id)??""}}})},className:"flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm",children:[f.jsx("option",{value:"",children:"Peer kind (optional)"}),f.jsx("option",{value:"direct",children:"direct"}),f.jsx("option",{value:"group",children:"group"}),f.jsx("option",{value:"channel",children:"channel"})]}),f.jsx(De,{value:((G=$.match.peer)==null?void 0:G.id)??"",onChange:ne=>V(X,{...$,match:{...$.match,peer:M?{kind:M,id:ne.target.value}:void 0}}),placeholder:"Peer ID (requires peer kind)"})]}),f.jsx("div",{className:"flex justify-end",children:f.jsxs(Xe,{type:"button",variant:"outline",size:"sm",onClick:()=>h(ne=>ne.filter((ie,Se)=>Se!==X)),children:[f.jsx(el,{className:"h-4 w-4 mr-1"}),"Remove"]})})]},`${X}-${$.agentId}`)}),f.jsxs(Xe,{type:"button",variant:"outline",onClick:()=>h($=>[...$,ZS()]),children:[f.jsx(Nc,{className:"h-4 w-4 mr-2"}),"Add Binding"]})]})]}),f.jsx("div",{className:"flex justify-end",children:f.jsxs(Xe,{type:"button",onClick:re,disabled:i.isPending,children:[f.jsx($m,{className:"h-4 w-4 mr-2"}),i.isPending?"Saving...":"Save Runtime Settings"]})})]})}const la="__unknown_channel__";function Og(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString()}function _p(n){const r=n.indexOf(":");return r<=0?la:n.slice(0,r).trim()||la}function zg(n){return n===la?B("sessionsUnknownChannel"):n}function Dp(n){const{session:r}=n;return f.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-2 text-xs text-gray-600",children:[f.jsxs("div",{children:[f.jsxs("span",{className:"font-semibold text-gray-800",children:[B("sessionsKeyLabel"),":"]})," ",r.key]}),f.jsxs("div",{children:[f.jsxs("span",{className:"font-semibold text-gray-800",children:[B("sessionsChannelLabel"),":"]})," ",zg(n.channel)]}),f.jsxs("div",{children:[f.jsxs("span",{className:"font-semibold text-gray-800",children:[B("sessionsMessagesLabel"),":"]})," ",r.messageCount]}),f.jsxs("div",{children:[f.jsxs("span",{className:"font-semibold text-gray-800",children:[B("sessionsUpdatedLabel"),":"]})," ",Og(r.updatedAt)]}),f.jsxs("div",{children:[f.jsxs("span",{className:"font-semibold text-gray-800",children:[B("sessionsLastRoleLabel"),":"]})," ",r.lastRole??"-"]})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[f.jsx(De,{value:n.labelValue,onChange:s=>n.onLabelChange(s.target.value),placeholder:B("sessionsLabelPlaceholder")}),f.jsx(De,{value:n.modelValue,onChange:s=>n.onModelChange(s.target.value),placeholder:B("sessionsModelPlaceholder")})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(Xe,{type:"button",variant:n.isSelected?"default":"outline",size:"sm",onClick:n.onToggleHistory,children:n.isSelected?B("sessionsHideHistory"):B("sessionsShowHistory")}),f.jsxs(Xe,{type:"button",variant:"outline",size:"sm",onClick:n.onSave,children:[f.jsx($m,{className:"h-4 w-4 mr-1"}),B("sessionsSaveMeta")]}),f.jsx(Xe,{type:"button",variant:"outline",size:"sm",onClick:n.onClear,children:B("sessionsClearHistory")}),f.jsxs(Xe,{type:"button",variant:"outline",size:"sm",onClick:n.onDelete,children:[f.jsx(el,{className:"h-4 w-4 mr-1"}),B("delete")]})]})]})}function t2({message:n,index:r}){return f.jsxs("div",{className:"rounded-lg border border-gray-200 p-2",children:[f.jsxs("div",{className:"text-xs text-gray-500",children:[f.jsx("span",{className:"font-semibold text-gray-700",children:n.role})," · ",Og(n.timestamp)]}),f.jsx("div",{className:"text-sm whitespace-pre-wrap break-words mt-1",children:n.content})]},`${n.timestamp}-${r}`)}function n2(){var re,$,X;const[n,r]=y.useState(""),[s,i]=y.useState(100),[u,d]=y.useState(0),[p,h]=y.useState("all"),[v,g]=y.useState(null),[w,S]=y.useState({}),[C,x]=y.useState({}),z=y.useMemo(()=>({q:n.trim()||void 0,limit:s,activeMinutes:u}),[n,s,u]),b=H1(z),E=V1(v,200),_=Q1(),U=K1();y.useEffect(()=>{var T;const M=((T=b.data)==null?void 0:T.sessions)??[];M.length&&(S(G=>{const ne={...G};for(const ie of M)ie.key in ne||(ne[ie.key]=ie.label??"");return ne}),x(G=>{const ne={...G};for(const ie of M)ie.key in ne||(ne[ie.key]=ie.preferredModel??"");return ne}))},[b.data]);const I=((re=b.data)==null?void 0:re.sessions)??[],F=y.useMemo(()=>{const M=new Map;for(const T of I){const G=_p(T.key),ne=M.get(G);ne?ne.push(T):M.set(G,[T])}return Array.from(M.entries()).sort((T,G)=>T[0]===la?1:G[0]===la?-1:T[0].localeCompare(G[0])).map(([T,G])=>({channel:T,rows:G}))},[I]),q=M=>{_.mutate({key:M,data:{label:(w[M]??"").trim()||null,preferredModel:(C[M]??"").trim()||null}})},ee=M=>{_.mutate({key:M,data:{clearHistory:!0}}),v===M&&g(null)},V=M=>{window.confirm(`${B("sessionsDeleteConfirm")} ${M} ?`)&&U.mutate({key:M},{onSuccess:()=>{v===M&&g(null)}})};return f.jsxs("div",{className:"space-y-6 pb-20 animate-fade-in",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:B("sessionsPageTitle")}),f.jsx("p",{className:"text-sm text-gray-500 mt-1",children:B("sessionsPageDescription")})]}),f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsx(so,{children:B("sessionsFiltersTitle")}),f.jsx(ao,{children:B("sessionsFiltersDescription")})]}),f.jsxs(io,{className:"grid grid-cols-1 md:grid-cols-5 gap-3",children:[f.jsxs("div",{className:"md:col-span-2 relative",children:[f.jsx($w,{className:"h-4 w-4 absolute left-3 top-3 text-gray-400"}),f.jsx(De,{value:n,onChange:M=>r(M.target.value),placeholder:B("sessionsSearchPlaceholder"),className:"pl-9"})]}),f.jsx(De,{type:"number",min:0,value:u,onChange:M=>d(Math.max(0,Number.parseInt(M.target.value,10)||0)),placeholder:B("sessionsActiveMinutesPlaceholder")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(De,{type:"number",min:1,value:s,onChange:M=>i(Math.max(1,Number.parseInt(M.target.value,10)||1)),placeholder:B("sessionsLimitPlaceholder")}),f.jsx(Xe,{type:"button",variant:"outline",onClick:()=>b.refetch(),children:f.jsx(Bw,{className:"h-4 w-4"})})]}),f.jsxs("div",{className:"space-y-1",children:[f.jsx("div",{className:"text-xs text-gray-500",children:B("sessionsGroupModeLabel")}),f.jsxs("select",{value:p,onChange:M=>h(M.target.value),className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg bg-white",children:[f.jsx("option",{value:"all",children:B("sessionsGroupModeAll")}),f.jsx("option",{value:"by-channel",children:B("sessionsGroupModeByChannel")})]})]})]})]}),f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsx(so,{children:B("sessionsListTitle")}),f.jsxs(ao,{children:[B("sessionsTotalLabel")," ",(($=b.data)==null?void 0:$.total)??0," · ",B("sessionsCurrentLabel")," ",I.length]})]}),f.jsxs(io,{className:"space-y-3",children:[b.isLoading?f.jsx("div",{className:"text-sm text-gray-500",children:B("sessionsLoading")}):null,b.error?f.jsx("div",{className:"text-sm text-red-600",children:b.error.message}):null,!b.isLoading&&!I.length?f.jsx("div",{className:"text-sm text-gray-500",children:B("sessionsEmpty")}):null,p==="all"?I.map(M=>f.jsx(Dp,{session:M,channel:_p(M.key),isSelected:v===M.key,labelValue:w[M.key]??"",modelValue:C[M.key]??"",onToggleHistory:()=>g(T=>T===M.key?null:M.key),onLabelChange:T=>S(G=>({...G,[M.key]:T})),onModelChange:T=>x(G=>({...G,[M.key]:T})),onSave:()=>q(M.key),onClear:()=>ee(M.key),onDelete:()=>V(M.key)},M.key)):F.map(M=>f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"text-sm font-semibold text-gray-700",children:[B("sessionsChannelLabel"),": ",zg(M.channel)," (",M.rows.length,")"]}),f.jsx("div",{className:"space-y-3",children:M.rows.map(T=>f.jsx(Dp,{session:T,channel:M.channel,isSelected:v===T.key,labelValue:w[T.key]??"",modelValue:C[T.key]??"",onToggleHistory:()=>g(G=>G===T.key?null:T.key),onLabelChange:G=>S(ne=>({...ne,[T.key]:G})),onModelChange:G=>x(ne=>({...ne,[T.key]:G})),onSave:()=>q(T.key),onClear:()=>ee(T.key),onDelete:()=>V(T.key)},T.key))})]},M.channel))]})]}),v?f.jsxs(Hn,{children:[f.jsxs(oo,{children:[f.jsxs(so,{children:[B("sessionsHistoryTitle"),": ",v]}),f.jsx(ao,{children:B("sessionsHistoryDescription")})]}),f.jsxs(io,{className:"space-y-2",children:[E.isLoading?f.jsx("div",{className:"text-sm text-gray-500",children:B("sessionsHistoryLoading")}):null,E.error?f.jsx("div",{className:"text-sm text-red-600",children:E.error.message}):null,E.data?f.jsxs("div",{className:"text-xs text-gray-500",children:[B("sessionsTotalLabel"),": ",E.data.totalMessages," · metadata: ",JSON.stringify(E.data.metadata??{})]}):null,f.jsx("div",{className:"max-h-[480px] overflow-auto space-y-2",children:(((X=E.data)==null?void 0:X.messages)??[]).map((M,T)=>f.jsx(t2,{message:M,index:T},`${M.timestamp}-${T}`))})]})]}):null,(_.isPending||U.isPending)&&f.jsx("div",{className:"text-xs text-gray-500",children:B("sessionsApplyingChanges")})]})}class r2{constructor(r){this.url=r,this.ws=null,this.handlers=new Map,this.reconnectTimer=null,this.manualClose=!1}connect(){this.manualClose=!1,this.ws=new WebSocket(this.url),this.ws.onopen=()=>{console.log("WebSocket connected"),this.emit({type:"connection.open",payload:{}})},this.ws.onmessage=r=>{try{const s=JSON.parse(r.data);this.emit(s)}catch(s){console.error("Failed to parse WebSocket message:",s)}},this.ws.onclose=()=>{console.log("WebSocket disconnected"),this.manualClose||this.scheduleReconnect()},this.ws.onerror=r=>{console.error("WebSocket error:",r)}}on(r,s){this.handlers.has(r)||this.handlers.set(r,new Set),this.handlers.get(r).add(s)}off(r,s){var i;(i=this.handlers.get(r))==null||i.delete(s)}emit(r){const s=this.handlers.get(r.type);s==null||s.forEach(i=>i(r))}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect()},3e3))}disconnect(){var r;this.manualClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(r=this.ws)==null||r.close(),this.ws=null}}function o2(n){const[r,s]=y.useState(null),{setConnectionStatus:i}=ya();return y.useEffect(()=>{const u=(()=>{const p=Ki==null?void 0:Ki.replace(/\/$/,"");if(!p)return"ws://127.0.0.1:18791/ws";try{const h=new URL(p,window.location.origin);return`${h.protocol==="https:"?"wss:":h.protocol==="http:"?"ws:":h.protocol}//${h.host}/ws`}catch{return p.startsWith("wss://")||p.startsWith("ws://")?`${p}/ws`:p.startsWith("https://")?`${p.replace(/^https:/,"wss:")}/ws`:p.startsWith("http://")?`${p.replace(/^http:/,"ws:")}/ws`:`${p}/ws`}})(),d=new r2(u);return d.on("connection.open",()=>{i("connected")}),d.on("config.updated",()=>{n&&n.invalidateQueries({queryKey:["config"]})}),d.on("error",p=>{p.type==="error"&&console.error("WebSocket error:",p.payload.message)}),d.connect(),s(d),()=>d.disconnect()},[i,n]),r}const Ap=new _x({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0}}});function s2(){o2(Ap);const n=Kn();return f.jsxs(Dx,{client:Ap,children:[f.jsx(Gw,{children:f.jsx("div",{className:"animate-fade-in w-full h-full",children:f.jsxs(O0,{children:[f.jsx(vr,{path:"/model",element:f.jsx(G1,{})}),f.jsx(vr,{path:"/providers",element:f.jsx(WS,{})}),f.jsx(vr,{path:"/channels",element:f.jsx(YS,{})}),f.jsx(vr,{path:"/runtime",element:f.jsx(e2,{})}),f.jsx(vr,{path:"/sessions",element:f.jsx(n2,{})}),f.jsx(vr,{path:"/",element:f.jsx(Yh,{to:"/model",replace:!0})}),f.jsx(vr,{path:"*",element:f.jsx(Yh,{to:"/model",replace:!0})})]})},n.pathname)}),f.jsx(A1,{position:"top-right",richColors:!0})]})}Dv.createRoot(document.getElementById("root")).render(f.jsx(y.StrictMode,{children:f.jsx(ox,{children:f.jsx(s2,{})})}));
|