@nextclaw/ui 0.5.10 → 0.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var Im=t=>{throw TypeError(t)};var id=(t,r,o)=>r.has(t)||Im("Cannot "+o);var I=(t,r,o)=>(id(t,r,"read from private field"),o?o.call(t):r.get(t)),we=(t,r,o)=>r.has(t)?Im("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,o),de=(t,r,o,a)=>(id(t,r,"write to private field"),a?a.call(t,o):r.set(t,o),o),je=(t,r,o)=>(id(t,r,"access private method"),o);var xl=(t,r,o,a)=>({set _(l){de(t,r,l,o)},get _(){return I(t,r,a)}});function p1(t,r){for(var o=0;o<r.length;o++){const a=r[o];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const c=Object.getOwnPropertyDescriptor(a,l);c&&Object.defineProperty(t,l,c.get?c:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function o(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(l){if(l.ep)return;l.ep=!0;const c=o(l);fetch(l.href,c)}})();function uy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ld={exports:{}},Aa={},cd={exports:{}},Me={};/**
1
+ var Lm=t=>{throw TypeError(t)};var cd=(t,r,o)=>r.has(t)||Lm("Cannot "+o);var I=(t,r,o)=>(cd(t,r,"read from private field"),o?o.call(t):r.get(t)),we=(t,r,o)=>r.has(t)?Lm("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,o),de=(t,r,o,a)=>(cd(t,r,"write to private field"),a?a.call(t,o):r.set(t,o),o),je=(t,r,o)=>(cd(t,r,"access private method"),o);var bl=(t,r,o,a)=>({set _(l){de(t,r,l,o)},get _(){return I(t,r,a)}});function g1(t,r){for(var o=0;o<r.length;o++){const a=r[o];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in t)){const c=Object.getOwnPropertyDescriptor(a,l);c&&Object.defineProperty(t,l,c.get?c:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function o(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(l){if(l.ep)return;l.ep=!0;const c=o(l);fetch(l.href,c)}})();function fy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ud={exports:{}},za={},dd={exports:{}},Me={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Im=t=>{throw TypeError(t)};var id=(t,r,o)=>r.has(t)||Im("Cannot "+o);var I=(
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Am;function m1(){if(Am)return Me;Am=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.iterator;function k(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,v={};function C(M,F,le){this.props=M,this.context=F,this.refs=v,this.updater=le||w}C.prototype.isReactComponent={},C.prototype.setState=function(M,F){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,F,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function R(){}R.prototype=C.prototype;function j(M,F,le){this.props=M,this.context=F,this.refs=v,this.updater=le||w}var P=j.prototype=new R;P.constructor=j,N(P,C.prototype),P.isPureReactComponent=!0;var A=Array.isArray,$=Object.prototype.hasOwnProperty,B={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function X(M,F,le){var J,ue={},xe=null,ne=null;if(F!=null)for(J in F.ref!==void 0&&(ne=F.ref),F.key!==void 0&&(xe=""+F.key),F)$.call(F,J)&&!H.hasOwnProperty(J)&&(ue[J]=F[J]);var he=arguments.length-2;if(he===1)ue.children=le;else if(1<he){for(var be=Array(he),Ce=0;Ce<he;Ce++)be[Ce]=arguments[Ce+2];ue.children=be}if(M&&M.defaultProps)for(J in he=M.defaultProps,he)ue[J]===void 0&&(ue[J]=he[J]);return{$$typeof:t,type:M,key:xe,ref:ne,props:ue,_owner:B.current}}function W(M,F){return{$$typeof:t,type:M.type,key:F,ref:M.ref,props:M.props,_owner:M._owner}}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function _(M){var F={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(le){return F[le]})}var O=/\/+/g;function Z(M,F){return typeof M=="object"&&M!==null&&M.key!=null?_(""+M.key):F.toString(36)}function ee(M,F,le,J,ue){var xe=typeof M;(xe==="undefined"||xe==="boolean")&&(M=null);var ne=!1;if(M===null)ne=!0;else switch(xe){case"string":case"number":ne=!0;break;case"object":switch(M.$$typeof){case t:case r:ne=!0}}if(ne)return ne=M,ue=ue(ne),M=J===""?"."+Z(ne,0):J,A(ue)?(le="",M!=null&&(le=M.replace(O,"$&/")+"/"),ee(ue,F,le,"",function(Ce){return Ce})):ue!=null&&(Y(ue)&&(ue=W(ue,le+(!ue.key||ne&&ne.key===ue.key?"":(""+ue.key).replace(O,"$&/")+"/")+M)),F.push(ue)),1;if(ne=0,J=J===""?".":J+":",A(M))for(var he=0;he<M.length;he++){xe=M[he];var be=J+Z(xe,he);ne+=ee(xe,F,le,be,ue)}else if(be=k(M),typeof be=="function")for(M=be.call(M),he=0;!(xe=M.next()).done;)xe=xe.value,be=J+Z(xe,he++),ne+=ee(xe,F,le,be,ue);else if(xe==="object")throw F=String(M),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return ne}function G(M,F,le){if(M==null)return M;var J=[],ue=0;return ee(M,J,"","",function(xe){return F.call(le,xe,ue++)}),J}function ie(M){if(M._status===-1){var F=M._result;F=F(),F.then(function(le){(M._status===0||M._status===-1)&&(M._status=1,M._result=le)},function(le){(M._status===0||M._status===-1)&&(M._status=2,M._result=le)}),M._status===-1&&(M._status=0,M._result=F)}if(M._status===1)return M._result.default;throw M._result}var ce={current:null},K={transition:null},q={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:K,ReactCurrentOwner:B};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Me.Children={map:G,forEach:function(M,F,le){G(M,function(){F.apply(this,arguments)},le)},count:function(M){var F=0;return G(M,function(){F++}),F},toArray:function(M){return G(M,function(F){return F})||[]},only:function(M){if(!Y(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Me.Component=C,Me.Fragment=o,Me.Profiler=l,Me.PureComponent=j,Me.StrictMode=a,Me.Suspense=g,Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Me.act=Q,Me.cloneElement=function(M,F,le){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var J=N({},M.props),ue=M.key,xe=M.ref,ne=M._owner;if(F!=null){if(F.ref!==void 0&&(xe=F.ref,ne=B.current),F.key!==void 0&&(ue=""+F.key),M.type&&M.type.defaultProps)var he=M.type.defaultProps;for(be in F)$.call(F,be)&&!H.hasOwnProperty(be)&&(J[be]=F[be]===void 0&&he!==void 0?he[be]:F[be])}var be=arguments.length-2;if(be===1)J.children=le;else if(1<be){he=Array(be);for(var Ce=0;Ce<be;Ce++)he[Ce]=arguments[Ce+2];J.children=he}return{$$typeof:t,type:M.type,key:ue,ref:xe,props:J,_owner:ne}},Me.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:c,_context:M},M.Consumer=M},Me.createElement=X,Me.createFactory=function(M){var F=X.bind(null,M);return F.type=M,F},Me.createRef=function(){return{current:null}},Me.forwardRef=function(M){return{$$typeof:h,render:M}},Me.isValidElement=Y,Me.lazy=function(M){return{$$typeof:x,_payload:{_status:-1,_result:M},_init:ie}},Me.memo=function(M,F){return{$$typeof:y,type:M,compare:F===void 0?null:F}},Me.startTransition=function(M){var F=K.transition;K.transition={};try{M()}finally{K.transition=F}},Me.unstable_act=Q,Me.useCallback=function(M,F){return ce.current.useCallback(M,F)},Me.useContext=function(M){return ce.current.useContext(M)},Me.useDebugValue=function(){},Me.useDeferredValue=function(M){return ce.current.useDeferredValue(M)},Me.useEffect=function(M,F){return ce.current.useEffect(M,F)},Me.useId=function(){return ce.current.useId()},Me.useImperativeHandle=function(M,F,le){return ce.current.useImperativeHandle(M,F,le)},Me.useInsertionEffect=function(M,F){return ce.current.useInsertionEffect(M,F)},Me.useLayoutEffect=function(M,F){return ce.current.useLayoutEffect(M,F)},Me.useMemo=function(M,F){return ce.current.useMemo(M,F)},Me.useReducer=function(M,F,le){return ce.current.useReducer(M,F,le)},Me.useRef=function(M){return ce.current.useRef(M)},Me.useState=function(M){return ce.current.useState(M)},Me.useSyncExternalStore=function(M,F,le){return ce.current.useSyncExternalStore(M,F,le)},Me.useTransition=function(){return ce.current.useTransition()},Me.version="18.3.1",Me}var Lm;function pf(){return Lm||(Lm=1,cd.exports=m1()),cd.exports}/**
9
+ */var zm;function y1(){if(zm)return Me;zm=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.iterator;function k(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,v={};function C(M,F,le){this.props=M,this.context=F,this.refs=v,this.updater=le||w}C.prototype.isReactComponent={},C.prototype.setState=function(M,F){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,F,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function R(){}R.prototype=C.prototype;function j(M,F,le){this.props=M,this.context=F,this.refs=v,this.updater=le||w}var P=j.prototype=new R;P.constructor=j,N(P,C.prototype),P.isPureReactComponent=!0;var A=Array.isArray,$=Object.prototype.hasOwnProperty,B={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function X(M,F,le){var J,ue={},xe=null,ne=null;if(F!=null)for(J in F.ref!==void 0&&(ne=F.ref),F.key!==void 0&&(xe=""+F.key),F)$.call(F,J)&&!W.hasOwnProperty(J)&&(ue[J]=F[J]);var he=arguments.length-2;if(he===1)ue.children=le;else if(1<he){for(var be=Array(he),Ce=0;Ce<he;Ce++)be[Ce]=arguments[Ce+2];ue.children=be}if(M&&M.defaultProps)for(J in he=M.defaultProps,he)ue[J]===void 0&&(ue[J]=he[J]);return{$$typeof:t,type:M,key:xe,ref:ne,props:ue,_owner:B.current}}function H(M,F){return{$$typeof:t,type:M.type,key:F,ref:M.ref,props:M.props,_owner:M._owner}}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function _(M){var F={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(le){return F[le]})}var O=/\/+/g;function Z(M,F){return typeof M=="object"&&M!==null&&M.key!=null?_(""+M.key):F.toString(36)}function ee(M,F,le,J,ue){var xe=typeof M;(xe==="undefined"||xe==="boolean")&&(M=null);var ne=!1;if(M===null)ne=!0;else switch(xe){case"string":case"number":ne=!0;break;case"object":switch(M.$$typeof){case t:case r:ne=!0}}if(ne)return ne=M,ue=ue(ne),M=J===""?"."+Z(ne,0):J,A(ue)?(le="",M!=null&&(le=M.replace(O,"$&/")+"/"),ee(ue,F,le,"",function(Ce){return Ce})):ue!=null&&(Y(ue)&&(ue=H(ue,le+(!ue.key||ne&&ne.key===ue.key?"":(""+ue.key).replace(O,"$&/")+"/")+M)),F.push(ue)),1;if(ne=0,J=J===""?".":J+":",A(M))for(var he=0;he<M.length;he++){xe=M[he];var be=J+Z(xe,he);ne+=ee(xe,F,le,be,ue)}else if(be=k(M),typeof be=="function")for(M=be.call(M),he=0;!(xe=M.next()).done;)xe=xe.value,be=J+Z(xe,he++),ne+=ee(xe,F,le,be,ue);else if(xe==="object")throw F=String(M),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return ne}function G(M,F,le){if(M==null)return M;var J=[],ue=0;return ee(M,J,"","",function(xe){return F.call(le,xe,ue++)}),J}function ie(M){if(M._status===-1){var F=M._result;F=F(),F.then(function(le){(M._status===0||M._status===-1)&&(M._status=1,M._result=le)},function(le){(M._status===0||M._status===-1)&&(M._status=2,M._result=le)}),M._status===-1&&(M._status=0,M._result=F)}if(M._status===1)return M._result.default;throw M._result}var ce={current:null},K={transition:null},q={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:K,ReactCurrentOwner:B};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Me.Children={map:G,forEach:function(M,F,le){G(M,function(){F.apply(this,arguments)},le)},count:function(M){var F=0;return G(M,function(){F++}),F},toArray:function(M){return G(M,function(F){return F})||[]},only:function(M){if(!Y(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Me.Component=C,Me.Fragment=o,Me.Profiler=l,Me.PureComponent=j,Me.StrictMode=a,Me.Suspense=g,Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Me.act=Q,Me.cloneElement=function(M,F,le){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var J=N({},M.props),ue=M.key,xe=M.ref,ne=M._owner;if(F!=null){if(F.ref!==void 0&&(xe=F.ref,ne=B.current),F.key!==void 0&&(ue=""+F.key),M.type&&M.type.defaultProps)var he=M.type.defaultProps;for(be in F)$.call(F,be)&&!W.hasOwnProperty(be)&&(J[be]=F[be]===void 0&&he!==void 0?he[be]:F[be])}var be=arguments.length-2;if(be===1)J.children=le;else if(1<be){he=Array(be);for(var Ce=0;Ce<be;Ce++)he[Ce]=arguments[Ce+2];J.children=he}return{$$typeof:t,type:M.type,key:ue,ref:xe,props:J,_owner:ne}},Me.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:c,_context:M},M.Consumer=M},Me.createElement=X,Me.createFactory=function(M){var F=X.bind(null,M);return F.type=M,F},Me.createRef=function(){return{current:null}},Me.forwardRef=function(M){return{$$typeof:h,render:M}},Me.isValidElement=Y,Me.lazy=function(M){return{$$typeof:x,_payload:{_status:-1,_result:M},_init:ie}},Me.memo=function(M,F){return{$$typeof:y,type:M,compare:F===void 0?null:F}},Me.startTransition=function(M){var F=K.transition;K.transition={};try{M()}finally{K.transition=F}},Me.unstable_act=Q,Me.useCallback=function(M,F){return ce.current.useCallback(M,F)},Me.useContext=function(M){return ce.current.useContext(M)},Me.useDebugValue=function(){},Me.useDeferredValue=function(M){return ce.current.useDeferredValue(M)},Me.useEffect=function(M,F){return ce.current.useEffect(M,F)},Me.useId=function(){return ce.current.useId()},Me.useImperativeHandle=function(M,F,le){return ce.current.useImperativeHandle(M,F,le)},Me.useInsertionEffect=function(M,F){return ce.current.useInsertionEffect(M,F)},Me.useLayoutEffect=function(M,F){return ce.current.useLayoutEffect(M,F)},Me.useMemo=function(M,F){return ce.current.useMemo(M,F)},Me.useReducer=function(M,F,le){return ce.current.useReducer(M,F,le)},Me.useRef=function(M){return ce.current.useRef(M)},Me.useState=function(M){return ce.current.useState(M)},Me.useSyncExternalStore=function(M,F,le){return ce.current.useSyncExternalStore(M,F,le)},Me.useTransition=function(){return ce.current.useTransition()},Me.version="18.3.1",Me}var Dm;function gf(){return Dm||(Dm=1,dd.exports=y1()),dd.exports}/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Im=t=>{throw TypeError(t)};var id=(t,r,o)=>r.has(t)||Im("Cannot "+o);var I=(
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var zm;function g1(){if(zm)return Aa;zm=1;var t=pf(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function f(h,g,y){var x,b={},k=null,w=null;y!==void 0&&(k=""+y),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(w=g.ref);for(x in g)a.call(g,x)&&!c.hasOwnProperty(x)&&(b[x]=g[x]);if(h&&h.defaultProps)for(x in g=h.defaultProps,g)b[x]===void 0&&(b[x]=g[x]);return{$$typeof:r,type:h,key:k,ref:w,props:b,_owner:l.current}}return Aa.Fragment=o,Aa.jsx=f,Aa.jsxs=f,Aa}var Dm;function y1(){return Dm||(Dm=1,ld.exports=g1()),ld.exports}var u=y1(),m=pf();const ae=uy(m),dy=p1({__proto__:null,default:ae},[m]);var wl={},ud={exports:{}},Ft={},dd={exports:{}},fd={};/**
17
+ */var Om;function v1(){if(Om)return za;Om=1;var t=gf(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function f(h,g,y){var x,b={},k=null,w=null;y!==void 0&&(k=""+y),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(w=g.ref);for(x in g)a.call(g,x)&&!c.hasOwnProperty(x)&&(b[x]=g[x]);if(h&&h.defaultProps)for(x in g=h.defaultProps,g)b[x]===void 0&&(b[x]=g[x]);return{$$typeof:r,type:h,key:k,ref:w,props:b,_owner:l.current}}return za.Fragment=o,za.jsx=f,za.jsxs=f,za}var _m;function x1(){return _m||(_m=1,ud.exports=v1()),ud.exports}var u=x1(),m=gf();const ae=fy(m),hy=g1({__proto__:null,default:ae},[m]);var Sl={},fd={exports:{}},Ft={},hd={exports:{}},pd={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Im=t=>{throw TypeError(t)};var id=(t,r,o)=>r.has(t)||Im("Cannot "+o);var I=(
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var Om;function v1(){return Om||(Om=1,(function(t){function r(K,q){var Q=K.length;K.push(q);e:for(;0<Q;){var M=Q-1>>>1,F=K[M];if(0<l(F,q))K[M]=q,K[Q]=F,Q=M;else break e}}function o(K){return K.length===0?null:K[0]}function a(K){if(K.length===0)return null;var q=K[0],Q=K.pop();if(Q!==q){K[0]=Q;e:for(var M=0,F=K.length,le=F>>>1;M<le;){var J=2*(M+1)-1,ue=K[J],xe=J+1,ne=K[xe];if(0>l(ue,Q))xe<F&&0>l(ne,ue)?(K[M]=ne,K[xe]=Q,M=xe):(K[M]=ue,K[J]=Q,M=J);else if(xe<F&&0>l(ne,Q))K[M]=ne,K[xe]=Q,M=xe;else break e}}return q}function l(K,q){var Q=K.sortIndex-q.sortIndex;return Q!==0?Q:K.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],y=[],x=1,b=null,k=3,w=!1,N=!1,v=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(K){for(var q=o(y);q!==null;){if(q.callback===null)a(y);else if(q.startTime<=K)a(y),q.sortIndex=q.expirationTime,r(g,q);else break;q=o(y)}}function A(K){if(v=!1,P(K),!N)if(o(g)!==null)N=!0,ie($);else{var q=o(y);q!==null&&ce(A,q.startTime-K)}}function $(K,q){N=!1,v&&(v=!1,R(X),X=-1),w=!0;var Q=k;try{for(P(q),b=o(g);b!==null&&(!(b.expirationTime>q)||K&&!_());){var M=b.callback;if(typeof M=="function"){b.callback=null,k=b.priorityLevel;var F=M(b.expirationTime<=q);q=t.unstable_now(),typeof F=="function"?b.callback=F:b===o(g)&&a(g),P(q)}else a(g);b=o(g)}if(b!==null)var le=!0;else{var J=o(y);J!==null&&ce(A,J.startTime-q),le=!1}return le}finally{b=null,k=Q,w=!1}}var B=!1,H=null,X=-1,W=5,Y=-1;function _(){return!(t.unstable_now()-Y<W)}function O(){if(H!==null){var K=t.unstable_now();Y=K;var q=!0;try{q=H(!0,K)}finally{q?Z():(B=!1,H=null)}}else B=!1}var Z;if(typeof j=="function")Z=function(){j(O)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,G=ee.port2;ee.port1.onmessage=O,Z=function(){G.postMessage(null)}}else Z=function(){C(O,0)};function ie(K){H=K,B||(B=!0,Z())}function ce(K,q){X=C(function(){K(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(K){K.callback=null},t.unstable_continueExecution=function(){N||w||(N=!0,ie($))},t.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<K?Math.floor(1e3/K):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return o(g)},t.unstable_next=function(K){switch(k){case 1:case 2:case 3:var q=3;break;default:q=k}var Q=k;k=q;try{return K()}finally{k=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(K,q){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Q=k;k=K;try{return q()}finally{k=Q}},t.unstable_scheduleCallback=function(K,q,Q){var M=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?M+Q:M):Q=M,K){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=Q+F,K={id:x++,callback:q,priorityLevel:K,startTime:Q,expirationTime:F,sortIndex:-1},Q>M?(K.sortIndex=Q,r(y,K),o(g)===null&&K===o(y)&&(v?(R(X),X=-1):v=!0,ce(A,Q-M))):(K.sortIndex=F,r(g,K),N||w||(N=!0,ie($))),K},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(K){var q=k;return function(){var Q=k;k=q;try{return K.apply(this,arguments)}finally{k=Q}}}})(fd)),fd}var _m;function x1(){return _m||(_m=1,dd.exports=v1()),dd.exports}/**
25
+ */var Fm;function w1(){return Fm||(Fm=1,(function(t){function r(K,q){var Q=K.length;K.push(q);e:for(;0<Q;){var M=Q-1>>>1,F=K[M];if(0<l(F,q))K[M]=q,K[Q]=F,Q=M;else break e}}function o(K){return K.length===0?null:K[0]}function a(K){if(K.length===0)return null;var q=K[0],Q=K.pop();if(Q!==q){K[0]=Q;e:for(var M=0,F=K.length,le=F>>>1;M<le;){var J=2*(M+1)-1,ue=K[J],xe=J+1,ne=K[xe];if(0>l(ue,Q))xe<F&&0>l(ne,ue)?(K[M]=ne,K[xe]=Q,M=xe):(K[M]=ue,K[J]=Q,M=J);else if(xe<F&&0>l(ne,Q))K[M]=ne,K[xe]=Q,M=xe;else break e}}return q}function l(K,q){var Q=K.sortIndex-q.sortIndex;return Q!==0?Q:K.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],y=[],x=1,b=null,k=3,w=!1,N=!1,v=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(K){for(var q=o(y);q!==null;){if(q.callback===null)a(y);else if(q.startTime<=K)a(y),q.sortIndex=q.expirationTime,r(g,q);else break;q=o(y)}}function A(K){if(v=!1,P(K),!N)if(o(g)!==null)N=!0,ie($);else{var q=o(y);q!==null&&ce(A,q.startTime-K)}}function $(K,q){N=!1,v&&(v=!1,R(X),X=-1),w=!0;var Q=k;try{for(P(q),b=o(g);b!==null&&(!(b.expirationTime>q)||K&&!_());){var M=b.callback;if(typeof M=="function"){b.callback=null,k=b.priorityLevel;var F=M(b.expirationTime<=q);q=t.unstable_now(),typeof F=="function"?b.callback=F:b===o(g)&&a(g),P(q)}else a(g);b=o(g)}if(b!==null)var le=!0;else{var J=o(y);J!==null&&ce(A,J.startTime-q),le=!1}return le}finally{b=null,k=Q,w=!1}}var B=!1,W=null,X=-1,H=5,Y=-1;function _(){return!(t.unstable_now()-Y<H)}function O(){if(W!==null){var K=t.unstable_now();Y=K;var q=!0;try{q=W(!0,K)}finally{q?Z():(B=!1,W=null)}}else B=!1}var Z;if(typeof j=="function")Z=function(){j(O)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,G=ee.port2;ee.port1.onmessage=O,Z=function(){G.postMessage(null)}}else Z=function(){C(O,0)};function ie(K){W=K,B||(B=!0,Z())}function ce(K,q){X=C(function(){K(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(K){K.callback=null},t.unstable_continueExecution=function(){N||w||(N=!0,ie($))},t.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<K?Math.floor(1e3/K):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return o(g)},t.unstable_next=function(K){switch(k){case 1:case 2:case 3:var q=3;break;default:q=k}var Q=k;k=q;try{return K()}finally{k=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(K,q){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Q=k;k=K;try{return q()}finally{k=Q}},t.unstable_scheduleCallback=function(K,q,Q){var M=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?M+Q:M):Q=M,K){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=Q+F,K={id:x++,callback:q,priorityLevel:K,startTime:Q,expirationTime:F,sortIndex:-1},Q>M?(K.sortIndex=Q,r(y,K),o(g)===null&&K===o(y)&&(v?(R(X),X=-1):v=!0,ce(A,Q-M))):(K.sortIndex=F,r(g,K),N||w||(N=!0,ie($))),K},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(K){var q=k;return function(){var Q=k;k=q;try{return K.apply(this,arguments)}finally{k=Q}}}})(pd)),pd}var Um;function b1(){return Um||(Um=1,hd.exports=w1()),hd.exports}/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Im=t=>{throw TypeError(t)};var id=(t,r,o)=>r.has(t)||Im("Cannot "+o);var I=(
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Fm;function w1(){if(Fm)return Ft;Fm=1;var t=pf(),r=x1();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,l={};function c(e,n){f(e,n),f(e+"Capture",n)}function f(e,n){for(l[e]=n,e=0;e<n.length;e++)a.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,y=/^[: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]*$/,x={},b={};function k(e){return g.call(b,e)?!0:g.call(x,e)?!1:y.test(e)?b[e]=!0:(x[e]=!0,!1)}function w(e,n,s,i){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return i?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,s,i){if(n===null||typeof n>"u"||w(e,n,s,i))return!0;if(i)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function v(e,n,s,i,d,p,S){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=i,this.attributeNamespace=d,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=S}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new v(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];C[n]=new v(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new v(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){C[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new v(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new v(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new v(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function j(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 n=e.replace(R,j);C[n]=new v(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(R,j);C[n]=new v(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(R,j);C[n]=new v(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function P(e,n,s,i){var d=C.hasOwnProperty(n)?C[n]:null;(d!==null?d.type!==0:i||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,s,d,i)&&(s=null),i||d===null?k(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):d.mustUseProperty?e[d.propertyName]=s===null?d.type===3?!1:"":s:(n=d.attributeName,i=d.attributeNamespace,s===null?e.removeAttribute(n):(d=d.type,s=d===3||d===4&&s===!0?"":""+s,i?e.setAttributeNS(i,n,s):e.setAttribute(n,s))))}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),B=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),_=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),K=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,M;function F(e){if(M===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);M=n&&n[1]||""}return`
33
+ */var $m;function S1(){if($m)return Ft;$m=1;var t=gf(),r=b1();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,l={};function c(e,n){f(e,n),f(e+"Capture",n)}function f(e,n){for(l[e]=n,e=0;e<n.length;e++)a.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,y=/^[: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]*$/,x={},b={};function k(e){return g.call(b,e)?!0:g.call(x,e)?!1:y.test(e)?b[e]=!0:(x[e]=!0,!1)}function w(e,n,s,i){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return i?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,s,i){if(n===null||typeof n>"u"||w(e,n,s,i))return!0;if(i)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function v(e,n,s,i,d,p,S){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=i,this.attributeNamespace=d,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=S}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new v(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];C[n]=new v(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new v(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){C[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new v(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new v(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new v(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function j(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 n=e.replace(R,j);C[n]=new v(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(R,j);C[n]=new v(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(R,j);C[n]=new v(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function P(e,n,s,i){var d=C.hasOwnProperty(n)?C[n]:null;(d!==null?d.type!==0:i||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,s,d,i)&&(s=null),i||d===null?k(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):d.mustUseProperty?e[d.propertyName]=s===null?d.type===3?!1:"":s:(n=d.attributeName,i=d.attributeNamespace,s===null?e.removeAttribute(n):(d=d.type,s=d===3||d===4&&s===!0?"":""+s,i?e.setAttributeNS(i,n,s):e.setAttribute(n,s))))}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),B=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),_=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),K=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,M;function F(e){if(M===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);M=n&&n[1]||""}return`
34
34
  `+M+e}var le=!1;function J(e,n){if(!e||le)return"";le=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(V){var i=V}Reflect.construct(e,[],n)}else{try{n.call()}catch(V){i=V}e.call(n.prototype)}else{try{throw Error()}catch(V){i=V}e()}}catch(V){if(V&&i&&typeof V.stack=="string"){for(var d=V.stack.split(`
35
35
  `),p=i.stack.split(`
36
36
  `),S=d.length-1,T=p.length-1;1<=S&&0<=T&&d[S]!==p[T];)T--;for(;1<=S&&0<=T;S--,T--)if(d[S]!==p[T]){if(S!==1||T!==1)do if(S--,T--,0>T||d[S]!==p[T]){var L=`
37
- `+d[S].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=S&&0<=T);break}}}finally{le=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?F(e):""}function ue(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function xe(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 H:return"Fragment";case B:return"Portal";case W:return"Profiler";case X:return"StrictMode";case Z:return"Suspense";case ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case Y:return(e._context.displayName||"Context")+".Provider";case O:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return n=e.displayName||null,n!==null?n:xe(e.type)||"Memo";case ie:n=e._payload,e=e._init;try{return xe(e(n))}catch{}}return null}function ne(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(n);case 8:return n===X?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function he(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function be(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ce(e){var n=be(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,p=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){i=""+S,p.call(this,S)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Te(e){e._valueTracker||(e._valueTracker=Ce(e))}function Ie(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),i="";return e&&(i=be(e)?e.checked?"true":"false":e.value),e=i,e!==s?(n.setValue(e),!0):!1}function nt(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 vt(e,n){var s=n.checked;return Q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Rn(e,n){var s=n.defaultValue==null?"":n.defaultValue,i=n.checked!=null?n.checked:n.defaultChecked;s=he(n.value!=null?n.value:s),e._wrapperState={initialChecked:i,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ln(e,n){n=n.checked,n!=null&&P(e,"checked",n,!1)}function cn(e,n){ln(e,n);var s=he(n.value),i=n.type;if(s!=null)i==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?jn(e,n.type,s):n.hasOwnProperty("defaultValue")&&jn(e,n.type,he(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function br(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type;if(!(i!=="submit"&&i!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function jn(e,n,s){(n!=="number"||nt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Sr=Array.isArray;function Xt(e,n,s,i){if(e=e.options,n){n={};for(var d=0;d<s.length;d++)n["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=n.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&i&&(e[s].defaultSelected=!0)}else{for(s=""+he(s),n=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function Ho(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return Q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Tn(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(Sr(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:he(s)}}function ai(e,n){var s=he(n.value),i=he(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),i!=null&&(e.defaultValue=""+i)}function ii(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Nt(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 Mn(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Nt(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vo,li=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,i,d){MSApp.execUnsafeLocalFunction(function(){return e(n,s,i,d)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Vo=Vo||document.createElement("div"),Vo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Vo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function In(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var co={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},ci=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){ci.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),co[n]=co[e]})});function Ko(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||co.hasOwnProperty(e)&&co[e]?(""+n).trim():n+"px"}function Xn(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var i=s.indexOf("--")===0,d=Ko(s,n[s],i);s==="float"&&(s="cssFloat"),i?e.setProperty(s,d):e[s]=d}}var ui=Q({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 An(e,n){if(n){if(ui[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function Xs(e,n){if(e.indexOf("-")===-1)return typeof n.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 Js=null;function Qo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qo=null,kr=null,Ln=null;function un(e){if(e=va(e)){if(typeof qo!="function")throw Error(o(280));var n=e.stateNode;n&&(n=Li(n),qo(e.stateNode,e.type,n))}}function di(e){kr?Ln?Ln.push(e):Ln=[e]:kr=e}function Ne(){if(kr){var e=kr,n=Ln;if(Ln=kr=null,un(e),n)for(e=0;e<n.length;e++)un(n[e])}}function De(e,n){return e(n)}function $e(){}var Pt=!1;function It(e,n,s){if(Pt)return e(n,s);Pt=!0;try{return De(e,n,s)}finally{Pt=!1,(kr!==null||Ln!==null)&&($e(),Ne())}}function At(e,n){var s=e.stateNode;if(s===null)return null;var i=Li(s);if(i===null)return null;s=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var dn=!1;if(h)try{var pt={};Object.defineProperty(pt,"passive",{get:function(){dn=!0}}),window.addEventListener("test",pt,pt),window.removeEventListener("test",pt,pt)}catch{dn=!1}function zn(e,n,s,i,d,p,S,T,L){var V=Array.prototype.slice.call(arguments,3);try{n.apply(s,V)}catch(re){this.onError(re)}}var Zs=!1,fi=null,hi=!1,Nc=null,bx={onError:function(e){Zs=!0,fi=e}};function Sx(e,n,s,i,d,p,S,T,L){Zs=!1,fi=null,zn.apply(bx,arguments)}function kx(e,n,s,i,d,p,S,T,L){if(Sx.apply(this,arguments),Zs){if(Zs){var V=fi;Zs=!1,fi=null}else throw Error(o(198));hi||(hi=!0,Nc=V)}}function uo(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function th(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function nh(e){if(uo(e)!==e)throw Error(o(188))}function Cx(e){var n=e.alternate;if(!n){if(n=uo(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,i=n;;){var d=s.return;if(d===null)break;var p=d.alternate;if(p===null){if(i=d.return,i!==null){s=i;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===s)return nh(d),e;if(p===i)return nh(d),n;p=p.sibling}throw Error(o(188))}if(s.return!==i.return)s=d,i=p;else{for(var S=!1,T=d.child;T;){if(T===s){S=!0,s=d,i=p;break}if(T===i){S=!0,i=d,s=p;break}T=T.sibling}if(!S){for(T=p.child;T;){if(T===s){S=!0,s=p,i=d;break}if(T===i){S=!0,i=p,s=d;break}T=T.sibling}if(!S)throw Error(o(189))}}if(s.alternate!==i)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function rh(e){return e=Cx(e),e!==null?oh(e):null}function oh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=oh(e);if(n!==null)return n;e=e.sibling}return null}var sh=r.unstable_scheduleCallback,ah=r.unstable_cancelCallback,Ex=r.unstable_shouldYield,Nx=r.unstable_requestPaint,rt=r.unstable_now,Px=r.unstable_getCurrentPriorityLevel,Pc=r.unstable_ImmediatePriority,ih=r.unstable_UserBlockingPriority,pi=r.unstable_NormalPriority,Rx=r.unstable_LowPriority,lh=r.unstable_IdlePriority,mi=null,Dn=null;function jx(e){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(mi,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:Ix,Tx=Math.log,Mx=Math.LN2;function Ix(e){return e>>>=0,e===0?32:31-(Tx(e)/Mx|0)|0}var gi=64,yi=4194304;function ea(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 vi(e,n){var s=e.pendingLanes;if(s===0)return 0;var i=0,d=e.suspendedLanes,p=e.pingedLanes,S=s&268435455;if(S!==0){var T=S&~d;T!==0?i=ea(T):(p&=S,p!==0&&(i=ea(p)))}else S=s&~d,S!==0?i=ea(S):p!==0&&(i=ea(p));if(i===0)return 0;if(n!==0&&n!==i&&(n&d)===0&&(d=i&-i,p=n&-n,d>=p||d===16&&(p&4194240)!==0))return n;if((i&4)!==0&&(i|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=i;0<n;)s=31-fn(n),d=1<<s,i|=e[s],n&=~d;return i}function Ax(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lx(e,n){for(var s=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes;0<p;){var S=31-fn(p),T=1<<S,L=d[S];L===-1?((T&s)===0||(T&i)!==0)&&(d[S]=Ax(T,n)):L<=n&&(e.expiredLanes|=T),p&=~T}}function Rc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ch(){var e=gi;return gi<<=1,(gi&4194240)===0&&(gi=64),e}function jc(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function ta(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-fn(n),e[n]=s}function zx(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<s;){var d=31-fn(s),p=1<<d;n[d]=0,i[d]=-1,e[d]=-1,s&=~p}}function Tc(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var i=31-fn(s),d=1<<i;d&n|e[i]&n&&(e[i]|=n),s&=~d}}var Fe=0;function uh(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var dh,Mc,fh,hh,ph,Ic=!1,xi=[],Cr=null,Er=null,Nr=null,na=new Map,ra=new Map,Pr=[],Dx="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 mh(e,n){switch(e){case"focusin":case"focusout":Cr=null;break;case"dragenter":case"dragleave":Er=null;break;case"mouseover":case"mouseout":Nr=null;break;case"pointerover":case"pointerout":na.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ra.delete(n.pointerId)}}function oa(e,n,s,i,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:s,eventSystemFlags:i,nativeEvent:p,targetContainers:[d]},n!==null&&(n=va(n),n!==null&&Mc(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function Ox(e,n,s,i,d){switch(n){case"focusin":return Cr=oa(Cr,e,n,s,i,d),!0;case"dragenter":return Er=oa(Er,e,n,s,i,d),!0;case"mouseover":return Nr=oa(Nr,e,n,s,i,d),!0;case"pointerover":var p=d.pointerId;return na.set(p,oa(na.get(p)||null,e,n,s,i,d)),!0;case"gotpointercapture":return p=d.pointerId,ra.set(p,oa(ra.get(p)||null,e,n,s,i,d)),!0}return!1}function gh(e){var n=fo(e.target);if(n!==null){var s=uo(n);if(s!==null){if(n=s.tag,n===13){if(n=th(s),n!==null){e.blockedOn=n,ph(e.priority,function(){fh(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wi(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=Lc(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);Js=i,s.target.dispatchEvent(i),Js=null}else return n=va(s),n!==null&&Mc(n),e.blockedOn=s,!1;n.shift()}return!0}function yh(e,n,s){wi(e)&&s.delete(n)}function _x(){Ic=!1,Cr!==null&&wi(Cr)&&(Cr=null),Er!==null&&wi(Er)&&(Er=null),Nr!==null&&wi(Nr)&&(Nr=null),na.forEach(yh),ra.forEach(yh)}function sa(e,n){e.blockedOn===n&&(e.blockedOn=null,Ic||(Ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,_x)))}function aa(e){function n(d){return sa(d,e)}if(0<xi.length){sa(xi[0],e);for(var s=1;s<xi.length;s++){var i=xi[s];i.blockedOn===e&&(i.blockedOn=null)}}for(Cr!==null&&sa(Cr,e),Er!==null&&sa(Er,e),Nr!==null&&sa(Nr,e),na.forEach(n),ra.forEach(n),s=0;s<Pr.length;s++)i=Pr[s],i.blockedOn===e&&(i.blockedOn=null);for(;0<Pr.length&&(s=Pr[0],s.blockedOn===null);)gh(s),s.blockedOn===null&&Pr.shift()}var Go=A.ReactCurrentBatchConfig,bi=!0;function Fx(e,n,s,i){var d=Fe,p=Go.transition;Go.transition=null;try{Fe=1,Ac(e,n,s,i)}finally{Fe=d,Go.transition=p}}function Ux(e,n,s,i){var d=Fe,p=Go.transition;Go.transition=null;try{Fe=4,Ac(e,n,s,i)}finally{Fe=d,Go.transition=p}}function Ac(e,n,s,i){if(bi){var d=Lc(e,n,s,i);if(d===null)Xc(e,n,i,Si,s),mh(e,i);else if(Ox(d,e,n,s,i))i.stopPropagation();else if(mh(e,i),n&4&&-1<Dx.indexOf(e)){for(;d!==null;){var p=va(d);if(p!==null&&dh(p),p=Lc(e,n,s,i),p===null&&Xc(e,n,i,Si,s),p===d)break;d=p}d!==null&&i.stopPropagation()}else Xc(e,n,i,null,s)}}var Si=null;function Lc(e,n,s,i){if(Si=null,e=Qo(i),e=fo(e),e!==null)if(n=uo(e),n===null)e=null;else if(s=n.tag,s===13){if(e=th(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Si=e,null}function vh(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(Px()){case Pc:return 1;case ih:return 4;case pi:case Rx:return 16;case lh:return 536870912;default:return 16}default:return 16}}var Rr=null,zc=null,ki=null;function xh(){if(ki)return ki;var e,n=zc,s=n.length,i,d="value"in Rr?Rr.value:Rr.textContent,p=d.length;for(e=0;e<s&&n[e]===d[e];e++);var S=s-e;for(i=1;i<=S&&n[s-i]===d[p-i];i++);return ki=d.slice(e,1<i?1-i:void 0)}function Ci(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ei(){return!0}function wh(){return!1}function Wt(e){function n(s,i,d,p,S){this._reactName=s,this._targetInst=d,this.type=i,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(s=e[T],this[T]=s?s(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Ei:wh,this.isPropagationStopped=wh,this}return Q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ei)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ei)},persist:function(){},isPersistent:Ei}),n}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dc=Wt(Yo),ia=Q({},Yo,{view:0,detail:0}),$x=Wt(ia),Oc,_c,la,Ni=Q({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uc,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!==la&&(la&&e.type==="mousemove"?(Oc=e.screenX-la.screenX,_c=e.screenY-la.screenY):_c=Oc=0,la=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:_c}}),bh=Wt(Ni),Bx=Q({},Ni,{dataTransfer:0}),Wx=Wt(Bx),Hx=Q({},ia,{relatedTarget:0}),Fc=Wt(Hx),Vx=Q({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),Kx=Wt(Vx),Qx=Q({},Yo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qx=Wt(Qx),Gx=Q({},Yo,{data:0}),Sh=Wt(Gx),Yx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xx={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"},Jx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Jx[e])?!!n[e]:!1}function Uc(){return Zx}var ew=Q({},ia,{key:function(e){if(e.key){var n=Yx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uc,charCode:function(e){return e.type==="keypress"?Ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tw=Wt(ew),nw=Q({},Ni,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=Wt(nw),rw=Q({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uc}),ow=Wt(rw),sw=Q({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),aw=Wt(sw),iw=Q({},Ni,{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}),lw=Wt(iw),cw=[9,13,27,32],$c=h&&"CompositionEvent"in window,ca=null;h&&"documentMode"in document&&(ca=document.documentMode);var uw=h&&"TextEvent"in window&&!ca,Ch=h&&(!$c||ca&&8<ca&&11>=ca),Eh=" ",Nh=!1;function Ph(e,n){switch(e){case"keyup":return cw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xo=!1;function dw(e,n){switch(e){case"compositionend":return Rh(n);case"keypress":return n.which!==32?null:(Nh=!0,Eh);case"textInput":return e=n.data,e===Eh&&Nh?null:e;default:return null}}function fw(e,n){if(Xo)return e==="compositionend"||!$c&&Ph(e,n)?(e=xh(),ki=zc=Rr=null,Xo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ch&&n.locale!=="ko"?null:n.data;default:return null}}var hw={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 jh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!hw[e.type]:n==="textarea"}function Th(e,n,s,i){di(i),n=Mi(n,"onChange"),0<n.length&&(s=new Dc("onChange","change",null,s,i),e.push({event:s,listeners:n}))}var ua=null,da=null;function pw(e){qh(e,0)}function Pi(e){var n=ns(e);if(Ie(n))return e}function mw(e,n){if(e==="change")return n}var Mh=!1;if(h){var Bc;if(h){var Wc="oninput"in document;if(!Wc){var Ih=document.createElement("div");Ih.setAttribute("oninput","return;"),Wc=typeof Ih.oninput=="function"}Bc=Wc}else Bc=!1;Mh=Bc&&(!document.documentMode||9<document.documentMode)}function Ah(){ua&&(ua.detachEvent("onpropertychange",Lh),da=ua=null)}function Lh(e){if(e.propertyName==="value"&&Pi(da)){var n=[];Th(n,da,e,Qo(e)),It(pw,n)}}function gw(e,n,s){e==="focusin"?(Ah(),ua=n,da=s,ua.attachEvent("onpropertychange",Lh)):e==="focusout"&&Ah()}function yw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pi(da)}function vw(e,n){if(e==="click")return Pi(n)}function xw(e,n){if(e==="input"||e==="change")return Pi(n)}function ww(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var hn=typeof Object.is=="function"?Object.is:ww;function fa(e,n){if(hn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),i=Object.keys(n);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var d=s[i];if(!g.call(n,d)||!hn(e[d],n[d]))return!1}return!0}function zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dh(e,n){var s=zh(e);e=0;for(var i;s;){if(s.nodeType===3){if(i=e+s.textContent.length,e<=n&&i>=n)return{node:s,offset:n-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=zh(s)}}function Oh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Oh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function _h(){for(var e=window,n=nt();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=nt(e.document)}return n}function Hc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function bw(e){var n=_h(),s=e.focusedElem,i=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&Oh(s.ownerDocument.documentElement,s)){if(i!==null&&Hc(s)){if(n=i.start,e=i.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=s.textContent.length,p=Math.min(i.start,d);i=i.end===void 0?p:Math.min(i.end,d),!e.extend&&p>i&&(d=i,i=p,p=d),d=Dh(s,p);var S=Dh(s,i);d&&S&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==S.node||e.focusOffset!==S.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),p>i?(e.addRange(n),e.extend(S.node,S.offset)):(n.setEnd(S.node,S.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sw=h&&"documentMode"in document&&11>=document.documentMode,Jo=null,Vc=null,ha=null,Kc=!1;function Fh(e,n,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Kc||Jo==null||Jo!==nt(i)||(i=Jo,"selectionStart"in i&&Hc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ha&&fa(ha,i)||(ha=i,i=Mi(Vc,"onSelect"),0<i.length&&(n=new Dc("onSelect","select",null,n,s),e.push({event:n,listeners:i}),n.target=Jo)))}function Ri(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var Zo={animationend:Ri("Animation","AnimationEnd"),animationiteration:Ri("Animation","AnimationIteration"),animationstart:Ri("Animation","AnimationStart"),transitionend:Ri("Transition","TransitionEnd")},Qc={},Uh={};h&&(Uh=document.createElement("div").style,"AnimationEvent"in window||(delete Zo.animationend.animation,delete Zo.animationiteration.animation,delete Zo.animationstart.animation),"TransitionEvent"in window||delete Zo.transitionend.transition);function ji(e){if(Qc[e])return Qc[e];if(!Zo[e])return e;var n=Zo[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in Uh)return Qc[e]=n[s];return e}var $h=ji("animationend"),Bh=ji("animationiteration"),Wh=ji("animationstart"),Hh=ji("transitionend"),Vh=new Map,Kh="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 jr(e,n){Vh.set(e,n),c(n,[e])}for(var qc=0;qc<Kh.length;qc++){var Gc=Kh[qc],kw=Gc.toLowerCase(),Cw=Gc[0].toUpperCase()+Gc.slice(1);jr(kw,"on"+Cw)}jr($h,"onAnimationEnd"),jr(Bh,"onAnimationIteration"),jr(Wh,"onAnimationStart"),jr("dblclick","onDoubleClick"),jr("focusin","onFocus"),jr("focusout","onBlur"),jr(Hh,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pa="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(" "),Ew=new Set("cancel close invalid load scroll toggle".split(" ").concat(pa));function Qh(e,n,s){var i=e.type||"unknown-event";e.currentTarget=s,kx(i,n,void 0,e),e.currentTarget=null}function qh(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var i=e[s],d=i.event;i=i.listeners;e:{var p=void 0;if(n)for(var S=i.length-1;0<=S;S--){var T=i[S],L=T.instance,V=T.currentTarget;if(T=T.listener,L!==p&&d.isPropagationStopped())break e;Qh(d,T,V),p=L}else for(S=0;S<i.length;S++){if(T=i[S],L=T.instance,V=T.currentTarget,T=T.listener,L!==p&&d.isPropagationStopped())break e;Qh(d,T,V),p=L}}}if(hi)throw e=Nc,hi=!1,Nc=null,e}function Ke(e,n){var s=n[ru];s===void 0&&(s=n[ru]=new Set);var i=e+"__bubble";s.has(i)||(Gh(n,e,2,!1),s.add(i))}function Yc(e,n,s){var i=0;n&&(i|=4),Gh(s,e,i,n)}var Ti="_reactListening"+Math.random().toString(36).slice(2);function ma(e){if(!e[Ti]){e[Ti]=!0,a.forEach(function(s){s!=="selectionchange"&&(Ew.has(s)||Yc(s,!1,e),Yc(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ti]||(n[Ti]=!0,Yc("selectionchange",!1,n))}}function Gh(e,n,s,i){switch(vh(n)){case 1:var d=Fx;break;case 4:d=Ux;break;default:d=Ac}s=d.bind(null,n,s,e),d=void 0,!dn||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(n,s,{capture:!0,passive:d}):e.addEventListener(n,s,!0):d!==void 0?e.addEventListener(n,s,{passive:d}):e.addEventListener(n,s,!1)}function Xc(e,n,s,i,d){var p=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var S=i.tag;if(S===3||S===4){var T=i.stateNode.containerInfo;if(T===d||T.nodeType===8&&T.parentNode===d)break;if(S===4)for(S=i.return;S!==null;){var L=S.tag;if((L===3||L===4)&&(L=S.stateNode.containerInfo,L===d||L.nodeType===8&&L.parentNode===d))return;S=S.return}for(;T!==null;){if(S=fo(T),S===null)return;if(L=S.tag,L===5||L===6){i=p=S;continue e}T=T.parentNode}}i=i.return}It(function(){var V=p,re=Qo(s),oe=[];e:{var te=Vh.get(e);if(te!==void 0){var fe=Dc,me=e;switch(e){case"keypress":if(Ci(s)===0)break e;case"keydown":case"keyup":fe=tw;break;case"focusin":me="focus",fe=Fc;break;case"focusout":me="blur",fe=Fc;break;case"beforeblur":case"afterblur":fe=Fc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Wx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=ow;break;case $h:case Bh:case Wh:fe=Kx;break;case Hh:fe=aw;break;case"scroll":fe=$x;break;case"wheel":fe=lw;break;case"copy":case"cut":case"paste":fe=qx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=kh}var ye=(n&4)!==0,ot=!ye&&e==="scroll",D=ye?te!==null?te+"Capture":null:te;ye=[];for(var z=V,U;z!==null;){U=z;var se=U.stateNode;if(U.tag===5&&se!==null&&(U=se,D!==null&&(se=At(z,D),se!=null&&ye.push(ga(z,se,U)))),ot)break;z=z.return}0<ye.length&&(te=new fe(te,me,null,s,re),oe.push({event:te,listeners:ye}))}}if((n&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",te&&s!==Js&&(me=s.relatedTarget||s.fromElement)&&(fo(me)||me[Jn]))break e;if((fe||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,fe?(me=s.relatedTarget||s.toElement,fe=V,me=me?fo(me):null,me!==null&&(ot=uo(me),me!==ot||me.tag!==5&&me.tag!==6)&&(me=null)):(fe=null,me=V),fe!==me)){if(ye=bh,se="onMouseLeave",D="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ye=kh,se="onPointerLeave",D="onPointerEnter",z="pointer"),ot=fe==null?te:ns(fe),U=me==null?te:ns(me),te=new ye(se,z+"leave",fe,s,re),te.target=ot,te.relatedTarget=U,se=null,fo(re)===V&&(ye=new ye(D,z+"enter",me,s,re),ye.target=U,ye.relatedTarget=ot,se=ye),ot=se,fe&&me)t:{for(ye=fe,D=me,z=0,U=ye;U;U=es(U))z++;for(U=0,se=D;se;se=es(se))U++;for(;0<z-U;)ye=es(ye),z--;for(;0<U-z;)D=es(D),U--;for(;z--;){if(ye===D||D!==null&&ye===D.alternate)break t;ye=es(ye),D=es(D)}ye=null}else ye=null;fe!==null&&Yh(oe,te,fe,ye,!1),me!==null&&ot!==null&&Yh(oe,ot,me,ye,!0)}}e:{if(te=V?ns(V):window,fe=te.nodeName&&te.nodeName.toLowerCase(),fe==="select"||fe==="input"&&te.type==="file")var ve=mw;else if(jh(te))if(Mh)ve=xw;else{ve=yw;var Se=gw}else(fe=te.nodeName)&&fe.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(ve=vw);if(ve&&(ve=ve(e,V))){Th(oe,ve,s,re);break e}Se&&Se(e,te,V),e==="focusout"&&(Se=te._wrapperState)&&Se.controlled&&te.type==="number"&&jn(te,"number",te.value)}switch(Se=V?ns(V):window,e){case"focusin":(jh(Se)||Se.contentEditable==="true")&&(Jo=Se,Vc=V,ha=null);break;case"focusout":ha=Vc=Jo=null;break;case"mousedown":Kc=!0;break;case"contextmenu":case"mouseup":case"dragend":Kc=!1,Fh(oe,s,re);break;case"selectionchange":if(Sw)break;case"keydown":case"keyup":Fh(oe,s,re)}var ke;if($c)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else Xo?Ph(e,s)&&(Ee="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ee="onCompositionStart");Ee&&(Ch&&s.locale!=="ko"&&(Xo||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&Xo&&(ke=xh()):(Rr=re,zc="value"in Rr?Rr.value:Rr.textContent,Xo=!0)),Se=Mi(V,Ee),0<Se.length&&(Ee=new Sh(Ee,e,null,s,re),oe.push({event:Ee,listeners:Se}),ke?Ee.data=ke:(ke=Rh(s),ke!==null&&(Ee.data=ke)))),(ke=uw?dw(e,s):fw(e,s))&&(V=Mi(V,"onBeforeInput"),0<V.length&&(re=new Sh("onBeforeInput","beforeinput",null,s,re),oe.push({event:re,listeners:V}),re.data=ke))}qh(oe,n)})}function ga(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Mi(e,n){for(var s=n+"Capture",i=[];e!==null;){var d=e,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=At(e,s),p!=null&&i.unshift(ga(e,p,d)),p=At(e,n),p!=null&&i.push(ga(e,p,d))),e=e.return}return i}function es(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Yh(e,n,s,i,d){for(var p=n._reactName,S=[];s!==null&&s!==i;){var T=s,L=T.alternate,V=T.stateNode;if(L!==null&&L===i)break;T.tag===5&&V!==null&&(T=V,d?(L=At(s,p),L!=null&&S.unshift(ga(s,L,T))):d||(L=At(s,p),L!=null&&S.push(ga(s,L,T)))),s=s.return}S.length!==0&&e.push({event:n,listeners:S})}var Nw=/\r\n?/g,Pw=/\u0000|\uFFFD/g;function Xh(e){return(typeof e=="string"?e:""+e).replace(Nw,`
38
- `).replace(Pw,"")}function Ii(e,n,s){if(n=Xh(n),Xh(e)!==n&&s)throw Error(o(425))}function Ai(){}var Jc=null,Zc=null;function eu(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var tu=typeof setTimeout=="function"?setTimeout:void 0,Rw=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(e){return Jh.resolve(null).then(e).catch(Tw)}:tu;function Tw(e){setTimeout(function(){throw e})}function nu(e,n){var s=n,i=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(i===0){e.removeChild(d),aa(n);return}i--}else s!=="$"&&s!=="$?"&&s!=="$!"||i++;s=d}while(s);aa(n)}function Tr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Zh(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var ts=Math.random().toString(36).slice(2),On="__reactFiber$"+ts,ya="__reactProps$"+ts,Jn="__reactContainer$"+ts,ru="__reactEvents$"+ts,Mw="__reactListeners$"+ts,Iw="__reactHandles$"+ts;function fo(e){var n=e[On];if(n)return n;for(var s=e.parentNode;s;){if(n=s[Jn]||s[On]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=Zh(e);e!==null;){if(s=e[On])return s;e=Zh(e)}return n}e=s,s=e.parentNode}return null}function va(e){return e=e[On]||e[Jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Li(e){return e[ya]||null}var ou=[],rs=-1;function Mr(e){return{current:e}}function Qe(e){0>rs||(e.current=ou[rs],ou[rs]=null,rs--)}function We(e,n){rs++,ou[rs]=e.current,e.current=n}var Ir={},xt=Mr(Ir),Lt=Mr(!1),ho=Ir;function os(e,n){var s=e.type.contextTypes;if(!s)return Ir;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in s)d[p]=n[p];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function zt(e){return e=e.childContextTypes,e!=null}function zi(){Qe(Lt),Qe(xt)}function ep(e,n,s){if(xt.current!==Ir)throw Error(o(168));We(xt,n),We(Lt,s)}function tp(e,n,s){var i=e.stateNode;if(n=n.childContextTypes,typeof i.getChildContext!="function")return s;i=i.getChildContext();for(var d in i)if(!(d in n))throw Error(o(108,ne(e)||"Unknown",d));return Q({},s,i)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ir,ho=xt.current,We(xt,e),We(Lt,Lt.current),!0}function np(e,n,s){var i=e.stateNode;if(!i)throw Error(o(169));s?(e=tp(e,n,ho),i.__reactInternalMemoizedMergedChildContext=e,Qe(Lt),Qe(xt),We(xt,e)):Qe(Lt),We(Lt,s)}var Zn=null,Oi=!1,su=!1;function rp(e){Zn===null?Zn=[e]:Zn.push(e)}function Aw(e){Oi=!0,rp(e)}function Ar(){if(!su&&Zn!==null){su=!0;var e=0,n=Fe;try{var s=Zn;for(Fe=1;e<s.length;e++){var i=s[e];do i=i(!0);while(i!==null)}Zn=null,Oi=!1}catch(d){throw Zn!==null&&(Zn=Zn.slice(e+1)),sh(Pc,Ar),d}finally{Fe=n,su=!1}}return null}var ss=[],as=0,_i=null,Fi=0,Jt=[],Zt=0,po=null,er=1,tr="";function mo(e,n){ss[as++]=Fi,ss[as++]=_i,_i=e,Fi=n}function op(e,n,s){Jt[Zt++]=er,Jt[Zt++]=tr,Jt[Zt++]=po,po=e;var i=er;e=tr;var d=32-fn(i)-1;i&=~(1<<d),s+=1;var p=32-fn(n)+d;if(30<p){var S=d-d%5;p=(i&(1<<S)-1).toString(32),i>>=S,d-=S,er=1<<32-fn(n)+d|s<<d|i,tr=p+e}else er=1<<p|s<<d|i,tr=e}function au(e){e.return!==null&&(mo(e,1),op(e,1,0))}function iu(e){for(;e===_i;)_i=ss[--as],ss[as]=null,Fi=ss[--as],ss[as]=null;for(;e===po;)po=Jt[--Zt],Jt[Zt]=null,tr=Jt[--Zt],Jt[Zt]=null,er=Jt[--Zt],Jt[Zt]=null}var Ht=null,Vt=null,Ge=!1,pn=null;function sp(e,n){var s=rn(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function ap(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Ht=e,Vt=Tr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Ht=e,Vt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=po!==null?{id:er,overflow:tr}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=rn(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,Ht=e,Vt=null,!0):!1;default:return!1}}function lu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cu(e){if(Ge){var n=Vt;if(n){var s=n;if(!ap(e,n)){if(lu(e))throw Error(o(418));n=Tr(s.nextSibling);var i=Ht;n&&ap(e,n)?sp(i,s):(e.flags=e.flags&-4097|2,Ge=!1,Ht=e)}}else{if(lu(e))throw Error(o(418));e.flags=e.flags&-4097|2,Ge=!1,Ht=e}}}function ip(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ht=e}function Ui(e){if(e!==Ht)return!1;if(!Ge)return ip(e),Ge=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!eu(e.type,e.memoizedProps)),n&&(n=Vt)){if(lu(e))throw lp(),Error(o(418));for(;n;)sp(e,n),n=Tr(n.nextSibling)}if(ip(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){Vt=Tr(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}Vt=null}}else Vt=Ht?Tr(e.stateNode.nextSibling):null;return!0}function lp(){for(var e=Vt;e;)e=Tr(e.nextSibling)}function is(){Vt=Ht=null,Ge=!1}function uu(e){pn===null?pn=[e]:pn.push(e)}var Lw=A.ReactCurrentBatchConfig;function xa(e,n,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var i=s.stateNode}if(!i)throw Error(o(147,e));var d=i,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(S){var T=d.refs;S===null?delete T[p]:T[p]=S},n._stringRef=p,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function $i(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function cp(e){var n=e._init;return n(e._payload)}function up(e){function n(D,z){if(e){var U=D.deletions;U===null?(D.deletions=[z],D.flags|=16):U.push(z)}}function s(D,z){if(!e)return null;for(;z!==null;)n(D,z),z=z.sibling;return null}function i(D,z){for(D=new Map;z!==null;)z.key!==null?D.set(z.key,z):D.set(z.index,z),z=z.sibling;return D}function d(D,z){return D=$r(D,z),D.index=0,D.sibling=null,D}function p(D,z,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<z?(D.flags|=2,z):U):(D.flags|=2,z)):(D.flags|=1048576,z)}function S(D){return e&&D.alternate===null&&(D.flags|=2),D}function T(D,z,U,se){return z===null||z.tag!==6?(z=td(U,D.mode,se),z.return=D,z):(z=d(z,U),z.return=D,z)}function L(D,z,U,se){var ve=U.type;return ve===H?re(D,z,U.props.children,se,U.key):z!==null&&(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===ie&&cp(ve)===z.type)?(se=d(z,U.props),se.ref=xa(D,z,U),se.return=D,se):(se=dl(U.type,U.key,U.props,null,D.mode,se),se.ref=xa(D,z,U),se.return=D,se)}function V(D,z,U,se){return z===null||z.tag!==4||z.stateNode.containerInfo!==U.containerInfo||z.stateNode.implementation!==U.implementation?(z=nd(U,D.mode,se),z.return=D,z):(z=d(z,U.children||[]),z.return=D,z)}function re(D,z,U,se,ve){return z===null||z.tag!==7?(z=ko(U,D.mode,se,ve),z.return=D,z):(z=d(z,U),z.return=D,z)}function oe(D,z,U){if(typeof z=="string"&&z!==""||typeof z=="number")return z=td(""+z,D.mode,U),z.return=D,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case $:return U=dl(z.type,z.key,z.props,null,D.mode,U),U.ref=xa(D,null,z),U.return=D,U;case B:return z=nd(z,D.mode,U),z.return=D,z;case ie:var se=z._init;return oe(D,se(z._payload),U)}if(Sr(z)||q(z))return z=ko(z,D.mode,U,null),z.return=D,z;$i(D,z)}return null}function te(D,z,U,se){var ve=z!==null?z.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return ve!==null?null:T(D,z,""+U,se);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case $:return U.key===ve?L(D,z,U,se):null;case B:return U.key===ve?V(D,z,U,se):null;case ie:return ve=U._init,te(D,z,ve(U._payload),se)}if(Sr(U)||q(U))return ve!==null?null:re(D,z,U,se,null);$i(D,U)}return null}function fe(D,z,U,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number")return D=D.get(U)||null,T(z,D,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case $:return D=D.get(se.key===null?U:se.key)||null,L(z,D,se,ve);case B:return D=D.get(se.key===null?U:se.key)||null,V(z,D,se,ve);case ie:var Se=se._init;return fe(D,z,U,Se(se._payload),ve)}if(Sr(se)||q(se))return D=D.get(U)||null,re(z,D,se,ve,null);$i(z,se)}return null}function me(D,z,U,se){for(var ve=null,Se=null,ke=z,Ee=z=0,ft=null;ke!==null&&Ee<U.length;Ee++){ke.index>Ee?(ft=ke,ke=null):ft=ke.sibling;var ze=te(D,ke,U[Ee],se);if(ze===null){ke===null&&(ke=ft);break}e&&ke&&ze.alternate===null&&n(D,ke),z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze,ke=ft}if(Ee===U.length)return s(D,ke),Ge&&mo(D,Ee),ve;if(ke===null){for(;Ee<U.length;Ee++)ke=oe(D,U[Ee],se),ke!==null&&(z=p(ke,z,Ee),Se===null?ve=ke:Se.sibling=ke,Se=ke);return Ge&&mo(D,Ee),ve}for(ke=i(D,ke);Ee<U.length;Ee++)ft=fe(ke,D,Ee,U[Ee],se),ft!==null&&(e&&ft.alternate!==null&&ke.delete(ft.key===null?Ee:ft.key),z=p(ft,z,Ee),Se===null?ve=ft:Se.sibling=ft,Se=ft);return e&&ke.forEach(function(Br){return n(D,Br)}),Ge&&mo(D,Ee),ve}function ye(D,z,U,se){var ve=q(U);if(typeof ve!="function")throw Error(o(150));if(U=ve.call(U),U==null)throw Error(o(151));for(var Se=ve=null,ke=z,Ee=z=0,ft=null,ze=U.next();ke!==null&&!ze.done;Ee++,ze=U.next()){ke.index>Ee?(ft=ke,ke=null):ft=ke.sibling;var Br=te(D,ke,ze.value,se);if(Br===null){ke===null&&(ke=ft);break}e&&ke&&Br.alternate===null&&n(D,ke),z=p(Br,z,Ee),Se===null?ve=Br:Se.sibling=Br,Se=Br,ke=ft}if(ze.done)return s(D,ke),Ge&&mo(D,Ee),ve;if(ke===null){for(;!ze.done;Ee++,ze=U.next())ze=oe(D,ze.value,se),ze!==null&&(z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze);return Ge&&mo(D,Ee),ve}for(ke=i(D,ke);!ze.done;Ee++,ze=U.next())ze=fe(ke,D,Ee,ze.value,se),ze!==null&&(e&&ze.alternate!==null&&ke.delete(ze.key===null?Ee:ze.key),z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze);return e&&ke.forEach(function(h1){return n(D,h1)}),Ge&&mo(D,Ee),ve}function ot(D,z,U,se){if(typeof U=="object"&&U!==null&&U.type===H&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case $:e:{for(var ve=U.key,Se=z;Se!==null;){if(Se.key===ve){if(ve=U.type,ve===H){if(Se.tag===7){s(D,Se.sibling),z=d(Se,U.props.children),z.return=D,D=z;break e}}else if(Se.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===ie&&cp(ve)===Se.type){s(D,Se.sibling),z=d(Se,U.props),z.ref=xa(D,Se,U),z.return=D,D=z;break e}s(D,Se);break}else n(D,Se);Se=Se.sibling}U.type===H?(z=ko(U.props.children,D.mode,se,U.key),z.return=D,D=z):(se=dl(U.type,U.key,U.props,null,D.mode,se),se.ref=xa(D,z,U),se.return=D,D=se)}return S(D);case B:e:{for(Se=U.key;z!==null;){if(z.key===Se)if(z.tag===4&&z.stateNode.containerInfo===U.containerInfo&&z.stateNode.implementation===U.implementation){s(D,z.sibling),z=d(z,U.children||[]),z.return=D,D=z;break e}else{s(D,z);break}else n(D,z);z=z.sibling}z=nd(U,D.mode,se),z.return=D,D=z}return S(D);case ie:return Se=U._init,ot(D,z,Se(U._payload),se)}if(Sr(U))return me(D,z,U,se);if(q(U))return ye(D,z,U,se);$i(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,z!==null&&z.tag===6?(s(D,z.sibling),z=d(z,U),z.return=D,D=z):(s(D,z),z=td(U,D.mode,se),z.return=D,D=z),S(D)):s(D,z)}return ot}var ls=up(!0),dp=up(!1),Bi=Mr(null),Wi=null,cs=null,du=null;function fu(){du=cs=Wi=null}function hu(e){var n=Bi.current;Qe(Bi),e._currentValue=n}function pu(e,n,s){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===s)break;e=e.return}}function us(e,n){Wi=e,du=cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Dt=!0),e.firstContext=null)}function en(e){var n=e._currentValue;if(du!==e)if(e={context:e,memoizedValue:n,next:null},cs===null){if(Wi===null)throw Error(o(308));cs=e,Wi.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return n}var go=null;function mu(e){go===null?go=[e]:go.push(e)}function fp(e,n,s,i){var d=n.interleaved;return d===null?(s.next=s,mu(n)):(s.next=d.next,d.next=s),n.interleaved=s,nr(e,i)}function nr(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Lr=!1;function gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hp(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rr(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function zr(e,n,s){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Le&2)!==0){var d=i.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),i.pending=n,nr(e,s)}return d=i.interleaved,d===null?(n.next=n,mu(i)):(n.next=d.next,d.next=n),i.interleaved=n,nr(e,s)}function Hi(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var i=n.lanes;i&=e.pendingLanes,s|=i,n.lanes=s,Tc(e,s)}}function pp(e,n){var s=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var d=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var S={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?d=p=S:p=p.next=S,s=s.next}while(s!==null);p===null?d=p=n:p=p.next=n}else d=p=n;s={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:i.shared,effects:i.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Vi(e,n,s,i){var d=e.updateQueue;Lr=!1;var p=d.firstBaseUpdate,S=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var L=T,V=L.next;L.next=null,S===null?p=V:S.next=V,S=L;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==S&&(T===null?re.firstBaseUpdate=V:T.next=V,re.lastBaseUpdate=L))}if(p!==null){var oe=d.baseState;S=0,re=V=L=null,T=p;do{var te=T.lane,fe=T.eventTime;if((i&te)===te){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var me=e,ye=T;switch(te=n,fe=s,ye.tag){case 1:if(me=ye.payload,typeof me=="function"){oe=me.call(fe,oe,te);break e}oe=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ye.payload,te=typeof me=="function"?me.call(fe,oe,te):me,te==null)break e;oe=Q({},oe,te);break e;case 2:Lr=!0}}T.callback!==null&&T.lane!==0&&(e.flags|=64,te=d.effects,te===null?d.effects=[T]:te.push(T))}else fe={eventTime:fe,lane:te,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(V=re=fe,L=oe):re=re.next=fe,S|=te;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;te=T,T=te.next,te.next=null,d.lastBaseUpdate=te,d.shared.pending=null}}while(!0);if(re===null&&(L=oe),d.baseState=L,d.firstBaseUpdate=V,d.lastBaseUpdate=re,n=d.shared.interleaved,n!==null){d=n;do S|=d.lane,d=d.next;while(d!==n)}else p===null&&(d.shared.lanes=0);xo|=S,e.lanes=S,e.memoizedState=oe}}function mp(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var i=e[n],d=i.callback;if(d!==null){if(i.callback=null,i=s,typeof d!="function")throw Error(o(191,d));d.call(i)}}}var wa={},_n=Mr(wa),ba=Mr(wa),Sa=Mr(wa);function yo(e){if(e===wa)throw Error(o(174));return e}function yu(e,n){switch(We(Sa,n),We(ba,e),We(_n,wa),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Mn(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Mn(n,e)}Qe(_n),We(_n,n)}function ds(){Qe(_n),Qe(ba),Qe(Sa)}function gp(e){yo(Sa.current);var n=yo(_n.current),s=Mn(n,e.type);n!==s&&(We(ba,e),We(_n,s))}function vu(e){ba.current===e&&(Qe(_n),Qe(ba))}var Xe=Mr(0);function Ki(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var xu=[];function wu(){for(var e=0;e<xu.length;e++)xu[e]._workInProgressVersionPrimary=null;xu.length=0}var Qi=A.ReactCurrentDispatcher,bu=A.ReactCurrentBatchConfig,vo=0,Je=null,it=null,ut=null,qi=!1,ka=!1,Ca=0,zw=0;function wt(){throw Error(o(321))}function Su(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!hn(e[s],n[s]))return!1;return!0}function ku(e,n,s,i,d,p){if(vo=p,Je=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Qi.current=e===null||e.memoizedState===null?Fw:Uw,e=s(i,d),ka){p=0;do{if(ka=!1,Ca=0,25<=p)throw Error(o(301));p+=1,ut=it=null,n.updateQueue=null,Qi.current=$w,e=s(i,d)}while(ka)}if(Qi.current=Xi,n=it!==null&&it.next!==null,vo=0,ut=it=Je=null,qi=!1,n)throw Error(o(300));return e}function Cu(){var e=Ca!==0;return Ca=0,e}function Fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Je.memoizedState=ut=e:ut=ut.next=e,ut}function tn(){if(it===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var n=ut===null?Je.memoizedState:ut.next;if(n!==null)ut=n,it=e;else{if(e===null)throw Error(o(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},ut===null?Je.memoizedState=ut=e:ut=ut.next=e}return ut}function Ea(e,n){return typeof n=="function"?n(e):n}function Eu(e){var n=tn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=it,d=i.baseQueue,p=s.pending;if(p!==null){if(d!==null){var S=d.next;d.next=p.next,p.next=S}i.baseQueue=d=p,s.pending=null}if(d!==null){p=d.next,i=i.baseState;var T=S=null,L=null,V=p;do{var re=V.lane;if((vo&re)===re)L!==null&&(L=L.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),i=V.hasEagerState?V.eagerState:e(i,V.action);else{var oe={lane:re,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};L===null?(T=L=oe,S=i):L=L.next=oe,Je.lanes|=re,xo|=re}V=V.next}while(V!==null&&V!==p);L===null?S=i:L.next=T,hn(i,n.memoizedState)||(Dt=!0),n.memoizedState=i,n.baseState=S,n.baseQueue=L,s.lastRenderedState=i}if(e=s.interleaved,e!==null){d=e;do p=d.lane,Je.lanes|=p,xo|=p,d=d.next;while(d!==e)}else d===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function Nu(e){var n=tn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=s.dispatch,d=s.pending,p=n.memoizedState;if(d!==null){s.pending=null;var S=d=d.next;do p=e(p,S.action),S=S.next;while(S!==d);hn(p,n.memoizedState)||(Dt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),s.lastRenderedState=p}return[p,i]}function yp(){}function vp(e,n){var s=Je,i=tn(),d=n(),p=!hn(i.memoizedState,d);if(p&&(i.memoizedState=d,Dt=!0),i=i.queue,Pu(bp.bind(null,s,i,e),[e]),i.getSnapshot!==n||p||ut!==null&&ut.memoizedState.tag&1){if(s.flags|=2048,Na(9,wp.bind(null,s,i,d,n),void 0,null),dt===null)throw Error(o(349));(vo&30)!==0||xp(s,n,d)}return d}function xp(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=Je.updateQueue,n===null?(n={lastEffect:null,stores:null},Je.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function wp(e,n,s,i){n.value=s,n.getSnapshot=i,Sp(n)&&kp(e)}function bp(e,n,s){return s(function(){Sp(n)&&kp(e)})}function Sp(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!hn(e,s)}catch{return!0}}function kp(e){var n=nr(e,1);n!==null&&vn(n,e,1,-1)}function Cp(e){var n=Fn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:e},n.queue=e,e=e.dispatch=_w.bind(null,Je,e),[n.memoizedState,e]}function Na(e,n,s,i){return e={tag:e,create:n,destroy:s,deps:i,next:null},n=Je.updateQueue,n===null?(n={lastEffect:null,stores:null},Je.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(i=s.next,s.next=e,e.next=i,n.lastEffect=e)),e}function Ep(){return tn().memoizedState}function Gi(e,n,s,i){var d=Fn();Je.flags|=e,d.memoizedState=Na(1|n,s,void 0,i===void 0?null:i)}function Yi(e,n,s,i){var d=tn();i=i===void 0?null:i;var p=void 0;if(it!==null){var S=it.memoizedState;if(p=S.destroy,i!==null&&Su(i,S.deps)){d.memoizedState=Na(n,s,p,i);return}}Je.flags|=e,d.memoizedState=Na(1|n,s,p,i)}function Np(e,n){return Gi(8390656,8,e,n)}function Pu(e,n){return Yi(2048,8,e,n)}function Pp(e,n){return Yi(4,2,e,n)}function Rp(e,n){return Yi(4,4,e,n)}function jp(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Tp(e,n,s){return s=s!=null?s.concat([e]):null,Yi(4,4,jp.bind(null,n,e),s)}function Ru(){}function Mp(e,n){var s=tn();n=n===void 0?null:n;var i=s.memoizedState;return i!==null&&n!==null&&Su(n,i[1])?i[0]:(s.memoizedState=[e,n],e)}function Ip(e,n){var s=tn();n=n===void 0?null:n;var i=s.memoizedState;return i!==null&&n!==null&&Su(n,i[1])?i[0]:(e=e(),s.memoizedState=[e,n],e)}function Ap(e,n,s){return(vo&21)===0?(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=s):(hn(s,n)||(s=ch(),Je.lanes|=s,xo|=s,e.baseState=!0),n)}function Dw(e,n){var s=Fe;Fe=s!==0&&4>s?s:4,e(!0);var i=bu.transition;bu.transition={};try{e(!1),n()}finally{Fe=s,bu.transition=i}}function Lp(){return tn().memoizedState}function Ow(e,n,s){var i=Fr(e);if(s={lane:i,action:s,hasEagerState:!1,eagerState:null,next:null},zp(e))Dp(n,s);else if(s=fp(e,n,s,i),s!==null){var d=jt();vn(s,e,i,d),Op(s,n,i)}}function _w(e,n,s){var i=Fr(e),d={lane:i,action:s,hasEagerState:!1,eagerState:null,next:null};if(zp(e))Dp(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var S=n.lastRenderedState,T=p(S,s);if(d.hasEagerState=!0,d.eagerState=T,hn(T,S)){var L=n.interleaved;L===null?(d.next=d,mu(n)):(d.next=L.next,L.next=d),n.interleaved=d;return}}catch{}finally{}s=fp(e,n,d,i),s!==null&&(d=jt(),vn(s,e,i,d),Op(s,n,i))}}function zp(e){var n=e.alternate;return e===Je||n!==null&&n===Je}function Dp(e,n){ka=qi=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function Op(e,n,s){if((s&4194240)!==0){var i=n.lanes;i&=e.pendingLanes,s|=i,n.lanes=s,Tc(e,s)}}var Xi={readContext:en,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},Fw={readContext:en,useCallback:function(e,n){return Fn().memoizedState=[e,n===void 0?null:n],e},useContext:en,useEffect:Np,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,Gi(4194308,4,jp.bind(null,n,e),s)},useLayoutEffect:function(e,n){return Gi(4194308,4,e,n)},useInsertionEffect:function(e,n){return Gi(4,2,e,n)},useMemo:function(e,n){var s=Fn();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var i=Fn();return n=s!==void 0?s(n):n,i.memoizedState=i.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},i.queue=e,e=e.dispatch=Ow.bind(null,Je,e),[i.memoizedState,e]},useRef:function(e){var n=Fn();return e={current:e},n.memoizedState=e},useState:Cp,useDebugValue:Ru,useDeferredValue:function(e){return Fn().memoizedState=e},useTransition:function(){var e=Cp(!1),n=e[0];return e=Dw.bind(null,e[1]),Fn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var i=Je,d=Fn();if(Ge){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),dt===null)throw Error(o(349));(vo&30)!==0||xp(i,n,s)}d.memoizedState=s;var p={value:s,getSnapshot:n};return d.queue=p,Np(bp.bind(null,i,p,e),[e]),i.flags|=2048,Na(9,wp.bind(null,i,p,s,n),void 0,null),s},useId:function(){var e=Fn(),n=dt.identifierPrefix;if(Ge){var s=tr,i=er;s=(i&~(1<<32-fn(i)-1)).toString(32)+s,n=":"+n+"R"+s,s=Ca++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=zw++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Uw={readContext:en,useCallback:Mp,useContext:en,useEffect:Pu,useImperativeHandle:Tp,useInsertionEffect:Pp,useLayoutEffect:Rp,useMemo:Ip,useReducer:Eu,useRef:Ep,useState:function(){return Eu(Ea)},useDebugValue:Ru,useDeferredValue:function(e){var n=tn();return Ap(n,it.memoizedState,e)},useTransition:function(){var e=Eu(Ea)[0],n=tn().memoizedState;return[e,n]},useMutableSource:yp,useSyncExternalStore:vp,useId:Lp,unstable_isNewReconciler:!1},$w={readContext:en,useCallback:Mp,useContext:en,useEffect:Pu,useImperativeHandle:Tp,useInsertionEffect:Pp,useLayoutEffect:Rp,useMemo:Ip,useReducer:Nu,useRef:Ep,useState:function(){return Nu(Ea)},useDebugValue:Ru,useDeferredValue:function(e){var n=tn();return it===null?n.memoizedState=e:Ap(n,it.memoizedState,e)},useTransition:function(){var e=Nu(Ea)[0],n=tn().memoizedState;return[e,n]},useMutableSource:yp,useSyncExternalStore:vp,useId:Lp,unstable_isNewReconciler:!1};function mn(e,n){if(e&&e.defaultProps){n=Q({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function ju(e,n,s,i){n=e.memoizedState,s=s(i,n),s=s==null?n:Q({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Ji={isMounted:function(e){return(e=e._reactInternals)?uo(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var i=jt(),d=Fr(e),p=rr(i,d);p.payload=n,s!=null&&(p.callback=s),n=zr(e,p,d),n!==null&&(vn(n,e,d,i),Hi(n,e,d))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var i=jt(),d=Fr(e),p=rr(i,d);p.tag=1,p.payload=n,s!=null&&(p.callback=s),n=zr(e,p,d),n!==null&&(vn(n,e,d,i),Hi(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=jt(),i=Fr(e),d=rr(s,i);d.tag=2,n!=null&&(d.callback=n),n=zr(e,d,i),n!==null&&(vn(n,e,i,s),Hi(n,e,i))}};function _p(e,n,s,i,d,p,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,S):n.prototype&&n.prototype.isPureReactComponent?!fa(s,i)||!fa(d,p):!0}function Fp(e,n,s){var i=!1,d=Ir,p=n.contextType;return typeof p=="object"&&p!==null?p=en(p):(d=zt(n)?ho:xt.current,i=n.contextTypes,p=(i=i!=null)?os(e,d):Ir),n=new n(s,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ji,e.stateNode=n,n._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=p),n}function Up(e,n,s,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,i),n.state!==e&&Ji.enqueueReplaceState(n,n.state,null)}function Tu(e,n,s,i){var d=e.stateNode;d.props=s,d.state=e.memoizedState,d.refs={},gu(e);var p=n.contextType;typeof p=="object"&&p!==null?d.context=en(p):(p=zt(n)?ho:xt.current,d.context=os(e,p)),d.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(ju(e,n,p,s),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&Ji.enqueueReplaceState(d,d.state,null),Vi(e,s,d,i),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function fs(e,n){try{var s="",i=n;do s+=ue(i),i=i.return;while(i);var d=s}catch(p){d=`
37
+ `+d[S].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=S&&0<=T);break}}}finally{le=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?F(e):""}function ue(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function xe(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 W:return"Fragment";case B:return"Portal";case H:return"Profiler";case X:return"StrictMode";case Z:return"Suspense";case ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case Y:return(e._context.displayName||"Context")+".Provider";case O:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return n=e.displayName||null,n!==null?n:xe(e.type)||"Memo";case ie:n=e._payload,e=e._init;try{return xe(e(n))}catch{}}return null}function ne(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(n);case 8:return n===X?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function he(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function be(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ce(e){var n=be(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),i=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,p=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){i=""+S,p.call(this,S)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Te(e){e._valueTracker||(e._valueTracker=Ce(e))}function Ie(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),i="";return e&&(i=be(e)?e.checked?"true":"false":e.value),e=i,e!==s?(n.setValue(e),!0):!1}function nt(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 vt(e,n){var s=n.checked;return Q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Rn(e,n){var s=n.defaultValue==null?"":n.defaultValue,i=n.checked!=null?n.checked:n.defaultChecked;s=he(n.value!=null?n.value:s),e._wrapperState={initialChecked:i,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ln(e,n){n=n.checked,n!=null&&P(e,"checked",n,!1)}function cn(e,n){ln(e,n);var s=he(n.value),i=n.type;if(s!=null)i==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?jn(e,n.type,s):n.hasOwnProperty("defaultValue")&&jn(e,n.type,he(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function br(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var i=n.type;if(!(i!=="submit"&&i!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function jn(e,n,s){(n!=="number"||nt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Sr=Array.isArray;function Xt(e,n,s,i){if(e=e.options,n){n={};for(var d=0;d<s.length;d++)n["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=n.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&i&&(e[s].defaultSelected=!0)}else{for(s=""+he(s),n=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function Ko(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return Q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Tn(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(Sr(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:he(s)}}function li(e,n){var s=he(n.value),i=he(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),i!=null&&(e.defaultValue=""+i)}function ci(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Nt(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 Mn(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Nt(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qo,ui=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,i,d){MSApp.execUnsafeLocalFunction(function(){return e(n,s,i,d)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Qo=Qo||document.createElement("div"),Qo.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Qo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function In(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var co={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},di=["Webkit","ms","Moz","O"];Object.keys(co).forEach(function(e){di.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),co[n]=co[e]})});function qo(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||co.hasOwnProperty(e)&&co[e]?(""+n).trim():n+"px"}function Xn(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var i=s.indexOf("--")===0,d=qo(s,n[s],i);s==="float"&&(s="cssFloat"),i?e.setProperty(s,d):e[s]=d}}var fi=Q({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 An(e,n){if(n){if(fi[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function Zs(e,n){if(e.indexOf("-")===-1)return typeof n.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 ea=null;function Go(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yo=null,kr=null,Ln=null;function un(e){if(e=wa(e)){if(typeof Yo!="function")throw Error(o(280));var n=e.stateNode;n&&(n=Di(n),Yo(e.stateNode,e.type,n))}}function hi(e){kr?Ln?Ln.push(e):Ln=[e]:kr=e}function Ne(){if(kr){var e=kr,n=Ln;if(Ln=kr=null,un(e),n)for(e=0;e<n.length;e++)un(n[e])}}function De(e,n){return e(n)}function $e(){}var Pt=!1;function It(e,n,s){if(Pt)return e(n,s);Pt=!0;try{return De(e,n,s)}finally{Pt=!1,(kr!==null||Ln!==null)&&($e(),Ne())}}function At(e,n){var s=e.stateNode;if(s===null)return null;var i=Di(s);if(i===null)return null;s=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var dn=!1;if(h)try{var pt={};Object.defineProperty(pt,"passive",{get:function(){dn=!0}}),window.addEventListener("test",pt,pt),window.removeEventListener("test",pt,pt)}catch{dn=!1}function zn(e,n,s,i,d,p,S,T,L){var V=Array.prototype.slice.call(arguments,3);try{n.apply(s,V)}catch(re){this.onError(re)}}var ta=!1,pi=null,mi=!1,Rc=null,kx={onError:function(e){ta=!0,pi=e}};function Cx(e,n,s,i,d,p,S,T,L){ta=!1,pi=null,zn.apply(kx,arguments)}function Ex(e,n,s,i,d,p,S,T,L){if(Cx.apply(this,arguments),ta){if(ta){var V=pi;ta=!1,pi=null}else throw Error(o(198));mi||(mi=!0,Rc=V)}}function uo(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function rh(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function oh(e){if(uo(e)!==e)throw Error(o(188))}function Nx(e){var n=e.alternate;if(!n){if(n=uo(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,i=n;;){var d=s.return;if(d===null)break;var p=d.alternate;if(p===null){if(i=d.return,i!==null){s=i;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===s)return oh(d),e;if(p===i)return oh(d),n;p=p.sibling}throw Error(o(188))}if(s.return!==i.return)s=d,i=p;else{for(var S=!1,T=d.child;T;){if(T===s){S=!0,s=d,i=p;break}if(T===i){S=!0,i=d,s=p;break}T=T.sibling}if(!S){for(T=p.child;T;){if(T===s){S=!0,s=p,i=d;break}if(T===i){S=!0,i=p,s=d;break}T=T.sibling}if(!S)throw Error(o(189))}}if(s.alternate!==i)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function sh(e){return e=Nx(e),e!==null?ah(e):null}function ah(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=ah(e);if(n!==null)return n;e=e.sibling}return null}var ih=r.unstable_scheduleCallback,lh=r.unstable_cancelCallback,Px=r.unstable_shouldYield,Rx=r.unstable_requestPaint,rt=r.unstable_now,jx=r.unstable_getCurrentPriorityLevel,jc=r.unstable_ImmediatePriority,ch=r.unstable_UserBlockingPriority,gi=r.unstable_NormalPriority,Tx=r.unstable_LowPriority,uh=r.unstable_IdlePriority,yi=null,Dn=null;function Mx(e){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(yi,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:Lx,Ix=Math.log,Ax=Math.LN2;function Lx(e){return e>>>=0,e===0?32:31-(Ix(e)/Ax|0)|0}var vi=64,xi=4194304;function na(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 wi(e,n){var s=e.pendingLanes;if(s===0)return 0;var i=0,d=e.suspendedLanes,p=e.pingedLanes,S=s&268435455;if(S!==0){var T=S&~d;T!==0?i=na(T):(p&=S,p!==0&&(i=na(p)))}else S=s&~d,S!==0?i=na(S):p!==0&&(i=na(p));if(i===0)return 0;if(n!==0&&n!==i&&(n&d)===0&&(d=i&-i,p=n&-n,d>=p||d===16&&(p&4194240)!==0))return n;if((i&4)!==0&&(i|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=i;0<n;)s=31-fn(n),d=1<<s,i|=e[s],n&=~d;return i}function zx(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dx(e,n){for(var s=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes;0<p;){var S=31-fn(p),T=1<<S,L=d[S];L===-1?((T&s)===0||(T&i)!==0)&&(d[S]=zx(T,n)):L<=n&&(e.expiredLanes|=T),p&=~T}}function Tc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dh(){var e=vi;return vi<<=1,(vi&4194240)===0&&(vi=64),e}function Mc(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function ra(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-fn(n),e[n]=s}function Ox(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<s;){var d=31-fn(s),p=1<<d;n[d]=0,i[d]=-1,e[d]=-1,s&=~p}}function Ic(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var i=31-fn(s),d=1<<i;d&n|e[i]&n&&(e[i]|=n),s&=~d}}var Fe=0;function fh(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var hh,Ac,ph,mh,gh,Lc=!1,bi=[],Cr=null,Er=null,Nr=null,oa=new Map,sa=new Map,Pr=[],_x="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 yh(e,n){switch(e){case"focusin":case"focusout":Cr=null;break;case"dragenter":case"dragleave":Er=null;break;case"mouseover":case"mouseout":Nr=null;break;case"pointerover":case"pointerout":oa.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":sa.delete(n.pointerId)}}function aa(e,n,s,i,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:s,eventSystemFlags:i,nativeEvent:p,targetContainers:[d]},n!==null&&(n=wa(n),n!==null&&Ac(n)),e):(e.eventSystemFlags|=i,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function Fx(e,n,s,i,d){switch(n){case"focusin":return Cr=aa(Cr,e,n,s,i,d),!0;case"dragenter":return Er=aa(Er,e,n,s,i,d),!0;case"mouseover":return Nr=aa(Nr,e,n,s,i,d),!0;case"pointerover":var p=d.pointerId;return oa.set(p,aa(oa.get(p)||null,e,n,s,i,d)),!0;case"gotpointercapture":return p=d.pointerId,sa.set(p,aa(sa.get(p)||null,e,n,s,i,d)),!0}return!1}function vh(e){var n=fo(e.target);if(n!==null){var s=uo(n);if(s!==null){if(n=s.tag,n===13){if(n=rh(s),n!==null){e.blockedOn=n,gh(e.priority,function(){ph(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Si(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=Dc(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);ea=i,s.target.dispatchEvent(i),ea=null}else return n=wa(s),n!==null&&Ac(n),e.blockedOn=s,!1;n.shift()}return!0}function xh(e,n,s){Si(e)&&s.delete(n)}function Ux(){Lc=!1,Cr!==null&&Si(Cr)&&(Cr=null),Er!==null&&Si(Er)&&(Er=null),Nr!==null&&Si(Nr)&&(Nr=null),oa.forEach(xh),sa.forEach(xh)}function ia(e,n){e.blockedOn===n&&(e.blockedOn=null,Lc||(Lc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ux)))}function la(e){function n(d){return ia(d,e)}if(0<bi.length){ia(bi[0],e);for(var s=1;s<bi.length;s++){var i=bi[s];i.blockedOn===e&&(i.blockedOn=null)}}for(Cr!==null&&ia(Cr,e),Er!==null&&ia(Er,e),Nr!==null&&ia(Nr,e),oa.forEach(n),sa.forEach(n),s=0;s<Pr.length;s++)i=Pr[s],i.blockedOn===e&&(i.blockedOn=null);for(;0<Pr.length&&(s=Pr[0],s.blockedOn===null);)vh(s),s.blockedOn===null&&Pr.shift()}var Xo=A.ReactCurrentBatchConfig,ki=!0;function $x(e,n,s,i){var d=Fe,p=Xo.transition;Xo.transition=null;try{Fe=1,zc(e,n,s,i)}finally{Fe=d,Xo.transition=p}}function Bx(e,n,s,i){var d=Fe,p=Xo.transition;Xo.transition=null;try{Fe=4,zc(e,n,s,i)}finally{Fe=d,Xo.transition=p}}function zc(e,n,s,i){if(ki){var d=Dc(e,n,s,i);if(d===null)Zc(e,n,i,Ci,s),yh(e,i);else if(Fx(d,e,n,s,i))i.stopPropagation();else if(yh(e,i),n&4&&-1<_x.indexOf(e)){for(;d!==null;){var p=wa(d);if(p!==null&&hh(p),p=Dc(e,n,s,i),p===null&&Zc(e,n,i,Ci,s),p===d)break;d=p}d!==null&&i.stopPropagation()}else Zc(e,n,i,null,s)}}var Ci=null;function Dc(e,n,s,i){if(Ci=null,e=Go(i),e=fo(e),e!==null)if(n=uo(e),n===null)e=null;else if(s=n.tag,s===13){if(e=rh(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Ci=e,null}function wh(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(jx()){case jc:return 1;case ch:return 4;case gi:case Tx:return 16;case uh:return 536870912;default:return 16}default:return 16}}var Rr=null,Oc=null,Ei=null;function bh(){if(Ei)return Ei;var e,n=Oc,s=n.length,i,d="value"in Rr?Rr.value:Rr.textContent,p=d.length;for(e=0;e<s&&n[e]===d[e];e++);var S=s-e;for(i=1;i<=S&&n[s-i]===d[p-i];i++);return Ei=d.slice(e,1<i?1-i:void 0)}function Ni(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Pi(){return!0}function Sh(){return!1}function Ht(e){function n(s,i,d,p,S){this._reactName=s,this._targetInst=d,this.type=i,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(s=e[T],this[T]=s?s(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Pi:Sh,this.isPropagationStopped=Sh,this}return Q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Pi)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Pi)},persist:function(){},isPersistent:Pi}),n}var Jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_c=Ht(Jo),ca=Q({},Jo,{view:0,detail:0}),Hx=Ht(ca),Fc,Uc,ua,Ri=Q({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bc,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!==ua&&(ua&&e.type==="mousemove"?(Fc=e.screenX-ua.screenX,Uc=e.screenY-ua.screenY):Uc=Fc=0,ua=e),Fc)},movementY:function(e){return"movementY"in e?e.movementY:Uc}}),kh=Ht(Ri),Wx=Q({},Ri,{dataTransfer:0}),Vx=Ht(Wx),Kx=Q({},ca,{relatedTarget:0}),$c=Ht(Kx),Qx=Q({},Jo,{animationName:0,elapsedTime:0,pseudoElement:0}),qx=Ht(Qx),Gx=Q({},Jo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yx=Ht(Gx),Xx=Q({},Jo,{data:0}),Ch=Ht(Xx),Jx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zx={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"},ew={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tw(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ew[e])?!!n[e]:!1}function Bc(){return tw}var nw=Q({},ca,{key:function(e){if(e.key){var n=Jx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ni(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bc,charCode:function(e){return e.type==="keypress"?Ni(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ni(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rw=Ht(nw),ow=Q({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eh=Ht(ow),sw=Q({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bc}),aw=Ht(sw),iw=Q({},Jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),lw=Ht(iw),cw=Q({},Ri,{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}),uw=Ht(cw),dw=[9,13,27,32],Hc=h&&"CompositionEvent"in window,da=null;h&&"documentMode"in document&&(da=document.documentMode);var fw=h&&"TextEvent"in window&&!da,Nh=h&&(!Hc||da&&8<da&&11>=da),Ph=" ",Rh=!1;function jh(e,n){switch(e){case"keyup":return dw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Th(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zo=!1;function hw(e,n){switch(e){case"compositionend":return Th(n);case"keypress":return n.which!==32?null:(Rh=!0,Ph);case"textInput":return e=n.data,e===Ph&&Rh?null:e;default:return null}}function pw(e,n){if(Zo)return e==="compositionend"||!Hc&&jh(e,n)?(e=bh(),Ei=Oc=Rr=null,Zo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Nh&&n.locale!=="ko"?null:n.data;default:return null}}var mw={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 Mh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!mw[e.type]:n==="textarea"}function Ih(e,n,s,i){hi(i),n=Ai(n,"onChange"),0<n.length&&(s=new _c("onChange","change",null,s,i),e.push({event:s,listeners:n}))}var fa=null,ha=null;function gw(e){Yh(e,0)}function ji(e){var n=os(e);if(Ie(n))return e}function yw(e,n){if(e==="change")return n}var Ah=!1;if(h){var Wc;if(h){var Vc="oninput"in document;if(!Vc){var Lh=document.createElement("div");Lh.setAttribute("oninput","return;"),Vc=typeof Lh.oninput=="function"}Wc=Vc}else Wc=!1;Ah=Wc&&(!document.documentMode||9<document.documentMode)}function zh(){fa&&(fa.detachEvent("onpropertychange",Dh),ha=fa=null)}function Dh(e){if(e.propertyName==="value"&&ji(ha)){var n=[];Ih(n,ha,e,Go(e)),It(gw,n)}}function vw(e,n,s){e==="focusin"?(zh(),fa=n,ha=s,fa.attachEvent("onpropertychange",Dh)):e==="focusout"&&zh()}function xw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ji(ha)}function ww(e,n){if(e==="click")return ji(n)}function bw(e,n){if(e==="input"||e==="change")return ji(n)}function Sw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var hn=typeof Object.is=="function"?Object.is:Sw;function pa(e,n){if(hn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),i=Object.keys(n);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var d=s[i];if(!g.call(n,d)||!hn(e[d],n[d]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,n){var s=Oh(e);e=0;for(var i;s;){if(s.nodeType===3){if(i=e+s.textContent.length,e<=n&&i>=n)return{node:s,offset:n-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Oh(s)}}function Fh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Fh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Uh(){for(var e=window,n=nt();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=nt(e.document)}return n}function Kc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function kw(e){var n=Uh(),s=e.focusedElem,i=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&Fh(s.ownerDocument.documentElement,s)){if(i!==null&&Kc(s)){if(n=i.start,e=i.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=s.textContent.length,p=Math.min(i.start,d);i=i.end===void 0?p:Math.min(i.end,d),!e.extend&&p>i&&(d=i,i=p,p=d),d=_h(s,p);var S=_h(s,i);d&&S&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==S.node||e.focusOffset!==S.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),p>i?(e.addRange(n),e.extend(S.node,S.offset)):(n.setEnd(S.node,S.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Cw=h&&"documentMode"in document&&11>=document.documentMode,es=null,Qc=null,ma=null,qc=!1;function $h(e,n,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;qc||es==null||es!==nt(i)||(i=es,"selectionStart"in i&&Kc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ma&&pa(ma,i)||(ma=i,i=Ai(Qc,"onSelect"),0<i.length&&(n=new _c("onSelect","select",null,n,s),e.push({event:n,listeners:i}),n.target=es)))}function Ti(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var ts={animationend:Ti("Animation","AnimationEnd"),animationiteration:Ti("Animation","AnimationIteration"),animationstart:Ti("Animation","AnimationStart"),transitionend:Ti("Transition","TransitionEnd")},Gc={},Bh={};h&&(Bh=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function Mi(e){if(Gc[e])return Gc[e];if(!ts[e])return e;var n=ts[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in Bh)return Gc[e]=n[s];return e}var Hh=Mi("animationend"),Wh=Mi("animationiteration"),Vh=Mi("animationstart"),Kh=Mi("transitionend"),Qh=new Map,qh="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 jr(e,n){Qh.set(e,n),c(n,[e])}for(var Yc=0;Yc<qh.length;Yc++){var Xc=qh[Yc],Ew=Xc.toLowerCase(),Nw=Xc[0].toUpperCase()+Xc.slice(1);jr(Ew,"on"+Nw)}jr(Hh,"onAnimationEnd"),jr(Wh,"onAnimationIteration"),jr(Vh,"onAnimationStart"),jr("dblclick","onDoubleClick"),jr("focusin","onFocus"),jr("focusout","onBlur"),jr(Kh,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ga="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(" "),Pw=new Set("cancel close invalid load scroll toggle".split(" ").concat(ga));function Gh(e,n,s){var i=e.type||"unknown-event";e.currentTarget=s,Ex(i,n,void 0,e),e.currentTarget=null}function Yh(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var i=e[s],d=i.event;i=i.listeners;e:{var p=void 0;if(n)for(var S=i.length-1;0<=S;S--){var T=i[S],L=T.instance,V=T.currentTarget;if(T=T.listener,L!==p&&d.isPropagationStopped())break e;Gh(d,T,V),p=L}else for(S=0;S<i.length;S++){if(T=i[S],L=T.instance,V=T.currentTarget,T=T.listener,L!==p&&d.isPropagationStopped())break e;Gh(d,T,V),p=L}}}if(mi)throw e=Rc,mi=!1,Rc=null,e}function Ke(e,n){var s=n[su];s===void 0&&(s=n[su]=new Set);var i=e+"__bubble";s.has(i)||(Xh(n,e,2,!1),s.add(i))}function Jc(e,n,s){var i=0;n&&(i|=4),Xh(s,e,i,n)}var Ii="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[Ii]){e[Ii]=!0,a.forEach(function(s){s!=="selectionchange"&&(Pw.has(s)||Jc(s,!1,e),Jc(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ii]||(n[Ii]=!0,Jc("selectionchange",!1,n))}}function Xh(e,n,s,i){switch(wh(n)){case 1:var d=$x;break;case 4:d=Bx;break;default:d=zc}s=d.bind(null,n,s,e),d=void 0,!dn||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(n,s,{capture:!0,passive:d}):e.addEventListener(n,s,!0):d!==void 0?e.addEventListener(n,s,{passive:d}):e.addEventListener(n,s,!1)}function Zc(e,n,s,i,d){var p=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var S=i.tag;if(S===3||S===4){var T=i.stateNode.containerInfo;if(T===d||T.nodeType===8&&T.parentNode===d)break;if(S===4)for(S=i.return;S!==null;){var L=S.tag;if((L===3||L===4)&&(L=S.stateNode.containerInfo,L===d||L.nodeType===8&&L.parentNode===d))return;S=S.return}for(;T!==null;){if(S=fo(T),S===null)return;if(L=S.tag,L===5||L===6){i=p=S;continue e}T=T.parentNode}}i=i.return}It(function(){var V=p,re=Go(s),oe=[];e:{var te=Qh.get(e);if(te!==void 0){var fe=_c,ge=e;switch(e){case"keypress":if(Ni(s)===0)break e;case"keydown":case"keyup":fe=rw;break;case"focusin":ge="focus",fe=$c;break;case"focusout":ge="blur",fe=$c;break;case"beforeblur":case"afterblur":fe=$c;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Vx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=aw;break;case Hh:case Wh:case Vh:fe=qx;break;case Kh:fe=lw;break;case"scroll":fe=Hx;break;case"wheel":fe=uw;break;case"copy":case"cut":case"paste":fe=Yx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Eh}var ye=(n&4)!==0,ot=!ye&&e==="scroll",D=ye?te!==null?te+"Capture":null:te;ye=[];for(var z=V,U;z!==null;){U=z;var se=U.stateNode;if(U.tag===5&&se!==null&&(U=se,D!==null&&(se=At(z,D),se!=null&&ye.push(va(z,se,U)))),ot)break;z=z.return}0<ye.length&&(te=new fe(te,ge,null,s,re),oe.push({event:te,listeners:ye}))}}if((n&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",te&&s!==ea&&(ge=s.relatedTarget||s.fromElement)&&(fo(ge)||ge[Jn]))break e;if((fe||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,fe?(ge=s.relatedTarget||s.toElement,fe=V,ge=ge?fo(ge):null,ge!==null&&(ot=uo(ge),ge!==ot||ge.tag!==5&&ge.tag!==6)&&(ge=null)):(fe=null,ge=V),fe!==ge)){if(ye=kh,se="onMouseLeave",D="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Eh,se="onPointerLeave",D="onPointerEnter",z="pointer"),ot=fe==null?te:os(fe),U=ge==null?te:os(ge),te=new ye(se,z+"leave",fe,s,re),te.target=ot,te.relatedTarget=U,se=null,fo(re)===V&&(ye=new ye(D,z+"enter",ge,s,re),ye.target=U,ye.relatedTarget=ot,se=ye),ot=se,fe&&ge)t:{for(ye=fe,D=ge,z=0,U=ye;U;U=ns(U))z++;for(U=0,se=D;se;se=ns(se))U++;for(;0<z-U;)ye=ns(ye),z--;for(;0<U-z;)D=ns(D),U--;for(;z--;){if(ye===D||D!==null&&ye===D.alternate)break t;ye=ns(ye),D=ns(D)}ye=null}else ye=null;fe!==null&&Jh(oe,te,fe,ye,!1),ge!==null&&ot!==null&&Jh(oe,ot,ge,ye,!0)}}e:{if(te=V?os(V):window,fe=te.nodeName&&te.nodeName.toLowerCase(),fe==="select"||fe==="input"&&te.type==="file")var ve=yw;else if(Mh(te))if(Ah)ve=bw;else{ve=xw;var Se=vw}else(fe=te.nodeName)&&fe.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(ve=ww);if(ve&&(ve=ve(e,V))){Ih(oe,ve,s,re);break e}Se&&Se(e,te,V),e==="focusout"&&(Se=te._wrapperState)&&Se.controlled&&te.type==="number"&&jn(te,"number",te.value)}switch(Se=V?os(V):window,e){case"focusin":(Mh(Se)||Se.contentEditable==="true")&&(es=Se,Qc=V,ma=null);break;case"focusout":ma=Qc=es=null;break;case"mousedown":qc=!0;break;case"contextmenu":case"mouseup":case"dragend":qc=!1,$h(oe,s,re);break;case"selectionchange":if(Cw)break;case"keydown":case"keyup":$h(oe,s,re)}var ke;if(Hc)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else Zo?jh(e,s)&&(Ee="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ee="onCompositionStart");Ee&&(Nh&&s.locale!=="ko"&&(Zo||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&Zo&&(ke=bh()):(Rr=re,Oc="value"in Rr?Rr.value:Rr.textContent,Zo=!0)),Se=Ai(V,Ee),0<Se.length&&(Ee=new Ch(Ee,e,null,s,re),oe.push({event:Ee,listeners:Se}),ke?Ee.data=ke:(ke=Th(s),ke!==null&&(Ee.data=ke)))),(ke=fw?hw(e,s):pw(e,s))&&(V=Ai(V,"onBeforeInput"),0<V.length&&(re=new Ch("onBeforeInput","beforeinput",null,s,re),oe.push({event:re,listeners:V}),re.data=ke))}Yh(oe,n)})}function va(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Ai(e,n){for(var s=n+"Capture",i=[];e!==null;){var d=e,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=At(e,s),p!=null&&i.unshift(va(e,p,d)),p=At(e,n),p!=null&&i.push(va(e,p,d))),e=e.return}return i}function ns(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jh(e,n,s,i,d){for(var p=n._reactName,S=[];s!==null&&s!==i;){var T=s,L=T.alternate,V=T.stateNode;if(L!==null&&L===i)break;T.tag===5&&V!==null&&(T=V,d?(L=At(s,p),L!=null&&S.unshift(va(s,L,T))):d||(L=At(s,p),L!=null&&S.push(va(s,L,T)))),s=s.return}S.length!==0&&e.push({event:n,listeners:S})}var Rw=/\r\n?/g,jw=/\u0000|\uFFFD/g;function Zh(e){return(typeof e=="string"?e:""+e).replace(Rw,`
38
+ `).replace(jw,"")}function Li(e,n,s){if(n=Zh(n),Zh(e)!==n&&s)throw Error(o(425))}function zi(){}var eu=null,tu=null;function nu(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ru=typeof setTimeout=="function"?setTimeout:void 0,Tw=typeof clearTimeout=="function"?clearTimeout:void 0,ep=typeof Promise=="function"?Promise:void 0,Mw=typeof queueMicrotask=="function"?queueMicrotask:typeof ep<"u"?function(e){return ep.resolve(null).then(e).catch(Iw)}:ru;function Iw(e){setTimeout(function(){throw e})}function ou(e,n){var s=n,i=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(i===0){e.removeChild(d),la(n);return}i--}else s!=="$"&&s!=="$?"&&s!=="$!"||i++;s=d}while(s);la(n)}function Tr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function tp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var rs=Math.random().toString(36).slice(2),On="__reactFiber$"+rs,xa="__reactProps$"+rs,Jn="__reactContainer$"+rs,su="__reactEvents$"+rs,Aw="__reactListeners$"+rs,Lw="__reactHandles$"+rs;function fo(e){var n=e[On];if(n)return n;for(var s=e.parentNode;s;){if(n=s[Jn]||s[On]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=tp(e);e!==null;){if(s=e[On])return s;e=tp(e)}return n}e=s,s=e.parentNode}return null}function wa(e){return e=e[On]||e[Jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function os(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Di(e){return e[xa]||null}var au=[],ss=-1;function Mr(e){return{current:e}}function Qe(e){0>ss||(e.current=au[ss],au[ss]=null,ss--)}function He(e,n){ss++,au[ss]=e.current,e.current=n}var Ir={},xt=Mr(Ir),Lt=Mr(!1),ho=Ir;function as(e,n){var s=e.type.contextTypes;if(!s)return Ir;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in s)d[p]=n[p];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function zt(e){return e=e.childContextTypes,e!=null}function Oi(){Qe(Lt),Qe(xt)}function np(e,n,s){if(xt.current!==Ir)throw Error(o(168));He(xt,n),He(Lt,s)}function rp(e,n,s){var i=e.stateNode;if(n=n.childContextTypes,typeof i.getChildContext!="function")return s;i=i.getChildContext();for(var d in i)if(!(d in n))throw Error(o(108,ne(e)||"Unknown",d));return Q({},s,i)}function _i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ir,ho=xt.current,He(xt,e),He(Lt,Lt.current),!0}function op(e,n,s){var i=e.stateNode;if(!i)throw Error(o(169));s?(e=rp(e,n,ho),i.__reactInternalMemoizedMergedChildContext=e,Qe(Lt),Qe(xt),He(xt,e)):Qe(Lt),He(Lt,s)}var Zn=null,Fi=!1,iu=!1;function sp(e){Zn===null?Zn=[e]:Zn.push(e)}function zw(e){Fi=!0,sp(e)}function Ar(){if(!iu&&Zn!==null){iu=!0;var e=0,n=Fe;try{var s=Zn;for(Fe=1;e<s.length;e++){var i=s[e];do i=i(!0);while(i!==null)}Zn=null,Fi=!1}catch(d){throw Zn!==null&&(Zn=Zn.slice(e+1)),ih(jc,Ar),d}finally{Fe=n,iu=!1}}return null}var is=[],ls=0,Ui=null,$i=0,Jt=[],Zt=0,po=null,er=1,tr="";function mo(e,n){is[ls++]=$i,is[ls++]=Ui,Ui=e,$i=n}function ap(e,n,s){Jt[Zt++]=er,Jt[Zt++]=tr,Jt[Zt++]=po,po=e;var i=er;e=tr;var d=32-fn(i)-1;i&=~(1<<d),s+=1;var p=32-fn(n)+d;if(30<p){var S=d-d%5;p=(i&(1<<S)-1).toString(32),i>>=S,d-=S,er=1<<32-fn(n)+d|s<<d|i,tr=p+e}else er=1<<p|s<<d|i,tr=e}function lu(e){e.return!==null&&(mo(e,1),ap(e,1,0))}function cu(e){for(;e===Ui;)Ui=is[--ls],is[ls]=null,$i=is[--ls],is[ls]=null;for(;e===po;)po=Jt[--Zt],Jt[Zt]=null,tr=Jt[--Zt],Jt[Zt]=null,er=Jt[--Zt],Jt[Zt]=null}var Wt=null,Vt=null,Ge=!1,pn=null;function ip(e,n){var s=rn(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function lp(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Wt=e,Vt=Tr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Wt=e,Vt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=po!==null?{id:er,overflow:tr}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=rn(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,Wt=e,Vt=null,!0):!1;default:return!1}}function uu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function du(e){if(Ge){var n=Vt;if(n){var s=n;if(!lp(e,n)){if(uu(e))throw Error(o(418));n=Tr(s.nextSibling);var i=Wt;n&&lp(e,n)?ip(i,s):(e.flags=e.flags&-4097|2,Ge=!1,Wt=e)}}else{if(uu(e))throw Error(o(418));e.flags=e.flags&-4097|2,Ge=!1,Wt=e}}}function cp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Bi(e){if(e!==Wt)return!1;if(!Ge)return cp(e),Ge=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!nu(e.type,e.memoizedProps)),n&&(n=Vt)){if(uu(e))throw up(),Error(o(418));for(;n;)ip(e,n),n=Tr(n.nextSibling)}if(cp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){Vt=Tr(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}Vt=null}}else Vt=Wt?Tr(e.stateNode.nextSibling):null;return!0}function up(){for(var e=Vt;e;)e=Tr(e.nextSibling)}function cs(){Vt=Wt=null,Ge=!1}function fu(e){pn===null?pn=[e]:pn.push(e)}var Dw=A.ReactCurrentBatchConfig;function ba(e,n,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var i=s.stateNode}if(!i)throw Error(o(147,e));var d=i,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(S){var T=d.refs;S===null?delete T[p]:T[p]=S},n._stringRef=p,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function Hi(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function dp(e){var n=e._init;return n(e._payload)}function fp(e){function n(D,z){if(e){var U=D.deletions;U===null?(D.deletions=[z],D.flags|=16):U.push(z)}}function s(D,z){if(!e)return null;for(;z!==null;)n(D,z),z=z.sibling;return null}function i(D,z){for(D=new Map;z!==null;)z.key!==null?D.set(z.key,z):D.set(z.index,z),z=z.sibling;return D}function d(D,z){return D=$r(D,z),D.index=0,D.sibling=null,D}function p(D,z,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<z?(D.flags|=2,z):U):(D.flags|=2,z)):(D.flags|=1048576,z)}function S(D){return e&&D.alternate===null&&(D.flags|=2),D}function T(D,z,U,se){return z===null||z.tag!==6?(z=rd(U,D.mode,se),z.return=D,z):(z=d(z,U),z.return=D,z)}function L(D,z,U,se){var ve=U.type;return ve===W?re(D,z,U.props.children,se,U.key):z!==null&&(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===ie&&dp(ve)===z.type)?(se=d(z,U.props),se.ref=ba(D,z,U),se.return=D,se):(se=hl(U.type,U.key,U.props,null,D.mode,se),se.ref=ba(D,z,U),se.return=D,se)}function V(D,z,U,se){return z===null||z.tag!==4||z.stateNode.containerInfo!==U.containerInfo||z.stateNode.implementation!==U.implementation?(z=od(U,D.mode,se),z.return=D,z):(z=d(z,U.children||[]),z.return=D,z)}function re(D,z,U,se,ve){return z===null||z.tag!==7?(z=ko(U,D.mode,se,ve),z.return=D,z):(z=d(z,U),z.return=D,z)}function oe(D,z,U){if(typeof z=="string"&&z!==""||typeof z=="number")return z=rd(""+z,D.mode,U),z.return=D,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case $:return U=hl(z.type,z.key,z.props,null,D.mode,U),U.ref=ba(D,null,z),U.return=D,U;case B:return z=od(z,D.mode,U),z.return=D,z;case ie:var se=z._init;return oe(D,se(z._payload),U)}if(Sr(z)||q(z))return z=ko(z,D.mode,U,null),z.return=D,z;Hi(D,z)}return null}function te(D,z,U,se){var ve=z!==null?z.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return ve!==null?null:T(D,z,""+U,se);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case $:return U.key===ve?L(D,z,U,se):null;case B:return U.key===ve?V(D,z,U,se):null;case ie:return ve=U._init,te(D,z,ve(U._payload),se)}if(Sr(U)||q(U))return ve!==null?null:re(D,z,U,se,null);Hi(D,U)}return null}function fe(D,z,U,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number")return D=D.get(U)||null,T(z,D,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case $:return D=D.get(se.key===null?U:se.key)||null,L(z,D,se,ve);case B:return D=D.get(se.key===null?U:se.key)||null,V(z,D,se,ve);case ie:var Se=se._init;return fe(D,z,U,Se(se._payload),ve)}if(Sr(se)||q(se))return D=D.get(U)||null,re(z,D,se,ve,null);Hi(z,se)}return null}function ge(D,z,U,se){for(var ve=null,Se=null,ke=z,Ee=z=0,ft=null;ke!==null&&Ee<U.length;Ee++){ke.index>Ee?(ft=ke,ke=null):ft=ke.sibling;var ze=te(D,ke,U[Ee],se);if(ze===null){ke===null&&(ke=ft);break}e&&ke&&ze.alternate===null&&n(D,ke),z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze,ke=ft}if(Ee===U.length)return s(D,ke),Ge&&mo(D,Ee),ve;if(ke===null){for(;Ee<U.length;Ee++)ke=oe(D,U[Ee],se),ke!==null&&(z=p(ke,z,Ee),Se===null?ve=ke:Se.sibling=ke,Se=ke);return Ge&&mo(D,Ee),ve}for(ke=i(D,ke);Ee<U.length;Ee++)ft=fe(ke,D,Ee,U[Ee],se),ft!==null&&(e&&ft.alternate!==null&&ke.delete(ft.key===null?Ee:ft.key),z=p(ft,z,Ee),Se===null?ve=ft:Se.sibling=ft,Se=ft);return e&&ke.forEach(function(Br){return n(D,Br)}),Ge&&mo(D,Ee),ve}function ye(D,z,U,se){var ve=q(U);if(typeof ve!="function")throw Error(o(150));if(U=ve.call(U),U==null)throw Error(o(151));for(var Se=ve=null,ke=z,Ee=z=0,ft=null,ze=U.next();ke!==null&&!ze.done;Ee++,ze=U.next()){ke.index>Ee?(ft=ke,ke=null):ft=ke.sibling;var Br=te(D,ke,ze.value,se);if(Br===null){ke===null&&(ke=ft);break}e&&ke&&Br.alternate===null&&n(D,ke),z=p(Br,z,Ee),Se===null?ve=Br:Se.sibling=Br,Se=Br,ke=ft}if(ze.done)return s(D,ke),Ge&&mo(D,Ee),ve;if(ke===null){for(;!ze.done;Ee++,ze=U.next())ze=oe(D,ze.value,se),ze!==null&&(z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze);return Ge&&mo(D,Ee),ve}for(ke=i(D,ke);!ze.done;Ee++,ze=U.next())ze=fe(ke,D,Ee,ze.value,se),ze!==null&&(e&&ze.alternate!==null&&ke.delete(ze.key===null?Ee:ze.key),z=p(ze,z,Ee),Se===null?ve=ze:Se.sibling=ze,Se=ze);return e&&ke.forEach(function(m1){return n(D,m1)}),Ge&&mo(D,Ee),ve}function ot(D,z,U,se){if(typeof U=="object"&&U!==null&&U.type===W&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case $:e:{for(var ve=U.key,Se=z;Se!==null;){if(Se.key===ve){if(ve=U.type,ve===W){if(Se.tag===7){s(D,Se.sibling),z=d(Se,U.props.children),z.return=D,D=z;break e}}else if(Se.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===ie&&dp(ve)===Se.type){s(D,Se.sibling),z=d(Se,U.props),z.ref=ba(D,Se,U),z.return=D,D=z;break e}s(D,Se);break}else n(D,Se);Se=Se.sibling}U.type===W?(z=ko(U.props.children,D.mode,se,U.key),z.return=D,D=z):(se=hl(U.type,U.key,U.props,null,D.mode,se),se.ref=ba(D,z,U),se.return=D,D=se)}return S(D);case B:e:{for(Se=U.key;z!==null;){if(z.key===Se)if(z.tag===4&&z.stateNode.containerInfo===U.containerInfo&&z.stateNode.implementation===U.implementation){s(D,z.sibling),z=d(z,U.children||[]),z.return=D,D=z;break e}else{s(D,z);break}else n(D,z);z=z.sibling}z=od(U,D.mode,se),z.return=D,D=z}return S(D);case ie:return Se=U._init,ot(D,z,Se(U._payload),se)}if(Sr(U))return ge(D,z,U,se);if(q(U))return ye(D,z,U,se);Hi(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,z!==null&&z.tag===6?(s(D,z.sibling),z=d(z,U),z.return=D,D=z):(s(D,z),z=rd(U,D.mode,se),z.return=D,D=z),S(D)):s(D,z)}return ot}var us=fp(!0),hp=fp(!1),Wi=Mr(null),Vi=null,ds=null,hu=null;function pu(){hu=ds=Vi=null}function mu(e){var n=Wi.current;Qe(Wi),e._currentValue=n}function gu(e,n,s){for(;e!==null;){var i=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),e===s)break;e=e.return}}function fs(e,n){Vi=e,hu=ds=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Dt=!0),e.firstContext=null)}function en(e){var n=e._currentValue;if(hu!==e)if(e={context:e,memoizedValue:n,next:null},ds===null){if(Vi===null)throw Error(o(308));ds=e,Vi.dependencies={lanes:0,firstContext:e}}else ds=ds.next=e;return n}var go=null;function yu(e){go===null?go=[e]:go.push(e)}function pp(e,n,s,i){var d=n.interleaved;return d===null?(s.next=s,yu(n)):(s.next=d.next,d.next=s),n.interleaved=s,nr(e,i)}function nr(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Lr=!1;function vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mp(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rr(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function zr(e,n,s){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Le&2)!==0){var d=i.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),i.pending=n,nr(e,s)}return d=i.interleaved,d===null?(n.next=n,yu(i)):(n.next=d.next,d.next=n),i.interleaved=n,nr(e,s)}function Ki(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var i=n.lanes;i&=e.pendingLanes,s|=i,n.lanes=s,Ic(e,s)}}function gp(e,n){var s=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var d=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var S={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?d=p=S:p=p.next=S,s=s.next}while(s!==null);p===null?d=p=n:p=p.next=n}else d=p=n;s={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:i.shared,effects:i.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Qi(e,n,s,i){var d=e.updateQueue;Lr=!1;var p=d.firstBaseUpdate,S=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var L=T,V=L.next;L.next=null,S===null?p=V:S.next=V,S=L;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==S&&(T===null?re.firstBaseUpdate=V:T.next=V,re.lastBaseUpdate=L))}if(p!==null){var oe=d.baseState;S=0,re=V=L=null,T=p;do{var te=T.lane,fe=T.eventTime;if((i&te)===te){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ge=e,ye=T;switch(te=n,fe=s,ye.tag){case 1:if(ge=ye.payload,typeof ge=="function"){oe=ge.call(fe,oe,te);break e}oe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ye.payload,te=typeof ge=="function"?ge.call(fe,oe,te):ge,te==null)break e;oe=Q({},oe,te);break e;case 2:Lr=!0}}T.callback!==null&&T.lane!==0&&(e.flags|=64,te=d.effects,te===null?d.effects=[T]:te.push(T))}else fe={eventTime:fe,lane:te,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(V=re=fe,L=oe):re=re.next=fe,S|=te;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;te=T,T=te.next,te.next=null,d.lastBaseUpdate=te,d.shared.pending=null}}while(!0);if(re===null&&(L=oe),d.baseState=L,d.firstBaseUpdate=V,d.lastBaseUpdate=re,n=d.shared.interleaved,n!==null){d=n;do S|=d.lane,d=d.next;while(d!==n)}else p===null&&(d.shared.lanes=0);xo|=S,e.lanes=S,e.memoizedState=oe}}function yp(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var i=e[n],d=i.callback;if(d!==null){if(i.callback=null,i=s,typeof d!="function")throw Error(o(191,d));d.call(i)}}}var Sa={},_n=Mr(Sa),ka=Mr(Sa),Ca=Mr(Sa);function yo(e){if(e===Sa)throw Error(o(174));return e}function xu(e,n){switch(He(Ca,n),He(ka,e),He(_n,Sa),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Mn(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Mn(n,e)}Qe(_n),He(_n,n)}function hs(){Qe(_n),Qe(ka),Qe(Ca)}function vp(e){yo(Ca.current);var n=yo(_n.current),s=Mn(n,e.type);n!==s&&(He(ka,e),He(_n,s))}function wu(e){ka.current===e&&(Qe(_n),Qe(ka))}var Xe=Mr(0);function qi(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var bu=[];function Su(){for(var e=0;e<bu.length;e++)bu[e]._workInProgressVersionPrimary=null;bu.length=0}var Gi=A.ReactCurrentDispatcher,ku=A.ReactCurrentBatchConfig,vo=0,Je=null,it=null,ut=null,Yi=!1,Ea=!1,Na=0,Ow=0;function wt(){throw Error(o(321))}function Cu(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!hn(e[s],n[s]))return!1;return!0}function Eu(e,n,s,i,d,p){if(vo=p,Je=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Gi.current=e===null||e.memoizedState===null?$w:Bw,e=s(i,d),Ea){p=0;do{if(Ea=!1,Na=0,25<=p)throw Error(o(301));p+=1,ut=it=null,n.updateQueue=null,Gi.current=Hw,e=s(i,d)}while(Ea)}if(Gi.current=Zi,n=it!==null&&it.next!==null,vo=0,ut=it=Je=null,Yi=!1,n)throw Error(o(300));return e}function Nu(){var e=Na!==0;return Na=0,e}function Fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Je.memoizedState=ut=e:ut=ut.next=e,ut}function tn(){if(it===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var n=ut===null?Je.memoizedState:ut.next;if(n!==null)ut=n,it=e;else{if(e===null)throw Error(o(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},ut===null?Je.memoizedState=ut=e:ut=ut.next=e}return ut}function Pa(e,n){return typeof n=="function"?n(e):n}function Pu(e){var n=tn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=it,d=i.baseQueue,p=s.pending;if(p!==null){if(d!==null){var S=d.next;d.next=p.next,p.next=S}i.baseQueue=d=p,s.pending=null}if(d!==null){p=d.next,i=i.baseState;var T=S=null,L=null,V=p;do{var re=V.lane;if((vo&re)===re)L!==null&&(L=L.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),i=V.hasEagerState?V.eagerState:e(i,V.action);else{var oe={lane:re,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};L===null?(T=L=oe,S=i):L=L.next=oe,Je.lanes|=re,xo|=re}V=V.next}while(V!==null&&V!==p);L===null?S=i:L.next=T,hn(i,n.memoizedState)||(Dt=!0),n.memoizedState=i,n.baseState=S,n.baseQueue=L,s.lastRenderedState=i}if(e=s.interleaved,e!==null){d=e;do p=d.lane,Je.lanes|=p,xo|=p,d=d.next;while(d!==e)}else d===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function Ru(e){var n=tn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=s.dispatch,d=s.pending,p=n.memoizedState;if(d!==null){s.pending=null;var S=d=d.next;do p=e(p,S.action),S=S.next;while(S!==d);hn(p,n.memoizedState)||(Dt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),s.lastRenderedState=p}return[p,i]}function xp(){}function wp(e,n){var s=Je,i=tn(),d=n(),p=!hn(i.memoizedState,d);if(p&&(i.memoizedState=d,Dt=!0),i=i.queue,ju(kp.bind(null,s,i,e),[e]),i.getSnapshot!==n||p||ut!==null&&ut.memoizedState.tag&1){if(s.flags|=2048,Ra(9,Sp.bind(null,s,i,d,n),void 0,null),dt===null)throw Error(o(349));(vo&30)!==0||bp(s,n,d)}return d}function bp(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=Je.updateQueue,n===null?(n={lastEffect:null,stores:null},Je.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function Sp(e,n,s,i){n.value=s,n.getSnapshot=i,Cp(n)&&Ep(e)}function kp(e,n,s){return s(function(){Cp(n)&&Ep(e)})}function Cp(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!hn(e,s)}catch{return!0}}function Ep(e){var n=nr(e,1);n!==null&&vn(n,e,1,-1)}function Np(e){var n=Fn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:e},n.queue=e,e=e.dispatch=Uw.bind(null,Je,e),[n.memoizedState,e]}function Ra(e,n,s,i){return e={tag:e,create:n,destroy:s,deps:i,next:null},n=Je.updateQueue,n===null?(n={lastEffect:null,stores:null},Je.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(i=s.next,s.next=e,e.next=i,n.lastEffect=e)),e}function Pp(){return tn().memoizedState}function Xi(e,n,s,i){var d=Fn();Je.flags|=e,d.memoizedState=Ra(1|n,s,void 0,i===void 0?null:i)}function Ji(e,n,s,i){var d=tn();i=i===void 0?null:i;var p=void 0;if(it!==null){var S=it.memoizedState;if(p=S.destroy,i!==null&&Cu(i,S.deps)){d.memoizedState=Ra(n,s,p,i);return}}Je.flags|=e,d.memoizedState=Ra(1|n,s,p,i)}function Rp(e,n){return Xi(8390656,8,e,n)}function ju(e,n){return Ji(2048,8,e,n)}function jp(e,n){return Ji(4,2,e,n)}function Tp(e,n){return Ji(4,4,e,n)}function Mp(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Ip(e,n,s){return s=s!=null?s.concat([e]):null,Ji(4,4,Mp.bind(null,n,e),s)}function Tu(){}function Ap(e,n){var s=tn();n=n===void 0?null:n;var i=s.memoizedState;return i!==null&&n!==null&&Cu(n,i[1])?i[0]:(s.memoizedState=[e,n],e)}function Lp(e,n){var s=tn();n=n===void 0?null:n;var i=s.memoizedState;return i!==null&&n!==null&&Cu(n,i[1])?i[0]:(e=e(),s.memoizedState=[e,n],e)}function zp(e,n,s){return(vo&21)===0?(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=s):(hn(s,n)||(s=dh(),Je.lanes|=s,xo|=s,e.baseState=!0),n)}function _w(e,n){var s=Fe;Fe=s!==0&&4>s?s:4,e(!0);var i=ku.transition;ku.transition={};try{e(!1),n()}finally{Fe=s,ku.transition=i}}function Dp(){return tn().memoizedState}function Fw(e,n,s){var i=Fr(e);if(s={lane:i,action:s,hasEagerState:!1,eagerState:null,next:null},Op(e))_p(n,s);else if(s=pp(e,n,s,i),s!==null){var d=jt();vn(s,e,i,d),Fp(s,n,i)}}function Uw(e,n,s){var i=Fr(e),d={lane:i,action:s,hasEagerState:!1,eagerState:null,next:null};if(Op(e))_p(n,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var S=n.lastRenderedState,T=p(S,s);if(d.hasEagerState=!0,d.eagerState=T,hn(T,S)){var L=n.interleaved;L===null?(d.next=d,yu(n)):(d.next=L.next,L.next=d),n.interleaved=d;return}}catch{}finally{}s=pp(e,n,d,i),s!==null&&(d=jt(),vn(s,e,i,d),Fp(s,n,i))}}function Op(e){var n=e.alternate;return e===Je||n!==null&&n===Je}function _p(e,n){Ea=Yi=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function Fp(e,n,s){if((s&4194240)!==0){var i=n.lanes;i&=e.pendingLanes,s|=i,n.lanes=s,Ic(e,s)}}var Zi={readContext:en,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},$w={readContext:en,useCallback:function(e,n){return Fn().memoizedState=[e,n===void 0?null:n],e},useContext:en,useEffect:Rp,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,Xi(4194308,4,Mp.bind(null,n,e),s)},useLayoutEffect:function(e,n){return Xi(4194308,4,e,n)},useInsertionEffect:function(e,n){return Xi(4,2,e,n)},useMemo:function(e,n){var s=Fn();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var i=Fn();return n=s!==void 0?s(n):n,i.memoizedState=i.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},i.queue=e,e=e.dispatch=Fw.bind(null,Je,e),[i.memoizedState,e]},useRef:function(e){var n=Fn();return e={current:e},n.memoizedState=e},useState:Np,useDebugValue:Tu,useDeferredValue:function(e){return Fn().memoizedState=e},useTransition:function(){var e=Np(!1),n=e[0];return e=_w.bind(null,e[1]),Fn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var i=Je,d=Fn();if(Ge){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),dt===null)throw Error(o(349));(vo&30)!==0||bp(i,n,s)}d.memoizedState=s;var p={value:s,getSnapshot:n};return d.queue=p,Rp(kp.bind(null,i,p,e),[e]),i.flags|=2048,Ra(9,Sp.bind(null,i,p,s,n),void 0,null),s},useId:function(){var e=Fn(),n=dt.identifierPrefix;if(Ge){var s=tr,i=er;s=(i&~(1<<32-fn(i)-1)).toString(32)+s,n=":"+n+"R"+s,s=Na++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=Ow++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Bw={readContext:en,useCallback:Ap,useContext:en,useEffect:ju,useImperativeHandle:Ip,useInsertionEffect:jp,useLayoutEffect:Tp,useMemo:Lp,useReducer:Pu,useRef:Pp,useState:function(){return Pu(Pa)},useDebugValue:Tu,useDeferredValue:function(e){var n=tn();return zp(n,it.memoizedState,e)},useTransition:function(){var e=Pu(Pa)[0],n=tn().memoizedState;return[e,n]},useMutableSource:xp,useSyncExternalStore:wp,useId:Dp,unstable_isNewReconciler:!1},Hw={readContext:en,useCallback:Ap,useContext:en,useEffect:ju,useImperativeHandle:Ip,useInsertionEffect:jp,useLayoutEffect:Tp,useMemo:Lp,useReducer:Ru,useRef:Pp,useState:function(){return Ru(Pa)},useDebugValue:Tu,useDeferredValue:function(e){var n=tn();return it===null?n.memoizedState=e:zp(n,it.memoizedState,e)},useTransition:function(){var e=Ru(Pa)[0],n=tn().memoizedState;return[e,n]},useMutableSource:xp,useSyncExternalStore:wp,useId:Dp,unstable_isNewReconciler:!1};function mn(e,n){if(e&&e.defaultProps){n=Q({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function Mu(e,n,s,i){n=e.memoizedState,s=s(i,n),s=s==null?n:Q({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var el={isMounted:function(e){return(e=e._reactInternals)?uo(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var i=jt(),d=Fr(e),p=rr(i,d);p.payload=n,s!=null&&(p.callback=s),n=zr(e,p,d),n!==null&&(vn(n,e,d,i),Ki(n,e,d))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var i=jt(),d=Fr(e),p=rr(i,d);p.tag=1,p.payload=n,s!=null&&(p.callback=s),n=zr(e,p,d),n!==null&&(vn(n,e,d,i),Ki(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=jt(),i=Fr(e),d=rr(s,i);d.tag=2,n!=null&&(d.callback=n),n=zr(e,d,i),n!==null&&(vn(n,e,i,s),Ki(n,e,i))}};function Up(e,n,s,i,d,p,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,S):n.prototype&&n.prototype.isPureReactComponent?!pa(s,i)||!pa(d,p):!0}function $p(e,n,s){var i=!1,d=Ir,p=n.contextType;return typeof p=="object"&&p!==null?p=en(p):(d=zt(n)?ho:xt.current,i=n.contextTypes,p=(i=i!=null)?as(e,d):Ir),n=new n(s,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=el,e.stateNode=n,n._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=p),n}function Bp(e,n,s,i){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,i),n.state!==e&&el.enqueueReplaceState(n,n.state,null)}function Iu(e,n,s,i){var d=e.stateNode;d.props=s,d.state=e.memoizedState,d.refs={},vu(e);var p=n.contextType;typeof p=="object"&&p!==null?d.context=en(p):(p=zt(n)?ho:xt.current,d.context=as(e,p)),d.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Mu(e,n,p,s),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&el.enqueueReplaceState(d,d.state,null),Qi(e,s,d,i),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function ps(e,n){try{var s="",i=n;do s+=ue(i),i=i.return;while(i);var d=s}catch(p){d=`
39
39
  Error generating stack: `+p.message+`
40
- `+p.stack}return{value:e,source:n,stack:d,digest:null}}function Mu(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function Iu(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var Bw=typeof WeakMap=="function"?WeakMap:Map;function $p(e,n,s){s=rr(-1,s),s.tag=3,s.payload={element:null};var i=n.value;return s.callback=function(){sl||(sl=!0,Qu=i),Iu(e,n)},s}function Bp(e,n,s){s=rr(-1,s),s.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var d=n.value;s.payload=function(){return i(d)},s.callback=function(){Iu(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Iu(e,n),typeof i!="function"&&(Or===null?Or=new Set([this]):Or.add(this));var S=n.stack;this.componentDidCatch(n.value,{componentStack:S!==null?S:""})}),s}function Wp(e,n,s){var i=e.pingCache;if(i===null){i=e.pingCache=new Bw;var d=new Set;i.set(n,d)}else d=i.get(n),d===void 0&&(d=new Set,i.set(n,d));d.has(s)||(d.add(s),e=n1.bind(null,e,n,s),n.then(e,e))}function Hp(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Vp(e,n,s,i,d){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=rr(-1,1),n.tag=2,zr(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Ww=A.ReactCurrentOwner,Dt=!1;function Rt(e,n,s,i){n.child=e===null?dp(n,null,s,i):ls(n,e.child,s,i)}function Kp(e,n,s,i,d){s=s.render;var p=n.ref;return us(n,d),i=ku(e,n,s,i,p,d),s=Cu(),e!==null&&!Dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,or(e,n,d)):(Ge&&s&&au(n),n.flags|=1,Rt(e,n,i,d),n.child)}function Qp(e,n,s,i,d){if(e===null){var p=s.type;return typeof p=="function"&&!ed(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=p,qp(e,n,p,i,d)):(e=dl(s.type,null,i,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&d)===0){var S=p.memoizedProps;if(s=s.compare,s=s!==null?s:fa,s(S,i)&&e.ref===n.ref)return or(e,n,d)}return n.flags|=1,e=$r(p,i),e.ref=n.ref,e.return=n,n.child=e}function qp(e,n,s,i,d){if(e!==null){var p=e.memoizedProps;if(fa(p,i)&&e.ref===n.ref)if(Dt=!1,n.pendingProps=i=p,(e.lanes&d)!==0)(e.flags&131072)!==0&&(Dt=!0);else return n.lanes=e.lanes,or(e,n,d)}return Au(e,n,s,i,d)}function Gp(e,n,s){var i=n.pendingProps,d=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(ps,Kt),Kt|=s;else{if((s&1073741824)===0)return e=p!==null?p.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,We(ps,Kt),Kt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=p!==null?p.baseLanes:s,We(ps,Kt),Kt|=i}else p!==null?(i=p.baseLanes|s,n.memoizedState=null):i=s,We(ps,Kt),Kt|=i;return Rt(e,n,d,s),n.child}function Yp(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function Au(e,n,s,i,d){var p=zt(s)?ho:xt.current;return p=os(n,p),us(n,d),s=ku(e,n,s,i,p,d),i=Cu(),e!==null&&!Dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,or(e,n,d)):(Ge&&i&&au(n),n.flags|=1,Rt(e,n,s,d),n.child)}function Xp(e,n,s,i,d){if(zt(s)){var p=!0;Di(n)}else p=!1;if(us(n,d),n.stateNode===null)el(e,n),Fp(n,s,i),Tu(n,s,i,d),i=!0;else if(e===null){var S=n.stateNode,T=n.memoizedProps;S.props=T;var L=S.context,V=s.contextType;typeof V=="object"&&V!==null?V=en(V):(V=zt(s)?ho:xt.current,V=os(n,V));var re=s.getDerivedStateFromProps,oe=typeof re=="function"||typeof S.getSnapshotBeforeUpdate=="function";oe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==i||L!==V)&&Up(n,S,i,V),Lr=!1;var te=n.memoizedState;S.state=te,Vi(n,i,S,d),L=n.memoizedState,T!==i||te!==L||Lt.current||Lr?(typeof re=="function"&&(ju(n,s,re,i),L=n.memoizedState),(T=Lr||_p(n,s,T,i,te,L,V))?(oe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(n.flags|=4194308)):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=L),S.props=i,S.state=L,S.context=V,i=T):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{S=n.stateNode,hp(e,n),T=n.memoizedProps,V=n.type===n.elementType?T:mn(n.type,T),S.props=V,oe=n.pendingProps,te=S.context,L=s.contextType,typeof L=="object"&&L!==null?L=en(L):(L=zt(s)?ho:xt.current,L=os(n,L));var fe=s.getDerivedStateFromProps;(re=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==oe||te!==L)&&Up(n,S,i,L),Lr=!1,te=n.memoizedState,S.state=te,Vi(n,i,S,d);var me=n.memoizedState;T!==oe||te!==me||Lt.current||Lr?(typeof fe=="function"&&(ju(n,s,fe,i),me=n.memoizedState),(V=Lr||_p(n,s,V,i,te,me,L)||!1)?(re||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(i,me,L),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(i,me,L)),typeof S.componentDidUpdate=="function"&&(n.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof S.componentDidUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=me),S.props=i,S.state=me,S.context=L,i=V):(typeof S.componentDidUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),i=!1)}return Lu(e,n,s,i,p,d)}function Lu(e,n,s,i,d,p){Yp(e,n);var S=(n.flags&128)!==0;if(!i&&!S)return d&&np(n,s,!1),or(e,n,p);i=n.stateNode,Ww.current=n;var T=S&&typeof s.getDerivedStateFromError!="function"?null:i.render();return n.flags|=1,e!==null&&S?(n.child=ls(n,e.child,null,p),n.child=ls(n,null,T,p)):Rt(e,n,T,p),n.memoizedState=i.state,d&&np(n,s,!0),n.child}function Jp(e){var n=e.stateNode;n.pendingContext?ep(e,n.pendingContext,n.pendingContext!==n.context):n.context&&ep(e,n.context,!1),yu(e,n.containerInfo)}function Zp(e,n,s,i,d){return is(),uu(d),n.flags|=256,Rt(e,n,s,i),n.child}var zu={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function em(e,n,s){var i=n.pendingProps,d=Xe.current,p=!1,S=(n.flags&128)!==0,T;if((T=S)||(T=e!==null&&e.memoizedState===null?!1:(d&2)!==0),T?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),We(Xe,d&1),e===null)return cu(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(S=i.children,e=i.fallback,p?(i=n.mode,p=n.child,S={mode:"hidden",children:S},(i&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=S):p=fl(S,i,0,null),e=ko(e,i,s,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=Du(s),n.memoizedState=zu,e):Ou(n,S));if(d=e.memoizedState,d!==null&&(T=d.dehydrated,T!==null))return Hw(e,n,S,i,T,d,s);if(p){p=i.fallback,S=n.mode,d=e.child,T=d.sibling;var L={mode:"hidden",children:i.children};return(S&1)===0&&n.child!==d?(i=n.child,i.childLanes=0,i.pendingProps=L,n.deletions=null):(i=$r(d,L),i.subtreeFlags=d.subtreeFlags&14680064),T!==null?p=$r(T,p):(p=ko(p,S,s,null),p.flags|=2),p.return=n,i.return=n,i.sibling=p,n.child=i,i=p,p=n.child,S=e.child.memoizedState,S=S===null?Du(s):{baseLanes:S.baseLanes|s,cachePool:null,transitions:S.transitions},p.memoizedState=S,p.childLanes=e.childLanes&~s,n.memoizedState=zu,i}return p=e.child,e=p.sibling,i=$r(p,{mode:"visible",children:i.children}),(n.mode&1)===0&&(i.lanes=s),i.return=n,i.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=i,n.memoizedState=null,i}function Ou(e,n){return n=fl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Zi(e,n,s,i){return i!==null&&uu(i),ls(n,e.child,null,s),e=Ou(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Hw(e,n,s,i,d,p,S){if(s)return n.flags&256?(n.flags&=-257,i=Mu(Error(o(422))),Zi(e,n,S,i)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=i.fallback,d=n.mode,i=fl({mode:"visible",children:i.children},d,0,null),p=ko(p,d,S,null),p.flags|=2,i.return=n,p.return=n,i.sibling=p,n.child=i,(n.mode&1)!==0&&ls(n,e.child,null,S),n.child.memoizedState=Du(S),n.memoizedState=zu,p);if((n.mode&1)===0)return Zi(e,n,S,null);if(d.data==="$!"){if(i=d.nextSibling&&d.nextSibling.dataset,i)var T=i.dgst;return i=T,p=Error(o(419)),i=Mu(p,i,void 0),Zi(e,n,S,i)}if(T=(S&e.childLanes)!==0,Dt||T){if(i=dt,i!==null){switch(S&-S){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(i.suspendedLanes|S))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,nr(e,d),vn(i,e,d,-1))}return Zu(),i=Mu(Error(o(421))),Zi(e,n,S,i)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=r1.bind(null,e),d._reactRetry=n,null):(e=p.treeContext,Vt=Tr(d.nextSibling),Ht=n,Ge=!0,pn=null,e!==null&&(Jt[Zt++]=er,Jt[Zt++]=tr,Jt[Zt++]=po,er=e.id,tr=e.overflow,po=n),n=Ou(n,i.children),n.flags|=4096,n)}function tm(e,n,s){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),pu(e.return,n,s)}function _u(e,n,s,i,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=s,p.tailMode=d)}function nm(e,n,s){var i=n.pendingProps,d=i.revealOrder,p=i.tail;if(Rt(e,n,i.children,s),i=Xe.current,(i&2)!==0)i=i&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tm(e,s,n);else if(e.tag===19)tm(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(We(Xe,i),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&Ki(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),_u(n,!1,d,s,p);break;case"backwards":for(s=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Ki(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}_u(n,!0,s,null,p);break;case"together":_u(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function el(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function or(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),xo|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=$r(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=$r(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Vw(e,n,s){switch(n.tag){case 3:Jp(n),is();break;case 5:gp(n);break;case 1:zt(n.type)&&Di(n);break;case 4:yu(n,n.stateNode.containerInfo);break;case 10:var i=n.type._context,d=n.memoizedProps.value;We(Bi,i._currentValue),i._currentValue=d;break;case 13:if(i=n.memoizedState,i!==null)return i.dehydrated!==null?(We(Xe,Xe.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?em(e,n,s):(We(Xe,Xe.current&1),e=or(e,n,s),e!==null?e.sibling:null);We(Xe,Xe.current&1);break;case 19:if(i=(s&n.childLanes)!==0,(e.flags&128)!==0){if(i)return nm(e,n,s);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),We(Xe,Xe.current),i)break;return null;case 22:case 23:return n.lanes=0,Gp(e,n,s)}return or(e,n,s)}var rm,Fu,om,sm;rm=function(e,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Fu=function(){},om=function(e,n,s,i){var d=e.memoizedProps;if(d!==i){e=n.stateNode,yo(_n.current);var p=null;switch(s){case"input":d=vt(e,d),i=vt(e,i),p=[];break;case"select":d=Q({},d,{value:void 0}),i=Q({},i,{value:void 0}),p=[];break;case"textarea":d=Ho(e,d),i=Ho(e,i),p=[];break;default:typeof d.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Ai)}An(s,i);var S;s=null;for(V in d)if(!i.hasOwnProperty(V)&&d.hasOwnProperty(V)&&d[V]!=null)if(V==="style"){var T=d[V];for(S in T)T.hasOwnProperty(S)&&(s||(s={}),s[S]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(l.hasOwnProperty(V)?p||(p=[]):(p=p||[]).push(V,null));for(V in i){var L=i[V];if(T=d!=null?d[V]:void 0,i.hasOwnProperty(V)&&L!==T&&(L!=null||T!=null))if(V==="style")if(T){for(S in T)!T.hasOwnProperty(S)||L&&L.hasOwnProperty(S)||(s||(s={}),s[S]="");for(S in L)L.hasOwnProperty(S)&&T[S]!==L[S]&&(s||(s={}),s[S]=L[S])}else s||(p||(p=[]),p.push(V,s)),s=L;else V==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,T=T?T.__html:void 0,L!=null&&T!==L&&(p=p||[]).push(V,L)):V==="children"?typeof L!="string"&&typeof L!="number"||(p=p||[]).push(V,""+L):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(l.hasOwnProperty(V)?(L!=null&&V==="onScroll"&&Ke("scroll",e),p||T===L||(p=[])):(p=p||[]).push(V,L))}s&&(p=p||[]).push("style",s);var V=p;(n.updateQueue=V)&&(n.flags|=4)}},sm=function(e,n,s,i){s!==i&&(n.flags|=4)};function Pa(e,n){if(!Ge)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function bt(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,i=0;if(n)for(var d=e.child;d!==null;)s|=d.lanes|d.childLanes,i|=d.subtreeFlags&14680064,i|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=s,n}function Kw(e,n,s){var i=n.pendingProps;switch(iu(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(n),null;case 1:return zt(n.type)&&zi(),bt(n),null;case 3:return i=n.stateNode,ds(),Qe(Lt),Qe(xt),wu(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ui(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,pn!==null&&(Yu(pn),pn=null))),Fu(e,n),bt(n),null;case 5:vu(n);var d=yo(Sa.current);if(s=n.type,e!==null&&n.stateNode!=null)om(e,n,s,i,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!i){if(n.stateNode===null)throw Error(o(166));return bt(n),null}if(e=yo(_n.current),Ui(n)){i=n.stateNode,s=n.type;var p=n.memoizedProps;switch(i[On]=n,i[ya]=p,e=(n.mode&1)!==0,s){case"dialog":Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":case"embed":Ke("load",i);break;case"video":case"audio":for(d=0;d<pa.length;d++)Ke(pa[d],i);break;case"source":Ke("error",i);break;case"img":case"image":case"link":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"input":Rn(i,p),Ke("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!p.multiple},Ke("invalid",i);break;case"textarea":Tn(i,p),Ke("invalid",i)}An(s,p),d=null;for(var S in p)if(p.hasOwnProperty(S)){var T=p[S];S==="children"?typeof T=="string"?i.textContent!==T&&(p.suppressHydrationWarning!==!0&&Ii(i.textContent,T,e),d=["children",T]):typeof T=="number"&&i.textContent!==""+T&&(p.suppressHydrationWarning!==!0&&Ii(i.textContent,T,e),d=["children",""+T]):l.hasOwnProperty(S)&&T!=null&&S==="onScroll"&&Ke("scroll",i)}switch(s){case"input":Te(i),br(i,p,!0);break;case"textarea":Te(i),ii(i);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(i.onclick=Ai)}i=d,n.updateQueue=i,i!==null&&(n.flags|=4)}else{S=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nt(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=S.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=S.createElement(s,{is:i.is}):(e=S.createElement(s),s==="select"&&(S=e,i.multiple?S.multiple=!0:i.size&&(S.size=i.size))):e=S.createElementNS(e,s),e[On]=n,e[ya]=i,rm(e,n,!1,!1),n.stateNode=e;e:{switch(S=Xs(s,i),s){case"dialog":Ke("cancel",e),Ke("close",e),d=i;break;case"iframe":case"object":case"embed":Ke("load",e),d=i;break;case"video":case"audio":for(d=0;d<pa.length;d++)Ke(pa[d],e);d=i;break;case"source":Ke("error",e),d=i;break;case"img":case"image":case"link":Ke("error",e),Ke("load",e),d=i;break;case"details":Ke("toggle",e),d=i;break;case"input":Rn(e,i),d=vt(e,i),Ke("invalid",e);break;case"option":d=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},d=Q({},i,{value:void 0}),Ke("invalid",e);break;case"textarea":Tn(e,i),d=Ho(e,i),Ke("invalid",e);break;default:d=i}An(s,d),T=d;for(p in T)if(T.hasOwnProperty(p)){var L=T[p];p==="style"?Xn(e,L):p==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&li(e,L)):p==="children"?typeof L=="string"?(s!=="textarea"||L!=="")&&In(e,L):typeof L=="number"&&In(e,""+L):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(l.hasOwnProperty(p)?L!=null&&p==="onScroll"&&Ke("scroll",e):L!=null&&P(e,p,L,S))}switch(s){case"input":Te(e),br(e,i,!1);break;case"textarea":Te(e),ii(e);break;case"option":i.value!=null&&e.setAttribute("value",""+he(i.value));break;case"select":e.multiple=!!i.multiple,p=i.value,p!=null?Xt(e,!!i.multiple,p,!1):i.defaultValue!=null&&Xt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=Ai)}switch(s){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return bt(n),null;case 6:if(e&&n.stateNode!=null)sm(e,n,e.memoizedProps,i);else{if(typeof i!="string"&&n.stateNode===null)throw Error(o(166));if(s=yo(Sa.current),yo(_n.current),Ui(n)){if(i=n.stateNode,s=n.memoizedProps,i[On]=n,(p=i.nodeValue!==s)&&(e=Ht,e!==null))switch(e.tag){case 3:Ii(i.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ii(i.nodeValue,s,(e.mode&1)!==0)}p&&(n.flags|=4)}else i=(s.nodeType===9?s:s.ownerDocument).createTextNode(i),i[On]=n,n.stateNode=i}return bt(n),null;case 13:if(Qe(Xe),i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ge&&Vt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)lp(),is(),n.flags|=98560,p=!1;else if(p=Ui(n),i!==null&&i.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[On]=n}else is(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),p=!1}else pn!==null&&(Yu(pn),pn=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Xe.current&1)!==0?lt===0&&(lt=3):Zu())),n.updateQueue!==null&&(n.flags|=4),bt(n),null);case 4:return ds(),Fu(e,n),e===null&&ma(n.stateNode.containerInfo),bt(n),null;case 10:return hu(n.type._context),bt(n),null;case 17:return zt(n.type)&&zi(),bt(n),null;case 19:if(Qe(Xe),p=n.memoizedState,p===null)return bt(n),null;if(i=(n.flags&128)!==0,S=p.rendering,S===null)if(i)Pa(p,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(S=Ki(e),S!==null){for(n.flags|=128,Pa(p,!1),i=S.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),n.subtreeFlags=0,i=s,s=n.child;s!==null;)p=s,e=i,p.flags&=14680066,S=p.alternate,S===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=S.childLanes,p.lanes=S.lanes,p.child=S.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=S.memoizedProps,p.memoizedState=S.memoizedState,p.updateQueue=S.updateQueue,p.type=S.type,e=S.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return We(Xe,Xe.current&1|2),n.child}e=e.sibling}p.tail!==null&&rt()>ms&&(n.flags|=128,i=!0,Pa(p,!1),n.lanes=4194304)}else{if(!i)if(e=Ki(S),e!==null){if(n.flags|=128,i=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),Pa(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!Ge)return bt(n),null}else 2*rt()-p.renderingStartTime>ms&&s!==1073741824&&(n.flags|=128,i=!0,Pa(p,!1),n.lanes=4194304);p.isBackwards?(S.sibling=n.child,n.child=S):(s=p.last,s!==null?s.sibling=S:n.child=S,p.last=S)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=rt(),n.sibling=null,s=Xe.current,We(Xe,i?s&1|2:s&1),n):(bt(n),null);case 22:case 23:return Ju(),i=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(n.flags|=8192),i&&(n.mode&1)!==0?(Kt&1073741824)!==0&&(bt(n),n.subtreeFlags&6&&(n.flags|=8192)):bt(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function Qw(e,n){switch(iu(n),n.tag){case 1:return zt(n.type)&&zi(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ds(),Qe(Lt),Qe(xt),wu(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return vu(n),null;case 13:if(Qe(Xe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));is()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Qe(Xe),null;case 4:return ds(),null;case 10:return hu(n.type._context),null;case 22:case 23:return Ju(),null;case 24:return null;default:return null}}var tl=!1,St=!1,qw=typeof WeakSet=="function"?WeakSet:Set,pe=null;function hs(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(i){et(e,n,i)}else s.current=null}function Uu(e,n,s){try{s()}catch(i){et(e,n,i)}}var am=!1;function Gw(e,n){if(Jc=bi,e=_h(),Hc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var d=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var S=0,T=-1,L=-1,V=0,re=0,oe=e,te=null;t:for(;;){for(var fe;oe!==s||d!==0&&oe.nodeType!==3||(T=S+d),oe!==p||i!==0&&oe.nodeType!==3||(L=S+i),oe.nodeType===3&&(S+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)te=oe,oe=fe;for(;;){if(oe===e)break t;if(te===s&&++V===d&&(T=S),te===p&&++re===i&&(L=S),(fe=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=fe}s=T===-1||L===-1?null:{start:T,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(Zc={focusedElem:e,selectionRange:s},bi=!1,pe=n;pe!==null;)if(n=pe,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,pe=e;else for(;pe!==null;){n=pe;try{var me=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ye=me.memoizedProps,ot=me.memoizedState,D=n.stateNode,z=D.getSnapshotBeforeUpdate(n.elementType===n.type?ye:mn(n.type,ye),ot);D.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var U=n.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(se){et(n,n.return,se)}if(e=n.sibling,e!==null){e.return=n.return,pe=e;break}pe=n.return}return me=am,am=!1,me}function Ra(e,n,s){var i=n.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var d=i=i.next;do{if((d.tag&e)===e){var p=d.destroy;d.destroy=void 0,p!==void 0&&Uu(n,s,p)}d=d.next}while(d!==i)}}function nl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.create;s.destroy=i()}s=s.next}while(s!==n)}}function $u(e){var n=e.ref;if(n!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof n=="function"?n(e):n.current=e}}function im(e){var n=e.alternate;n!==null&&(e.alternate=null,im(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[On],delete n[ya],delete n[ru],delete n[Mw],delete n[Iw])),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 lm(e){return e.tag===5||e.tag===3||e.tag===4}function cm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lm(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 Bu(e,n,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Ai));else if(i!==4&&(e=e.child,e!==null))for(Bu(e,n,s),e=e.sibling;e!==null;)Bu(e,n,s),e=e.sibling}function Wu(e,n,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Wu(e,n,s),e=e.sibling;e!==null;)Wu(e,n,s),e=e.sibling}var mt=null,gn=!1;function Dr(e,n,s){for(s=s.child;s!==null;)um(e,n,s),s=s.sibling}function um(e,n,s){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(mi,s)}catch{}switch(s.tag){case 5:St||hs(s,n);case 6:var i=mt,d=gn;mt=null,Dr(e,n,s),mt=i,gn=d,mt!==null&&(gn?(e=mt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):mt.removeChild(s.stateNode));break;case 18:mt!==null&&(gn?(e=mt,s=s.stateNode,e.nodeType===8?nu(e.parentNode,s):e.nodeType===1&&nu(e,s),aa(e)):nu(mt,s.stateNode));break;case 4:i=mt,d=gn,mt=s.stateNode.containerInfo,gn=!0,Dr(e,n,s),mt=i,gn=d;break;case 0:case 11:case 14:case 15:if(!St&&(i=s.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){d=i=i.next;do{var p=d,S=p.destroy;p=p.tag,S!==void 0&&((p&2)!==0||(p&4)!==0)&&Uu(s,n,S),d=d.next}while(d!==i)}Dr(e,n,s);break;case 1:if(!St&&(hs(s,n),i=s.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=s.memoizedProps,i.state=s.memoizedState,i.componentWillUnmount()}catch(T){et(s,n,T)}Dr(e,n,s);break;case 21:Dr(e,n,s);break;case 22:s.mode&1?(St=(i=St)||s.memoizedState!==null,Dr(e,n,s),St=i):Dr(e,n,s);break;default:Dr(e,n,s)}}function dm(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new qw),n.forEach(function(i){var d=o1.bind(null,e,i);s.has(i)||(s.add(i),i.then(d,d))})}}function yn(e,n){var s=n.deletions;if(s!==null)for(var i=0;i<s.length;i++){var d=s[i];try{var p=e,S=n,T=S;e:for(;T!==null;){switch(T.tag){case 5:mt=T.stateNode,gn=!1;break e;case 3:mt=T.stateNode.containerInfo,gn=!0;break e;case 4:mt=T.stateNode.containerInfo,gn=!0;break e}T=T.return}if(mt===null)throw Error(o(160));um(p,S,d),mt=null,gn=!1;var L=d.alternate;L!==null&&(L.return=null),d.return=null}catch(V){et(d,n,V)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)fm(n,e),n=n.sibling}function fm(e,n){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yn(n,e),Un(e),i&4){try{Ra(3,e,e.return),nl(3,e)}catch(ye){et(e,e.return,ye)}try{Ra(5,e,e.return)}catch(ye){et(e,e.return,ye)}}break;case 1:yn(n,e),Un(e),i&512&&s!==null&&hs(s,s.return);break;case 5:if(yn(n,e),Un(e),i&512&&s!==null&&hs(s,s.return),e.flags&32){var d=e.stateNode;try{In(d,"")}catch(ye){et(e,e.return,ye)}}if(i&4&&(d=e.stateNode,d!=null)){var p=e.memoizedProps,S=s!==null?s.memoizedProps:p,T=e.type,L=e.updateQueue;if(e.updateQueue=null,L!==null)try{T==="input"&&p.type==="radio"&&p.name!=null&&ln(d,p),Xs(T,S);var V=Xs(T,p);for(S=0;S<L.length;S+=2){var re=L[S],oe=L[S+1];re==="style"?Xn(d,oe):re==="dangerouslySetInnerHTML"?li(d,oe):re==="children"?In(d,oe):P(d,re,oe,V)}switch(T){case"input":cn(d,p);break;case"textarea":ai(d,p);break;case"select":var te=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var fe=p.value;fe!=null?Xt(d,!!p.multiple,fe,!1):te!==!!p.multiple&&(p.defaultValue!=null?Xt(d,!!p.multiple,p.defaultValue,!0):Xt(d,!!p.multiple,p.multiple?[]:"",!1))}d[ya]=p}catch(ye){et(e,e.return,ye)}}break;case 6:if(yn(n,e),Un(e),i&4){if(e.stateNode===null)throw Error(o(162));d=e.stateNode,p=e.memoizedProps;try{d.nodeValue=p}catch(ye){et(e,e.return,ye)}}break;case 3:if(yn(n,e),Un(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{aa(n.containerInfo)}catch(ye){et(e,e.return,ye)}break;case 4:yn(n,e),Un(e);break;case 13:yn(n,e),Un(e),d=e.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(Ku=rt())),i&4&&dm(e);break;case 22:if(re=s!==null&&s.memoizedState!==null,e.mode&1?(St=(V=St)||re,yn(n,e),St=V):yn(n,e),Un(e),i&8192){if(V=e.memoizedState!==null,(e.stateNode.isHidden=V)&&!re&&(e.mode&1)!==0)for(pe=e,re=e.child;re!==null;){for(oe=pe=re;pe!==null;){switch(te=pe,fe=te.child,te.tag){case 0:case 11:case 14:case 15:Ra(4,te,te.return);break;case 1:hs(te,te.return);var me=te.stateNode;if(typeof me.componentWillUnmount=="function"){i=te,s=te.return;try{n=i,me.props=n.memoizedProps,me.state=n.memoizedState,me.componentWillUnmount()}catch(ye){et(i,s,ye)}}break;case 5:hs(te,te.return);break;case 22:if(te.memoizedState!==null){mm(oe);continue}}fe!==null?(fe.return=te,pe=fe):mm(oe)}re=re.sibling}e:for(re=null,oe=e;;){if(oe.tag===5){if(re===null){re=oe;try{d=oe.stateNode,V?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(T=oe.stateNode,L=oe.memoizedProps.style,S=L!=null&&L.hasOwnProperty("display")?L.display:null,T.style.display=Ko("display",S))}catch(ye){et(e,e.return,ye)}}}else if(oe.tag===6){if(re===null)try{oe.stateNode.nodeValue=V?"":oe.memoizedProps}catch(ye){et(e,e.return,ye)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;re===oe&&(re=null),oe=oe.return}re===oe&&(re=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:yn(n,e),Un(e),i&4&&dm(e);break;case 21:break;default:yn(n,e),Un(e)}}function Un(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(lm(s)){var i=s;break e}s=s.return}throw Error(o(160))}switch(i.tag){case 5:var d=i.stateNode;i.flags&32&&(In(d,""),i.flags&=-33);var p=cm(e);Wu(e,p,d);break;case 3:case 4:var S=i.stateNode.containerInfo,T=cm(e);Bu(e,T,S);break;default:throw Error(o(161))}}catch(L){et(e,e.return,L)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Yw(e,n,s){pe=e,hm(e)}function hm(e,n,s){for(var i=(e.mode&1)!==0;pe!==null;){var d=pe,p=d.child;if(d.tag===22&&i){var S=d.memoizedState!==null||tl;if(!S){var T=d.alternate,L=T!==null&&T.memoizedState!==null||St;T=tl;var V=St;if(tl=S,(St=L)&&!V)for(pe=d;pe!==null;)S=pe,L=S.child,S.tag===22&&S.memoizedState!==null?gm(d):L!==null?(L.return=S,pe=L):gm(d);for(;p!==null;)pe=p,hm(p),p=p.sibling;pe=d,tl=T,St=V}pm(e)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,pe=p):pm(e)}}function pm(e){for(;pe!==null;){var n=pe;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:St||nl(5,n);break;case 1:var i=n.stateNode;if(n.flags&4&&!St)if(s===null)i.componentDidMount();else{var d=n.elementType===n.type?s.memoizedProps:mn(n.type,s.memoizedProps);i.componentDidUpdate(d,s.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&mp(n,p,i);break;case 3:var S=n.updateQueue;if(S!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}mp(n,S,s)}break;case 5:var T=n.stateNode;if(s===null&&n.flags&4){s=T;var L=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&s.focus();break;case"img":L.src&&(s.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var V=n.alternate;if(V!==null){var re=V.memoizedState;if(re!==null){var oe=re.dehydrated;oe!==null&&aa(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}St||n.flags&512&&$u(n)}catch(te){et(n,n.return,te)}}if(n===e){pe=null;break}if(s=n.sibling,s!==null){s.return=n.return,pe=s;break}pe=n.return}}function mm(e){for(;pe!==null;){var n=pe;if(n===e){pe=null;break}var s=n.sibling;if(s!==null){s.return=n.return,pe=s;break}pe=n.return}}function gm(e){for(;pe!==null;){var n=pe;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{nl(4,n)}catch(L){et(n,s,L)}break;case 1:var i=n.stateNode;if(typeof i.componentDidMount=="function"){var d=n.return;try{i.componentDidMount()}catch(L){et(n,d,L)}}var p=n.return;try{$u(n)}catch(L){et(n,p,L)}break;case 5:var S=n.return;try{$u(n)}catch(L){et(n,S,L)}}}catch(L){et(n,n.return,L)}if(n===e){pe=null;break}var T=n.sibling;if(T!==null){T.return=n.return,pe=T;break}pe=n.return}}var Xw=Math.ceil,rl=A.ReactCurrentDispatcher,Hu=A.ReactCurrentOwner,nn=A.ReactCurrentBatchConfig,Le=0,dt=null,st=null,gt=0,Kt=0,ps=Mr(0),lt=0,ja=null,xo=0,ol=0,Vu=0,Ta=null,Ot=null,Ku=0,ms=1/0,sr=null,sl=!1,Qu=null,Or=null,al=!1,_r=null,il=0,Ma=0,qu=null,ll=-1,cl=0;function jt(){return(Le&6)!==0?rt():ll!==-1?ll:ll=rt()}function Fr(e){return(e.mode&1)===0?1:(Le&2)!==0&&gt!==0?gt&-gt:Lw.transition!==null?(cl===0&&(cl=ch()),cl):(e=Fe,e!==0||(e=window.event,e=e===void 0?16:vh(e.type)),e)}function vn(e,n,s,i){if(50<Ma)throw Ma=0,qu=null,Error(o(185));ta(e,s,i),((Le&2)===0||e!==dt)&&(e===dt&&((Le&2)===0&&(ol|=s),lt===4&&Ur(e,gt)),_t(e,i),s===1&&Le===0&&(n.mode&1)===0&&(ms=rt()+500,Oi&&Ar()))}function _t(e,n){var s=e.callbackNode;Lx(e,n);var i=vi(e,e===dt?gt:0);if(i===0)s!==null&&ah(s),e.callbackNode=null,e.callbackPriority=0;else if(n=i&-i,e.callbackPriority!==n){if(s!=null&&ah(s),n===1)e.tag===0?Aw(vm.bind(null,e)):rp(vm.bind(null,e)),jw(function(){(Le&6)===0&&Ar()}),s=null;else{switch(uh(i)){case 1:s=Pc;break;case 4:s=ih;break;case 16:s=pi;break;case 536870912:s=lh;break;default:s=pi}s=Nm(s,ym.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function ym(e,n){if(ll=-1,cl=0,(Le&6)!==0)throw Error(o(327));var s=e.callbackNode;if(gs()&&e.callbackNode!==s)return null;var i=vi(e,e===dt?gt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||n)n=ul(e,i);else{n=i;var d=Le;Le|=2;var p=wm();(dt!==e||gt!==n)&&(sr=null,ms=rt()+500,bo(e,n));do try{e1();break}catch(T){xm(e,T)}while(!0);fu(),rl.current=p,Le=d,st!==null?n=0:(dt=null,gt=0,n=lt)}if(n!==0){if(n===2&&(d=Rc(e),d!==0&&(i=d,n=Gu(e,d))),n===1)throw s=ja,bo(e,0),Ur(e,i),_t(e,rt()),s;if(n===6)Ur(e,i);else{if(d=e.current.alternate,(i&30)===0&&!Jw(d)&&(n=ul(e,i),n===2&&(p=Rc(e),p!==0&&(i=p,n=Gu(e,p))),n===1))throw s=ja,bo(e,0),Ur(e,i),_t(e,rt()),s;switch(e.finishedWork=d,e.finishedLanes=i,n){case 0:case 1:throw Error(o(345));case 2:So(e,Ot,sr);break;case 3:if(Ur(e,i),(i&130023424)===i&&(n=Ku+500-rt(),10<n)){if(vi(e,0)!==0)break;if(d=e.suspendedLanes,(d&i)!==i){jt(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=tu(So.bind(null,e,Ot,sr),n);break}So(e,Ot,sr);break;case 4:if(Ur(e,i),(i&4194240)===i)break;for(n=e.eventTimes,d=-1;0<i;){var S=31-fn(i);p=1<<S,S=n[S],S>d&&(d=S),i&=~p}if(i=d,i=rt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Xw(i/1960))-i,10<i){e.timeoutHandle=tu(So.bind(null,e,Ot,sr),i);break}So(e,Ot,sr);break;case 5:So(e,Ot,sr);break;default:throw Error(o(329))}}}return _t(e,rt()),e.callbackNode===s?ym.bind(null,e):null}function Gu(e,n){var s=Ta;return e.current.memoizedState.isDehydrated&&(bo(e,n).flags|=256),e=ul(e,n),e!==2&&(n=Ot,Ot=s,n!==null&&Yu(n)),e}function Yu(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function Jw(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var i=0;i<s.length;i++){var d=s[i],p=d.getSnapshot;d=d.value;try{if(!hn(p(),d))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ur(e,n){for(n&=~Vu,n&=~ol,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-fn(n),i=1<<s;e[s]=-1,n&=~i}}function vm(e){if((Le&6)!==0)throw Error(o(327));gs();var n=vi(e,0);if((n&1)===0)return _t(e,rt()),null;var s=ul(e,n);if(e.tag!==0&&s===2){var i=Rc(e);i!==0&&(n=i,s=Gu(e,i))}if(s===1)throw s=ja,bo(e,0),Ur(e,n),_t(e,rt()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,So(e,Ot,sr),_t(e,rt()),null}function Xu(e,n){var s=Le;Le|=1;try{return e(n)}finally{Le=s,Le===0&&(ms=rt()+500,Oi&&Ar())}}function wo(e){_r!==null&&_r.tag===0&&(Le&6)===0&&gs();var n=Le;Le|=1;var s=nn.transition,i=Fe;try{if(nn.transition=null,Fe=1,e)return e()}finally{Fe=i,nn.transition=s,Le=n,(Le&6)===0&&Ar()}}function Ju(){Kt=ps.current,Qe(ps)}function bo(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Rw(s)),st!==null)for(s=st.return;s!==null;){var i=s;switch(iu(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&zi();break;case 3:ds(),Qe(Lt),Qe(xt),wu();break;case 5:vu(i);break;case 4:ds();break;case 13:Qe(Xe);break;case 19:Qe(Xe);break;case 10:hu(i.type._context);break;case 22:case 23:Ju()}s=s.return}if(dt=e,st=e=$r(e.current,null),gt=Kt=n,lt=0,ja=null,Vu=ol=xo=0,Ot=Ta=null,go!==null){for(n=0;n<go.length;n++)if(s=go[n],i=s.interleaved,i!==null){s.interleaved=null;var d=i.next,p=s.pending;if(p!==null){var S=p.next;p.next=d,i.next=S}s.pending=i}go=null}return e}function xm(e,n){do{var s=st;try{if(fu(),Qi.current=Xi,qi){for(var i=Je.memoizedState;i!==null;){var d=i.queue;d!==null&&(d.pending=null),i=i.next}qi=!1}if(vo=0,ut=it=Je=null,ka=!1,Ca=0,Hu.current=null,s===null||s.return===null){lt=1,ja=n,st=null;break}e:{var p=e,S=s.return,T=s,L=n;if(n=gt,T.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var V=L,re=T,oe=re.tag;if((re.mode&1)===0&&(oe===0||oe===11||oe===15)){var te=re.alternate;te?(re.updateQueue=te.updateQueue,re.memoizedState=te.memoizedState,re.lanes=te.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Hp(S);if(fe!==null){fe.flags&=-257,Vp(fe,S,T,p,n),fe.mode&1&&Wp(p,V,n),n=fe,L=V;var me=n.updateQueue;if(me===null){var ye=new Set;ye.add(L),n.updateQueue=ye}else me.add(L);break e}else{if((n&1)===0){Wp(p,V,n),Zu();break e}L=Error(o(426))}}else if(Ge&&T.mode&1){var ot=Hp(S);if(ot!==null){(ot.flags&65536)===0&&(ot.flags|=256),Vp(ot,S,T,p,n),uu(fs(L,T));break e}}p=L=fs(L,T),lt!==4&&(lt=2),Ta===null?Ta=[p]:Ta.push(p),p=S;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var D=$p(p,L,n);pp(p,D);break e;case 1:T=L;var z=p.type,U=p.stateNode;if((p.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Or===null||!Or.has(U)))){p.flags|=65536,n&=-n,p.lanes|=n;var se=Bp(p,T,n);pp(p,se);break e}}p=p.return}while(p!==null)}Sm(s)}catch(ve){n=ve,st===s&&s!==null&&(st=s=s.return);continue}break}while(!0)}function wm(){var e=rl.current;return rl.current=Xi,e===null?Xi:e}function Zu(){(lt===0||lt===3||lt===2)&&(lt=4),dt===null||(xo&268435455)===0&&(ol&268435455)===0||Ur(dt,gt)}function ul(e,n){var s=Le;Le|=2;var i=wm();(dt!==e||gt!==n)&&(sr=null,bo(e,n));do try{Zw();break}catch(d){xm(e,d)}while(!0);if(fu(),Le=s,rl.current=i,st!==null)throw Error(o(261));return dt=null,gt=0,lt}function Zw(){for(;st!==null;)bm(st)}function e1(){for(;st!==null&&!Ex();)bm(st)}function bm(e){var n=Em(e.alternate,e,Kt);e.memoizedProps=e.pendingProps,n===null?Sm(e):st=n,Hu.current=null}function Sm(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=Kw(s,n,Kt),s!==null){st=s;return}}else{if(s=Qw(s,n),s!==null){s.flags&=32767,st=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,st=null;return}}if(n=n.sibling,n!==null){st=n;return}st=n=e}while(n!==null);lt===0&&(lt=5)}function So(e,n,s){var i=Fe,d=nn.transition;try{nn.transition=null,Fe=1,t1(e,n,s,i)}finally{nn.transition=d,Fe=i}return null}function t1(e,n,s,i){do gs();while(_r!==null);if((Le&6)!==0)throw Error(o(327));s=e.finishedWork;var d=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var p=s.lanes|s.childLanes;if(zx(e,p),e===dt&&(st=dt=null,gt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||al||(al=!0,Nm(pi,function(){return gs(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=nn.transition,nn.transition=null;var S=Fe;Fe=1;var T=Le;Le|=4,Hu.current=null,Gw(e,s),fm(s,e),bw(Zc),bi=!!Jc,Zc=Jc=null,e.current=s,Yw(s),Nx(),Le=T,Fe=S,nn.transition=p}else e.current=s;if(al&&(al=!1,_r=e,il=d),p=e.pendingLanes,p===0&&(Or=null),jx(s.stateNode),_t(e,rt()),n!==null)for(i=e.onRecoverableError,s=0;s<n.length;s++)d=n[s],i(d.value,{componentStack:d.stack,digest:d.digest});if(sl)throw sl=!1,e=Qu,Qu=null,e;return(il&1)!==0&&e.tag!==0&&gs(),p=e.pendingLanes,(p&1)!==0?e===qu?Ma++:(Ma=0,qu=e):Ma=0,Ar(),null}function gs(){if(_r!==null){var e=uh(il),n=nn.transition,s=Fe;try{if(nn.transition=null,Fe=16>e?16:e,_r===null)var i=!1;else{if(e=_r,_r=null,il=0,(Le&6)!==0)throw Error(o(331));var d=Le;for(Le|=4,pe=e.current;pe!==null;){var p=pe,S=p.child;if((pe.flags&16)!==0){var T=p.deletions;if(T!==null){for(var L=0;L<T.length;L++){var V=T[L];for(pe=V;pe!==null;){var re=pe;switch(re.tag){case 0:case 11:case 15:Ra(8,re,p)}var oe=re.child;if(oe!==null)oe.return=re,pe=oe;else for(;pe!==null;){re=pe;var te=re.sibling,fe=re.return;if(im(re),re===V){pe=null;break}if(te!==null){te.return=fe,pe=te;break}pe=fe}}}var me=p.alternate;if(me!==null){var ye=me.child;if(ye!==null){me.child=null;do{var ot=ye.sibling;ye.sibling=null,ye=ot}while(ye!==null)}}pe=p}}if((p.subtreeFlags&2064)!==0&&S!==null)S.return=p,pe=S;else e:for(;pe!==null;){if(p=pe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Ra(9,p,p.return)}var D=p.sibling;if(D!==null){D.return=p.return,pe=D;break e}pe=p.return}}var z=e.current;for(pe=z;pe!==null;){S=pe;var U=S.child;if((S.subtreeFlags&2064)!==0&&U!==null)U.return=S,pe=U;else e:for(S=z;pe!==null;){if(T=pe,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:nl(9,T)}}catch(ve){et(T,T.return,ve)}if(T===S){pe=null;break e}var se=T.sibling;if(se!==null){se.return=T.return,pe=se;break e}pe=T.return}}if(Le=d,Ar(),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(mi,e)}catch{}i=!0}return i}finally{Fe=s,nn.transition=n}}return!1}function km(e,n,s){n=fs(s,n),n=$p(e,n,1),e=zr(e,n,1),n=jt(),e!==null&&(ta(e,1,n),_t(e,n))}function et(e,n,s){if(e.tag===3)km(e,e,s);else for(;n!==null;){if(n.tag===3){km(n,e,s);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Or===null||!Or.has(i))){e=fs(s,e),e=Bp(n,e,1),n=zr(n,e,1),e=jt(),n!==null&&(ta(n,1,e),_t(n,e));break}}n=n.return}}function n1(e,n,s){var i=e.pingCache;i!==null&&i.delete(n),n=jt(),e.pingedLanes|=e.suspendedLanes&s,dt===e&&(gt&s)===s&&(lt===4||lt===3&&(gt&130023424)===gt&&500>rt()-Ku?bo(e,0):Vu|=s),_t(e,n)}function Cm(e,n){n===0&&((e.mode&1)===0?n=1:(n=yi,yi<<=1,(yi&130023424)===0&&(yi=4194304)));var s=jt();e=nr(e,n),e!==null&&(ta(e,n,s),_t(e,s))}function r1(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),Cm(e,s)}function o1(e,n){var s=0;switch(e.tag){case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(n),Cm(e,s)}var Em;Em=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||Lt.current)Dt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return Dt=!1,Vw(e,n,s);Dt=(e.flags&131072)!==0}else Dt=!1,Ge&&(n.flags&1048576)!==0&&op(n,Fi,n.index);switch(n.lanes=0,n.tag){case 2:var i=n.type;el(e,n),e=n.pendingProps;var d=os(n,xt.current);us(n,s),d=ku(null,n,i,e,d,s);var p=Cu();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,zt(i)?(p=!0,Di(n)):p=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,gu(n),d.updater=Ji,n.stateNode=d,d._reactInternals=n,Tu(n,i,e,s),n=Lu(null,n,i,!0,p,s)):(n.tag=0,Ge&&p&&au(n),Rt(null,n,d,s),n=n.child),n;case 16:i=n.elementType;e:{switch(el(e,n),e=n.pendingProps,d=i._init,i=d(i._payload),n.type=i,d=n.tag=a1(i),e=mn(i,e),d){case 0:n=Au(null,n,i,e,s);break e;case 1:n=Xp(null,n,i,e,s);break e;case 11:n=Kp(null,n,i,e,s);break e;case 14:n=Qp(null,n,i,mn(i.type,e),s);break e}throw Error(o(306,i,""))}return n;case 0:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),Au(e,n,i,d,s);case 1:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),Xp(e,n,i,d,s);case 3:e:{if(Jp(n),e===null)throw Error(o(387));i=n.pendingProps,p=n.memoizedState,d=p.element,hp(e,n),Vi(n,i,null,s);var S=n.memoizedState;if(i=S.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){d=fs(Error(o(423)),n),n=Zp(e,n,i,s,d);break e}else if(i!==d){d=fs(Error(o(424)),n),n=Zp(e,n,i,s,d);break e}else for(Vt=Tr(n.stateNode.containerInfo.firstChild),Ht=n,Ge=!0,pn=null,s=dp(n,null,i,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(is(),i===d){n=or(e,n,s);break e}Rt(e,n,i,s)}n=n.child}return n;case 5:return gp(n),e===null&&cu(n),i=n.type,d=n.pendingProps,p=e!==null?e.memoizedProps:null,S=d.children,eu(i,d)?S=null:p!==null&&eu(i,p)&&(n.flags|=32),Yp(e,n),Rt(e,n,S,s),n.child;case 6:return e===null&&cu(n),null;case 13:return em(e,n,s);case 4:return yu(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=ls(n,null,i,s):Rt(e,n,i,s),n.child;case 11:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),Kp(e,n,i,d,s);case 7:return Rt(e,n,n.pendingProps,s),n.child;case 8:return Rt(e,n,n.pendingProps.children,s),n.child;case 12:return Rt(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(i=n.type._context,d=n.pendingProps,p=n.memoizedProps,S=d.value,We(Bi,i._currentValue),i._currentValue=S,p!==null)if(hn(p.value,S)){if(p.children===d.children&&!Lt.current){n=or(e,n,s);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var T=p.dependencies;if(T!==null){S=p.child;for(var L=T.firstContext;L!==null;){if(L.context===i){if(p.tag===1){L=rr(-1,s&-s),L.tag=2;var V=p.updateQueue;if(V!==null){V=V.shared;var re=V.pending;re===null?L.next=L:(L.next=re.next,re.next=L),V.pending=L}}p.lanes|=s,L=p.alternate,L!==null&&(L.lanes|=s),pu(p.return,s,n),T.lanes|=s;break}L=L.next}}else if(p.tag===10)S=p.type===n.type?null:p.child;else if(p.tag===18){if(S=p.return,S===null)throw Error(o(341));S.lanes|=s,T=S.alternate,T!==null&&(T.lanes|=s),pu(S,s,n),S=p.sibling}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===n){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}Rt(e,n,d.children,s),n=n.child}return n;case 9:return d=n.type,i=n.pendingProps.children,us(n,s),d=en(d),i=i(d),n.flags|=1,Rt(e,n,i,s),n.child;case 14:return i=n.type,d=mn(i,n.pendingProps),d=mn(i.type,d),Qp(e,n,i,d,s);case 15:return qp(e,n,n.type,n.pendingProps,s);case 17:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),el(e,n),n.tag=1,zt(i)?(e=!0,Di(n)):e=!1,us(n,s),Fp(n,i,d),Tu(n,i,d,s),Lu(null,n,i,!0,e,s);case 19:return nm(e,n,s);case 22:return Gp(e,n,s)}throw Error(o(156,n.tag))};function Nm(e,n){return sh(e,n)}function s1(e,n,s,i){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,n,s,i){return new s1(e,n,s,i)}function ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a1(e){if(typeof e=="function")return ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===O)return 11;if(e===G)return 14}return 2}function $r(e,n){var s=e.alternate;return s===null?(s=rn(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function dl(e,n,s,i,d,p){var S=2;if(i=e,typeof e=="function")ed(e)&&(S=1);else if(typeof e=="string")S=5;else e:switch(e){case H:return ko(s.children,d,p,n);case X:S=8,d|=8;break;case W:return e=rn(12,s,n,d|2),e.elementType=W,e.lanes=p,e;case Z:return e=rn(13,s,n,d),e.elementType=Z,e.lanes=p,e;case ee:return e=rn(19,s,n,d),e.elementType=ee,e.lanes=p,e;case ce:return fl(s,d,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:S=10;break e;case _:S=9;break e;case O:S=11;break e;case G:S=14;break e;case ie:S=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=rn(S,s,n,d),n.elementType=e,n.type=i,n.lanes=p,n}function ko(e,n,s,i){return e=rn(7,e,i,n),e.lanes=s,e}function fl(e,n,s,i){return e=rn(22,e,i,n),e.elementType=ce,e.lanes=s,e.stateNode={isHidden:!1},e}function td(e,n,s){return e=rn(6,e,null,n),e.lanes=s,e}function nd(e,n,s){return n=rn(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function i1(e,n,s,i,d){this.tag=n,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=jc(0),this.expirationTimes=jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.identifierPrefix=i,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function rd(e,n,s,i,d,p,S,T,L){return e=new i1(e,n,s,T,L),n===1?(n=1,p===!0&&(n|=8)):n=0,p=rn(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:i,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},gu(p),e}function l1(e,n,s){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:i==null?null:""+i,children:e,containerInfo:n,implementation:s}}function Pm(e){if(!e)return Ir;e=e._reactInternals;e:{if(uo(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(zt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(zt(s))return tp(e,s,n)}return n}function Rm(e,n,s,i,d,p,S,T,L){return e=rd(s,i,!0,e,d,p,S,T,L),e.context=Pm(null),s=e.current,i=jt(),d=Fr(s),p=rr(i,d),p.callback=n??null,zr(s,p,d),e.current.lanes=d,ta(e,d,i),_t(e,i),e}function hl(e,n,s,i){var d=n.current,p=jt(),S=Fr(d);return s=Pm(s),n.context===null?n.context=s:n.pendingContext=s,n=rr(p,S),n.payload={element:e},i=i===void 0?null:i,i!==null&&(n.callback=i),e=zr(d,n,S),e!==null&&(vn(e,d,S,p),Hi(e,d,S)),S}function pl(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 jm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function od(e,n){jm(e,n),(e=e.alternate)&&jm(e,n)}function c1(){return null}var Tm=typeof reportError=="function"?reportError:function(e){console.error(e)};function sd(e){this._internalRoot=e}ml.prototype.render=sd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));hl(e,n,null,null)},ml.prototype.unmount=sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;wo(function(){hl(null,e,null,null)}),n[Jn]=null}};function ml(e){this._internalRoot=e}ml.prototype.unstable_scheduleHydration=function(e){if(e){var n=hh();e={blockedOn:null,target:e,priority:n};for(var s=0;s<Pr.length&&n!==0&&n<Pr[s].priority;s++);Pr.splice(s,0,e),s===0&&gh(e)}};function ad(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mm(){}function u1(e,n,s,i,d){if(d){if(typeof i=="function"){var p=i;i=function(){var V=pl(S);p.call(V)}}var S=Rm(n,i,e,0,null,!1,!1,"",Mm);return e._reactRootContainer=S,e[Jn]=S.current,ma(e.nodeType===8?e.parentNode:e),wo(),S}for(;d=e.lastChild;)e.removeChild(d);if(typeof i=="function"){var T=i;i=function(){var V=pl(L);T.call(V)}}var L=rd(e,0,!1,null,null,!1,!1,"",Mm);return e._reactRootContainer=L,e[Jn]=L.current,ma(e.nodeType===8?e.parentNode:e),wo(function(){hl(n,L,s,i)}),L}function yl(e,n,s,i,d){var p=s._reactRootContainer;if(p){var S=p;if(typeof d=="function"){var T=d;d=function(){var L=pl(S);T.call(L)}}hl(n,S,e,d)}else S=u1(s,n,e,d,i);return pl(S)}dh=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=ea(n.pendingLanes);s!==0&&(Tc(n,s|1),_t(n,rt()),(Le&6)===0&&(ms=rt()+500,Ar()))}break;case 13:wo(function(){var i=nr(e,1);if(i!==null){var d=jt();vn(i,e,1,d)}}),od(e,1)}},Mc=function(e){if(e.tag===13){var n=nr(e,134217728);if(n!==null){var s=jt();vn(n,e,134217728,s)}od(e,134217728)}},fh=function(e){if(e.tag===13){var n=Fr(e),s=nr(e,n);if(s!==null){var i=jt();vn(s,e,n,i)}od(e,n)}},hh=function(){return Fe},ph=function(e,n){var s=Fe;try{return Fe=e,n()}finally{Fe=s}},qo=function(e,n,s){switch(n){case"input":if(cn(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var i=s[n];if(i!==e&&i.form===e.form){var d=Li(i);if(!d)throw Error(o(90));Ie(i),cn(i,d)}}}break;case"textarea":ai(e,s);break;case"select":n=s.value,n!=null&&Xt(e,!!s.multiple,n,!1)}},De=Xu,$e=wo;var d1={usingClientEntryPoint:!1,Events:[va,ns,Li,di,Ne,Xu]},Ia={findFiberByHostInstance:fo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},f1={bundleType:Ia.bundleType,version:Ia.version,rendererPackageName:Ia.rendererPackageName,rendererConfig:Ia.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rh(e),e===null?null:e.stateNode},findFiberByHostInstance:Ia.findFiberByHostInstance||c1,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 vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{mi=vl.inject(f1),Dn=vl}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d1,Ft.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ad(n))throw Error(o(200));return l1(e,n,null,s)},Ft.createRoot=function(e,n){if(!ad(e))throw Error(o(299));var s=!1,i="",d=Tm;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=rd(e,1,!1,null,null,s,!1,i,d),e[Jn]=n.current,ma(e.nodeType===8?e.parentNode:e),new sd(n)},Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=rh(n),e=e===null?null:e.stateNode,e},Ft.flushSync=function(e){return wo(e)},Ft.hydrate=function(e,n,s){if(!gl(n))throw Error(o(200));return yl(null,e,n,!0,s)},Ft.hydrateRoot=function(e,n,s){if(!ad(e))throw Error(o(405));var i=s!=null&&s.hydratedSources||null,d=!1,p="",S=Tm;if(s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(S=s.onRecoverableError)),n=Rm(n,null,e,1,s??null,d,!1,p,S),e[Jn]=n.current,ma(e),i)for(e=0;e<i.length;e++)s=i[e],d=s._getVersion,d=d(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,d]:n.mutableSourceEagerHydrationData.push(s,d);return new ml(n)},Ft.render=function(e,n,s){if(!gl(n))throw Error(o(200));return yl(null,e,n,!1,s)},Ft.unmountComponentAtNode=function(e){if(!gl(e))throw Error(o(40));return e._reactRootContainer?(wo(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[Jn]=null})}),!0):!1},Ft.unstable_batchedUpdates=Xu,Ft.unstable_renderSubtreeIntoContainer=function(e,n,s,i){if(!gl(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return yl(e,n,s,!1,i)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var Um;function fy(){if(Um)return ud.exports;Um=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),ud.exports=w1(),ud.exports}var $m;function b1(){if($m)return wl;$m=1;var t=fy();return wl.createRoot=t.createRoot,wl.hydrateRoot=t.hydrateRoot,wl}var S1=b1();/**
40
+ `+p.stack}return{value:e,source:n,stack:d,digest:null}}function Au(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function Lu(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var Ww=typeof WeakMap=="function"?WeakMap:Map;function Hp(e,n,s){s=rr(-1,s),s.tag=3,s.payload={element:null};var i=n.value;return s.callback=function(){il||(il=!0,Gu=i),Lu(e,n)},s}function Wp(e,n,s){s=rr(-1,s),s.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var d=n.value;s.payload=function(){return i(d)},s.callback=function(){Lu(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Lu(e,n),typeof i!="function"&&(Or===null?Or=new Set([this]):Or.add(this));var S=n.stack;this.componentDidCatch(n.value,{componentStack:S!==null?S:""})}),s}function Vp(e,n,s){var i=e.pingCache;if(i===null){i=e.pingCache=new Ww;var d=new Set;i.set(n,d)}else d=i.get(n),d===void 0&&(d=new Set,i.set(n,d));d.has(s)||(d.add(s),e=o1.bind(null,e,n,s),n.then(e,e))}function Kp(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Qp(e,n,s,i,d){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=rr(-1,1),n.tag=2,zr(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Vw=A.ReactCurrentOwner,Dt=!1;function Rt(e,n,s,i){n.child=e===null?hp(n,null,s,i):us(n,e.child,s,i)}function qp(e,n,s,i,d){s=s.render;var p=n.ref;return fs(n,d),i=Eu(e,n,s,i,p,d),s=Nu(),e!==null&&!Dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,or(e,n,d)):(Ge&&s&&lu(n),n.flags|=1,Rt(e,n,i,d),n.child)}function Gp(e,n,s,i,d){if(e===null){var p=s.type;return typeof p=="function"&&!nd(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=p,Yp(e,n,p,i,d)):(e=hl(s.type,null,i,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&d)===0){var S=p.memoizedProps;if(s=s.compare,s=s!==null?s:pa,s(S,i)&&e.ref===n.ref)return or(e,n,d)}return n.flags|=1,e=$r(p,i),e.ref=n.ref,e.return=n,n.child=e}function Yp(e,n,s,i,d){if(e!==null){var p=e.memoizedProps;if(pa(p,i)&&e.ref===n.ref)if(Dt=!1,n.pendingProps=i=p,(e.lanes&d)!==0)(e.flags&131072)!==0&&(Dt=!0);else return n.lanes=e.lanes,or(e,n,d)}return zu(e,n,s,i,d)}function Xp(e,n,s){var i=n.pendingProps,d=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},He(gs,Kt),Kt|=s;else{if((s&1073741824)===0)return e=p!==null?p.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,He(gs,Kt),Kt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=p!==null?p.baseLanes:s,He(gs,Kt),Kt|=i}else p!==null?(i=p.baseLanes|s,n.memoizedState=null):i=s,He(gs,Kt),Kt|=i;return Rt(e,n,d,s),n.child}function Jp(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function zu(e,n,s,i,d){var p=zt(s)?ho:xt.current;return p=as(n,p),fs(n,d),s=Eu(e,n,s,i,p,d),i=Nu(),e!==null&&!Dt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,or(e,n,d)):(Ge&&i&&lu(n),n.flags|=1,Rt(e,n,s,d),n.child)}function Zp(e,n,s,i,d){if(zt(s)){var p=!0;_i(n)}else p=!1;if(fs(n,d),n.stateNode===null)nl(e,n),$p(n,s,i),Iu(n,s,i,d),i=!0;else if(e===null){var S=n.stateNode,T=n.memoizedProps;S.props=T;var L=S.context,V=s.contextType;typeof V=="object"&&V!==null?V=en(V):(V=zt(s)?ho:xt.current,V=as(n,V));var re=s.getDerivedStateFromProps,oe=typeof re=="function"||typeof S.getSnapshotBeforeUpdate=="function";oe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==i||L!==V)&&Bp(n,S,i,V),Lr=!1;var te=n.memoizedState;S.state=te,Qi(n,i,S,d),L=n.memoizedState,T!==i||te!==L||Lt.current||Lr?(typeof re=="function"&&(Mu(n,s,re,i),L=n.memoizedState),(T=Lr||Up(n,s,T,i,te,L,V))?(oe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(n.flags|=4194308)):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=L),S.props=i,S.state=L,S.context=V,i=T):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{S=n.stateNode,mp(e,n),T=n.memoizedProps,V=n.type===n.elementType?T:mn(n.type,T),S.props=V,oe=n.pendingProps,te=S.context,L=s.contextType,typeof L=="object"&&L!==null?L=en(L):(L=zt(s)?ho:xt.current,L=as(n,L));var fe=s.getDerivedStateFromProps;(re=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==oe||te!==L)&&Bp(n,S,i,L),Lr=!1,te=n.memoizedState,S.state=te,Qi(n,i,S,d);var ge=n.memoizedState;T!==oe||te!==ge||Lt.current||Lr?(typeof fe=="function"&&(Mu(n,s,fe,i),ge=n.memoizedState),(V=Lr||Up(n,s,V,i,te,ge,L)||!1)?(re||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(i,ge,L),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(i,ge,L)),typeof S.componentDidUpdate=="function"&&(n.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof S.componentDidUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=ge),S.props=i,S.state=ge,S.context=L,i=V):(typeof S.componentDidUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),i=!1)}return Du(e,n,s,i,p,d)}function Du(e,n,s,i,d,p){Jp(e,n);var S=(n.flags&128)!==0;if(!i&&!S)return d&&op(n,s,!1),or(e,n,p);i=n.stateNode,Vw.current=n;var T=S&&typeof s.getDerivedStateFromError!="function"?null:i.render();return n.flags|=1,e!==null&&S?(n.child=us(n,e.child,null,p),n.child=us(n,null,T,p)):Rt(e,n,T,p),n.memoizedState=i.state,d&&op(n,s,!0),n.child}function em(e){var n=e.stateNode;n.pendingContext?np(e,n.pendingContext,n.pendingContext!==n.context):n.context&&np(e,n.context,!1),xu(e,n.containerInfo)}function tm(e,n,s,i,d){return cs(),fu(d),n.flags|=256,Rt(e,n,s,i),n.child}var Ou={dehydrated:null,treeContext:null,retryLane:0};function _u(e){return{baseLanes:e,cachePool:null,transitions:null}}function nm(e,n,s){var i=n.pendingProps,d=Xe.current,p=!1,S=(n.flags&128)!==0,T;if((T=S)||(T=e!==null&&e.memoizedState===null?!1:(d&2)!==0),T?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),He(Xe,d&1),e===null)return du(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(S=i.children,e=i.fallback,p?(i=n.mode,p=n.child,S={mode:"hidden",children:S},(i&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=S):p=pl(S,i,0,null),e=ko(e,i,s,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=_u(s),n.memoizedState=Ou,e):Fu(n,S));if(d=e.memoizedState,d!==null&&(T=d.dehydrated,T!==null))return Kw(e,n,S,i,T,d,s);if(p){p=i.fallback,S=n.mode,d=e.child,T=d.sibling;var L={mode:"hidden",children:i.children};return(S&1)===0&&n.child!==d?(i=n.child,i.childLanes=0,i.pendingProps=L,n.deletions=null):(i=$r(d,L),i.subtreeFlags=d.subtreeFlags&14680064),T!==null?p=$r(T,p):(p=ko(p,S,s,null),p.flags|=2),p.return=n,i.return=n,i.sibling=p,n.child=i,i=p,p=n.child,S=e.child.memoizedState,S=S===null?_u(s):{baseLanes:S.baseLanes|s,cachePool:null,transitions:S.transitions},p.memoizedState=S,p.childLanes=e.childLanes&~s,n.memoizedState=Ou,i}return p=e.child,e=p.sibling,i=$r(p,{mode:"visible",children:i.children}),(n.mode&1)===0&&(i.lanes=s),i.return=n,i.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=i,n.memoizedState=null,i}function Fu(e,n){return n=pl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function tl(e,n,s,i){return i!==null&&fu(i),us(n,e.child,null,s),e=Fu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Kw(e,n,s,i,d,p,S){if(s)return n.flags&256?(n.flags&=-257,i=Au(Error(o(422))),tl(e,n,S,i)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=i.fallback,d=n.mode,i=pl({mode:"visible",children:i.children},d,0,null),p=ko(p,d,S,null),p.flags|=2,i.return=n,p.return=n,i.sibling=p,n.child=i,(n.mode&1)!==0&&us(n,e.child,null,S),n.child.memoizedState=_u(S),n.memoizedState=Ou,p);if((n.mode&1)===0)return tl(e,n,S,null);if(d.data==="$!"){if(i=d.nextSibling&&d.nextSibling.dataset,i)var T=i.dgst;return i=T,p=Error(o(419)),i=Au(p,i,void 0),tl(e,n,S,i)}if(T=(S&e.childLanes)!==0,Dt||T){if(i=dt,i!==null){switch(S&-S){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(i.suspendedLanes|S))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,nr(e,d),vn(i,e,d,-1))}return td(),i=Au(Error(o(421))),tl(e,n,S,i)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=s1.bind(null,e),d._reactRetry=n,null):(e=p.treeContext,Vt=Tr(d.nextSibling),Wt=n,Ge=!0,pn=null,e!==null&&(Jt[Zt++]=er,Jt[Zt++]=tr,Jt[Zt++]=po,er=e.id,tr=e.overflow,po=n),n=Fu(n,i.children),n.flags|=4096,n)}function rm(e,n,s){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n),gu(e.return,n,s)}function Uu(e,n,s,i,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=s,p.tailMode=d)}function om(e,n,s){var i=n.pendingProps,d=i.revealOrder,p=i.tail;if(Rt(e,n,i.children,s),i=Xe.current,(i&2)!==0)i=i&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rm(e,s,n);else if(e.tag===19)rm(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(He(Xe,i),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&qi(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),Uu(n,!1,d,s,p);break;case"backwards":for(s=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&qi(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}Uu(n,!0,s,null,p);break;case"together":Uu(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function nl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function or(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),xo|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=$r(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=$r(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Qw(e,n,s){switch(n.tag){case 3:em(n),cs();break;case 5:vp(n);break;case 1:zt(n.type)&&_i(n);break;case 4:xu(n,n.stateNode.containerInfo);break;case 10:var i=n.type._context,d=n.memoizedProps.value;He(Wi,i._currentValue),i._currentValue=d;break;case 13:if(i=n.memoizedState,i!==null)return i.dehydrated!==null?(He(Xe,Xe.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?nm(e,n,s):(He(Xe,Xe.current&1),e=or(e,n,s),e!==null?e.sibling:null);He(Xe,Xe.current&1);break;case 19:if(i=(s&n.childLanes)!==0,(e.flags&128)!==0){if(i)return om(e,n,s);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),He(Xe,Xe.current),i)break;return null;case 22:case 23:return n.lanes=0,Xp(e,n,s)}return or(e,n,s)}var sm,$u,am,im;sm=function(e,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},$u=function(){},am=function(e,n,s,i){var d=e.memoizedProps;if(d!==i){e=n.stateNode,yo(_n.current);var p=null;switch(s){case"input":d=vt(e,d),i=vt(e,i),p=[];break;case"select":d=Q({},d,{value:void 0}),i=Q({},i,{value:void 0}),p=[];break;case"textarea":d=Ko(e,d),i=Ko(e,i),p=[];break;default:typeof d.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=zi)}An(s,i);var S;s=null;for(V in d)if(!i.hasOwnProperty(V)&&d.hasOwnProperty(V)&&d[V]!=null)if(V==="style"){var T=d[V];for(S in T)T.hasOwnProperty(S)&&(s||(s={}),s[S]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(l.hasOwnProperty(V)?p||(p=[]):(p=p||[]).push(V,null));for(V in i){var L=i[V];if(T=d!=null?d[V]:void 0,i.hasOwnProperty(V)&&L!==T&&(L!=null||T!=null))if(V==="style")if(T){for(S in T)!T.hasOwnProperty(S)||L&&L.hasOwnProperty(S)||(s||(s={}),s[S]="");for(S in L)L.hasOwnProperty(S)&&T[S]!==L[S]&&(s||(s={}),s[S]=L[S])}else s||(p||(p=[]),p.push(V,s)),s=L;else V==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,T=T?T.__html:void 0,L!=null&&T!==L&&(p=p||[]).push(V,L)):V==="children"?typeof L!="string"&&typeof L!="number"||(p=p||[]).push(V,""+L):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(l.hasOwnProperty(V)?(L!=null&&V==="onScroll"&&Ke("scroll",e),p||T===L||(p=[])):(p=p||[]).push(V,L))}s&&(p=p||[]).push("style",s);var V=p;(n.updateQueue=V)&&(n.flags|=4)}},im=function(e,n,s,i){s!==i&&(n.flags|=4)};function ja(e,n){if(!Ge)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function bt(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,i=0;if(n)for(var d=e.child;d!==null;)s|=d.lanes|d.childLanes,i|=d.subtreeFlags&14680064,i|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=s,n}function qw(e,n,s){var i=n.pendingProps;switch(cu(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(n),null;case 1:return zt(n.type)&&Oi(),bt(n),null;case 3:return i=n.stateNode,hs(),Qe(Lt),Qe(xt),Su(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bi(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,pn!==null&&(Ju(pn),pn=null))),$u(e,n),bt(n),null;case 5:wu(n);var d=yo(Ca.current);if(s=n.type,e!==null&&n.stateNode!=null)am(e,n,s,i,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!i){if(n.stateNode===null)throw Error(o(166));return bt(n),null}if(e=yo(_n.current),Bi(n)){i=n.stateNode,s=n.type;var p=n.memoizedProps;switch(i[On]=n,i[xa]=p,e=(n.mode&1)!==0,s){case"dialog":Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":case"embed":Ke("load",i);break;case"video":case"audio":for(d=0;d<ga.length;d++)Ke(ga[d],i);break;case"source":Ke("error",i);break;case"img":case"image":case"link":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"input":Rn(i,p),Ke("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!p.multiple},Ke("invalid",i);break;case"textarea":Tn(i,p),Ke("invalid",i)}An(s,p),d=null;for(var S in p)if(p.hasOwnProperty(S)){var T=p[S];S==="children"?typeof T=="string"?i.textContent!==T&&(p.suppressHydrationWarning!==!0&&Li(i.textContent,T,e),d=["children",T]):typeof T=="number"&&i.textContent!==""+T&&(p.suppressHydrationWarning!==!0&&Li(i.textContent,T,e),d=["children",""+T]):l.hasOwnProperty(S)&&T!=null&&S==="onScroll"&&Ke("scroll",i)}switch(s){case"input":Te(i),br(i,p,!0);break;case"textarea":Te(i),ci(i);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(i.onclick=zi)}i=d,n.updateQueue=i,i!==null&&(n.flags|=4)}else{S=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nt(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=S.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=S.createElement(s,{is:i.is}):(e=S.createElement(s),s==="select"&&(S=e,i.multiple?S.multiple=!0:i.size&&(S.size=i.size))):e=S.createElementNS(e,s),e[On]=n,e[xa]=i,sm(e,n,!1,!1),n.stateNode=e;e:{switch(S=Zs(s,i),s){case"dialog":Ke("cancel",e),Ke("close",e),d=i;break;case"iframe":case"object":case"embed":Ke("load",e),d=i;break;case"video":case"audio":for(d=0;d<ga.length;d++)Ke(ga[d],e);d=i;break;case"source":Ke("error",e),d=i;break;case"img":case"image":case"link":Ke("error",e),Ke("load",e),d=i;break;case"details":Ke("toggle",e),d=i;break;case"input":Rn(e,i),d=vt(e,i),Ke("invalid",e);break;case"option":d=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},d=Q({},i,{value:void 0}),Ke("invalid",e);break;case"textarea":Tn(e,i),d=Ko(e,i),Ke("invalid",e);break;default:d=i}An(s,d),T=d;for(p in T)if(T.hasOwnProperty(p)){var L=T[p];p==="style"?Xn(e,L):p==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&ui(e,L)):p==="children"?typeof L=="string"?(s!=="textarea"||L!=="")&&In(e,L):typeof L=="number"&&In(e,""+L):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(l.hasOwnProperty(p)?L!=null&&p==="onScroll"&&Ke("scroll",e):L!=null&&P(e,p,L,S))}switch(s){case"input":Te(e),br(e,i,!1);break;case"textarea":Te(e),ci(e);break;case"option":i.value!=null&&e.setAttribute("value",""+he(i.value));break;case"select":e.multiple=!!i.multiple,p=i.value,p!=null?Xt(e,!!i.multiple,p,!1):i.defaultValue!=null&&Xt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=zi)}switch(s){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return bt(n),null;case 6:if(e&&n.stateNode!=null)im(e,n,e.memoizedProps,i);else{if(typeof i!="string"&&n.stateNode===null)throw Error(o(166));if(s=yo(Ca.current),yo(_n.current),Bi(n)){if(i=n.stateNode,s=n.memoizedProps,i[On]=n,(p=i.nodeValue!==s)&&(e=Wt,e!==null))switch(e.tag){case 3:Li(i.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Li(i.nodeValue,s,(e.mode&1)!==0)}p&&(n.flags|=4)}else i=(s.nodeType===9?s:s.ownerDocument).createTextNode(i),i[On]=n,n.stateNode=i}return bt(n),null;case 13:if(Qe(Xe),i=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ge&&Vt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)up(),cs(),n.flags|=98560,p=!1;else if(p=Bi(n),i!==null&&i.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[On]=n}else cs(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),p=!1}else pn!==null&&(Ju(pn),pn=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Xe.current&1)!==0?lt===0&&(lt=3):td())),n.updateQueue!==null&&(n.flags|=4),bt(n),null);case 4:return hs(),$u(e,n),e===null&&ya(n.stateNode.containerInfo),bt(n),null;case 10:return mu(n.type._context),bt(n),null;case 17:return zt(n.type)&&Oi(),bt(n),null;case 19:if(Qe(Xe),p=n.memoizedState,p===null)return bt(n),null;if(i=(n.flags&128)!==0,S=p.rendering,S===null)if(i)ja(p,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(S=qi(e),S!==null){for(n.flags|=128,ja(p,!1),i=S.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),n.subtreeFlags=0,i=s,s=n.child;s!==null;)p=s,e=i,p.flags&=14680066,S=p.alternate,S===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=S.childLanes,p.lanes=S.lanes,p.child=S.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=S.memoizedProps,p.memoizedState=S.memoizedState,p.updateQueue=S.updateQueue,p.type=S.type,e=S.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return He(Xe,Xe.current&1|2),n.child}e=e.sibling}p.tail!==null&&rt()>ys&&(n.flags|=128,i=!0,ja(p,!1),n.lanes=4194304)}else{if(!i)if(e=qi(S),e!==null){if(n.flags|=128,i=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),ja(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!Ge)return bt(n),null}else 2*rt()-p.renderingStartTime>ys&&s!==1073741824&&(n.flags|=128,i=!0,ja(p,!1),n.lanes=4194304);p.isBackwards?(S.sibling=n.child,n.child=S):(s=p.last,s!==null?s.sibling=S:n.child=S,p.last=S)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=rt(),n.sibling=null,s=Xe.current,He(Xe,i?s&1|2:s&1),n):(bt(n),null);case 22:case 23:return ed(),i=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(n.flags|=8192),i&&(n.mode&1)!==0?(Kt&1073741824)!==0&&(bt(n),n.subtreeFlags&6&&(n.flags|=8192)):bt(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function Gw(e,n){switch(cu(n),n.tag){case 1:return zt(n.type)&&Oi(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hs(),Qe(Lt),Qe(xt),Su(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return wu(n),null;case 13:if(Qe(Xe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));cs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Qe(Xe),null;case 4:return hs(),null;case 10:return mu(n.type._context),null;case 22:case 23:return ed(),null;case 24:return null;default:return null}}var rl=!1,St=!1,Yw=typeof WeakSet=="function"?WeakSet:Set,pe=null;function ms(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(i){et(e,n,i)}else s.current=null}function Bu(e,n,s){try{s()}catch(i){et(e,n,i)}}var lm=!1;function Xw(e,n){if(eu=ki,e=Uh(),Kc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var d=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var S=0,T=-1,L=-1,V=0,re=0,oe=e,te=null;t:for(;;){for(var fe;oe!==s||d!==0&&oe.nodeType!==3||(T=S+d),oe!==p||i!==0&&oe.nodeType!==3||(L=S+i),oe.nodeType===3&&(S+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)te=oe,oe=fe;for(;;){if(oe===e)break t;if(te===s&&++V===d&&(T=S),te===p&&++re===i&&(L=S),(fe=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=fe}s=T===-1||L===-1?null:{start:T,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(tu={focusedElem:e,selectionRange:s},ki=!1,pe=n;pe!==null;)if(n=pe,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,pe=e;else for(;pe!==null;){n=pe;try{var ge=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var ye=ge.memoizedProps,ot=ge.memoizedState,D=n.stateNode,z=D.getSnapshotBeforeUpdate(n.elementType===n.type?ye:mn(n.type,ye),ot);D.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var U=n.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(se){et(n,n.return,se)}if(e=n.sibling,e!==null){e.return=n.return,pe=e;break}pe=n.return}return ge=lm,lm=!1,ge}function Ta(e,n,s){var i=n.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var d=i=i.next;do{if((d.tag&e)===e){var p=d.destroy;d.destroy=void 0,p!==void 0&&Bu(n,s,p)}d=d.next}while(d!==i)}}function ol(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.create;s.destroy=i()}s=s.next}while(s!==n)}}function Hu(e){var n=e.ref;if(n!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof n=="function"?n(e):n.current=e}}function cm(e){var n=e.alternate;n!==null&&(e.alternate=null,cm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[On],delete n[xa],delete n[su],delete n[Aw],delete n[Lw])),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 um(e){return e.tag===5||e.tag===3||e.tag===4}function dm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||um(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 Wu(e,n,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=zi));else if(i!==4&&(e=e.child,e!==null))for(Wu(e,n,s),e=e.sibling;e!==null;)Wu(e,n,s),e=e.sibling}function Vu(e,n,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Vu(e,n,s),e=e.sibling;e!==null;)Vu(e,n,s),e=e.sibling}var mt=null,gn=!1;function Dr(e,n,s){for(s=s.child;s!==null;)fm(e,n,s),s=s.sibling}function fm(e,n,s){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(yi,s)}catch{}switch(s.tag){case 5:St||ms(s,n);case 6:var i=mt,d=gn;mt=null,Dr(e,n,s),mt=i,gn=d,mt!==null&&(gn?(e=mt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):mt.removeChild(s.stateNode));break;case 18:mt!==null&&(gn?(e=mt,s=s.stateNode,e.nodeType===8?ou(e.parentNode,s):e.nodeType===1&&ou(e,s),la(e)):ou(mt,s.stateNode));break;case 4:i=mt,d=gn,mt=s.stateNode.containerInfo,gn=!0,Dr(e,n,s),mt=i,gn=d;break;case 0:case 11:case 14:case 15:if(!St&&(i=s.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){d=i=i.next;do{var p=d,S=p.destroy;p=p.tag,S!==void 0&&((p&2)!==0||(p&4)!==0)&&Bu(s,n,S),d=d.next}while(d!==i)}Dr(e,n,s);break;case 1:if(!St&&(ms(s,n),i=s.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=s.memoizedProps,i.state=s.memoizedState,i.componentWillUnmount()}catch(T){et(s,n,T)}Dr(e,n,s);break;case 21:Dr(e,n,s);break;case 22:s.mode&1?(St=(i=St)||s.memoizedState!==null,Dr(e,n,s),St=i):Dr(e,n,s);break;default:Dr(e,n,s)}}function hm(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Yw),n.forEach(function(i){var d=a1.bind(null,e,i);s.has(i)||(s.add(i),i.then(d,d))})}}function yn(e,n){var s=n.deletions;if(s!==null)for(var i=0;i<s.length;i++){var d=s[i];try{var p=e,S=n,T=S;e:for(;T!==null;){switch(T.tag){case 5:mt=T.stateNode,gn=!1;break e;case 3:mt=T.stateNode.containerInfo,gn=!0;break e;case 4:mt=T.stateNode.containerInfo,gn=!0;break e}T=T.return}if(mt===null)throw Error(o(160));fm(p,S,d),mt=null,gn=!1;var L=d.alternate;L!==null&&(L.return=null),d.return=null}catch(V){et(d,n,V)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)pm(n,e),n=n.sibling}function pm(e,n){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yn(n,e),Un(e),i&4){try{Ta(3,e,e.return),ol(3,e)}catch(ye){et(e,e.return,ye)}try{Ta(5,e,e.return)}catch(ye){et(e,e.return,ye)}}break;case 1:yn(n,e),Un(e),i&512&&s!==null&&ms(s,s.return);break;case 5:if(yn(n,e),Un(e),i&512&&s!==null&&ms(s,s.return),e.flags&32){var d=e.stateNode;try{In(d,"")}catch(ye){et(e,e.return,ye)}}if(i&4&&(d=e.stateNode,d!=null)){var p=e.memoizedProps,S=s!==null?s.memoizedProps:p,T=e.type,L=e.updateQueue;if(e.updateQueue=null,L!==null)try{T==="input"&&p.type==="radio"&&p.name!=null&&ln(d,p),Zs(T,S);var V=Zs(T,p);for(S=0;S<L.length;S+=2){var re=L[S],oe=L[S+1];re==="style"?Xn(d,oe):re==="dangerouslySetInnerHTML"?ui(d,oe):re==="children"?In(d,oe):P(d,re,oe,V)}switch(T){case"input":cn(d,p);break;case"textarea":li(d,p);break;case"select":var te=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var fe=p.value;fe!=null?Xt(d,!!p.multiple,fe,!1):te!==!!p.multiple&&(p.defaultValue!=null?Xt(d,!!p.multiple,p.defaultValue,!0):Xt(d,!!p.multiple,p.multiple?[]:"",!1))}d[xa]=p}catch(ye){et(e,e.return,ye)}}break;case 6:if(yn(n,e),Un(e),i&4){if(e.stateNode===null)throw Error(o(162));d=e.stateNode,p=e.memoizedProps;try{d.nodeValue=p}catch(ye){et(e,e.return,ye)}}break;case 3:if(yn(n,e),Un(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{la(n.containerInfo)}catch(ye){et(e,e.return,ye)}break;case 4:yn(n,e),Un(e);break;case 13:yn(n,e),Un(e),d=e.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(qu=rt())),i&4&&hm(e);break;case 22:if(re=s!==null&&s.memoizedState!==null,e.mode&1?(St=(V=St)||re,yn(n,e),St=V):yn(n,e),Un(e),i&8192){if(V=e.memoizedState!==null,(e.stateNode.isHidden=V)&&!re&&(e.mode&1)!==0)for(pe=e,re=e.child;re!==null;){for(oe=pe=re;pe!==null;){switch(te=pe,fe=te.child,te.tag){case 0:case 11:case 14:case 15:Ta(4,te,te.return);break;case 1:ms(te,te.return);var ge=te.stateNode;if(typeof ge.componentWillUnmount=="function"){i=te,s=te.return;try{n=i,ge.props=n.memoizedProps,ge.state=n.memoizedState,ge.componentWillUnmount()}catch(ye){et(i,s,ye)}}break;case 5:ms(te,te.return);break;case 22:if(te.memoizedState!==null){ym(oe);continue}}fe!==null?(fe.return=te,pe=fe):ym(oe)}re=re.sibling}e:for(re=null,oe=e;;){if(oe.tag===5){if(re===null){re=oe;try{d=oe.stateNode,V?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(T=oe.stateNode,L=oe.memoizedProps.style,S=L!=null&&L.hasOwnProperty("display")?L.display:null,T.style.display=qo("display",S))}catch(ye){et(e,e.return,ye)}}}else if(oe.tag===6){if(re===null)try{oe.stateNode.nodeValue=V?"":oe.memoizedProps}catch(ye){et(e,e.return,ye)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;re===oe&&(re=null),oe=oe.return}re===oe&&(re=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:yn(n,e),Un(e),i&4&&hm(e);break;case 21:break;default:yn(n,e),Un(e)}}function Un(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(um(s)){var i=s;break e}s=s.return}throw Error(o(160))}switch(i.tag){case 5:var d=i.stateNode;i.flags&32&&(In(d,""),i.flags&=-33);var p=dm(e);Vu(e,p,d);break;case 3:case 4:var S=i.stateNode.containerInfo,T=dm(e);Wu(e,T,S);break;default:throw Error(o(161))}}catch(L){et(e,e.return,L)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Jw(e,n,s){pe=e,mm(e)}function mm(e,n,s){for(var i=(e.mode&1)!==0;pe!==null;){var d=pe,p=d.child;if(d.tag===22&&i){var S=d.memoizedState!==null||rl;if(!S){var T=d.alternate,L=T!==null&&T.memoizedState!==null||St;T=rl;var V=St;if(rl=S,(St=L)&&!V)for(pe=d;pe!==null;)S=pe,L=S.child,S.tag===22&&S.memoizedState!==null?vm(d):L!==null?(L.return=S,pe=L):vm(d);for(;p!==null;)pe=p,mm(p),p=p.sibling;pe=d,rl=T,St=V}gm(e)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,pe=p):gm(e)}}function gm(e){for(;pe!==null;){var n=pe;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:St||ol(5,n);break;case 1:var i=n.stateNode;if(n.flags&4&&!St)if(s===null)i.componentDidMount();else{var d=n.elementType===n.type?s.memoizedProps:mn(n.type,s.memoizedProps);i.componentDidUpdate(d,s.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&yp(n,p,i);break;case 3:var S=n.updateQueue;if(S!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}yp(n,S,s)}break;case 5:var T=n.stateNode;if(s===null&&n.flags&4){s=T;var L=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&s.focus();break;case"img":L.src&&(s.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var V=n.alternate;if(V!==null){var re=V.memoizedState;if(re!==null){var oe=re.dehydrated;oe!==null&&la(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}St||n.flags&512&&Hu(n)}catch(te){et(n,n.return,te)}}if(n===e){pe=null;break}if(s=n.sibling,s!==null){s.return=n.return,pe=s;break}pe=n.return}}function ym(e){for(;pe!==null;){var n=pe;if(n===e){pe=null;break}var s=n.sibling;if(s!==null){s.return=n.return,pe=s;break}pe=n.return}}function vm(e){for(;pe!==null;){var n=pe;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{ol(4,n)}catch(L){et(n,s,L)}break;case 1:var i=n.stateNode;if(typeof i.componentDidMount=="function"){var d=n.return;try{i.componentDidMount()}catch(L){et(n,d,L)}}var p=n.return;try{Hu(n)}catch(L){et(n,p,L)}break;case 5:var S=n.return;try{Hu(n)}catch(L){et(n,S,L)}}}catch(L){et(n,n.return,L)}if(n===e){pe=null;break}var T=n.sibling;if(T!==null){T.return=n.return,pe=T;break}pe=n.return}}var Zw=Math.ceil,sl=A.ReactCurrentDispatcher,Ku=A.ReactCurrentOwner,nn=A.ReactCurrentBatchConfig,Le=0,dt=null,st=null,gt=0,Kt=0,gs=Mr(0),lt=0,Ma=null,xo=0,al=0,Qu=0,Ia=null,Ot=null,qu=0,ys=1/0,sr=null,il=!1,Gu=null,Or=null,ll=!1,_r=null,cl=0,Aa=0,Yu=null,ul=-1,dl=0;function jt(){return(Le&6)!==0?rt():ul!==-1?ul:ul=rt()}function Fr(e){return(e.mode&1)===0?1:(Le&2)!==0&&gt!==0?gt&-gt:Dw.transition!==null?(dl===0&&(dl=dh()),dl):(e=Fe,e!==0||(e=window.event,e=e===void 0?16:wh(e.type)),e)}function vn(e,n,s,i){if(50<Aa)throw Aa=0,Yu=null,Error(o(185));ra(e,s,i),((Le&2)===0||e!==dt)&&(e===dt&&((Le&2)===0&&(al|=s),lt===4&&Ur(e,gt)),_t(e,i),s===1&&Le===0&&(n.mode&1)===0&&(ys=rt()+500,Fi&&Ar()))}function _t(e,n){var s=e.callbackNode;Dx(e,n);var i=wi(e,e===dt?gt:0);if(i===0)s!==null&&lh(s),e.callbackNode=null,e.callbackPriority=0;else if(n=i&-i,e.callbackPriority!==n){if(s!=null&&lh(s),n===1)e.tag===0?zw(wm.bind(null,e)):sp(wm.bind(null,e)),Mw(function(){(Le&6)===0&&Ar()}),s=null;else{switch(fh(i)){case 1:s=jc;break;case 4:s=ch;break;case 16:s=gi;break;case 536870912:s=uh;break;default:s=gi}s=Rm(s,xm.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function xm(e,n){if(ul=-1,dl=0,(Le&6)!==0)throw Error(o(327));var s=e.callbackNode;if(vs()&&e.callbackNode!==s)return null;var i=wi(e,e===dt?gt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||n)n=fl(e,i);else{n=i;var d=Le;Le|=2;var p=Sm();(dt!==e||gt!==n)&&(sr=null,ys=rt()+500,bo(e,n));do try{n1();break}catch(T){bm(e,T)}while(!0);pu(),sl.current=p,Le=d,st!==null?n=0:(dt=null,gt=0,n=lt)}if(n!==0){if(n===2&&(d=Tc(e),d!==0&&(i=d,n=Xu(e,d))),n===1)throw s=Ma,bo(e,0),Ur(e,i),_t(e,rt()),s;if(n===6)Ur(e,i);else{if(d=e.current.alternate,(i&30)===0&&!e1(d)&&(n=fl(e,i),n===2&&(p=Tc(e),p!==0&&(i=p,n=Xu(e,p))),n===1))throw s=Ma,bo(e,0),Ur(e,i),_t(e,rt()),s;switch(e.finishedWork=d,e.finishedLanes=i,n){case 0:case 1:throw Error(o(345));case 2:So(e,Ot,sr);break;case 3:if(Ur(e,i),(i&130023424)===i&&(n=qu+500-rt(),10<n)){if(wi(e,0)!==0)break;if(d=e.suspendedLanes,(d&i)!==i){jt(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=ru(So.bind(null,e,Ot,sr),n);break}So(e,Ot,sr);break;case 4:if(Ur(e,i),(i&4194240)===i)break;for(n=e.eventTimes,d=-1;0<i;){var S=31-fn(i);p=1<<S,S=n[S],S>d&&(d=S),i&=~p}if(i=d,i=rt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Zw(i/1960))-i,10<i){e.timeoutHandle=ru(So.bind(null,e,Ot,sr),i);break}So(e,Ot,sr);break;case 5:So(e,Ot,sr);break;default:throw Error(o(329))}}}return _t(e,rt()),e.callbackNode===s?xm.bind(null,e):null}function Xu(e,n){var s=Ia;return e.current.memoizedState.isDehydrated&&(bo(e,n).flags|=256),e=fl(e,n),e!==2&&(n=Ot,Ot=s,n!==null&&Ju(n)),e}function Ju(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function e1(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var i=0;i<s.length;i++){var d=s[i],p=d.getSnapshot;d=d.value;try{if(!hn(p(),d))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ur(e,n){for(n&=~Qu,n&=~al,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-fn(n),i=1<<s;e[s]=-1,n&=~i}}function wm(e){if((Le&6)!==0)throw Error(o(327));vs();var n=wi(e,0);if((n&1)===0)return _t(e,rt()),null;var s=fl(e,n);if(e.tag!==0&&s===2){var i=Tc(e);i!==0&&(n=i,s=Xu(e,i))}if(s===1)throw s=Ma,bo(e,0),Ur(e,n),_t(e,rt()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,So(e,Ot,sr),_t(e,rt()),null}function Zu(e,n){var s=Le;Le|=1;try{return e(n)}finally{Le=s,Le===0&&(ys=rt()+500,Fi&&Ar())}}function wo(e){_r!==null&&_r.tag===0&&(Le&6)===0&&vs();var n=Le;Le|=1;var s=nn.transition,i=Fe;try{if(nn.transition=null,Fe=1,e)return e()}finally{Fe=i,nn.transition=s,Le=n,(Le&6)===0&&Ar()}}function ed(){Kt=gs.current,Qe(gs)}function bo(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Tw(s)),st!==null)for(s=st.return;s!==null;){var i=s;switch(cu(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Oi();break;case 3:hs(),Qe(Lt),Qe(xt),Su();break;case 5:wu(i);break;case 4:hs();break;case 13:Qe(Xe);break;case 19:Qe(Xe);break;case 10:mu(i.type._context);break;case 22:case 23:ed()}s=s.return}if(dt=e,st=e=$r(e.current,null),gt=Kt=n,lt=0,Ma=null,Qu=al=xo=0,Ot=Ia=null,go!==null){for(n=0;n<go.length;n++)if(s=go[n],i=s.interleaved,i!==null){s.interleaved=null;var d=i.next,p=s.pending;if(p!==null){var S=p.next;p.next=d,i.next=S}s.pending=i}go=null}return e}function bm(e,n){do{var s=st;try{if(pu(),Gi.current=Zi,Yi){for(var i=Je.memoizedState;i!==null;){var d=i.queue;d!==null&&(d.pending=null),i=i.next}Yi=!1}if(vo=0,ut=it=Je=null,Ea=!1,Na=0,Ku.current=null,s===null||s.return===null){lt=1,Ma=n,st=null;break}e:{var p=e,S=s.return,T=s,L=n;if(n=gt,T.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var V=L,re=T,oe=re.tag;if((re.mode&1)===0&&(oe===0||oe===11||oe===15)){var te=re.alternate;te?(re.updateQueue=te.updateQueue,re.memoizedState=te.memoizedState,re.lanes=te.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Kp(S);if(fe!==null){fe.flags&=-257,Qp(fe,S,T,p,n),fe.mode&1&&Vp(p,V,n),n=fe,L=V;var ge=n.updateQueue;if(ge===null){var ye=new Set;ye.add(L),n.updateQueue=ye}else ge.add(L);break e}else{if((n&1)===0){Vp(p,V,n),td();break e}L=Error(o(426))}}else if(Ge&&T.mode&1){var ot=Kp(S);if(ot!==null){(ot.flags&65536)===0&&(ot.flags|=256),Qp(ot,S,T,p,n),fu(ps(L,T));break e}}p=L=ps(L,T),lt!==4&&(lt=2),Ia===null?Ia=[p]:Ia.push(p),p=S;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var D=Hp(p,L,n);gp(p,D);break e;case 1:T=L;var z=p.type,U=p.stateNode;if((p.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Or===null||!Or.has(U)))){p.flags|=65536,n&=-n,p.lanes|=n;var se=Wp(p,T,n);gp(p,se);break e}}p=p.return}while(p!==null)}Cm(s)}catch(ve){n=ve,st===s&&s!==null&&(st=s=s.return);continue}break}while(!0)}function Sm(){var e=sl.current;return sl.current=Zi,e===null?Zi:e}function td(){(lt===0||lt===3||lt===2)&&(lt=4),dt===null||(xo&268435455)===0&&(al&268435455)===0||Ur(dt,gt)}function fl(e,n){var s=Le;Le|=2;var i=Sm();(dt!==e||gt!==n)&&(sr=null,bo(e,n));do try{t1();break}catch(d){bm(e,d)}while(!0);if(pu(),Le=s,sl.current=i,st!==null)throw Error(o(261));return dt=null,gt=0,lt}function t1(){for(;st!==null;)km(st)}function n1(){for(;st!==null&&!Px();)km(st)}function km(e){var n=Pm(e.alternate,e,Kt);e.memoizedProps=e.pendingProps,n===null?Cm(e):st=n,Ku.current=null}function Cm(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=qw(s,n,Kt),s!==null){st=s;return}}else{if(s=Gw(s,n),s!==null){s.flags&=32767,st=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lt=6,st=null;return}}if(n=n.sibling,n!==null){st=n;return}st=n=e}while(n!==null);lt===0&&(lt=5)}function So(e,n,s){var i=Fe,d=nn.transition;try{nn.transition=null,Fe=1,r1(e,n,s,i)}finally{nn.transition=d,Fe=i}return null}function r1(e,n,s,i){do vs();while(_r!==null);if((Le&6)!==0)throw Error(o(327));s=e.finishedWork;var d=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var p=s.lanes|s.childLanes;if(Ox(e,p),e===dt&&(st=dt=null,gt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ll||(ll=!0,Rm(gi,function(){return vs(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=nn.transition,nn.transition=null;var S=Fe;Fe=1;var T=Le;Le|=4,Ku.current=null,Xw(e,s),pm(s,e),kw(tu),ki=!!eu,tu=eu=null,e.current=s,Jw(s),Rx(),Le=T,Fe=S,nn.transition=p}else e.current=s;if(ll&&(ll=!1,_r=e,cl=d),p=e.pendingLanes,p===0&&(Or=null),Mx(s.stateNode),_t(e,rt()),n!==null)for(i=e.onRecoverableError,s=0;s<n.length;s++)d=n[s],i(d.value,{componentStack:d.stack,digest:d.digest});if(il)throw il=!1,e=Gu,Gu=null,e;return(cl&1)!==0&&e.tag!==0&&vs(),p=e.pendingLanes,(p&1)!==0?e===Yu?Aa++:(Aa=0,Yu=e):Aa=0,Ar(),null}function vs(){if(_r!==null){var e=fh(cl),n=nn.transition,s=Fe;try{if(nn.transition=null,Fe=16>e?16:e,_r===null)var i=!1;else{if(e=_r,_r=null,cl=0,(Le&6)!==0)throw Error(o(331));var d=Le;for(Le|=4,pe=e.current;pe!==null;){var p=pe,S=p.child;if((pe.flags&16)!==0){var T=p.deletions;if(T!==null){for(var L=0;L<T.length;L++){var V=T[L];for(pe=V;pe!==null;){var re=pe;switch(re.tag){case 0:case 11:case 15:Ta(8,re,p)}var oe=re.child;if(oe!==null)oe.return=re,pe=oe;else for(;pe!==null;){re=pe;var te=re.sibling,fe=re.return;if(cm(re),re===V){pe=null;break}if(te!==null){te.return=fe,pe=te;break}pe=fe}}}var ge=p.alternate;if(ge!==null){var ye=ge.child;if(ye!==null){ge.child=null;do{var ot=ye.sibling;ye.sibling=null,ye=ot}while(ye!==null)}}pe=p}}if((p.subtreeFlags&2064)!==0&&S!==null)S.return=p,pe=S;else e:for(;pe!==null;){if(p=pe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Ta(9,p,p.return)}var D=p.sibling;if(D!==null){D.return=p.return,pe=D;break e}pe=p.return}}var z=e.current;for(pe=z;pe!==null;){S=pe;var U=S.child;if((S.subtreeFlags&2064)!==0&&U!==null)U.return=S,pe=U;else e:for(S=z;pe!==null;){if(T=pe,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:ol(9,T)}}catch(ve){et(T,T.return,ve)}if(T===S){pe=null;break e}var se=T.sibling;if(se!==null){se.return=T.return,pe=se;break e}pe=T.return}}if(Le=d,Ar(),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(yi,e)}catch{}i=!0}return i}finally{Fe=s,nn.transition=n}}return!1}function Em(e,n,s){n=ps(s,n),n=Hp(e,n,1),e=zr(e,n,1),n=jt(),e!==null&&(ra(e,1,n),_t(e,n))}function et(e,n,s){if(e.tag===3)Em(e,e,s);else for(;n!==null;){if(n.tag===3){Em(n,e,s);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Or===null||!Or.has(i))){e=ps(s,e),e=Wp(n,e,1),n=zr(n,e,1),e=jt(),n!==null&&(ra(n,1,e),_t(n,e));break}}n=n.return}}function o1(e,n,s){var i=e.pingCache;i!==null&&i.delete(n),n=jt(),e.pingedLanes|=e.suspendedLanes&s,dt===e&&(gt&s)===s&&(lt===4||lt===3&&(gt&130023424)===gt&&500>rt()-qu?bo(e,0):Qu|=s),_t(e,n)}function Nm(e,n){n===0&&((e.mode&1)===0?n=1:(n=xi,xi<<=1,(xi&130023424)===0&&(xi=4194304)));var s=jt();e=nr(e,n),e!==null&&(ra(e,n,s),_t(e,s))}function s1(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),Nm(e,s)}function a1(e,n){var s=0;switch(e.tag){case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(n),Nm(e,s)}var Pm;Pm=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||Lt.current)Dt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return Dt=!1,Qw(e,n,s);Dt=(e.flags&131072)!==0}else Dt=!1,Ge&&(n.flags&1048576)!==0&&ap(n,$i,n.index);switch(n.lanes=0,n.tag){case 2:var i=n.type;nl(e,n),e=n.pendingProps;var d=as(n,xt.current);fs(n,s),d=Eu(null,n,i,e,d,s);var p=Nu();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,zt(i)?(p=!0,_i(n)):p=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,vu(n),d.updater=el,n.stateNode=d,d._reactInternals=n,Iu(n,i,e,s),n=Du(null,n,i,!0,p,s)):(n.tag=0,Ge&&p&&lu(n),Rt(null,n,d,s),n=n.child),n;case 16:i=n.elementType;e:{switch(nl(e,n),e=n.pendingProps,d=i._init,i=d(i._payload),n.type=i,d=n.tag=l1(i),e=mn(i,e),d){case 0:n=zu(null,n,i,e,s);break e;case 1:n=Zp(null,n,i,e,s);break e;case 11:n=qp(null,n,i,e,s);break e;case 14:n=Gp(null,n,i,mn(i.type,e),s);break e}throw Error(o(306,i,""))}return n;case 0:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),zu(e,n,i,d,s);case 1:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),Zp(e,n,i,d,s);case 3:e:{if(em(n),e===null)throw Error(o(387));i=n.pendingProps,p=n.memoizedState,d=p.element,mp(e,n),Qi(n,i,null,s);var S=n.memoizedState;if(i=S.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){d=ps(Error(o(423)),n),n=tm(e,n,i,s,d);break e}else if(i!==d){d=ps(Error(o(424)),n),n=tm(e,n,i,s,d);break e}else for(Vt=Tr(n.stateNode.containerInfo.firstChild),Wt=n,Ge=!0,pn=null,s=hp(n,null,i,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(cs(),i===d){n=or(e,n,s);break e}Rt(e,n,i,s)}n=n.child}return n;case 5:return vp(n),e===null&&du(n),i=n.type,d=n.pendingProps,p=e!==null?e.memoizedProps:null,S=d.children,nu(i,d)?S=null:p!==null&&nu(i,p)&&(n.flags|=32),Jp(e,n),Rt(e,n,S,s),n.child;case 6:return e===null&&du(n),null;case 13:return nm(e,n,s);case 4:return xu(n,n.stateNode.containerInfo),i=n.pendingProps,e===null?n.child=us(n,null,i,s):Rt(e,n,i,s),n.child;case 11:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),qp(e,n,i,d,s);case 7:return Rt(e,n,n.pendingProps,s),n.child;case 8:return Rt(e,n,n.pendingProps.children,s),n.child;case 12:return Rt(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(i=n.type._context,d=n.pendingProps,p=n.memoizedProps,S=d.value,He(Wi,i._currentValue),i._currentValue=S,p!==null)if(hn(p.value,S)){if(p.children===d.children&&!Lt.current){n=or(e,n,s);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var T=p.dependencies;if(T!==null){S=p.child;for(var L=T.firstContext;L!==null;){if(L.context===i){if(p.tag===1){L=rr(-1,s&-s),L.tag=2;var V=p.updateQueue;if(V!==null){V=V.shared;var re=V.pending;re===null?L.next=L:(L.next=re.next,re.next=L),V.pending=L}}p.lanes|=s,L=p.alternate,L!==null&&(L.lanes|=s),gu(p.return,s,n),T.lanes|=s;break}L=L.next}}else if(p.tag===10)S=p.type===n.type?null:p.child;else if(p.tag===18){if(S=p.return,S===null)throw Error(o(341));S.lanes|=s,T=S.alternate,T!==null&&(T.lanes|=s),gu(S,s,n),S=p.sibling}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===n){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}Rt(e,n,d.children,s),n=n.child}return n;case 9:return d=n.type,i=n.pendingProps.children,fs(n,s),d=en(d),i=i(d),n.flags|=1,Rt(e,n,i,s),n.child;case 14:return i=n.type,d=mn(i,n.pendingProps),d=mn(i.type,d),Gp(e,n,i,d,s);case 15:return Yp(e,n,n.type,n.pendingProps,s);case 17:return i=n.type,d=n.pendingProps,d=n.elementType===i?d:mn(i,d),nl(e,n),n.tag=1,zt(i)?(e=!0,_i(n)):e=!1,fs(n,s),$p(n,i,d),Iu(n,i,d,s),Du(null,n,i,!0,e,s);case 19:return om(e,n,s);case 22:return Xp(e,n,s)}throw Error(o(156,n.tag))};function Rm(e,n){return ih(e,n)}function i1(e,n,s,i){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,n,s,i){return new i1(e,n,s,i)}function nd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l1(e){if(typeof e=="function")return nd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===O)return 11;if(e===G)return 14}return 2}function $r(e,n){var s=e.alternate;return s===null?(s=rn(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function hl(e,n,s,i,d,p){var S=2;if(i=e,typeof e=="function")nd(e)&&(S=1);else if(typeof e=="string")S=5;else e:switch(e){case W:return ko(s.children,d,p,n);case X:S=8,d|=8;break;case H:return e=rn(12,s,n,d|2),e.elementType=H,e.lanes=p,e;case Z:return e=rn(13,s,n,d),e.elementType=Z,e.lanes=p,e;case ee:return e=rn(19,s,n,d),e.elementType=ee,e.lanes=p,e;case ce:return pl(s,d,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:S=10;break e;case _:S=9;break e;case O:S=11;break e;case G:S=14;break e;case ie:S=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=rn(S,s,n,d),n.elementType=e,n.type=i,n.lanes=p,n}function ko(e,n,s,i){return e=rn(7,e,i,n),e.lanes=s,e}function pl(e,n,s,i){return e=rn(22,e,i,n),e.elementType=ce,e.lanes=s,e.stateNode={isHidden:!1},e}function rd(e,n,s){return e=rn(6,e,null,n),e.lanes=s,e}function od(e,n,s){return n=rn(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function c1(e,n,s,i,d){this.tag=n,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=Mc(0),this.expirationTimes=Mc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mc(0),this.identifierPrefix=i,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function sd(e,n,s,i,d,p,S,T,L){return e=new c1(e,n,s,T,L),n===1?(n=1,p===!0&&(n|=8)):n=0,p=rn(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:i,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(p),e}function u1(e,n,s){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:i==null?null:""+i,children:e,containerInfo:n,implementation:s}}function jm(e){if(!e)return Ir;e=e._reactInternals;e:{if(uo(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(zt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(zt(s))return rp(e,s,n)}return n}function Tm(e,n,s,i,d,p,S,T,L){return e=sd(s,i,!0,e,d,p,S,T,L),e.context=jm(null),s=e.current,i=jt(),d=Fr(s),p=rr(i,d),p.callback=n??null,zr(s,p,d),e.current.lanes=d,ra(e,d,i),_t(e,i),e}function ml(e,n,s,i){var d=n.current,p=jt(),S=Fr(d);return s=jm(s),n.context===null?n.context=s:n.pendingContext=s,n=rr(p,S),n.payload={element:e},i=i===void 0?null:i,i!==null&&(n.callback=i),e=zr(d,n,S),e!==null&&(vn(e,d,S,p),Ki(e,d,S)),S}function gl(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 Mm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function ad(e,n){Mm(e,n),(e=e.alternate)&&Mm(e,n)}function d1(){return null}var Im=typeof reportError=="function"?reportError:function(e){console.error(e)};function id(e){this._internalRoot=e}yl.prototype.render=id.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));ml(e,n,null,null)},yl.prototype.unmount=id.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;wo(function(){ml(null,e,null,null)}),n[Jn]=null}};function yl(e){this._internalRoot=e}yl.prototype.unstable_scheduleHydration=function(e){if(e){var n=mh();e={blockedOn:null,target:e,priority:n};for(var s=0;s<Pr.length&&n!==0&&n<Pr[s].priority;s++);Pr.splice(s,0,e),s===0&&vh(e)}};function ld(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Am(){}function f1(e,n,s,i,d){if(d){if(typeof i=="function"){var p=i;i=function(){var V=gl(S);p.call(V)}}var S=Tm(n,i,e,0,null,!1,!1,"",Am);return e._reactRootContainer=S,e[Jn]=S.current,ya(e.nodeType===8?e.parentNode:e),wo(),S}for(;d=e.lastChild;)e.removeChild(d);if(typeof i=="function"){var T=i;i=function(){var V=gl(L);T.call(V)}}var L=sd(e,0,!1,null,null,!1,!1,"",Am);return e._reactRootContainer=L,e[Jn]=L.current,ya(e.nodeType===8?e.parentNode:e),wo(function(){ml(n,L,s,i)}),L}function xl(e,n,s,i,d){var p=s._reactRootContainer;if(p){var S=p;if(typeof d=="function"){var T=d;d=function(){var L=gl(S);T.call(L)}}ml(n,S,e,d)}else S=f1(s,n,e,d,i);return gl(S)}hh=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=na(n.pendingLanes);s!==0&&(Ic(n,s|1),_t(n,rt()),(Le&6)===0&&(ys=rt()+500,Ar()))}break;case 13:wo(function(){var i=nr(e,1);if(i!==null){var d=jt();vn(i,e,1,d)}}),ad(e,1)}},Ac=function(e){if(e.tag===13){var n=nr(e,134217728);if(n!==null){var s=jt();vn(n,e,134217728,s)}ad(e,134217728)}},ph=function(e){if(e.tag===13){var n=Fr(e),s=nr(e,n);if(s!==null){var i=jt();vn(s,e,n,i)}ad(e,n)}},mh=function(){return Fe},gh=function(e,n){var s=Fe;try{return Fe=e,n()}finally{Fe=s}},Yo=function(e,n,s){switch(n){case"input":if(cn(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var i=s[n];if(i!==e&&i.form===e.form){var d=Di(i);if(!d)throw Error(o(90));Ie(i),cn(i,d)}}}break;case"textarea":li(e,s);break;case"select":n=s.value,n!=null&&Xt(e,!!s.multiple,n,!1)}},De=Zu,$e=wo;var h1={usingClientEntryPoint:!1,Events:[wa,os,Di,hi,Ne,Zu]},La={findFiberByHostInstance:fo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p1={bundleType:La.bundleType,version:La.version,rendererPackageName:La.rendererPackageName,rendererConfig:La.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=sh(e),e===null?null:e.stateNode},findFiberByHostInstance:La.findFiberByHostInstance||d1,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 wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{yi=wl.inject(p1),Dn=wl}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h1,Ft.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ld(n))throw Error(o(200));return u1(e,n,null,s)},Ft.createRoot=function(e,n){if(!ld(e))throw Error(o(299));var s=!1,i="",d=Im;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=sd(e,1,!1,null,null,s,!1,i,d),e[Jn]=n.current,ya(e.nodeType===8?e.parentNode:e),new id(n)},Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=sh(n),e=e===null?null:e.stateNode,e},Ft.flushSync=function(e){return wo(e)},Ft.hydrate=function(e,n,s){if(!vl(n))throw Error(o(200));return xl(null,e,n,!0,s)},Ft.hydrateRoot=function(e,n,s){if(!ld(e))throw Error(o(405));var i=s!=null&&s.hydratedSources||null,d=!1,p="",S=Im;if(s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(S=s.onRecoverableError)),n=Tm(n,null,e,1,s??null,d,!1,p,S),e[Jn]=n.current,ya(e),i)for(e=0;e<i.length;e++)s=i[e],d=s._getVersion,d=d(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,d]:n.mutableSourceEagerHydrationData.push(s,d);return new yl(n)},Ft.render=function(e,n,s){if(!vl(n))throw Error(o(200));return xl(null,e,n,!1,s)},Ft.unmountComponentAtNode=function(e){if(!vl(e))throw Error(o(40));return e._reactRootContainer?(wo(function(){xl(null,null,e,!1,function(){e._reactRootContainer=null,e[Jn]=null})}),!0):!1},Ft.unstable_batchedUpdates=Zu,Ft.unstable_renderSubtreeIntoContainer=function(e,n,s,i){if(!vl(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return xl(e,n,s,!1,i)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var Bm;function py(){if(Bm)return fd.exports;Bm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),fd.exports=S1(),fd.exports}var Hm;function k1(){if(Hm)return Sl;Hm=1;var t=py();return Sl.createRoot=t.createRoot,Sl.hydrateRoot=t.hydrateRoot,Sl}var C1=k1();/**
41
41
  * react-router v7.13.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,259 +46,259 @@ Error generating stack: `+p.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */var Bm="popstate";function k1(t={}){function r(a,l){let{pathname:c,search:f,hash:h}=a.location;return jd("",{pathname:c,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function o(a,l){return typeof l=="string"?l:$a(l)}return E1(r,o,null,t)}function Ye(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Cn(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function C1(){return Math.random().toString(36).substring(2,10)}function Wm(t,r){return{usr:t.state,key:t.key,idx:r}}function jd(t,r,o=null,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof r=="string"?Fs(r):r,state:o,key:r&&r.key||a||C1()}}function $a({pathname:t="/",search:r="",hash:o=""}){return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Fs(t){let r={};if(t){let o=t.indexOf("#");o>=0&&(r.hash=t.substring(o),t=t.substring(0,o));let a=t.indexOf("?");a>=0&&(r.search=t.substring(a),t=t.substring(0,a)),t&&(r.pathname=t)}return r}function E1(t,r,o,a={}){let{window:l=document.defaultView,v5Compat:c=!1}=a,f=l.history,h="POP",g=null,y=x();y==null&&(y=0,f.replaceState({...f.state,idx:y},""));function x(){return(f.state||{idx:null}).idx}function b(){h="POP";let C=x(),R=C==null?null:C-y;y=C,g&&g({action:h,location:v.location,delta:R})}function k(C,R){h="PUSH";let j=jd(v.location,C,R);y=x()+1;let P=Wm(j,y),A=v.createHref(j);try{f.pushState(P,"",A)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(A)}c&&g&&g({action:h,location:v.location,delta:1})}function w(C,R){h="REPLACE";let j=jd(v.location,C,R);y=x();let P=Wm(j,y),A=v.createHref(j);f.replaceState(P,"",A),c&&g&&g({action:h,location:v.location,delta:0})}function N(C){return N1(C)}let v={get action(){return h},get location(){return t(l,f)},listen(C){if(g)throw new Error("A history only accepts one active listener");return l.addEventListener(Bm,b),g=C,()=>{l.removeEventListener(Bm,b),g=null}},createHref(C){return r(l,C)},createURL:N,encodeLocation(C){let R=N(C);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:k,replace:w,go(C){return f.go(C)}};return v}function N1(t,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(o,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:$a(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=o+a),new URL(a,o)}function hy(t,r,o="/"){return P1(t,r,o,!1)}function P1(t,r,o,a){let l=typeof r=="string"?Fs(r):r,c=mr(l.pathname||"/",o);if(c==null)return null;let f=py(t);R1(f);let h=null;for(let g=0;h==null&&g<f.length;++g){let y=F1(c);h=O1(f[g],y,a)}return h}function py(t,r=[],o=[],a="",l=!1){let c=(f,h,g=l,y)=>{let x={relativePath:y===void 0?f.path||"":y,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(a)&&g)return;Ye(x.relativePath.startsWith(a),`Absolute route path "${x.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(a.length)}let b=hr([a,x.relativePath]),k=o.concat(x);f.children&&f.children.length>0&&(Ye(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),py(f.children,r,k,b,g)),!(f.path==null&&!f.index)&&r.push({path:b,score:z1(b,f.index),routesMeta:k})};return t.forEach((f,h)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))c(f,h);else for(let y of my(f.path))c(f,h,!0,y)}),r}function my(t){let r=t.split("/");if(r.length===0)return[];let[o,...a]=r,l=o.endsWith("?"),c=o.replace(/\?$/,"");if(a.length===0)return l?[c,""]:[c];let f=my(a.join("/")),h=[];return h.push(...f.map(g=>g===""?c:[c,g].join("/"))),l&&h.push(...f),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function R1(t){t.sort((r,o)=>r.score!==o.score?o.score-r.score:D1(r.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}var j1=/^:[\w-]+$/,T1=3,M1=2,I1=1,A1=10,L1=-2,Hm=t=>t==="*";function z1(t,r){let o=t.split("/"),a=o.length;return o.some(Hm)&&(a+=L1),r&&(a+=M1),o.filter(l=>!Hm(l)).reduce((l,c)=>l+(j1.test(c)?T1:c===""?I1:A1),a)}function D1(t,r){return t.length===r.length&&t.slice(0,-1).every((a,l)=>a===r[l])?t[t.length-1]-r[r.length-1]:0}function O1(t,r,o=!1){let{routesMeta:a}=t,l={},c="/",f=[];for(let h=0;h<a.length;++h){let g=a[h],y=h===a.length-1,x=c==="/"?r:r.slice(c.length)||"/",b=Hl({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},x),k=g.route;if(!b&&y&&o&&!a[a.length-1].route.index&&(b=Hl({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!b)return null;Object.assign(l,b.params),f.push({params:l,pathname:hr([c,b.pathname]),pathnameBase:W1(hr([c,b.pathnameBase])),route:k}),b.pathnameBase!=="/"&&(c=hr([c,b.pathnameBase]))}return f}function Hl(t,r){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[o,a]=_1(t.path,t.caseSensitive,t.end),l=r.match(o);if(!l)return null;let c=l[0],f=c.replace(/(.)\/+$/,"$1"),h=l.slice(1);return{params:a.reduce((y,{paramName:x,isOptional:b},k)=>{if(x==="*"){let N=h[k]||"";f=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const w=h[k];return b&&!w?y[x]=void 0:y[x]=(w||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:f,pattern:t}}function _1(t,r=!1,o=!0){Cn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let a=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,g)=>(a.push({paramName:h,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(a.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),a]}function F1(t){try{return t.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Cn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),t}}function mr(t,r){if(r==="/")return t;if(!t.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,a=t.charAt(o);return a&&a!=="/"?null:t.slice(o)||"/"}var U1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function $1(t,r="/"){let{pathname:o,search:a="",hash:l=""}=typeof t=="string"?Fs(t):t,c;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?c=Vm(o.substring(1),"/"):c=Vm(o,r)):c=r,{pathname:c,search:H1(a),hash:V1(l)}}function Vm(t,r){let o=r.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?o.length>1&&o.pop():l!=="."&&o.push(l)}),o.length>1?o.join("/"):"/"}function hd(t,r,o,a){return`Cannot include a '${t}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function B1(t){return t.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function mf(t){let r=B1(t);return r.map((o,a)=>a===r.length-1?o.pathname:o.pathnameBase)}function gf(t,r,o,a=!1){let l;typeof t=="string"?l=Fs(t):(l={...t},Ye(!l.pathname||!l.pathname.includes("?"),hd("?","pathname","search",l)),Ye(!l.pathname||!l.pathname.includes("#"),hd("#","pathname","hash",l)),Ye(!l.search||!l.search.includes("#"),hd("#","search","hash",l)));let c=t===""||l.pathname==="",f=c?"/":l.pathname,h;if(f==null)h=o;else{let b=r.length-1;if(!a&&f.startsWith("..")){let k=f.split("/");for(;k[0]==="..";)k.shift(),b-=1;l.pathname=k.join("/")}h=b>=0?r[b]:"/"}let g=$1(l,h),y=f&&f!=="/"&&f.endsWith("/"),x=(c||f===".")&&o.endsWith("/");return!g.pathname.endsWith("/")&&(y||x)&&(g.pathname+="/"),g}var hr=t=>t.join("/").replace(/\/\/+/g,"/"),W1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),H1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,V1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,K1=class{constructor(t,r,o,a=!1){this.status=t,this.statusText=r||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Q1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function q1(t){return t.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yy(t,r){let o=t;if(typeof o!="string"||!U1.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let a=o,l=!1;if(gy)try{let c=new URL(window.location.href),f=o.startsWith("//")?new URL(c.protocol+o):new URL(o),h=mr(f.pathname,r);f.origin===c.origin&&h!=null?o=h+f.search+f.hash:l=!0}catch{Cn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vy=["POST","PUT","PATCH","DELETE"];new Set(vy);var G1=["GET",...vy];new Set(G1);var Us=m.createContext(null);Us.displayName="DataRouter";var oc=m.createContext(null);oc.displayName="DataRouterState";var Y1=m.createContext(!1),xy=m.createContext({isTransitioning:!1});xy.displayName="ViewTransition";var X1=m.createContext(new Map);X1.displayName="Fetchers";var J1=m.createContext(null);J1.displayName="Await";var Gt=m.createContext(null);Gt.displayName="Navigation";var Za=m.createContext(null);Za.displayName="Location";var Gn=m.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var yf=m.createContext(null);yf.displayName="RouteError";var wy="REACT_ROUTER_ERROR",Z1="REDIRECT",eb="ROUTE_ERROR_RESPONSE";function tb(t){if(t.startsWith(`${wy}:${Z1}:{`))try{let r=JSON.parse(t.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 nb(t){if(t.startsWith(`${wy}:${eb}:{`))try{let r=JSON.parse(t.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new K1(r.status,r.statusText,r.data)}catch{}}function rb(t,{relative:r}={}){Ye($s(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:a}=m.useContext(Gt),{hash:l,pathname:c,search:f}=ei(t,{relative:r}),h=c;return o!=="/"&&(h=c==="/"?o:hr([o,c])),a.createHref({pathname:h,search:f,hash:l})}function $s(){return m.useContext(Za)!=null}function wr(){return Ye($s(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Za).location}var by="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sy(t){m.useContext(Gt).static||m.useLayoutEffect(t)}function ky(){let{isDataRoute:t}=m.useContext(Gn);return t?gb():ob()}function ob(){Ye($s(),"useNavigate() may be used only in the context of a <Router> component.");let t=m.useContext(Us),{basename:r,navigator:o}=m.useContext(Gt),{matches:a}=m.useContext(Gn),{pathname:l}=wr(),c=JSON.stringify(mf(a)),f=m.useRef(!1);return Sy(()=>{f.current=!0}),m.useCallback((g,y={})=>{if(Cn(f.current,by),!f.current)return;if(typeof g=="number"){o.go(g);return}let x=gf(g,JSON.parse(c),l,y.relative==="path");t==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:hr([r,x.pathname])),(y.replace?o.replace:o.push)(x,y.state,y)},[r,o,c,l,t])}m.createContext(null);function ei(t,{relative:r}={}){let{matches:o}=m.useContext(Gn),{pathname:a}=wr(),l=JSON.stringify(mf(o));return m.useMemo(()=>gf(t,JSON.parse(l),a,r==="path"),[t,l,a,r])}function sb(t,r){return Cy(t,r)}function Cy(t,r,o,a,l){var j;Ye($s(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=m.useContext(Gt),{matches:f}=m.useContext(Gn),h=f[f.length-1],g=h?h.params:{},y=h?h.pathname:"/",x=h?h.pathnameBase:"/",b=h&&h.route;{let P=b&&b.path||"";Ny(y,!b||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${P}">) 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.
49
+ */var Wm="popstate";function E1(t={}){function r(a,l){let{pathname:c,search:f,hash:h}=a.location;return Md("",{pathname:c,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function o(a,l){return typeof l=="string"?l:Ha(l)}return P1(r,o,null,t)}function Ye(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Cn(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function N1(){return Math.random().toString(36).substring(2,10)}function Vm(t,r){return{usr:t.state,key:t.key,idx:r}}function Md(t,r,o=null,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof r=="string"?$s(r):r,state:o,key:r&&r.key||a||N1()}}function Ha({pathname:t="/",search:r="",hash:o=""}){return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function $s(t){let r={};if(t){let o=t.indexOf("#");o>=0&&(r.hash=t.substring(o),t=t.substring(0,o));let a=t.indexOf("?");a>=0&&(r.search=t.substring(a),t=t.substring(0,a)),t&&(r.pathname=t)}return r}function P1(t,r,o,a={}){let{window:l=document.defaultView,v5Compat:c=!1}=a,f=l.history,h="POP",g=null,y=x();y==null&&(y=0,f.replaceState({...f.state,idx:y},""));function x(){return(f.state||{idx:null}).idx}function b(){h="POP";let C=x(),R=C==null?null:C-y;y=C,g&&g({action:h,location:v.location,delta:R})}function k(C,R){h="PUSH";let j=Md(v.location,C,R);y=x()+1;let P=Vm(j,y),A=v.createHref(j);try{f.pushState(P,"",A)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(A)}c&&g&&g({action:h,location:v.location,delta:1})}function w(C,R){h="REPLACE";let j=Md(v.location,C,R);y=x();let P=Vm(j,y),A=v.createHref(j);f.replaceState(P,"",A),c&&g&&g({action:h,location:v.location,delta:0})}function N(C){return R1(C)}let v={get action(){return h},get location(){return t(l,f)},listen(C){if(g)throw new Error("A history only accepts one active listener");return l.addEventListener(Wm,b),g=C,()=>{l.removeEventListener(Wm,b),g=null}},createHref(C){return r(l,C)},createURL:N,encodeLocation(C){let R=N(C);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:k,replace:w,go(C){return f.go(C)}};return v}function R1(t,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(o,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ha(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=o+a),new URL(a,o)}function my(t,r,o="/"){return j1(t,r,o,!1)}function j1(t,r,o,a){let l=typeof r=="string"?$s(r):r,c=mr(l.pathname||"/",o);if(c==null)return null;let f=gy(t);T1(f);let h=null;for(let g=0;h==null&&g<f.length;++g){let y=$1(c);h=F1(f[g],y,a)}return h}function gy(t,r=[],o=[],a="",l=!1){let c=(f,h,g=l,y)=>{let x={relativePath:y===void 0?f.path||"":y,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(a)&&g)return;Ye(x.relativePath.startsWith(a),`Absolute route path "${x.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(a.length)}let b=hr([a,x.relativePath]),k=o.concat(x);f.children&&f.children.length>0&&(Ye(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),gy(f.children,r,k,b,g)),!(f.path==null&&!f.index)&&r.push({path:b,score:O1(b,f.index),routesMeta:k})};return t.forEach((f,h)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))c(f,h);else for(let y of yy(f.path))c(f,h,!0,y)}),r}function yy(t){let r=t.split("/");if(r.length===0)return[];let[o,...a]=r,l=o.endsWith("?"),c=o.replace(/\?$/,"");if(a.length===0)return l?[c,""]:[c];let f=yy(a.join("/")),h=[];return h.push(...f.map(g=>g===""?c:[c,g].join("/"))),l&&h.push(...f),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function T1(t){t.sort((r,o)=>r.score!==o.score?o.score-r.score:_1(r.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}var M1=/^:[\w-]+$/,I1=3,A1=2,L1=1,z1=10,D1=-2,Km=t=>t==="*";function O1(t,r){let o=t.split("/"),a=o.length;return o.some(Km)&&(a+=D1),r&&(a+=A1),o.filter(l=>!Km(l)).reduce((l,c)=>l+(M1.test(c)?I1:c===""?L1:z1),a)}function _1(t,r){return t.length===r.length&&t.slice(0,-1).every((a,l)=>a===r[l])?t[t.length-1]-r[r.length-1]:0}function F1(t,r,o=!1){let{routesMeta:a}=t,l={},c="/",f=[];for(let h=0;h<a.length;++h){let g=a[h],y=h===a.length-1,x=c==="/"?r:r.slice(c.length)||"/",b=Kl({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},x),k=g.route;if(!b&&y&&o&&!a[a.length-1].route.index&&(b=Kl({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!b)return null;Object.assign(l,b.params),f.push({params:l,pathname:hr([c,b.pathname]),pathnameBase:V1(hr([c,b.pathnameBase])),route:k}),b.pathnameBase!=="/"&&(c=hr([c,b.pathnameBase]))}return f}function Kl(t,r){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[o,a]=U1(t.path,t.caseSensitive,t.end),l=r.match(o);if(!l)return null;let c=l[0],f=c.replace(/(.)\/+$/,"$1"),h=l.slice(1);return{params:a.reduce((y,{paramName:x,isOptional:b},k)=>{if(x==="*"){let N=h[k]||"";f=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const w=h[k];return b&&!w?y[x]=void 0:y[x]=(w||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:f,pattern:t}}function U1(t,r=!1,o=!0){Cn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let a=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,g)=>(a.push({paramName:h,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(a.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),a]}function $1(t){try{return t.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Cn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),t}}function mr(t,r){if(r==="/")return t;if(!t.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,a=t.charAt(o);return a&&a!=="/"?null:t.slice(o)||"/"}var B1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function H1(t,r="/"){let{pathname:o,search:a="",hash:l=""}=typeof t=="string"?$s(t):t,c;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?c=Qm(o.substring(1),"/"):c=Qm(o,r)):c=r,{pathname:c,search:K1(a),hash:Q1(l)}}function Qm(t,r){let o=r.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?o.length>1&&o.pop():l!=="."&&o.push(l)}),o.length>1?o.join("/"):"/"}function md(t,r,o,a){return`Cannot include a '${t}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function W1(t){return t.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function yf(t){let r=W1(t);return r.map((o,a)=>a===r.length-1?o.pathname:o.pathnameBase)}function vf(t,r,o,a=!1){let l;typeof t=="string"?l=$s(t):(l={...t},Ye(!l.pathname||!l.pathname.includes("?"),md("?","pathname","search",l)),Ye(!l.pathname||!l.pathname.includes("#"),md("#","pathname","hash",l)),Ye(!l.search||!l.search.includes("#"),md("#","search","hash",l)));let c=t===""||l.pathname==="",f=c?"/":l.pathname,h;if(f==null)h=o;else{let b=r.length-1;if(!a&&f.startsWith("..")){let k=f.split("/");for(;k[0]==="..";)k.shift(),b-=1;l.pathname=k.join("/")}h=b>=0?r[b]:"/"}let g=H1(l,h),y=f&&f!=="/"&&f.endsWith("/"),x=(c||f===".")&&o.endsWith("/");return!g.pathname.endsWith("/")&&(y||x)&&(g.pathname+="/"),g}var hr=t=>t.join("/").replace(/\/\/+/g,"/"),V1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Q1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,q1=class{constructor(t,r,o,a=!1){this.status=t,this.statusText=r||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function G1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Y1(t){return t.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xy(t,r){let o=t;if(typeof o!="string"||!B1.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let a=o,l=!1;if(vy)try{let c=new URL(window.location.href),f=o.startsWith("//")?new URL(c.protocol+o):new URL(o),h=mr(f.pathname,r);f.origin===c.origin&&h!=null?o=h+f.search+f.hash:l=!0}catch{Cn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wy=["POST","PUT","PATCH","DELETE"];new Set(wy);var X1=["GET",...wy];new Set(X1);var Bs=m.createContext(null);Bs.displayName="DataRouter";var ac=m.createContext(null);ac.displayName="DataRouterState";var J1=m.createContext(!1),by=m.createContext({isTransitioning:!1});by.displayName="ViewTransition";var Z1=m.createContext(new Map);Z1.displayName="Fetchers";var eb=m.createContext(null);eb.displayName="Await";var Gt=m.createContext(null);Gt.displayName="Navigation";var ti=m.createContext(null);ti.displayName="Location";var Gn=m.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var xf=m.createContext(null);xf.displayName="RouteError";var Sy="REACT_ROUTER_ERROR",tb="REDIRECT",nb="ROUTE_ERROR_RESPONSE";function rb(t){if(t.startsWith(`${Sy}:${tb}:{`))try{let r=JSON.parse(t.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 ob(t){if(t.startsWith(`${Sy}:${nb}:{`))try{let r=JSON.parse(t.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new q1(r.status,r.statusText,r.data)}catch{}}function sb(t,{relative:r}={}){Ye(Hs(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:a}=m.useContext(Gt),{hash:l,pathname:c,search:f}=ni(t,{relative:r}),h=c;return o!=="/"&&(h=c==="/"?o:hr([o,c])),a.createHref({pathname:h,search:f,hash:l})}function Hs(){return m.useContext(ti)!=null}function wr(){return Ye(Hs(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(ti).location}var ky="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Cy(t){m.useContext(Gt).static||m.useLayoutEffect(t)}function Ey(){let{isDataRoute:t}=m.useContext(Gn);return t?vb():ab()}function ab(){Ye(Hs(),"useNavigate() may be used only in the context of a <Router> component.");let t=m.useContext(Bs),{basename:r,navigator:o}=m.useContext(Gt),{matches:a}=m.useContext(Gn),{pathname:l}=wr(),c=JSON.stringify(yf(a)),f=m.useRef(!1);return Cy(()=>{f.current=!0}),m.useCallback((g,y={})=>{if(Cn(f.current,ky),!f.current)return;if(typeof g=="number"){o.go(g);return}let x=vf(g,JSON.parse(c),l,y.relative==="path");t==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:hr([r,x.pathname])),(y.replace?o.replace:o.push)(x,y.state,y)},[r,o,c,l,t])}m.createContext(null);function ni(t,{relative:r}={}){let{matches:o}=m.useContext(Gn),{pathname:a}=wr(),l=JSON.stringify(yf(o));return m.useMemo(()=>vf(t,JSON.parse(l),a,r==="path"),[t,l,a,r])}function ib(t,r){return Ny(t,r)}function Ny(t,r,o,a,l){var j;Ye(Hs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=m.useContext(Gt),{matches:f}=m.useContext(Gn),h=f[f.length-1],g=h?h.params:{},y=h?h.pathname:"/",x=h?h.pathnameBase:"/",b=h&&h.route;{let P=b&&b.path||"";Ry(y,!b||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${P}">) 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
50
 
51
- Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let k=wr(),w;if(r){let P=typeof r=="string"?Fs(r):r;Ye(x==="/"||((j=P.pathname)==null?void 0:j.startsWith(x)),`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 "${x}" but pathname "${P.pathname}" was given in the \`location\` prop.`),w=P}else w=k;let N=w.pathname||"/",v=N;if(x!=="/"){let P=x.replace(/^\//,"").split("/");v="/"+N.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=hy(t,{pathname:v});Cn(b||C!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Cn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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 R=ub(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},g,P.params),pathname:hr([x,c.encodeLocation?c.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?x:hr([x,c.encodeLocation?c.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),f,o,a,l);return r&&R?m.createElement(Za.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},R):R}function ab(){let t=mb(),r=Q1(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),o=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},c={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:c},"ErrorBoundary")," or"," ",m.createElement("code",{style:c},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},r),o?m.createElement("pre",{style:l},o):null,f)}var ib=m.createElement(ab,null),Ey=class extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){this.props.onError?this.props.onError(t,r):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const o=nb(t.digest);o&&(t=o)}let r=t!==void 0?m.createElement(Gn.Provider,{value:this.props.routeContext},m.createElement(yf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?m.createElement(lb,{error:t},r):r}};Ey.contextType=Y1;var pd=new WeakMap;function lb({children:t,error:r}){let{basename:o}=m.useContext(Gt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=tb(r.digest);if(a){let l=pd.get(r);if(l)throw l;let c=yy(a.location,o);if(gy&&!pd.get(r))if(c.isExternal||a.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:a.replace}));throw pd.set(r,f),f}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function cb({routeContext:t,match:r,children:o}){let a=m.useContext(Us);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(Gn.Provider,{value:t},o)}function ub(t,r=[],o=null,a=null,l=null){if(t==null){if(!o)return null;if(o.errors)t=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let c=t,f=o==null?void 0:o.errors;if(f!=null){let x=c.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);Ye(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,g=-1;if(o)for(let x=0;x<c.length;x++){let b=c[x];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=x),b.route.id){let{loaderData:k,errors:w}=o,N=b.route.loader&&!k.hasOwnProperty(b.route.id)&&(!w||w[b.route.id]===void 0);if(b.route.lazy||N){h=!0,g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}let y=o&&a?(x,b)=>{var k,w;a(x,{location:o.location,params:((w=(k=o.matches)==null?void 0:k[0])==null?void 0:w.params)??{},unstable_pattern:q1(o.matches),errorInfo:b})}:void 0;return c.reduceRight((x,b,k)=>{let w,N=!1,v=null,C=null;o&&(w=f&&b.route.id?f[b.route.id]:void 0,v=b.route.errorElement||ib,h&&(g<0&&k===0?(Ny("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):g===k&&(N=!0,C=b.route.hydrateFallbackElement||null)));let R=r.concat(c.slice(0,k+1)),j=()=>{let P;return w?P=v:N?P=C:b.route.Component?P=m.createElement(b.route.Component,null):b.route.element?P=b.route.element:P=x,m.createElement(cb,{match:b,routeContext:{outlet:x,matches:R,isDataRoute:o!=null},children:P})};return o&&(b.route.ErrorBoundary||b.route.errorElement||k===0)?m.createElement(Ey,{location:o.location,revalidation:o.revalidation,component:v,error:w,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:y}):j()},null)}function vf(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function db(t){let r=m.useContext(Us);return Ye(r,vf(t)),r}function fb(t){let r=m.useContext(oc);return Ye(r,vf(t)),r}function hb(t){let r=m.useContext(Gn);return Ye(r,vf(t)),r}function xf(t){let r=hb(t),o=r.matches[r.matches.length-1];return Ye(o.route.id,`${t} can only be used on routes that contain a unique "id"`),o.route.id}function pb(){return xf("useRouteId")}function mb(){var a;let t=m.useContext(yf),r=fb("useRouteError"),o=xf("useRouteError");return t!==void 0?t:(a=r.errors)==null?void 0:a[o]}function gb(){let{router:t}=db("useNavigate"),r=xf("useNavigate"),o=m.useRef(!1);return Sy(()=>{o.current=!0}),m.useCallback(async(l,c={})=>{Cn(o.current,by),o.current&&(typeof l=="number"?await t.navigate(l):await t.navigate(l,{fromRouteId:r,...c}))},[t,r])}var Km={};function Ny(t,r,o){!r&&!Km[t]&&(Km[t]=!0,Cn(!1,o))}m.memo(yb);function yb({routes:t,future:r,state:o,onError:a}){return Cy(t,void 0,o,a,r)}function Qm({to:t,replace:r,state:o,relative:a}){Ye($s(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=m.useContext(Gt);Cn(!l,"<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:c}=m.useContext(Gn),{pathname:f}=wr(),h=ky(),g=gf(t,mf(c),f,a==="path"),y=JSON.stringify(g);return m.useEffect(()=>{h(JSON.parse(y),{replace:r,state:o,relative:a})},[h,y,a,r,o]),null}function $n(t){Ye(!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 vb({basename:t="/",children:r=null,location:o,navigationType:a="POP",navigator:l,static:c=!1,unstable_useTransitions:f}){Ye(!$s(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=m.useMemo(()=>({basename:h,navigator:l,static:c,unstable_useTransitions:f,future:{}}),[h,l,c,f]);typeof o=="string"&&(o=Fs(o));let{pathname:y="/",search:x="",hash:b="",state:k=null,key:w="default"}=o,N=m.useMemo(()=>{let v=mr(y,h);return v==null?null:{location:{pathname:v,search:x,hash:b,state:k,key:w},navigationType:a}},[h,y,x,b,k,w,a]);return Cn(N!=null,`<Router basename="${h}"> is not able to match the URL "${y}${x}${b}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:m.createElement(Gt.Provider,{value:g},m.createElement(Za.Provider,{children:r,value:N}))}function xb({children:t,location:r}){return sb(Td(t),r)}function Td(t,r=[]){let o=[];return m.Children.forEach(t,(a,l)=>{if(!m.isValidElement(a))return;let c=[...r,l];if(a.type===m.Fragment){o.push.apply(o,Td(a.props.children,c));return}Ye(a.type===$n,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!a.props.index||!a.props.children,"An index route cannot have child routes.");let f={id:a.props.id||c.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(f.children=Td(a.props.children,c)),o.push(f)}),o}var Al="get",Ll="application/x-www-form-urlencoded";function sc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function wb(t){return sc(t)&&t.tagName.toLowerCase()==="button"}function bb(t){return sc(t)&&t.tagName.toLowerCase()==="form"}function Sb(t){return sc(t)&&t.tagName.toLowerCase()==="input"}function kb(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Cb(t,r){return t.button===0&&(!r||r==="_self")&&!kb(t)}var bl=null;function Eb(){if(bl===null)try{new FormData(document.createElement("form"),0),bl=!1}catch{bl=!0}return bl}var Nb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function md(t){return t!=null&&!Nb.has(t)?(Cn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ll}"`),null):t}function Pb(t,r){let o,a,l,c,f;if(bb(t)){let h=t.getAttribute("action");a=h?mr(h,r):null,o=t.getAttribute("method")||Al,l=md(t.getAttribute("enctype"))||Ll,c=new FormData(t)}else if(wb(t)||Sb(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(a=g?mr(g,r):null,o=t.getAttribute("formmethod")||h.getAttribute("method")||Al,l=md(t.getAttribute("formenctype"))||md(h.getAttribute("enctype"))||Ll,c=new FormData(h,t),!Eb()){let{name:y,type:x,value:b}=t;if(x==="image"){let k=y?`${y}.`:"";c.append(`${k}x`,"0"),c.append(`${k}y`,"0")}else y&&c.append(y,b)}}else{if(sc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Al,a=null,l=Ll,f=t}return c&&l==="text/plain"&&(f=c,c=void 0),{action:a,method:o.toLowerCase(),encType:l,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wf(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Rb(t,r,o,a){let l=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return o?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:r&&mr(l.pathname,r)==="/"?l.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function jb(t,r){if(t.id in r)return r[t.id];try{let o=await import(t.module);return r[t.id]=o,o}catch(o){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Tb(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Mb(t,r,o){let a=await Promise.all(t.map(async l=>{let c=r.routes[l.route.id];if(c){let f=await jb(c,o);return f.links?f.links():[]}return[]}));return zb(a.flat(1).filter(Tb).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function qm(t,r,o,a,l,c){let f=(g,y)=>o[y]?g.route.id!==o[y].route.id:!0,h=(g,y)=>{var x;return o[y].pathname!==g.pathname||((x=o[y].route.path)==null?void 0:x.endsWith("*"))&&o[y].params["*"]!==g.params["*"]};return c==="assets"?r.filter((g,y)=>f(g,y)||h(g,y)):c==="data"?r.filter((g,y)=>{var b;let x=a.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,y)||h(g,y))return!0;if(g.route.shouldRevalidate){let k=g.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((b=o[0])==null?void 0:b.params)||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof k=="boolean")return k}return!0}):[]}function Ib(t,r,{includeHydrateFallback:o}={}){return Ab(t.map(a=>{let l=r.routes[a.route.id];if(!l)return[];let c=[l.module];return l.clientActionModule&&(c=c.concat(l.clientActionModule)),l.clientLoaderModule&&(c=c.concat(l.clientLoaderModule)),o&&l.hydrateFallbackModule&&(c=c.concat(l.hydrateFallbackModule)),l.imports&&(c=c.concat(l.imports)),c}).flat(1))}function Ab(t){return[...new Set(t)]}function Lb(t){let r={},o=Object.keys(t).sort();for(let a of o)r[a]=t[a];return r}function zb(t,r){let o=new Set;return new Set(r),t.reduce((a,l)=>{let c=JSON.stringify(Lb(l));return o.has(c)||(o.add(c),a.push({key:c,link:l})),a},[])}function Py(){let t=m.useContext(Us);return wf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Db(){let t=m.useContext(oc);return wf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var bf=m.createContext(void 0);bf.displayName="FrameworkContext";function Ry(){let t=m.useContext(bf);return wf(t,"You must render this element inside a <HydratedRouter> element"),t}function Ob(t,r){let o=m.useContext(bf),[a,l]=m.useState(!1),[c,f]=m.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:y,onMouseLeave:x,onTouchStart:b}=r,k=m.useRef(null);m.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let v=R=>{R.forEach(j=>{f(j.isIntersecting)})},C=new IntersectionObserver(v,{threshold:.5});return k.current&&C.observe(k.current),()=>{C.disconnect()}}},[t]),m.useEffect(()=>{if(a){let v=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(v)}}},[a]);let w=()=>{l(!0)},N=()=>{l(!1),f(!1)};return o?t!=="intent"?[c,k,{}]:[c,k,{onFocus:La(h,w),onBlur:La(g,N),onMouseEnter:La(y,w),onMouseLeave:La(x,N),onTouchStart:La(b,w)}]:[!1,k,{}]}function La(t,r){return o=>{t&&t(o),o.defaultPrevented||r(o)}}function _b({page:t,...r}){let{router:o}=Py(),a=m.useMemo(()=>hy(o.routes,t,o.basename),[o.routes,t,o.basename]);return a?m.createElement(Ub,{page:t,matches:a,...r}):null}function Fb(t){let{manifest:r,routeModules:o}=Ry(),[a,l]=m.useState([]);return m.useEffect(()=>{let c=!1;return Mb(t,r,o).then(f=>{c||l(f)}),()=>{c=!0}},[t,r,o]),a}function Ub({page:t,matches:r,...o}){let a=wr(),{future:l,manifest:c,routeModules:f}=Ry(),{basename:h}=Py(),{loaderData:g,matches:y}=Db(),x=m.useMemo(()=>qm(t,r,y,c,a,"data"),[t,r,y,c,a]),b=m.useMemo(()=>qm(t,r,y,c,a,"assets"),[t,r,y,c,a]),k=m.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let v=new Set,C=!1;if(r.forEach(j=>{var A;let P=c.routes[j.route.id];!P||!P.hasLoader||(!x.some($=>$.route.id===j.route.id)&&j.route.id in g&&((A=f[j.route.id])!=null&&A.shouldRevalidate)||P.hasClientLoader?C=!0:v.add(j.route.id))}),v.size===0)return[];let R=Rb(t,h,l.unstable_trailingSlashAwareDataRequests,"data");return C&&v.size>0&&R.searchParams.set("_routes",r.filter(j=>v.has(j.route.id)).map(j=>j.route.id).join(",")),[R.pathname+R.search]},[h,l.unstable_trailingSlashAwareDataRequests,g,a,c,x,r,t,f]),w=m.useMemo(()=>Ib(b,c),[b,c]),N=Fb(b);return m.createElement(m.Fragment,null,k.map(v=>m.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...o})),w.map(v=>m.createElement("link",{key:v,rel:"modulepreload",href:v,...o})),N.map(({key:v,link:C})=>m.createElement("link",{key:v,nonce:o.nonce,...C,crossOrigin:C.crossOrigin??o.crossOrigin})))}function $b(...t){return r=>{t.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bb&&(window.__reactRouterVersion="7.13.0")}catch{}function Wb({basename:t,children:r,unstable_useTransitions:o,window:a}){let l=m.useRef();l.current==null&&(l.current=k1({window:a,v5Compat:!0}));let c=l.current,[f,h]=m.useState({action:c.action,location:c.location}),g=m.useCallback(y=>{o===!1?h(y):m.startTransition(()=>h(y))},[o]);return m.useLayoutEffect(()=>c.listen(g),[c,g]),m.createElement(vb,{basename:t,children:r,location:f.location,navigationType:f.action,navigator:c,unstable_useTransitions:o})}var jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ty=m.forwardRef(function({onClick:r,discover:o="render",prefetch:a="none",relative:l,reloadDocument:c,replace:f,state:h,target:g,to:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k,...w},N){let{basename:v,unstable_useTransitions:C}=m.useContext(Gt),R=typeof y=="string"&&jy.test(y),j=yy(y,v);y=j.to;let P=rb(y,{relative:l}),[A,$,B]=Ob(a,w),H=Kb(y,{replace:f,state:h,target:g,preventScrollReset:x,relative:l,viewTransition:b,unstable_defaultShouldRevalidate:k,unstable_useTransitions:C});function X(Y){r&&r(Y),Y.defaultPrevented||H(Y)}let W=m.createElement("a",{...w,...B,href:j.absoluteURL||P,onClick:j.isExternal||c?r:X,ref:$b(N,$),target:g,"data-discover":!R&&o==="render"?"true":void 0});return A&&!R?m.createElement(m.Fragment,null,W,m.createElement(_b,{page:P})):W});Ty.displayName="Link";var My=m.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:a="",end:l=!1,style:c,to:f,viewTransition:h,children:g,...y},x){let b=ei(f,{relative:y.relative}),k=wr(),w=m.useContext(oc),{navigator:N,basename:v}=m.useContext(Gt),C=w!=null&&Xb(b)&&h===!0,R=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,j=k.pathname,P=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;o||(j=j.toLowerCase(),P=P?P.toLowerCase():null,R=R.toLowerCase()),P&&v&&(P=mr(P,v)||P);const A=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let $=j===R||!l&&j.startsWith(R)&&j.charAt(A)==="/",B=P!=null&&(P===R||!l&&P.startsWith(R)&&P.charAt(R.length)==="/"),H={isActive:$,isPending:B,isTransitioning:C},X=$?r:void 0,W;typeof a=="function"?W=a(H):W=[a,$?"active":null,B?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let Y=typeof c=="function"?c(H):c;return m.createElement(Ty,{...y,"aria-current":X,className:W,ref:x,style:Y,to:f,viewTransition:h},typeof g=="function"?g(H):g)});My.displayName="NavLink";var Hb=m.forwardRef(({discover:t="render",fetcherKey:r,navigate:o,reloadDocument:a,replace:l,state:c,method:f=Al,action:h,onSubmit:g,relative:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k,...w},N)=>{let{unstable_useTransitions:v}=m.useContext(Gt),C=Gb(),R=Yb(h,{relative:y}),j=f.toLowerCase()==="get"?"get":"post",P=typeof h=="string"&&jy.test(h),A=$=>{if(g&&g($),$.defaultPrevented)return;$.preventDefault();let B=$.nativeEvent.submitter,H=(B==null?void 0:B.getAttribute("formmethod"))||f,X=()=>C(B||$.currentTarget,{fetcherKey:r,method:H,navigate:o,replace:l,state:c,relative:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k});v&&o!==!1?m.startTransition(()=>X()):X()};return m.createElement("form",{ref:N,method:j,action:R,onSubmit:a?g:A,...w,"data-discover":!P&&t==="render"?"true":void 0})});Hb.displayName="Form";function Vb(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Iy(t){let r=m.useContext(Us);return Ye(r,Vb(t)),r}function Kb(t,{target:r,replace:o,state:a,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:g}={}){let y=ky(),x=wr(),b=ei(t,{relative:c});return m.useCallback(k=>{if(Cb(k,r)){k.preventDefault();let w=o!==void 0?o:$a(x)===$a(b),N=()=>y(t,{replace:w,state:a,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});g?m.startTransition(()=>N()):N()}},[x,y,b,o,a,r,t,l,c,f,h,g])}var Qb=0,qb=()=>`__${String(++Qb)}__`;function Gb(){let{router:t}=Iy("useSubmit"),{basename:r}=m.useContext(Gt),o=pb(),a=t.fetch,l=t.navigate;return m.useCallback(async(c,f={})=>{let{action:h,method:g,encType:y,formData:x,body:b}=Pb(c,r);if(f.navigate===!1){let k=f.fetcherKey||qb();await a(k,o,f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:b,formMethod:f.method||g,formEncType:f.encType||y,flushSync:f.flushSync})}else await l(f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:b,formMethod:f.method||g,formEncType:f.encType||y,replace:f.replace,state:f.state,fromRouteId:o,flushSync:f.flushSync,viewTransition:f.viewTransition})},[a,l,r,o])}function Yb(t,{relative:r}={}){let{basename:o}=m.useContext(Gt),a=m.useContext(Gn);Ye(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),c={...ei(t||".",{relative:r})},f=wr();if(t==null){c.search=f.search;let h=new URLSearchParams(c.search),g=h.getAll("index");if(g.some(x=>x==="")){h.delete("index"),g.filter(b=>b).forEach(b=>h.append("index",b));let x=h.toString();c.search=x?`?${x}`:""}}return(!t||t===".")&&l.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(c.pathname=c.pathname==="/"?o:hr([o,c.pathname])),$a(c)}function Xb(t,{relative:r}={}){let o=m.useContext(xy);Ye(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Iy("useViewTransitionState"),l=ei(t,{relative:r});if(!o.isTransitioning)return!1;let c=mr(o.currentLocation.pathname,a)||o.currentLocation.pathname,f=mr(o.nextLocation.pathname,a)||o.nextLocation.pathname;return Hl(l.pathname,f)!=null||Hl(l.pathname,c)!=null}var ti=fy();const Ay=uy(ti);var Bs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Jb={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Qr,hf,Zg,Zb=(Zg=class{constructor(){we(this,Qr,Jb);we(this,hf,!1)}setTimeoutProvider(t){de(this,Qr,t)}setTimeout(t,r){return I(this,Qr).setTimeout(t,r)}clearTimeout(t){I(this,Qr).clearTimeout(t)}setInterval(t,r){return I(this,Qr).setInterval(t,r)}clearInterval(t){I(this,Qr).clearInterval(t)}},Qr=new WeakMap,hf=new WeakMap,Zg),Co=new Zb;function eS(t){setTimeout(t,0)}var Do=typeof window>"u"||"Deno"in globalThis;function Mt(){}function tS(t,r){return typeof t=="function"?t(r):t}function Md(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ly(t,r){return Math.max(t+(r||0)-Date.now(),0)}function no(t,r){return typeof t=="function"?t(r):t}function sn(t,r){return typeof t=="function"?t(r):t}function Gm(t,r){const{type:o="all",exact:a,fetchStatus:l,predicate:c,queryKey:f,stale:h}=t;if(f){if(a){if(r.queryHash!==Sf(f,r.options))return!1}else if(!Ba(r.queryKey,f))return!1}if(o!=="all"){const g=r.isActive();if(o==="active"&&!g||o==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||l&&l!==r.state.fetchStatus||c&&!c(r))}function Ym(t,r){const{exact:o,status:a,predicate:l,mutationKey:c}=t;if(c){if(!r.options.mutationKey)return!1;if(o){if(Oo(r.options.mutationKey)!==Oo(c))return!1}else if(!Ba(r.options.mutationKey,c))return!1}return!(a&&r.state.status!==a||l&&!l(r))}function Sf(t,r){return((r==null?void 0:r.queryKeyHashFn)||Oo)(t)}function Oo(t){return JSON.stringify(t,(r,o)=>Id(o)?Object.keys(o).sort().reduce((a,l)=>(a[l]=o[l],a),{}):o)}function Ba(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(o=>Ba(t[o],r[o])):!1}var nS=Object.prototype.hasOwnProperty;function zy(t,r,o=0){if(t===r)return t;if(o>500)return r;const a=Xm(t)&&Xm(r);if(!a&&!(Id(t)&&Id(r)))return r;const c=(a?t:Object.keys(t)).length,f=a?r:Object.keys(r),h=f.length,g=a?new Array(h):{};let y=0;for(let x=0;x<h;x++){const b=a?x:f[x],k=t[b],w=r[b];if(k===w){g[b]=k,(a?x<c:nS.call(t,b))&&y++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){g[b]=w;continue}const N=zy(k,w,o+1);g[b]=N,N===k&&y++}return c===h&&y===c?t:g}function Vl(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const o in t)if(t[o]!==r[o])return!1;return!0}function Xm(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Id(t){if(!Jm(t))return!1;const r=t.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!Jm(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Jm(t){return Object.prototype.toString.call(t)==="[object Object]"}function rS(t){return new Promise(r=>{Co.setTimeout(r,t)})}function Ad(t,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(t,r):o.structuralSharing!==!1?zy(t,r):r}function oS(t,r,o=0){const a=[...t,r];return o&&a.length>o?a.slice(1):a}function sS(t,r,o=0){const a=[r,...t];return o&&a.length>o?a.slice(0,-1):a}var kf=Symbol();function Dy(t,r){return!t.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!t.queryFn||t.queryFn===kf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Cf(t,r){return typeof t=="function"?t(...r):!!t}function aS(t,r,o){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??(l=r()),a||(a=!0,l.aborted?o():l.addEventListener("abort",o,{once:!0})),l)}),t}var Eo,qr,Es,ey,iS=(ey=class extends Bs{constructor(){super();we(this,Eo);we(this,qr);we(this,Es);de(this,Es,r=>{if(!Do&&window.addEventListener){const o=()=>r();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){I(this,qr)||this.setEventListener(I(this,Es))}onUnsubscribe(){var r;this.hasListeners()||((r=I(this,qr))==null||r.call(this),de(this,qr,void 0))}setEventListener(r){var o;de(this,Es,r),(o=I(this,qr))==null||o.call(this),de(this,qr,r(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(r){I(this,Eo)!==r&&(de(this,Eo,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(o=>{o(r)})}isFocused(){var r;return typeof I(this,Eo)=="boolean"?I(this,Eo):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Eo=new WeakMap,qr=new WeakMap,Es=new WeakMap,ey),Ef=new iS;function Ld(){let t,r;const o=new Promise((l,c)=>{t=l,r=c});o.status="pending",o.catch(()=>{});function a(l){Object.assign(o,l),delete o.resolve,delete o.reject}return o.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},o.reject=l=>{a({status:"rejected",reason:l}),r(l)},o}var lS=eS;function cS(){let t=[],r=0,o=h=>{h()},a=h=>{h()},l=lS;const c=h=>{r?t.push(h):l(()=>{o(h)})},f=()=>{const h=t;t=[],h.length&&l(()=>{a(()=>{h.forEach(g=>{o(g)})})})};return{batch:h=>{let g;r++;try{g=h()}finally{r--,r||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{o=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{l=h}}}var ct=cS(),Ns,Gr,Ps,ty,uS=(ty=class extends Bs{constructor(){super();we(this,Ns,!0);we(this,Gr);we(this,Ps);de(this,Ps,r=>{if(!Do&&window.addEventListener){const o=()=>r(!0),a=()=>r(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a)}}})}onSubscribe(){I(this,Gr)||this.setEventListener(I(this,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=I(this,Gr))==null||r.call(this),de(this,Gr,void 0))}setEventListener(r){var o;de(this,Ps,r),(o=I(this,Gr))==null||o.call(this),de(this,Gr,r(this.setOnline.bind(this)))}setOnline(r){I(this,Ns)!==r&&(de(this,Ns,r),this.listeners.forEach(a=>{a(r)}))}isOnline(){return I(this,Ns)}},Ns=new WeakMap,Gr=new WeakMap,Ps=new WeakMap,ty),Kl=new uS;function dS(t){return Math.min(1e3*2**t,3e4)}function Oy(t){return(t??"online")==="online"?Kl.isOnline():!0}var zd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function _y(t){let r=!1,o=0,a;const l=Ld(),c=()=>l.status!=="pending",f=v=>{var C;if(!c()){const R=new zd(v);k(R),(C=t.onCancel)==null||C.call(t,R)}},h=()=>{r=!0},g=()=>{r=!1},y=()=>Ef.isFocused()&&(t.networkMode==="always"||Kl.isOnline())&&t.canRun(),x=()=>Oy(t.networkMode)&&t.canRun(),b=v=>{c()||(a==null||a(),l.resolve(v))},k=v=>{c()||(a==null||a(),l.reject(v))},w=()=>new Promise(v=>{var C;a=R=>{(c()||y())&&v(R)},(C=t.onPause)==null||C.call(t)}).then(()=>{var v;a=void 0,c()||(v=t.onContinue)==null||v.call(t)}),N=()=>{if(c())return;let v;const C=o===0?t.initialPromise:void 0;try{v=C??t.fn()}catch(R){v=Promise.reject(R)}Promise.resolve(v).then(b).catch(R=>{var B;if(c())return;const j=t.retry??(Do?0:3),P=t.retryDelay??dS,A=typeof P=="function"?P(o,R):P,$=j===!0||typeof j=="number"&&o<j||typeof j=="function"&&j(o,R);if(r||!$){k(R);return}o++,(B=t.onFail)==null||B.call(t,o,R),rS(A).then(()=>y()?void 0:w()).then(()=>{r?k(R):N()})})};return{promise:l,status:()=>l.status,cancel:f,continue:()=>(a==null||a(),l),cancelRetry:h,continueRetry:g,canStart:x,start:()=>(x()?N():w().then(N),l)}}var No,ny,Fy=(ny=class{constructor(){we(this,No)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Md(this.gcTime)&&de(this,No,Co.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Do?1/0:300*1e3))}clearGcTimeout(){I(this,No)&&(Co.clearTimeout(I(this,No)),de(this,No,void 0))}},No=new WeakMap,ny),Po,Rs,on,Ro,ht,qa,jo,Sn,ir,ry,fS=(ry=class extends Fy{constructor(r){super();we(this,Sn);we(this,Po);we(this,Rs);we(this,on);we(this,Ro);we(this,ht);we(this,qa);we(this,jo);de(this,jo,!1),de(this,qa,r.defaultOptions),this.setOptions(r.options),this.observers=[],de(this,Ro,r.client),de(this,on,I(this,Ro).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,de(this,Po,eg(this.options)),this.state=r.state??I(this,Po),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=I(this,ht))==null?void 0:r.promise}setOptions(r){if(this.options={...I(this,qa),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=eg(this.options);o.data!==void 0&&(this.setState(Zm(o.data,o.dataUpdatedAt)),de(this,Po,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,on).remove(this)}setData(r,o){const a=Ad(this.state.data,r,this.options);return je(this,Sn,ir).call(this,{data:a,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),a}setState(r,o){je(this,Sn,ir).call(this,{type:"setState",state:r,setStateOptions:o})}cancel(r){var a,l;const o=(a=I(this,ht))==null?void 0:a.promise;return(l=I(this,ht))==null||l.cancel(r),o?o.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(I(this,Po))}isActive(){return this.observers.some(r=>sn(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>no(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:!Ly(this.state.dataUpdatedAt,r)}onFocus(){var o;const r=this.observers.find(a=>a.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(o=I(this,ht))==null||o.continue()}onOnline(){var o;const r=this.observers.find(a=>a.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(o=I(this,ht))==null||o.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),I(this,on).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(o=>o!==r),this.observers.length||(I(this,ht)&&(I(this,jo)?I(this,ht).cancel({revert:!0}):I(this,ht).cancelRetry()),this.scheduleGc()),I(this,on).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,Sn,ir).call(this,{type:"invalidate"})}async fetch(r,o){var g,y,x,b,k,w,N,v,C,R,j,P;if(this.state.fetchStatus!=="idle"&&((g=I(this,ht))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(I(this,ht))return I(this,ht).continueRetry(),I(this,ht).promise}if(r&&this.setOptions(r),!this.options.queryFn){const A=this.observers.find($=>$.options.queryFn);A&&this.setOptions(A.options)}const a=new AbortController,l=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(de(this,jo,!0),a.signal)})},c=()=>{const A=Dy(this.options,o),B=(()=>{const H={client:I(this,Ro),queryKey:this.queryKey,meta:this.meta};return l(H),H})();return de(this,jo,!1),this.options.persister?this.options.persister(A,B,this):A(B)},h=(()=>{const A={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:I(this,Ro),state:this.state,fetchFn:c};return l(A),A})();(y=this.options.behavior)==null||y.onFetch(h,this),de(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=h.fetchOptions)==null?void 0:x.meta))&&je(this,Sn,ir).call(this,{type:"fetch",meta:(b=h.fetchOptions)==null?void 0:b.meta}),de(this,ht,_y({initialPromise:o==null?void 0:o.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof zd&&A.revert&&this.setState({...I(this,Rs),fetchStatus:"idle"}),a.abort()},onFail:(A,$)=>{je(this,Sn,ir).call(this,{type:"failed",failureCount:A,error:$})},onPause:()=>{je(this,Sn,ir).call(this,{type:"pause"})},onContinue:()=>{je(this,Sn,ir).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await I(this,ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(w=(k=I(this,on).config).onSuccess)==null||w.call(k,A,this),(v=(N=I(this,on).config).onSettled)==null||v.call(N,A,this.state.error,this),A}catch(A){if(A instanceof zd){if(A.silent)return I(this,ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw je(this,Sn,ir).call(this,{type:"error",error:A}),(R=(C=I(this,on).config).onError)==null||R.call(C,A,this),(P=(j=I(this,on).config).onSettled)==null||P.call(j,this.state.data,A,this),A}finally{this.scheduleGc()}}},Po=new WeakMap,Rs=new WeakMap,on=new WeakMap,Ro=new WeakMap,ht=new WeakMap,qa=new WeakMap,jo=new WeakMap,Sn=new WeakSet,ir=function(r){const o=a=>{switch(r.type){case"failed":return{...a,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Uy(a.data,this.options),fetchMeta:r.meta??null};case"success":const l={...a,...Zm(r.data,r.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,Rs,r.manual?l:void 0),l;case"error":const c=r.error;return{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...r.state}}};this.state=o(this.state),ct.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),I(this,on).notify({query:this,type:"updated",action:r})})},ry);function Uy(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oy(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Zm(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function eg(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,o=r!==void 0,a=o?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var Ut,Ae,Ga,Tt,To,js,lr,Yr,Ya,Ts,Ms,Mo,Io,Xr,Is,_e,Oa,Dd,Od,_d,Fd,Ud,$d,Bd,$y,oy,hS=(oy=class extends Bs{constructor(r,o){super();we(this,_e);we(this,Ut);we(this,Ae);we(this,Ga);we(this,Tt);we(this,To);we(this,js);we(this,lr);we(this,Yr);we(this,Ya);we(this,Ts);we(this,Ms);we(this,Mo);we(this,Io);we(this,Xr);we(this,Is,new Set);this.options=o,de(this,Ut,r),de(this,Yr,null),de(this,lr,Ld()),this.bindMethods(),this.setOptions(o)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,Ae).addObserver(this),tg(I(this,Ae),this.options)?je(this,_e,Oa).call(this):this.updateResult(),je(this,_e,Fd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wd(I(this,Ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wd(I(this,Ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,_e,Ud).call(this),je(this,_e,$d).call(this),I(this,Ae).removeObserver(this)}setOptions(r){const o=this.options,a=I(this,Ae);if(this.options=I(this,Ut).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof sn(this.options.enabled,I(this,Ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,_e,Bd).call(this),I(this,Ae).setOptions(this.options),o._defaulted&&!Vl(this.options,o)&&I(this,Ut).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,Ae),observer:this});const l=this.hasListeners();l&&ng(I(this,Ae),a,this.options,o)&&je(this,_e,Oa).call(this),this.updateResult(),l&&(I(this,Ae)!==a||sn(this.options.enabled,I(this,Ae))!==sn(o.enabled,I(this,Ae))||no(this.options.staleTime,I(this,Ae))!==no(o.staleTime,I(this,Ae)))&&je(this,_e,Dd).call(this);const c=je(this,_e,Od).call(this);l&&(I(this,Ae)!==a||sn(this.options.enabled,I(this,Ae))!==sn(o.enabled,I(this,Ae))||c!==I(this,Xr))&&je(this,_e,_d).call(this,c)}getOptimisticResult(r){const o=I(this,Ut).getQueryCache().build(I(this,Ut),r),a=this.createResult(o,r);return mS(this,a)&&(de(this,Tt,a),de(this,js,this.options),de(this,To,I(this,Ae).state)),a}getCurrentResult(){return I(this,Tt)}trackResult(r,o){return new Proxy(r,{get:(a,l)=>(this.trackProp(l),o==null||o(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,lr).status==="pending"&&I(this,lr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(r){I(this,Is).add(r)}getCurrentQuery(){return I(this,Ae)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const o=I(this,Ut).defaultQueryOptions(r),a=I(this,Ut).getQueryCache().build(I(this,Ut),o);return a.fetch().then(()=>this.createResult(a,o))}fetch(r){return je(this,_e,Oa).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,Tt)))}createResult(r,o){var W;const a=I(this,Ae),l=this.options,c=I(this,Tt),f=I(this,To),h=I(this,js),y=r!==a?r.state:I(this,Ga),{state:x}=r;let b={...x},k=!1,w;if(o._optimisticResults){const Y=this.hasListeners(),_=!Y&&tg(r,o),O=Y&&ng(r,a,o,l);(_||O)&&(b={...b,...Uy(x.data,r.options)}),o._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:N,errorUpdatedAt:v,status:C}=b;w=b.data;let R=!1;if(o.placeholderData!==void 0&&w===void 0&&C==="pending"){let Y;c!=null&&c.isPlaceholderData&&o.placeholderData===(h==null?void 0:h.placeholderData)?(Y=c.data,R=!0):Y=typeof o.placeholderData=="function"?o.placeholderData((W=I(this,Ms))==null?void 0:W.state.data,I(this,Ms)):o.placeholderData,Y!==void 0&&(C="success",w=Ad(c==null?void 0:c.data,Y,o),k=!0)}if(o.select&&w!==void 0&&!R)if(c&&w===(f==null?void 0:f.data)&&o.select===I(this,Ya))w=I(this,Ts);else try{de(this,Ya,o.select),w=o.select(w),w=Ad(c==null?void 0:c.data,w,o),de(this,Ts,w),de(this,Yr,null)}catch(Y){de(this,Yr,Y)}I(this,Yr)&&(N=I(this,Yr),w=I(this,Ts),v=Date.now(),C="error");const j=b.fetchStatus==="fetching",P=C==="pending",A=C==="error",$=P&&j,B=w!==void 0,X={status:C,fetchStatus:b.fetchStatus,isPending:P,isSuccess:C==="success",isError:A,isInitialLoading:$,isLoading:$,data:w,dataUpdatedAt:b.dataUpdatedAt,error:N,errorUpdatedAt:v,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>y.dataUpdateCount||b.errorUpdateCount>y.errorUpdateCount,isFetching:j,isRefetching:j&&!P,isLoadingError:A&&!B,isPaused:b.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:A&&B,isStale:Nf(r,o),refetch:this.refetch,promise:I(this,lr),isEnabled:sn(o.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Y=X.data!==void 0,_=X.status==="error"&&!Y,O=G=>{_?G.reject(X.error):Y&&G.resolve(X.data)},Z=()=>{const G=de(this,lr,X.promise=Ld());O(G)},ee=I(this,lr);switch(ee.status){case"pending":r.queryHash===a.queryHash&&O(ee);break;case"fulfilled":(_||X.data!==ee.value)&&Z();break;case"rejected":(!_||X.error!==ee.reason)&&Z();break}}return X}updateResult(){const r=I(this,Tt),o=this.createResult(I(this,Ae),this.options);if(de(this,To,I(this,Ae).state),de(this,js,this.options),I(this,To).data!==void 0&&de(this,Ms,I(this,Ae)),Vl(o,r))return;de(this,Tt,o);const a=()=>{if(!r)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!I(this,Is).size)return!0;const f=new Set(c??I(this,Is));return this.options.throwOnError&&f.add("error"),Object.keys(I(this,Tt)).some(h=>{const g=h;return I(this,Tt)[g]!==r[g]&&f.has(g)})};je(this,_e,$y).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,_e,Fd).call(this)}},Ut=new WeakMap,Ae=new WeakMap,Ga=new WeakMap,Tt=new WeakMap,To=new WeakMap,js=new WeakMap,lr=new WeakMap,Yr=new WeakMap,Ya=new WeakMap,Ts=new WeakMap,Ms=new WeakMap,Mo=new WeakMap,Io=new WeakMap,Xr=new WeakMap,Is=new WeakMap,_e=new WeakSet,Oa=function(r){je(this,_e,Bd).call(this);let o=I(this,Ae).fetch(this.options,r);return r!=null&&r.throwOnError||(o=o.catch(Mt)),o},Dd=function(){je(this,_e,Ud).call(this);const r=no(this.options.staleTime,I(this,Ae));if(Do||I(this,Tt).isStale||!Md(r))return;const a=Ly(I(this,Tt).dataUpdatedAt,r)+1;de(this,Mo,Co.setTimeout(()=>{I(this,Tt).isStale||this.updateResult()},a))},Od=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,Ae)):this.options.refetchInterval)??!1},_d=function(r){je(this,_e,$d).call(this),de(this,Xr,r),!(Do||sn(this.options.enabled,I(this,Ae))===!1||!Md(I(this,Xr))||I(this,Xr)===0)&&de(this,Io,Co.setInterval(()=>{(this.options.refetchIntervalInBackground||Ef.isFocused())&&je(this,_e,Oa).call(this)},I(this,Xr)))},Fd=function(){je(this,_e,Dd).call(this),je(this,_e,_d).call(this,je(this,_e,Od).call(this))},Ud=function(){I(this,Mo)&&(Co.clearTimeout(I(this,Mo)),de(this,Mo,void 0))},$d=function(){I(this,Io)&&(Co.clearInterval(I(this,Io)),de(this,Io,void 0))},Bd=function(){const r=I(this,Ut).getQueryCache().build(I(this,Ut),this.options);if(r===I(this,Ae))return;const o=I(this,Ae);de(this,Ae,r),de(this,Ga,r.state),this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))},$y=function(r){ct.batch(()=>{r.listeners&&this.listeners.forEach(o=>{o(I(this,Tt))}),I(this,Ut).getQueryCache().notify({query:I(this,Ae),type:"observerResultsUpdated"})})},oy);function pS(t,r){return sn(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function tg(t,r){return pS(t,r)||t.state.data!==void 0&&Wd(t,r,r.refetchOnMount)}function Wd(t,r,o){if(sn(r.enabled,t)!==!1&&no(r.staleTime,t)!=="static"){const a=typeof o=="function"?o(t):o;return a==="always"||a!==!1&&Nf(t,r)}return!1}function ng(t,r,o,a){return(t!==r||sn(a.enabled,t)===!1)&&(!o.suspense||t.state.status!=="error")&&Nf(t,o)}function Nf(t,r){return sn(r.enabled,t)!==!1&&t.isStaleByTime(no(r.staleTime,t))}function mS(t,r){return!Vl(t.getCurrentResult(),r)}function rg(t){return{onFetch:(r,o)=>{var x,b,k,w,N;const a=r.options,l=(k=(b=(x=r.fetchOptions)==null?void 0:x.meta)==null?void 0:b.fetchMore)==null?void 0:k.direction,c=((w=r.state.data)==null?void 0:w.pages)||[],f=((N=r.state.data)==null?void 0:N.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const y=async()=>{let v=!1;const C=P=>{aS(P,()=>r.signal,()=>v=!0)},R=Dy(r.options,r.fetchOptions),j=async(P,A,$)=>{if(v)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const H=(()=>{const _={client:r.client,queryKey:r.queryKey,pageParam:A,direction:$?"backward":"forward",meta:r.options.meta};return C(_),_})(),X=await R(H),{maxPages:W}=r.options,Y=$?sS:oS;return{pages:Y(P.pages,X,W),pageParams:Y(P.pageParams,A,W)}};if(l&&c.length){const P=l==="backward",A=P?gS:og,$={pages:c,pageParams:f},B=A(a,$);h=await j($,B,P)}else{const P=t??c.length;do{const A=g===0?f[0]??a.initialPageParam:og(a,h);if(g>0&&A==null)break;h=await j(h,A),g++}while(g<P)}return h};r.options.persister?r.fetchFn=()=>{var v,C;return(C=(v=r.options).persister)==null?void 0:C.call(v,y,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o)}:r.fetchFn=y}}}function og(t,{pages:r,pageParams:o}){const a=r.length-1;return r.length>0?t.getNextPageParam(r[a],r,o[a],o):void 0}function gS(t,{pages:r,pageParams:o}){var a;return r.length>0?(a=t.getPreviousPageParam)==null?void 0:a.call(t,r[0],r,o[0],o):void 0}var Xa,Bn,kt,Ao,Wn,Vr,sy,yS=(sy=class extends Fy{constructor(r){super();we(this,Wn);we(this,Xa);we(this,Bn);we(this,kt);we(this,Ao);de(this,Xa,r.client),this.mutationId=r.mutationId,de(this,kt,r.mutationCache),de(this,Bn,[]),this.state=r.state||By(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){I(this,Bn).includes(r)||(I(this,Bn).push(r),this.clearGcTimeout(),I(this,kt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){de(this,Bn,I(this,Bn).filter(o=>o!==r)),this.scheduleGc(),I(this,kt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){I(this,Bn).length||(this.state.status==="pending"?this.scheduleGc():I(this,kt).remove(this))}continue(){var r;return((r=I(this,Ao))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var f,h,g,y,x,b,k,w,N,v,C,R,j,P,A,$,B,H;const o=()=>{je(this,Wn,Vr).call(this,{type:"continue"})},a={client:I(this,Xa),meta:this.options.meta,mutationKey:this.options.mutationKey};de(this,Ao,_y({fn:()=>this.options.mutationFn?this.options.mutationFn(r,a):Promise.reject(new Error("No mutationFn found")),onFail:(X,W)=>{je(this,Wn,Vr).call(this,{type:"failed",failureCount:X,error:W})},onPause:()=>{je(this,Wn,Vr).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,kt).canRun(this)}));const l=this.state.status==="pending",c=!I(this,Ao).canStart();try{if(l)o();else{je(this,Wn,Vr).call(this,{type:"pending",variables:r,isPaused:c}),I(this,kt).config.onMutate&&await I(this,kt).config.onMutate(r,this,a);const W=await((h=(f=this.options).onMutate)==null?void 0:h.call(f,r,a));W!==this.state.context&&je(this,Wn,Vr).call(this,{type:"pending",context:W,variables:r,isPaused:c})}const X=await I(this,Ao).start();return await((y=(g=I(this,kt).config).onSuccess)==null?void 0:y.call(g,X,r,this.state.context,this,a)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,X,r,this.state.context,a)),await((w=(k=I(this,kt).config).onSettled)==null?void 0:w.call(k,X,null,this.state.variables,this.state.context,this,a)),await((v=(N=this.options).onSettled)==null?void 0:v.call(N,X,null,r,this.state.context,a)),je(this,Wn,Vr).call(this,{type:"success",data:X}),X}catch(X){try{await((R=(C=I(this,kt).config).onError)==null?void 0:R.call(C,X,r,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await((P=(j=this.options).onError)==null?void 0:P.call(j,X,r,this.state.context,a))}catch(W){Promise.reject(W)}try{await(($=(A=I(this,kt).config).onSettled)==null?void 0:$.call(A,void 0,X,this.state.variables,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await((H=(B=this.options).onSettled)==null?void 0:H.call(B,void 0,X,r,this.state.context,a))}catch(W){Promise.reject(W)}throw je(this,Wn,Vr).call(this,{type:"error",error:X}),X}finally{I(this,kt).runNext(this)}}},Xa=new WeakMap,Bn=new WeakMap,kt=new WeakMap,Ao=new WeakMap,Wn=new WeakSet,Vr=function(r){const o=a=>{switch(r.type){case"failed":return{...a,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:r.error,failureCount:a.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=o(this.state),ct.batch(()=>{I(this,Bn).forEach(a=>{a.onMutationUpdate(r)}),I(this,kt).notify({mutation:this,type:"updated",action:r})})},sy);function By(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,kn,Ja,ay,vS=(ay=class extends Bs{constructor(r={}){super();we(this,cr);we(this,kn);we(this,Ja);this.config=r,de(this,cr,new Set),de(this,kn,new Map),de(this,Ja,0)}build(r,o,a){const l=new yS({client:r,mutationCache:this,mutationId:++xl(this,Ja)._,options:r.defaultMutationOptions(o),state:a});return this.add(l),l}add(r){I(this,cr).add(r);const o=Sl(r);if(typeof o=="string"){const a=I(this,kn).get(o);a?a.push(r):I(this,kn).set(o,[r])}this.notify({type:"added",mutation:r})}remove(r){if(I(this,cr).delete(r)){const o=Sl(r);if(typeof o=="string"){const a=I(this,kn).get(o);if(a)if(a.length>1){const l=a.indexOf(r);l!==-1&&a.splice(l,1)}else a[0]===r&&I(this,kn).delete(o)}}this.notify({type:"removed",mutation:r})}canRun(r){const o=Sl(r);if(typeof o=="string"){const a=I(this,kn).get(o),l=a==null?void 0:a.find(c=>c.state.status==="pending");return!l||l===r}else return!0}runNext(r){var a;const o=Sl(r);if(typeof o=="string"){const l=(a=I(this,kn).get(o))==null?void 0:a.find(c=>c!==r&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{I(this,cr).forEach(r=>{this.notify({type:"removed",mutation:r})}),I(this,cr).clear(),I(this,kn).clear()})}getAll(){return Array.from(I(this,cr))}find(r){const o={exact:!0,...r};return this.getAll().find(a=>Ym(o,a))}findAll(r={}){return this.getAll().filter(o=>Ym(r,o))}notify(r){ct.batch(()=>{this.listeners.forEach(o=>{o(r)})})}resumePausedMutations(){const r=this.getAll().filter(o=>o.state.isPaused);return ct.batch(()=>Promise.all(r.map(o=>o.continue().catch(Mt))))}},cr=new WeakMap,kn=new WeakMap,Ja=new WeakMap,ay);function Sl(t){var r;return(r=t.options.scope)==null?void 0:r.id}var ur,Jr,$t,dr,pr,zl,Hd,iy,xS=(iy=class extends Bs{constructor(o,a){super();we(this,pr);we(this,ur);we(this,Jr);we(this,$t);we(this,dr);de(this,ur,o),this.setOptions(a),this.bindMethods(),je(this,pr,zl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){var l;const a=this.options;this.options=I(this,ur).defaultMutationOptions(o),Vl(this.options,a)||I(this,ur).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,$t),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Oo(a.mutationKey)!==Oo(this.options.mutationKey)?this.reset():((l=I(this,$t))==null?void 0:l.state.status)==="pending"&&I(this,$t).setOptions(this.options)}onUnsubscribe(){var o;this.hasListeners()||(o=I(this,$t))==null||o.removeObserver(this)}onMutationUpdate(o){je(this,pr,zl).call(this),je(this,pr,Hd).call(this,o)}getCurrentResult(){return I(this,Jr)}reset(){var o;(o=I(this,$t))==null||o.removeObserver(this),de(this,$t,void 0),je(this,pr,zl).call(this),je(this,pr,Hd).call(this)}mutate(o,a){var l;return de(this,dr,a),(l=I(this,$t))==null||l.removeObserver(this),de(this,$t,I(this,ur).getMutationCache().build(I(this,ur),this.options)),I(this,$t).addObserver(this),I(this,$t).execute(o)}},ur=new WeakMap,Jr=new WeakMap,$t=new WeakMap,dr=new WeakMap,pr=new WeakSet,zl=function(){var a;const o=((a=I(this,$t))==null?void 0:a.state)??By();de(this,Jr,{...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset})},Hd=function(o){ct.batch(()=>{var a,l,c,f,h,g,y,x;if(I(this,dr)&&this.hasListeners()){const b=I(this,Jr).variables,k=I(this,Jr).context,w={client:I(this,ur),meta:this.options.meta,mutationKey:this.options.mutationKey};if((o==null?void 0:o.type)==="success"){try{(l=(a=I(this,dr)).onSuccess)==null||l.call(a,o.data,b,k,w)}catch(N){Promise.reject(N)}try{(f=(c=I(this,dr)).onSettled)==null||f.call(c,o.data,null,b,k,w)}catch(N){Promise.reject(N)}}else if((o==null?void 0:o.type)==="error"){try{(g=(h=I(this,dr)).onError)==null||g.call(h,o.error,b,k,w)}catch(N){Promise.reject(N)}try{(x=(y=I(this,dr)).onSettled)==null||x.call(y,void 0,o.error,b,k,w)}catch(N){Promise.reject(N)}}}this.listeners.forEach(b=>{b(I(this,Jr))})})},iy),Hn,ly,wS=(ly=class extends Bs{constructor(r={}){super();we(this,Hn);this.config=r,de(this,Hn,new Map)}build(r,o,a){const l=o.queryKey,c=o.queryHash??Sf(l,o);let f=this.get(c);return f||(f=new fS({client:r,queryKey:l,queryHash:c,options:r.defaultQueryOptions(o),state:a,defaultOptions:r.getQueryDefaults(l)}),this.add(f)),f}add(r){I(this,Hn).has(r.queryHash)||(I(this,Hn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const o=I(this,Hn).get(r.queryHash);o&&(r.destroy(),o===r&&I(this,Hn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){ct.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return I(this,Hn).get(r)}getAll(){return[...I(this,Hn).values()]}find(r){const o={exact:!0,...r};return this.getAll().find(a=>Gm(o,a))}findAll(r={}){const o=this.getAll();return Object.keys(r).length>0?o.filter(a=>Gm(r,a)):o}notify(r){ct.batch(()=>{this.listeners.forEach(o=>{o(r)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Hn=new WeakMap,ly),tt,Zr,eo,As,Ls,to,zs,Ds,cy,bS=(cy=class{constructor(t={}){we(this,tt);we(this,Zr);we(this,eo);we(this,As);we(this,Ls);we(this,to);we(this,zs);we(this,Ds);de(this,tt,t.queryCache||new wS),de(this,Zr,t.mutationCache||new vS),de(this,eo,t.defaultOptions||{}),de(this,As,new Map),de(this,Ls,new Map),de(this,to,0)}mount(){xl(this,to)._++,I(this,to)===1&&(de(this,zs,Ef.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,tt).onFocus())})),de(this,Ds,Kl.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,tt).onOnline())})))}unmount(){var t,r;xl(this,to)._--,I(this,to)===0&&((t=I(this,zs))==null||t.call(this),de(this,zs,void 0),(r=I(this,Ds))==null||r.call(this),de(this,Ds,void 0))}isFetching(t){return I(this,tt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return I(this,Zr).findAll({...t,status:"pending"}).length}getQueryData(t){var o;const r=this.defaultQueryOptions({queryKey:t});return(o=I(this,tt).get(r.queryHash))==null?void 0:o.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),o=I(this,tt).build(this,r),a=o.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&o.isStaleByTime(no(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(a))}getQueriesData(t){return I(this,tt).findAll(t).map(({queryKey:r,state:o})=>{const a=o.data;return[r,a]})}setQueryData(t,r,o){const a=this.defaultQueryOptions({queryKey:t}),l=I(this,tt).get(a.queryHash),c=l==null?void 0:l.state.data,f=tS(r,c);if(f!==void 0)return I(this,tt).build(this,a).setData(f,{...o,manual:!0})}setQueriesData(t,r,o){return ct.batch(()=>I(this,tt).findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,r,o)]))}getQueryState(t){var o;const r=this.defaultQueryOptions({queryKey:t});return(o=I(this,tt).get(r.queryHash))==null?void 0:o.state}removeQueries(t){const r=I(this,tt);ct.batch(()=>{r.findAll(t).forEach(o=>{r.remove(o)})})}resetQueries(t,r){const o=I(this,tt);return ct.batch(()=>(o.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const o={revert:!0,...r},a=ct.batch(()=>I(this,tt).findAll(t).map(l=>l.cancel(o)));return Promise.all(a).then(Mt).catch(Mt)}invalidateQueries(t,r={}){return ct.batch(()=>(I(this,tt).findAll(t).forEach(o=>{o.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},r)))}refetchQueries(t,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},a=ct.batch(()=>I(this,tt).findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,o);return o.throwOnError||(c=c.catch(Mt)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Mt)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const o=I(this,tt).build(this,r);return o.isStaleByTime(no(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mt).catch(Mt)}fetchInfiniteQuery(t){return t.behavior=rg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mt).catch(Mt)}ensureInfiniteQueryData(t){return t.behavior=rg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Kl.isOnline()?I(this,Zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,tt)}getMutationCache(){return I(this,Zr)}getDefaultOptions(){return I(this,eo)}setDefaultOptions(t){de(this,eo,t)}setQueryDefaults(t,r){I(this,As).set(Oo(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...I(this,As).values()],o={};return r.forEach(a=>{Ba(t,a.queryKey)&&Object.assign(o,a.defaultOptions)}),o}setMutationDefaults(t,r){I(this,Ls).set(Oo(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...I(this,Ls).values()],o={};return r.forEach(a=>{Ba(t,a.mutationKey)&&Object.assign(o,a.defaultOptions)}),o}defaultQueryOptions(t){if(t._defaulted)return t;const r={...I(this,eo).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Sf(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===kf&&(r.enabled=!1),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...I(this,eo).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){I(this,tt).clear(),I(this,Zr).clear()}},tt=new WeakMap,Zr=new WeakMap,eo=new WeakMap,As=new WeakMap,Ls=new WeakMap,to=new WeakMap,zs=new WeakMap,Ds=new WeakMap,cy),Wy=m.createContext(void 0),Yt=t=>{const r=m.useContext(Wy);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},SS=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),u.jsx(Wy.Provider,{value:t,children:r})),Hy=m.createContext(!1),kS=()=>m.useContext(Hy);Hy.Provider;function CS(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ES=m.createContext(CS()),NS=()=>m.useContext(ES),PS=(t,r,o)=>{const a=o!=null&&o.state.error&&typeof t.throwOnError=="function"?Cf(t.throwOnError,[o.state.error,o]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(r.isReset()||(t.retryOnMount=!1))},RS=t=>{m.useEffect(()=>{t.clearReset()},[t])},jS=({result:t,errorResetBoundary:r,throwOnError:o,query:a,suspense:l})=>t.isError&&!r.isReset()&&!t.isFetching&&a&&(l&&t.data===void 0||Cf(o,[t.error,a])),TS=t=>{if(t.suspense){const o=l=>l==="static"?l:Math.max(l??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...l)=>o(a(...l)):o(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},MS=(t,r)=>t.isLoading&&t.isFetching&&!r,IS=(t,r)=>(t==null?void 0:t.suspense)&&r.isPending,sg=(t,r,o)=>r.fetchOptimistic(t).catch(()=>{o.clearReset()});function AS(t,r,o){var k,w,N,v;const a=kS(),l=NS(),c=Yt(),f=c.defaultQueryOptions(t);(w=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||w.call(k,f);const h=c.getQueryCache().get(f.queryHash);f._optimisticResults=a?"isRestoring":"optimistic",TS(f),PS(f,l,h),RS(l);const g=!c.getQueryCache().get(f.queryHash),[y]=m.useState(()=>new r(c,f)),x=y.getOptimisticResult(f),b=!a&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(C=>{const R=b?y.subscribe(ct.batchCalls(C)):Mt;return y.updateResult(),R},[y,b]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),m.useEffect(()=>{y.setOptions(f)},[f,y]),IS(f,x))throw sg(f,y,l);if(jS({result:x,errorResetBoundary:l,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw x.error;if((v=(N=c.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||v.call(N,f,x),f.experimental_prefetchInRender&&!Do&&MS(x,a)){const C=g?sg(f,y,l):h==null?void 0:h.promise;C==null||C.catch(Mt).finally(()=>{y.updateResult()})}return f.notifyOnChangeProps?x:y.trackResult(x)}function ao(t,r){return AS(t,hS)}function an(t,r){const o=Yt(),[a]=m.useState(()=>new xS(o,t));m.useEffect(()=>{a.setOptions(t)},[a,t]);const l=m.useSyncExternalStore(m.useCallback(f=>a.subscribe(ct.batchCalls(f)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=m.useCallback((f,h)=>{a.mutate(f,h).catch(Mt)},[a]);if(l.error&&Cf(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function Vy(t){var r,o,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(o=Vy(t[r]))&&(a&&(a+=" "),a+=o)}else for(o in t)t[o]&&(a&&(a+=" "),a+=o);return a}function Ky(){for(var t,r,o=0,a="",l=arguments.length;o<l;o++)(t=arguments[o])&&(r=Vy(t))&&(a&&(a+=" "),a+=r);return a}const Pf="-",LS=t=>{const r=DS(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:f=>{const h=f.split(Pf);return h[0]===""&&h.length!==1&&h.shift(),Qy(h,r)||zS(f)},getConflictingClassGroupIds:(f,h)=>{const g=o[f]||[];return h&&a[f]?[...g,...a[f]]:g}}},Qy=(t,r)=>{var f;if(t.length===0)return r.classGroupId;const o=t[0],a=r.nextPart.get(o),l=a?Qy(t.slice(1),a):void 0;if(l)return l;if(r.validators.length===0)return;const c=t.join(Pf);return(f=r.validators.find(({validator:h})=>h(c)))==null?void 0:f.classGroupId},ag=/^\[(.+)\]$/,zS=t=>{if(ag.test(t)){const r=ag.exec(t)[1],o=r==null?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},DS=t=>{const{theme:r,prefix:o}=t,a={nextPart:new Map,validators:[]};return _S(Object.entries(t.classGroups),o).forEach(([c,f])=>{Vd(f,a,c,r)}),a},Vd=(t,r,o,a)=>{t.forEach(l=>{if(typeof l=="string"){const c=l===""?r:ig(r,l);c.classGroupId=o;return}if(typeof l=="function"){if(OS(l)){Vd(l(a),r,o,a);return}r.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([c,f])=>{Vd(f,ig(r,c),o,a)})})},ig=(t,r)=>{let o=t;return r.split(Pf).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},OS=t=>t.isThemeGetter,_S=(t,r)=>r?t.map(([o,a])=>{const l=a.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([f,h])=>[r+f,h])):c);return[o,l]}):t,FS=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,a=new Map;const l=(c,f)=>{o.set(c,f),r++,r>t&&(r=0,a=o,o=new Map)};return{get(c){let f=o.get(c);if(f!==void 0)return f;if((f=a.get(c))!==void 0)return l(c,f),f},set(c,f){o.has(c)?o.set(c,f):l(c,f)}}},qy="!",US=t=>{const{separator:r,experimentalParseClassName:o}=t,a=r.length===1,l=r[0],c=r.length,f=h=>{const g=[];let y=0,x=0,b;for(let C=0;C<h.length;C++){let R=h[C];if(y===0){if(R===l&&(a||h.slice(C,C+c)===r)){g.push(h.slice(x,C)),x=C+c;continue}if(R==="/"){b=C;continue}}R==="["?y++:R==="]"&&y--}const k=g.length===0?h:h.substring(x),w=k.startsWith(qy),N=w?k.substring(1):k,v=b&&b>x?b-x:void 0;return{modifiers:g,hasImportantModifier:w,baseClassName:N,maybePostfixModifierPosition:v}};return o?h=>o({className:h,parseClassName:f}):f},$S=t=>{if(t.length<=1)return t;const r=[];let o=[];return t.forEach(a=>{a[0]==="["?(r.push(...o.sort(),a),o=[]):o.push(a)}),r.push(...o.sort()),r},BS=t=>({cache:FS(t.cacheSize),parseClassName:US(t),...LS(t)}),WS=/\s+/,HS=(t,r)=>{const{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:l}=r,c=[],f=t.trim().split(WS);let h="";for(let g=f.length-1;g>=0;g-=1){const y=f[g],{modifiers:x,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:w}=o(y);let N=!!w,v=a(N?k.substring(0,w):k);if(!v){if(!N){h=y+(h.length>0?" "+h:h);continue}if(v=a(k),!v){h=y+(h.length>0?" "+h:h);continue}N=!1}const C=$S(x).join(":"),R=b?C+qy:C,j=R+v;if(c.includes(j))continue;c.push(j);const P=l(v,N);for(let A=0;A<P.length;++A){const $=P[A];c.push(R+$)}h=y+(h.length>0?" "+h:h)}return h};function VS(){let t=0,r,o,a="";for(;t<arguments.length;)(r=arguments[t++])&&(o=Gy(r))&&(a&&(a+=" "),a+=o);return a}const Gy=t=>{if(typeof t=="string")return t;let r,o="";for(let a=0;a<t.length;a++)t[a]&&(r=Gy(t[a]))&&(o&&(o+=" "),o+=r);return o};function KS(t,...r){let o,a,l,c=f;function f(g){const y=r.reduce((x,b)=>b(x),t());return o=BS(y),a=o.cache.get,l=o.cache.set,c=h,h(g)}function h(g){const y=a(g);if(y)return y;const x=HS(g,o);return l(g,x),x}return function(){return c(VS.apply(null,arguments))}}const qe=t=>{const r=o=>o[t]||[];return r.isThemeGetter=!0,r},Yy=/^\[(?:([a-z-]+):)?(.+)\]$/i,QS=/^\d+\/\d+$/,qS=new Set(["px","full","screen"]),GS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YS=/\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$/,XS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=t=>ws(t)||qS.has(t)||QS.test(t),Wr=t=>Ws(t,"length",ik),ws=t=>!!t&&!Number.isNaN(Number(t)),gd=t=>Ws(t,"number",ws),za=t=>!!t&&Number.isInteger(Number(t)),ek=t=>t.endsWith("%")&&ws(t.slice(0,-1)),Re=t=>Yy.test(t),Hr=t=>GS.test(t),tk=new Set(["length","size","percentage"]),nk=t=>Ws(t,tk,Xy),rk=t=>Ws(t,"position",Xy),ok=new Set(["image","url"]),sk=t=>Ws(t,ok,ck),ak=t=>Ws(t,"",lk),Da=()=>!0,Ws=(t,r,o)=>{const a=Yy.exec(t);return a?a[1]?typeof r=="string"?a[1]===r:r.has(a[1]):o(a[2]):!1},ik=t=>YS.test(t)&&!XS.test(t),Xy=()=>!1,lk=t=>JS.test(t),ck=t=>ZS.test(t),uk=()=>{const t=qe("colors"),r=qe("spacing"),o=qe("blur"),a=qe("brightness"),l=qe("borderColor"),c=qe("borderRadius"),f=qe("borderSpacing"),h=qe("borderWidth"),g=qe("contrast"),y=qe("grayscale"),x=qe("hueRotate"),b=qe("invert"),k=qe("gap"),w=qe("gradientColorStops"),N=qe("gradientColorStopPositions"),v=qe("inset"),C=qe("margin"),R=qe("opacity"),j=qe("padding"),P=qe("saturate"),A=qe("scale"),$=qe("sepia"),B=qe("skew"),H=qe("space"),X=qe("translate"),W=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Re,r],O=()=>[Re,r],Z=()=>["",ar,Wr],ee=()=>["auto",ws,Re],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Re],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[ws,Re];return{cacheSize:500,separator:":",theme:{colors:[Da],spacing:[ar,Wr],blur:["none","",Hr,Re],brightness:M(),borderColor:[t],borderRadius:["none","","full",Hr,Re],borderSpacing:O(),borderWidth:Z(),contrast:M(),grayscale:q(),hueRotate:M(),invert:q(),gap:O(),gradientColorStops:[t],gradientColorStopPositions:[ek,Wr],inset:_(),margin:_(),opacity:M(),padding:O(),saturate:M(),scale:M(),sepia:q(),skew:M(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[Hr]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...G(),Re]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",za,Re]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",za,Re]}],"grid-cols":[{"grid-cols":[Da]}],"col-start-end":[{col:["auto",{span:["full",za,Re]},Re]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[Da]}],"row-start-end":[{row:["auto",{span:[za,Re]},Re]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,r]}],"min-w":[{"min-w":[Re,r,"min","max","fit"]}],"max-w":[{"max-w":[Re,r,"none","full","min","max","fit","prose",{screen:[Hr]},Hr]}],h:[{h:[Re,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Hr,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gd]}],"font-family":[{font:[Da]}],"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",Re]}],"line-clamp":[{"line-clamp":["none",ws,gd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,Wr]}],"underline-offset":[{"underline-offset":["auto",ar,Re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],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",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),rk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sk]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"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":[R]}],"border-style":[{border:[...ie(),"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":[R]}],"divide-style":[{divide:ie()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ar,Re]}],"outline-w":[{outline:[ar,Wr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[ar,Wr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Hr,ak]}],"shadow-color":[{shadow:[Da]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Hr,Re]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[b]}],saturate:[{saturate:[P]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[za,Re]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",t]}],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",Re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ar,Wr,gd]}],stroke:[{stroke:[t,"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"]}}},dk=KS(uk);function ge(...t){return dk(Ky(t))}const Jy="nextclaw.ui.language",lg=[{value:"en",label:"English"},{value:"zh",label:"中文"}],fk={en:"en-US",zh:"zh-CN"};let Wa="en",Kd=!1;const Qd=new Set;function hk(t){return t==="en"||t==="zh"}function pk(){var r;return typeof navigator>"u"?"en":(((r=navigator.language)==null?void 0:r.toLowerCase())??"en").startsWith("zh")?"zh":"en"}function mk(){if(typeof window>"u")return"en";try{const t=window.localStorage.getItem(Jy);if(hk(t))return t}catch{}return pk()}function Rf(){return Kd||(Wa=mk(),Kd=!0),Wa}function Hs(){return Kd?Wa:Rf()}function gk(t){if(Rf(),Wa!==t){if(Wa=t,typeof window<"u")try{window.localStorage.setItem(Jy,t)}catch{}Qd.forEach(r=>r(t))}}function yk(t){return Qd.add(t),()=>{Qd.delete(t)}}function jf(t=Hs()){return fk[t]}function Tf(t,r=Hs()){if(!t)return"-";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?typeof t=="string"?t:"-":o.toLocaleString(jf(r))}function vk(t,r=Hs()){if(!t)return"-";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?typeof t=="string"?t:"-":new Intl.DateTimeFormat(jf(r),{year:"numeric",month:"2-digit",day:"2-digit"}).format(o)}function Zy(t,r=Hs()){return new Intl.NumberFormat(jf(r)).format(t)}const cg={model:{zh:"模型",en:"Model"},providers:{zh:"提供商",en:"Providers"},channels:{zh:"渠道",en:"Channels"},cron:{zh:"定时任务",en:"Cron Jobs"},runtime:{zh:"路由与运行时",en:"Routing & Runtime"},marketplace:{zh:"市场",en:"Marketplace"},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"},confirm:{zh:"确认",en:"Confirm"},unchanged:{zh:"未修改",en:"Unchanged"},saving:{zh:"保存中...",en:"Saving..."},remove:{zh:"移除",en:"Remove"},all:{zh:"全部",en:"All"},prev:{zh:"上一页",en:"Prev"},next:{zh:"下一页",en:"Next"},language:{zh:"语言",en:"Language"},modelPageTitle:{zh:"模型配置",en:"Model Configuration"},modelPageDescription:{zh:"配置默认 AI 模型和运行参数限制",en:"Configure default AI model and runtime limits"},defaultModel:{zh:"默认模型",en:"Default Model"},workspace:{zh:"工作空间",en:"Workspace"},generationParameters:{zh:"生成参数",en:"Generation Parameters"},modelName:{zh:"模型",en:"Model"},maxTokens:{zh:"最大 Token 数",en:"Max Tokens"},maxToolIterations:{zh:"最大工具迭代次数",en:"Max Tool Iterations"},saveChanges:{zh:"保存变更",en:"Save Changes"},providersPageTitle:{zh:"AI 提供商",en:"AI Providers"},providersLoading:{zh:"加载中...",en:"Loading..."},providersTabConfigured:{zh:"已配置",en:"Configured"},providersTabAll:{zh:"全部提供商",en:"All Providers"},providersDefaultDescription:{zh:"为你的 Agent 配置 AI 服务",en:"Configure AI services for your agents"},providersEmptyTitle:{zh:"尚未配置提供商",en:"No providers configured"},providersEmptyDescription:{zh:"添加一个 AI 提供商后即可开始使用。",en:"Add an AI provider to start using the platform."},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"},providerFormDescription:{zh:"配置 AI 提供商的 API 密钥与参数",en:"Configure API keys and parameters for AI provider"},enterApiKey:{zh:"请输入 API 密钥",en:"Enter API Key"},leaveBlankToKeepUnchanged:{zh:"留空则保持不变",en:"Leave blank to keep unchanged"},channelsPageTitle:{zh:"消息渠道",en:"Message Channels"},channelsLoading:{zh:"加载渠道中...",en:"Loading channels..."},channelsTabEnabled:{zh:"已启用",en:"Enabled"},channelsTabAll:{zh:"全部渠道",en:"All Channels"},channelsEmptyTitle:{zh:"暂无启用渠道",en:"No channels enabled"},channelsEmptyDescription:{zh:"启用一个消息渠道以开始接收消息。",en:"Enable a messaging channel to start receiving messages."},channelDescriptionDefault:{zh:"配置该通信渠道",en:"Configure this communication channel"},channelDescTelegram:{zh:"连接 Telegram 机器人以进行即时消息收发",en:"Connect with Telegram bots for instant messaging"},channelDescSlack:{zh:"接入 Slack 工作区进行团队协作消息处理",en:"Integrate with Slack workspaces for team collaboration"},channelDescEmail:{zh:"通过邮件协议收发消息",en:"Send and receive messages via email protocols"},channelDescWebhook:{zh:"接收 HTTP Webhook 以支持自定义集成",en:"Receive HTTP webhooks for custom integrations"},channelDescDiscord:{zh:"将 Discord 机器人连接到你的社区服务器",en:"Connect Discord bots to your community servers"},channelDescFeishu:{zh:"企业消息与协作平台接入",en:"Enterprise messaging and collaboration platform"},configureMessageChannelParameters:{zh:"配置消息渠道参数",en:"Configure message channel parameters"},channelsGuideTitle:{zh:"查看指南",en:"View Guide"},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"},accountId:{zh:"账号 ID",en:"Account ID"},dmPolicy:{zh:"私聊策略",en:"DM Policy"},groupAllowFrom:{zh:"群组允许来源",en:"Group Allow From"},requireMention:{zh:"需要 @ 提及",en:"Require Mention"},mentionPatterns:{zh:"提及匹配规则",en:"Mention Patterns"},groupRulesJson:{zh:"群组规则(JSON)",en:"Group Rules (JSON)"},allowBotMessages:{zh:"允许机器人消息",en:"Allow Bot Messages"},attachmentMaxSizeMb:{zh:"附件最大体积(MB)",en:"Attachment Max Size (MB)"},streamingMode:{zh:"流式模式",en:"Streaming Mode"},draftChunkingJson:{zh:"草稿分块(JSON)",en:"Draft Chunking (JSON)"},textChunkLimit:{zh:"文本分块上限",en:"Text Chunk Limit"},invalidJson:{zh:"JSON 格式无效",en:"Invalid JSON"},runtimePageTitle:{zh:"路由与运行时",en:"Routing & Runtime"},runtimePageDescription:{zh:"对齐 OpenClaw 的多 Agent 路由:绑定规则、Agent 池、私聊范围。",en:"Align multi-agent routing with OpenClaw: bindings, agent pool, and DM scope."},runtimeLoading:{zh:"加载运行时配置中...",en:"Loading runtime settings..."},dmScope:{zh:"私聊范围",en:"DM Scope"},dmScopeHelp:{zh:"控制私聊会话如何隔离。",en:"Control how direct-message sessions are isolated."},defaultContextTokens:{zh:"默认上下文 Token",en:"Default Context Tokens"},defaultContextTokensHelp:{zh:"当 Agent 未设置单独值时使用该上下文预算。",en:"Input context budget for agents when no per-agent override is set."},maxPingPongTurns:{zh:"最大乒乓轮次",en:"Max Ping-Pong Turns"},maxPingPongTurnsHelp:{zh:"设为 0 可阻止 Agent 间自动 ping-pong。",en:"Set to 0 to block automatic agent-to-agent ping-pong loops."},agentList:{zh:"Agent 列表",en:"Agent List"},agentListHelp:{zh:"在同一个网关进程中运行多个固定角色 Agent。",en:"Run multiple fixed-role agents in one gateway process."},bindings:{zh:"绑定规则",en:"Bindings"},bindingsHelp:{zh:"根据渠道 + 账号 + 对端将入站消息路由到目标 Agent。",en:"Route inbound message by channel + account + peer to target agent."},agentIdRequiredError:{zh:"agents.list[{index}].id 必填",en:"agents.list[{index}].id is required"},duplicateAgentId:{zh:"重复的 agent id",en:"Duplicate agent id"},bindingAgentIdRequired:{zh:"bindings[{index}].agentId 必填",en:"bindings[{index}].agentId is required"},bindingAgentIdNotFound:{zh:"bindings[{index}].agentId 未在 agents.list/main 中找到",en:"bindings[{index}].agentId not found in agents.list/main"},bindingChannelRequired:{zh:"bindings[{index}].match.channel 必填",en:"bindings[{index}].match.channel is required"},bindingPeerIdRequired:{zh:"设置 peer.kind 时,bindings[{index}].match.peer.id 必填",en:"bindings[{index}].match.peer.id is required when peer.kind is set"},agentIdPlaceholder:{zh:"Agent ID(例如 engineer)",en:"Agent ID (e.g. engineer)"},workspaceOverridePlaceholder:{zh:"工作空间覆盖(可选)",en:"Workspace override (optional)"},modelOverridePlaceholder:{zh:"模型覆盖(可选)",en:"Model override (optional)"},maxTokensPlaceholder:{zh:"最大 tokens",en:"Max tokens"},contextTokensPlaceholder:{zh:"上下文 tokens",en:"Context tokens"},maxToolsPlaceholder:{zh:"最大工具次数",en:"Max tools"},defaultAgent:{zh:"默认 Agent",en:"Default agent"},addAgent:{zh:"添加 Agent",en:"Add Agent"},targetAgentIdPlaceholder:{zh:"目标 Agent ID",en:"Target agent ID"},channelPlaceholder:{zh:"渠道(例如 discord)",en:"Channel (e.g. discord)"},accountIdOptionalPlaceholder:{zh:"账号 ID(可选)",en:"Account ID (optional)"},peerKindOptional:{zh:"对端类型(可选)",en:"Peer kind (optional)"},peerIdPlaceholder:{zh:"对端 ID(需先设置对端类型)",en:"Peer ID (requires peer kind)"},addBinding:{zh:"添加绑定",en:"Add Binding"},saveRuntimeSettings:{zh:"保存运行时设置",en:"Save Runtime Settings"},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"},sessionsAllChannels:{zh:"全部渠道",en:"All Channels"},sessionsMetadata:{zh:"元信息",en:"Metadata"},sessionsNoSelectionTitle:{zh:"未选择会话",en:"No Session Selected"},sessionsNoSelectionDescription:{zh:"从左侧列表选择一个会话以查看聊天历史并配置其元信息。",en:"Select a session from the list on the left to view its chat history and configure its metadata."},cronPageTitle:{zh:"定时任务",en:"Cron Jobs"},cronPageDescription:{zh:"查看与删除定时任务,关注执行时间与状态。",en:"View and delete cron jobs, track schedule and status."},cronSearchPlaceholder:{zh:"搜索名称 / 消息 / ID",en:"Search name / message / ID"},cronStatusLabel:{zh:"状态",en:"Status"},cronStatusAll:{zh:"全部",en:"All"},cronStatusEnabled:{zh:"仅启用",en:"Enabled"},cronStatusDisabled:{zh:"仅禁用",en:"Disabled"},cronTotalLabel:{zh:"总数",en:"Total"},cronLoading:{zh:"加载定时任务中...",en:"Loading cron jobs..."},cronEmpty:{zh:"暂无定时任务。",en:"No cron jobs yet."},cronScheduleLabel:{zh:"计划",en:"Schedule"},cronDeliverTo:{zh:"投递到",en:"Deliver to"},cronNextRun:{zh:"下次执行",en:"Next run"},cronLastRun:{zh:"上次执行",en:"Last run"},cronLastStatus:{zh:"上次状态",en:"Last status"},cronDeleteConfirm:{zh:"确认删除定时任务",en:"Delete cron job"},cronOneShot:{zh:"一次性",en:"One-shot"},cronEnable:{zh:"启用",en:"Enable"},cronDisable:{zh:"禁用",en:"Disable"},cronRunNow:{zh:"立即执行",en:"Run now"},cronEnableConfirm:{zh:"确认启用定时任务",en:"Enable cron job"},cronDisableConfirm:{zh:"确认禁用定时任务",en:"Disable cron job"},cronRunConfirm:{zh:"确认立即执行定时任务",en:"Run cron job now"},cronRunForceConfirm:{zh:"任务已禁用,仍要立即执行",en:"Cron job disabled. Force run now"},marketplacePageTitle:{zh:"市场",en:"Marketplace"},marketplacePageDescription:{zh:"更清爽的扩展列表,聚焦安装/启用/禁用。",en:"A cleaner extension list focused on install / enable / disable."},marketplaceTabMarketplace:{zh:"市场",en:"Marketplace"},marketplaceTabInstalled:{zh:"已安装",en:"Installed"},marketplaceSearchPlaceholder:{zh:"搜索扩展...",en:"Search extensions..."},marketplaceFilterAll:{zh:"全部",en:"All"},marketplaceFilterPlugins:{zh:"插件",en:"Plugins"},marketplaceFilterSkills:{zh:"技能",en:"Skills"},marketplaceSortRelevance:{zh:"相关性",en:"Relevance"},marketplaceSortUpdated:{zh:"最近更新",en:"Recently Updated"},marketplaceUnknownItem:{zh:"未知项目",en:"Unknown Item"},marketplaceInstalledLocalSummary:{zh:"已在本地安装,市场暂无详情。",en:"Installed locally. Details are currently unavailable from marketplace."},marketplaceTypePlugin:{zh:"插件",en:"Plugin"},marketplaceTypeSkill:{zh:"技能",en:"Skill"},marketplaceTypeExtension:{zh:"扩展",en:"Extension"},marketplaceInstall:{zh:"安装",en:"Install"},marketplaceInstalling:{zh:"安装中...",en:"Installing..."},marketplaceEnable:{zh:"启用",en:"Enable"},marketplaceDisable:{zh:"禁用",en:"Disable"},marketplaceEnabling:{zh:"启用中...",en:"Enabling..."},marketplaceDisabling:{zh:"禁用中...",en:"Disabling..."},marketplaceUninstall:{zh:"卸载",en:"Uninstall"},marketplaceRemoving:{zh:"卸载中...",en:"Removing..."},marketplaceSectionInstalled:{zh:"已安装",en:"Installed"},marketplaceSectionExtensions:{zh:"扩展",en:"Extensions"},marketplaceErrorLoadingData:{zh:"加载市场数据失败",en:"Failed to load marketplace data"},marketplaceErrorLoadingInstalled:{zh:"加载已安装项目失败",en:"Failed to load installed items"},marketplaceNoItems:{zh:"未找到项目。",en:"No items found."},marketplaceNoInstalledItems:{zh:"未找到已安装项目。",en:"No installed items found."},marketplaceUninstallTitle:{zh:"确认卸载",en:"Uninstall"},marketplaceUninstallDescription:{zh:"该操作会移除扩展,后续可在市场中重新安装。",en:"This will remove the extension. You can install it again from the marketplace."},marketplaceInstallFailed:{zh:"安装失败",en:"Install failed"},marketplaceOperationFailed:{zh:"操作失败",en:"Operation failed"},marketplaceInstalledCountSuffix:{zh:"已安装",en:"installed"},connected:{zh:"已连接",en:"Connected"},disconnected:{zh:"未连接",en:"Disconnected"},connecting:{zh:"连接中...",en:"Connecting..."},feishuConnecting:{zh:"验证 / 连接中...",en:"Verifying / connecting..."},statusReady:{zh:"就绪",en:"Ready"},statusSetup:{zh:"待配置",en:"Setup"},statusActive:{zh:"活跃",en:"Active"},statusInactive:{zh:"未启用",en:"Inactive"},actionConfigure:{zh:"配置",en:"Configure"},actionAddProvider:{zh:"添加提供商",en:"Add Provider"},actionEnable:{zh:"启用",en:"Enable"},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"},docBrowserTitle:{zh:"帮助文档",en:"Help Docs"},docBrowserSearchPlaceholder:{zh:"搜索,也可以输入文档地址直接打开",en:"Search, or enter a doc URL to open"},docBrowserUrlPlaceholder:{zh:"输入文档路径,如 /guide/channels",en:"Enter a doc path, e.g. /guide/channels"},docBrowserOpenExternal:{zh:"文档中心打开",en:"Open in Docs"},docBrowserFloatMode:{zh:"悬浮窗口",en:"Float Window"},docBrowserDockMode:{zh:"固定到侧栏",en:"Dock to Sidebar"},docBrowserClose:{zh:"关闭",en:"Close"},docBrowserHelp:{zh:"帮助文档",en:"Help Docs"}};function E(t,r=Hs()){var o,a;return((o=cg[t])==null?void 0:o[r])||((a=cg[t])==null?void 0:a.en)||t}/**
51
+ Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let k=wr(),w;if(r){let P=typeof r=="string"?$s(r):r;Ye(x==="/"||((j=P.pathname)==null?void 0:j.startsWith(x)),`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 "${x}" but pathname "${P.pathname}" was given in the \`location\` prop.`),w=P}else w=k;let N=w.pathname||"/",v=N;if(x!=="/"){let P=x.replace(/^\//,"").split("/");v="/"+N.replace(/^\//,"").split("/").slice(P.length).join("/")}let C=my(t,{pathname:v});Cn(b||C!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Cn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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 R=fb(C&&C.map(P=>Object.assign({},P,{params:Object.assign({},g,P.params),pathname:hr([x,c.encodeLocation?c.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?x:hr([x,c.encodeLocation?c.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),f,o,a,l);return r&&R?m.createElement(ti.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},R):R}function lb(){let t=yb(),r=G1(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),o=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},c={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:c},"ErrorBoundary")," or"," ",m.createElement("code",{style:c},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},r),o?m.createElement("pre",{style:l},o):null,f)}var cb=m.createElement(lb,null),Py=class extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){this.props.onError?this.props.onError(t,r):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const o=ob(t.digest);o&&(t=o)}let r=t!==void 0?m.createElement(Gn.Provider,{value:this.props.routeContext},m.createElement(xf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?m.createElement(ub,{error:t},r):r}};Py.contextType=J1;var gd=new WeakMap;function ub({children:t,error:r}){let{basename:o}=m.useContext(Gt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=rb(r.digest);if(a){let l=gd.get(r);if(l)throw l;let c=xy(a.location,o);if(vy&&!gd.get(r))if(c.isExternal||a.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:a.replace}));throw gd.set(r,f),f}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function db({routeContext:t,match:r,children:o}){let a=m.useContext(Bs);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(Gn.Provider,{value:t},o)}function fb(t,r=[],o=null,a=null,l=null){if(t==null){if(!o)return null;if(o.errors)t=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let c=t,f=o==null?void 0:o.errors;if(f!=null){let x=c.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);Ye(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,g=-1;if(o)for(let x=0;x<c.length;x++){let b=c[x];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=x),b.route.id){let{loaderData:k,errors:w}=o,N=b.route.loader&&!k.hasOwnProperty(b.route.id)&&(!w||w[b.route.id]===void 0);if(b.route.lazy||N){h=!0,g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}let y=o&&a?(x,b)=>{var k,w;a(x,{location:o.location,params:((w=(k=o.matches)==null?void 0:k[0])==null?void 0:w.params)??{},unstable_pattern:Y1(o.matches),errorInfo:b})}:void 0;return c.reduceRight((x,b,k)=>{let w,N=!1,v=null,C=null;o&&(w=f&&b.route.id?f[b.route.id]:void 0,v=b.route.errorElement||cb,h&&(g<0&&k===0?(Ry("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):g===k&&(N=!0,C=b.route.hydrateFallbackElement||null)));let R=r.concat(c.slice(0,k+1)),j=()=>{let P;return w?P=v:N?P=C:b.route.Component?P=m.createElement(b.route.Component,null):b.route.element?P=b.route.element:P=x,m.createElement(db,{match:b,routeContext:{outlet:x,matches:R,isDataRoute:o!=null},children:P})};return o&&(b.route.ErrorBoundary||b.route.errorElement||k===0)?m.createElement(Py,{location:o.location,revalidation:o.revalidation,component:v,error:w,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:y}):j()},null)}function wf(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hb(t){let r=m.useContext(Bs);return Ye(r,wf(t)),r}function pb(t){let r=m.useContext(ac);return Ye(r,wf(t)),r}function mb(t){let r=m.useContext(Gn);return Ye(r,wf(t)),r}function bf(t){let r=mb(t),o=r.matches[r.matches.length-1];return Ye(o.route.id,`${t} can only be used on routes that contain a unique "id"`),o.route.id}function gb(){return bf("useRouteId")}function yb(){var a;let t=m.useContext(xf),r=pb("useRouteError"),o=bf("useRouteError");return t!==void 0?t:(a=r.errors)==null?void 0:a[o]}function vb(){let{router:t}=hb("useNavigate"),r=bf("useNavigate"),o=m.useRef(!1);return Cy(()=>{o.current=!0}),m.useCallback(async(l,c={})=>{Cn(o.current,ky),o.current&&(typeof l=="number"?await t.navigate(l):await t.navigate(l,{fromRouteId:r,...c}))},[t,r])}var qm={};function Ry(t,r,o){!r&&!qm[t]&&(qm[t]=!0,Cn(!1,o))}m.memo(xb);function xb({routes:t,future:r,state:o,onError:a}){return Ny(t,void 0,o,a,r)}function Gm({to:t,replace:r,state:o,relative:a}){Ye(Hs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=m.useContext(Gt);Cn(!l,"<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:c}=m.useContext(Gn),{pathname:f}=wr(),h=Ey(),g=vf(t,yf(c),f,a==="path"),y=JSON.stringify(g);return m.useEffect(()=>{h(JSON.parse(y),{replace:r,state:o,relative:a})},[h,y,a,r,o]),null}function $n(t){Ye(!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 wb({basename:t="/",children:r=null,location:o,navigationType:a="POP",navigator:l,static:c=!1,unstable_useTransitions:f}){Ye(!Hs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=m.useMemo(()=>({basename:h,navigator:l,static:c,unstable_useTransitions:f,future:{}}),[h,l,c,f]);typeof o=="string"&&(o=$s(o));let{pathname:y="/",search:x="",hash:b="",state:k=null,key:w="default"}=o,N=m.useMemo(()=>{let v=mr(y,h);return v==null?null:{location:{pathname:v,search:x,hash:b,state:k,key:w},navigationType:a}},[h,y,x,b,k,w,a]);return Cn(N!=null,`<Router basename="${h}"> is not able to match the URL "${y}${x}${b}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:m.createElement(Gt.Provider,{value:g},m.createElement(ti.Provider,{children:r,value:N}))}function bb({children:t,location:r}){return ib(Id(t),r)}function Id(t,r=[]){let o=[];return m.Children.forEach(t,(a,l)=>{if(!m.isValidElement(a))return;let c=[...r,l];if(a.type===m.Fragment){o.push.apply(o,Id(a.props.children,c));return}Ye(a.type===$n,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!a.props.index||!a.props.children,"An index route cannot have child routes.");let f={id:a.props.id||c.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(f.children=Id(a.props.children,c)),o.push(f)}),o}var zl="get",Dl="application/x-www-form-urlencoded";function ic(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Sb(t){return ic(t)&&t.tagName.toLowerCase()==="button"}function kb(t){return ic(t)&&t.tagName.toLowerCase()==="form"}function Cb(t){return ic(t)&&t.tagName.toLowerCase()==="input"}function Eb(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Nb(t,r){return t.button===0&&(!r||r==="_self")&&!Eb(t)}var kl=null;function Pb(){if(kl===null)try{new FormData(document.createElement("form"),0),kl=!1}catch{kl=!0}return kl}var Rb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yd(t){return t!=null&&!Rb.has(t)?(Cn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dl}"`),null):t}function jb(t,r){let o,a,l,c,f;if(kb(t)){let h=t.getAttribute("action");a=h?mr(h,r):null,o=t.getAttribute("method")||zl,l=yd(t.getAttribute("enctype"))||Dl,c=new FormData(t)}else if(Sb(t)||Cb(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(a=g?mr(g,r):null,o=t.getAttribute("formmethod")||h.getAttribute("method")||zl,l=yd(t.getAttribute("formenctype"))||yd(h.getAttribute("enctype"))||Dl,c=new FormData(h,t),!Pb()){let{name:y,type:x,value:b}=t;if(x==="image"){let k=y?`${y}.`:"";c.append(`${k}x`,"0"),c.append(`${k}y`,"0")}else y&&c.append(y,b)}}else{if(ic(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=zl,a=null,l=Dl,f=t}return c&&l==="text/plain"&&(f=c,c=void 0),{action:a,method:o.toLowerCase(),encType:l,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sf(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function Tb(t,r,o,a){let l=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return o?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:r&&mr(l.pathname,r)==="/"?l.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function Mb(t,r){if(t.id in r)return r[t.id];try{let o=await import(t.module);return r[t.id]=o,o}catch(o){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ib(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Ab(t,r,o){let a=await Promise.all(t.map(async l=>{let c=r.routes[l.route.id];if(c){let f=await Mb(c,o);return f.links?f.links():[]}return[]}));return Ob(a.flat(1).filter(Ib).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Ym(t,r,o,a,l,c){let f=(g,y)=>o[y]?g.route.id!==o[y].route.id:!0,h=(g,y)=>{var x;return o[y].pathname!==g.pathname||((x=o[y].route.path)==null?void 0:x.endsWith("*"))&&o[y].params["*"]!==g.params["*"]};return c==="assets"?r.filter((g,y)=>f(g,y)||h(g,y)):c==="data"?r.filter((g,y)=>{var b;let x=a.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,y)||h(g,y))return!0;if(g.route.shouldRevalidate){let k=g.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((b=o[0])==null?void 0:b.params)||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof k=="boolean")return k}return!0}):[]}function Lb(t,r,{includeHydrateFallback:o}={}){return zb(t.map(a=>{let l=r.routes[a.route.id];if(!l)return[];let c=[l.module];return l.clientActionModule&&(c=c.concat(l.clientActionModule)),l.clientLoaderModule&&(c=c.concat(l.clientLoaderModule)),o&&l.hydrateFallbackModule&&(c=c.concat(l.hydrateFallbackModule)),l.imports&&(c=c.concat(l.imports)),c}).flat(1))}function zb(t){return[...new Set(t)]}function Db(t){let r={},o=Object.keys(t).sort();for(let a of o)r[a]=t[a];return r}function Ob(t,r){let o=new Set;return new Set(r),t.reduce((a,l)=>{let c=JSON.stringify(Db(l));return o.has(c)||(o.add(c),a.push({key:c,link:l})),a},[])}function jy(){let t=m.useContext(Bs);return Sf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function _b(){let t=m.useContext(ac);return Sf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var kf=m.createContext(void 0);kf.displayName="FrameworkContext";function Ty(){let t=m.useContext(kf);return Sf(t,"You must render this element inside a <HydratedRouter> element"),t}function Fb(t,r){let o=m.useContext(kf),[a,l]=m.useState(!1),[c,f]=m.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:y,onMouseLeave:x,onTouchStart:b}=r,k=m.useRef(null);m.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let v=R=>{R.forEach(j=>{f(j.isIntersecting)})},C=new IntersectionObserver(v,{threshold:.5});return k.current&&C.observe(k.current),()=>{C.disconnect()}}},[t]),m.useEffect(()=>{if(a){let v=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(v)}}},[a]);let w=()=>{l(!0)},N=()=>{l(!1),f(!1)};return o?t!=="intent"?[c,k,{}]:[c,k,{onFocus:Da(h,w),onBlur:Da(g,N),onMouseEnter:Da(y,w),onMouseLeave:Da(x,N),onTouchStart:Da(b,w)}]:[!1,k,{}]}function Da(t,r){return o=>{t&&t(o),o.defaultPrevented||r(o)}}function Ub({page:t,...r}){let{router:o}=jy(),a=m.useMemo(()=>my(o.routes,t,o.basename),[o.routes,t,o.basename]);return a?m.createElement(Bb,{page:t,matches:a,...r}):null}function $b(t){let{manifest:r,routeModules:o}=Ty(),[a,l]=m.useState([]);return m.useEffect(()=>{let c=!1;return Ab(t,r,o).then(f=>{c||l(f)}),()=>{c=!0}},[t,r,o]),a}function Bb({page:t,matches:r,...o}){let a=wr(),{future:l,manifest:c,routeModules:f}=Ty(),{basename:h}=jy(),{loaderData:g,matches:y}=_b(),x=m.useMemo(()=>Ym(t,r,y,c,a,"data"),[t,r,y,c,a]),b=m.useMemo(()=>Ym(t,r,y,c,a,"assets"),[t,r,y,c,a]),k=m.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let v=new Set,C=!1;if(r.forEach(j=>{var A;let P=c.routes[j.route.id];!P||!P.hasLoader||(!x.some($=>$.route.id===j.route.id)&&j.route.id in g&&((A=f[j.route.id])!=null&&A.shouldRevalidate)||P.hasClientLoader?C=!0:v.add(j.route.id))}),v.size===0)return[];let R=Tb(t,h,l.unstable_trailingSlashAwareDataRequests,"data");return C&&v.size>0&&R.searchParams.set("_routes",r.filter(j=>v.has(j.route.id)).map(j=>j.route.id).join(",")),[R.pathname+R.search]},[h,l.unstable_trailingSlashAwareDataRequests,g,a,c,x,r,t,f]),w=m.useMemo(()=>Lb(b,c),[b,c]),N=$b(b);return m.createElement(m.Fragment,null,k.map(v=>m.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...o})),w.map(v=>m.createElement("link",{key:v,rel:"modulepreload",href:v,...o})),N.map(({key:v,link:C})=>m.createElement("link",{key:v,nonce:o.nonce,...C,crossOrigin:C.crossOrigin??o.crossOrigin})))}function Hb(...t){return r=>{t.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Wb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wb&&(window.__reactRouterVersion="7.13.0")}catch{}function Vb({basename:t,children:r,unstable_useTransitions:o,window:a}){let l=m.useRef();l.current==null&&(l.current=E1({window:a,v5Compat:!0}));let c=l.current,[f,h]=m.useState({action:c.action,location:c.location}),g=m.useCallback(y=>{o===!1?h(y):m.startTransition(()=>h(y))},[o]);return m.useLayoutEffect(()=>c.listen(g),[c,g]),m.createElement(wb,{basename:t,children:r,location:f.location,navigationType:f.action,navigator:c,unstable_useTransitions:o})}var My=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Iy=m.forwardRef(function({onClick:r,discover:o="render",prefetch:a="none",relative:l,reloadDocument:c,replace:f,state:h,target:g,to:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k,...w},N){let{basename:v,unstable_useTransitions:C}=m.useContext(Gt),R=typeof y=="string"&&My.test(y),j=xy(y,v);y=j.to;let P=sb(y,{relative:l}),[A,$,B]=Fb(a,w),W=qb(y,{replace:f,state:h,target:g,preventScrollReset:x,relative:l,viewTransition:b,unstable_defaultShouldRevalidate:k,unstable_useTransitions:C});function X(Y){r&&r(Y),Y.defaultPrevented||W(Y)}let H=m.createElement("a",{...w,...B,href:j.absoluteURL||P,onClick:j.isExternal||c?r:X,ref:Hb(N,$),target:g,"data-discover":!R&&o==="render"?"true":void 0});return A&&!R?m.createElement(m.Fragment,null,H,m.createElement(Ub,{page:P})):H});Iy.displayName="Link";var Ay=m.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:a="",end:l=!1,style:c,to:f,viewTransition:h,children:g,...y},x){let b=ni(f,{relative:y.relative}),k=wr(),w=m.useContext(ac),{navigator:N,basename:v}=m.useContext(Gt),C=w!=null&&Zb(b)&&h===!0,R=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,j=k.pathname,P=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;o||(j=j.toLowerCase(),P=P?P.toLowerCase():null,R=R.toLowerCase()),P&&v&&(P=mr(P,v)||P);const A=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let $=j===R||!l&&j.startsWith(R)&&j.charAt(A)==="/",B=P!=null&&(P===R||!l&&P.startsWith(R)&&P.charAt(R.length)==="/"),W={isActive:$,isPending:B,isTransitioning:C},X=$?r:void 0,H;typeof a=="function"?H=a(W):H=[a,$?"active":null,B?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let Y=typeof c=="function"?c(W):c;return m.createElement(Iy,{...y,"aria-current":X,className:H,ref:x,style:Y,to:f,viewTransition:h},typeof g=="function"?g(W):g)});Ay.displayName="NavLink";var Kb=m.forwardRef(({discover:t="render",fetcherKey:r,navigate:o,reloadDocument:a,replace:l,state:c,method:f=zl,action:h,onSubmit:g,relative:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k,...w},N)=>{let{unstable_useTransitions:v}=m.useContext(Gt),C=Xb(),R=Jb(h,{relative:y}),j=f.toLowerCase()==="get"?"get":"post",P=typeof h=="string"&&My.test(h),A=$=>{if(g&&g($),$.defaultPrevented)return;$.preventDefault();let B=$.nativeEvent.submitter,W=(B==null?void 0:B.getAttribute("formmethod"))||f,X=()=>C(B||$.currentTarget,{fetcherKey:r,method:W,navigate:o,replace:l,state:c,relative:y,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:k});v&&o!==!1?m.startTransition(()=>X()):X()};return m.createElement("form",{ref:N,method:j,action:R,onSubmit:a?g:A,...w,"data-discover":!P&&t==="render"?"true":void 0})});Kb.displayName="Form";function Qb(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ly(t){let r=m.useContext(Bs);return Ye(r,Qb(t)),r}function qb(t,{target:r,replace:o,state:a,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:g}={}){let y=Ey(),x=wr(),b=ni(t,{relative:c});return m.useCallback(k=>{if(Nb(k,r)){k.preventDefault();let w=o!==void 0?o:Ha(x)===Ha(b),N=()=>y(t,{replace:w,state:a,preventScrollReset:l,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});g?m.startTransition(()=>N()):N()}},[x,y,b,o,a,r,t,l,c,f,h,g])}var Gb=0,Yb=()=>`__${String(++Gb)}__`;function Xb(){let{router:t}=Ly("useSubmit"),{basename:r}=m.useContext(Gt),o=gb(),a=t.fetch,l=t.navigate;return m.useCallback(async(c,f={})=>{let{action:h,method:g,encType:y,formData:x,body:b}=jb(c,r);if(f.navigate===!1){let k=f.fetcherKey||Yb();await a(k,o,f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:b,formMethod:f.method||g,formEncType:f.encType||y,flushSync:f.flushSync})}else await l(f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:b,formMethod:f.method||g,formEncType:f.encType||y,replace:f.replace,state:f.state,fromRouteId:o,flushSync:f.flushSync,viewTransition:f.viewTransition})},[a,l,r,o])}function Jb(t,{relative:r}={}){let{basename:o}=m.useContext(Gt),a=m.useContext(Gn);Ye(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),c={...ni(t||".",{relative:r})},f=wr();if(t==null){c.search=f.search;let h=new URLSearchParams(c.search),g=h.getAll("index");if(g.some(x=>x==="")){h.delete("index"),g.filter(b=>b).forEach(b=>h.append("index",b));let x=h.toString();c.search=x?`?${x}`:""}}return(!t||t===".")&&l.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(c.pathname=c.pathname==="/"?o:hr([o,c.pathname])),Ha(c)}function Zb(t,{relative:r}={}){let o=m.useContext(by);Ye(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ly("useViewTransitionState"),l=ni(t,{relative:r});if(!o.isTransitioning)return!1;let c=mr(o.currentLocation.pathname,a)||o.currentLocation.pathname,f=mr(o.nextLocation.pathname,a)||o.nextLocation.pathname;return Kl(l.pathname,f)!=null||Kl(l.pathname,c)!=null}var ri=py();const zy=fy(ri);var Ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eS={setTimeout:(t,r)=>setTimeout(t,r),clearTimeout:t=>clearTimeout(t),setInterval:(t,r)=>setInterval(t,r),clearInterval:t=>clearInterval(t)},Qr,mf,ty,tS=(ty=class{constructor(){we(this,Qr,eS);we(this,mf,!1)}setTimeoutProvider(t){de(this,Qr,t)}setTimeout(t,r){return I(this,Qr).setTimeout(t,r)}clearTimeout(t){I(this,Qr).clearTimeout(t)}setInterval(t,r){return I(this,Qr).setInterval(t,r)}clearInterval(t){I(this,Qr).clearInterval(t)}},Qr=new WeakMap,mf=new WeakMap,ty),Co=new tS;function nS(t){setTimeout(t,0)}var Do=typeof window>"u"||"Deno"in globalThis;function Mt(){}function rS(t,r){return typeof t=="function"?t(r):t}function Ad(t){return typeof t=="number"&&t>=0&&t!==1/0}function Dy(t,r){return Math.max(t+(r||0)-Date.now(),0)}function no(t,r){return typeof t=="function"?t(r):t}function sn(t,r){return typeof t=="function"?t(r):t}function Xm(t,r){const{type:o="all",exact:a,fetchStatus:l,predicate:c,queryKey:f,stale:h}=t;if(f){if(a){if(r.queryHash!==Cf(f,r.options))return!1}else if(!Wa(r.queryKey,f))return!1}if(o!=="all"){const g=r.isActive();if(o==="active"&&!g||o==="inactive"&&g)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||l&&l!==r.state.fetchStatus||c&&!c(r))}function Jm(t,r){const{exact:o,status:a,predicate:l,mutationKey:c}=t;if(c){if(!r.options.mutationKey)return!1;if(o){if(Oo(r.options.mutationKey)!==Oo(c))return!1}else if(!Wa(r.options.mutationKey,c))return!1}return!(a&&r.state.status!==a||l&&!l(r))}function Cf(t,r){return((r==null?void 0:r.queryKeyHashFn)||Oo)(t)}function Oo(t){return JSON.stringify(t,(r,o)=>Ld(o)?Object.keys(o).sort().reduce((a,l)=>(a[l]=o[l],a),{}):o)}function Wa(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?Object.keys(r).every(o=>Wa(t[o],r[o])):!1}var oS=Object.prototype.hasOwnProperty;function Oy(t,r,o=0){if(t===r)return t;if(o>500)return r;const a=Zm(t)&&Zm(r);if(!a&&!(Ld(t)&&Ld(r)))return r;const c=(a?t:Object.keys(t)).length,f=a?r:Object.keys(r),h=f.length,g=a?new Array(h):{};let y=0;for(let x=0;x<h;x++){const b=a?x:f[x],k=t[b],w=r[b];if(k===w){g[b]=k,(a?x<c:oS.call(t,b))&&y++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){g[b]=w;continue}const N=Oy(k,w,o+1);g[b]=N,N===k&&y++}return c===h&&y===c?t:g}function Ql(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const o in t)if(t[o]!==r[o])return!1;return!0}function Zm(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ld(t){if(!eg(t))return!1;const r=t.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!eg(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function eg(t){return Object.prototype.toString.call(t)==="[object Object]"}function sS(t){return new Promise(r=>{Co.setTimeout(r,t)})}function zd(t,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(t,r):o.structuralSharing!==!1?Oy(t,r):r}function aS(t,r,o=0){const a=[...t,r];return o&&a.length>o?a.slice(1):a}function iS(t,r,o=0){const a=[r,...t];return o&&a.length>o?a.slice(0,-1):a}var Ef=Symbol();function _y(t,r){return!t.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!t.queryFn||t.queryFn===Ef?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Nf(t,r){return typeof t=="function"?t(...r):!!t}function lS(t,r,o){let a=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??(l=r()),a||(a=!0,l.aborted?o():l.addEventListener("abort",o,{once:!0})),l)}),t}var Eo,qr,Ps,ny,cS=(ny=class extends Ws{constructor(){super();we(this,Eo);we(this,qr);we(this,Ps);de(this,Ps,r=>{if(!Do&&window.addEventListener){const o=()=>r();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){I(this,qr)||this.setEventListener(I(this,Ps))}onUnsubscribe(){var r;this.hasListeners()||((r=I(this,qr))==null||r.call(this),de(this,qr,void 0))}setEventListener(r){var o;de(this,Ps,r),(o=I(this,qr))==null||o.call(this),de(this,qr,r(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(r){I(this,Eo)!==r&&(de(this,Eo,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(o=>{o(r)})}isFocused(){var r;return typeof I(this,Eo)=="boolean"?I(this,Eo):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Eo=new WeakMap,qr=new WeakMap,Ps=new WeakMap,ny),Pf=new cS;function Dd(){let t,r;const o=new Promise((l,c)=>{t=l,r=c});o.status="pending",o.catch(()=>{});function a(l){Object.assign(o,l),delete o.resolve,delete o.reject}return o.resolve=l=>{a({status:"fulfilled",value:l}),t(l)},o.reject=l=>{a({status:"rejected",reason:l}),r(l)},o}var uS=nS;function dS(){let t=[],r=0,o=h=>{h()},a=h=>{h()},l=uS;const c=h=>{r?t.push(h):l(()=>{o(h)})},f=()=>{const h=t;t=[],h.length&&l(()=>{a(()=>{h.forEach(g=>{o(g)})})})};return{batch:h=>{let g;r++;try{g=h()}finally{r--,r||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{o=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{l=h}}}var ct=dS(),Rs,Gr,js,ry,fS=(ry=class extends Ws{constructor(){super();we(this,Rs,!0);we(this,Gr);we(this,js);de(this,js,r=>{if(!Do&&window.addEventListener){const o=()=>r(!0),a=()=>r(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a)}}})}onSubscribe(){I(this,Gr)||this.setEventListener(I(this,js))}onUnsubscribe(){var r;this.hasListeners()||((r=I(this,Gr))==null||r.call(this),de(this,Gr,void 0))}setEventListener(r){var o;de(this,js,r),(o=I(this,Gr))==null||o.call(this),de(this,Gr,r(this.setOnline.bind(this)))}setOnline(r){I(this,Rs)!==r&&(de(this,Rs,r),this.listeners.forEach(a=>{a(r)}))}isOnline(){return I(this,Rs)}},Rs=new WeakMap,Gr=new WeakMap,js=new WeakMap,ry),ql=new fS;function hS(t){return Math.min(1e3*2**t,3e4)}function Fy(t){return(t??"online")==="online"?ql.isOnline():!0}var Od=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Uy(t){let r=!1,o=0,a;const l=Dd(),c=()=>l.status!=="pending",f=v=>{var C;if(!c()){const R=new Od(v);k(R),(C=t.onCancel)==null||C.call(t,R)}},h=()=>{r=!0},g=()=>{r=!1},y=()=>Pf.isFocused()&&(t.networkMode==="always"||ql.isOnline())&&t.canRun(),x=()=>Fy(t.networkMode)&&t.canRun(),b=v=>{c()||(a==null||a(),l.resolve(v))},k=v=>{c()||(a==null||a(),l.reject(v))},w=()=>new Promise(v=>{var C;a=R=>{(c()||y())&&v(R)},(C=t.onPause)==null||C.call(t)}).then(()=>{var v;a=void 0,c()||(v=t.onContinue)==null||v.call(t)}),N=()=>{if(c())return;let v;const C=o===0?t.initialPromise:void 0;try{v=C??t.fn()}catch(R){v=Promise.reject(R)}Promise.resolve(v).then(b).catch(R=>{var B;if(c())return;const j=t.retry??(Do?0:3),P=t.retryDelay??hS,A=typeof P=="function"?P(o,R):P,$=j===!0||typeof j=="number"&&o<j||typeof j=="function"&&j(o,R);if(r||!$){k(R);return}o++,(B=t.onFail)==null||B.call(t,o,R),sS(A).then(()=>y()?void 0:w()).then(()=>{r?k(R):N()})})};return{promise:l,status:()=>l.status,cancel:f,continue:()=>(a==null||a(),l),cancelRetry:h,continueRetry:g,canStart:x,start:()=>(x()?N():w().then(N),l)}}var No,oy,$y=(oy=class{constructor(){we(this,No)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ad(this.gcTime)&&de(this,No,Co.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Do?1/0:300*1e3))}clearGcTimeout(){I(this,No)&&(Co.clearTimeout(I(this,No)),de(this,No,void 0))}},No=new WeakMap,oy),Po,Ts,on,Ro,ht,Ya,jo,Sn,ir,sy,pS=(sy=class extends $y{constructor(r){super();we(this,Sn);we(this,Po);we(this,Ts);we(this,on);we(this,Ro);we(this,ht);we(this,Ya);we(this,jo);de(this,jo,!1),de(this,Ya,r.defaultOptions),this.setOptions(r.options),this.observers=[],de(this,Ro,r.client),de(this,on,I(this,Ro).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,de(this,Po,ng(this.options)),this.state=r.state??I(this,Po),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=I(this,ht))==null?void 0:r.promise}setOptions(r){if(this.options={...I(this,Ya),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=ng(this.options);o.data!==void 0&&(this.setState(tg(o.data,o.dataUpdatedAt)),de(this,Po,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,on).remove(this)}setData(r,o){const a=zd(this.state.data,r,this.options);return je(this,Sn,ir).call(this,{data:a,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),a}setState(r,o){je(this,Sn,ir).call(this,{type:"setState",state:r,setStateOptions:o})}cancel(r){var a,l;const o=(a=I(this,ht))==null?void 0:a.promise;return(l=I(this,ht))==null||l.cancel(r),o?o.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(I(this,Po))}isActive(){return this.observers.some(r=>sn(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ef||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>no(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:!Dy(this.state.dataUpdatedAt,r)}onFocus(){var o;const r=this.observers.find(a=>a.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(o=I(this,ht))==null||o.continue()}onOnline(){var o;const r=this.observers.find(a=>a.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(o=I(this,ht))==null||o.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),I(this,on).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(o=>o!==r),this.observers.length||(I(this,ht)&&(I(this,jo)?I(this,ht).cancel({revert:!0}):I(this,ht).cancelRetry()),this.scheduleGc()),I(this,on).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,Sn,ir).call(this,{type:"invalidate"})}async fetch(r,o){var g,y,x,b,k,w,N,v,C,R,j,P;if(this.state.fetchStatus!=="idle"&&((g=I(this,ht))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(I(this,ht))return I(this,ht).continueRetry(),I(this,ht).promise}if(r&&this.setOptions(r),!this.options.queryFn){const A=this.observers.find($=>$.options.queryFn);A&&this.setOptions(A.options)}const a=new AbortController,l=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(de(this,jo,!0),a.signal)})},c=()=>{const A=_y(this.options,o),B=(()=>{const W={client:I(this,Ro),queryKey:this.queryKey,meta:this.meta};return l(W),W})();return de(this,jo,!1),this.options.persister?this.options.persister(A,B,this):A(B)},h=(()=>{const A={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:I(this,Ro),state:this.state,fetchFn:c};return l(A),A})();(y=this.options.behavior)==null||y.onFetch(h,this),de(this,Ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=h.fetchOptions)==null?void 0:x.meta))&&je(this,Sn,ir).call(this,{type:"fetch",meta:(b=h.fetchOptions)==null?void 0:b.meta}),de(this,ht,Uy({initialPromise:o==null?void 0:o.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof Od&&A.revert&&this.setState({...I(this,Ts),fetchStatus:"idle"}),a.abort()},onFail:(A,$)=>{je(this,Sn,ir).call(this,{type:"failed",failureCount:A,error:$})},onPause:()=>{je(this,Sn,ir).call(this,{type:"pause"})},onContinue:()=>{je(this,Sn,ir).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await I(this,ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(w=(k=I(this,on).config).onSuccess)==null||w.call(k,A,this),(v=(N=I(this,on).config).onSettled)==null||v.call(N,A,this.state.error,this),A}catch(A){if(A instanceof Od){if(A.silent)return I(this,ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw je(this,Sn,ir).call(this,{type:"error",error:A}),(R=(C=I(this,on).config).onError)==null||R.call(C,A,this),(P=(j=I(this,on).config).onSettled)==null||P.call(j,this.state.data,A,this),A}finally{this.scheduleGc()}}},Po=new WeakMap,Ts=new WeakMap,on=new WeakMap,Ro=new WeakMap,ht=new WeakMap,Ya=new WeakMap,jo=new WeakMap,Sn=new WeakSet,ir=function(r){const o=a=>{switch(r.type){case"failed":return{...a,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...By(a.data,this.options),fetchMeta:r.meta??null};case"success":const l={...a,...tg(r.data,r.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,Ts,r.manual?l:void 0),l;case"error":const c=r.error;return{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...r.state}}};this.state=o(this.state),ct.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),I(this,on).notify({query:this,type:"updated",action:r})})},sy);function By(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fy(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function tg(t,r){return{data:t,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ng(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,o=r!==void 0,a=o?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var Ut,Ae,Xa,Tt,To,Ms,lr,Yr,Ja,Is,As,Mo,Io,Xr,Ls,_e,Fa,_d,Fd,Ud,$d,Bd,Hd,Wd,Hy,ay,mS=(ay=class extends Ws{constructor(r,o){super();we(this,_e);we(this,Ut);we(this,Ae);we(this,Xa);we(this,Tt);we(this,To);we(this,Ms);we(this,lr);we(this,Yr);we(this,Ja);we(this,Is);we(this,As);we(this,Mo);we(this,Io);we(this,Xr);we(this,Ls,new Set);this.options=o,de(this,Ut,r),de(this,Yr,null),de(this,lr,Dd()),this.bindMethods(),this.setOptions(o)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,Ae).addObserver(this),rg(I(this,Ae),this.options)?je(this,_e,Fa).call(this):this.updateResult(),je(this,_e,$d).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vd(I(this,Ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vd(I(this,Ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,_e,Bd).call(this),je(this,_e,Hd).call(this),I(this,Ae).removeObserver(this)}setOptions(r){const o=this.options,a=I(this,Ae);if(this.options=I(this,Ut).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof sn(this.options.enabled,I(this,Ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,_e,Wd).call(this),I(this,Ae).setOptions(this.options),o._defaulted&&!Ql(this.options,o)&&I(this,Ut).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,Ae),observer:this});const l=this.hasListeners();l&&og(I(this,Ae),a,this.options,o)&&je(this,_e,Fa).call(this),this.updateResult(),l&&(I(this,Ae)!==a||sn(this.options.enabled,I(this,Ae))!==sn(o.enabled,I(this,Ae))||no(this.options.staleTime,I(this,Ae))!==no(o.staleTime,I(this,Ae)))&&je(this,_e,_d).call(this);const c=je(this,_e,Fd).call(this);l&&(I(this,Ae)!==a||sn(this.options.enabled,I(this,Ae))!==sn(o.enabled,I(this,Ae))||c!==I(this,Xr))&&je(this,_e,Ud).call(this,c)}getOptimisticResult(r){const o=I(this,Ut).getQueryCache().build(I(this,Ut),r),a=this.createResult(o,r);return yS(this,a)&&(de(this,Tt,a),de(this,Ms,this.options),de(this,To,I(this,Ae).state)),a}getCurrentResult(){return I(this,Tt)}trackResult(r,o){return new Proxy(r,{get:(a,l)=>(this.trackProp(l),o==null||o(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,lr).status==="pending"&&I(this,lr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(r){I(this,Ls).add(r)}getCurrentQuery(){return I(this,Ae)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const o=I(this,Ut).defaultQueryOptions(r),a=I(this,Ut).getQueryCache().build(I(this,Ut),o);return a.fetch().then(()=>this.createResult(a,o))}fetch(r){return je(this,_e,Fa).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,Tt)))}createResult(r,o){var H;const a=I(this,Ae),l=this.options,c=I(this,Tt),f=I(this,To),h=I(this,Ms),y=r!==a?r.state:I(this,Xa),{state:x}=r;let b={...x},k=!1,w;if(o._optimisticResults){const Y=this.hasListeners(),_=!Y&&rg(r,o),O=Y&&og(r,a,o,l);(_||O)&&(b={...b,...By(x.data,r.options)}),o._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:N,errorUpdatedAt:v,status:C}=b;w=b.data;let R=!1;if(o.placeholderData!==void 0&&w===void 0&&C==="pending"){let Y;c!=null&&c.isPlaceholderData&&o.placeholderData===(h==null?void 0:h.placeholderData)?(Y=c.data,R=!0):Y=typeof o.placeholderData=="function"?o.placeholderData((H=I(this,As))==null?void 0:H.state.data,I(this,As)):o.placeholderData,Y!==void 0&&(C="success",w=zd(c==null?void 0:c.data,Y,o),k=!0)}if(o.select&&w!==void 0&&!R)if(c&&w===(f==null?void 0:f.data)&&o.select===I(this,Ja))w=I(this,Is);else try{de(this,Ja,o.select),w=o.select(w),w=zd(c==null?void 0:c.data,w,o),de(this,Is,w),de(this,Yr,null)}catch(Y){de(this,Yr,Y)}I(this,Yr)&&(N=I(this,Yr),w=I(this,Is),v=Date.now(),C="error");const j=b.fetchStatus==="fetching",P=C==="pending",A=C==="error",$=P&&j,B=w!==void 0,X={status:C,fetchStatus:b.fetchStatus,isPending:P,isSuccess:C==="success",isError:A,isInitialLoading:$,isLoading:$,data:w,dataUpdatedAt:b.dataUpdatedAt,error:N,errorUpdatedAt:v,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>y.dataUpdateCount||b.errorUpdateCount>y.errorUpdateCount,isFetching:j,isRefetching:j&&!P,isLoadingError:A&&!B,isPaused:b.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:A&&B,isStale:Rf(r,o),refetch:this.refetch,promise:I(this,lr),isEnabled:sn(o.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const Y=X.data!==void 0,_=X.status==="error"&&!Y,O=G=>{_?G.reject(X.error):Y&&G.resolve(X.data)},Z=()=>{const G=de(this,lr,X.promise=Dd());O(G)},ee=I(this,lr);switch(ee.status){case"pending":r.queryHash===a.queryHash&&O(ee);break;case"fulfilled":(_||X.data!==ee.value)&&Z();break;case"rejected":(!_||X.error!==ee.reason)&&Z();break}}return X}updateResult(){const r=I(this,Tt),o=this.createResult(I(this,Ae),this.options);if(de(this,To,I(this,Ae).state),de(this,Ms,this.options),I(this,To).data!==void 0&&de(this,As,I(this,Ae)),Ql(o,r))return;de(this,Tt,o);const a=()=>{if(!r)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!I(this,Ls).size)return!0;const f=new Set(c??I(this,Ls));return this.options.throwOnError&&f.add("error"),Object.keys(I(this,Tt)).some(h=>{const g=h;return I(this,Tt)[g]!==r[g]&&f.has(g)})};je(this,_e,Hy).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,_e,$d).call(this)}},Ut=new WeakMap,Ae=new WeakMap,Xa=new WeakMap,Tt=new WeakMap,To=new WeakMap,Ms=new WeakMap,lr=new WeakMap,Yr=new WeakMap,Ja=new WeakMap,Is=new WeakMap,As=new WeakMap,Mo=new WeakMap,Io=new WeakMap,Xr=new WeakMap,Ls=new WeakMap,_e=new WeakSet,Fa=function(r){je(this,_e,Wd).call(this);let o=I(this,Ae).fetch(this.options,r);return r!=null&&r.throwOnError||(o=o.catch(Mt)),o},_d=function(){je(this,_e,Bd).call(this);const r=no(this.options.staleTime,I(this,Ae));if(Do||I(this,Tt).isStale||!Ad(r))return;const a=Dy(I(this,Tt).dataUpdatedAt,r)+1;de(this,Mo,Co.setTimeout(()=>{I(this,Tt).isStale||this.updateResult()},a))},Fd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,Ae)):this.options.refetchInterval)??!1},Ud=function(r){je(this,_e,Hd).call(this),de(this,Xr,r),!(Do||sn(this.options.enabled,I(this,Ae))===!1||!Ad(I(this,Xr))||I(this,Xr)===0)&&de(this,Io,Co.setInterval(()=>{(this.options.refetchIntervalInBackground||Pf.isFocused())&&je(this,_e,Fa).call(this)},I(this,Xr)))},$d=function(){je(this,_e,_d).call(this),je(this,_e,Ud).call(this,je(this,_e,Fd).call(this))},Bd=function(){I(this,Mo)&&(Co.clearTimeout(I(this,Mo)),de(this,Mo,void 0))},Hd=function(){I(this,Io)&&(Co.clearInterval(I(this,Io)),de(this,Io,void 0))},Wd=function(){const r=I(this,Ut).getQueryCache().build(I(this,Ut),this.options);if(r===I(this,Ae))return;const o=I(this,Ae);de(this,Ae,r),de(this,Xa,r.state),this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))},Hy=function(r){ct.batch(()=>{r.listeners&&this.listeners.forEach(o=>{o(I(this,Tt))}),I(this,Ut).getQueryCache().notify({query:I(this,Ae),type:"observerResultsUpdated"})})},ay);function gS(t,r){return sn(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function rg(t,r){return gS(t,r)||t.state.data!==void 0&&Vd(t,r,r.refetchOnMount)}function Vd(t,r,o){if(sn(r.enabled,t)!==!1&&no(r.staleTime,t)!=="static"){const a=typeof o=="function"?o(t):o;return a==="always"||a!==!1&&Rf(t,r)}return!1}function og(t,r,o,a){return(t!==r||sn(a.enabled,t)===!1)&&(!o.suspense||t.state.status!=="error")&&Rf(t,o)}function Rf(t,r){return sn(r.enabled,t)!==!1&&t.isStaleByTime(no(r.staleTime,t))}function yS(t,r){return!Ql(t.getCurrentResult(),r)}function sg(t){return{onFetch:(r,o)=>{var x,b,k,w,N;const a=r.options,l=(k=(b=(x=r.fetchOptions)==null?void 0:x.meta)==null?void 0:b.fetchMore)==null?void 0:k.direction,c=((w=r.state.data)==null?void 0:w.pages)||[],f=((N=r.state.data)==null?void 0:N.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const y=async()=>{let v=!1;const C=P=>{lS(P,()=>r.signal,()=>v=!0)},R=_y(r.options,r.fetchOptions),j=async(P,A,$)=>{if(v)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const W=(()=>{const _={client:r.client,queryKey:r.queryKey,pageParam:A,direction:$?"backward":"forward",meta:r.options.meta};return C(_),_})(),X=await R(W),{maxPages:H}=r.options,Y=$?iS:aS;return{pages:Y(P.pages,X,H),pageParams:Y(P.pageParams,A,H)}};if(l&&c.length){const P=l==="backward",A=P?vS:ag,$={pages:c,pageParams:f},B=A(a,$);h=await j($,B,P)}else{const P=t??c.length;do{const A=g===0?f[0]??a.initialPageParam:ag(a,h);if(g>0&&A==null)break;h=await j(h,A),g++}while(g<P)}return h};r.options.persister?r.fetchFn=()=>{var v,C;return(C=(v=r.options).persister)==null?void 0:C.call(v,y,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o)}:r.fetchFn=y}}}function ag(t,{pages:r,pageParams:o}){const a=r.length-1;return r.length>0?t.getNextPageParam(r[a],r,o[a],o):void 0}function vS(t,{pages:r,pageParams:o}){var a;return r.length>0?(a=t.getPreviousPageParam)==null?void 0:a.call(t,r[0],r,o[0],o):void 0}var Za,Bn,kt,Ao,Hn,Vr,iy,xS=(iy=class extends $y{constructor(r){super();we(this,Hn);we(this,Za);we(this,Bn);we(this,kt);we(this,Ao);de(this,Za,r.client),this.mutationId=r.mutationId,de(this,kt,r.mutationCache),de(this,Bn,[]),this.state=r.state||Wy(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){I(this,Bn).includes(r)||(I(this,Bn).push(r),this.clearGcTimeout(),I(this,kt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){de(this,Bn,I(this,Bn).filter(o=>o!==r)),this.scheduleGc(),I(this,kt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){I(this,Bn).length||(this.state.status==="pending"?this.scheduleGc():I(this,kt).remove(this))}continue(){var r;return((r=I(this,Ao))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var f,h,g,y,x,b,k,w,N,v,C,R,j,P,A,$,B,W;const o=()=>{je(this,Hn,Vr).call(this,{type:"continue"})},a={client:I(this,Za),meta:this.options.meta,mutationKey:this.options.mutationKey};de(this,Ao,Uy({fn:()=>this.options.mutationFn?this.options.mutationFn(r,a):Promise.reject(new Error("No mutationFn found")),onFail:(X,H)=>{je(this,Hn,Vr).call(this,{type:"failed",failureCount:X,error:H})},onPause:()=>{je(this,Hn,Vr).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,kt).canRun(this)}));const l=this.state.status==="pending",c=!I(this,Ao).canStart();try{if(l)o();else{je(this,Hn,Vr).call(this,{type:"pending",variables:r,isPaused:c}),I(this,kt).config.onMutate&&await I(this,kt).config.onMutate(r,this,a);const H=await((h=(f=this.options).onMutate)==null?void 0:h.call(f,r,a));H!==this.state.context&&je(this,Hn,Vr).call(this,{type:"pending",context:H,variables:r,isPaused:c})}const X=await I(this,Ao).start();return await((y=(g=I(this,kt).config).onSuccess)==null?void 0:y.call(g,X,r,this.state.context,this,a)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,X,r,this.state.context,a)),await((w=(k=I(this,kt).config).onSettled)==null?void 0:w.call(k,X,null,this.state.variables,this.state.context,this,a)),await((v=(N=this.options).onSettled)==null?void 0:v.call(N,X,null,r,this.state.context,a)),je(this,Hn,Vr).call(this,{type:"success",data:X}),X}catch(X){try{await((R=(C=I(this,kt).config).onError)==null?void 0:R.call(C,X,r,this.state.context,this,a))}catch(H){Promise.reject(H)}try{await((P=(j=this.options).onError)==null?void 0:P.call(j,X,r,this.state.context,a))}catch(H){Promise.reject(H)}try{await(($=(A=I(this,kt).config).onSettled)==null?void 0:$.call(A,void 0,X,this.state.variables,this.state.context,this,a))}catch(H){Promise.reject(H)}try{await((W=(B=this.options).onSettled)==null?void 0:W.call(B,void 0,X,r,this.state.context,a))}catch(H){Promise.reject(H)}throw je(this,Hn,Vr).call(this,{type:"error",error:X}),X}finally{I(this,kt).runNext(this)}}},Za=new WeakMap,Bn=new WeakMap,kt=new WeakMap,Ao=new WeakMap,Hn=new WeakSet,Vr=function(r){const o=a=>{switch(r.type){case"failed":return{...a,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:r.error,failureCount:a.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=o(this.state),ct.batch(()=>{I(this,Bn).forEach(a=>{a.onMutationUpdate(r)}),I(this,kt).notify({mutation:this,type:"updated",action:r})})},iy);function Wy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,kn,ei,ly,wS=(ly=class extends Ws{constructor(r={}){super();we(this,cr);we(this,kn);we(this,ei);this.config=r,de(this,cr,new Set),de(this,kn,new Map),de(this,ei,0)}build(r,o,a){const l=new xS({client:r,mutationCache:this,mutationId:++bl(this,ei)._,options:r.defaultMutationOptions(o),state:a});return this.add(l),l}add(r){I(this,cr).add(r);const o=Cl(r);if(typeof o=="string"){const a=I(this,kn).get(o);a?a.push(r):I(this,kn).set(o,[r])}this.notify({type:"added",mutation:r})}remove(r){if(I(this,cr).delete(r)){const o=Cl(r);if(typeof o=="string"){const a=I(this,kn).get(o);if(a)if(a.length>1){const l=a.indexOf(r);l!==-1&&a.splice(l,1)}else a[0]===r&&I(this,kn).delete(o)}}this.notify({type:"removed",mutation:r})}canRun(r){const o=Cl(r);if(typeof o=="string"){const a=I(this,kn).get(o),l=a==null?void 0:a.find(c=>c.state.status==="pending");return!l||l===r}else return!0}runNext(r){var a;const o=Cl(r);if(typeof o=="string"){const l=(a=I(this,kn).get(o))==null?void 0:a.find(c=>c!==r&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{I(this,cr).forEach(r=>{this.notify({type:"removed",mutation:r})}),I(this,cr).clear(),I(this,kn).clear()})}getAll(){return Array.from(I(this,cr))}find(r){const o={exact:!0,...r};return this.getAll().find(a=>Jm(o,a))}findAll(r={}){return this.getAll().filter(o=>Jm(r,o))}notify(r){ct.batch(()=>{this.listeners.forEach(o=>{o(r)})})}resumePausedMutations(){const r=this.getAll().filter(o=>o.state.isPaused);return ct.batch(()=>Promise.all(r.map(o=>o.continue().catch(Mt))))}},cr=new WeakMap,kn=new WeakMap,ei=new WeakMap,ly);function Cl(t){var r;return(r=t.options.scope)==null?void 0:r.id}var ur,Jr,$t,dr,pr,Ol,Kd,cy,bS=(cy=class extends Ws{constructor(o,a){super();we(this,pr);we(this,ur);we(this,Jr);we(this,$t);we(this,dr);de(this,ur,o),this.setOptions(a),this.bindMethods(),je(this,pr,Ol).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){var l;const a=this.options;this.options=I(this,ur).defaultMutationOptions(o),Ql(this.options,a)||I(this,ur).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,$t),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Oo(a.mutationKey)!==Oo(this.options.mutationKey)?this.reset():((l=I(this,$t))==null?void 0:l.state.status)==="pending"&&I(this,$t).setOptions(this.options)}onUnsubscribe(){var o;this.hasListeners()||(o=I(this,$t))==null||o.removeObserver(this)}onMutationUpdate(o){je(this,pr,Ol).call(this),je(this,pr,Kd).call(this,o)}getCurrentResult(){return I(this,Jr)}reset(){var o;(o=I(this,$t))==null||o.removeObserver(this),de(this,$t,void 0),je(this,pr,Ol).call(this),je(this,pr,Kd).call(this)}mutate(o,a){var l;return de(this,dr,a),(l=I(this,$t))==null||l.removeObserver(this),de(this,$t,I(this,ur).getMutationCache().build(I(this,ur),this.options)),I(this,$t).addObserver(this),I(this,$t).execute(o)}},ur=new WeakMap,Jr=new WeakMap,$t=new WeakMap,dr=new WeakMap,pr=new WeakSet,Ol=function(){var a;const o=((a=I(this,$t))==null?void 0:a.state)??Wy();de(this,Jr,{...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset})},Kd=function(o){ct.batch(()=>{var a,l,c,f,h,g,y,x;if(I(this,dr)&&this.hasListeners()){const b=I(this,Jr).variables,k=I(this,Jr).context,w={client:I(this,ur),meta:this.options.meta,mutationKey:this.options.mutationKey};if((o==null?void 0:o.type)==="success"){try{(l=(a=I(this,dr)).onSuccess)==null||l.call(a,o.data,b,k,w)}catch(N){Promise.reject(N)}try{(f=(c=I(this,dr)).onSettled)==null||f.call(c,o.data,null,b,k,w)}catch(N){Promise.reject(N)}}else if((o==null?void 0:o.type)==="error"){try{(g=(h=I(this,dr)).onError)==null||g.call(h,o.error,b,k,w)}catch(N){Promise.reject(N)}try{(x=(y=I(this,dr)).onSettled)==null||x.call(y,void 0,o.error,b,k,w)}catch(N){Promise.reject(N)}}}this.listeners.forEach(b=>{b(I(this,Jr))})})},cy),Wn,uy,SS=(uy=class extends Ws{constructor(r={}){super();we(this,Wn);this.config=r,de(this,Wn,new Map)}build(r,o,a){const l=o.queryKey,c=o.queryHash??Cf(l,o);let f=this.get(c);return f||(f=new pS({client:r,queryKey:l,queryHash:c,options:r.defaultQueryOptions(o),state:a,defaultOptions:r.getQueryDefaults(l)}),this.add(f)),f}add(r){I(this,Wn).has(r.queryHash)||(I(this,Wn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const o=I(this,Wn).get(r.queryHash);o&&(r.destroy(),o===r&&I(this,Wn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){ct.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return I(this,Wn).get(r)}getAll(){return[...I(this,Wn).values()]}find(r){const o={exact:!0,...r};return this.getAll().find(a=>Xm(o,a))}findAll(r={}){const o=this.getAll();return Object.keys(r).length>0?o.filter(a=>Xm(r,a)):o}notify(r){ct.batch(()=>{this.listeners.forEach(o=>{o(r)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Wn=new WeakMap,uy),tt,Zr,eo,zs,Ds,to,Os,_s,dy,kS=(dy=class{constructor(t={}){we(this,tt);we(this,Zr);we(this,eo);we(this,zs);we(this,Ds);we(this,to);we(this,Os);we(this,_s);de(this,tt,t.queryCache||new SS),de(this,Zr,t.mutationCache||new wS),de(this,eo,t.defaultOptions||{}),de(this,zs,new Map),de(this,Ds,new Map),de(this,to,0)}mount(){bl(this,to)._++,I(this,to)===1&&(de(this,Os,Pf.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,tt).onFocus())})),de(this,_s,ql.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,tt).onOnline())})))}unmount(){var t,r;bl(this,to)._--,I(this,to)===0&&((t=I(this,Os))==null||t.call(this),de(this,Os,void 0),(r=I(this,_s))==null||r.call(this),de(this,_s,void 0))}isFetching(t){return I(this,tt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return I(this,Zr).findAll({...t,status:"pending"}).length}getQueryData(t){var o;const r=this.defaultQueryOptions({queryKey:t});return(o=I(this,tt).get(r.queryHash))==null?void 0:o.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),o=I(this,tt).build(this,r),a=o.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&o.isStaleByTime(no(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(a))}getQueriesData(t){return I(this,tt).findAll(t).map(({queryKey:r,state:o})=>{const a=o.data;return[r,a]})}setQueryData(t,r,o){const a=this.defaultQueryOptions({queryKey:t}),l=I(this,tt).get(a.queryHash),c=l==null?void 0:l.state.data,f=rS(r,c);if(f!==void 0)return I(this,tt).build(this,a).setData(f,{...o,manual:!0})}setQueriesData(t,r,o){return ct.batch(()=>I(this,tt).findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,r,o)]))}getQueryState(t){var o;const r=this.defaultQueryOptions({queryKey:t});return(o=I(this,tt).get(r.queryHash))==null?void 0:o.state}removeQueries(t){const r=I(this,tt);ct.batch(()=>{r.findAll(t).forEach(o=>{r.remove(o)})})}resetQueries(t,r){const o=I(this,tt);return ct.batch(()=>(o.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const o={revert:!0,...r},a=ct.batch(()=>I(this,tt).findAll(t).map(l=>l.cancel(o)));return Promise.all(a).then(Mt).catch(Mt)}invalidateQueries(t,r={}){return ct.batch(()=>(I(this,tt).findAll(t).forEach(o=>{o.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},r)))}refetchQueries(t,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},a=ct.batch(()=>I(this,tt).findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,o);return o.throwOnError||(c=c.catch(Mt)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Mt)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const o=I(this,tt).build(this,r);return o.isStaleByTime(no(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mt).catch(Mt)}fetchInfiniteQuery(t){return t.behavior=sg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mt).catch(Mt)}ensureInfiniteQueryData(t){return t.behavior=sg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ql.isOnline()?I(this,Zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,tt)}getMutationCache(){return I(this,Zr)}getDefaultOptions(){return I(this,eo)}setDefaultOptions(t){de(this,eo,t)}setQueryDefaults(t,r){I(this,zs).set(Oo(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...I(this,zs).values()],o={};return r.forEach(a=>{Wa(t,a.queryKey)&&Object.assign(o,a.defaultOptions)}),o}setMutationDefaults(t,r){I(this,Ds).set(Oo(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...I(this,Ds).values()],o={};return r.forEach(a=>{Wa(t,a.mutationKey)&&Object.assign(o,a.defaultOptions)}),o}defaultQueryOptions(t){if(t._defaulted)return t;const r={...I(this,eo).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Cf(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===Ef&&(r.enabled=!1),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...I(this,eo).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){I(this,tt).clear(),I(this,Zr).clear()}},tt=new WeakMap,Zr=new WeakMap,eo=new WeakMap,zs=new WeakMap,Ds=new WeakMap,to=new WeakMap,Os=new WeakMap,_s=new WeakMap,dy),Vy=m.createContext(void 0),Yt=t=>{const r=m.useContext(Vy);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},CS=({client:t,children:r})=>(m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),u.jsx(Vy.Provider,{value:t,children:r})),Ky=m.createContext(!1),ES=()=>m.useContext(Ky);Ky.Provider;function NS(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var PS=m.createContext(NS()),RS=()=>m.useContext(PS),jS=(t,r,o)=>{const a=o!=null&&o.state.error&&typeof t.throwOnError=="function"?Nf(t.throwOnError,[o.state.error,o]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(r.isReset()||(t.retryOnMount=!1))},TS=t=>{m.useEffect(()=>{t.clearReset()},[t])},MS=({result:t,errorResetBoundary:r,throwOnError:o,query:a,suspense:l})=>t.isError&&!r.isReset()&&!t.isFetching&&a&&(l&&t.data===void 0||Nf(o,[t.error,a])),IS=t=>{if(t.suspense){const o=l=>l==="static"?l:Math.max(l??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...l)=>o(a(...l)):o(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},AS=(t,r)=>t.isLoading&&t.isFetching&&!r,LS=(t,r)=>(t==null?void 0:t.suspense)&&r.isPending,ig=(t,r,o)=>r.fetchOptimistic(t).catch(()=>{o.clearReset()});function zS(t,r,o){var k,w,N,v;const a=ES(),l=RS(),c=Yt(),f=c.defaultQueryOptions(t);(w=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||w.call(k,f);const h=c.getQueryCache().get(f.queryHash);f._optimisticResults=a?"isRestoring":"optimistic",IS(f),jS(f,l,h),TS(l);const g=!c.getQueryCache().get(f.queryHash),[y]=m.useState(()=>new r(c,f)),x=y.getOptimisticResult(f),b=!a&&t.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(C=>{const R=b?y.subscribe(ct.batchCalls(C)):Mt;return y.updateResult(),R},[y,b]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),m.useEffect(()=>{y.setOptions(f)},[f,y]),LS(f,x))throw ig(f,y,l);if(MS({result:x,errorResetBoundary:l,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw x.error;if((v=(N=c.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||v.call(N,f,x),f.experimental_prefetchInRender&&!Do&&AS(x,a)){const C=g?ig(f,y,l):h==null?void 0:h.promise;C==null||C.catch(Mt).finally(()=>{y.updateResult()})}return f.notifyOnChangeProps?x:y.trackResult(x)}function ao(t,r){return zS(t,mS)}function an(t,r){const o=Yt(),[a]=m.useState(()=>new bS(o,t));m.useEffect(()=>{a.setOptions(t)},[a,t]);const l=m.useSyncExternalStore(m.useCallback(f=>a.subscribe(ct.batchCalls(f)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=m.useCallback((f,h)=>{a.mutate(f,h).catch(Mt)},[a]);if(l.error&&Nf(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function Qy(t){var r,o,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(r=0;r<l;r++)t[r]&&(o=Qy(t[r]))&&(a&&(a+=" "),a+=o)}else for(o in t)t[o]&&(a&&(a+=" "),a+=o);return a}function qy(){for(var t,r,o=0,a="",l=arguments.length;o<l;o++)(t=arguments[o])&&(r=Qy(t))&&(a&&(a+=" "),a+=r);return a}const jf="-",DS=t=>{const r=_S(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:f=>{const h=f.split(jf);return h[0]===""&&h.length!==1&&h.shift(),Gy(h,r)||OS(f)},getConflictingClassGroupIds:(f,h)=>{const g=o[f]||[];return h&&a[f]?[...g,...a[f]]:g}}},Gy=(t,r)=>{var f;if(t.length===0)return r.classGroupId;const o=t[0],a=r.nextPart.get(o),l=a?Gy(t.slice(1),a):void 0;if(l)return l;if(r.validators.length===0)return;const c=t.join(jf);return(f=r.validators.find(({validator:h})=>h(c)))==null?void 0:f.classGroupId},lg=/^\[(.+)\]$/,OS=t=>{if(lg.test(t)){const r=lg.exec(t)[1],o=r==null?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},_S=t=>{const{theme:r,prefix:o}=t,a={nextPart:new Map,validators:[]};return US(Object.entries(t.classGroups),o).forEach(([c,f])=>{Qd(f,a,c,r)}),a},Qd=(t,r,o,a)=>{t.forEach(l=>{if(typeof l=="string"){const c=l===""?r:cg(r,l);c.classGroupId=o;return}if(typeof l=="function"){if(FS(l)){Qd(l(a),r,o,a);return}r.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([c,f])=>{Qd(f,cg(r,c),o,a)})})},cg=(t,r)=>{let o=t;return r.split(jf).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},FS=t=>t.isThemeGetter,US=(t,r)=>r?t.map(([o,a])=>{const l=a.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([f,h])=>[r+f,h])):c);return[o,l]}):t,$S=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,a=new Map;const l=(c,f)=>{o.set(c,f),r++,r>t&&(r=0,a=o,o=new Map)};return{get(c){let f=o.get(c);if(f!==void 0)return f;if((f=a.get(c))!==void 0)return l(c,f),f},set(c,f){o.has(c)?o.set(c,f):l(c,f)}}},Yy="!",BS=t=>{const{separator:r,experimentalParseClassName:o}=t,a=r.length===1,l=r[0],c=r.length,f=h=>{const g=[];let y=0,x=0,b;for(let C=0;C<h.length;C++){let R=h[C];if(y===0){if(R===l&&(a||h.slice(C,C+c)===r)){g.push(h.slice(x,C)),x=C+c;continue}if(R==="/"){b=C;continue}}R==="["?y++:R==="]"&&y--}const k=g.length===0?h:h.substring(x),w=k.startsWith(Yy),N=w?k.substring(1):k,v=b&&b>x?b-x:void 0;return{modifiers:g,hasImportantModifier:w,baseClassName:N,maybePostfixModifierPosition:v}};return o?h=>o({className:h,parseClassName:f}):f},HS=t=>{if(t.length<=1)return t;const r=[];let o=[];return t.forEach(a=>{a[0]==="["?(r.push(...o.sort(),a),o=[]):o.push(a)}),r.push(...o.sort()),r},WS=t=>({cache:$S(t.cacheSize),parseClassName:BS(t),...DS(t)}),VS=/\s+/,KS=(t,r)=>{const{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:l}=r,c=[],f=t.trim().split(VS);let h="";for(let g=f.length-1;g>=0;g-=1){const y=f[g],{modifiers:x,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:w}=o(y);let N=!!w,v=a(N?k.substring(0,w):k);if(!v){if(!N){h=y+(h.length>0?" "+h:h);continue}if(v=a(k),!v){h=y+(h.length>0?" "+h:h);continue}N=!1}const C=HS(x).join(":"),R=b?C+Yy:C,j=R+v;if(c.includes(j))continue;c.push(j);const P=l(v,N);for(let A=0;A<P.length;++A){const $=P[A];c.push(R+$)}h=y+(h.length>0?" "+h:h)}return h};function QS(){let t=0,r,o,a="";for(;t<arguments.length;)(r=arguments[t++])&&(o=Xy(r))&&(a&&(a+=" "),a+=o);return a}const Xy=t=>{if(typeof t=="string")return t;let r,o="";for(let a=0;a<t.length;a++)t[a]&&(r=Xy(t[a]))&&(o&&(o+=" "),o+=r);return o};function qS(t,...r){let o,a,l,c=f;function f(g){const y=r.reduce((x,b)=>b(x),t());return o=WS(y),a=o.cache.get,l=o.cache.set,c=h,h(g)}function h(g){const y=a(g);if(y)return y;const x=KS(g,o);return l(g,x),x}return function(){return c(QS.apply(null,arguments))}}const qe=t=>{const r=o=>o[t]||[];return r.isThemeGetter=!0,r},Jy=/^\[(?:([a-z-]+):)?(.+)\]$/i,GS=/^\d+\/\d+$/,YS=new Set(["px","full","screen"]),XS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JS=/\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$/,ZS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ek=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=t=>Ss(t)||YS.has(t)||GS.test(t),Hr=t=>Vs(t,"length",ck),Ss=t=>!!t&&!Number.isNaN(Number(t)),vd=t=>Vs(t,"number",Ss),Oa=t=>!!t&&Number.isInteger(Number(t)),nk=t=>t.endsWith("%")&&Ss(t.slice(0,-1)),Re=t=>Jy.test(t),Wr=t=>XS.test(t),rk=new Set(["length","size","percentage"]),ok=t=>Vs(t,rk,Zy),sk=t=>Vs(t,"position",Zy),ak=new Set(["image","url"]),ik=t=>Vs(t,ak,dk),lk=t=>Vs(t,"",uk),_a=()=>!0,Vs=(t,r,o)=>{const a=Jy.exec(t);return a?a[1]?typeof r=="string"?a[1]===r:r.has(a[1]):o(a[2]):!1},ck=t=>JS.test(t)&&!ZS.test(t),Zy=()=>!1,uk=t=>ek.test(t),dk=t=>tk.test(t),fk=()=>{const t=qe("colors"),r=qe("spacing"),o=qe("blur"),a=qe("brightness"),l=qe("borderColor"),c=qe("borderRadius"),f=qe("borderSpacing"),h=qe("borderWidth"),g=qe("contrast"),y=qe("grayscale"),x=qe("hueRotate"),b=qe("invert"),k=qe("gap"),w=qe("gradientColorStops"),N=qe("gradientColorStopPositions"),v=qe("inset"),C=qe("margin"),R=qe("opacity"),j=qe("padding"),P=qe("saturate"),A=qe("scale"),$=qe("sepia"),B=qe("skew"),W=qe("space"),X=qe("translate"),H=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Re,r],O=()=>[Re,r],Z=()=>["",ar,Hr],ee=()=>["auto",Ss,Re],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",Re],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Ss,Re];return{cacheSize:500,separator:":",theme:{colors:[_a],spacing:[ar,Hr],blur:["none","",Wr,Re],brightness:M(),borderColor:[t],borderRadius:["none","","full",Wr,Re],borderSpacing:O(),borderWidth:Z(),contrast:M(),grayscale:q(),hueRotate:M(),invert:q(),gap:O(),gradientColorStops:[t],gradientColorStopPositions:[nk,Hr],inset:_(),margin:_(),opacity:M(),padding:O(),saturate:M(),scale:M(),sepia:q(),skew:M(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[Wr]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...G(),Re]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oa,Re]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Oa,Re]}],"grid-cols":[{"grid-cols":[_a]}],"col-start-end":[{col:["auto",{span:["full",Oa,Re]},Re]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[_a]}],"row-start-end":[{row:["auto",{span:[Oa,Re]},Re]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,r]}],"min-w":[{"min-w":[Re,r,"min","max","fit"]}],"max-w":[{"max-w":[Re,r,"none","full","min","max","fit","prose",{screen:[Wr]},Wr]}],h:[{h:[Re,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Wr,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vd]}],"font-family":[{font:[_a]}],"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",Re]}],"line-clamp":[{"line-clamp":["none",Ss,vd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,Hr]}],"underline-offset":[{"underline-offset":["auto",ar,Re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],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",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),sk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ok]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ik]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"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":[R]}],"border-style":[{border:[...ie(),"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":[R]}],"divide-style":[{divide:ie()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[ar,Re]}],"outline-w":[{outline:[ar,Hr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[ar,Hr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Wr,lk]}],"shadow-color":[{shadow:[_a]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...ce(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ce()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Wr,Re]}],grayscale:[{grayscale:[y]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[b]}],saturate:[{saturate:[P]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Oa,Re]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",t]}],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",Re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ar,Hr,vd]}],stroke:[{stroke:[t,"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"]}}},hk=qS(fk);function me(...t){return hk(qy(t))}const ev="nextclaw.ui.language",ug=[{value:"en",label:"English"},{value:"zh",label:"中文"}],pk={en:"en-US",zh:"zh-CN"};let Va="en",qd=!1;const Gd=new Set;function mk(t){return t==="en"||t==="zh"}function gk(){var r;return typeof navigator>"u"?"en":(((r=navigator.language)==null?void 0:r.toLowerCase())??"en").startsWith("zh")?"zh":"en"}function yk(){if(typeof window>"u")return"en";try{const t=window.localStorage.getItem(ev);if(mk(t))return t}catch{}return gk()}function Tf(){return qd||(Va=yk(),qd=!0),Va}function Ks(){return qd?Va:Tf()}function vk(t){if(Tf(),Va!==t){if(Va=t,typeof window<"u")try{window.localStorage.setItem(ev,t)}catch{}Gd.forEach(r=>r(t))}}function xk(t){return Gd.add(t),()=>{Gd.delete(t)}}function Mf(t=Ks()){return pk[t]}function If(t,r=Ks()){if(!t)return"-";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?typeof t=="string"?t:"-":o.toLocaleString(Mf(r))}function wk(t,r=Ks()){if(!t)return"-";const o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?typeof t=="string"?t:"-":new Intl.DateTimeFormat(Mf(r),{year:"numeric",month:"2-digit",day:"2-digit"}).format(o)}function tv(t,r=Ks()){return new Intl.NumberFormat(Mf(r)).format(t)}const dg={model:{zh:"模型",en:"Model"},providers:{zh:"提供商",en:"Providers"},channels:{zh:"渠道",en:"Channels"},cron:{zh:"定时任务",en:"Cron Jobs"},runtime:{zh:"路由与运行时",en:"Routing & Runtime"},marketplace:{zh:"市场",en:"Marketplace"},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"},confirm:{zh:"确认",en:"Confirm"},unchanged:{zh:"未修改",en:"Unchanged"},saving:{zh:"保存中...",en:"Saving..."},remove:{zh:"移除",en:"Remove"},all:{zh:"全部",en:"All"},prev:{zh:"上一页",en:"Prev"},next:{zh:"下一页",en:"Next"},language:{zh:"语言",en:"Language"},modelPageTitle:{zh:"模型配置",en:"Model Configuration"},modelPageDescription:{zh:"配置默认 AI 模型和运行参数限制",en:"Configure default AI model and runtime limits"},defaultModel:{zh:"默认模型",en:"Default Model"},workspace:{zh:"工作空间",en:"Workspace"},generationParameters:{zh:"生成参数",en:"Generation Parameters"},modelName:{zh:"模型",en:"Model"},maxTokens:{zh:"最大 Token 数",en:"Max Tokens"},maxToolIterations:{zh:"最大工具迭代次数",en:"Max Tool Iterations"},saveChanges:{zh:"保存变更",en:"Save Changes"},providersPageTitle:{zh:"AI 提供商",en:"AI Providers"},providersLoading:{zh:"加载中...",en:"Loading..."},providersTabConfigured:{zh:"已配置",en:"Configured"},providersTabAll:{zh:"全部提供商",en:"All Providers"},providersDefaultDescription:{zh:"为你的 Agent 配置 AI 服务",en:"Configure AI services for your agents"},providersEmptyTitle:{zh:"尚未配置提供商",en:"No providers configured"},providersEmptyDescription:{zh:"添加一个 AI 提供商后即可开始使用。",en:"Add an AI provider to start using the platform."},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"},providerFormDescription:{zh:"配置 AI 提供商的 API 密钥与参数",en:"Configure API keys and parameters for AI provider"},enterApiKey:{zh:"请输入 API 密钥",en:"Enter API Key"},leaveBlankToKeepUnchanged:{zh:"留空则保持不变",en:"Leave blank to keep unchanged"},channelsPageTitle:{zh:"消息渠道",en:"Message Channels"},channelsLoading:{zh:"加载渠道中...",en:"Loading channels..."},channelsTabEnabled:{zh:"已启用",en:"Enabled"},channelsTabAll:{zh:"全部渠道",en:"All Channels"},channelsEmptyTitle:{zh:"暂无启用渠道",en:"No channels enabled"},channelsEmptyDescription:{zh:"启用一个消息渠道以开始接收消息。",en:"Enable a messaging channel to start receiving messages."},channelDescriptionDefault:{zh:"配置该通信渠道",en:"Configure this communication channel"},channelDescTelegram:{zh:"连接 Telegram 机器人以进行即时消息收发",en:"Connect with Telegram bots for instant messaging"},channelDescSlack:{zh:"接入 Slack 工作区进行团队协作消息处理",en:"Integrate with Slack workspaces for team collaboration"},channelDescEmail:{zh:"通过邮件协议收发消息",en:"Send and receive messages via email protocols"},channelDescWebhook:{zh:"接收 HTTP Webhook 以支持自定义集成",en:"Receive HTTP webhooks for custom integrations"},channelDescDiscord:{zh:"将 Discord 机器人连接到你的社区服务器",en:"Connect Discord bots to your community servers"},channelDescFeishu:{zh:"企业消息与协作平台接入",en:"Enterprise messaging and collaboration platform"},configureMessageChannelParameters:{zh:"配置消息渠道参数",en:"Configure message channel parameters"},channelsGuideTitle:{zh:"查看指南",en:"View Guide"},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"},accountId:{zh:"账号 ID",en:"Account ID"},dmPolicy:{zh:"私聊策略",en:"DM Policy"},groupAllowFrom:{zh:"群组允许来源",en:"Group Allow From"},requireMention:{zh:"需要 @ 提及",en:"Require Mention"},mentionPatterns:{zh:"提及匹配规则",en:"Mention Patterns"},groupRulesJson:{zh:"群组规则(JSON)",en:"Group Rules (JSON)"},allowBotMessages:{zh:"允许机器人消息",en:"Allow Bot Messages"},attachmentMaxSizeMb:{zh:"附件最大体积(MB)",en:"Attachment Max Size (MB)"},streamingMode:{zh:"流式模式",en:"Streaming Mode"},draftChunkingJson:{zh:"草稿分块(JSON)",en:"Draft Chunking (JSON)"},textChunkLimit:{zh:"文本分块上限",en:"Text Chunk Limit"},invalidJson:{zh:"JSON 格式无效",en:"Invalid JSON"},runtimePageTitle:{zh:"路由与运行时",en:"Routing & Runtime"},runtimePageDescription:{zh:"对齐 OpenClaw 的多 Agent 路由:绑定规则、Agent 池、私聊范围。",en:"Align multi-agent routing with OpenClaw: bindings, agent pool, and DM scope."},runtimeLoading:{zh:"加载运行时配置中...",en:"Loading runtime settings..."},dmScope:{zh:"私聊范围",en:"DM Scope"},dmScopeHelp:{zh:"控制私聊会话如何隔离。",en:"Control how direct-message sessions are isolated."},defaultContextTokens:{zh:"默认上下文 Token",en:"Default Context Tokens"},defaultContextTokensHelp:{zh:"当 Agent 未设置单独值时使用该上下文预算。",en:"Input context budget for agents when no per-agent override is set."},maxPingPongTurns:{zh:"最大乒乓轮次",en:"Max Ping-Pong Turns"},maxPingPongTurnsHelp:{zh:"设为 0 可阻止 Agent 间自动 ping-pong。",en:"Set to 0 to block automatic agent-to-agent ping-pong loops."},agentList:{zh:"Agent 列表",en:"Agent List"},agentListHelp:{zh:"在同一个网关进程中运行多个固定角色 Agent。",en:"Run multiple fixed-role agents in one gateway process."},bindings:{zh:"绑定规则",en:"Bindings"},bindingsHelp:{zh:"根据渠道 + 账号 + 对端将入站消息路由到目标 Agent。",en:"Route inbound message by channel + account + peer to target agent."},agentIdRequiredError:{zh:"agents.list[{index}].id 必填",en:"agents.list[{index}].id is required"},duplicateAgentId:{zh:"重复的 agent id",en:"Duplicate agent id"},bindingAgentIdRequired:{zh:"bindings[{index}].agentId 必填",en:"bindings[{index}].agentId is required"},bindingAgentIdNotFound:{zh:"bindings[{index}].agentId 未在 agents.list/main 中找到",en:"bindings[{index}].agentId not found in agents.list/main"},bindingChannelRequired:{zh:"bindings[{index}].match.channel 必填",en:"bindings[{index}].match.channel is required"},bindingPeerIdRequired:{zh:"设置 peer.kind 时,bindings[{index}].match.peer.id 必填",en:"bindings[{index}].match.peer.id is required when peer.kind is set"},agentIdPlaceholder:{zh:"Agent ID(例如 engineer)",en:"Agent ID (e.g. engineer)"},workspaceOverridePlaceholder:{zh:"工作空间覆盖(可选)",en:"Workspace override (optional)"},modelOverridePlaceholder:{zh:"模型覆盖(可选)",en:"Model override (optional)"},maxTokensPlaceholder:{zh:"最大 tokens",en:"Max tokens"},contextTokensPlaceholder:{zh:"上下文 tokens",en:"Context tokens"},maxToolsPlaceholder:{zh:"最大工具次数",en:"Max tools"},defaultAgent:{zh:"默认 Agent",en:"Default agent"},addAgent:{zh:"添加 Agent",en:"Add Agent"},targetAgentIdPlaceholder:{zh:"目标 Agent ID",en:"Target agent ID"},channelPlaceholder:{zh:"渠道(例如 discord)",en:"Channel (e.g. discord)"},accountIdOptionalPlaceholder:{zh:"账号 ID(可选)",en:"Account ID (optional)"},peerKindOptional:{zh:"对端类型(可选)",en:"Peer kind (optional)"},peerIdPlaceholder:{zh:"对端 ID(需先设置对端类型)",en:"Peer ID (requires peer kind)"},addBinding:{zh:"添加绑定",en:"Add Binding"},saveRuntimeSettings:{zh:"保存运行时设置",en:"Save Runtime Settings"},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"},sessionsAllChannels:{zh:"全部渠道",en:"All Channels"},sessionsMetadata:{zh:"元信息",en:"Metadata"},sessionsNoSelectionTitle:{zh:"未选择会话",en:"No Session Selected"},sessionsNoSelectionDescription:{zh:"从左侧列表选择一个会话以查看聊天历史并配置其元信息。",en:"Select a session from the list on the left to view its chat history and configure its metadata."},cronPageTitle:{zh:"定时任务",en:"Cron Jobs"},cronPageDescription:{zh:"查看与删除定时任务,关注执行时间与状态。",en:"View and delete cron jobs, track schedule and status."},cronSearchPlaceholder:{zh:"搜索名称 / 消息 / ID",en:"Search name / message / ID"},cronStatusLabel:{zh:"状态",en:"Status"},cronStatusAll:{zh:"全部",en:"All"},cronStatusEnabled:{zh:"仅启用",en:"Enabled"},cronStatusDisabled:{zh:"仅禁用",en:"Disabled"},cronTotalLabel:{zh:"总数",en:"Total"},cronLoading:{zh:"加载定时任务中...",en:"Loading cron jobs..."},cronEmpty:{zh:"暂无定时任务。",en:"No cron jobs yet."},cronScheduleLabel:{zh:"计划",en:"Schedule"},cronDeliverTo:{zh:"投递到",en:"Deliver to"},cronNextRun:{zh:"下次执行",en:"Next run"},cronLastRun:{zh:"上次执行",en:"Last run"},cronLastStatus:{zh:"上次状态",en:"Last status"},cronDeleteConfirm:{zh:"确认删除定时任务",en:"Delete cron job"},cronOneShot:{zh:"一次性",en:"One-shot"},cronEnable:{zh:"启用",en:"Enable"},cronDisable:{zh:"禁用",en:"Disable"},cronRunNow:{zh:"立即执行",en:"Run now"},cronEnableConfirm:{zh:"确认启用定时任务",en:"Enable cron job"},cronDisableConfirm:{zh:"确认禁用定时任务",en:"Disable cron job"},cronRunConfirm:{zh:"确认立即执行定时任务",en:"Run cron job now"},cronRunForceConfirm:{zh:"任务已禁用,仍要立即执行",en:"Cron job disabled. Force run now"},marketplacePageTitle:{zh:"市场",en:"Marketplace"},marketplacePageDescription:{zh:"更清爽的扩展列表,聚焦安装/启用/禁用。",en:"A cleaner extension list focused on install / enable / disable."},marketplaceTabMarketplace:{zh:"市场",en:"Marketplace"},marketplaceTabInstalled:{zh:"已安装",en:"Installed"},marketplaceSearchPlaceholder:{zh:"搜索扩展...",en:"Search extensions..."},marketplaceFilterAll:{zh:"全部",en:"All"},marketplaceFilterPlugins:{zh:"插件",en:"Plugins"},marketplaceFilterSkills:{zh:"技能",en:"Skills"},marketplaceSortRelevance:{zh:"相关性",en:"Relevance"},marketplaceSortUpdated:{zh:"最近更新",en:"Recently Updated"},marketplaceUnknownItem:{zh:"未知项目",en:"Unknown Item"},marketplaceInstalledLocalSummary:{zh:"已在本地安装,市场暂无详情。",en:"Installed locally. Details are currently unavailable from marketplace."},marketplaceTypePlugin:{zh:"插件",en:"Plugin"},marketplaceTypeSkill:{zh:"技能",en:"Skill"},marketplaceTypeExtension:{zh:"扩展",en:"Extension"},marketplaceInstall:{zh:"安装",en:"Install"},marketplaceInstalling:{zh:"安装中...",en:"Installing..."},marketplaceEnable:{zh:"启用",en:"Enable"},marketplaceDisable:{zh:"禁用",en:"Disable"},marketplaceEnabling:{zh:"启用中...",en:"Enabling..."},marketplaceDisabling:{zh:"禁用中...",en:"Disabling..."},marketplaceUninstall:{zh:"卸载",en:"Uninstall"},marketplaceRemoving:{zh:"卸载中...",en:"Removing..."},marketplaceSectionInstalled:{zh:"已安装",en:"Installed"},marketplaceSectionExtensions:{zh:"扩展",en:"Extensions"},marketplaceErrorLoadingData:{zh:"加载市场数据失败",en:"Failed to load marketplace data"},marketplaceErrorLoadingInstalled:{zh:"加载已安装项目失败",en:"Failed to load installed items"},marketplaceNoItems:{zh:"未找到项目。",en:"No items found."},marketplaceNoInstalledItems:{zh:"未找到已安装项目。",en:"No installed items found."},marketplaceUninstallTitle:{zh:"确认卸载",en:"Uninstall"},marketplaceUninstallDescription:{zh:"该操作会移除扩展,后续可在市场中重新安装。",en:"This will remove the extension. You can install it again from the marketplace."},marketplaceInstallFailed:{zh:"安装失败",en:"Install failed"},marketplaceOperationFailed:{zh:"操作失败",en:"Operation failed"},marketplaceInstalledCountSuffix:{zh:"已安装",en:"installed"},connected:{zh:"已连接",en:"Connected"},disconnected:{zh:"未连接",en:"Disconnected"},connecting:{zh:"连接中...",en:"Connecting..."},feishuConnecting:{zh:"验证 / 连接中...",en:"Verifying / connecting..."},statusReady:{zh:"就绪",en:"Ready"},statusSetup:{zh:"待配置",en:"Setup"},statusActive:{zh:"活跃",en:"Active"},statusInactive:{zh:"未启用",en:"Inactive"},actionConfigure:{zh:"配置",en:"Configure"},actionAddProvider:{zh:"添加提供商",en:"Add Provider"},actionEnable:{zh:"启用",en:"Enable"},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"},docBrowserTitle:{zh:"帮助文档",en:"Help Docs"},docBrowserSearchPlaceholder:{zh:"搜索,也可以输入文档地址直接打开",en:"Search, or enter a doc URL to open"},docBrowserUrlPlaceholder:{zh:"输入文档路径,如 /guide/channels",en:"Enter a doc path, e.g. /guide/channels"},docBrowserOpenExternal:{zh:"文档中心打开",en:"Open in Docs"},docBrowserFloatMode:{zh:"悬浮窗口",en:"Float Window"},docBrowserDockMode:{zh:"固定到侧栏",en:"Dock to Sidebar"},docBrowserClose:{zh:"关闭",en:"Close"},docBrowserHelp:{zh:"帮助文档",en:"Help Docs"}};function E(t,r=Ks()){var o,a;return((o=dg[t])==null?void 0:o[r])||((a=dg[t])==null?void 0:a.en)||t}/**
52
52
  * @license lucide-react v0.462.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const xk=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ev=(...t)=>t.filter((r,o,a)=>!!r&&r.trim()!==""&&a.indexOf(r)===o).join(" ").trim();/**
56
+ */const bk=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nv=(...t)=>t.filter((r,o,a)=>!!r&&r.trim()!==""&&a.indexOf(r)===o).join(" ").trim();/**
57
57
  * @license lucide-react v0.462.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */var wk={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"};/**
61
+ */var Sk={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
62
  * @license lucide-react v0.462.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const bk=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:f,...h},g)=>m.createElement("svg",{ref:g,...wk,width:r,height:r,stroke:t,strokeWidth:a?Number(o)*24/Number(r):o,className:ev("lucide",l),...h},[...f.map(([y,x])=>m.createElement(y,x)),...Array.isArray(c)?c:[c]]));/**
66
+ */const kk=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:f,...h},g)=>m.createElement("svg",{ref:g,...Sk,width:r,height:r,stroke:t,strokeWidth:a?Number(o)*24/Number(r):o,className:nv("lucide",l),...h},[...f.map(([y,x])=>m.createElement(y,x)),...Array.isArray(c)?c:[c]]));/**
67
67
  * @license lucide-react v0.462.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Pe=(t,r)=>{const o=m.forwardRef(({className:a,...l},c)=>m.createElement(bk,{ref:c,iconNode:r,className:ev(`lucide-${xk(t)}`,a),...l}));return o.displayName=`${t}`,o};/**
71
+ */const Pe=(t,r)=>{const o=m.forwardRef(({className:a,...l},c)=>m.createElement(kk,{ref:c,iconNode:r,className:nv(`lucide-${bk(t)}`,a),...l}));return o.displayName=`${t}`,o};/**
72
72
  * @license lucide-react v0.462.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const tv=Pe("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
76
+ */const rv=Pe("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
77
77
  * @license lucide-react v0.462.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Sk=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
81
+ */const Ck=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
82
82
  * @license lucide-react v0.462.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const nv=Pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
86
+ */const ov=Pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
87
87
  * @license lucide-react v0.462.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const kk=Pe("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"}]]);/**
91
+ */const Ek=Pe("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"}]]);/**
92
92
  * @license lucide-react v0.462.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const rv=Pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
96
+ */const sv=Pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
97
97
  * @license lucide-react v0.462.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const Ck=Pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
101
+ */const Nk=Pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
102
102
  * @license lucide-react v0.462.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Ek=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106
+ */const Pk=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
107
107
  * @license lucide-react v0.462.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const ov=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111
+ */const av=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
112
112
  * @license lucide-react v0.462.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Nk=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
116
+ */const Rk=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
117
117
  * @license lucide-react v0.462.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const Pk=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
121
+ */const jk=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
122
122
  * @license lucide-react v0.462.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const Rk=Pe("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"}]]);/**
126
+ */const Tk=Pe("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"}]]);/**
127
127
  * @license lucide-react v0.462.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const sv=Pe("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"}]]);/**
131
+ */const iv=Pe("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"}]]);/**
132
132
  * @license lucide-react v0.462.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const jk=Pe("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"}]]);/**
136
+ */const Mk=Pe("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"}]]);/**
137
137
  * @license lucide-react v0.462.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const Tk=Pe("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"}]]);/**
141
+ */const Ik=Pe("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"}]]);/**
142
142
  * @license lucide-react v0.462.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const Mk=Pe("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"}]]);/**
146
+ */const Ak=Pe("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"}]]);/**
147
147
  * @license lucide-react v0.462.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Ik=Pe("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"}]]);/**
151
+ */const Lk=Pe("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"}]]);/**
152
152
  * @license lucide-react v0.462.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const av=Pe("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"}]]);/**
156
+ */const lv=Pe("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"}]]);/**
157
157
  * @license lucide-react v0.462.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const Ak=Pe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
161
+ */const zk=Pe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
162
162
  * @license lucide-react v0.462.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const Ql=Pe("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"}]]);/**
166
+ */const Gl=Pe("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"}]]);/**
167
167
  * @license lucide-react v0.462.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Lk=Pe("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"}]]);/**
171
+ */const Dk=Pe("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"}]]);/**
172
172
  * @license lucide-react v0.462.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const ug=Pe("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
176
+ */const fg=Pe("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
177
177
  * @license lucide-react v0.462.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const ql=Pe("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"}]]);/**
181
+ */const Yl=Pe("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"}]]);/**
182
182
  * @license lucide-react v0.462.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const zk=Pe("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
186
+ */const Ok=Pe("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
187
187
  * @license lucide-react v0.462.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const Dk=Pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
191
+ */const _k=Pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
192
192
  * @license lucide-react v0.462.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const Mf=Pe("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"}]]);/**
196
+ */const Af=Pe("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"}]]);/**
197
197
  * @license lucide-react v0.462.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const Ok=Pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
201
+ */const Fk=Pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
202
202
  * @license lucide-react v0.462.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const bs=Pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
206
+ */const ks=Pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
207
207
  * @license lucide-react v0.462.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const If=Pe("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"}]]);/**
211
+ */const Lf=Pe("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"}]]);/**
212
212
  * @license lucide-react v0.462.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const _k=Pe("PackageSearch",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]]);/**
216
+ */const Uk=Pe("PackageSearch",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]]);/**
217
217
  * @license lucide-react v0.462.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const Fk=Pe("PanelRightOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
221
+ */const $k=Pe("PanelRightOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
222
222
  * @license lucide-react v0.462.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const Uk=Pe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
226
+ */const Bk=Pe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
227
227
  * @license lucide-react v0.462.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const qd=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
231
+ */const Yd=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
232
232
  * @license lucide-react v0.462.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const $k=Pe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
236
+ */const Hk=Pe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
237
237
  * @license lucide-react v0.462.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const Gd=Pe("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"}]]);/**
241
+ */const Xd=Pe("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"}]]);/**
242
242
  * @license lucide-react v0.462.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const Bk=Pe("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"}]]);/**
246
+ */const Wk=Pe("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"}]]);/**
247
247
  * @license lucide-react v0.462.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const iv=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
251
+ */const cv=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
252
252
  * @license lucide-react v0.462.0 - ISC
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const lv=Pe("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"}]]);/**
256
+ */const uv=Pe("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"}]]);/**
257
257
  * @license lucide-react v0.462.0 - ISC
258
258
  *
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
- */const Wk=Pe("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"}]]);/**
261
+ */const Vk=Pe("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"}]]);/**
262
262
  * @license lucide-react v0.462.0 - ISC
263
263
  *
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
- */const Hk=Pe("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"}]]);/**
266
+ */const Kk=Pe("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"}]]);/**
267
267
  * @license lucide-react v0.462.0 - ISC
268
268
  *
269
269
  * This source code is licensed under the ISC license.
270
270
  * See the LICENSE file in the root directory of this source tree.
271
- */const cv=Pe("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"}]]);/**
271
+ */const dv=Pe("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"}]]);/**
272
272
  * @license lucide-react v0.462.0 - ISC
273
273
  *
274
274
  * This source code is licensed under the ISC license.
275
275
  * See the LICENSE file in the root directory of this source tree.
276
- */const Vk=Pe("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
276
+ */const Qk=Pe("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
277
277
  * @license lucide-react v0.462.0 - ISC
278
278
  *
279
279
  * This source code is licensed under the ISC license.
280
280
  * See the LICENSE file in the root directory of this source tree.
281
- */const Kk=Pe("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"}]]);/**
281
+ */const qk=Pe("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"}]]);/**
282
282
  * @license lucide-react v0.462.0 - ISC
283
283
  *
284
284
  * This source code is licensed under the ISC license.
285
285
  * See the LICENSE file in the root directory of this source tree.
286
- */const Gl=Pe("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"}]]);/**
286
+ */const Xl=Pe("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"}]]);/**
287
287
  * @license lucide-react v0.462.0 - ISC
288
288
  *
289
289
  * This source code is licensed under the ISC license.
290
290
  * See the LICENSE file in the root directory of this source tree.
291
- */const Qk=Pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
291
+ */const Gk=Pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
292
292
  * @license lucide-react v0.462.0 - ISC
293
293
  *
294
294
  * This source code is licensed under the ISC license.
295
295
  * See the LICENSE file in the root directory of this source tree.
296
- */const Af=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yd="docs.nextclaw.io",dg="nextclaw-docs.pages.dev",qk=new Set([Yd,`www.${Yd}`,dg,`www.${dg}`]),Fa=`https://${Yd}`;function kl(t){try{return new URL(t).pathname.replace(/\.html$/,"").replace(/\/$/,"")}catch{return t}}const uv=m.createContext(null);function ac(){const t=m.useContext(uv);if(!t)throw new Error("useDocBrowser must be used within DocBrowserProvider");return t}function Gk(t){try{const r=new URL(t,window.location.origin);return qk.has(r.hostname)}catch{return!1}}function Yk({children:t}){const[r,o]=m.useState({isOpen:!1,mode:"docked",currentUrl:`${Fa}/guide/getting-started`,history:[`${Fa}/guide/getting-started`],historyIndex:0,navVersion:0}),a=m.useCallback(N=>{const v=N||r.currentUrl||`${Fa}/guide/getting-started`;o(C=>({...C,isOpen:!0,currentUrl:v,history:[...C.history.slice(0,C.historyIndex+1),v],historyIndex:C.historyIndex+1,navVersion:C.navVersion+1}))},[r.currentUrl]),l=m.useCallback(()=>{o(N=>({...N,isOpen:!1}))},[]),c=m.useCallback(()=>{o(N=>({...N,mode:N.mode==="floating"?"docked":"floating"}))},[]),f=m.useCallback(N=>{o(v=>({...v,mode:N}))},[]),h=m.useCallback(N=>{o(v=>kl(N)===kl(v.currentUrl)?v:{...v,currentUrl:N,history:[...v.history.slice(0,v.historyIndex+1),N],historyIndex:v.historyIndex+1,navVersion:v.navVersion+1})},[]),g=m.useCallback(N=>{o(v=>kl(N)===kl(v.currentUrl)?v:{...v,currentUrl:N,history:[...v.history.slice(0,v.historyIndex+1),N],historyIndex:v.historyIndex+1})},[]),y=m.useCallback(()=>{o(N=>{if(N.historyIndex<=0)return N;const v=N.historyIndex-1;return{...N,historyIndex:v,currentUrl:N.history[v]}})},[]),x=m.useCallback(()=>{o(N=>{if(N.historyIndex>=N.history.length-1)return N;const v=N.historyIndex+1;return{...N,historyIndex:v,currentUrl:N.history[v]}})},[]),b=r.historyIndex>0,k=r.historyIndex<r.history.length-1,w=m.useMemo(()=>({...r,open:a,close:l,toggleMode:c,setMode:f,navigate:h,syncUrl:g,goBack:y,goForward:x,canGoBack:b,canGoForward:k}),[r,a,l,c,f,h,g,y,x,b,k]);return u.jsx(uv.Provider,{value:w,children:t})}function fg(){const{isOpen:t,mode:r,currentUrl:o,navVersion:a,close:l,toggleMode:c,goBack:f,goForward:h,canGoBack:g,canGoForward:y,navigate:x,syncUrl:b}=ac(),[k,w]=m.useState(""),[N,v]=m.useState(!1),[C,R]=m.useState(!1),[j,P]=m.useState(()=>({x:Math.max(40,window.innerWidth-520),y:80})),[A,$]=m.useState({w:480,h:600}),[B,H]=m.useState(420),X=m.useRef(null),W=m.useRef(null),Y=m.useRef(null),_=m.useRef(null),O=m.useRef(a);m.useEffect(()=>{try{const Q=new URL(o);w(Q.pathname)}catch{w(o)}},[o]),m.useEffect(()=>{var Q;if(a!==O.current){O.current=a;return}if((Q=_.current)!=null&&Q.contentWindow)try{const M=new URL(o).pathname;_.current.contentWindow.postMessage({type:"docs-navigate",path:M},"*")}catch{}},[o,a]),m.useEffect(()=>{r==="floating"&&P(Q=>({x:Math.max(40,window.innerWidth-A.w-40),y:Q.y}))},[r,A.w]),m.useEffect(()=>{const Q=M=>{var F;((F=M.data)==null?void 0:F.type)==="docs-route-change"&&typeof M.data.url=="string"&&b(M.data.url)};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[b]);const Z=m.useCallback(Q=>{Q.preventDefault();const M=k.trim();M&&(M.startsWith("/")?x(`${Fa}${M}`):M.startsWith("http")?x(M):x(`${Fa}/${M}`))},[k,x]),ee=m.useCallback(Q=>{r==="floating"&&(v(!0),X.current={startX:Q.clientX,startY:Q.clientY,startPosX:j.x,startPosY:j.y})},[r,j]);m.useEffect(()=>{if(!N)return;const Q=F=>{X.current&&P({x:X.current.startPosX+(F.clientX-X.current.startX),y:X.current.startPosY+(F.clientY-X.current.startY)})},M=()=>{v(!1),X.current=null};return window.addEventListener("mousemove",Q),window.addEventListener("mouseup",M),()=>{window.removeEventListener("mousemove",Q),window.removeEventListener("mouseup",M)}},[N]);const G=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0);const M=Q.currentTarget.dataset.axis;W.current={startX:Q.clientX,startY:Q.clientY,startW:A.w,startH:A.h};const F=J=>{W.current&&$(ue=>({w:M==="y"?ue.w:Math.max(360,W.current.startW+(J.clientX-W.current.startX)),h:M==="x"?ue.h:Math.max(400,W.current.startH+(J.clientY-W.current.startY))}))},le=()=>{R(!1),W.current=null,window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",le)};window.addEventListener("mousemove",F),window.addEventListener("mouseup",le)},[A]),ie=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0),Y.current={startX:Q.clientX,startW:B};const M=le=>{if(!Y.current)return;const J=Y.current.startX-le.clientX;H(Math.max(320,Math.min(800,Y.current.startW+J)))},F=()=>{R(!1),Y.current=null,window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",F)};window.addEventListener("mousemove",M),window.addEventListener("mouseup",F)},[B]),ce=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0);const M=Q.clientX,F=A.w,le=j.x,J=xe=>{const ne=M-xe.clientX,he=Math.max(360,F+ne);$(be=>({...be,w:he})),P(be=>({...be,x:le-(he-F)}))},ue=()=>{R(!1),window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",ue)};window.addEventListener("mousemove",J),window.addEventListener("mouseup",ue)},[A.w,j.x]);if(!t)return null;const K=r==="docked";return u.jsxs("div",{className:ge("flex flex-col bg-white overflow-hidden relative",K?"h-full border-l border-gray-200 shrink-0":"rounded-2xl shadow-2xl border border-gray-200"),style:K?{width:B}:{position:"fixed",left:j.x,top:j.y,width:A.w,height:A.h,zIndex:9999},children:[K&&u.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ie}),u.jsxs("div",{className:ge("flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200 shrink-0 select-none",!K&&"cursor-grab active:cursor-grabbing"),onMouseDown:K?void 0:ee,children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx(rv,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:E("docBrowserTitle")})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("button",{onClick:c,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:E(K?"docBrowserFloatMode":"docBrowserDockMode"),children:K?u.jsx(Ok,{className:"w-3.5 h-3.5"}):u.jsx(Fk,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:l,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:E("docBrowserClose"),children:u.jsx(Af,{className:"w-3.5 h-3.5"})})]})]}),u.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2 bg-white border-b border-gray-100 shrink-0",children:[u.jsx("button",{onClick:f,disabled:!g,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:u.jsx(Sk,{className:"w-4 h-4"})}),u.jsx("button",{onClick:h,disabled:!y,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:u.jsx(nv,{className:"w-4 h-4"})}),u.jsxs("form",{onSubmit:Z,className:"flex-1 relative",children:[u.jsx(iv,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),u.jsx("input",{type:"text",value:k,onChange:Q=>w(Q.target.value),placeholder:E("docBrowserSearchPlaceholder"),className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-50 border border-gray-200 text-xs text-gray-700 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors placeholder:text-gray-400"})]})]}),u.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[u.jsx("iframe",{ref:_,src:o,className:"absolute inset-0 w-full h-full border-0",title:"NextClaw Documentation",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",allow:"clipboard-read; clipboard-write"},a),(C||N)&&u.jsx("div",{className:"absolute inset-0 z-10"})]}),u.jsx("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 shrink-0",children:u.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer","data-doc-external":!0,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover font-medium transition-colors",children:[E("docBrowserOpenExternal"),u.jsx(sv,{className:"w-3 h-3"})]})}),!K&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ce}),u.jsx("div",{className:"absolute top-0 right-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:G,"data-axis":"x"}),u.jsx("div",{className:"absolute bottom-0 left-0 h-1.5 w-full cursor-ns-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:G,"data-axis":"y"}),u.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 cursor-se-resize z-30 flex items-center justify-center text-gray-300 hover:text-gray-500 transition-colors",onMouseDown:G,children:u.jsx(Ak,{className:"w-3 h-3 rotate-[-45deg]"})})]})]})}function Xk(){const t=ac();m.useEffect(()=>{const r=o=>{const a=o.target.closest("a[href]");if(!a)return;const l=a.getAttribute("href")||"";Gk(l)&&(a.hasAttribute("data-doc-external")||o.ctrlKey||o.metaKey||o.shiftKey||(o.preventDefault(),o.stopPropagation(),t.open(l)))};return document.addEventListener("click",r,!0),()=>document.removeEventListener("click",r,!0)},[t])}const dv=m.createContext(null);function Jk({children:t}){const[r,o]=m.useState(()=>Rf());m.useEffect(()=>yk(h=>{o(h)}),[]);const a=m.useCallback(f=>{gk(f),o(Hs())},[]),l=m.useCallback(()=>{a(r==="en"?"zh":"en")},[r,a]),c=m.useMemo(()=>({language:r,setLanguage:a,toggleLanguage:l}),[r,a,l]);return u.jsx(dv.Provider,{value:c,children:t})}function Zk(){const t=m.useContext(dv);if(!t)throw new Error("useI18n must be used within I18nProvider");return{...t,t:E}}function hg(t,[r,o]){return Math.min(o,Math.max(r,t))}function Oe(t,r,{checkForDefaultPrevented:o=!0}={}){return function(l){if(t==null||t(l),o===!1||!l.defaultPrevented)return r==null?void 0:r(l)}}function eC(t,r){const o=m.createContext(r),a=c=>{const{children:f,...h}=c,g=m.useMemo(()=>h,Object.values(h));return u.jsx(o.Provider,{value:g,children:f})};a.displayName=t+"Provider";function l(c){const f=m.useContext(o);if(f)return f;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[a,l]}function ni(t,r=[]){let o=[];function a(c,f){const h=m.createContext(f),g=o.length;o=[...o,f];const y=b=>{var R;const{scope:k,children:w,...N}=b,v=((R=k==null?void 0:k[t])==null?void 0:R[g])||h,C=m.useMemo(()=>N,Object.values(N));return u.jsx(v.Provider,{value:C,children:w})};y.displayName=c+"Provider";function x(b,k){var v;const w=((v=k==null?void 0:k[t])==null?void 0:v[g])||h,N=m.useContext(w);if(N)return N;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[y,x]}const l=()=>{const c=o.map(f=>m.createContext(f));return function(h){const g=(h==null?void 0:h[t])||c;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return l.scopeName=t,[a,tC(l,...r)]}function tC(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const a=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const f=a.reduce((h,{useScope:g,scopeName:y})=>{const b=g(c)[`__scope${y}`];return{...h,...b}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return o.scopeName=r.scopeName,o}function pg(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function fv(...t){return r=>{let o=!1;const a=t.map(l=>{const c=pg(l,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<a.length;l++){const c=a[l];typeof c=="function"?c():pg(t[l],null)}}}}function Ze(...t){return m.useCallback(fv(...t),t)}function Ha(t){const r=nC(t),o=m.forwardRef((a,l)=>{const{children:c,...f}=a,h=m.Children.toArray(c),g=h.find(oC);if(g){const y=g.props.children,x=h.map(b=>b===g?m.Children.count(y)>1?m.Children.only(null):m.isValidElement(y)?y.props.children:null:b);return u.jsx(r,{...f,ref:l,children:m.isValidElement(y)?m.cloneElement(y,void 0,x):null})}return u.jsx(r,{...f,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}function nC(t){const r=m.forwardRef((o,a)=>{const{children:l,...c}=o;if(m.isValidElement(l)){const f=aC(l),h=sC(c,l.props);return l.type!==m.Fragment&&(h.ref=a?fv(a,f):f),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var hv=Symbol("radix.slottable");function rC(t){const r=({children:o})=>u.jsx(u.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=hv,r}function oC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===hv}function sC(t,r){const o={...r};for(const a in r){const l=t[a],c=r[a];/^on[A-Z]/.test(a)?l&&c?o[a]=(...h)=>{const g=c(...h);return l(...h),g}:l&&(o[a]=l):a==="style"?o[a]={...l,...c}:a==="className"&&(o[a]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function aC(t){var a,l;let r=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function iC(t){const r=t+"CollectionProvider",[o,a]=ni(r),[l,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),f=v=>{const{scope:C,children:R}=v,j=ae.useRef(null),P=ae.useRef(new Map).current;return u.jsx(l,{scope:C,itemMap:P,collectionRef:j,children:R})};f.displayName=r;const h=t+"CollectionSlot",g=Ha(h),y=ae.forwardRef((v,C)=>{const{scope:R,children:j}=v,P=c(h,R),A=Ze(C,P.collectionRef);return u.jsx(g,{ref:A,children:j})});y.displayName=h;const x=t+"CollectionItemSlot",b="data-radix-collection-item",k=Ha(x),w=ae.forwardRef((v,C)=>{const{scope:R,children:j,...P}=v,A=ae.useRef(null),$=Ze(C,A),B=c(x,R);return ae.useEffect(()=>(B.itemMap.set(A,{ref:A,...P}),()=>void B.itemMap.delete(A))),u.jsx(k,{[b]:"",ref:$,children:j})});w.displayName=x;function N(v){const C=c(t+"CollectionConsumer",v);return ae.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const P=Array.from(j.querySelectorAll(`[${b}]`));return Array.from(C.itemMap.values()).sort((B,H)=>P.indexOf(B.ref.current)-P.indexOf(H.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:f,Slot:y,ItemSlot:w},N,a]}var lC=m.createContext(void 0);function cC(t){const r=m.useContext(lC);return t||r||"ltr"}var uC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=uC.reduce((t,r)=>{const o=Ha(`Primitive.${r}`),a=m.forwardRef((l,c)=>{const{asChild:f,...h}=l,g=f?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...h,ref:c})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function dC(t,r){t&&ti.flushSync(()=>t.dispatchEvent(r))}function _o(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...o)=>{var a;return(a=r.current)==null?void 0:a.call(r,...o)},[])}function fC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t);m.useEffect(()=>{const a=l=>{l.key==="Escape"&&o(l)};return r.addEventListener("keydown",a,{capture:!0}),()=>r.removeEventListener("keydown",a,{capture:!0})},[o,r])}var hC="DismissableLayer",Xd="dismissableLayer.update",pC="dismissableLayer.pointerDownOutside",mC="dismissableLayer.focusOutside",mg,pv=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ic=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...g}=t,y=m.useContext(pv),[x,b]=m.useState(null),k=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=m.useState({}),N=Ze(r,H=>b(H)),v=Array.from(y.layers),[C]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),R=v.indexOf(C),j=x?v.indexOf(x):-1,P=y.layersWithOutsidePointerEventsDisabled.size>0,A=j>=R,$=vC(H=>{const X=H.target,W=[...y.branches].some(Y=>Y.contains(X));!A||W||(l==null||l(H),f==null||f(H),H.defaultPrevented||h==null||h())},k),B=xC(H=>{const X=H.target;[...y.branches].some(Y=>Y.contains(X))||(c==null||c(H),f==null||f(H),H.defaultPrevented||h==null||h())},k);return fC(H=>{j===y.layers.size-1&&(a==null||a(H),!H.defaultPrevented&&h&&(H.preventDefault(),h()))},k),m.useEffect(()=>{if(x)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(mg=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(x)),y.layers.add(x),gg(),()=>{o&&y.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=mg)}},[x,k,o,y]),m.useEffect(()=>()=>{x&&(y.layers.delete(x),y.layersWithOutsidePointerEventsDisabled.delete(x),gg())},[x,y]),m.useEffect(()=>{const H=()=>w({});return document.addEventListener(Xd,H),()=>document.removeEventListener(Xd,H)},[]),u.jsx(Be.div,{...g,ref:N,style:{pointerEvents:P?A?"auto":"none":void 0,...t.style},onFocusCapture:Oe(t.onFocusCapture,B.onFocusCapture),onBlurCapture:Oe(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Oe(t.onPointerDownCapture,$.onPointerDownCapture)})});ic.displayName=hC;var gC="DismissableLayerBranch",yC=m.forwardRef((t,r)=>{const o=m.useContext(pv),a=m.useRef(null),l=Ze(r,a);return m.useEffect(()=>{const c=a.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),u.jsx(Be.div,{...t,ref:l})});yC.displayName=gC;function vC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t),a=m.useRef(!1),l=m.useRef(()=>{});return m.useEffect(()=>{const c=h=>{if(h.target&&!a.current){let g=function(){mv(pC,o,y,{discrete:!0})};const y={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=g,r.addEventListener("click",l.current,{once:!0})):g()}else r.removeEventListener("click",l.current);a.current=!1},f=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),r.removeEventListener("pointerdown",c),r.removeEventListener("click",l.current)}},[r,o]),{onPointerDownCapture:()=>a.current=!0}}function xC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t),a=m.useRef(!1);return m.useEffect(()=>{const l=c=>{c.target&&!a.current&&mv(mC,o,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,o]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function gg(){const t=new CustomEvent(Xd);document.dispatchEvent(t)}function mv(t,r,o,{discrete:a}){const l=o.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&l.addEventListener(t,r,{once:!0}),a?dC(l,c):l.dispatchEvent(c)}var yd=0;function gv(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??yg()),document.body.insertAdjacentElement("beforeend",t[1]??yg()),yd++,()=>{yd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),yd--}},[])}function yg(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var vd="focusScope.autoFocusOnMount",xd="focusScope.autoFocusOnUnmount",vg={bubbles:!1,cancelable:!0},wC="FocusScope",Lf=m.forwardRef((t,r)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...f}=t,[h,g]=m.useState(null),y=_o(l),x=_o(c),b=m.useRef(null),k=Ze(r,v=>g(v)),w=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let v=function(P){if(w.paused||!h)return;const A=P.target;h.contains(A)?b.current=A:Kr(b.current,{select:!0})},C=function(P){if(w.paused||!h)return;const A=P.relatedTarget;A!==null&&(h.contains(A)||Kr(b.current,{select:!0}))},R=function(P){if(document.activeElement===document.body)for(const $ of P)$.removedNodes.length>0&&Kr(h)};document.addEventListener("focusin",v),document.addEventListener("focusout",C);const j=new MutationObserver(R);return h&&j.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",C),j.disconnect()}}},[a,h,w.paused]),m.useEffect(()=>{if(h){wg.add(w);const v=document.activeElement;if(!h.contains(v)){const R=new CustomEvent(vd,vg);h.addEventListener(vd,y),h.dispatchEvent(R),R.defaultPrevented||(bC(NC(yv(h)),{select:!0}),document.activeElement===v&&Kr(h))}return()=>{h.removeEventListener(vd,y),setTimeout(()=>{const R=new CustomEvent(xd,vg);h.addEventListener(xd,x),h.dispatchEvent(R),R.defaultPrevented||Kr(v??document.body,{select:!0}),h.removeEventListener(xd,x),wg.remove(w)},0)}}},[h,y,x,w]);const N=m.useCallback(v=>{if(!o&&!a||w.paused)return;const C=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,R=document.activeElement;if(C&&R){const j=v.currentTarget,[P,A]=SC(j);P&&A?!v.shiftKey&&R===A?(v.preventDefault(),o&&Kr(P,{select:!0})):v.shiftKey&&R===P&&(v.preventDefault(),o&&Kr(A,{select:!0})):R===j&&v.preventDefault()}},[o,a,w.paused]);return u.jsx(Be.div,{tabIndex:-1,...f,ref:k,onKeyDown:N})});Lf.displayName=wC;function bC(t,{select:r=!1}={}){const o=document.activeElement;for(const a of t)if(Kr(a,{select:r}),document.activeElement!==o)return}function SC(t){const r=yv(t),o=xg(r,t),a=xg(r.reverse(),t);return[o,a]}function yv(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function xg(t,r){for(const o of t)if(!kC(o,{upTo:r}))return o}function kC(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function CC(t){return t instanceof HTMLInputElement&&"select"in t}function Kr(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&CC(t)&&r&&t.select()}}var wg=EC();function EC(){let t=[];return{add(r){const o=t[0];r!==o&&(o==null||o.pause()),t=bg(t,r),t.unshift(r)},remove(r){var o;t=bg(t,r),(o=t[0])==null||o.resume()}}}function bg(t,r){const o=[...t],a=o.indexOf(r);return a!==-1&&o.splice(a,1),o}function NC(t){return t.filter(r=>r.tagName!=="A")}var Et=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},PC=dy[" useId ".trim().toString()]||(()=>{}),RC=0;function Lo(t){const[r,o]=m.useState(PC());return Et(()=>{o(a=>a??String(RC++))},[t]),r?`radix-${r}`:""}const jC=["top","right","bottom","left"],ro=Math.min,Qt=Math.max,Yl=Math.round,Cl=Math.floor,Qn=t=>({x:t,y:t}),TC={left:"right",right:"left",bottom:"top",top:"bottom"},MC={start:"end",end:"start"};function Jd(t,r,o){return Qt(t,ro(r,o))}function gr(t,r){return typeof t=="function"?t(r):t}function yr(t){return t.split("-")[0]}function Vs(t){return t.split("-")[1]}function zf(t){return t==="x"?"y":"x"}function Df(t){return t==="y"?"height":"width"}const IC=new Set(["top","bottom"]);function Kn(t){return IC.has(yr(t))?"y":"x"}function Of(t){return zf(Kn(t))}function AC(t,r,o){o===void 0&&(o=!1);const a=Vs(t),l=Of(t),c=Df(l);let f=l==="x"?a===(o?"end":"start")?"right":"left":a==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(f=Xl(f)),[f,Xl(f)]}function LC(t){const r=Xl(t);return[Zd(t),r,Zd(r)]}function Zd(t){return t.replace(/start|end/g,r=>MC[r])}const Sg=["left","right"],kg=["right","left"],zC=["top","bottom"],DC=["bottom","top"];function OC(t,r,o){switch(t){case"top":case"bottom":return o?r?kg:Sg:r?Sg:kg;case"left":case"right":return r?zC:DC;default:return[]}}function _C(t,r,o,a){const l=Vs(t);let c=OC(yr(t),o==="start",a);return l&&(c=c.map(f=>f+"-"+l),r&&(c=c.concat(c.map(Zd)))),c}function Xl(t){return t.replace(/left|right|bottom|top/g,r=>TC[r])}function FC(t){return{top:0,right:0,bottom:0,left:0,...t}}function vv(t){return typeof t!="number"?FC(t):{top:t,right:t,bottom:t,left:t}}function Jl(t){const{x:r,y:o,width:a,height:l}=t;return{width:a,height:l,top:o,left:r,right:r+a,bottom:o+l,x:r,y:o}}function Cg(t,r,o){let{reference:a,floating:l}=t;const c=Kn(r),f=Of(r),h=Df(f),g=yr(r),y=c==="y",x=a.x+a.width/2-l.width/2,b=a.y+a.height/2-l.height/2,k=a[h]/2-l[h]/2;let w;switch(g){case"top":w={x,y:a.y-l.height};break;case"bottom":w={x,y:a.y+a.height};break;case"right":w={x:a.x+a.width,y:b};break;case"left":w={x:a.x-l.width,y:b};break;default:w={x:a.x,y:a.y}}switch(Vs(r)){case"start":w[f]-=k*(o&&y?-1:1);break;case"end":w[f]+=k*(o&&y?-1:1);break}return w}async function UC(t,r){var o;r===void 0&&(r={});const{x:a,y:l,platform:c,rects:f,elements:h,strategy:g}=t,{boundary:y="clippingAncestors",rootBoundary:x="viewport",elementContext:b="floating",altBoundary:k=!1,padding:w=0}=gr(r,t),N=vv(w),C=h[k?b==="floating"?"reference":"floating":b],R=Jl(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(C)))==null||o?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:y,rootBoundary:x,strategy:g})),j=b==="floating"?{x:a,y:l,width:f.floating.width,height:f.floating.height}:f.reference,P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),A=await(c.isElement==null?void 0:c.isElement(P))?await(c.getScale==null?void 0:c.getScale(P))||{x:1,y:1}:{x:1,y:1},$=Jl(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:j,offsetParent:P,strategy:g}):j);return{top:(R.top-$.top+N.top)/A.y,bottom:($.bottom-R.bottom+N.bottom)/A.y,left:(R.left-$.left+N.left)/A.x,right:($.right-R.right+N.right)/A.x}}const $C=async(t,r,o)=>{const{placement:a="bottom",strategy:l="absolute",middleware:c=[],platform:f}=o,h=c.filter(Boolean),g=await(f.isRTL==null?void 0:f.isRTL(r));let y=await f.getElementRects({reference:t,floating:r,strategy:l}),{x,y:b}=Cg(y,a,g),k=a,w={},N=0;for(let C=0;C<h.length;C++){var v;const{name:R,fn:j}=h[C],{x:P,y:A,data:$,reset:B}=await j({x,y:b,initialPlacement:a,placement:k,strategy:l,middlewareData:w,rects:y,platform:{...f,detectOverflow:(v=f.detectOverflow)!=null?v:UC},elements:{reference:t,floating:r}});x=P??x,b=A??b,w={...w,[R]:{...w[R],...$}},B&&N<=50&&(N++,typeof B=="object"&&(B.placement&&(k=B.placement),B.rects&&(y=B.rects===!0?await f.getElementRects({reference:t,floating:r,strategy:l}):B.rects),{x,y:b}=Cg(y,k,g)),C=-1)}return{x,y:b,placement:k,strategy:l,middlewareData:w}},BC=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:a,placement:l,rects:c,platform:f,elements:h,middlewareData:g}=r,{element:y,padding:x=0}=gr(t,r)||{};if(y==null)return{};const b=vv(x),k={x:o,y:a},w=Of(l),N=Df(w),v=await f.getDimensions(y),C=w==="y",R=C?"top":"left",j=C?"bottom":"right",P=C?"clientHeight":"clientWidth",A=c.reference[N]+c.reference[w]-k[w]-c.floating[N],$=k[w]-c.reference[w],B=await(f.getOffsetParent==null?void 0:f.getOffsetParent(y));let H=B?B[P]:0;(!H||!await(f.isElement==null?void 0:f.isElement(B)))&&(H=h.floating[P]||c.floating[N]);const X=A/2-$/2,W=H/2-v[N]/2-1,Y=ro(b[R],W),_=ro(b[j],W),O=Y,Z=H-v[N]-_,ee=H/2-v[N]/2+X,G=Jd(O,ee,Z),ie=!g.arrow&&Vs(l)!=null&&ee!==G&&c.reference[N]/2-(ee<O?Y:_)-v[N]/2<0,ce=ie?ee<O?ee-O:ee-Z:0;return{[w]:k[w]+ce,data:{[w]:G,centerOffset:ee-G-ce,...ie&&{alignmentOffset:ce}},reset:ie}}}),WC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,a;const{placement:l,middlewareData:c,rects:f,initialPlacement:h,platform:g,elements:y}=r,{mainAxis:x=!0,crossAxis:b=!0,fallbackPlacements:k,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:v=!0,...C}=gr(t,r);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const R=yr(l),j=Kn(h),P=yr(h)===h,A=await(g.isRTL==null?void 0:g.isRTL(y.floating)),$=k||(P||!v?[Xl(h)]:LC(h)),B=N!=="none";!k&&B&&$.push(..._C(h,v,N,A));const H=[h,...$],X=await g.detectOverflow(r,C),W=[];let Y=((a=c.flip)==null?void 0:a.overflows)||[];if(x&&W.push(X[R]),b){const ee=AC(l,f,A);W.push(X[ee[0]],X[ee[1]])}if(Y=[...Y,{placement:l,overflows:W}],!W.every(ee=>ee<=0)){var _,O;const ee=(((_=c.flip)==null?void 0:_.index)||0)+1,G=H[ee];if(G&&(!(b==="alignment"?j!==Kn(G):!1)||Y.every(K=>Kn(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:Y},reset:{placement:G}};let ie=(O=Y.filter(ce=>ce.overflows[0]<=0).sort((ce,K)=>ce.overflows[1]-K.overflows[1])[0])==null?void 0:O.placement;if(!ie)switch(w){case"bestFit":{var Z;const ce=(Z=Y.filter(K=>{if(B){const q=Kn(K.placement);return q===j||q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(q=>q>0).reduce((q,Q)=>q+Q,0)]).sort((K,q)=>K[1]-q[1])[0])==null?void 0:Z[0];ce&&(ie=ce);break}case"initialPlacement":ie=h;break}if(l!==ie)return{reset:{placement:ie}}}return{}}}};function Eg(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function Ng(t){return jC.some(r=>t[r]>=0)}const HC=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o,platform:a}=r,{strategy:l="referenceHidden",...c}=gr(t,r);switch(l){case"referenceHidden":{const f=await a.detectOverflow(r,{...c,elementContext:"reference"}),h=Eg(f,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Ng(h)}}}case"escaped":{const f=await a.detectOverflow(r,{...c,altBoundary:!0}),h=Eg(f,o.floating);return{data:{escapedOffsets:h,escaped:Ng(h)}}}default:return{}}}}},xv=new Set(["left","top"]);async function VC(t,r){const{placement:o,platform:a,elements:l}=t,c=await(a.isRTL==null?void 0:a.isRTL(l.floating)),f=yr(o),h=Vs(o),g=Kn(o)==="y",y=xv.has(f)?-1:1,x=c&&g?-1:1,b=gr(r,t);let{mainAxis:k,crossAxis:w,alignmentAxis:N}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof N=="number"&&(w=h==="end"?N*-1:N),g?{x:w*x,y:k*y}:{x:k*y,y:w*x}}const KC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,a;const{x:l,y:c,placement:f,middlewareData:h}=r,g=await VC(r,t);return f===((o=h.offset)==null?void 0:o.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:l+g.x,y:c+g.y,data:{...g,placement:f}}}}},QC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:a,placement:l,platform:c}=r,{mainAxis:f=!0,crossAxis:h=!1,limiter:g={fn:R=>{let{x:j,y:P}=R;return{x:j,y:P}}},...y}=gr(t,r),x={x:o,y:a},b=await c.detectOverflow(r,y),k=Kn(yr(l)),w=zf(k);let N=x[w],v=x[k];if(f){const R=w==="y"?"top":"left",j=w==="y"?"bottom":"right",P=N+b[R],A=N-b[j];N=Jd(P,N,A)}if(h){const R=k==="y"?"top":"left",j=k==="y"?"bottom":"right",P=v+b[R],A=v-b[j];v=Jd(P,v,A)}const C=g.fn({...r,[w]:N,[k]:v});return{...C,data:{x:C.x-o,y:C.y-a,enabled:{[w]:f,[k]:h}}}}}},qC=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:a,placement:l,rects:c,middlewareData:f}=r,{offset:h=0,mainAxis:g=!0,crossAxis:y=!0}=gr(t,r),x={x:o,y:a},b=Kn(l),k=zf(b);let w=x[k],N=x[b];const v=gr(h,r),C=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(g){const P=k==="y"?"height":"width",A=c.reference[k]-c.floating[P]+C.mainAxis,$=c.reference[k]+c.reference[P]-C.mainAxis;w<A?w=A:w>$&&(w=$)}if(y){var R,j;const P=k==="y"?"width":"height",A=xv.has(yr(l)),$=c.reference[b]-c.floating[P]+(A&&((R=f.offset)==null?void 0:R[b])||0)+(A?0:C.crossAxis),B=c.reference[b]+c.reference[P]+(A?0:((j=f.offset)==null?void 0:j[b])||0)-(A?C.crossAxis:0);N<$?N=$:N>B&&(N=B)}return{[k]:w,[b]:N}}}},GC=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,a;const{placement:l,rects:c,platform:f,elements:h}=r,{apply:g=()=>{},...y}=gr(t,r),x=await f.detectOverflow(r,y),b=yr(l),k=Vs(l),w=Kn(l)==="y",{width:N,height:v}=c.floating;let C,R;b==="top"||b==="bottom"?(C=b,R=k===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(R=b,C=k==="end"?"top":"bottom");const j=v-x.top-x.bottom,P=N-x.left-x.right,A=ro(v-x[C],j),$=ro(N-x[R],P),B=!r.middlewareData.shift;let H=A,X=$;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(X=P),(a=r.middlewareData.shift)!=null&&a.enabled.y&&(H=j),B&&!k){const Y=Qt(x.left,0),_=Qt(x.right,0),O=Qt(x.top,0),Z=Qt(x.bottom,0);w?X=N-2*(Y!==0||_!==0?Y+_:Qt(x.left,x.right)):H=v-2*(O!==0||Z!==0?O+Z:Qt(x.top,x.bottom))}await g({...r,availableWidth:X,availableHeight:H});const W=await f.getDimensions(h.floating);return N!==W.width||v!==W.height?{reset:{rects:!0}}:{}}}};function lc(){return typeof window<"u"}function Ks(t){return wv(t)?(t.nodeName||"").toLowerCase():"#document"}function qt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function Yn(t){var r;return(r=(wv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function wv(t){return lc()?t instanceof Node||t instanceof qt(t).Node:!1}function En(t){return lc()?t instanceof Element||t instanceof qt(t).Element:!1}function qn(t){return lc()?t instanceof HTMLElement||t instanceof qt(t).HTMLElement:!1}function Pg(t){return!lc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qt(t).ShadowRoot}const YC=new Set(["inline","contents"]);function ri(t){const{overflow:r,overflowX:o,overflowY:a,display:l}=Nn(t);return/auto|scroll|overlay|hidden|clip/.test(r+a+o)&&!YC.has(l)}const XC=new Set(["table","td","th"]);function JC(t){return XC.has(Ks(t))}const ZC=[":popover-open",":modal"];function cc(t){return ZC.some(r=>{try{return t.matches(r)}catch{return!1}})}const e2=["transform","translate","scale","rotate","perspective"],t2=["transform","translate","scale","rotate","perspective","filter"],n2=["paint","layout","strict","content"];function _f(t){const r=Ff(),o=En(t)?Nn(t):t;return e2.some(a=>o[a]?o[a]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||t2.some(a=>(o.willChange||"").includes(a))||n2.some(a=>(o.contain||"").includes(a))}function r2(t){let r=oo(t);for(;qn(r)&&!Os(r);){if(_f(r))return r;if(cc(r))return null;r=oo(r)}return null}function Ff(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const o2=new Set(["html","body","#document"]);function Os(t){return o2.has(Ks(t))}function Nn(t){return qt(t).getComputedStyle(t)}function uc(t){return En(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function oo(t){if(Ks(t)==="html")return t;const r=t.assignedSlot||t.parentNode||Pg(t)&&t.host||Yn(t);return Pg(r)?r.host:r}function bv(t){const r=oo(t);return Os(r)?t.ownerDocument?t.ownerDocument.body:t.body:qn(r)&&ri(r)?r:bv(r)}function Va(t,r,o){var a;r===void 0&&(r=[]),o===void 0&&(o=!0);const l=bv(t),c=l===((a=t.ownerDocument)==null?void 0:a.body),f=qt(l);if(c){const h=ef(f);return r.concat(f,f.visualViewport||[],ri(l)?l:[],h&&o?Va(h):[])}return r.concat(l,Va(l,[],o))}function ef(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Sv(t){const r=Nn(t);let o=parseFloat(r.width)||0,a=parseFloat(r.height)||0;const l=qn(t),c=l?t.offsetWidth:o,f=l?t.offsetHeight:a,h=Yl(o)!==c||Yl(a)!==f;return h&&(o=c,a=f),{width:o,height:a,$:h}}function Uf(t){return En(t)?t:t.contextElement}function Ss(t){const r=Uf(t);if(!qn(r))return Qn(1);const o=r.getBoundingClientRect(),{width:a,height:l,$:c}=Sv(r);let f=(c?Yl(o.width):o.width)/a,h=(c?Yl(o.height):o.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const s2=Qn(0);function kv(t){const r=qt(t);return!Ff()||!r.visualViewport?s2:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function a2(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==qt(t)?!1:r}function Fo(t,r,o,a){r===void 0&&(r=!1),o===void 0&&(o=!1);const l=t.getBoundingClientRect(),c=Uf(t);let f=Qn(1);r&&(a?En(a)&&(f=Ss(a)):f=Ss(t));const h=a2(c,o,a)?kv(c):Qn(0);let g=(l.left+h.x)/f.x,y=(l.top+h.y)/f.y,x=l.width/f.x,b=l.height/f.y;if(c){const k=qt(c),w=a&&En(a)?qt(a):a;let N=k,v=ef(N);for(;v&&a&&w!==N;){const C=Ss(v),R=v.getBoundingClientRect(),j=Nn(v),P=R.left+(v.clientLeft+parseFloat(j.paddingLeft))*C.x,A=R.top+(v.clientTop+parseFloat(j.paddingTop))*C.y;g*=C.x,y*=C.y,x*=C.x,b*=C.y,g+=P,y+=A,N=qt(v),v=ef(N)}}return Jl({width:x,height:b,x:g,y})}function dc(t,r){const o=uc(t).scrollLeft;return r?r.left+o:Fo(Yn(t)).left+o}function Cv(t,r){const o=t.getBoundingClientRect(),a=o.left+r.scrollLeft-dc(t,o),l=o.top+r.scrollTop;return{x:a,y:l}}function i2(t){let{elements:r,rect:o,offsetParent:a,strategy:l}=t;const c=l==="fixed",f=Yn(a),h=r?cc(r.floating):!1;if(a===f||h&&c)return o;let g={scrollLeft:0,scrollTop:0},y=Qn(1);const x=Qn(0),b=qn(a);if((b||!b&&!c)&&((Ks(a)!=="body"||ri(f))&&(g=uc(a)),qn(a))){const w=Fo(a);y=Ss(a),x.x=w.x+a.clientLeft,x.y=w.y+a.clientTop}const k=f&&!b&&!c?Cv(f,g):Qn(0);return{width:o.width*y.x,height:o.height*y.y,x:o.x*y.x-g.scrollLeft*y.x+x.x+k.x,y:o.y*y.y-g.scrollTop*y.y+x.y+k.y}}function l2(t){return Array.from(t.getClientRects())}function c2(t){const r=Yn(t),o=uc(t),a=t.ownerDocument.body,l=Qt(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),c=Qt(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+dc(t);const h=-o.scrollTop;return Nn(a).direction==="rtl"&&(f+=Qt(r.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:h}}const Rg=25;function u2(t,r){const o=qt(t),a=Yn(t),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,h=0,g=0;if(l){c=l.width,f=l.height;const x=Ff();(!x||x&&r==="fixed")&&(h=l.offsetLeft,g=l.offsetTop)}const y=dc(a);if(y<=0){const x=a.ownerDocument,b=x.body,k=getComputedStyle(b),w=x.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,N=Math.abs(a.clientWidth-b.clientWidth-w);N<=Rg&&(c-=N)}else y<=Rg&&(c+=y);return{width:c,height:f,x:h,y:g}}const d2=new Set(["absolute","fixed"]);function f2(t,r){const o=Fo(t,!0,r==="fixed"),a=o.top+t.clientTop,l=o.left+t.clientLeft,c=qn(t)?Ss(t):Qn(1),f=t.clientWidth*c.x,h=t.clientHeight*c.y,g=l*c.x,y=a*c.y;return{width:f,height:h,x:g,y}}function jg(t,r,o){let a;if(r==="viewport")a=u2(t,o);else if(r==="document")a=c2(Yn(t));else if(En(r))a=f2(r,o);else{const l=kv(t);a={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return Jl(a)}function Ev(t,r){const o=oo(t);return o===r||!En(o)||Os(o)?!1:Nn(o).position==="fixed"||Ev(o,r)}function h2(t,r){const o=r.get(t);if(o)return o;let a=Va(t,[],!1).filter(h=>En(h)&&Ks(h)!=="body"),l=null;const c=Nn(t).position==="fixed";let f=c?oo(t):t;for(;En(f)&&!Os(f);){const h=Nn(f),g=_f(f);!g&&h.position==="fixed"&&(l=null),(c?!g&&!l:!g&&h.position==="static"&&!!l&&d2.has(l.position)||ri(f)&&!g&&Ev(t,f))?a=a.filter(x=>x!==f):l=h,f=oo(f)}return r.set(t,a),a}function p2(t){let{element:r,boundary:o,rootBoundary:a,strategy:l}=t;const f=[...o==="clippingAncestors"?cc(r)?[]:h2(r,this._c):[].concat(o),a],h=f[0],g=f.reduce((y,x)=>{const b=jg(r,x,l);return y.top=Qt(b.top,y.top),y.right=ro(b.right,y.right),y.bottom=ro(b.bottom,y.bottom),y.left=Qt(b.left,y.left),y},jg(r,h,l));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function m2(t){const{width:r,height:o}=Sv(t);return{width:r,height:o}}function g2(t,r,o){const a=qn(r),l=Yn(r),c=o==="fixed",f=Fo(t,!0,c,r);let h={scrollLeft:0,scrollTop:0};const g=Qn(0);function y(){g.x=dc(l)}if(a||!a&&!c)if((Ks(r)!=="body"||ri(l))&&(h=uc(r)),a){const w=Fo(r,!0,c,r);g.x=w.x+r.clientLeft,g.y=w.y+r.clientTop}else l&&y();c&&!a&&l&&y();const x=l&&!a&&!c?Cv(l,h):Qn(0),b=f.left+h.scrollLeft-g.x-x.x,k=f.top+h.scrollTop-g.y-x.y;return{x:b,y:k,width:f.width,height:f.height}}function wd(t){return Nn(t).position==="static"}function Tg(t,r){if(!qn(t)||Nn(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return Yn(t)===o&&(o=o.ownerDocument.body),o}function Nv(t,r){const o=qt(t);if(cc(t))return o;if(!qn(t)){let l=oo(t);for(;l&&!Os(l);){if(En(l)&&!wd(l))return l;l=oo(l)}return o}let a=Tg(t,r);for(;a&&JC(a)&&wd(a);)a=Tg(a,r);return a&&Os(a)&&wd(a)&&!_f(a)?o:a||r2(t)||o}const y2=async function(t){const r=this.getOffsetParent||Nv,o=this.getDimensions,a=await o(t.floating);return{reference:g2(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function v2(t){return Nn(t).direction==="rtl"}const x2={convertOffsetParentRelativeRectToViewportRelativeRect:i2,getDocumentElement:Yn,getClippingRect:p2,getOffsetParent:Nv,getElementRects:y2,getClientRects:l2,getDimensions:m2,getScale:Ss,isElement:En,isRTL:v2};function Pv(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function w2(t,r){let o=null,a;const l=Yn(t);function c(){var h;clearTimeout(a),(h=o)==null||h.disconnect(),o=null}function f(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),c();const y=t.getBoundingClientRect(),{left:x,top:b,width:k,height:w}=y;if(h||r(),!k||!w)return;const N=Cl(b),v=Cl(l.clientWidth-(x+k)),C=Cl(l.clientHeight-(b+w)),R=Cl(x),P={rootMargin:-N+"px "+-v+"px "+-C+"px "+-R+"px",threshold:Qt(0,ro(1,g))||1};let A=!0;function $(B){const H=B[0].intersectionRatio;if(H!==g){if(!A)return f();H?f(!1,H):a=setTimeout(()=>{f(!1,1e-7)},1e3)}H===1&&!Pv(y,t.getBoundingClientRect())&&f(),A=!1}try{o=new IntersectionObserver($,{...P,root:l.ownerDocument})}catch{o=new IntersectionObserver($,P)}o.observe(t)}return f(!0),c}function b2(t,r,o,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=a,y=Uf(t),x=l||c?[...y?Va(y):[],...Va(r)]:[];x.forEach(R=>{l&&R.addEventListener("scroll",o,{passive:!0}),c&&R.addEventListener("resize",o)});const b=y&&h?w2(y,o):null;let k=-1,w=null;f&&(w=new ResizeObserver(R=>{let[j]=R;j&&j.target===y&&w&&(w.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var P;(P=w)==null||P.observe(r)})),o()}),y&&!g&&w.observe(y),w.observe(r));let N,v=g?Fo(t):null;g&&C();function C(){const R=Fo(t);v&&!Pv(v,R)&&o(),v=R,N=requestAnimationFrame(C)}return o(),()=>{var R;x.forEach(j=>{l&&j.removeEventListener("scroll",o),c&&j.removeEventListener("resize",o)}),b==null||b(),(R=w)==null||R.disconnect(),w=null,g&&cancelAnimationFrame(N)}}const S2=KC,k2=QC,C2=WC,E2=GC,N2=HC,Mg=BC,P2=qC,R2=(t,r,o)=>{const a=new Map,l={platform:x2,...o},c={...l.platform,_c:a};return $C(t,r,{...l,platform:c})};var j2=typeof document<"u",T2=function(){},Dl=j2?m.useLayoutEffect:T2;function Zl(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,a,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(a=o;a--!==0;)if(!Zl(t[a],r[a]))return!1;return!0}if(l=Object.keys(t),o=l.length,o!==Object.keys(r).length)return!1;for(a=o;a--!==0;)if(!{}.hasOwnProperty.call(r,l[a]))return!1;for(a=o;a--!==0;){const c=l[a];if(!(c==="_owner"&&t.$$typeof)&&!Zl(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function Rv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ig(t,r){const o=Rv(t);return Math.round(r*o)/o}function bd(t){const r=m.useRef(t);return Dl(()=>{r.current=t}),r}function M2(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l,elements:{reference:c,floating:f}={},transform:h=!0,whileElementsMounted:g,open:y}=t,[x,b]=m.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[k,w]=m.useState(a);Zl(k,a)||w(a);const[N,v]=m.useState(null),[C,R]=m.useState(null),j=m.useCallback(K=>{K!==B.current&&(B.current=K,v(K))},[]),P=m.useCallback(K=>{K!==H.current&&(H.current=K,R(K))},[]),A=c||N,$=f||C,B=m.useRef(null),H=m.useRef(null),X=m.useRef(x),W=g!=null,Y=bd(g),_=bd(l),O=bd(y),Z=m.useCallback(()=>{if(!B.current||!H.current)return;const K={placement:r,strategy:o,middleware:k};_.current&&(K.platform=_.current),R2(B.current,H.current,K).then(q=>{const Q={...q,isPositioned:O.current!==!1};ee.current&&!Zl(X.current,Q)&&(X.current=Q,ti.flushSync(()=>{b(Q)}))})},[k,r,o,_,O]);Dl(()=>{y===!1&&X.current.isPositioned&&(X.current.isPositioned=!1,b(K=>({...K,isPositioned:!1})))},[y]);const ee=m.useRef(!1);Dl(()=>(ee.current=!0,()=>{ee.current=!1}),[]),Dl(()=>{if(A&&(B.current=A),$&&(H.current=$),A&&$){if(Y.current)return Y.current(A,$,Z);Z()}},[A,$,Z,Y,W]);const G=m.useMemo(()=>({reference:B,floating:H,setReference:j,setFloating:P}),[j,P]),ie=m.useMemo(()=>({reference:A,floating:$}),[A,$]),ce=m.useMemo(()=>{const K={position:o,left:0,top:0};if(!ie.floating)return K;const q=Ig(ie.floating,x.x),Q=Ig(ie.floating,x.y);return h?{...K,transform:"translate("+q+"px, "+Q+"px)",...Rv(ie.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:q,top:Q}},[o,h,ie.floating,x.x,x.y]);return m.useMemo(()=>({...x,update:Z,refs:G,elements:ie,floatingStyles:ce}),[x,Z,G,ie,ce])}const I2=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:a,padding:l}=typeof t=="function"?t(o):t;return a&&r(a)?a.current!=null?Mg({element:a.current,padding:l}).fn(o):{}:a?Mg({element:a,padding:l}).fn(o):{}}}},A2=(t,r)=>({...S2(t),options:[t,r]}),L2=(t,r)=>({...k2(t),options:[t,r]}),z2=(t,r)=>({...P2(t),options:[t,r]}),D2=(t,r)=>({...C2(t),options:[t,r]}),O2=(t,r)=>({...E2(t),options:[t,r]}),_2=(t,r)=>({...N2(t),options:[t,r]}),F2=(t,r)=>({...I2(t),options:[t,r]});var U2="Arrow",jv=m.forwardRef((t,r)=>{const{children:o,width:a=10,height:l=5,...c}=t;return u.jsx(Be.svg,{...c,ref:r,width:a,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});jv.displayName=U2;var $2=jv;function B2(t){const[r,o]=m.useState(void 0);return Et(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const a=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let f,h;if("borderBoxSize"in c){const g=c.borderBoxSize,y=Array.isArray(g)?g[0]:g;f=y.inlineSize,h=y.blockSize}else f=t.offsetWidth,h=t.offsetHeight;o({width:f,height:h})});return a.observe(t,{box:"border-box"}),()=>a.unobserve(t)}else o(void 0)},[t]),r}var $f="Popper",[Tv,fc]=ni($f),[W2,Mv]=Tv($f),Iv=t=>{const{__scopePopper:r,children:o}=t,[a,l]=m.useState(null);return u.jsx(W2,{scope:r,anchor:a,onAnchorChange:l,children:o})};Iv.displayName=$f;var Av="PopperAnchor",Lv=m.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:a,...l}=t,c=Mv(Av,o),f=m.useRef(null),h=Ze(r,f),g=m.useRef(null);return m.useEffect(()=>{const y=g.current;g.current=(a==null?void 0:a.current)||f.current,y!==g.current&&c.onAnchorChange(g.current)}),a?null:u.jsx(Be.div,{...l,ref:h})});Lv.displayName=Av;var Bf="PopperContent",[H2,V2]=Tv(Bf),zv=m.forwardRef((t,r)=>{var ne,he,be,Ce,Te,Ie;const{__scopePopper:o,side:a="bottom",sideOffset:l=0,align:c="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:x=0,sticky:b="partial",hideWhenDetached:k=!1,updatePositionStrategy:w="optimized",onPlaced:N,...v}=t,C=Mv(Bf,o),[R,j]=m.useState(null),P=Ze(r,nt=>j(nt)),[A,$]=m.useState(null),B=B2(A),H=(B==null?void 0:B.width)??0,X=(B==null?void 0:B.height)??0,W=a+(c!=="center"?"-"+c:""),Y=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},_=Array.isArray(y)?y:[y],O=_.length>0,Z={padding:Y,boundary:_.filter(Q2),altBoundary:O},{refs:ee,floatingStyles:G,placement:ie,isPositioned:ce,middlewareData:K}=M2({strategy:"fixed",placement:W,whileElementsMounted:(...nt)=>b2(...nt,{animationFrame:w==="always"}),elements:{reference:C.anchor},middleware:[A2({mainAxis:l+X,alignmentAxis:f}),g&&L2({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?z2():void 0,...Z}),g&&D2({...Z}),O2({...Z,apply:({elements:nt,rects:vt,availableWidth:Rn,availableHeight:ln})=>{const{width:cn,height:br}=vt.reference,jn=nt.floating.style;jn.setProperty("--radix-popper-available-width",`${Rn}px`),jn.setProperty("--radix-popper-available-height",`${ln}px`),jn.setProperty("--radix-popper-anchor-width",`${cn}px`),jn.setProperty("--radix-popper-anchor-height",`${br}px`)}}),A&&F2({element:A,padding:h}),q2({arrowWidth:H,arrowHeight:X}),k&&_2({strategy:"referenceHidden",...Z})]}),[q,Q]=_v(ie),M=_o(N);Et(()=>{ce&&(M==null||M())},[ce,M]);const F=(ne=K.arrow)==null?void 0:ne.x,le=(he=K.arrow)==null?void 0:he.y,J=((be=K.arrow)==null?void 0:be.centerOffset)!==0,[ue,xe]=m.useState();return Et(()=>{R&&xe(window.getComputedStyle(R).zIndex)},[R]),u.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:ce?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Ce=K.transformOrigin)==null?void 0:Ce.x,(Te=K.transformOrigin)==null?void 0:Te.y].join(" "),...((Ie=K.hide)==null?void 0:Ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(H2,{scope:o,placedSide:q,onArrowChange:$,arrowX:F,arrowY:le,shouldHideArrow:J,children:u.jsx(Be.div,{"data-side":q,"data-align":Q,...v,ref:P,style:{...v.style,animation:ce?void 0:"none"}})})})});zv.displayName=Bf;var Dv="PopperArrow",K2={top:"bottom",right:"left",bottom:"top",left:"right"},Ov=m.forwardRef(function(r,o){const{__scopePopper:a,...l}=r,c=V2(Dv,a),f=K2[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx($2,{...l,ref:o,style:{...l.style,display:"block"}})})});Ov.displayName=Dv;function Q2(t){return t!==null}var q2=t=>({name:"transformOrigin",options:t,fn(r){var C,R,j;const{placement:o,rects:a,middlewareData:l}=r,f=((C=l.arrow)==null?void 0:C.centerOffset)!==0,h=f?0:t.arrowWidth,g=f?0:t.arrowHeight,[y,x]=_v(o),b={start:"0%",center:"50%",end:"100%"}[x],k=(((R=l.arrow)==null?void 0:R.x)??0)+h/2,w=(((j=l.arrow)==null?void 0:j.y)??0)+g/2;let N="",v="";return y==="bottom"?(N=f?b:`${k}px`,v=`${-g}px`):y==="top"?(N=f?b:`${k}px`,v=`${a.floating.height+g}px`):y==="right"?(N=`${-g}px`,v=f?b:`${w}px`):y==="left"&&(N=`${a.floating.width+g}px`,v=f?b:`${w}px`),{data:{x:N,y:v}}}});function _v(t){const[r,o="center"]=t.split("-");return[r,o]}var Fv=Iv,Uv=Lv,$v=zv,Bv=Ov,G2="Portal",hc=m.forwardRef((t,r)=>{var h;const{container:o,...a}=t,[l,c]=m.useState(!1);Et(()=>c(!0),[]);const f=o||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?Ay.createPortal(u.jsx(Be.div,{...a,ref:r}),f):null});hc.displayName=G2;var Y2=dy[" useInsertionEffect ".trim().toString()]||Et;function ec({prop:t,defaultProp:r,onChange:o=()=>{},caller:a}){const[l,c,f]=X2({defaultProp:r,onChange:o}),h=t!==void 0,g=h?t:l;{const x=m.useRef(t!==void 0);m.useEffect(()=>{const b=x.current;b!==h&&console.warn(`${a} is changing from ${b?"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.`),x.current=h},[h,a])}const y=m.useCallback(x=>{var b;if(h){const k=J2(x)?x(t):x;k!==t&&((b=f.current)==null||b.call(f,k))}else c(x)},[h,t,c,f]);return[g,y]}function X2({defaultProp:t,onChange:r}){const[o,a]=m.useState(t),l=m.useRef(o),c=m.useRef(r);return Y2(()=>{c.current=r},[r]),m.useEffect(()=>{var f;l.current!==o&&((f=c.current)==null||f.call(c,o),l.current=o)},[o,l]),[o,a,c]}function J2(t){return typeof t=="function"}function Z2(t){const r=m.useRef({value:t,previous:t});return m.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var Wv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eE="VisuallyHidden",Hv=m.forwardRef((t,r)=>u.jsx(Be.span,{...t,ref:r,style:{...Wv,...t.style}}));Hv.displayName=eE;var tE=Hv,nE=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},ys=new WeakMap,El=new WeakMap,Nl={},Sd=0,Vv=function(t){return t&&(t.host||Vv(t.parentNode))},rE=function(t,r){return r.map(function(o){if(t.contains(o))return o;var a=Vv(o);return a&&t.contains(a)?a:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},oE=function(t,r,o,a){var l=rE(r,Array.isArray(t)?t:[t]);Nl[o]||(Nl[o]=new WeakMap);var c=Nl[o],f=[],h=new Set,g=new Set(l),y=function(b){!b||h.has(b)||(h.add(b),y(b.parentNode))};l.forEach(y);var x=function(b){!b||g.has(b)||Array.prototype.forEach.call(b.children,function(k){if(h.has(k))x(k);else try{var w=k.getAttribute(a),N=w!==null&&w!=="false",v=(ys.get(k)||0)+1,C=(c.get(k)||0)+1;ys.set(k,v),c.set(k,C),f.push(k),v===1&&N&&El.set(k,!0),C===1&&k.setAttribute(o,"true"),N||k.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",k,R)}})};return x(r),h.clear(),Sd++,function(){f.forEach(function(b){var k=ys.get(b)-1,w=c.get(b)-1;ys.set(b,k),c.set(b,w),k||(El.has(b)||b.removeAttribute(a),El.delete(b)),w||b.removeAttribute(o)}),Sd--,Sd||(ys=new WeakMap,ys=new WeakMap,El=new WeakMap,Nl={})}},Kv=function(t,r,o){o===void 0&&(o="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),l=nE(t);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),oE(a,l,o,"aria-hidden")):function(){return null}},Vn=function(){return Vn=Object.assign||function(r){for(var o,a=1,l=arguments.length;a<l;a++){o=arguments[a];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r},Vn.apply(this,arguments)};function Qv(t,r){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(o[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(o[a[l]]=t[a[l]]);return o}function sE(t,r,o){if(o||arguments.length===2)for(var a=0,l=r.length,c;a<l;a++)(c||!(a in r))&&(c||(c=Array.prototype.slice.call(r,0,a)),c[a]=r[a]);return t.concat(c||Array.prototype.slice.call(r))}var Ol="right-scroll-bar-position",_l="width-before-scroll-bar",aE="with-scroll-bars-hidden",iE="--removed-body-scroll-bar-size";function kd(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function lE(t,r){var o=m.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(a){var l=o.value;l!==a&&(o.value=a,o.callback(a,l))}}}})[0];return o.callback=r,o.facade}var cE=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ag=new WeakMap;function uE(t,r){var o=lE(null,function(a){return t.forEach(function(l){return kd(l,a)})});return cE(function(){var a=Ag.get(o);if(a){var l=new Set(a),c=new Set(t),f=o.current;l.forEach(function(h){c.has(h)||kd(h,null)}),c.forEach(function(h){l.has(h)||kd(h,f)})}Ag.set(o,t)},[t]),o}function dE(t){return t}function fE(t,r){r===void 0&&(r=dE);var o=[],a=!1,l={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(c){var f=r(c,a);return o.push(f),function(){o=o.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(a=!0;o.length;){var f=o;o=[],f.forEach(c)}o={push:function(h){return c(h)},filter:function(){return o}}},assignMedium:function(c){a=!0;var f=[];if(o.length){var h=o;o=[],h.forEach(c),f=o}var g=function(){var x=f;f=[],x.forEach(c)},y=function(){return Promise.resolve().then(g)};y(),o={push:function(x){f.push(x),y()},filter:function(x){return f=f.filter(x),o}}}};return l}function hE(t){t===void 0&&(t={});var r=fE(null);return r.options=Vn({async:!0,ssr:!1},t),r}var qv=function(t){var r=t.sideCar,o=Qv(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return m.createElement(a,Vn({},o))};qv.isSideCarExport=!0;function pE(t,r){return t.useMedium(r),qv}var Gv=hE(),Cd=function(){},pc=m.forwardRef(function(t,r){var o=m.useRef(null),a=m.useState({onScrollCapture:Cd,onWheelCapture:Cd,onTouchMoveCapture:Cd}),l=a[0],c=a[1],f=t.forwardProps,h=t.children,g=t.className,y=t.removeScrollBar,x=t.enabled,b=t.shards,k=t.sideCar,w=t.noRelative,N=t.noIsolation,v=t.inert,C=t.allowPinchZoom,R=t.as,j=R===void 0?"div":R,P=t.gapMode,A=Qv(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=k,B=uE([o,r]),H=Vn(Vn({},A),l);return m.createElement(m.Fragment,null,x&&m.createElement($,{sideCar:Gv,removeScrollBar:y,shards:b,noRelative:w,noIsolation:N,inert:v,setCallbacks:c,allowPinchZoom:!!C,lockRef:o,gapMode:P}),f?m.cloneElement(m.Children.only(h),Vn(Vn({},H),{ref:B})):m.createElement(j,Vn({},H,{className:g,ref:B}),h))});pc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};pc.classNames={fullWidth:_l,zeroRight:Ol};var mE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gE(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=mE();return r&&t.setAttribute("nonce",r),t}function yE(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function vE(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var xE=function(){var t=0,r=null;return{add:function(o){t==0&&(r=gE())&&(yE(r,o),vE(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},wE=function(){var t=xE();return function(r,o){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},Yv=function(){var t=wE(),r=function(o){var a=o.styles,l=o.dynamic;return t(a,l),null};return r},bE={left:0,top:0,right:0,gap:0},Ed=function(t){return parseInt(t||"",10)||0},SE=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],a=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[Ed(o),Ed(a),Ed(l)]},kE=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return bE;var r=SE(t),o=document.documentElement.clientWidth,a=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,a-o+r[2]-r[0])}},CE=Yv(),ks="data-scroll-locked",EE=function(t,r,o,a){var l=t.left,c=t.top,f=t.right,h=t.gap;return o===void 0&&(o="margin"),`
297
- .`.concat(aE,` {
296
+ */const zf=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Jd="docs.nextclaw.io",hg="nextclaw-docs.pages.dev",Yk=new Set([Jd,`www.${Jd}`,hg,`www.${hg}`]),$a=`https://${Jd}`;function El(t){try{return new URL(t).pathname.replace(/\.html$/,"").replace(/\/$/,"")}catch{return t}}const fv=m.createContext(null);function lc(){const t=m.useContext(fv);if(!t)throw new Error("useDocBrowser must be used within DocBrowserProvider");return t}function Xk(t){try{const r=new URL(t,window.location.origin);return Yk.has(r.hostname)}catch{return!1}}function Jk({children:t}){const[r,o]=m.useState({isOpen:!1,mode:"docked",currentUrl:`${$a}/guide/getting-started`,history:[`${$a}/guide/getting-started`],historyIndex:0,navVersion:0}),a=m.useCallback(N=>{const v=N||r.currentUrl||`${$a}/guide/getting-started`;o(C=>({...C,isOpen:!0,currentUrl:v,history:[...C.history.slice(0,C.historyIndex+1),v],historyIndex:C.historyIndex+1,navVersion:C.navVersion+1}))},[r.currentUrl]),l=m.useCallback(()=>{o(N=>({...N,isOpen:!1}))},[]),c=m.useCallback(()=>{o(N=>({...N,mode:N.mode==="floating"?"docked":"floating"}))},[]),f=m.useCallback(N=>{o(v=>({...v,mode:N}))},[]),h=m.useCallback(N=>{o(v=>El(N)===El(v.currentUrl)?v:{...v,currentUrl:N,history:[...v.history.slice(0,v.historyIndex+1),N],historyIndex:v.historyIndex+1,navVersion:v.navVersion+1})},[]),g=m.useCallback(N=>{o(v=>El(N)===El(v.currentUrl)?v:{...v,currentUrl:N,history:[...v.history.slice(0,v.historyIndex+1),N],historyIndex:v.historyIndex+1})},[]),y=m.useCallback(()=>{o(N=>{if(N.historyIndex<=0)return N;const v=N.historyIndex-1;return{...N,historyIndex:v,currentUrl:N.history[v]}})},[]),x=m.useCallback(()=>{o(N=>{if(N.historyIndex>=N.history.length-1)return N;const v=N.historyIndex+1;return{...N,historyIndex:v,currentUrl:N.history[v]}})},[]),b=r.historyIndex>0,k=r.historyIndex<r.history.length-1,w=m.useMemo(()=>({...r,open:a,close:l,toggleMode:c,setMode:f,navigate:h,syncUrl:g,goBack:y,goForward:x,canGoBack:b,canGoForward:k}),[r,a,l,c,f,h,g,y,x,b,k]);return u.jsx(fv.Provider,{value:w,children:t})}function pg(){const{isOpen:t,mode:r,currentUrl:o,navVersion:a,close:l,toggleMode:c,goBack:f,goForward:h,canGoBack:g,canGoForward:y,navigate:x,syncUrl:b}=lc(),[k,w]=m.useState(""),[N,v]=m.useState(!1),[C,R]=m.useState(!1),[j,P]=m.useState(()=>({x:Math.max(40,window.innerWidth-520),y:80})),[A,$]=m.useState({w:480,h:600}),[B,W]=m.useState(420),X=m.useRef(null),H=m.useRef(null),Y=m.useRef(null),_=m.useRef(null),O=m.useRef(a);m.useEffect(()=>{try{const Q=new URL(o);w(Q.pathname)}catch{w(o)}},[o]),m.useEffect(()=>{var Q;if(a!==O.current){O.current=a;return}if((Q=_.current)!=null&&Q.contentWindow)try{const M=new URL(o).pathname;_.current.contentWindow.postMessage({type:"docs-navigate",path:M},"*")}catch{}},[o,a]),m.useEffect(()=>{r==="floating"&&P(Q=>({x:Math.max(40,window.innerWidth-A.w-40),y:Q.y}))},[r,A.w]),m.useEffect(()=>{const Q=M=>{var F;((F=M.data)==null?void 0:F.type)==="docs-route-change"&&typeof M.data.url=="string"&&b(M.data.url)};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[b]);const Z=m.useCallback(Q=>{Q.preventDefault();const M=k.trim();M&&(M.startsWith("/")?x(`${$a}${M}`):M.startsWith("http")?x(M):x(`${$a}/${M}`))},[k,x]),ee=m.useCallback(Q=>{r==="floating"&&(v(!0),X.current={startX:Q.clientX,startY:Q.clientY,startPosX:j.x,startPosY:j.y})},[r,j]);m.useEffect(()=>{if(!N)return;const Q=F=>{X.current&&P({x:X.current.startPosX+(F.clientX-X.current.startX),y:X.current.startPosY+(F.clientY-X.current.startY)})},M=()=>{v(!1),X.current=null};return window.addEventListener("mousemove",Q),window.addEventListener("mouseup",M),()=>{window.removeEventListener("mousemove",Q),window.removeEventListener("mouseup",M)}},[N]);const G=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0);const M=Q.currentTarget.dataset.axis;H.current={startX:Q.clientX,startY:Q.clientY,startW:A.w,startH:A.h};const F=J=>{H.current&&$(ue=>({w:M==="y"?ue.w:Math.max(360,H.current.startW+(J.clientX-H.current.startX)),h:M==="x"?ue.h:Math.max(400,H.current.startH+(J.clientY-H.current.startY))}))},le=()=>{R(!1),H.current=null,window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",le)};window.addEventListener("mousemove",F),window.addEventListener("mouseup",le)},[A]),ie=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0),Y.current={startX:Q.clientX,startW:B};const M=le=>{if(!Y.current)return;const J=Y.current.startX-le.clientX;W(Math.max(320,Math.min(800,Y.current.startW+J)))},F=()=>{R(!1),Y.current=null,window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",F)};window.addEventListener("mousemove",M),window.addEventListener("mouseup",F)},[B]),ce=m.useCallback(Q=>{Q.preventDefault(),Q.stopPropagation(),R(!0);const M=Q.clientX,F=A.w,le=j.x,J=xe=>{const ne=M-xe.clientX,he=Math.max(360,F+ne);$(be=>({...be,w:he})),P(be=>({...be,x:le-(he-F)}))},ue=()=>{R(!1),window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",ue)};window.addEventListener("mousemove",J),window.addEventListener("mouseup",ue)},[A.w,j.x]);if(!t)return null;const K=r==="docked";return u.jsxs("div",{className:me("flex flex-col bg-white overflow-hidden relative",K?"h-full border-l border-gray-200 shrink-0":"rounded-2xl shadow-2xl border border-gray-200"),style:K?{width:B}:{position:"fixed",left:j.x,top:j.y,width:A.w,height:A.h,zIndex:9999},children:[K&&u.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ie}),u.jsxs("div",{className:me("flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200 shrink-0 select-none",!K&&"cursor-grab active:cursor-grabbing"),onMouseDown:K?void 0:ee,children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx(sv,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:E("docBrowserTitle")})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx("button",{onClick:c,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:E(K?"docBrowserFloatMode":"docBrowserDockMode"),children:K?u.jsx(Fk,{className:"w-3.5 h-3.5"}):u.jsx($k,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:l,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:E("docBrowserClose"),children:u.jsx(zf,{className:"w-3.5 h-3.5"})})]})]}),u.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2 bg-white border-b border-gray-100 shrink-0",children:[u.jsx("button",{onClick:f,disabled:!g,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:u.jsx(Ck,{className:"w-4 h-4"})}),u.jsx("button",{onClick:h,disabled:!y,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:u.jsx(ov,{className:"w-4 h-4"})}),u.jsxs("form",{onSubmit:Z,className:"flex-1 relative",children:[u.jsx(cv,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),u.jsx("input",{type:"text",value:k,onChange:Q=>w(Q.target.value),placeholder:E("docBrowserSearchPlaceholder"),className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-50 border border-gray-200 text-xs text-gray-700 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors placeholder:text-gray-400"})]})]}),u.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[u.jsx("iframe",{ref:_,src:o,className:"absolute inset-0 w-full h-full border-0",title:"NextClaw Documentation",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",allow:"clipboard-read; clipboard-write"},a),(C||N)&&u.jsx("div",{className:"absolute inset-0 z-10"})]}),u.jsx("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 shrink-0",children:u.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer","data-doc-external":!0,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover font-medium transition-colors",children:[E("docBrowserOpenExternal"),u.jsx(iv,{className:"w-3 h-3"})]})}),!K&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ce}),u.jsx("div",{className:"absolute top-0 right-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:G,"data-axis":"x"}),u.jsx("div",{className:"absolute bottom-0 left-0 h-1.5 w-full cursor-ns-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:G,"data-axis":"y"}),u.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 cursor-se-resize z-30 flex items-center justify-center text-gray-300 hover:text-gray-500 transition-colors",onMouseDown:G,children:u.jsx(zk,{className:"w-3 h-3 rotate-[-45deg]"})})]})]})}function Zk(){const t=lc();m.useEffect(()=>{const r=o=>{const a=o.target.closest("a[href]");if(!a)return;const l=a.getAttribute("href")||"";Xk(l)&&(a.hasAttribute("data-doc-external")||o.ctrlKey||o.metaKey||o.shiftKey||(o.preventDefault(),o.stopPropagation(),t.open(l)))};return document.addEventListener("click",r,!0),()=>document.removeEventListener("click",r,!0)},[t])}const hv=m.createContext(null);function eC({children:t}){const[r,o]=m.useState(()=>Tf());m.useEffect(()=>xk(h=>{o(h)}),[]);const a=m.useCallback(f=>{vk(f),o(Ks())},[]),l=m.useCallback(()=>{a(r==="en"?"zh":"en")},[r,a]),c=m.useMemo(()=>({language:r,setLanguage:a,toggleLanguage:l}),[r,a,l]);return u.jsx(hv.Provider,{value:c,children:t})}function tC(){const t=m.useContext(hv);if(!t)throw new Error("useI18n must be used within I18nProvider");return{...t,t:E}}function mg(t,[r,o]){return Math.min(o,Math.max(r,t))}function Oe(t,r,{checkForDefaultPrevented:o=!0}={}){return function(l){if(t==null||t(l),o===!1||!l.defaultPrevented)return r==null?void 0:r(l)}}function nC(t,r){const o=m.createContext(r),a=c=>{const{children:f,...h}=c,g=m.useMemo(()=>h,Object.values(h));return u.jsx(o.Provider,{value:g,children:f})};a.displayName=t+"Provider";function l(c){const f=m.useContext(o);if(f)return f;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[a,l]}function oi(t,r=[]){let o=[];function a(c,f){const h=m.createContext(f),g=o.length;o=[...o,f];const y=b=>{var R;const{scope:k,children:w,...N}=b,v=((R=k==null?void 0:k[t])==null?void 0:R[g])||h,C=m.useMemo(()=>N,Object.values(N));return u.jsx(v.Provider,{value:C,children:w})};y.displayName=c+"Provider";function x(b,k){var v;const w=((v=k==null?void 0:k[t])==null?void 0:v[g])||h,N=m.useContext(w);if(N)return N;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[y,x]}const l=()=>{const c=o.map(f=>m.createContext(f));return function(h){const g=(h==null?void 0:h[t])||c;return m.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return l.scopeName=t,[a,rC(l,...r)]}function rC(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const a=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const f=a.reduce((h,{useScope:g,scopeName:y})=>{const b=g(c)[`__scope${y}`];return{...h,...b}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return o.scopeName=r.scopeName,o}function gg(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function pv(...t){return r=>{let o=!1;const a=t.map(l=>{const c=gg(l,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<a.length;l++){const c=a[l];typeof c=="function"?c():gg(t[l],null)}}}}function Ze(...t){return m.useCallback(pv(...t),t)}function Ka(t){const r=oC(t),o=m.forwardRef((a,l)=>{const{children:c,...f}=a,h=m.Children.toArray(c),g=h.find(aC);if(g){const y=g.props.children,x=h.map(b=>b===g?m.Children.count(y)>1?m.Children.only(null):m.isValidElement(y)?y.props.children:null:b);return u.jsx(r,{...f,ref:l,children:m.isValidElement(y)?m.cloneElement(y,void 0,x):null})}return u.jsx(r,{...f,ref:l,children:c})});return o.displayName=`${t}.Slot`,o}function oC(t){const r=m.forwardRef((o,a)=>{const{children:l,...c}=o;if(m.isValidElement(l)){const f=lC(l),h=iC(c,l.props);return l.type!==m.Fragment&&(h.ref=a?pv(a,f):f),m.cloneElement(l,h)}return m.Children.count(l)>1?m.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var mv=Symbol("radix.slottable");function sC(t){const r=({children:o})=>u.jsx(u.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=mv,r}function aC(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mv}function iC(t,r){const o={...r};for(const a in r){const l=t[a],c=r[a];/^on[A-Z]/.test(a)?l&&c?o[a]=(...h)=>{const g=c(...h);return l(...h),g}:l&&(o[a]=l):a==="style"?o[a]={...l,...c}:a==="className"&&(o[a]=[l,c].filter(Boolean).join(" "))}return{...t,...o}}function lC(t){var a,l;let r=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function cC(t){const r=t+"CollectionProvider",[o,a]=oi(r),[l,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),f=v=>{const{scope:C,children:R}=v,j=ae.useRef(null),P=ae.useRef(new Map).current;return u.jsx(l,{scope:C,itemMap:P,collectionRef:j,children:R})};f.displayName=r;const h=t+"CollectionSlot",g=Ka(h),y=ae.forwardRef((v,C)=>{const{scope:R,children:j}=v,P=c(h,R),A=Ze(C,P.collectionRef);return u.jsx(g,{ref:A,children:j})});y.displayName=h;const x=t+"CollectionItemSlot",b="data-radix-collection-item",k=Ka(x),w=ae.forwardRef((v,C)=>{const{scope:R,children:j,...P}=v,A=ae.useRef(null),$=Ze(C,A),B=c(x,R);return ae.useEffect(()=>(B.itemMap.set(A,{ref:A,...P}),()=>void B.itemMap.delete(A))),u.jsx(k,{[b]:"",ref:$,children:j})});w.displayName=x;function N(v){const C=c(t+"CollectionConsumer",v);return ae.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const P=Array.from(j.querySelectorAll(`[${b}]`));return Array.from(C.itemMap.values()).sort((B,W)=>P.indexOf(B.ref.current)-P.indexOf(W.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:f,Slot:y,ItemSlot:w},N,a]}var uC=m.createContext(void 0);function dC(t){const r=m.useContext(uC);return t||r||"ltr"}var fC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=fC.reduce((t,r)=>{const o=Ka(`Primitive.${r}`),a=m.forwardRef((l,c)=>{const{asChild:f,...h}=l,g=f?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...h,ref:c})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function hC(t,r){t&&ri.flushSync(()=>t.dispatchEvent(r))}function _o(t){const r=m.useRef(t);return m.useEffect(()=>{r.current=t}),m.useMemo(()=>(...o)=>{var a;return(a=r.current)==null?void 0:a.call(r,...o)},[])}function pC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t);m.useEffect(()=>{const a=l=>{l.key==="Escape"&&o(l)};return r.addEventListener("keydown",a,{capture:!0}),()=>r.removeEventListener("keydown",a,{capture:!0})},[o,r])}var mC="DismissableLayer",Zd="dismissableLayer.update",gC="dismissableLayer.pointerDownOutside",yC="dismissableLayer.focusOutside",yg,gv=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cc=m.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...g}=t,y=m.useContext(gv),[x,b]=m.useState(null),k=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=m.useState({}),N=Ze(r,W=>b(W)),v=Array.from(y.layers),[C]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),R=v.indexOf(C),j=x?v.indexOf(x):-1,P=y.layersWithOutsidePointerEventsDisabled.size>0,A=j>=R,$=wC(W=>{const X=W.target,H=[...y.branches].some(Y=>Y.contains(X));!A||H||(l==null||l(W),f==null||f(W),W.defaultPrevented||h==null||h())},k),B=bC(W=>{const X=W.target;[...y.branches].some(Y=>Y.contains(X))||(c==null||c(W),f==null||f(W),W.defaultPrevented||h==null||h())},k);return pC(W=>{j===y.layers.size-1&&(a==null||a(W),!W.defaultPrevented&&h&&(W.preventDefault(),h()))},k),m.useEffect(()=>{if(x)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(yg=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(x)),y.layers.add(x),vg(),()=>{o&&y.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=yg)}},[x,k,o,y]),m.useEffect(()=>()=>{x&&(y.layers.delete(x),y.layersWithOutsidePointerEventsDisabled.delete(x),vg())},[x,y]),m.useEffect(()=>{const W=()=>w({});return document.addEventListener(Zd,W),()=>document.removeEventListener(Zd,W)},[]),u.jsx(Be.div,{...g,ref:N,style:{pointerEvents:P?A?"auto":"none":void 0,...t.style},onFocusCapture:Oe(t.onFocusCapture,B.onFocusCapture),onBlurCapture:Oe(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Oe(t.onPointerDownCapture,$.onPointerDownCapture)})});cc.displayName=mC;var vC="DismissableLayerBranch",xC=m.forwardRef((t,r)=>{const o=m.useContext(gv),a=m.useRef(null),l=Ze(r,a);return m.useEffect(()=>{const c=a.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),u.jsx(Be.div,{...t,ref:l})});xC.displayName=vC;function wC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t),a=m.useRef(!1),l=m.useRef(()=>{});return m.useEffect(()=>{const c=h=>{if(h.target&&!a.current){let g=function(){yv(gC,o,y,{discrete:!0})};const y={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",l.current),l.current=g,r.addEventListener("click",l.current,{once:!0})):g()}else r.removeEventListener("click",l.current);a.current=!1},f=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),r.removeEventListener("pointerdown",c),r.removeEventListener("click",l.current)}},[r,o]),{onPointerDownCapture:()=>a.current=!0}}function bC(t,r=globalThis==null?void 0:globalThis.document){const o=_o(t),a=m.useRef(!1);return m.useEffect(()=>{const l=c=>{c.target&&!a.current&&yv(yC,o,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",l),()=>r.removeEventListener("focusin",l)},[r,o]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function vg(){const t=new CustomEvent(Zd);document.dispatchEvent(t)}function yv(t,r,o,{discrete:a}){const l=o.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&l.addEventListener(t,r,{once:!0}),a?hC(l,c):l.dispatchEvent(c)}var xd=0;function vv(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??xg()),document.body.insertAdjacentElement("beforeend",t[1]??xg()),xd++,()=>{xd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),xd--}},[])}function xg(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var wd="focusScope.autoFocusOnMount",bd="focusScope.autoFocusOnUnmount",wg={bubbles:!1,cancelable:!0},SC="FocusScope",Df=m.forwardRef((t,r)=>{const{loop:o=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...f}=t,[h,g]=m.useState(null),y=_o(l),x=_o(c),b=m.useRef(null),k=Ze(r,v=>g(v)),w=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let v=function(P){if(w.paused||!h)return;const A=P.target;h.contains(A)?b.current=A:Kr(b.current,{select:!0})},C=function(P){if(w.paused||!h)return;const A=P.relatedTarget;A!==null&&(h.contains(A)||Kr(b.current,{select:!0}))},R=function(P){if(document.activeElement===document.body)for(const $ of P)$.removedNodes.length>0&&Kr(h)};document.addEventListener("focusin",v),document.addEventListener("focusout",C);const j=new MutationObserver(R);return h&&j.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",C),j.disconnect()}}},[a,h,w.paused]),m.useEffect(()=>{if(h){Sg.add(w);const v=document.activeElement;if(!h.contains(v)){const R=new CustomEvent(wd,wg);h.addEventListener(wd,y),h.dispatchEvent(R),R.defaultPrevented||(kC(RC(xv(h)),{select:!0}),document.activeElement===v&&Kr(h))}return()=>{h.removeEventListener(wd,y),setTimeout(()=>{const R=new CustomEvent(bd,wg);h.addEventListener(bd,x),h.dispatchEvent(R),R.defaultPrevented||Kr(v??document.body,{select:!0}),h.removeEventListener(bd,x),Sg.remove(w)},0)}}},[h,y,x,w]);const N=m.useCallback(v=>{if(!o&&!a||w.paused)return;const C=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,R=document.activeElement;if(C&&R){const j=v.currentTarget,[P,A]=CC(j);P&&A?!v.shiftKey&&R===A?(v.preventDefault(),o&&Kr(P,{select:!0})):v.shiftKey&&R===P&&(v.preventDefault(),o&&Kr(A,{select:!0})):R===j&&v.preventDefault()}},[o,a,w.paused]);return u.jsx(Be.div,{tabIndex:-1,...f,ref:k,onKeyDown:N})});Df.displayName=SC;function kC(t,{select:r=!1}={}){const o=document.activeElement;for(const a of t)if(Kr(a,{select:r}),document.activeElement!==o)return}function CC(t){const r=xv(t),o=bg(r,t),a=bg(r.reverse(),t);return[o,a]}function xv(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function bg(t,r){for(const o of t)if(!EC(o,{upTo:r}))return o}function EC(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function NC(t){return t instanceof HTMLInputElement&&"select"in t}function Kr(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&NC(t)&&r&&t.select()}}var Sg=PC();function PC(){let t=[];return{add(r){const o=t[0];r!==o&&(o==null||o.pause()),t=kg(t,r),t.unshift(r)},remove(r){var o;t=kg(t,r),(o=t[0])==null||o.resume()}}}function kg(t,r){const o=[...t],a=o.indexOf(r);return a!==-1&&o.splice(a,1),o}function RC(t){return t.filter(r=>r.tagName!=="A")}var Et=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},jC=hy[" useId ".trim().toString()]||(()=>{}),TC=0;function Lo(t){const[r,o]=m.useState(jC());return Et(()=>{o(a=>a??String(TC++))},[t]),r?`radix-${r}`:""}const MC=["top","right","bottom","left"],ro=Math.min,Qt=Math.max,Jl=Math.round,Nl=Math.floor,Qn=t=>({x:t,y:t}),IC={left:"right",right:"left",bottom:"top",top:"bottom"},AC={start:"end",end:"start"};function ef(t,r,o){return Qt(t,ro(r,o))}function gr(t,r){return typeof t=="function"?t(r):t}function yr(t){return t.split("-")[0]}function Qs(t){return t.split("-")[1]}function Of(t){return t==="x"?"y":"x"}function _f(t){return t==="y"?"height":"width"}const LC=new Set(["top","bottom"]);function Kn(t){return LC.has(yr(t))?"y":"x"}function Ff(t){return Of(Kn(t))}function zC(t,r,o){o===void 0&&(o=!1);const a=Qs(t),l=Ff(t),c=_f(l);let f=l==="x"?a===(o?"end":"start")?"right":"left":a==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(f=Zl(f)),[f,Zl(f)]}function DC(t){const r=Zl(t);return[tf(t),r,tf(r)]}function tf(t){return t.replace(/start|end/g,r=>AC[r])}const Cg=["left","right"],Eg=["right","left"],OC=["top","bottom"],_C=["bottom","top"];function FC(t,r,o){switch(t){case"top":case"bottom":return o?r?Eg:Cg:r?Cg:Eg;case"left":case"right":return r?OC:_C;default:return[]}}function UC(t,r,o,a){const l=Qs(t);let c=FC(yr(t),o==="start",a);return l&&(c=c.map(f=>f+"-"+l),r&&(c=c.concat(c.map(tf)))),c}function Zl(t){return t.replace(/left|right|bottom|top/g,r=>IC[r])}function $C(t){return{top:0,right:0,bottom:0,left:0,...t}}function wv(t){return typeof t!="number"?$C(t):{top:t,right:t,bottom:t,left:t}}function ec(t){const{x:r,y:o,width:a,height:l}=t;return{width:a,height:l,top:o,left:r,right:r+a,bottom:o+l,x:r,y:o}}function Ng(t,r,o){let{reference:a,floating:l}=t;const c=Kn(r),f=Ff(r),h=_f(f),g=yr(r),y=c==="y",x=a.x+a.width/2-l.width/2,b=a.y+a.height/2-l.height/2,k=a[h]/2-l[h]/2;let w;switch(g){case"top":w={x,y:a.y-l.height};break;case"bottom":w={x,y:a.y+a.height};break;case"right":w={x:a.x+a.width,y:b};break;case"left":w={x:a.x-l.width,y:b};break;default:w={x:a.x,y:a.y}}switch(Qs(r)){case"start":w[f]-=k*(o&&y?-1:1);break;case"end":w[f]+=k*(o&&y?-1:1);break}return w}async function BC(t,r){var o;r===void 0&&(r={});const{x:a,y:l,platform:c,rects:f,elements:h,strategy:g}=t,{boundary:y="clippingAncestors",rootBoundary:x="viewport",elementContext:b="floating",altBoundary:k=!1,padding:w=0}=gr(r,t),N=wv(w),C=h[k?b==="floating"?"reference":"floating":b],R=ec(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(C)))==null||o?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:y,rootBoundary:x,strategy:g})),j=b==="floating"?{x:a,y:l,width:f.floating.width,height:f.floating.height}:f.reference,P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),A=await(c.isElement==null?void 0:c.isElement(P))?await(c.getScale==null?void 0:c.getScale(P))||{x:1,y:1}:{x:1,y:1},$=ec(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:j,offsetParent:P,strategy:g}):j);return{top:(R.top-$.top+N.top)/A.y,bottom:($.bottom-R.bottom+N.bottom)/A.y,left:(R.left-$.left+N.left)/A.x,right:($.right-R.right+N.right)/A.x}}const HC=async(t,r,o)=>{const{placement:a="bottom",strategy:l="absolute",middleware:c=[],platform:f}=o,h=c.filter(Boolean),g=await(f.isRTL==null?void 0:f.isRTL(r));let y=await f.getElementRects({reference:t,floating:r,strategy:l}),{x,y:b}=Ng(y,a,g),k=a,w={},N=0;for(let C=0;C<h.length;C++){var v;const{name:R,fn:j}=h[C],{x:P,y:A,data:$,reset:B}=await j({x,y:b,initialPlacement:a,placement:k,strategy:l,middlewareData:w,rects:y,platform:{...f,detectOverflow:(v=f.detectOverflow)!=null?v:BC},elements:{reference:t,floating:r}});x=P??x,b=A??b,w={...w,[R]:{...w[R],...$}},B&&N<=50&&(N++,typeof B=="object"&&(B.placement&&(k=B.placement),B.rects&&(y=B.rects===!0?await f.getElementRects({reference:t,floating:r,strategy:l}):B.rects),{x,y:b}=Ng(y,k,g)),C=-1)}return{x,y:b,placement:k,strategy:l,middlewareData:w}},WC=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:a,placement:l,rects:c,platform:f,elements:h,middlewareData:g}=r,{element:y,padding:x=0}=gr(t,r)||{};if(y==null)return{};const b=wv(x),k={x:o,y:a},w=Ff(l),N=_f(w),v=await f.getDimensions(y),C=w==="y",R=C?"top":"left",j=C?"bottom":"right",P=C?"clientHeight":"clientWidth",A=c.reference[N]+c.reference[w]-k[w]-c.floating[N],$=k[w]-c.reference[w],B=await(f.getOffsetParent==null?void 0:f.getOffsetParent(y));let W=B?B[P]:0;(!W||!await(f.isElement==null?void 0:f.isElement(B)))&&(W=h.floating[P]||c.floating[N]);const X=A/2-$/2,H=W/2-v[N]/2-1,Y=ro(b[R],H),_=ro(b[j],H),O=Y,Z=W-v[N]-_,ee=W/2-v[N]/2+X,G=ef(O,ee,Z),ie=!g.arrow&&Qs(l)!=null&&ee!==G&&c.reference[N]/2-(ee<O?Y:_)-v[N]/2<0,ce=ie?ee<O?ee-O:ee-Z:0;return{[w]:k[w]+ce,data:{[w]:G,centerOffset:ee-G-ce,...ie&&{alignmentOffset:ce}},reset:ie}}}),VC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,a;const{placement:l,middlewareData:c,rects:f,initialPlacement:h,platform:g,elements:y}=r,{mainAxis:x=!0,crossAxis:b=!0,fallbackPlacements:k,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:v=!0,...C}=gr(t,r);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const R=yr(l),j=Kn(h),P=yr(h)===h,A=await(g.isRTL==null?void 0:g.isRTL(y.floating)),$=k||(P||!v?[Zl(h)]:DC(h)),B=N!=="none";!k&&B&&$.push(...UC(h,v,N,A));const W=[h,...$],X=await g.detectOverflow(r,C),H=[];let Y=((a=c.flip)==null?void 0:a.overflows)||[];if(x&&H.push(X[R]),b){const ee=zC(l,f,A);H.push(X[ee[0]],X[ee[1]])}if(Y=[...Y,{placement:l,overflows:H}],!H.every(ee=>ee<=0)){var _,O;const ee=(((_=c.flip)==null?void 0:_.index)||0)+1,G=W[ee];if(G&&(!(b==="alignment"?j!==Kn(G):!1)||Y.every(K=>Kn(K.placement)===j?K.overflows[0]>0:!0)))return{data:{index:ee,overflows:Y},reset:{placement:G}};let ie=(O=Y.filter(ce=>ce.overflows[0]<=0).sort((ce,K)=>ce.overflows[1]-K.overflows[1])[0])==null?void 0:O.placement;if(!ie)switch(w){case"bestFit":{var Z;const ce=(Z=Y.filter(K=>{if(B){const q=Kn(K.placement);return q===j||q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(q=>q>0).reduce((q,Q)=>q+Q,0)]).sort((K,q)=>K[1]-q[1])[0])==null?void 0:Z[0];ce&&(ie=ce);break}case"initialPlacement":ie=h;break}if(l!==ie)return{reset:{placement:ie}}}return{}}}};function Pg(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function Rg(t){return MC.some(r=>t[r]>=0)}const KC=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o,platform:a}=r,{strategy:l="referenceHidden",...c}=gr(t,r);switch(l){case"referenceHidden":{const f=await a.detectOverflow(r,{...c,elementContext:"reference"}),h=Pg(f,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Rg(h)}}}case"escaped":{const f=await a.detectOverflow(r,{...c,altBoundary:!0}),h=Pg(f,o.floating);return{data:{escapedOffsets:h,escaped:Rg(h)}}}default:return{}}}}},bv=new Set(["left","top"]);async function QC(t,r){const{placement:o,platform:a,elements:l}=t,c=await(a.isRTL==null?void 0:a.isRTL(l.floating)),f=yr(o),h=Qs(o),g=Kn(o)==="y",y=bv.has(f)?-1:1,x=c&&g?-1:1,b=gr(r,t);let{mainAxis:k,crossAxis:w,alignmentAxis:N}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof N=="number"&&(w=h==="end"?N*-1:N),g?{x:w*x,y:k*y}:{x:k*y,y:w*x}}const qC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,a;const{x:l,y:c,placement:f,middlewareData:h}=r,g=await QC(r,t);return f===((o=h.offset)==null?void 0:o.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:l+g.x,y:c+g.y,data:{...g,placement:f}}}}},GC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:a,placement:l,platform:c}=r,{mainAxis:f=!0,crossAxis:h=!1,limiter:g={fn:R=>{let{x:j,y:P}=R;return{x:j,y:P}}},...y}=gr(t,r),x={x:o,y:a},b=await c.detectOverflow(r,y),k=Kn(yr(l)),w=Of(k);let N=x[w],v=x[k];if(f){const R=w==="y"?"top":"left",j=w==="y"?"bottom":"right",P=N+b[R],A=N-b[j];N=ef(P,N,A)}if(h){const R=k==="y"?"top":"left",j=k==="y"?"bottom":"right",P=v+b[R],A=v-b[j];v=ef(P,v,A)}const C=g.fn({...r,[w]:N,[k]:v});return{...C,data:{x:C.x-o,y:C.y-a,enabled:{[w]:f,[k]:h}}}}}},YC=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:a,placement:l,rects:c,middlewareData:f}=r,{offset:h=0,mainAxis:g=!0,crossAxis:y=!0}=gr(t,r),x={x:o,y:a},b=Kn(l),k=Of(b);let w=x[k],N=x[b];const v=gr(h,r),C=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(g){const P=k==="y"?"height":"width",A=c.reference[k]-c.floating[P]+C.mainAxis,$=c.reference[k]+c.reference[P]-C.mainAxis;w<A?w=A:w>$&&(w=$)}if(y){var R,j;const P=k==="y"?"width":"height",A=bv.has(yr(l)),$=c.reference[b]-c.floating[P]+(A&&((R=f.offset)==null?void 0:R[b])||0)+(A?0:C.crossAxis),B=c.reference[b]+c.reference[P]+(A?0:((j=f.offset)==null?void 0:j[b])||0)-(A?C.crossAxis:0);N<$?N=$:N>B&&(N=B)}return{[k]:w,[b]:N}}}},XC=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,a;const{placement:l,rects:c,platform:f,elements:h}=r,{apply:g=()=>{},...y}=gr(t,r),x=await f.detectOverflow(r,y),b=yr(l),k=Qs(l),w=Kn(l)==="y",{width:N,height:v}=c.floating;let C,R;b==="top"||b==="bottom"?(C=b,R=k===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(R=b,C=k==="end"?"top":"bottom");const j=v-x.top-x.bottom,P=N-x.left-x.right,A=ro(v-x[C],j),$=ro(N-x[R],P),B=!r.middlewareData.shift;let W=A,X=$;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(X=P),(a=r.middlewareData.shift)!=null&&a.enabled.y&&(W=j),B&&!k){const Y=Qt(x.left,0),_=Qt(x.right,0),O=Qt(x.top,0),Z=Qt(x.bottom,0);w?X=N-2*(Y!==0||_!==0?Y+_:Qt(x.left,x.right)):W=v-2*(O!==0||Z!==0?O+Z:Qt(x.top,x.bottom))}await g({...r,availableWidth:X,availableHeight:W});const H=await f.getDimensions(h.floating);return N!==H.width||v!==H.height?{reset:{rects:!0}}:{}}}};function uc(){return typeof window<"u"}function qs(t){return Sv(t)?(t.nodeName||"").toLowerCase():"#document"}function qt(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function Yn(t){var r;return(r=(Sv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Sv(t){return uc()?t instanceof Node||t instanceof qt(t).Node:!1}function En(t){return uc()?t instanceof Element||t instanceof qt(t).Element:!1}function qn(t){return uc()?t instanceof HTMLElement||t instanceof qt(t).HTMLElement:!1}function jg(t){return!uc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qt(t).ShadowRoot}const JC=new Set(["inline","contents"]);function si(t){const{overflow:r,overflowX:o,overflowY:a,display:l}=Nn(t);return/auto|scroll|overlay|hidden|clip/.test(r+a+o)&&!JC.has(l)}const ZC=new Set(["table","td","th"]);function e2(t){return ZC.has(qs(t))}const t2=[":popover-open",":modal"];function dc(t){return t2.some(r=>{try{return t.matches(r)}catch{return!1}})}const n2=["transform","translate","scale","rotate","perspective"],r2=["transform","translate","scale","rotate","perspective","filter"],o2=["paint","layout","strict","content"];function Uf(t){const r=$f(),o=En(t)?Nn(t):t;return n2.some(a=>o[a]?o[a]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||r2.some(a=>(o.willChange||"").includes(a))||o2.some(a=>(o.contain||"").includes(a))}function s2(t){let r=oo(t);for(;qn(r)&&!Fs(r);){if(Uf(r))return r;if(dc(r))return null;r=oo(r)}return null}function $f(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const a2=new Set(["html","body","#document"]);function Fs(t){return a2.has(qs(t))}function Nn(t){return qt(t).getComputedStyle(t)}function fc(t){return En(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function oo(t){if(qs(t)==="html")return t;const r=t.assignedSlot||t.parentNode||jg(t)&&t.host||Yn(t);return jg(r)?r.host:r}function kv(t){const r=oo(t);return Fs(r)?t.ownerDocument?t.ownerDocument.body:t.body:qn(r)&&si(r)?r:kv(r)}function Qa(t,r,o){var a;r===void 0&&(r=[]),o===void 0&&(o=!0);const l=kv(t),c=l===((a=t.ownerDocument)==null?void 0:a.body),f=qt(l);if(c){const h=nf(f);return r.concat(f,f.visualViewport||[],si(l)?l:[],h&&o?Qa(h):[])}return r.concat(l,Qa(l,[],o))}function nf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Cv(t){const r=Nn(t);let o=parseFloat(r.width)||0,a=parseFloat(r.height)||0;const l=qn(t),c=l?t.offsetWidth:o,f=l?t.offsetHeight:a,h=Jl(o)!==c||Jl(a)!==f;return h&&(o=c,a=f),{width:o,height:a,$:h}}function Bf(t){return En(t)?t:t.contextElement}function Cs(t){const r=Bf(t);if(!qn(r))return Qn(1);const o=r.getBoundingClientRect(),{width:a,height:l,$:c}=Cv(r);let f=(c?Jl(o.width):o.width)/a,h=(c?Jl(o.height):o.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const i2=Qn(0);function Ev(t){const r=qt(t);return!$f()||!r.visualViewport?i2:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function l2(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==qt(t)?!1:r}function Fo(t,r,o,a){r===void 0&&(r=!1),o===void 0&&(o=!1);const l=t.getBoundingClientRect(),c=Bf(t);let f=Qn(1);r&&(a?En(a)&&(f=Cs(a)):f=Cs(t));const h=l2(c,o,a)?Ev(c):Qn(0);let g=(l.left+h.x)/f.x,y=(l.top+h.y)/f.y,x=l.width/f.x,b=l.height/f.y;if(c){const k=qt(c),w=a&&En(a)?qt(a):a;let N=k,v=nf(N);for(;v&&a&&w!==N;){const C=Cs(v),R=v.getBoundingClientRect(),j=Nn(v),P=R.left+(v.clientLeft+parseFloat(j.paddingLeft))*C.x,A=R.top+(v.clientTop+parseFloat(j.paddingTop))*C.y;g*=C.x,y*=C.y,x*=C.x,b*=C.y,g+=P,y+=A,N=qt(v),v=nf(N)}}return ec({width:x,height:b,x:g,y})}function hc(t,r){const o=fc(t).scrollLeft;return r?r.left+o:Fo(Yn(t)).left+o}function Nv(t,r){const o=t.getBoundingClientRect(),a=o.left+r.scrollLeft-hc(t,o),l=o.top+r.scrollTop;return{x:a,y:l}}function c2(t){let{elements:r,rect:o,offsetParent:a,strategy:l}=t;const c=l==="fixed",f=Yn(a),h=r?dc(r.floating):!1;if(a===f||h&&c)return o;let g={scrollLeft:0,scrollTop:0},y=Qn(1);const x=Qn(0),b=qn(a);if((b||!b&&!c)&&((qs(a)!=="body"||si(f))&&(g=fc(a)),qn(a))){const w=Fo(a);y=Cs(a),x.x=w.x+a.clientLeft,x.y=w.y+a.clientTop}const k=f&&!b&&!c?Nv(f,g):Qn(0);return{width:o.width*y.x,height:o.height*y.y,x:o.x*y.x-g.scrollLeft*y.x+x.x+k.x,y:o.y*y.y-g.scrollTop*y.y+x.y+k.y}}function u2(t){return Array.from(t.getClientRects())}function d2(t){const r=Yn(t),o=fc(t),a=t.ownerDocument.body,l=Qt(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),c=Qt(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+hc(t);const h=-o.scrollTop;return Nn(a).direction==="rtl"&&(f+=Qt(r.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:h}}const Tg=25;function f2(t,r){const o=qt(t),a=Yn(t),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,h=0,g=0;if(l){c=l.width,f=l.height;const x=$f();(!x||x&&r==="fixed")&&(h=l.offsetLeft,g=l.offsetTop)}const y=hc(a);if(y<=0){const x=a.ownerDocument,b=x.body,k=getComputedStyle(b),w=x.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,N=Math.abs(a.clientWidth-b.clientWidth-w);N<=Tg&&(c-=N)}else y<=Tg&&(c+=y);return{width:c,height:f,x:h,y:g}}const h2=new Set(["absolute","fixed"]);function p2(t,r){const o=Fo(t,!0,r==="fixed"),a=o.top+t.clientTop,l=o.left+t.clientLeft,c=qn(t)?Cs(t):Qn(1),f=t.clientWidth*c.x,h=t.clientHeight*c.y,g=l*c.x,y=a*c.y;return{width:f,height:h,x:g,y}}function Mg(t,r,o){let a;if(r==="viewport")a=f2(t,o);else if(r==="document")a=d2(Yn(t));else if(En(r))a=p2(r,o);else{const l=Ev(t);a={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return ec(a)}function Pv(t,r){const o=oo(t);return o===r||!En(o)||Fs(o)?!1:Nn(o).position==="fixed"||Pv(o,r)}function m2(t,r){const o=r.get(t);if(o)return o;let a=Qa(t,[],!1).filter(h=>En(h)&&qs(h)!=="body"),l=null;const c=Nn(t).position==="fixed";let f=c?oo(t):t;for(;En(f)&&!Fs(f);){const h=Nn(f),g=Uf(f);!g&&h.position==="fixed"&&(l=null),(c?!g&&!l:!g&&h.position==="static"&&!!l&&h2.has(l.position)||si(f)&&!g&&Pv(t,f))?a=a.filter(x=>x!==f):l=h,f=oo(f)}return r.set(t,a),a}function g2(t){let{element:r,boundary:o,rootBoundary:a,strategy:l}=t;const f=[...o==="clippingAncestors"?dc(r)?[]:m2(r,this._c):[].concat(o),a],h=f[0],g=f.reduce((y,x)=>{const b=Mg(r,x,l);return y.top=Qt(b.top,y.top),y.right=ro(b.right,y.right),y.bottom=ro(b.bottom,y.bottom),y.left=Qt(b.left,y.left),y},Mg(r,h,l));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function y2(t){const{width:r,height:o}=Cv(t);return{width:r,height:o}}function v2(t,r,o){const a=qn(r),l=Yn(r),c=o==="fixed",f=Fo(t,!0,c,r);let h={scrollLeft:0,scrollTop:0};const g=Qn(0);function y(){g.x=hc(l)}if(a||!a&&!c)if((qs(r)!=="body"||si(l))&&(h=fc(r)),a){const w=Fo(r,!0,c,r);g.x=w.x+r.clientLeft,g.y=w.y+r.clientTop}else l&&y();c&&!a&&l&&y();const x=l&&!a&&!c?Nv(l,h):Qn(0),b=f.left+h.scrollLeft-g.x-x.x,k=f.top+h.scrollTop-g.y-x.y;return{x:b,y:k,width:f.width,height:f.height}}function Sd(t){return Nn(t).position==="static"}function Ig(t,r){if(!qn(t)||Nn(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return Yn(t)===o&&(o=o.ownerDocument.body),o}function Rv(t,r){const o=qt(t);if(dc(t))return o;if(!qn(t)){let l=oo(t);for(;l&&!Fs(l);){if(En(l)&&!Sd(l))return l;l=oo(l)}return o}let a=Ig(t,r);for(;a&&e2(a)&&Sd(a);)a=Ig(a,r);return a&&Fs(a)&&Sd(a)&&!Uf(a)?o:a||s2(t)||o}const x2=async function(t){const r=this.getOffsetParent||Rv,o=this.getDimensions,a=await o(t.floating);return{reference:v2(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function w2(t){return Nn(t).direction==="rtl"}const b2={convertOffsetParentRelativeRectToViewportRelativeRect:c2,getDocumentElement:Yn,getClippingRect:g2,getOffsetParent:Rv,getElementRects:x2,getClientRects:u2,getDimensions:y2,getScale:Cs,isElement:En,isRTL:w2};function jv(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function S2(t,r){let o=null,a;const l=Yn(t);function c(){var h;clearTimeout(a),(h=o)==null||h.disconnect(),o=null}function f(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),c();const y=t.getBoundingClientRect(),{left:x,top:b,width:k,height:w}=y;if(h||r(),!k||!w)return;const N=Nl(b),v=Nl(l.clientWidth-(x+k)),C=Nl(l.clientHeight-(b+w)),R=Nl(x),P={rootMargin:-N+"px "+-v+"px "+-C+"px "+-R+"px",threshold:Qt(0,ro(1,g))||1};let A=!0;function $(B){const W=B[0].intersectionRatio;if(W!==g){if(!A)return f();W?f(!1,W):a=setTimeout(()=>{f(!1,1e-7)},1e3)}W===1&&!jv(y,t.getBoundingClientRect())&&f(),A=!1}try{o=new IntersectionObserver($,{...P,root:l.ownerDocument})}catch{o=new IntersectionObserver($,P)}o.observe(t)}return f(!0),c}function k2(t,r,o,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=a,y=Bf(t),x=l||c?[...y?Qa(y):[],...Qa(r)]:[];x.forEach(R=>{l&&R.addEventListener("scroll",o,{passive:!0}),c&&R.addEventListener("resize",o)});const b=y&&h?S2(y,o):null;let k=-1,w=null;f&&(w=new ResizeObserver(R=>{let[j]=R;j&&j.target===y&&w&&(w.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var P;(P=w)==null||P.observe(r)})),o()}),y&&!g&&w.observe(y),w.observe(r));let N,v=g?Fo(t):null;g&&C();function C(){const R=Fo(t);v&&!jv(v,R)&&o(),v=R,N=requestAnimationFrame(C)}return o(),()=>{var R;x.forEach(j=>{l&&j.removeEventListener("scroll",o),c&&j.removeEventListener("resize",o)}),b==null||b(),(R=w)==null||R.disconnect(),w=null,g&&cancelAnimationFrame(N)}}const C2=qC,E2=GC,N2=VC,P2=XC,R2=KC,Ag=WC,j2=YC,T2=(t,r,o)=>{const a=new Map,l={platform:b2,...o},c={...l.platform,_c:a};return HC(t,r,{...l,platform:c})};var M2=typeof document<"u",I2=function(){},_l=M2?m.useLayoutEffect:I2;function tc(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,a,l;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(a=o;a--!==0;)if(!tc(t[a],r[a]))return!1;return!0}if(l=Object.keys(t),o=l.length,o!==Object.keys(r).length)return!1;for(a=o;a--!==0;)if(!{}.hasOwnProperty.call(r,l[a]))return!1;for(a=o;a--!==0;){const c=l[a];if(!(c==="_owner"&&t.$$typeof)&&!tc(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function Tv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Lg(t,r){const o=Tv(t);return Math.round(r*o)/o}function kd(t){const r=m.useRef(t);return _l(()=>{r.current=t}),r}function A2(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l,elements:{reference:c,floating:f}={},transform:h=!0,whileElementsMounted:g,open:y}=t,[x,b]=m.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[k,w]=m.useState(a);tc(k,a)||w(a);const[N,v]=m.useState(null),[C,R]=m.useState(null),j=m.useCallback(K=>{K!==B.current&&(B.current=K,v(K))},[]),P=m.useCallback(K=>{K!==W.current&&(W.current=K,R(K))},[]),A=c||N,$=f||C,B=m.useRef(null),W=m.useRef(null),X=m.useRef(x),H=g!=null,Y=kd(g),_=kd(l),O=kd(y),Z=m.useCallback(()=>{if(!B.current||!W.current)return;const K={placement:r,strategy:o,middleware:k};_.current&&(K.platform=_.current),T2(B.current,W.current,K).then(q=>{const Q={...q,isPositioned:O.current!==!1};ee.current&&!tc(X.current,Q)&&(X.current=Q,ri.flushSync(()=>{b(Q)}))})},[k,r,o,_,O]);_l(()=>{y===!1&&X.current.isPositioned&&(X.current.isPositioned=!1,b(K=>({...K,isPositioned:!1})))},[y]);const ee=m.useRef(!1);_l(()=>(ee.current=!0,()=>{ee.current=!1}),[]),_l(()=>{if(A&&(B.current=A),$&&(W.current=$),A&&$){if(Y.current)return Y.current(A,$,Z);Z()}},[A,$,Z,Y,H]);const G=m.useMemo(()=>({reference:B,floating:W,setReference:j,setFloating:P}),[j,P]),ie=m.useMemo(()=>({reference:A,floating:$}),[A,$]),ce=m.useMemo(()=>{const K={position:o,left:0,top:0};if(!ie.floating)return K;const q=Lg(ie.floating,x.x),Q=Lg(ie.floating,x.y);return h?{...K,transform:"translate("+q+"px, "+Q+"px)",...Tv(ie.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:q,top:Q}},[o,h,ie.floating,x.x,x.y]);return m.useMemo(()=>({...x,update:Z,refs:G,elements:ie,floatingStyles:ce}),[x,Z,G,ie,ce])}const L2=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:a,padding:l}=typeof t=="function"?t(o):t;return a&&r(a)?a.current!=null?Ag({element:a.current,padding:l}).fn(o):{}:a?Ag({element:a,padding:l}).fn(o):{}}}},z2=(t,r)=>({...C2(t),options:[t,r]}),D2=(t,r)=>({...E2(t),options:[t,r]}),O2=(t,r)=>({...j2(t),options:[t,r]}),_2=(t,r)=>({...N2(t),options:[t,r]}),F2=(t,r)=>({...P2(t),options:[t,r]}),U2=(t,r)=>({...R2(t),options:[t,r]}),$2=(t,r)=>({...L2(t),options:[t,r]});var B2="Arrow",Mv=m.forwardRef((t,r)=>{const{children:o,width:a=10,height:l=5,...c}=t;return u.jsx(Be.svg,{...c,ref:r,width:a,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mv.displayName=B2;var H2=Mv;function W2(t){const[r,o]=m.useState(void 0);return Et(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const a=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let f,h;if("borderBoxSize"in c){const g=c.borderBoxSize,y=Array.isArray(g)?g[0]:g;f=y.inlineSize,h=y.blockSize}else f=t.offsetWidth,h=t.offsetHeight;o({width:f,height:h})});return a.observe(t,{box:"border-box"}),()=>a.unobserve(t)}else o(void 0)},[t]),r}var Hf="Popper",[Iv,pc]=oi(Hf),[V2,Av]=Iv(Hf),Lv=t=>{const{__scopePopper:r,children:o}=t,[a,l]=m.useState(null);return u.jsx(V2,{scope:r,anchor:a,onAnchorChange:l,children:o})};Lv.displayName=Hf;var zv="PopperAnchor",Dv=m.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:a,...l}=t,c=Av(zv,o),f=m.useRef(null),h=Ze(r,f),g=m.useRef(null);return m.useEffect(()=>{const y=g.current;g.current=(a==null?void 0:a.current)||f.current,y!==g.current&&c.onAnchorChange(g.current)}),a?null:u.jsx(Be.div,{...l,ref:h})});Dv.displayName=zv;var Wf="PopperContent",[K2,Q2]=Iv(Wf),Ov=m.forwardRef((t,r)=>{var ne,he,be,Ce,Te,Ie;const{__scopePopper:o,side:a="bottom",sideOffset:l=0,align:c="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:x=0,sticky:b="partial",hideWhenDetached:k=!1,updatePositionStrategy:w="optimized",onPlaced:N,...v}=t,C=Av(Wf,o),[R,j]=m.useState(null),P=Ze(r,nt=>j(nt)),[A,$]=m.useState(null),B=W2(A),W=(B==null?void 0:B.width)??0,X=(B==null?void 0:B.height)??0,H=a+(c!=="center"?"-"+c:""),Y=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},_=Array.isArray(y)?y:[y],O=_.length>0,Z={padding:Y,boundary:_.filter(G2),altBoundary:O},{refs:ee,floatingStyles:G,placement:ie,isPositioned:ce,middlewareData:K}=A2({strategy:"fixed",placement:H,whileElementsMounted:(...nt)=>k2(...nt,{animationFrame:w==="always"}),elements:{reference:C.anchor},middleware:[z2({mainAxis:l+X,alignmentAxis:f}),g&&D2({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?O2():void 0,...Z}),g&&_2({...Z}),F2({...Z,apply:({elements:nt,rects:vt,availableWidth:Rn,availableHeight:ln})=>{const{width:cn,height:br}=vt.reference,jn=nt.floating.style;jn.setProperty("--radix-popper-available-width",`${Rn}px`),jn.setProperty("--radix-popper-available-height",`${ln}px`),jn.setProperty("--radix-popper-anchor-width",`${cn}px`),jn.setProperty("--radix-popper-anchor-height",`${br}px`)}}),A&&$2({element:A,padding:h}),Y2({arrowWidth:W,arrowHeight:X}),k&&U2({strategy:"referenceHidden",...Z})]}),[q,Q]=Uv(ie),M=_o(N);Et(()=>{ce&&(M==null||M())},[ce,M]);const F=(ne=K.arrow)==null?void 0:ne.x,le=(he=K.arrow)==null?void 0:he.y,J=((be=K.arrow)==null?void 0:be.centerOffset)!==0,[ue,xe]=m.useState();return Et(()=>{R&&xe(window.getComputedStyle(R).zIndex)},[R]),u.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:ce?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Ce=K.transformOrigin)==null?void 0:Ce.x,(Te=K.transformOrigin)==null?void 0:Te.y].join(" "),...((Ie=K.hide)==null?void 0:Ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(K2,{scope:o,placedSide:q,onArrowChange:$,arrowX:F,arrowY:le,shouldHideArrow:J,children:u.jsx(Be.div,{"data-side":q,"data-align":Q,...v,ref:P,style:{...v.style,animation:ce?void 0:"none"}})})})});Ov.displayName=Wf;var _v="PopperArrow",q2={top:"bottom",right:"left",bottom:"top",left:"right"},Fv=m.forwardRef(function(r,o){const{__scopePopper:a,...l}=r,c=Q2(_v,a),f=q2[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx(H2,{...l,ref:o,style:{...l.style,display:"block"}})})});Fv.displayName=_v;function G2(t){return t!==null}var Y2=t=>({name:"transformOrigin",options:t,fn(r){var C,R,j;const{placement:o,rects:a,middlewareData:l}=r,f=((C=l.arrow)==null?void 0:C.centerOffset)!==0,h=f?0:t.arrowWidth,g=f?0:t.arrowHeight,[y,x]=Uv(o),b={start:"0%",center:"50%",end:"100%"}[x],k=(((R=l.arrow)==null?void 0:R.x)??0)+h/2,w=(((j=l.arrow)==null?void 0:j.y)??0)+g/2;let N="",v="";return y==="bottom"?(N=f?b:`${k}px`,v=`${-g}px`):y==="top"?(N=f?b:`${k}px`,v=`${a.floating.height+g}px`):y==="right"?(N=`${-g}px`,v=f?b:`${w}px`):y==="left"&&(N=`${a.floating.width+g}px`,v=f?b:`${w}px`),{data:{x:N,y:v}}}});function Uv(t){const[r,o="center"]=t.split("-");return[r,o]}var $v=Lv,Bv=Dv,Hv=Ov,Wv=Fv,X2="Portal",mc=m.forwardRef((t,r)=>{var h;const{container:o,...a}=t,[l,c]=m.useState(!1);Et(()=>c(!0),[]);const f=o||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?zy.createPortal(u.jsx(Be.div,{...a,ref:r}),f):null});mc.displayName=X2;var J2=hy[" useInsertionEffect ".trim().toString()]||Et;function nc({prop:t,defaultProp:r,onChange:o=()=>{},caller:a}){const[l,c,f]=Z2({defaultProp:r,onChange:o}),h=t!==void 0,g=h?t:l;{const x=m.useRef(t!==void 0);m.useEffect(()=>{const b=x.current;b!==h&&console.warn(`${a} is changing from ${b?"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.`),x.current=h},[h,a])}const y=m.useCallback(x=>{var b;if(h){const k=eE(x)?x(t):x;k!==t&&((b=f.current)==null||b.call(f,k))}else c(x)},[h,t,c,f]);return[g,y]}function Z2({defaultProp:t,onChange:r}){const[o,a]=m.useState(t),l=m.useRef(o),c=m.useRef(r);return J2(()=>{c.current=r},[r]),m.useEffect(()=>{var f;l.current!==o&&((f=c.current)==null||f.call(c,o),l.current=o)},[o,l]),[o,a,c]}function eE(t){return typeof t=="function"}function tE(t){const r=m.useRef({value:t,previous:t});return m.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var Vv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nE="VisuallyHidden",Kv=m.forwardRef((t,r)=>u.jsx(Be.span,{...t,ref:r,style:{...Vv,...t.style}}));Kv.displayName=nE;var rE=Kv,oE=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},xs=new WeakMap,Pl=new WeakMap,Rl={},Cd=0,Qv=function(t){return t&&(t.host||Qv(t.parentNode))},sE=function(t,r){return r.map(function(o){if(t.contains(o))return o;var a=Qv(o);return a&&t.contains(a)?a:(console.error("aria-hidden",o,"in not contained inside",t,". Doing nothing"),null)}).filter(function(o){return!!o})},aE=function(t,r,o,a){var l=sE(r,Array.isArray(t)?t:[t]);Rl[o]||(Rl[o]=new WeakMap);var c=Rl[o],f=[],h=new Set,g=new Set(l),y=function(b){!b||h.has(b)||(h.add(b),y(b.parentNode))};l.forEach(y);var x=function(b){!b||g.has(b)||Array.prototype.forEach.call(b.children,function(k){if(h.has(k))x(k);else try{var w=k.getAttribute(a),N=w!==null&&w!=="false",v=(xs.get(k)||0)+1,C=(c.get(k)||0)+1;xs.set(k,v),c.set(k,C),f.push(k),v===1&&N&&Pl.set(k,!0),C===1&&k.setAttribute(o,"true"),N||k.setAttribute(a,"true")}catch(R){console.error("aria-hidden: cannot operate on ",k,R)}})};return x(r),h.clear(),Cd++,function(){f.forEach(function(b){var k=xs.get(b)-1,w=c.get(b)-1;xs.set(b,k),c.set(b,w),k||(Pl.has(b)||b.removeAttribute(a),Pl.delete(b)),w||b.removeAttribute(o)}),Cd--,Cd||(xs=new WeakMap,xs=new WeakMap,Pl=new WeakMap,Rl={})}},qv=function(t,r,o){o===void 0&&(o="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),l=oE(t);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),aE(a,l,o,"aria-hidden")):function(){return null}},Vn=function(){return Vn=Object.assign||function(r){for(var o,a=1,l=arguments.length;a<l;a++){o=arguments[a];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r},Vn.apply(this,arguments)};function Gv(t,r){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(o[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(t);l<a.length;l++)r.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(t,a[l])&&(o[a[l]]=t[a[l]]);return o}function iE(t,r,o){if(o||arguments.length===2)for(var a=0,l=r.length,c;a<l;a++)(c||!(a in r))&&(c||(c=Array.prototype.slice.call(r,0,a)),c[a]=r[a]);return t.concat(c||Array.prototype.slice.call(r))}var Fl="right-scroll-bar-position",Ul="width-before-scroll-bar",lE="with-scroll-bars-hidden",cE="--removed-body-scroll-bar-size";function Ed(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function uE(t,r){var o=m.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(a){var l=o.value;l!==a&&(o.value=a,o.callback(a,l))}}}})[0];return o.callback=r,o.facade}var dE=typeof window<"u"?m.useLayoutEffect:m.useEffect,zg=new WeakMap;function fE(t,r){var o=uE(null,function(a){return t.forEach(function(l){return Ed(l,a)})});return dE(function(){var a=zg.get(o);if(a){var l=new Set(a),c=new Set(t),f=o.current;l.forEach(function(h){c.has(h)||Ed(h,null)}),c.forEach(function(h){l.has(h)||Ed(h,f)})}zg.set(o,t)},[t]),o}function hE(t){return t}function pE(t,r){r===void 0&&(r=hE);var o=[],a=!1,l={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(c){var f=r(c,a);return o.push(f),function(){o=o.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(a=!0;o.length;){var f=o;o=[],f.forEach(c)}o={push:function(h){return c(h)},filter:function(){return o}}},assignMedium:function(c){a=!0;var f=[];if(o.length){var h=o;o=[],h.forEach(c),f=o}var g=function(){var x=f;f=[],x.forEach(c)},y=function(){return Promise.resolve().then(g)};y(),o={push:function(x){f.push(x),y()},filter:function(x){return f=f.filter(x),o}}}};return l}function mE(t){t===void 0&&(t={});var r=pE(null);return r.options=Vn({async:!0,ssr:!1},t),r}var Yv=function(t){var r=t.sideCar,o=Gv(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=r.read();if(!a)throw new Error("Sidecar medium not found");return m.createElement(a,Vn({},o))};Yv.isSideCarExport=!0;function gE(t,r){return t.useMedium(r),Yv}var Xv=mE(),Nd=function(){},gc=m.forwardRef(function(t,r){var o=m.useRef(null),a=m.useState({onScrollCapture:Nd,onWheelCapture:Nd,onTouchMoveCapture:Nd}),l=a[0],c=a[1],f=t.forwardProps,h=t.children,g=t.className,y=t.removeScrollBar,x=t.enabled,b=t.shards,k=t.sideCar,w=t.noRelative,N=t.noIsolation,v=t.inert,C=t.allowPinchZoom,R=t.as,j=R===void 0?"div":R,P=t.gapMode,A=Gv(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),$=k,B=fE([o,r]),W=Vn(Vn({},A),l);return m.createElement(m.Fragment,null,x&&m.createElement($,{sideCar:Xv,removeScrollBar:y,shards:b,noRelative:w,noIsolation:N,inert:v,setCallbacks:c,allowPinchZoom:!!C,lockRef:o,gapMode:P}),f?m.cloneElement(m.Children.only(h),Vn(Vn({},W),{ref:B})):m.createElement(j,Vn({},W,{className:g,ref:B}),h))});gc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gc.classNames={fullWidth:Ul,zeroRight:Fl};var yE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vE(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=yE();return r&&t.setAttribute("nonce",r),t}function xE(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function wE(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var bE=function(){var t=0,r=null;return{add:function(o){t==0&&(r=vE())&&(xE(r,o),wE(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},SE=function(){var t=bE();return function(r,o){m.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},Jv=function(){var t=SE(),r=function(o){var a=o.styles,l=o.dynamic;return t(a,l),null};return r},kE={left:0,top:0,right:0,gap:0},Pd=function(t){return parseInt(t||"",10)||0},CE=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],a=r[t==="padding"?"paddingTop":"marginTop"],l=r[t==="padding"?"paddingRight":"marginRight"];return[Pd(o),Pd(a),Pd(l)]},EE=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return kE;var r=CE(t),o=document.documentElement.clientWidth,a=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,a-o+r[2]-r[0])}},NE=Jv(),Es="data-scroll-locked",PE=function(t,r,o,a){var l=t.left,c=t.top,f=t.right,h=t.gap;return o===void 0&&(o="margin"),`
297
+ .`.concat(lE,` {
298
298
  overflow: hidden `).concat(a,`;
299
299
  padding-right: `).concat(h,"px ").concat(a,`;
300
300
  }
301
- body[`).concat(ks,`] {
301
+ body[`).concat(Es,`] {
302
302
  overflow: hidden `).concat(a,`;
303
303
  overscroll-behavior: contain;
304
304
  `).concat([r&&"position: relative ".concat(a,";"),o==="margin"&&`
@@ -311,32 +311,32 @@ Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}
311
311
  `),o==="padding"&&"padding-right: ".concat(h,"px ").concat(a,";")].filter(Boolean).join(""),`
312
312
  }
313
313
 
314
- .`).concat(Ol,` {
314
+ .`).concat(Fl,` {
315
315
  right: `).concat(h,"px ").concat(a,`;
316
316
  }
317
317
 
318
- .`).concat(_l,` {
318
+ .`).concat(Ul,` {
319
319
  margin-right: `).concat(h,"px ").concat(a,`;
320
320
  }
321
321
 
322
- .`).concat(Ol," .").concat(Ol,` {
322
+ .`).concat(Fl," .").concat(Fl,` {
323
323
  right: 0 `).concat(a,`;
324
324
  }
325
325
 
326
- .`).concat(_l," .").concat(_l,` {
326
+ .`).concat(Ul," .").concat(Ul,` {
327
327
  margin-right: 0 `).concat(a,`;
328
328
  }
329
329
 
330
- body[`).concat(ks,`] {
331
- `).concat(iE,": ").concat(h,`px;
330
+ body[`).concat(Es,`] {
331
+ `).concat(cE,": ").concat(h,`px;
332
332
  }
333
- `)},Lg=function(){var t=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(t)?t:0},NE=function(){m.useEffect(function(){return document.body.setAttribute(ks,(Lg()+1).toString()),function(){var t=Lg()-1;t<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,t.toString())}},[])},PE=function(t){var r=t.noRelative,o=t.noImportant,a=t.gapMode,l=a===void 0?"margin":a;NE();var c=m.useMemo(function(){return kE(l)},[l]);return m.createElement(CE,{styles:EE(c,!r,l,o?"":"!important")})},tf=!1;if(typeof window<"u")try{var Pl=Object.defineProperty({},"passive",{get:function(){return tf=!0,!0}});window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{tf=!1}var vs=tf?{passive:!1}:!1,RE=function(t){return t.tagName==="TEXTAREA"},Xv=function(t,r){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!RE(t)&&o[r]==="visible")},jE=function(t){return Xv(t,"overflowY")},TE=function(t){return Xv(t,"overflowX")},zg=function(t,r){var o=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=Jv(t,a);if(l){var c=Zv(t,a),f=c[1],h=c[2];if(f>h)return!0}a=a.parentNode}while(a&&a!==o.body);return!1},ME=function(t){var r=t.scrollTop,o=t.scrollHeight,a=t.clientHeight;return[r,o,a]},IE=function(t){var r=t.scrollLeft,o=t.scrollWidth,a=t.clientWidth;return[r,o,a]},Jv=function(t,r){return t==="v"?jE(r):TE(r)},Zv=function(t,r){return t==="v"?ME(r):IE(r)},AE=function(t,r){return t==="h"&&r==="rtl"?-1:1},LE=function(t,r,o,a,l){var c=AE(t,window.getComputedStyle(r).direction),f=c*a,h=o.target,g=r.contains(h),y=!1,x=f>0,b=0,k=0;do{if(!h)break;var w=Zv(t,h),N=w[0],v=w[1],C=w[2],R=v-C-c*N;(N||R)&&Jv(t,h)&&(b+=R,k+=N);var j=h.parentNode;h=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(x&&Math.abs(b)<1||!x&&Math.abs(k)<1)&&(y=!0),y},Rl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Dg=function(t){return[t.deltaX,t.deltaY]},Og=function(t){return t&&"current"in t?t.current:t},zE=function(t,r){return t[0]===r[0]&&t[1]===r[1]},DE=function(t){return`
333
+ `)},Dg=function(){var t=parseInt(document.body.getAttribute(Es)||"0",10);return isFinite(t)?t:0},RE=function(){m.useEffect(function(){return document.body.setAttribute(Es,(Dg()+1).toString()),function(){var t=Dg()-1;t<=0?document.body.removeAttribute(Es):document.body.setAttribute(Es,t.toString())}},[])},jE=function(t){var r=t.noRelative,o=t.noImportant,a=t.gapMode,l=a===void 0?"margin":a;RE();var c=m.useMemo(function(){return EE(l)},[l]);return m.createElement(NE,{styles:PE(c,!r,l,o?"":"!important")})},rf=!1;if(typeof window<"u")try{var jl=Object.defineProperty({},"passive",{get:function(){return rf=!0,!0}});window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{rf=!1}var ws=rf?{passive:!1}:!1,TE=function(t){return t.tagName==="TEXTAREA"},Zv=function(t,r){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!TE(t)&&o[r]==="visible")},ME=function(t){return Zv(t,"overflowY")},IE=function(t){return Zv(t,"overflowX")},Og=function(t,r){var o=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=e0(t,a);if(l){var c=t0(t,a),f=c[1],h=c[2];if(f>h)return!0}a=a.parentNode}while(a&&a!==o.body);return!1},AE=function(t){var r=t.scrollTop,o=t.scrollHeight,a=t.clientHeight;return[r,o,a]},LE=function(t){var r=t.scrollLeft,o=t.scrollWidth,a=t.clientWidth;return[r,o,a]},e0=function(t,r){return t==="v"?ME(r):IE(r)},t0=function(t,r){return t==="v"?AE(r):LE(r)},zE=function(t,r){return t==="h"&&r==="rtl"?-1:1},DE=function(t,r,o,a,l){var c=zE(t,window.getComputedStyle(r).direction),f=c*a,h=o.target,g=r.contains(h),y=!1,x=f>0,b=0,k=0;do{if(!h)break;var w=t0(t,h),N=w[0],v=w[1],C=w[2],R=v-C-c*N;(N||R)&&e0(t,h)&&(b+=R,k+=N);var j=h.parentNode;h=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!g&&h!==document.body||g&&(r.contains(h)||r===h));return(x&&Math.abs(b)<1||!x&&Math.abs(k)<1)&&(y=!0),y},Tl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},_g=function(t){return[t.deltaX,t.deltaY]},Fg=function(t){return t&&"current"in t?t.current:t},OE=function(t,r){return t[0]===r[0]&&t[1]===r[1]},_E=function(t){return`
334
334
  .block-interactivity-`.concat(t,` {pointer-events: none;}
335
335
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
336
- `)},OE=0,xs=[];function _E(t){var r=m.useRef([]),o=m.useRef([0,0]),a=m.useRef(),l=m.useState(OE++)[0],c=m.useState(Yv)[0],f=m.useRef(t);m.useEffect(function(){f.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(l));var v=sE([t.lockRef.current],(t.shards||[]).map(Og),!0).filter(Boolean);return v.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),v.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(v,C){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!f.current.allowPinchZoom;var R=Rl(v),j=o.current,P="deltaX"in v?v.deltaX:j[0]-R[0],A="deltaY"in v?v.deltaY:j[1]-R[1],$,B=v.target,H=Math.abs(P)>Math.abs(A)?"h":"v";if("touches"in v&&H==="h"&&B.type==="range")return!1;var X=window.getSelection(),W=X&&X.anchorNode,Y=W?W===B||W.contains(B):!1;if(Y)return!1;var _=zg(H,B);if(!_)return!0;if(_?$=H:($=H==="v"?"h":"v",_=zg(H,B)),!_)return!1;if(!a.current&&"changedTouches"in v&&(P||A)&&(a.current=$),!$)return!0;var O=a.current||$;return LE(O,C,v,O==="h"?P:A)},[]),g=m.useCallback(function(v){var C=v;if(!(!xs.length||xs[xs.length-1]!==c)){var R="deltaY"in C?Dg(C):Rl(C),j=r.current.filter(function($){return $.name===C.type&&($.target===C.target||C.target===$.shadowParent)&&zE($.delta,R)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var P=(f.current.shards||[]).map(Og).filter(Boolean).filter(function($){return $.contains(C.target)}),A=P.length>0?h(C,P[0]):!f.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),y=m.useCallback(function(v,C,R,j){var P={name:v,delta:C,target:R,should:j,shadowParent:FE(R)};r.current.push(P),setTimeout(function(){r.current=r.current.filter(function(A){return A!==P})},1)},[]),x=m.useCallback(function(v){o.current=Rl(v),a.current=void 0},[]),b=m.useCallback(function(v){y(v.type,Dg(v),v.target,h(v,t.lockRef.current))},[]),k=m.useCallback(function(v){y(v.type,Rl(v),v.target,h(v,t.lockRef.current))},[]);m.useEffect(function(){return xs.push(c),t.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:k}),document.addEventListener("wheel",g,vs),document.addEventListener("touchmove",g,vs),document.addEventListener("touchstart",x,vs),function(){xs=xs.filter(function(v){return v!==c}),document.removeEventListener("wheel",g,vs),document.removeEventListener("touchmove",g,vs),document.removeEventListener("touchstart",x,vs)}},[]);var w=t.removeScrollBar,N=t.inert;return m.createElement(m.Fragment,null,N?m.createElement(c,{styles:DE(l)}):null,w?m.createElement(PE,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function FE(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const UE=pE(Gv,_E);var Wf=m.forwardRef(function(t,r){return m.createElement(pc,Vn({},t,{ref:r,sideCar:UE}))});Wf.classNames=pc.classNames;var $E=[" ","Enter","ArrowUp","ArrowDown"],BE=[" ","Enter"],Uo="Select",[mc,gc,WE]=iC(Uo),[Qs]=ni(Uo,[WE,fc]),yc=fc(),[HE,io]=Qs(Uo),[VE,KE]=Qs(Uo),e0=t=>{const{__scopeSelect:r,children:o,open:a,defaultOpen:l,onOpenChange:c,value:f,defaultValue:h,onValueChange:g,dir:y,name:x,autoComplete:b,disabled:k,required:w,form:N}=t,v=yc(r),[C,R]=m.useState(null),[j,P]=m.useState(null),[A,$]=m.useState(!1),B=cC(y),[H,X]=ec({prop:a,defaultProp:l??!1,onChange:c,caller:Uo}),[W,Y]=ec({prop:f,defaultProp:h,onChange:g,caller:Uo}),_=m.useRef(null),O=C?N||!!C.closest("form"):!0,[Z,ee]=m.useState(new Set),G=Array.from(Z).map(ie=>ie.props.value).join(";");return u.jsx(Fv,{...v,children:u.jsxs(HE,{required:w,scope:r,trigger:C,onTriggerChange:R,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:A,onValueNodeHasChildrenChange:$,contentId:Lo(),value:W,onValueChange:Y,open:H,onOpenChange:X,dir:B,triggerPointerDownPosRef:_,disabled:k,children:[u.jsx(mc.Provider,{scope:r,children:u.jsx(VE,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(ie=>{ee(ce=>new Set(ce).add(ie))},[]),onNativeOptionRemove:m.useCallback(ie=>{ee(ce=>{const K=new Set(ce);return K.delete(ie),K})},[]),children:o})}),O?u.jsxs(C0,{"aria-hidden":!0,required:w,tabIndex:-1,name:x,autoComplete:b,value:W,onChange:ie=>Y(ie.target.value),disabled:k,form:N,children:[W===void 0?u.jsx("option",{value:""}):null,Array.from(Z)]},G):null]})})};e0.displayName=Uo;var t0="SelectTrigger",n0=m.forwardRef((t,r)=>{const{__scopeSelect:o,disabled:a=!1,...l}=t,c=yc(o),f=io(t0,o),h=f.disabled||a,g=Ze(r,f.onTriggerChange),y=gc(o),x=m.useRef("touch"),[b,k,w]=N0(v=>{const C=y().filter(P=>!P.disabled),R=C.find(P=>P.value===f.value),j=P0(C,v,R);j!==void 0&&f.onValueChange(j.value)}),N=v=>{h||(f.onOpenChange(!0),w()),v&&(f.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return u.jsx(Uv,{asChild:!0,...c,children:u.jsx(Be.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":E0(f.value)?"":void 0,...l,ref:g,onClick:Oe(l.onClick,v=>{v.currentTarget.focus(),x.current!=="mouse"&&N(v)}),onPointerDown:Oe(l.onPointerDown,v=>{x.current=v.pointerType;const C=v.target;C.hasPointerCapture(v.pointerId)&&C.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(N(v),v.preventDefault())}),onKeyDown:Oe(l.onKeyDown,v=>{const C=b.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&k(v.key),!(C&&v.key===" ")&&$E.includes(v.key)&&(N(),v.preventDefault())})})})});n0.displayName=t0;var r0="SelectValue",o0=m.forwardRef((t,r)=>{const{__scopeSelect:o,className:a,style:l,children:c,placeholder:f="",...h}=t,g=io(r0,o),{onValueNodeHasChildrenChange:y}=g,x=c!==void 0,b=Ze(r,g.onValueNodeChange);return Et(()=>{y(x)},[y,x]),u.jsx(Be.span,{...h,ref:b,style:{pointerEvents:"none"},children:E0(g.value)?u.jsx(u.Fragment,{children:f}):c})});o0.displayName=r0;var QE="SelectIcon",s0=m.forwardRef((t,r)=>{const{__scopeSelect:o,children:a,...l}=t;return u.jsx(Be.span,{"aria-hidden":!0,...l,ref:r,children:a||"▼"})});s0.displayName=QE;var qE="SelectPortal",a0=t=>u.jsx(hc,{asChild:!0,...t});a0.displayName=qE;var $o="SelectContent",i0=m.forwardRef((t,r)=>{const o=io($o,t.__scopeSelect),[a,l]=m.useState();if(Et(()=>{l(new DocumentFragment)},[]),!o.open){const c=a;return c?ti.createPortal(u.jsx(l0,{scope:t.__scopeSelect,children:u.jsx(mc.Slot,{scope:t.__scopeSelect,children:u.jsx("div",{children:t.children})})}),c):null}return u.jsx(c0,{...t,ref:r})});i0.displayName=$o;var bn=10,[l0,lo]=Qs($o),GE="SelectContentImpl",YE=Ha("SelectContent.RemoveScroll"),c0=m.forwardRef((t,r)=>{const{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,side:h,sideOffset:g,align:y,alignOffset:x,arrowPadding:b,collisionBoundary:k,collisionPadding:w,sticky:N,hideWhenDetached:v,avoidCollisions:C,...R}=t,j=io($o,o),[P,A]=m.useState(null),[$,B]=m.useState(null),H=Ze(r,ne=>A(ne)),[X,W]=m.useState(null),[Y,_]=m.useState(null),O=gc(o),[Z,ee]=m.useState(!1),G=m.useRef(!1);m.useEffect(()=>{if(P)return Kv(P)},[P]),gv();const ie=m.useCallback(ne=>{const[he,...be]=O().map(Ie=>Ie.ref.current),[Ce]=be.slice(-1),Te=document.activeElement;for(const Ie of ne)if(Ie===Te||(Ie==null||Ie.scrollIntoView({block:"nearest"}),Ie===he&&$&&($.scrollTop=0),Ie===Ce&&$&&($.scrollTop=$.scrollHeight),Ie==null||Ie.focus(),document.activeElement!==Te))return},[O,$]),ce=m.useCallback(()=>ie([X,P]),[ie,X,P]);m.useEffect(()=>{Z&&ce()},[Z,ce]);const{onOpenChange:K,triggerPointerDownPosRef:q}=j;m.useEffect(()=>{if(P){let ne={x:0,y:0};const he=Ce=>{var Te,Ie;ne={x:Math.abs(Math.round(Ce.pageX)-(((Te=q.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Ie=q.current)==null?void 0:Ie.y)??0))}},be=Ce=>{ne.x<=10&&ne.y<=10?Ce.preventDefault():P.contains(Ce.target)||K(!1),document.removeEventListener("pointermove",he),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",be,{capture:!0})}}},[P,K,q]),m.useEffect(()=>{const ne=()=>K(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[K]);const[Q,M]=N0(ne=>{const he=O().filter(Te=>!Te.disabled),be=he.find(Te=>Te.ref.current===document.activeElement),Ce=P0(he,ne,be);Ce&&setTimeout(()=>Ce.ref.current.focus())}),F=m.useCallback((ne,he,be)=>{const Ce=!G.current&&!be;(j.value!==void 0&&j.value===he||Ce)&&(W(ne),Ce&&(G.current=!0))},[j.value]),le=m.useCallback(()=>P==null?void 0:P.focus(),[P]),J=m.useCallback((ne,he,be)=>{const Ce=!G.current&&!be;(j.value!==void 0&&j.value===he||Ce)&&_(ne)},[j.value]),ue=a==="popper"?nf:u0,xe=ue===nf?{side:h,sideOffset:g,align:y,alignOffset:x,arrowPadding:b,collisionBoundary:k,collisionPadding:w,sticky:N,hideWhenDetached:v,avoidCollisions:C}:{};return u.jsx(l0,{scope:o,content:P,viewport:$,onViewportChange:B,itemRefCallback:F,selectedItem:X,onItemLeave:le,itemTextRefCallback:J,focusSelectedItem:ce,selectedItemText:Y,position:a,isPositioned:Z,searchRef:Q,children:u.jsx(Wf,{as:YE,allowPinchZoom:!0,children:u.jsx(Lf,{asChild:!0,trapped:j.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:Oe(l,ne=>{var he;(he=j.trigger)==null||he.focus({preventScroll:!0}),ne.preventDefault()}),children:u.jsx(ic,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:u.jsx(ue,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ne=>ne.preventDefault(),...R,...xe,onPlaced:()=>ee(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Oe(R.onKeyDown,ne=>{const he=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!he&&ne.key.length===1&&M(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let Ce=O().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ie=Ce.indexOf(Te);Ce=Ce.slice(Ie+1)}setTimeout(()=>ie(Ce)),ne.preventDefault()}})})})})})})});c0.displayName=GE;var XE="SelectItemAlignedPosition",u0=m.forwardRef((t,r)=>{const{__scopeSelect:o,onPlaced:a,...l}=t,c=io($o,o),f=lo($o,o),[h,g]=m.useState(null),[y,x]=m.useState(null),b=Ze(r,H=>x(H)),k=gc(o),w=m.useRef(!1),N=m.useRef(!0),{viewport:v,selectedItem:C,selectedItemText:R,focusSelectedItem:j}=f,P=m.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&y&&v&&C&&R){const H=c.trigger.getBoundingClientRect(),X=y.getBoundingClientRect(),W=c.valueNode.getBoundingClientRect(),Y=R.getBoundingClientRect();if(c.dir!=="rtl"){const Te=Y.left-X.left,Ie=W.left-Te,nt=H.left-Ie,vt=H.width+nt,Rn=Math.max(vt,X.width),ln=window.innerWidth-bn,cn=hg(Ie,[bn,Math.max(bn,ln-Rn)]);h.style.minWidth=vt+"px",h.style.left=cn+"px"}else{const Te=X.right-Y.right,Ie=window.innerWidth-W.right-Te,nt=window.innerWidth-H.right-Ie,vt=H.width+nt,Rn=Math.max(vt,X.width),ln=window.innerWidth-bn,cn=hg(Ie,[bn,Math.max(bn,ln-Rn)]);h.style.minWidth=vt+"px",h.style.right=cn+"px"}const _=k(),O=window.innerHeight-bn*2,Z=v.scrollHeight,ee=window.getComputedStyle(y),G=parseInt(ee.borderTopWidth,10),ie=parseInt(ee.paddingTop,10),ce=parseInt(ee.borderBottomWidth,10),K=parseInt(ee.paddingBottom,10),q=G+ie+Z+K+ce,Q=Math.min(C.offsetHeight*5,q),M=window.getComputedStyle(v),F=parseInt(M.paddingTop,10),le=parseInt(M.paddingBottom,10),J=H.top+H.height/2-bn,ue=O-J,xe=C.offsetHeight/2,ne=C.offsetTop+xe,he=G+ie+ne,be=q-he;if(he<=J){const Te=_.length>0&&C===_[_.length-1].ref.current;h.style.bottom="0px";const Ie=y.clientHeight-v.offsetTop-v.offsetHeight,nt=Math.max(ue,xe+(Te?le:0)+Ie+ce),vt=he+nt;h.style.height=vt+"px"}else{const Te=_.length>0&&C===_[0].ref.current;h.style.top="0px";const nt=Math.max(J,G+v.offsetTop+(Te?F:0)+xe)+be;h.style.height=nt+"px",v.scrollTop=he-J+v.offsetTop}h.style.margin=`${bn}px 0`,h.style.minHeight=Q+"px",h.style.maxHeight=O+"px",a==null||a(),requestAnimationFrame(()=>w.current=!0)}},[k,c.trigger,c.valueNode,h,y,v,C,R,c.dir,a]);Et(()=>P(),[P]);const[A,$]=m.useState();Et(()=>{y&&$(window.getComputedStyle(y).zIndex)},[y]);const B=m.useCallback(H=>{H&&N.current===!0&&(P(),j==null||j(),N.current=!1)},[P,j]);return u.jsx(ZE,{scope:o,contentWrapper:h,shouldExpandOnScrollRef:w,onScrollButtonChange:B,children:u.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:u.jsx(Be.div,{...l,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});u0.displayName=XE;var JE="SelectPopperPosition",nf=m.forwardRef((t,r)=>{const{__scopeSelect:o,align:a="start",collisionPadding:l=bn,...c}=t,f=yc(o);return u.jsx($v,{...f,...c,ref:r,align:a,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});nf.displayName=JE;var[ZE,Hf]=Qs($o,{}),rf="SelectViewport",d0=m.forwardRef((t,r)=>{const{__scopeSelect:o,nonce:a,...l}=t,c=lo(rf,o),f=Hf(rf,o),h=Ze(r,c.onViewportChange),g=m.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),u.jsx(mc.Slot,{scope:o,children:u.jsx(Be.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:Oe(l.onScroll,y=>{const x=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:k}=f;if(k!=null&&k.current&&b){const w=Math.abs(g.current-x.scrollTop);if(w>0){const N=window.innerHeight-bn*2,v=parseFloat(b.style.minHeight),C=parseFloat(b.style.height),R=Math.max(v,C);if(R<N){const j=R+w,P=Math.min(N,j),A=j-P;b.style.height=P+"px",b.style.bottom==="0px"&&(x.scrollTop=A>0?A:0,b.style.justifyContent="flex-end")}}}g.current=x.scrollTop})})})]})});d0.displayName=rf;var f0="SelectGroup",[eN,tN]=Qs(f0),nN=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=Lo();return u.jsx(eN,{scope:o,id:l,children:u.jsx(Be.div,{role:"group","aria-labelledby":l,...a,ref:r})})});nN.displayName=f0;var h0="SelectLabel",p0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=tN(h0,o);return u.jsx(Be.div,{id:l.id,...a,ref:r})});p0.displayName=h0;var tc="SelectItem",[rN,m0]=Qs(tc),g0=m.forwardRef((t,r)=>{const{__scopeSelect:o,value:a,disabled:l=!1,textValue:c,...f}=t,h=io(tc,o),g=lo(tc,o),y=h.value===a,[x,b]=m.useState(c??""),[k,w]=m.useState(!1),N=Ze(r,j=>{var P;return(P=g.itemRefCallback)==null?void 0:P.call(g,j,a,l)}),v=Lo(),C=m.useRef("touch"),R=()=>{l||(h.onValueChange(a),h.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(rN,{scope:o,value:a,disabled:l,textId:v,isSelected:y,onItemTextChange:m.useCallback(j=>{b(P=>P||((j==null?void 0:j.textContent)??"").trim())},[]),children:u.jsx(mc.ItemSlot,{scope:o,value:a,disabled:l,textValue:x,children:u.jsx(Be.div,{role:"option","aria-labelledby":v,"data-highlighted":k?"":void 0,"aria-selected":y&&k,"data-state":y?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...f,ref:N,onFocus:Oe(f.onFocus,()=>w(!0)),onBlur:Oe(f.onBlur,()=>w(!1)),onClick:Oe(f.onClick,()=>{C.current!=="mouse"&&R()}),onPointerUp:Oe(f.onPointerUp,()=>{C.current==="mouse"&&R()}),onPointerDown:Oe(f.onPointerDown,j=>{C.current=j.pointerType}),onPointerMove:Oe(f.onPointerMove,j=>{var P;C.current=j.pointerType,l?(P=g.onItemLeave)==null||P.call(g):C.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(f.onPointerLeave,j=>{var P;j.currentTarget===document.activeElement&&((P=g.onItemLeave)==null||P.call(g))}),onKeyDown:Oe(f.onKeyDown,j=>{var A;((A=g.searchRef)==null?void 0:A.current)!==""&&j.key===" "||(BE.includes(j.key)&&R(),j.key===" "&&j.preventDefault())})})})})});g0.displayName=tc;var _a="SelectItemText",y0=m.forwardRef((t,r)=>{const{__scopeSelect:o,className:a,style:l,...c}=t,f=io(_a,o),h=lo(_a,o),g=m0(_a,o),y=KE(_a,o),[x,b]=m.useState(null),k=Ze(r,R=>b(R),g.onItemTextChange,R=>{var j;return(j=h.itemTextRefCallback)==null?void 0:j.call(h,R,g.value,g.disabled)}),w=x==null?void 0:x.textContent,N=m.useMemo(()=>u.jsx("option",{value:g.value,disabled:g.disabled,children:w},g.value),[g.disabled,g.value,w]),{onNativeOptionAdd:v,onNativeOptionRemove:C}=y;return Et(()=>(v(N),()=>C(N)),[v,C,N]),u.jsxs(u.Fragment,{children:[u.jsx(Be.span,{id:g.textId,...c,ref:k}),g.isSelected&&f.valueNode&&!f.valueNodeHasChildren?ti.createPortal(c.children,f.valueNode):null]})});y0.displayName=_a;var v0="SelectItemIndicator",x0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t;return m0(v0,o).isSelected?u.jsx(Be.span,{"aria-hidden":!0,...a,ref:r}):null});x0.displayName=v0;var of="SelectScrollUpButton",w0=m.forwardRef((t,r)=>{const o=lo(of,t.__scopeSelect),a=Hf(of,t.__scopeSelect),[l,c]=m.useState(!1),f=Ze(r,a.onScrollButtonChange);return Et(()=>{if(o.viewport&&o.isPositioned){let h=function(){const y=g.scrollTop>0;c(y)};const g=o.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),l?u.jsx(S0,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=o;h&&g&&(h.scrollTop=h.scrollTop-g.offsetHeight)}}):null});w0.displayName=of;var sf="SelectScrollDownButton",b0=m.forwardRef((t,r)=>{const o=lo(sf,t.__scopeSelect),a=Hf(sf,t.__scopeSelect),[l,c]=m.useState(!1),f=Ze(r,a.onScrollButtonChange);return Et(()=>{if(o.viewport&&o.isPositioned){let h=function(){const y=g.scrollHeight-g.clientHeight,x=Math.ceil(g.scrollTop)<y;c(x)};const g=o.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),l?u.jsx(S0,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=o;h&&g&&(h.scrollTop=h.scrollTop+g.offsetHeight)}}):null});b0.displayName=sf;var S0=m.forwardRef((t,r)=>{const{__scopeSelect:o,onAutoScroll:a,...l}=t,c=lo("SelectScrollButton",o),f=m.useRef(null),h=gc(o),g=m.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return m.useEffect(()=>()=>g(),[g]),Et(()=>{var x;const y=h().find(b=>b.ref.current===document.activeElement);(x=y==null?void 0:y.ref.current)==null||x.scrollIntoView({block:"nearest"})},[h]),u.jsx(Be.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:Oe(l.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(a,50))}),onPointerMove:Oe(l.onPointerMove,()=>{var y;(y=c.onItemLeave)==null||y.call(c),f.current===null&&(f.current=window.setInterval(a,50))}),onPointerLeave:Oe(l.onPointerLeave,()=>{g()})})}),oN="SelectSeparator",k0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t;return u.jsx(Be.div,{"aria-hidden":!0,...a,ref:r})});k0.displayName=oN;var af="SelectArrow",sN=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=yc(o),c=io(af,o),f=lo(af,o);return c.open&&f.position==="popper"?u.jsx(Bv,{...l,...a,ref:r}):null});sN.displayName=af;var aN="SelectBubbleInput",C0=m.forwardRef(({__scopeSelect:t,value:r,...o},a)=>{const l=m.useRef(null),c=Ze(a,l),f=Z2(r);return m.useEffect(()=>{const h=l.current;if(!h)return;const g=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(g,"value").set;if(f!==r&&x){const b=new Event("change",{bubbles:!0});x.call(h,r),h.dispatchEvent(b)}},[f,r]),u.jsx(Be.select,{...o,style:{...Wv,...o.style},ref:c,defaultValue:r})});C0.displayName=aN;function E0(t){return t===""||t===void 0}function N0(t){const r=_o(t),o=m.useRef(""),a=m.useRef(0),l=m.useCallback(f=>{const h=o.current+f;r(h),(function g(y){o.current=y,window.clearTimeout(a.current),y!==""&&(a.current=window.setTimeout(()=>g(""),1e3))})(h)},[r]),c=m.useCallback(()=>{o.current="",window.clearTimeout(a.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(a.current),[]),[o,l,c]}function P0(t,r,o){const l=r.length>1&&Array.from(r).every(y=>y===r[0])?r[0]:r,c=o?t.indexOf(o):-1;let f=iN(t,Math.max(c,0));l.length===1&&(f=f.filter(y=>y!==o));const g=f.find(y=>y.textValue.toLowerCase().startsWith(l.toLowerCase()));return g!==o?g:void 0}function iN(t,r){return t.map((o,a)=>t[(r+a)%t.length])}var lN=e0,R0=n0,cN=o0,uN=s0,dN=a0,j0=i0,fN=d0,T0=p0,M0=g0,hN=y0,pN=x0,I0=w0,A0=b0,L0=k0;const so=lN,Bo=cN,vr=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(R0,{ref:a,className:ge("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white",t),...o,children:[r,u.jsx(uN,{asChild:!0,children:u.jsx(ov,{className:"h-4 w-4 opacity-50"})})]}));vr.displayName=R0.displayName;const z0=m.forwardRef(({className:t,...r},o)=>u.jsx(I0,{ref:o,className:ge("flex cursor-default items-center justify-center py-1",t),...r,children:u.jsx(Nk,{className:"h-4 w-4"})}));z0.displayName=I0.displayName;const D0=m.forwardRef(({className:t,...r},o)=>u.jsx(A0,{ref:o,className:ge("flex cursor-default items-center justify-center py-1",t),...r,children:u.jsx(ov,{className:"h-4 w-4"})}));D0.displayName=A0.displayName;const xr=m.forwardRef(({className:t,children:r,position:o="popper",...a},l)=>u.jsx(dN,{children:u.jsxs(j0,{ref:l,className:ge("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...a,children:[u.jsx(z0,{}),u.jsx(fN,{className:ge("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),u.jsx(D0,{})]})}));xr.displayName=j0.displayName;const mN=m.forwardRef(({className:t,...r},o)=>u.jsx(T0,{ref:o,className:ge("px-2 py-1.5 text-sm font-semibold",t),...r}));mN.displayName=T0.displayName;const Ct=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(M0,{ref:a,className:ge("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100",t),...o,children:[u.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(pN,{children:u.jsx(Ek,{className:"h-4 w-4"})})}),u.jsx(hN,{children:r})]}));Ct.displayName=M0.displayName;const gN=m.forwardRef(({className:t,...r},o)=>u.jsx(L0,{ref:o,className:ge("-mx-1 my-1 h-px bg-muted",t),...r}));gN.displayName=L0.displayName;function yN(){var f;const t=ac(),{language:r,setLanguage:o}=Zk(),a=((f=lg.find(h=>h.value===r))==null?void 0:f.label)??r,l=h=>{r!==h&&(o(h),window.location.reload())},c=[{target:"/model",label:E("model"),icon:Rk},{target:"/providers",label:E("providers"),icon:cv},{target:"/channels",label:E("channels"),icon:If},{target:"/runtime",label:E("runtime"),icon:Ik},{target:"/sessions",label:E("sessions"),icon:Lk},{target:"/cron",label:E("cron"),icon:tv},{target:"/marketplace",label:E("marketplace"),icon:Vk}];return u.jsxs("aside",{className:"w-[240px] bg-[#f0f2f7] flex flex-col h-full py-6 px-4",children:[u.jsx("div",{className:"px-2 mb-8",children:u.jsxs("div",{className:"flex items-center gap-2.5 cursor-pointer",children:[u.jsx("div",{className:"h-7 w-7 rounded-lg overflow-hidden flex items-center justify-center",children:u.jsx("img",{src:"/logo.svg",alt:"NextClaw",className:"h-full w-full object-contain"})}),u.jsx("span",{className:"text-[15px] font-semibold text-gray-800 tracking-[-0.01em]",children:"NextClaw"})]})}),u.jsx("nav",{className:"flex-1",children:u.jsx("ul",{className:"space-y-1",children:c.map(h=>{const g=h.icon;return u.jsx("li",{children:u.jsx(My,{to:h.target,className:({isActive:y})=>ge("group w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] font-medium transition-all duration-base",y?"bg-primary/10 text-primary font-semibold":"text-gray-600 hover:bg-[#e4e7ef] hover:text-gray-800"),children:({isActive:y})=>u.jsxs(u.Fragment,{children:[u.jsx(g,{className:ge("h-[17px] w-[17px] transition-colors",y?"text-primary":"text-gray-400")}),u.jsx("span",{className:"flex-1 text-left",children:h.label})]})})},h.target)})})}),u.jsxs("div",{className:"pt-3 border-t border-[#dde0ea] mt-3",children:[u.jsx("div",{className:"mb-2",children:u.jsxs(so,{value:r,onValueChange:h=>l(h),children:[u.jsxs(vr,{className:"w-full h-auto rounded-xl border-0 bg-transparent shadow-none px-3 py-2.5 text-[14px] font-medium text-gray-600 hover:bg-[#e4e7ef] focus:ring-0",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u.jsx(zk,{className:"h-[17px] w-[17px] text-gray-400"}),u.jsx("span",{className:"text-left",children:E("language")})]}),u.jsx("span",{className:"ml-auto text-xs text-gray-500",children:a})]}),u.jsx(xr,{children:lg.map(h=>u.jsx(Ct,{value:h.value,className:"text-xs",children:h.label},h.value))})]})}),u.jsxs("button",{onClick:()=>t.open(),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] font-medium transition-all duration-base text-gray-600 hover:bg-[#e4e7ef] hover:text-gray-800",children:[u.jsx(rv,{className:"h-[17px] w-[17px] text-gray-400"}),u.jsx("span",{className:"flex-1 text-left",children:E("docBrowserHelp")})]})]})]})}function vN({children:t}){const{isOpen:r,mode:o}=ac();return Xk(),u.jsxs("div",{className:"h-screen flex bg-background font-sans text-foreground",children:[u.jsx(yN,{}),u.jsxs("div",{className:"flex-1 flex min-w-0 overflow-hidden relative",children:[u.jsx("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:u.jsx("main",{className:"flex-1 overflow-auto custom-scrollbar p-8",children:u.jsx("div",{className:"max-w-6xl mx-auto animate-fade-in h-full",children:t})})}),r&&o==="docked"&&u.jsx(fg,{})]}),r&&o==="floating"&&u.jsx(fg,{})]})}function xN({children:t}){return u.jsx(Yk,{children:u.jsx(vN,{children:t})})}const _g=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Fg=Ky,wN=(t,r)=>o=>{var a;if((r==null?void 0:r.variants)==null)return Fg(t,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:l,defaultVariants:c}=r,f=Object.keys(l).map(y=>{const x=o==null?void 0:o[y],b=c==null?void 0:c[y];if(x===null)return null;const k=_g(x)||_g(b);return l[y][k]}),h=o&&Object.entries(o).reduce((y,x)=>{let[b,k]=x;return k===void 0||(y[b]=k),y},{}),g=r==null||(a=r.compoundVariants)===null||a===void 0?void 0:a.reduce((y,x)=>{let{class:b,className:k,...w}=x;return Object.entries(w).every(N=>{let[v,C]=N;return Array.isArray(C)?C.includes({...c,...h}[v]):{...c,...h}[v]===C})?[...y,b,k]:y},[]);return Fg(t,f,g,o==null?void 0:o.class,o==null?void 0:o.className)},bN=wN("inline-flex items-center justify-center whitespace-nowrap rounded-xl 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-gray-200 bg-white hover:bg-gray-50 hover:text-gray-800 text-gray-600",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200/80",ghost:"hover:bg-gray-100/80 hover:text-gray-800",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-gray-100 text-gray-600 hover:bg-gray-200/80","primary-outline":"border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-lg px-3 text-xs",lg:"h-11 rounded-xl px-5 text-[14px]",xl:"h-12 rounded-2xl px-6 text-[15px]",icon:"h-9 w-9 rounded-xl"}},defaultVariants:{variant:"default",size:"default"}}),Ve=m.forwardRef(({className:t,variant:r,size:o,...a},l)=>u.jsx("button",{className:ge(bN({variant:r,size:o,className:t})),ref:l,...a}));Ve.displayName="Button";const zo=m.forwardRef(({className:t,hover:r=!0,...o},a)=>u.jsx("div",{ref:a,className:ge("rounded-2xl border border-gray-200/50 bg-white text-card-foreground shadow-sm transition-all duration-base",r&&"hover:shadow-md hover:border-gray-200",t),...o}));zo.displayName="Card";const Fl=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:ge("flex flex-col space-y-1.5 p-6",t),...r}));Fl.displayName="CardHeader";const Ul=m.forwardRef(({className:t,...r},o)=>u.jsx("h3",{ref:o,className:ge("text-[15px] font-semibold leading-tight tracking-tight text-gray-900",t),...r}));Ul.displayName="CardTitle";const $l=m.forwardRef(({className:t,...r},o)=>u.jsx("p",{ref:o,className:ge("text-[13px] text-gray-400 leading-relaxed",t),...r}));$l.displayName="CardDescription";const Ua=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:ge("p-6 pt-0",t),...r}));Ua.displayName="CardContent";const SN=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:ge("flex items-center justify-between p-6 pt-0",t),...r}));SN.displayName="CardFooter";const He=m.forwardRef(({className:t,type:r,...o},a)=>u.jsx("input",{type:r,className:ge("flex h-9 w-full rounded-xl border border-gray-200/80 bg-white px-3.5 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-primary/40 focus:border-primary/40 transition-colors disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...o}));He.displayName="Input";const fr=m.forwardRef(({className:t,...r},o)=>u.jsx("label",{ref:o,className:ge("text-sm font-medium leading-none text-gray-700 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...r}));fr.displayName="Label";function xn({className:t,...r}){return u.jsx("div",{className:ge("animate-pulse rounded-md bg-slate-200",t),...r})}const kN="http://127.0.0.1:18791",Bl=(()=>{var t;return typeof window<"u"&&((t=window.location)!=null&&t.origin)?window.location.origin:kN})();async function jl(t,r={}){const o=`${Bl}${t}`,a=await fetch(o,{headers:{"Content-Type":"application/json",...r.headers},...r}),l=await a.text();let c=null;if(l)try{c=JSON.parse(l)}catch{}if(!c){const f=l?l.slice(0,200):"";return{ok:!1,error:{code:"INVALID_RESPONSE",message:`Non-JSON response (${a.status} ${a.statusText})${f?`: ${f}`:""}`}}}return a.ok,c}const at={get:t=>jl(t,{method:"GET"}),put:(t,r)=>jl(t,{method:"PUT",body:JSON.stringify(r)}),post:(t,r)=>jl(t,{method:"POST",body:JSON.stringify(r)}),delete:t=>jl(t,{method:"DELETE"})};async function CN(){const t=await at.get("/api/config");if(!t.ok)throw new Error(t.error.message);return t.data}async function EN(){const t=await at.get("/api/config/meta");if(!t.ok)throw new Error(t.error.message);return t.data}async function NN(){const t=await at.get("/api/config/schema");if(!t.ok)throw new Error(t.error.message);return t.data}async function PN(t){const r=await at.put("/api/config/model",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function RN(t,r){const o=await at.put(`/api/config/providers/${t}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function jN(t,r){const o=await at.put(`/api/config/channels/${t}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function TN(t){const r=await at.put("/api/config/runtime",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function MN(t,r){const o=await at.post(`/api/config/actions/${t}/execute`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function IN(t){var l;const r=new URLSearchParams;(l=t==null?void 0:t.q)!=null&&l.trim()&&r.set("q",t.q.trim()),typeof(t==null?void 0:t.limit)=="number"&&Number.isFinite(t.limit)&&r.set("limit",String(Math.max(0,Math.trunc(t.limit)))),typeof(t==null?void 0:t.activeMinutes)=="number"&&Number.isFinite(t.activeMinutes)&&r.set("activeMinutes",String(Math.max(0,Math.trunc(t.activeMinutes))));const o=r.toString(),a=await at.get(o?"/api/sessions?"+o:"/api/sessions");if(!a.ok)throw new Error(a.error.message);return a.data}async function AN(t,r=200){const o=await at.get(`/api/sessions/${encodeURIComponent(t)}/history?limit=${Math.max(1,Math.trunc(r))}`);if(!o.ok)throw new Error(o.error.message);return o.data}async function LN(t,r){const o=await at.put(`/api/sessions/${encodeURIComponent(t)}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function zN(t){const r=await at.delete(`/api/sessions/${encodeURIComponent(t)}`);if(!r.ok)throw new Error(r.error.message);return r.data}async function DN(t){const r=new URLSearchParams;t!=null&&t.all&&r.set("all","1");const o=r.toString(),a=await at.get(o?"/api/cron?"+o:"/api/cron");if(!a.ok)throw new Error(a.error.message);return a.data}async function ON(t){const r=await at.delete(`/api/cron/${encodeURIComponent(t)}`);if(!r.ok)throw new Error(r.error.message);return r.data}async function _N(t,r){const o=await at.put(`/api/cron/${encodeURIComponent(t)}/enable`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function FN(t,r){const o=await at.post(`/api/cron/${encodeURIComponent(t)}/run`,r);if(!o.ok)throw new Error(o.error.message);return o.data}var UN=t=>{switch(t){case"success":return WN;case"info":return VN;case"warning":return HN;case"error":return KN;default:return null}},$N=Array(12).fill(0),BN=({visible:t,className:r})=>ae.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":t},ae.createElement("div",{className:"sonner-spinner"},$N.map((o,a)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),WN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),HN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),VN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),KN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),QN=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qN=()=>{let[t,r]=ae.useState(document.hidden);return ae.useEffect(()=>{let o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),t},lf=1,GN=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:o,...a}=t,l=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:lf++,c=this.toasts.find(h=>h.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:o}),{...h,...t,id:l,dismissible:f,title:o}):h):this.addToast({title:o,...a,dismissible:f,id:l}),l},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:t,dismiss:!0})),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let a=t instanceof Promise?t:t(),l=o!==void 0,c,f=a.then(async g=>{if(c=["resolve",g],ae.isValidElement(g))l=!1,this.create({id:o,type:"default",message:g});else if(XN(g)&&!g.ok){l=!1;let y=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,x=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description;this.create({id:o,type:"error",message:y,description:x})}else if(r.success!==void 0){l=!1;let y=typeof r.success=="function"?await r.success(g):r.success,x=typeof r.description=="function"?await r.description(g):r.description;this.create({id:o,type:"success",message:y,description:x})}}).catch(async g=>{if(c=["reject",g],r.error!==void 0){l=!1;let y=typeof r.error=="function"?await r.error(g):r.error,x=typeof r.description=="function"?await r.description(g):r.description;this.create({id:o,type:"error",message:y,description:x})}}).finally(()=>{var g;l&&(this.dismiss(o),o=void 0),(g=r.finally)==null||g.call(r)}),h=()=>new Promise((g,y)=>f.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:h}:Object.assign(o,{unwrap:h})},this.custom=(t,r)=>{let o=(r==null?void 0:r.id)||lf++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Bt=new GN,YN=(t,r)=>{let o=(r==null?void 0:r.id)||lf++;return Bt.addToast({title:t,...r,id:o}),o},XN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",JN=YN,ZN=()=>Bt.toasts,eP=()=>Bt.getActiveToasts(),Ue=Object.assign(JN,{success:Bt.success,info:Bt.info,warning:Bt.warning,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss,loading:Bt.loading},{getHistory:ZN,getToasts:eP});function tP(t,{insertAt:r}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}tP(`: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%)}
337
- `);function Tl(t){return t.label!==void 0}var nP=3,rP="32px",oP="16px",Ug=4e3,sP=356,aP=14,iP=20,lP=200;function wn(...t){return t.filter(Boolean).join(" ")}function cP(t){let[r,o]=t.split("-"),a=[];return r&&a.push(r),o&&a.push(o),a}var uP=t=>{var r,o,a,l,c,f,h,g,y,x,b;let{invert:k,toast:w,unstyled:N,interacting:v,setHeights:C,visibleToasts:R,heights:j,index:P,toasts:A,expanded:$,removeToast:B,defaultRichColors:H,closeButton:X,style:W,cancelButtonStyle:Y,actionButtonStyle:_,className:O="",descriptionClassName:Z="",duration:ee,position:G,gap:ie,loadingIcon:ce,expandByDefault:K,classNames:q,icons:Q,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:F}=t,[le,J]=ae.useState(null),[ue,xe]=ae.useState(null),[ne,he]=ae.useState(!1),[be,Ce]=ae.useState(!1),[Te,Ie]=ae.useState(!1),[nt,vt]=ae.useState(!1),[Rn,ln]=ae.useState(!1),[cn,br]=ae.useState(0),[jn,Sr]=ae.useState(0),Xt=ae.useRef(w.duration||ee||Ug),Ho=ae.useRef(null),Tn=ae.useRef(null),ai=P===0,ii=P+1<=R,Nt=w.type,Mn=w.dismissible!==!1,Vo=w.className||"",li=w.descriptionClassName||"",In=ae.useMemo(()=>j.findIndex(Ne=>Ne.toastId===w.id)||0,[j,w.id]),co=ae.useMemo(()=>{var Ne;return(Ne=w.closeButton)!=null?Ne:X},[w.closeButton,X]),ci=ae.useMemo(()=>w.duration||ee||Ug,[w.duration,ee]),Ko=ae.useRef(0),Xn=ae.useRef(0),ui=ae.useRef(0),An=ae.useRef(null),[Xs,Js]=G.split("-"),Qo=ae.useMemo(()=>j.reduce((Ne,De,$e)=>$e>=In?Ne:Ne+De.height,0),[j,In]),qo=qN(),kr=w.invert||k,Ln=Nt==="loading";Xn.current=ae.useMemo(()=>In*ie+Qo,[In,Qo]),ae.useEffect(()=>{Xt.current=ci},[ci]),ae.useEffect(()=>{he(!0)},[]),ae.useEffect(()=>{let Ne=Tn.current;if(Ne){let De=Ne.getBoundingClientRect().height;return Sr(De),C($e=>[{toastId:w.id,height:De,position:w.position},...$e]),()=>C($e=>$e.filter(Pt=>Pt.toastId!==w.id))}},[C,w.id]),ae.useLayoutEffect(()=>{if(!ne)return;let Ne=Tn.current,De=Ne.style.height;Ne.style.height="auto";let $e=Ne.getBoundingClientRect().height;Ne.style.height=De,Sr($e),C(Pt=>Pt.find(It=>It.toastId===w.id)?Pt.map(It=>It.toastId===w.id?{...It,height:$e}:It):[{toastId:w.id,height:$e,position:w.position},...Pt])},[ne,w.title,w.description,C,w.id]);let un=ae.useCallback(()=>{Ce(!0),br(Xn.current),C(Ne=>Ne.filter(De=>De.toastId!==w.id)),setTimeout(()=>{B(w)},lP)},[w,B,C,Xn]);ae.useEffect(()=>{if(w.promise&&Nt==="loading"||w.duration===1/0||w.type==="loading")return;let Ne;return $||v||F&&qo?(()=>{if(ui.current<Ko.current){let De=new Date().getTime()-Ko.current;Xt.current=Xt.current-De}ui.current=new Date().getTime()})():Xt.current!==1/0&&(Ko.current=new Date().getTime(),Ne=setTimeout(()=>{var De;(De=w.onAutoClose)==null||De.call(w,w),un()},Xt.current)),()=>clearTimeout(Ne)},[$,v,w,Nt,F,qo,un]),ae.useEffect(()=>{w.delete&&un()},[un,w.delete]);function di(){var Ne,De,$e;return Q!=null&&Q.loading?ae.createElement("div",{className:wn(q==null?void 0:q.loader,(Ne=w==null?void 0:w.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":Nt==="loading"},Q.loading):ce?ae.createElement("div",{className:wn(q==null?void 0:q.loader,(De=w==null?void 0:w.classNames)==null?void 0:De.loader,"sonner-loader"),"data-visible":Nt==="loading"},ce):ae.createElement(BN,{className:wn(q==null?void 0:q.loader,($e=w==null?void 0:w.classNames)==null?void 0:$e.loader),visible:Nt==="loading"})}return ae.createElement("li",{tabIndex:0,ref:Tn,className:wn(O,Vo,q==null?void 0:q.toast,(r=w==null?void 0:w.classNames)==null?void 0:r.toast,q==null?void 0:q.default,q==null?void 0:q[Nt],(o=w==null?void 0:w.classNames)==null?void 0:o[Nt]),"data-sonner-toast":"","data-rich-colors":(a=w.richColors)!=null?a:H,"data-styled":!(w.jsx||w.unstyled||N),"data-mounted":ne,"data-promise":!!w.promise,"data-swiped":Rn,"data-removed":be,"data-visible":ii,"data-y-position":Xs,"data-x-position":Js,"data-index":P,"data-front":ai,"data-swiping":Te,"data-dismissible":Mn,"data-type":Nt,"data-invert":kr,"data-swipe-out":nt,"data-swipe-direction":ue,"data-expanded":!!($||K&&ne),style:{"--index":P,"--toasts-before":P,"--z-index":A.length-P,"--offset":`${be?cn:Xn.current}px`,"--initial-height":K?"auto":`${jn}px`,...W,...w.style},onDragEnd:()=>{Ie(!1),J(null),An.current=null},onPointerDown:Ne=>{Ln||!Mn||(Ho.current=new Date,br(Xn.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Ie(!0),An.current={x:Ne.clientX,y:Ne.clientY}))},onPointerUp:()=>{var Ne,De,$e,Pt;if(nt||!Mn)return;An.current=null;let It=Number(((Ne=Tn.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),At=Number(((De=Tn.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-(($e=Ho.current)==null?void 0:$e.getTime()),pt=le==="x"?It:At,zn=Math.abs(pt)/dn;if(Math.abs(pt)>=iP||zn>.11){br(Xn.current),(Pt=w.onDismiss)==null||Pt.call(w,w),xe(le==="x"?It>0?"right":"left":At>0?"down":"up"),un(),vt(!0),ln(!1);return}Ie(!1),J(null)},onPointerMove:Ne=>{var De,$e,Pt,It;if(!An.current||!Mn||((De=window.getSelection())==null?void 0:De.toString().length)>0)return;let At=Ne.clientY-An.current.y,dn=Ne.clientX-An.current.x,pt=($e=t.swipeDirections)!=null?$e:cP(G);!le&&(Math.abs(dn)>1||Math.abs(At)>1)&&J(Math.abs(dn)>Math.abs(At)?"x":"y");let zn={x:0,y:0};le==="y"?(pt.includes("top")||pt.includes("bottom"))&&(pt.includes("top")&&At<0||pt.includes("bottom")&&At>0)&&(zn.y=At):le==="x"&&(pt.includes("left")||pt.includes("right"))&&(pt.includes("left")&&dn<0||pt.includes("right")&&dn>0)&&(zn.x=dn),(Math.abs(zn.x)>0||Math.abs(zn.y)>0)&&ln(!0),(Pt=Tn.current)==null||Pt.style.setProperty("--swipe-amount-x",`${zn.x}px`),(It=Tn.current)==null||It.style.setProperty("--swipe-amount-y",`${zn.y}px`)}},co&&!w.jsx?ae.createElement("button",{"aria-label":M,"data-disabled":Ln,"data-close-button":!0,onClick:Ln||!Mn?()=>{}:()=>{var Ne;un(),(Ne=w.onDismiss)==null||Ne.call(w,w)},className:wn(q==null?void 0:q.closeButton,(l=w==null?void 0:w.classNames)==null?void 0:l.closeButton)},(c=Q==null?void 0:Q.close)!=null?c:QN):null,w.jsx||m.isValidElement(w.title)?w.jsx?w.jsx:typeof w.title=="function"?w.title():w.title:ae.createElement(ae.Fragment,null,Nt||w.icon||w.promise?ae.createElement("div",{"data-icon":"",className:wn(q==null?void 0:q.icon,(f=w==null?void 0:w.classNames)==null?void 0:f.icon)},w.promise||w.type==="loading"&&!w.icon?w.icon||di():null,w.type!=="loading"?w.icon||(Q==null?void 0:Q[Nt])||UN(Nt):null):null,ae.createElement("div",{"data-content":"",className:wn(q==null?void 0:q.content,(h=w==null?void 0:w.classNames)==null?void 0:h.content)},ae.createElement("div",{"data-title":"",className:wn(q==null?void 0:q.title,(g=w==null?void 0:w.classNames)==null?void 0:g.title)},typeof w.title=="function"?w.title():w.title),w.description?ae.createElement("div",{"data-description":"",className:wn(Z,li,q==null?void 0:q.description,(y=w==null?void 0:w.classNames)==null?void 0:y.description)},typeof w.description=="function"?w.description():w.description):null),m.isValidElement(w.cancel)?w.cancel:w.cancel&&Tl(w.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:w.cancelButtonStyle||Y,onClick:Ne=>{var De,$e;Tl(w.cancel)&&Mn&&(($e=(De=w.cancel).onClick)==null||$e.call(De,Ne),un())},className:wn(q==null?void 0:q.cancelButton,(x=w==null?void 0:w.classNames)==null?void 0:x.cancelButton)},w.cancel.label):null,m.isValidElement(w.action)?w.action:w.action&&Tl(w.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:w.actionButtonStyle||_,onClick:Ne=>{var De,$e;Tl(w.action)&&(($e=(De=w.action).onClick)==null||$e.call(De,Ne),!Ne.defaultPrevented&&un())},className:wn(q==null?void 0:q.actionButton,(b=w==null?void 0:w.classNames)==null?void 0:b.actionButton)},w.action.label):null))};function $g(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function dP(t,r){let o={};return[t,r].forEach((a,l)=>{let c=l===1,f=c?"--mobile-offset":"--offset",h=c?oP:rP;function g(y){["top","right","bottom","left"].forEach(x=>{o[`${f}-${x}`]=typeof y=="number"?`${y}px`:y})}typeof a=="number"||typeof a=="string"?g(a):typeof a=="object"?["top","right","bottom","left"].forEach(y=>{a[y]===void 0?o[`${f}-${y}`]=h:o[`${f}-${y}`]=typeof a[y]=="number"?`${a[y]}px`:a[y]}):g(h)}),o}var fP=m.forwardRef(function(t,r){let{invert:o,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:h,offset:g,mobileOffset:y,theme:x="light",richColors:b,duration:k,style:w,visibleToasts:N=nP,toastOptions:v,dir:C=$g(),gap:R=aP,loadingIcon:j,icons:P,containerAriaLabel:A="Notifications",pauseWhenPageIsHidden:$}=t,[B,H]=ae.useState([]),X=ae.useMemo(()=>Array.from(new Set([a].concat(B.filter(F=>F.position).map(F=>F.position)))),[B,a]),[W,Y]=ae.useState([]),[_,O]=ae.useState(!1),[Z,ee]=ae.useState(!1),[G,ie]=ae.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ce=ae.useRef(null),K=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=ae.useRef(null),Q=ae.useRef(!1),M=ae.useCallback(F=>{H(le=>{var J;return(J=le.find(ue=>ue.id===F.id))!=null&&J.delete||Bt.dismiss(F.id),le.filter(({id:ue})=>ue!==F.id)})},[]);return ae.useEffect(()=>Bt.subscribe(F=>{if(F.dismiss){H(le=>le.map(J=>J.id===F.id?{...J,delete:!0}:J));return}setTimeout(()=>{Ay.flushSync(()=>{H(le=>{let J=le.findIndex(ue=>ue.id===F.id);return J!==-1?[...le.slice(0,J),{...le[J],...F},...le.slice(J+1)]:[F,...le]})})})}),[]),ae.useEffect(()=>{if(x!=="system"){ie(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:le})=>{ie(le?"dark":"light")})}catch{F.addListener(({matches:J})=>{try{ie(J?"dark":"light")}catch(ue){console.error(ue)}})}},[x]),ae.useEffect(()=>{B.length<=1&&O(!1)},[B]),ae.useEffect(()=>{let F=le=>{var J,ue;l.every(xe=>le[xe]||le.code===xe)&&(O(!0),(J=ce.current)==null||J.focus()),le.code==="Escape"&&(document.activeElement===ce.current||(ue=ce.current)!=null&&ue.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[l]),ae.useEffect(()=>{if(ce.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,Q.current=!1)}},[ce.current]),ae.createElement("section",{ref:r,"aria-label":`${A} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},X.map((F,le)=>{var J;let[ue,xe]=F.split("-");return B.length?ae.createElement("ol",{key:F,dir:C==="auto"?$g():C,tabIndex:-1,ref:ce,className:h,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":ue,"data-lifted":_&&B.length>1&&!c,"data-x-position":xe,style:{"--front-toast-height":`${((J=W[0])==null?void 0:J.height)||0}px`,"--width":`${sP}px`,"--gap":`${R}px`,...w,...dP(g,y)},onBlur:ne=>{Q.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(Q.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,q.current=ne.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Z||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},B.filter(ne=>!ne.position&&le===0||ne.position===F).map((ne,he)=>{var be,Ce;return ae.createElement(uP,{key:ne.id,icons:P,index:he,toast:ne,defaultRichColors:b,duration:(be=v==null?void 0:v.duration)!=null?be:k,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:N,closeButton:(Ce=v==null?void 0:v.closeButton)!=null?Ce:f,interacting:Z,position:F,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:M,toasts:B.filter(Te=>Te.position==ne.position),heights:W.filter(Te=>Te.position==ne.position),setHeights:Y,expandByDefault:c,gap:R,loadingIcon:j,expanded:_,pauseWhenPageIsHidden:$,swipeDirections:t.swipeDirections})})):null}))});function qs(){return ao({queryKey:["config"],queryFn:CN,staleTime:3e4,refetchOnWindowFocus:!0})}function Vf(){return ao({queryKey:["config-meta"],queryFn:EN,staleTime:1/0})}function Gs(){return ao({queryKey:["config-schema"],queryFn:NN,staleTime:1/0})}function hP(){const t=Yt();return an({mutationFn:PN,onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSaved"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function pP(){const t=Yt();return an({mutationFn:({provider:r,data:o})=>RN(r,o),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSaved"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function mP(){const t=Yt();return an({mutationFn:({channel:r,data:o})=>jN(r,o),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function gP(){const t=Yt();return an({mutationFn:({data:r})=>TN(r),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function yP(){return an({mutationFn:({actionId:t,data:r})=>MN(t,r),onError:t=>{Ue.error(E("error")+": "+t.message)}})}function vP(t){return ao({queryKey:["sessions",t],queryFn:()=>IN(t),staleTime:1e4})}function xP(t,r=200){return ao({queryKey:["session-history",t,r],queryFn:()=>AN(t,r),enabled:!!t,staleTime:5e3})}function wP(){const t=Yt();return an({mutationFn:({key:r,data:o})=>LN(r,o),onSuccess:(r,o)=>{t.invalidateQueries({queryKey:["sessions"]}),t.invalidateQueries({queryKey:["session-history",o.key]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function bP(){const t=Yt();return an({mutationFn:({key:r})=>zN(r),onSuccess:()=>{t.invalidateQueries({queryKey:["sessions"]}),t.invalidateQueries({queryKey:["session-history"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function SP(t={all:!0}){return ao({queryKey:["cron",t],queryFn:()=>DN(t),staleTime:1e4})}function kP(){const t=Yt();return an({mutationFn:({id:r})=>ON(r),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function CP(){const t=Yt();return an({mutationFn:({id:r,enabled:o})=>_N(r,{enabled:o}),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function EP(){const t=Yt();return an({mutationFn:({id:r,force:o})=>FN(r,{force:o}),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function NP(t){return Array.isArray(t)?t.filter(r=>typeof r=="string").join("."):t}function yt(t,r){if(!r)return;const o=NP(t),a=r[o];if(a)return a;const l=o.split(".");for(const[c,f]of Object.entries(r)){if(!c.includes("*"))continue;const h=c.split(".");if(h.length!==l.length)continue;let g=!0;for(let y=0;y<l.length;y+=1)if(h[y]!=="*"&&h[y]!==l[y]){g=!1;break}if(g)return f}}function PP(){const{data:t,isLoading:r}=qs(),{data:o}=Gs(),a=hP(),[l,c]=m.useState(""),[f,h]=m.useState(""),[g,y]=m.useState(8192),x=o==null?void 0:o.uiHints,b=yt("agents.defaults.model",x),k=yt("agents.defaults.workspace",x),w=yt("agents.defaults.maxTokens",x);m.useEffect(()=>{var v;(v=t==null?void 0:t.agents)!=null&&v.defaults&&(c(t.agents.defaults.model||""),h(t.agents.defaults.workspace||""),y(t.agents.defaults.maxTokens||8192))},[t]);const N=v=>{v.preventDefault(),a.mutate({model:l,maxTokens:g})};return r?u.jsxs("div",{className:"max-w-2xl space-y-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(xn,{className:"h-8 w-32"}),u.jsx(xn,{className:"h-4 w-48"})]}),u.jsxs(zo,{className:"rounded-2xl border-gray-200 p-6",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[u.jsx(xn,{className:"h-12 w-12 rounded-xl"}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(xn,{className:"h-5 w-24"}),u.jsx(xn,{className:"h-3 w-32"})]})]}),u.jsx(xn,{className:"h-4 w-20 mb-2"}),u.jsx(xn,{className:"h-10 w-full rounded-xl"})]}),u.jsxs(zo,{className:"rounded-2xl border-gray-200 p-6",children:[u.jsx(xn,{className:"h-5 w-24 mb-2"}),u.jsx(xn,{className:"h-3 w-40 mb-6"}),u.jsx("div",{className:"space-y-6",children:u.jsxs("div",{children:[u.jsx(xn,{className:"h-4 w-28 mb-3"}),u.jsx(xn,{className:"h-2 w-full rounded-full"})]})})]})]}):u.jsxs("div",{className:"max-w-4xl animate-fade-in pb-20",children:[u.jsxs("div",{className:"mb-10",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:E("modelPageTitle")}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:E("modelPageDescription")})]}),u.jsxs("form",{onSubmit:N,className:"space-y-8",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(cv,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("defaultModel")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(fr,{htmlFor:"model",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(b==null?void 0:b.label)??"Model Name"}),u.jsx(He,{id:"model",value:l,onChange:v=>c(v.target.value),placeholder:(b==null?void 0:b.placeholder)??"minimax/MiniMax-M2.1",className:"h-12 px-4 rounded-xl"}),u.jsx("p",{className:"text-xs text-gray-400",children:(b==null?void 0:b.help)??"Examples: minimax/MiniMax-M2.5 · minimax/MiniMax-M2.1 · openrouter/anthropic/claude-3.5-sonnet · openrouter/openai/gpt-4o-mini"})]})]}),u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(Mk,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("workspace")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(fr,{htmlFor:"workspace",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(k==null?void 0:k.label)??"Default Path"}),u.jsx(He,{id:"workspace",value:f,onChange:v=>h(v.target.value),placeholder:(k==null?void 0:k.placeholder)??"/path/to/workspace",className:"h-12 px-4 rounded-xl"})]})]})]}),u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-10",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(Hk,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("generationParameters")})]}),u.jsx("div",{className:"grid grid-cols-1 gap-12",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx(fr,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(w==null?void 0:w.label)??E("maxTokens")}),u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:Zy(g)})]}),u.jsx("input",{type:"range",min:"1000",max:"32000",step:"1000",value:g,onChange:v=>y(parseInt(v.target.value)),className:"w-full h-1 bg-gray-200 rounded-full appearance-none cursor-pointer accent-primary"})]})})]}),u.jsx("div",{className:"flex justify-end pt-4",children:u.jsx(Ve,{type:"submit",disabled:a.isPending,size:"lg",children:a.isPending?u.jsx(Dk,{className:"h-5 w-5 animate-spin"}):E("saveChanges")})})]})]})}const Bg=t=>{let r;const o=new Set,a=(y,x)=>{const b=typeof y=="function"?y(r):y;if(!Object.is(b,r)){const k=r;r=x??(typeof b!="object"||b===null)?b:Object.assign({},r,b),o.forEach(w=>w(r,k))}},l=()=>r,h={setState:a,getState:l,getInitialState:()=>g,subscribe:y=>(o.add(y),()=>o.delete(y))},g=r=t(a,l,h);return h},RP=(t=>t?Bg(t):Bg),jP=t=>t;function TP(t,r=jP){const o=ae.useSyncExternalStore(t.subscribe,ae.useCallback(()=>r(t.getState()),[t,r]),ae.useCallback(()=>r(t.getInitialState()),[t,r]));return ae.useDebugValue(o),o}const Wg=t=>{const r=RP(t),o=a=>TP(r,a);return Object.assign(o,r),o},MP=(t=>t?Wg(t):Wg),oi=MP(t=>({connectionStatus:"disconnected",setConnectionStatus:r=>t({connectionStatus:r}),providerModal:{open:!1},openProviderModal:r=>t({providerModal:{open:!0,provider:r}}),closeProviderModal:()=>t({providerModal:{open:!1}}),channelModal:{open:!1},openChannelModal:r=>t({channelModal:{open:!0,channel:r}}),closeChannelModal:()=>t({channelModal:{open:!1}})}));function IP(t,r){return m.useReducer((o,a)=>r[o][a]??o,t)}var Ys=t=>{const{present:r,children:o}=t,a=AP(r),l=typeof o=="function"?o({present:a.isPresent}):m.Children.only(o),c=Ze(a.ref,LP(l));return typeof o=="function"||a.isPresent?m.cloneElement(l,{ref:c}):null};Ys.displayName="Presence";function AP(t){const[r,o]=m.useState(),a=m.useRef(null),l=m.useRef(t),c=m.useRef("none"),f=t?"mounted":"unmounted",[h,g]=IP(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const y=Ml(a.current);c.current=h==="mounted"?y:"none"},[h]),Et(()=>{const y=a.current,x=l.current;if(x!==t){const k=c.current,w=Ml(y);t?g("MOUNT"):w==="none"||(y==null?void 0:y.display)==="none"?g("UNMOUNT"):g(x&&k!==w?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,g]),Et(()=>{if(r){let y;const x=r.ownerDocument.defaultView??window,b=w=>{const v=Ml(a.current).includes(CSS.escape(w.animationName));if(w.target===r&&v&&(g("ANIMATION_END"),!l.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",y=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},k=w=>{w.target===r&&(c.current=Ml(a.current))};return r.addEventListener("animationstart",k),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{x.clearTimeout(y),r.removeEventListener("animationstart",k),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(y=>{a.current=y?getComputedStyle(y):null,o(y)},[])}}function Ml(t){return(t==null?void 0:t.animationName)||"none"}function LP(t){var a,l;let r=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var vc="Dialog",[O0]=ni(vc),[zP,Pn]=O0(vc),_0=t=>{const{__scopeDialog:r,children:o,open:a,defaultOpen:l,onOpenChange:c,modal:f=!0}=t,h=m.useRef(null),g=m.useRef(null),[y,x]=ec({prop:a,defaultProp:l??!1,onChange:c,caller:vc});return u.jsx(zP,{scope:r,triggerRef:h,contentRef:g,contentId:Lo(),titleId:Lo(),descriptionId:Lo(),open:y,onOpenChange:x,onOpenToggle:m.useCallback(()=>x(b=>!b),[x]),modal:f,children:o})};_0.displayName=vc;var F0="DialogTrigger",DP=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(F0,o),c=Ze(r,l.triggerRef);return u.jsx(Be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":qf(l.open),...a,ref:c,onClick:Oe(t.onClick,l.onOpenToggle)})});DP.displayName=F0;var Kf="DialogPortal",[OP,U0]=O0(Kf,{forceMount:void 0}),$0=t=>{const{__scopeDialog:r,forceMount:o,children:a,container:l}=t,c=Pn(Kf,r);return u.jsx(OP,{scope:r,forceMount:o,children:m.Children.map(a,f=>u.jsx(Ys,{present:o||c.open,children:u.jsx(hc,{asChild:!0,container:l,children:f})}))})};$0.displayName=Kf;var nc="DialogOverlay",B0=m.forwardRef((t,r)=>{const o=U0(nc,t.__scopeDialog),{forceMount:a=o.forceMount,...l}=t,c=Pn(nc,t.__scopeDialog);return c.modal?u.jsx(Ys,{present:a||c.open,children:u.jsx(FP,{...l,ref:r})}):null});B0.displayName=nc;var _P=Ha("DialogOverlay.RemoveScroll"),FP=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(nc,o);return u.jsx(Wf,{as:_P,allowPinchZoom:!0,shards:[l.contentRef],children:u.jsx(Be.div,{"data-state":qf(l.open),...a,ref:r,style:{pointerEvents:"auto",...a.style}})})}),Wo="DialogContent",W0=m.forwardRef((t,r)=>{const o=U0(Wo,t.__scopeDialog),{forceMount:a=o.forceMount,...l}=t,c=Pn(Wo,t.__scopeDialog);return u.jsx(Ys,{present:a||c.open,children:c.modal?u.jsx(UP,{...l,ref:r}):u.jsx($P,{...l,ref:r})})});W0.displayName=Wo;var UP=m.forwardRef((t,r)=>{const o=Pn(Wo,t.__scopeDialog),a=m.useRef(null),l=Ze(r,o.contentRef,a);return m.useEffect(()=>{const c=a.current;if(c)return Kv(c)},[]),u.jsx(H0,{...t,ref:l,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,c=>{var f;c.preventDefault(),(f=o.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&c.preventDefault()}),onFocusOutside:Oe(t.onFocusOutside,c=>c.preventDefault())})}),$P=m.forwardRef((t,r)=>{const o=Pn(Wo,t.__scopeDialog),a=m.useRef(!1),l=m.useRef(!1);return u.jsx(H0,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,c),c.defaultPrevented||(a.current||(h=o.triggerRef.current)==null||h.focus(),c.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:c=>{var g,y;(g=t.onInteractOutside)==null||g.call(t,c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const f=c.target;((y=o.triggerRef.current)==null?void 0:y.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),H0=m.forwardRef((t,r)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:c,...f}=t,h=Pn(Wo,o),g=m.useRef(null),y=Ze(r,g);return gv(),u.jsxs(u.Fragment,{children:[u.jsx(Lf,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:c,children:u.jsx(ic,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":qf(h.open),...f,ref:y,onDismiss:()=>h.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(BP,{titleId:h.titleId}),u.jsx(HP,{contentRef:g,descriptionId:h.descriptionId})]})]})}),Qf="DialogTitle",V0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(Qf,o);return u.jsx(Be.h2,{id:l.titleId,...a,ref:r})});V0.displayName=Qf;var K0="DialogDescription",Q0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(K0,o);return u.jsx(Be.p,{id:l.descriptionId,...a,ref:r})});Q0.displayName=K0;var q0="DialogClose",G0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(q0,o);return u.jsx(Be.button,{type:"button",...a,ref:r,onClick:Oe(t.onClick,()=>l.onOpenChange(!1))})});G0.displayName=q0;function qf(t){return t?"open":"closed"}var Y0="DialogTitleWarning",[xj,X0]=eC(Y0,{contentName:Wo,titleName:Qf,docsSlug:"dialog"}),BP=({titleId:t})=>{const r=X0(Y0),o=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
336
+ `)},FE=0,bs=[];function UE(t){var r=m.useRef([]),o=m.useRef([0,0]),a=m.useRef(),l=m.useState(FE++)[0],c=m.useState(Jv)[0],f=m.useRef(t);m.useEffect(function(){f.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(l));var v=iE([t.lockRef.current],(t.shards||[]).map(Fg),!0).filter(Boolean);return v.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),v.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[t.inert,t.lockRef.current,t.shards]);var h=m.useCallback(function(v,C){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!f.current.allowPinchZoom;var R=Tl(v),j=o.current,P="deltaX"in v?v.deltaX:j[0]-R[0],A="deltaY"in v?v.deltaY:j[1]-R[1],$,B=v.target,W=Math.abs(P)>Math.abs(A)?"h":"v";if("touches"in v&&W==="h"&&B.type==="range")return!1;var X=window.getSelection(),H=X&&X.anchorNode,Y=H?H===B||H.contains(B):!1;if(Y)return!1;var _=Og(W,B);if(!_)return!0;if(_?$=W:($=W==="v"?"h":"v",_=Og(W,B)),!_)return!1;if(!a.current&&"changedTouches"in v&&(P||A)&&(a.current=$),!$)return!0;var O=a.current||$;return DE(O,C,v,O==="h"?P:A)},[]),g=m.useCallback(function(v){var C=v;if(!(!bs.length||bs[bs.length-1]!==c)){var R="deltaY"in C?_g(C):Tl(C),j=r.current.filter(function($){return $.name===C.type&&($.target===C.target||C.target===$.shadowParent)&&OE($.delta,R)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var P=(f.current.shards||[]).map(Fg).filter(Boolean).filter(function($){return $.contains(C.target)}),A=P.length>0?h(C,P[0]):!f.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),y=m.useCallback(function(v,C,R,j){var P={name:v,delta:C,target:R,should:j,shadowParent:$E(R)};r.current.push(P),setTimeout(function(){r.current=r.current.filter(function(A){return A!==P})},1)},[]),x=m.useCallback(function(v){o.current=Tl(v),a.current=void 0},[]),b=m.useCallback(function(v){y(v.type,_g(v),v.target,h(v,t.lockRef.current))},[]),k=m.useCallback(function(v){y(v.type,Tl(v),v.target,h(v,t.lockRef.current))},[]);m.useEffect(function(){return bs.push(c),t.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:k}),document.addEventListener("wheel",g,ws),document.addEventListener("touchmove",g,ws),document.addEventListener("touchstart",x,ws),function(){bs=bs.filter(function(v){return v!==c}),document.removeEventListener("wheel",g,ws),document.removeEventListener("touchmove",g,ws),document.removeEventListener("touchstart",x,ws)}},[]);var w=t.removeScrollBar,N=t.inert;return m.createElement(m.Fragment,null,N?m.createElement(c,{styles:_E(l)}):null,w?m.createElement(jE,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function $E(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const BE=gE(Xv,UE);var Vf=m.forwardRef(function(t,r){return m.createElement(gc,Vn({},t,{ref:r,sideCar:BE}))});Vf.classNames=gc.classNames;var HE=[" ","Enter","ArrowUp","ArrowDown"],WE=[" ","Enter"],Uo="Select",[yc,vc,VE]=cC(Uo),[Gs]=oi(Uo,[VE,pc]),xc=pc(),[KE,io]=Gs(Uo),[QE,qE]=Gs(Uo),n0=t=>{const{__scopeSelect:r,children:o,open:a,defaultOpen:l,onOpenChange:c,value:f,defaultValue:h,onValueChange:g,dir:y,name:x,autoComplete:b,disabled:k,required:w,form:N}=t,v=xc(r),[C,R]=m.useState(null),[j,P]=m.useState(null),[A,$]=m.useState(!1),B=dC(y),[W,X]=nc({prop:a,defaultProp:l??!1,onChange:c,caller:Uo}),[H,Y]=nc({prop:f,defaultProp:h,onChange:g,caller:Uo}),_=m.useRef(null),O=C?N||!!C.closest("form"):!0,[Z,ee]=m.useState(new Set),G=Array.from(Z).map(ie=>ie.props.value).join(";");return u.jsx($v,{...v,children:u.jsxs(KE,{required:w,scope:r,trigger:C,onTriggerChange:R,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:A,onValueNodeHasChildrenChange:$,contentId:Lo(),value:H,onValueChange:Y,open:W,onOpenChange:X,dir:B,triggerPointerDownPosRef:_,disabled:k,children:[u.jsx(yc.Provider,{scope:r,children:u.jsx(QE,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(ie=>{ee(ce=>new Set(ce).add(ie))},[]),onNativeOptionRemove:m.useCallback(ie=>{ee(ce=>{const K=new Set(ce);return K.delete(ie),K})},[]),children:o})}),O?u.jsxs(N0,{"aria-hidden":!0,required:w,tabIndex:-1,name:x,autoComplete:b,value:H,onChange:ie=>Y(ie.target.value),disabled:k,form:N,children:[H===void 0?u.jsx("option",{value:""}):null,Array.from(Z)]},G):null]})})};n0.displayName=Uo;var r0="SelectTrigger",o0=m.forwardRef((t,r)=>{const{__scopeSelect:o,disabled:a=!1,...l}=t,c=xc(o),f=io(r0,o),h=f.disabled||a,g=Ze(r,f.onTriggerChange),y=vc(o),x=m.useRef("touch"),[b,k,w]=R0(v=>{const C=y().filter(P=>!P.disabled),R=C.find(P=>P.value===f.value),j=j0(C,v,R);j!==void 0&&f.onValueChange(j.value)}),N=v=>{h||(f.onOpenChange(!0),w()),v&&(f.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return u.jsx(Bv,{asChild:!0,...c,children:u.jsx(Be.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":P0(f.value)?"":void 0,...l,ref:g,onClick:Oe(l.onClick,v=>{v.currentTarget.focus(),x.current!=="mouse"&&N(v)}),onPointerDown:Oe(l.onPointerDown,v=>{x.current=v.pointerType;const C=v.target;C.hasPointerCapture(v.pointerId)&&C.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(N(v),v.preventDefault())}),onKeyDown:Oe(l.onKeyDown,v=>{const C=b.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&k(v.key),!(C&&v.key===" ")&&HE.includes(v.key)&&(N(),v.preventDefault())})})})});o0.displayName=r0;var s0="SelectValue",a0=m.forwardRef((t,r)=>{const{__scopeSelect:o,className:a,style:l,children:c,placeholder:f="",...h}=t,g=io(s0,o),{onValueNodeHasChildrenChange:y}=g,x=c!==void 0,b=Ze(r,g.onValueNodeChange);return Et(()=>{y(x)},[y,x]),u.jsx(Be.span,{...h,ref:b,style:{pointerEvents:"none"},children:P0(g.value)?u.jsx(u.Fragment,{children:f}):c})});a0.displayName=s0;var GE="SelectIcon",i0=m.forwardRef((t,r)=>{const{__scopeSelect:o,children:a,...l}=t;return u.jsx(Be.span,{"aria-hidden":!0,...l,ref:r,children:a||"▼"})});i0.displayName=GE;var YE="SelectPortal",l0=t=>u.jsx(mc,{asChild:!0,...t});l0.displayName=YE;var $o="SelectContent",c0=m.forwardRef((t,r)=>{const o=io($o,t.__scopeSelect),[a,l]=m.useState();if(Et(()=>{l(new DocumentFragment)},[]),!o.open){const c=a;return c?ri.createPortal(u.jsx(u0,{scope:t.__scopeSelect,children:u.jsx(yc.Slot,{scope:t.__scopeSelect,children:u.jsx("div",{children:t.children})})}),c):null}return u.jsx(d0,{...t,ref:r})});c0.displayName=$o;var bn=10,[u0,lo]=Gs($o),XE="SelectContentImpl",JE=Ka("SelectContent.RemoveScroll"),d0=m.forwardRef((t,r)=>{const{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,side:h,sideOffset:g,align:y,alignOffset:x,arrowPadding:b,collisionBoundary:k,collisionPadding:w,sticky:N,hideWhenDetached:v,avoidCollisions:C,...R}=t,j=io($o,o),[P,A]=m.useState(null),[$,B]=m.useState(null),W=Ze(r,ne=>A(ne)),[X,H]=m.useState(null),[Y,_]=m.useState(null),O=vc(o),[Z,ee]=m.useState(!1),G=m.useRef(!1);m.useEffect(()=>{if(P)return qv(P)},[P]),vv();const ie=m.useCallback(ne=>{const[he,...be]=O().map(Ie=>Ie.ref.current),[Ce]=be.slice(-1),Te=document.activeElement;for(const Ie of ne)if(Ie===Te||(Ie==null||Ie.scrollIntoView({block:"nearest"}),Ie===he&&$&&($.scrollTop=0),Ie===Ce&&$&&($.scrollTop=$.scrollHeight),Ie==null||Ie.focus(),document.activeElement!==Te))return},[O,$]),ce=m.useCallback(()=>ie([X,P]),[ie,X,P]);m.useEffect(()=>{Z&&ce()},[Z,ce]);const{onOpenChange:K,triggerPointerDownPosRef:q}=j;m.useEffect(()=>{if(P){let ne={x:0,y:0};const he=Ce=>{var Te,Ie;ne={x:Math.abs(Math.round(Ce.pageX)-(((Te=q.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Ie=q.current)==null?void 0:Ie.y)??0))}},be=Ce=>{ne.x<=10&&ne.y<=10?Ce.preventDefault():P.contains(Ce.target)||K(!1),document.removeEventListener("pointermove",he),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",be,{capture:!0})}}},[P,K,q]),m.useEffect(()=>{const ne=()=>K(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[K]);const[Q,M]=R0(ne=>{const he=O().filter(Te=>!Te.disabled),be=he.find(Te=>Te.ref.current===document.activeElement),Ce=j0(he,ne,be);Ce&&setTimeout(()=>Ce.ref.current.focus())}),F=m.useCallback((ne,he,be)=>{const Ce=!G.current&&!be;(j.value!==void 0&&j.value===he||Ce)&&(H(ne),Ce&&(G.current=!0))},[j.value]),le=m.useCallback(()=>P==null?void 0:P.focus(),[P]),J=m.useCallback((ne,he,be)=>{const Ce=!G.current&&!be;(j.value!==void 0&&j.value===he||Ce)&&_(ne)},[j.value]),ue=a==="popper"?of:f0,xe=ue===of?{side:h,sideOffset:g,align:y,alignOffset:x,arrowPadding:b,collisionBoundary:k,collisionPadding:w,sticky:N,hideWhenDetached:v,avoidCollisions:C}:{};return u.jsx(u0,{scope:o,content:P,viewport:$,onViewportChange:B,itemRefCallback:F,selectedItem:X,onItemLeave:le,itemTextRefCallback:J,focusSelectedItem:ce,selectedItemText:Y,position:a,isPositioned:Z,searchRef:Q,children:u.jsx(Vf,{as:JE,allowPinchZoom:!0,children:u.jsx(Df,{asChild:!0,trapped:j.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:Oe(l,ne=>{var he;(he=j.trigger)==null||he.focus({preventScroll:!0}),ne.preventDefault()}),children:u.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:u.jsx(ue,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ne=>ne.preventDefault(),...R,...xe,onPlaced:()=>ee(!0),ref:W,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Oe(R.onKeyDown,ne=>{const he=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!he&&ne.key.length===1&&M(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let Ce=O().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ie=Ce.indexOf(Te);Ce=Ce.slice(Ie+1)}setTimeout(()=>ie(Ce)),ne.preventDefault()}})})})})})})});d0.displayName=XE;var ZE="SelectItemAlignedPosition",f0=m.forwardRef((t,r)=>{const{__scopeSelect:o,onPlaced:a,...l}=t,c=io($o,o),f=lo($o,o),[h,g]=m.useState(null),[y,x]=m.useState(null),b=Ze(r,W=>x(W)),k=vc(o),w=m.useRef(!1),N=m.useRef(!0),{viewport:v,selectedItem:C,selectedItemText:R,focusSelectedItem:j}=f,P=m.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&y&&v&&C&&R){const W=c.trigger.getBoundingClientRect(),X=y.getBoundingClientRect(),H=c.valueNode.getBoundingClientRect(),Y=R.getBoundingClientRect();if(c.dir!=="rtl"){const Te=Y.left-X.left,Ie=H.left-Te,nt=W.left-Ie,vt=W.width+nt,Rn=Math.max(vt,X.width),ln=window.innerWidth-bn,cn=mg(Ie,[bn,Math.max(bn,ln-Rn)]);h.style.minWidth=vt+"px",h.style.left=cn+"px"}else{const Te=X.right-Y.right,Ie=window.innerWidth-H.right-Te,nt=window.innerWidth-W.right-Ie,vt=W.width+nt,Rn=Math.max(vt,X.width),ln=window.innerWidth-bn,cn=mg(Ie,[bn,Math.max(bn,ln-Rn)]);h.style.minWidth=vt+"px",h.style.right=cn+"px"}const _=k(),O=window.innerHeight-bn*2,Z=v.scrollHeight,ee=window.getComputedStyle(y),G=parseInt(ee.borderTopWidth,10),ie=parseInt(ee.paddingTop,10),ce=parseInt(ee.borderBottomWidth,10),K=parseInt(ee.paddingBottom,10),q=G+ie+Z+K+ce,Q=Math.min(C.offsetHeight*5,q),M=window.getComputedStyle(v),F=parseInt(M.paddingTop,10),le=parseInt(M.paddingBottom,10),J=W.top+W.height/2-bn,ue=O-J,xe=C.offsetHeight/2,ne=C.offsetTop+xe,he=G+ie+ne,be=q-he;if(he<=J){const Te=_.length>0&&C===_[_.length-1].ref.current;h.style.bottom="0px";const Ie=y.clientHeight-v.offsetTop-v.offsetHeight,nt=Math.max(ue,xe+(Te?le:0)+Ie+ce),vt=he+nt;h.style.height=vt+"px"}else{const Te=_.length>0&&C===_[0].ref.current;h.style.top="0px";const nt=Math.max(J,G+v.offsetTop+(Te?F:0)+xe)+be;h.style.height=nt+"px",v.scrollTop=he-J+v.offsetTop}h.style.margin=`${bn}px 0`,h.style.minHeight=Q+"px",h.style.maxHeight=O+"px",a==null||a(),requestAnimationFrame(()=>w.current=!0)}},[k,c.trigger,c.valueNode,h,y,v,C,R,c.dir,a]);Et(()=>P(),[P]);const[A,$]=m.useState();Et(()=>{y&&$(window.getComputedStyle(y).zIndex)},[y]);const B=m.useCallback(W=>{W&&N.current===!0&&(P(),j==null||j(),N.current=!1)},[P,j]);return u.jsx(tN,{scope:o,contentWrapper:h,shouldExpandOnScrollRef:w,onScrollButtonChange:B,children:u.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:u.jsx(Be.div,{...l,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});f0.displayName=ZE;var eN="SelectPopperPosition",of=m.forwardRef((t,r)=>{const{__scopeSelect:o,align:a="start",collisionPadding:l=bn,...c}=t,f=xc(o);return u.jsx(Hv,{...f,...c,ref:r,align:a,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});of.displayName=eN;var[tN,Kf]=Gs($o,{}),sf="SelectViewport",h0=m.forwardRef((t,r)=>{const{__scopeSelect:o,nonce:a,...l}=t,c=lo(sf,o),f=Kf(sf,o),h=Ze(r,c.onViewportChange),g=m.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),u.jsx(yc.Slot,{scope:o,children:u.jsx(Be.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:Oe(l.onScroll,y=>{const x=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:k}=f;if(k!=null&&k.current&&b){const w=Math.abs(g.current-x.scrollTop);if(w>0){const N=window.innerHeight-bn*2,v=parseFloat(b.style.minHeight),C=parseFloat(b.style.height),R=Math.max(v,C);if(R<N){const j=R+w,P=Math.min(N,j),A=j-P;b.style.height=P+"px",b.style.bottom==="0px"&&(x.scrollTop=A>0?A:0,b.style.justifyContent="flex-end")}}}g.current=x.scrollTop})})})]})});h0.displayName=sf;var p0="SelectGroup",[nN,rN]=Gs(p0),oN=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=Lo();return u.jsx(nN,{scope:o,id:l,children:u.jsx(Be.div,{role:"group","aria-labelledby":l,...a,ref:r})})});oN.displayName=p0;var m0="SelectLabel",g0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=rN(m0,o);return u.jsx(Be.div,{id:l.id,...a,ref:r})});g0.displayName=m0;var rc="SelectItem",[sN,y0]=Gs(rc),v0=m.forwardRef((t,r)=>{const{__scopeSelect:o,value:a,disabled:l=!1,textValue:c,...f}=t,h=io(rc,o),g=lo(rc,o),y=h.value===a,[x,b]=m.useState(c??""),[k,w]=m.useState(!1),N=Ze(r,j=>{var P;return(P=g.itemRefCallback)==null?void 0:P.call(g,j,a,l)}),v=Lo(),C=m.useRef("touch"),R=()=>{l||(h.onValueChange(a),h.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(sN,{scope:o,value:a,disabled:l,textId:v,isSelected:y,onItemTextChange:m.useCallback(j=>{b(P=>P||((j==null?void 0:j.textContent)??"").trim())},[]),children:u.jsx(yc.ItemSlot,{scope:o,value:a,disabled:l,textValue:x,children:u.jsx(Be.div,{role:"option","aria-labelledby":v,"data-highlighted":k?"":void 0,"aria-selected":y&&k,"data-state":y?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...f,ref:N,onFocus:Oe(f.onFocus,()=>w(!0)),onBlur:Oe(f.onBlur,()=>w(!1)),onClick:Oe(f.onClick,()=>{C.current!=="mouse"&&R()}),onPointerUp:Oe(f.onPointerUp,()=>{C.current==="mouse"&&R()}),onPointerDown:Oe(f.onPointerDown,j=>{C.current=j.pointerType}),onPointerMove:Oe(f.onPointerMove,j=>{var P;C.current=j.pointerType,l?(P=g.onItemLeave)==null||P.call(g):C.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(f.onPointerLeave,j=>{var P;j.currentTarget===document.activeElement&&((P=g.onItemLeave)==null||P.call(g))}),onKeyDown:Oe(f.onKeyDown,j=>{var A;((A=g.searchRef)==null?void 0:A.current)!==""&&j.key===" "||(WE.includes(j.key)&&R(),j.key===" "&&j.preventDefault())})})})})});v0.displayName=rc;var Ua="SelectItemText",x0=m.forwardRef((t,r)=>{const{__scopeSelect:o,className:a,style:l,...c}=t,f=io(Ua,o),h=lo(Ua,o),g=y0(Ua,o),y=qE(Ua,o),[x,b]=m.useState(null),k=Ze(r,R=>b(R),g.onItemTextChange,R=>{var j;return(j=h.itemTextRefCallback)==null?void 0:j.call(h,R,g.value,g.disabled)}),w=x==null?void 0:x.textContent,N=m.useMemo(()=>u.jsx("option",{value:g.value,disabled:g.disabled,children:w},g.value),[g.disabled,g.value,w]),{onNativeOptionAdd:v,onNativeOptionRemove:C}=y;return Et(()=>(v(N),()=>C(N)),[v,C,N]),u.jsxs(u.Fragment,{children:[u.jsx(Be.span,{id:g.textId,...c,ref:k}),g.isSelected&&f.valueNode&&!f.valueNodeHasChildren?ri.createPortal(c.children,f.valueNode):null]})});x0.displayName=Ua;var w0="SelectItemIndicator",b0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t;return y0(w0,o).isSelected?u.jsx(Be.span,{"aria-hidden":!0,...a,ref:r}):null});b0.displayName=w0;var af="SelectScrollUpButton",S0=m.forwardRef((t,r)=>{const o=lo(af,t.__scopeSelect),a=Kf(af,t.__scopeSelect),[l,c]=m.useState(!1),f=Ze(r,a.onScrollButtonChange);return Et(()=>{if(o.viewport&&o.isPositioned){let h=function(){const y=g.scrollTop>0;c(y)};const g=o.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),l?u.jsx(C0,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=o;h&&g&&(h.scrollTop=h.scrollTop-g.offsetHeight)}}):null});S0.displayName=af;var lf="SelectScrollDownButton",k0=m.forwardRef((t,r)=>{const o=lo(lf,t.__scopeSelect),a=Kf(lf,t.__scopeSelect),[l,c]=m.useState(!1),f=Ze(r,a.onScrollButtonChange);return Et(()=>{if(o.viewport&&o.isPositioned){let h=function(){const y=g.scrollHeight-g.clientHeight,x=Math.ceil(g.scrollTop)<y;c(x)};const g=o.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),l?u.jsx(C0,{...t,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=o;h&&g&&(h.scrollTop=h.scrollTop+g.offsetHeight)}}):null});k0.displayName=lf;var C0=m.forwardRef((t,r)=>{const{__scopeSelect:o,onAutoScroll:a,...l}=t,c=lo("SelectScrollButton",o),f=m.useRef(null),h=vc(o),g=m.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return m.useEffect(()=>()=>g(),[g]),Et(()=>{var x;const y=h().find(b=>b.ref.current===document.activeElement);(x=y==null?void 0:y.ref.current)==null||x.scrollIntoView({block:"nearest"})},[h]),u.jsx(Be.div,{"aria-hidden":!0,...l,ref:r,style:{flexShrink:0,...l.style},onPointerDown:Oe(l.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(a,50))}),onPointerMove:Oe(l.onPointerMove,()=>{var y;(y=c.onItemLeave)==null||y.call(c),f.current===null&&(f.current=window.setInterval(a,50))}),onPointerLeave:Oe(l.onPointerLeave,()=>{g()})})}),aN="SelectSeparator",E0=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t;return u.jsx(Be.div,{"aria-hidden":!0,...a,ref:r})});E0.displayName=aN;var cf="SelectArrow",iN=m.forwardRef((t,r)=>{const{__scopeSelect:o,...a}=t,l=xc(o),c=io(cf,o),f=lo(cf,o);return c.open&&f.position==="popper"?u.jsx(Wv,{...l,...a,ref:r}):null});iN.displayName=cf;var lN="SelectBubbleInput",N0=m.forwardRef(({__scopeSelect:t,value:r,...o},a)=>{const l=m.useRef(null),c=Ze(a,l),f=tE(r);return m.useEffect(()=>{const h=l.current;if(!h)return;const g=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(g,"value").set;if(f!==r&&x){const b=new Event("change",{bubbles:!0});x.call(h,r),h.dispatchEvent(b)}},[f,r]),u.jsx(Be.select,{...o,style:{...Vv,...o.style},ref:c,defaultValue:r})});N0.displayName=lN;function P0(t){return t===""||t===void 0}function R0(t){const r=_o(t),o=m.useRef(""),a=m.useRef(0),l=m.useCallback(f=>{const h=o.current+f;r(h),(function g(y){o.current=y,window.clearTimeout(a.current),y!==""&&(a.current=window.setTimeout(()=>g(""),1e3))})(h)},[r]),c=m.useCallback(()=>{o.current="",window.clearTimeout(a.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(a.current),[]),[o,l,c]}function j0(t,r,o){const l=r.length>1&&Array.from(r).every(y=>y===r[0])?r[0]:r,c=o?t.indexOf(o):-1;let f=cN(t,Math.max(c,0));l.length===1&&(f=f.filter(y=>y!==o));const g=f.find(y=>y.textValue.toLowerCase().startsWith(l.toLowerCase()));return g!==o?g:void 0}function cN(t,r){return t.map((o,a)=>t[(r+a)%t.length])}var uN=n0,T0=o0,dN=a0,fN=i0,hN=l0,M0=c0,pN=h0,I0=g0,A0=v0,mN=x0,gN=b0,L0=S0,z0=k0,D0=E0;const so=uN,Bo=dN,vr=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(T0,{ref:a,className:me("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white",t),...o,children:[r,u.jsx(fN,{asChild:!0,children:u.jsx(av,{className:"h-4 w-4 opacity-50"})})]}));vr.displayName=T0.displayName;const O0=m.forwardRef(({className:t,...r},o)=>u.jsx(L0,{ref:o,className:me("flex cursor-default items-center justify-center py-1",t),...r,children:u.jsx(Rk,{className:"h-4 w-4"})}));O0.displayName=L0.displayName;const _0=m.forwardRef(({className:t,...r},o)=>u.jsx(z0,{ref:o,className:me("flex cursor-default items-center justify-center py-1",t),...r,children:u.jsx(av,{className:"h-4 w-4"})}));_0.displayName=z0.displayName;const xr=m.forwardRef(({className:t,children:r,position:o="popper",...a},l)=>u.jsx(hN,{children:u.jsxs(M0,{ref:l,className:me("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...a,children:[u.jsx(O0,{}),u.jsx(pN,{className:me("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),u.jsx(_0,{})]})}));xr.displayName=M0.displayName;const yN=m.forwardRef(({className:t,...r},o)=>u.jsx(I0,{ref:o,className:me("px-2 py-1.5 text-sm font-semibold",t),...r}));yN.displayName=I0.displayName;const Ct=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(A0,{ref:a,className:me("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100",t),...o,children:[u.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(gN,{children:u.jsx(Pk,{className:"h-4 w-4"})})}),u.jsx(mN,{children:r})]}));Ct.displayName=A0.displayName;const vN=m.forwardRef(({className:t,...r},o)=>u.jsx(D0,{ref:o,className:me("-mx-1 my-1 h-px bg-muted",t),...r}));vN.displayName=D0.displayName;function xN(){var f;const t=lc(),{language:r,setLanguage:o}=tC(),a=((f=ug.find(h=>h.value===r))==null?void 0:f.label)??r,l=h=>{r!==h&&(o(h),window.location.reload())},c=[{target:"/model",label:E("model"),icon:Tk},{target:"/providers",label:E("providers"),icon:dv},{target:"/channels",label:E("channels"),icon:Lf},{target:"/runtime",label:E("runtime"),icon:Lk},{target:"/sessions",label:E("sessions"),icon:Dk},{target:"/cron",label:E("cron"),icon:rv},{target:"/marketplace",label:E("marketplace"),icon:Qk}];return u.jsxs("aside",{className:"w-[240px] shrink-0 flex flex-col h-full py-6 px-4 bg-[#e9ecf3]",children:[u.jsx("div",{className:"px-2 mb-8",children:u.jsxs("div",{className:"flex items-center gap-2.5 cursor-pointer",children:[u.jsx("div",{className:"h-7 w-7 rounded-lg overflow-hidden flex items-center justify-center",children:u.jsx("img",{src:"/logo.svg",alt:"NextClaw",className:"h-full w-full object-contain"})}),u.jsx("span",{className:"text-[15px] font-semibold text-gray-800 tracking-[-0.01em]",children:"NextClaw"})]})}),u.jsx("nav",{className:"flex-1",children:u.jsx("ul",{className:"space-y-1",children:c.map(h=>{const g=h.icon;return u.jsx("li",{children:u.jsx(Ay,{to:h.target,className:({isActive:y})=>me("group w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] font-medium transition-all duration-base",y?"bg-primary/10 text-primary font-semibold":"text-gray-600 hover:bg-[#e4e7ef] hover:text-gray-800"),children:({isActive:y})=>u.jsxs(u.Fragment,{children:[u.jsx(g,{className:me("h-[17px] w-[17px] transition-colors",y?"text-primary":"text-gray-400")}),u.jsx("span",{className:"flex-1 text-left",children:h.label})]})})},h.target)})})}),u.jsxs("div",{className:"pt-3 border-t border-[#dde0ea] mt-3",children:[u.jsx("div",{className:"mb-2",children:u.jsxs(so,{value:r,onValueChange:h=>l(h),children:[u.jsxs(vr,{className:"w-full h-auto rounded-xl border-0 bg-transparent shadow-none px-3 py-2.5 text-[14px] font-medium text-gray-600 hover:bg-[#e4e7ef] focus:ring-0",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u.jsx(Ok,{className:"h-[17px] w-[17px] text-gray-400"}),u.jsx("span",{className:"text-left",children:E("language")})]}),u.jsx("span",{className:"ml-auto text-xs text-gray-500",children:a})]}),u.jsx(xr,{children:ug.map(h=>u.jsx(Ct,{value:h.value,className:"text-xs",children:h.label},h.value))})]})}),u.jsxs("button",{onClick:()=>t.open(),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] font-medium transition-all duration-base text-gray-600 hover:bg-[#e4e7ef] hover:text-gray-800",children:[u.jsx(sv,{className:"h-[17px] w-[17px] text-gray-400"}),u.jsx("span",{className:"flex-1 text-left",children:E("docBrowserHelp")})]})]})]})}function wN({children:t}){const{isOpen:r,mode:o}=lc();return Zk(),u.jsxs("div",{className:"h-screen flex bg-background font-sans text-foreground",children:[u.jsx(xN,{}),u.jsxs("div",{className:"flex-1 flex min-w-0 overflow-hidden relative",children:[u.jsx("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:u.jsx("main",{className:"flex-1 overflow-auto custom-scrollbar p-8",children:u.jsx("div",{className:"max-w-6xl mx-auto animate-fade-in h-full",children:t})})}),r&&o==="docked"&&u.jsx(pg,{})]}),r&&o==="floating"&&u.jsx(pg,{})]})}function bN({children:t}){return u.jsx(Jk,{children:u.jsx(wN,{children:t})})}const Ug=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,$g=qy,SN=(t,r)=>o=>{var a;if((r==null?void 0:r.variants)==null)return $g(t,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:l,defaultVariants:c}=r,f=Object.keys(l).map(y=>{const x=o==null?void 0:o[y],b=c==null?void 0:c[y];if(x===null)return null;const k=Ug(x)||Ug(b);return l[y][k]}),h=o&&Object.entries(o).reduce((y,x)=>{let[b,k]=x;return k===void 0||(y[b]=k),y},{}),g=r==null||(a=r.compoundVariants)===null||a===void 0?void 0:a.reduce((y,x)=>{let{class:b,className:k,...w}=x;return Object.entries(w).every(N=>{let[v,C]=N;return Array.isArray(C)?C.includes({...c,...h}[v]):{...c,...h}[v]===C})?[...y,b,k]:y},[]);return $g(t,f,g,o==null?void 0:o.class,o==null?void 0:o.className)},kN=SN("inline-flex items-center justify-center whitespace-nowrap rounded-xl 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-gray-200 bg-white hover:bg-gray-50 hover:text-gray-800 text-gray-600",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200/80",ghost:"hover:bg-gray-100/80 hover:text-gray-800",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-gray-100 text-gray-600 hover:bg-gray-200/80","primary-outline":"border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-lg px-3 text-xs",lg:"h-11 rounded-xl px-5 text-[14px]",xl:"h-12 rounded-2xl px-6 text-[15px]",icon:"h-9 w-9 rounded-xl"}},defaultVariants:{variant:"default",size:"default"}}),Ve=m.forwardRef(({className:t,variant:r,size:o,...a},l)=>u.jsx("button",{className:me(kN({variant:r,size:o,className:t})),ref:l,...a}));Ve.displayName="Button";const zo=m.forwardRef(({className:t,hover:r=!0,...o},a)=>u.jsx("div",{ref:a,className:me("rounded-2xl border border-gray-200/50 bg-white text-card-foreground shadow-card transition-all duration-base",r&&"hover:shadow-card-hover hover:border-gray-200",t),...o}));zo.displayName="Card";const $l=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:me("flex flex-col space-y-1.5 p-6",t),...r}));$l.displayName="CardHeader";const Bl=m.forwardRef(({className:t,...r},o)=>u.jsx("h3",{ref:o,className:me("text-[15px] font-semibold leading-tight tracking-tight text-gray-900",t),...r}));Bl.displayName="CardTitle";const Hl=m.forwardRef(({className:t,...r},o)=>u.jsx("p",{ref:o,className:me("text-[13px] text-gray-400 leading-relaxed",t),...r}));Hl.displayName="CardDescription";const Ba=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:me("p-6 pt-0",t),...r}));Ba.displayName="CardContent";const CN=m.forwardRef(({className:t,...r},o)=>u.jsx("div",{ref:o,className:me("flex items-center justify-between p-6 pt-0",t),...r}));CN.displayName="CardFooter";const We=m.forwardRef(({className:t,type:r,...o},a)=>u.jsx("input",{type:r,className:me("flex h-9 w-full rounded-xl border border-gray-200/80 bg-white px-3.5 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-primary/40 focus:border-primary/40 transition-colors disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...o}));We.displayName="Input";const fr=m.forwardRef(({className:t,...r},o)=>u.jsx("label",{ref:o,className:me("text-sm font-medium leading-none text-gray-700 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...r}));fr.displayName="Label";function xn({className:t,...r}){return u.jsx("div",{className:me("animate-pulse rounded-md bg-slate-200",t),...r})}const EN="http://127.0.0.1:18791",Wl=(()=>{var t;return typeof window<"u"&&((t=window.location)!=null&&t.origin)?window.location.origin:EN})();async function Ml(t,r={}){const o=`${Wl}${t}`,a=await fetch(o,{headers:{"Content-Type":"application/json",...r.headers},...r}),l=await a.text();let c=null;if(l)try{c=JSON.parse(l)}catch{}if(!c){const f=l?l.slice(0,200):"";return{ok:!1,error:{code:"INVALID_RESPONSE",message:`Non-JSON response (${a.status} ${a.statusText})${f?`: ${f}`:""}`}}}return a.ok,c}const at={get:t=>Ml(t,{method:"GET"}),put:(t,r)=>Ml(t,{method:"PUT",body:JSON.stringify(r)}),post:(t,r)=>Ml(t,{method:"POST",body:JSON.stringify(r)}),delete:t=>Ml(t,{method:"DELETE"})};async function NN(){const t=await at.get("/api/config");if(!t.ok)throw new Error(t.error.message);return t.data}async function PN(){const t=await at.get("/api/config/meta");if(!t.ok)throw new Error(t.error.message);return t.data}async function RN(){const t=await at.get("/api/config/schema");if(!t.ok)throw new Error(t.error.message);return t.data}async function jN(t){const r=await at.put("/api/config/model",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function TN(t,r){const o=await at.put(`/api/config/providers/${t}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function MN(t,r){const o=await at.put(`/api/config/channels/${t}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function IN(t){const r=await at.put("/api/config/runtime",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function AN(t,r){const o=await at.post(`/api/config/actions/${t}/execute`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function LN(t){var l;const r=new URLSearchParams;(l=t==null?void 0:t.q)!=null&&l.trim()&&r.set("q",t.q.trim()),typeof(t==null?void 0:t.limit)=="number"&&Number.isFinite(t.limit)&&r.set("limit",String(Math.max(0,Math.trunc(t.limit)))),typeof(t==null?void 0:t.activeMinutes)=="number"&&Number.isFinite(t.activeMinutes)&&r.set("activeMinutes",String(Math.max(0,Math.trunc(t.activeMinutes))));const o=r.toString(),a=await at.get(o?"/api/sessions?"+o:"/api/sessions");if(!a.ok)throw new Error(a.error.message);return a.data}async function zN(t,r=200){const o=await at.get(`/api/sessions/${encodeURIComponent(t)}/history?limit=${Math.max(1,Math.trunc(r))}`);if(!o.ok)throw new Error(o.error.message);return o.data}async function DN(t,r){const o=await at.put(`/api/sessions/${encodeURIComponent(t)}`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function ON(t){const r=await at.delete(`/api/sessions/${encodeURIComponent(t)}`);if(!r.ok)throw new Error(r.error.message);return r.data}async function _N(t){const r=new URLSearchParams;t!=null&&t.all&&r.set("all","1");const o=r.toString(),a=await at.get(o?"/api/cron?"+o:"/api/cron");if(!a.ok)throw new Error(a.error.message);return a.data}async function FN(t){const r=await at.delete(`/api/cron/${encodeURIComponent(t)}`);if(!r.ok)throw new Error(r.error.message);return r.data}async function UN(t,r){const o=await at.put(`/api/cron/${encodeURIComponent(t)}/enable`,r);if(!o.ok)throw new Error(o.error.message);return o.data}async function $N(t,r){const o=await at.post(`/api/cron/${encodeURIComponent(t)}/run`,r);if(!o.ok)throw new Error(o.error.message);return o.data}var BN=t=>{switch(t){case"success":return VN;case"info":return QN;case"warning":return KN;case"error":return qN;default:return null}},HN=Array(12).fill(0),WN=({visible:t,className:r})=>ae.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":t},ae.createElement("div",{className:"sonner-spinner"},HN.map((o,a)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),VN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),KN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),QN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),qN=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),GN=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YN=()=>{let[t,r]=ae.useState(document.hidden);return ae.useEffect(()=>{let o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),t},uf=1,XN=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:o,...a}=t,l=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:uf++,c=this.toasts.find(h=>h.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:o}),{...h,...t,id:l,dismissible:f,title:o}):h):this.addToast({title:o,...a,dismissible:f,id:l}),l},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:t,dismiss:!0})),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let a=t instanceof Promise?t:t(),l=o!==void 0,c,f=a.then(async g=>{if(c=["resolve",g],ae.isValidElement(g))l=!1,this.create({id:o,type:"default",message:g});else if(ZN(g)&&!g.ok){l=!1;let y=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,x=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description;this.create({id:o,type:"error",message:y,description:x})}else if(r.success!==void 0){l=!1;let y=typeof r.success=="function"?await r.success(g):r.success,x=typeof r.description=="function"?await r.description(g):r.description;this.create({id:o,type:"success",message:y,description:x})}}).catch(async g=>{if(c=["reject",g],r.error!==void 0){l=!1;let y=typeof r.error=="function"?await r.error(g):r.error,x=typeof r.description=="function"?await r.description(g):r.description;this.create({id:o,type:"error",message:y,description:x})}}).finally(()=>{var g;l&&(this.dismiss(o),o=void 0),(g=r.finally)==null||g.call(r)}),h=()=>new Promise((g,y)=>f.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:h}:Object.assign(o,{unwrap:h})},this.custom=(t,r)=>{let o=(r==null?void 0:r.id)||uf++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Bt=new XN,JN=(t,r)=>{let o=(r==null?void 0:r.id)||uf++;return Bt.addToast({title:t,...r,id:o}),o},ZN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",eP=JN,tP=()=>Bt.toasts,nP=()=>Bt.getActiveToasts(),Ue=Object.assign(eP,{success:Bt.success,info:Bt.info,warning:Bt.warning,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss,loading:Bt.loading},{getHistory:tP,getToasts:nP});function rP(t,{insertAt:r}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}rP(`: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%)}
337
+ `);function Il(t){return t.label!==void 0}var oP=3,sP="32px",aP="16px",Bg=4e3,iP=356,lP=14,cP=20,uP=200;function wn(...t){return t.filter(Boolean).join(" ")}function dP(t){let[r,o]=t.split("-"),a=[];return r&&a.push(r),o&&a.push(o),a}var fP=t=>{var r,o,a,l,c,f,h,g,y,x,b;let{invert:k,toast:w,unstyled:N,interacting:v,setHeights:C,visibleToasts:R,heights:j,index:P,toasts:A,expanded:$,removeToast:B,defaultRichColors:W,closeButton:X,style:H,cancelButtonStyle:Y,actionButtonStyle:_,className:O="",descriptionClassName:Z="",duration:ee,position:G,gap:ie,loadingIcon:ce,expandByDefault:K,classNames:q,icons:Q,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:F}=t,[le,J]=ae.useState(null),[ue,xe]=ae.useState(null),[ne,he]=ae.useState(!1),[be,Ce]=ae.useState(!1),[Te,Ie]=ae.useState(!1),[nt,vt]=ae.useState(!1),[Rn,ln]=ae.useState(!1),[cn,br]=ae.useState(0),[jn,Sr]=ae.useState(0),Xt=ae.useRef(w.duration||ee||Bg),Ko=ae.useRef(null),Tn=ae.useRef(null),li=P===0,ci=P+1<=R,Nt=w.type,Mn=w.dismissible!==!1,Qo=w.className||"",ui=w.descriptionClassName||"",In=ae.useMemo(()=>j.findIndex(Ne=>Ne.toastId===w.id)||0,[j,w.id]),co=ae.useMemo(()=>{var Ne;return(Ne=w.closeButton)!=null?Ne:X},[w.closeButton,X]),di=ae.useMemo(()=>w.duration||ee||Bg,[w.duration,ee]),qo=ae.useRef(0),Xn=ae.useRef(0),fi=ae.useRef(0),An=ae.useRef(null),[Zs,ea]=G.split("-"),Go=ae.useMemo(()=>j.reduce((Ne,De,$e)=>$e>=In?Ne:Ne+De.height,0),[j,In]),Yo=YN(),kr=w.invert||k,Ln=Nt==="loading";Xn.current=ae.useMemo(()=>In*ie+Go,[In,Go]),ae.useEffect(()=>{Xt.current=di},[di]),ae.useEffect(()=>{he(!0)},[]),ae.useEffect(()=>{let Ne=Tn.current;if(Ne){let De=Ne.getBoundingClientRect().height;return Sr(De),C($e=>[{toastId:w.id,height:De,position:w.position},...$e]),()=>C($e=>$e.filter(Pt=>Pt.toastId!==w.id))}},[C,w.id]),ae.useLayoutEffect(()=>{if(!ne)return;let Ne=Tn.current,De=Ne.style.height;Ne.style.height="auto";let $e=Ne.getBoundingClientRect().height;Ne.style.height=De,Sr($e),C(Pt=>Pt.find(It=>It.toastId===w.id)?Pt.map(It=>It.toastId===w.id?{...It,height:$e}:It):[{toastId:w.id,height:$e,position:w.position},...Pt])},[ne,w.title,w.description,C,w.id]);let un=ae.useCallback(()=>{Ce(!0),br(Xn.current),C(Ne=>Ne.filter(De=>De.toastId!==w.id)),setTimeout(()=>{B(w)},uP)},[w,B,C,Xn]);ae.useEffect(()=>{if(w.promise&&Nt==="loading"||w.duration===1/0||w.type==="loading")return;let Ne;return $||v||F&&Yo?(()=>{if(fi.current<qo.current){let De=new Date().getTime()-qo.current;Xt.current=Xt.current-De}fi.current=new Date().getTime()})():Xt.current!==1/0&&(qo.current=new Date().getTime(),Ne=setTimeout(()=>{var De;(De=w.onAutoClose)==null||De.call(w,w),un()},Xt.current)),()=>clearTimeout(Ne)},[$,v,w,Nt,F,Yo,un]),ae.useEffect(()=>{w.delete&&un()},[un,w.delete]);function hi(){var Ne,De,$e;return Q!=null&&Q.loading?ae.createElement("div",{className:wn(q==null?void 0:q.loader,(Ne=w==null?void 0:w.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":Nt==="loading"},Q.loading):ce?ae.createElement("div",{className:wn(q==null?void 0:q.loader,(De=w==null?void 0:w.classNames)==null?void 0:De.loader,"sonner-loader"),"data-visible":Nt==="loading"},ce):ae.createElement(WN,{className:wn(q==null?void 0:q.loader,($e=w==null?void 0:w.classNames)==null?void 0:$e.loader),visible:Nt==="loading"})}return ae.createElement("li",{tabIndex:0,ref:Tn,className:wn(O,Qo,q==null?void 0:q.toast,(r=w==null?void 0:w.classNames)==null?void 0:r.toast,q==null?void 0:q.default,q==null?void 0:q[Nt],(o=w==null?void 0:w.classNames)==null?void 0:o[Nt]),"data-sonner-toast":"","data-rich-colors":(a=w.richColors)!=null?a:W,"data-styled":!(w.jsx||w.unstyled||N),"data-mounted":ne,"data-promise":!!w.promise,"data-swiped":Rn,"data-removed":be,"data-visible":ci,"data-y-position":Zs,"data-x-position":ea,"data-index":P,"data-front":li,"data-swiping":Te,"data-dismissible":Mn,"data-type":Nt,"data-invert":kr,"data-swipe-out":nt,"data-swipe-direction":ue,"data-expanded":!!($||K&&ne),style:{"--index":P,"--toasts-before":P,"--z-index":A.length-P,"--offset":`${be?cn:Xn.current}px`,"--initial-height":K?"auto":`${jn}px`,...H,...w.style},onDragEnd:()=>{Ie(!1),J(null),An.current=null},onPointerDown:Ne=>{Ln||!Mn||(Ko.current=new Date,br(Xn.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Ie(!0),An.current={x:Ne.clientX,y:Ne.clientY}))},onPointerUp:()=>{var Ne,De,$e,Pt;if(nt||!Mn)return;An.current=null;let It=Number(((Ne=Tn.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),At=Number(((De=Tn.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-(($e=Ko.current)==null?void 0:$e.getTime()),pt=le==="x"?It:At,zn=Math.abs(pt)/dn;if(Math.abs(pt)>=cP||zn>.11){br(Xn.current),(Pt=w.onDismiss)==null||Pt.call(w,w),xe(le==="x"?It>0?"right":"left":At>0?"down":"up"),un(),vt(!0),ln(!1);return}Ie(!1),J(null)},onPointerMove:Ne=>{var De,$e,Pt,It;if(!An.current||!Mn||((De=window.getSelection())==null?void 0:De.toString().length)>0)return;let At=Ne.clientY-An.current.y,dn=Ne.clientX-An.current.x,pt=($e=t.swipeDirections)!=null?$e:dP(G);!le&&(Math.abs(dn)>1||Math.abs(At)>1)&&J(Math.abs(dn)>Math.abs(At)?"x":"y");let zn={x:0,y:0};le==="y"?(pt.includes("top")||pt.includes("bottom"))&&(pt.includes("top")&&At<0||pt.includes("bottom")&&At>0)&&(zn.y=At):le==="x"&&(pt.includes("left")||pt.includes("right"))&&(pt.includes("left")&&dn<0||pt.includes("right")&&dn>0)&&(zn.x=dn),(Math.abs(zn.x)>0||Math.abs(zn.y)>0)&&ln(!0),(Pt=Tn.current)==null||Pt.style.setProperty("--swipe-amount-x",`${zn.x}px`),(It=Tn.current)==null||It.style.setProperty("--swipe-amount-y",`${zn.y}px`)}},co&&!w.jsx?ae.createElement("button",{"aria-label":M,"data-disabled":Ln,"data-close-button":!0,onClick:Ln||!Mn?()=>{}:()=>{var Ne;un(),(Ne=w.onDismiss)==null||Ne.call(w,w)},className:wn(q==null?void 0:q.closeButton,(l=w==null?void 0:w.classNames)==null?void 0:l.closeButton)},(c=Q==null?void 0:Q.close)!=null?c:GN):null,w.jsx||m.isValidElement(w.title)?w.jsx?w.jsx:typeof w.title=="function"?w.title():w.title:ae.createElement(ae.Fragment,null,Nt||w.icon||w.promise?ae.createElement("div",{"data-icon":"",className:wn(q==null?void 0:q.icon,(f=w==null?void 0:w.classNames)==null?void 0:f.icon)},w.promise||w.type==="loading"&&!w.icon?w.icon||hi():null,w.type!=="loading"?w.icon||(Q==null?void 0:Q[Nt])||BN(Nt):null):null,ae.createElement("div",{"data-content":"",className:wn(q==null?void 0:q.content,(h=w==null?void 0:w.classNames)==null?void 0:h.content)},ae.createElement("div",{"data-title":"",className:wn(q==null?void 0:q.title,(g=w==null?void 0:w.classNames)==null?void 0:g.title)},typeof w.title=="function"?w.title():w.title),w.description?ae.createElement("div",{"data-description":"",className:wn(Z,ui,q==null?void 0:q.description,(y=w==null?void 0:w.classNames)==null?void 0:y.description)},typeof w.description=="function"?w.description():w.description):null),m.isValidElement(w.cancel)?w.cancel:w.cancel&&Il(w.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:w.cancelButtonStyle||Y,onClick:Ne=>{var De,$e;Il(w.cancel)&&Mn&&(($e=(De=w.cancel).onClick)==null||$e.call(De,Ne),un())},className:wn(q==null?void 0:q.cancelButton,(x=w==null?void 0:w.classNames)==null?void 0:x.cancelButton)},w.cancel.label):null,m.isValidElement(w.action)?w.action:w.action&&Il(w.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:w.actionButtonStyle||_,onClick:Ne=>{var De,$e;Il(w.action)&&(($e=(De=w.action).onClick)==null||$e.call(De,Ne),!Ne.defaultPrevented&&un())},className:wn(q==null?void 0:q.actionButton,(b=w==null?void 0:w.classNames)==null?void 0:b.actionButton)},w.action.label):null))};function Hg(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function hP(t,r){let o={};return[t,r].forEach((a,l)=>{let c=l===1,f=c?"--mobile-offset":"--offset",h=c?aP:sP;function g(y){["top","right","bottom","left"].forEach(x=>{o[`${f}-${x}`]=typeof y=="number"?`${y}px`:y})}typeof a=="number"||typeof a=="string"?g(a):typeof a=="object"?["top","right","bottom","left"].forEach(y=>{a[y]===void 0?o[`${f}-${y}`]=h:o[`${f}-${y}`]=typeof a[y]=="number"?`${a[y]}px`:a[y]}):g(h)}),o}var pP=m.forwardRef(function(t,r){let{invert:o,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:h,offset:g,mobileOffset:y,theme:x="light",richColors:b,duration:k,style:w,visibleToasts:N=oP,toastOptions:v,dir:C=Hg(),gap:R=lP,loadingIcon:j,icons:P,containerAriaLabel:A="Notifications",pauseWhenPageIsHidden:$}=t,[B,W]=ae.useState([]),X=ae.useMemo(()=>Array.from(new Set([a].concat(B.filter(F=>F.position).map(F=>F.position)))),[B,a]),[H,Y]=ae.useState([]),[_,O]=ae.useState(!1),[Z,ee]=ae.useState(!1),[G,ie]=ae.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ce=ae.useRef(null),K=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=ae.useRef(null),Q=ae.useRef(!1),M=ae.useCallback(F=>{W(le=>{var J;return(J=le.find(ue=>ue.id===F.id))!=null&&J.delete||Bt.dismiss(F.id),le.filter(({id:ue})=>ue!==F.id)})},[]);return ae.useEffect(()=>Bt.subscribe(F=>{if(F.dismiss){W(le=>le.map(J=>J.id===F.id?{...J,delete:!0}:J));return}setTimeout(()=>{zy.flushSync(()=>{W(le=>{let J=le.findIndex(ue=>ue.id===F.id);return J!==-1?[...le.slice(0,J),{...le[J],...F},...le.slice(J+1)]:[F,...le]})})})}),[]),ae.useEffect(()=>{if(x!=="system"){ie(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:le})=>{ie(le?"dark":"light")})}catch{F.addListener(({matches:J})=>{try{ie(J?"dark":"light")}catch(ue){console.error(ue)}})}},[x]),ae.useEffect(()=>{B.length<=1&&O(!1)},[B]),ae.useEffect(()=>{let F=le=>{var J,ue;l.every(xe=>le[xe]||le.code===xe)&&(O(!0),(J=ce.current)==null||J.focus()),le.code==="Escape"&&(document.activeElement===ce.current||(ue=ce.current)!=null&&ue.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[l]),ae.useEffect(()=>{if(ce.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,Q.current=!1)}},[ce.current]),ae.createElement("section",{ref:r,"aria-label":`${A} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},X.map((F,le)=>{var J;let[ue,xe]=F.split("-");return B.length?ae.createElement("ol",{key:F,dir:C==="auto"?Hg():C,tabIndex:-1,ref:ce,className:h,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":ue,"data-lifted":_&&B.length>1&&!c,"data-x-position":xe,style:{"--front-toast-height":`${((J=H[0])==null?void 0:J.height)||0}px`,"--width":`${iP}px`,"--gap":`${R}px`,...w,...hP(g,y)},onBlur:ne=>{Q.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(Q.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,q.current=ne.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Z||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},B.filter(ne=>!ne.position&&le===0||ne.position===F).map((ne,he)=>{var be,Ce;return ae.createElement(fP,{key:ne.id,icons:P,index:he,toast:ne,defaultRichColors:b,duration:(be=v==null?void 0:v.duration)!=null?be:k,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:N,closeButton:(Ce=v==null?void 0:v.closeButton)!=null?Ce:f,interacting:Z,position:F,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:M,toasts:B.filter(Te=>Te.position==ne.position),heights:H.filter(Te=>Te.position==ne.position),setHeights:Y,expandByDefault:c,gap:R,loadingIcon:j,expanded:_,pauseWhenPageIsHidden:$,swipeDirections:t.swipeDirections})})):null}))});function Ys(){return ao({queryKey:["config"],queryFn:NN,staleTime:3e4,refetchOnWindowFocus:!0})}function Qf(){return ao({queryKey:["config-meta"],queryFn:PN,staleTime:1/0})}function Xs(){return ao({queryKey:["config-schema"],queryFn:RN,staleTime:1/0})}function mP(){const t=Yt();return an({mutationFn:jN,onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSaved"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function gP(){const t=Yt();return an({mutationFn:({provider:r,data:o})=>TN(r,o),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSaved"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function yP(){const t=Yt();return an({mutationFn:({channel:r,data:o})=>MN(r,o),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function vP(){const t=Yt();return an({mutationFn:({data:r})=>IN(r),onSuccess:()=>{t.invalidateQueries({queryKey:["config"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function xP(){return an({mutationFn:({actionId:t,data:r})=>AN(t,r),onError:t=>{Ue.error(E("error")+": "+t.message)}})}function wP(t){return ao({queryKey:["sessions",t],queryFn:()=>LN(t),staleTime:1e4})}function bP(t,r=200){return ao({queryKey:["session-history",t,r],queryFn:()=>zN(t,r),enabled:!!t,staleTime:5e3})}function SP(){const t=Yt();return an({mutationFn:({key:r,data:o})=>DN(r,o),onSuccess:(r,o)=>{t.invalidateQueries({queryKey:["sessions"]}),t.invalidateQueries({queryKey:["session-history",o.key]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function kP(){const t=Yt();return an({mutationFn:({key:r})=>ON(r),onSuccess:()=>{t.invalidateQueries({queryKey:["sessions"]}),t.invalidateQueries({queryKey:["session-history"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function CP(t={all:!0}){return ao({queryKey:["cron",t],queryFn:()=>_N(t),staleTime:1e4})}function EP(){const t=Yt();return an({mutationFn:({id:r})=>FN(r),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function NP(){const t=Yt();return an({mutationFn:({id:r,enabled:o})=>UN(r,{enabled:o}),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function PP(){const t=Yt();return an({mutationFn:({id:r,force:o})=>$N(r,{force:o}),onSuccess:()=>{t.invalidateQueries({queryKey:["cron"]}),Ue.success(E("configSavedApplied"))},onError:r=>{Ue.error(E("configSaveFailed")+": "+r.message)}})}function RP(t){return Array.isArray(t)?t.filter(r=>typeof r=="string").join("."):t}function yt(t,r){if(!r)return;const o=RP(t),a=r[o];if(a)return a;const l=o.split(".");for(const[c,f]of Object.entries(r)){if(!c.includes("*"))continue;const h=c.split(".");if(h.length!==l.length)continue;let g=!0;for(let y=0;y<l.length;y+=1)if(h[y]!=="*"&&h[y]!==l[y]){g=!1;break}if(g)return f}}function Wo({children:t,fullHeight:r=!1,className:o}){return u.jsx("div",{className:me("animate-fade-in",r?"h-[calc(100vh-80px)] w-full flex flex-col":"pb-16",o),children:t})}function Vo({title:t,description:r,actions:o,className:a}){return u.jsxs("div",{className:me("flex items-center justify-between mb-6 shrink-0",a),children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:t}),r&&u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:r})]}),o&&u.jsx("div",{className:"flex items-center gap-2 shrink-0",children:o})]})}function jP(){const{data:t,isLoading:r}=Ys(),{data:o}=Xs(),a=mP(),[l,c]=m.useState(""),[f,h]=m.useState(""),[g,y]=m.useState(8192),x=o==null?void 0:o.uiHints,b=yt("agents.defaults.model",x),k=yt("agents.defaults.workspace",x),w=yt("agents.defaults.maxTokens",x);m.useEffect(()=>{var v;(v=t==null?void 0:t.agents)!=null&&v.defaults&&(c(t.agents.defaults.model||""),h(t.agents.defaults.workspace||""),y(t.agents.defaults.maxTokens||8192))},[t]);const N=v=>{v.preventDefault(),a.mutate({model:l,maxTokens:g})};return r?u.jsxs("div",{className:"max-w-2xl space-y-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(xn,{className:"h-8 w-32"}),u.jsx(xn,{className:"h-4 w-48"})]}),u.jsxs(zo,{className:"rounded-2xl border-gray-200 p-6",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[u.jsx(xn,{className:"h-12 w-12 rounded-xl"}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(xn,{className:"h-5 w-24"}),u.jsx(xn,{className:"h-3 w-32"})]})]}),u.jsx(xn,{className:"h-4 w-20 mb-2"}),u.jsx(xn,{className:"h-10 w-full rounded-xl"})]}),u.jsxs(zo,{className:"rounded-2xl border-gray-200 p-6",children:[u.jsx(xn,{className:"h-5 w-24 mb-2"}),u.jsx(xn,{className:"h-3 w-40 mb-6"}),u.jsx("div",{className:"space-y-6",children:u.jsxs("div",{children:[u.jsx(xn,{className:"h-4 w-28 mb-3"}),u.jsx(xn,{className:"h-2 w-full rounded-full"})]})})]})]}):u.jsxs(Wo,{children:[u.jsx(Vo,{title:E("modelPageTitle"),description:E("modelPageDescription")}),u.jsxs("form",{onSubmit:N,className:"space-y-8",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(dv,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("defaultModel")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(fr,{htmlFor:"model",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(b==null?void 0:b.label)??"Model Name"}),u.jsx(We,{id:"model",value:l,onChange:v=>c(v.target.value),placeholder:(b==null?void 0:b.placeholder)??"minimax/MiniMax-M2.1",className:"h-12 px-4 rounded-xl"}),u.jsx("p",{className:"text-xs text-gray-400",children:(b==null?void 0:b.help)??"Examples: minimax/MiniMax-M2.5 · minimax/MiniMax-M2.1 · openrouter/anthropic/claude-3.5-sonnet · openrouter/openai/gpt-4o-mini"})]})]}),u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(Ak,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("workspace")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(fr,{htmlFor:"workspace",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(k==null?void 0:k.label)??"Default Path"}),u.jsx(We,{id:"workspace",value:f,onChange:v=>h(v.target.value),placeholder:(k==null?void 0:k.placeholder)??"/path/to/workspace",className:"h-12 px-4 rounded-xl"})]})]})]}),u.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-10",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:u.jsx(Kk,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900",children:E("generationParameters")})]}),u.jsx("div",{className:"grid grid-cols-1 gap-12",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx(fr,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(w==null?void 0:w.label)??E("maxTokens")}),u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:tv(g)})]}),u.jsx("input",{type:"range",min:"1000",max:"32000",step:"1000",value:g,onChange:v=>y(parseInt(v.target.value)),className:"w-full h-1 bg-gray-200 rounded-full appearance-none cursor-pointer accent-primary"})]})})]}),u.jsx("div",{className:"flex justify-end pt-4",children:u.jsx(Ve,{type:"submit",disabled:a.isPending,size:"lg",children:a.isPending?u.jsx(_k,{className:"h-5 w-5 animate-spin"}):E("saveChanges")})})]})]})}const Wg=t=>{let r;const o=new Set,a=(y,x)=>{const b=typeof y=="function"?y(r):y;if(!Object.is(b,r)){const k=r;r=x??(typeof b!="object"||b===null)?b:Object.assign({},r,b),o.forEach(w=>w(r,k))}},l=()=>r,h={setState:a,getState:l,getInitialState:()=>g,subscribe:y=>(o.add(y),()=>o.delete(y))},g=r=t(a,l,h);return h},TP=(t=>t?Wg(t):Wg),MP=t=>t;function IP(t,r=MP){const o=ae.useSyncExternalStore(t.subscribe,ae.useCallback(()=>r(t.getState()),[t,r]),ae.useCallback(()=>r(t.getInitialState()),[t,r]));return ae.useDebugValue(o),o}const Vg=t=>{const r=TP(t),o=a=>IP(r,a);return Object.assign(o,r),o},AP=(t=>t?Vg(t):Vg),ai=AP(t=>({connectionStatus:"disconnected",setConnectionStatus:r=>t({connectionStatus:r}),providerModal:{open:!1},openProviderModal:r=>t({providerModal:{open:!0,provider:r}}),closeProviderModal:()=>t({providerModal:{open:!1}}),channelModal:{open:!1},openChannelModal:r=>t({channelModal:{open:!0,channel:r}}),closeChannelModal:()=>t({channelModal:{open:!1}})}));function LP(t,r){return m.useReducer((o,a)=>r[o][a]??o,t)}var Js=t=>{const{present:r,children:o}=t,a=zP(r),l=typeof o=="function"?o({present:a.isPresent}):m.Children.only(o),c=Ze(a.ref,DP(l));return typeof o=="function"||a.isPresent?m.cloneElement(l,{ref:c}):null};Js.displayName="Presence";function zP(t){const[r,o]=m.useState(),a=m.useRef(null),l=m.useRef(t),c=m.useRef("none"),f=t?"mounted":"unmounted",[h,g]=LP(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const y=Al(a.current);c.current=h==="mounted"?y:"none"},[h]),Et(()=>{const y=a.current,x=l.current;if(x!==t){const k=c.current,w=Al(y);t?g("MOUNT"):w==="none"||(y==null?void 0:y.display)==="none"?g("UNMOUNT"):g(x&&k!==w?"ANIMATION_OUT":"UNMOUNT"),l.current=t}},[t,g]),Et(()=>{if(r){let y;const x=r.ownerDocument.defaultView??window,b=w=>{const v=Al(a.current).includes(CSS.escape(w.animationName));if(w.target===r&&v&&(g("ANIMATION_END"),!l.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",y=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},k=w=>{w.target===r&&(c.current=Al(a.current))};return r.addEventListener("animationstart",k),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{x.clearTimeout(y),r.removeEventListener("animationstart",k),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else g("ANIMATION_END")},[r,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(y=>{a.current=y?getComputedStyle(y):null,o(y)},[])}}function Al(t){return(t==null?void 0:t.animationName)||"none"}function DP(t){var a,l;let r=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var wc="Dialog",[F0]=oi(wc),[OP,Pn]=F0(wc),U0=t=>{const{__scopeDialog:r,children:o,open:a,defaultOpen:l,onOpenChange:c,modal:f=!0}=t,h=m.useRef(null),g=m.useRef(null),[y,x]=nc({prop:a,defaultProp:l??!1,onChange:c,caller:wc});return u.jsx(OP,{scope:r,triggerRef:h,contentRef:g,contentId:Lo(),titleId:Lo(),descriptionId:Lo(),open:y,onOpenChange:x,onOpenToggle:m.useCallback(()=>x(b=>!b),[x]),modal:f,children:o})};U0.displayName=wc;var $0="DialogTrigger",_P=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn($0,o),c=Ze(r,l.triggerRef);return u.jsx(Be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":Yf(l.open),...a,ref:c,onClick:Oe(t.onClick,l.onOpenToggle)})});_P.displayName=$0;var qf="DialogPortal",[FP,B0]=F0(qf,{forceMount:void 0}),H0=t=>{const{__scopeDialog:r,forceMount:o,children:a,container:l}=t,c=Pn(qf,r);return u.jsx(FP,{scope:r,forceMount:o,children:m.Children.map(a,f=>u.jsx(Js,{present:o||c.open,children:u.jsx(mc,{asChild:!0,container:l,children:f})}))})};H0.displayName=qf;var oc="DialogOverlay",W0=m.forwardRef((t,r)=>{const o=B0(oc,t.__scopeDialog),{forceMount:a=o.forceMount,...l}=t,c=Pn(oc,t.__scopeDialog);return c.modal?u.jsx(Js,{present:a||c.open,children:u.jsx($P,{...l,ref:r})}):null});W0.displayName=oc;var UP=Ka("DialogOverlay.RemoveScroll"),$P=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(oc,o);return u.jsx(Vf,{as:UP,allowPinchZoom:!0,shards:[l.contentRef],children:u.jsx(Be.div,{"data-state":Yf(l.open),...a,ref:r,style:{pointerEvents:"auto",...a.style}})})}),Ho="DialogContent",V0=m.forwardRef((t,r)=>{const o=B0(Ho,t.__scopeDialog),{forceMount:a=o.forceMount,...l}=t,c=Pn(Ho,t.__scopeDialog);return u.jsx(Js,{present:a||c.open,children:c.modal?u.jsx(BP,{...l,ref:r}):u.jsx(HP,{...l,ref:r})})});V0.displayName=Ho;var BP=m.forwardRef((t,r)=>{const o=Pn(Ho,t.__scopeDialog),a=m.useRef(null),l=Ze(r,o.contentRef,a);return m.useEffect(()=>{const c=a.current;if(c)return qv(c)},[]),u.jsx(K0,{...t,ref:l,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,c=>{var f;c.preventDefault(),(f=o.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&c.preventDefault()}),onFocusOutside:Oe(t.onFocusOutside,c=>c.preventDefault())})}),HP=m.forwardRef((t,r)=>{const o=Pn(Ho,t.__scopeDialog),a=m.useRef(!1),l=m.useRef(!1);return u.jsx(K0,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,h;(f=t.onCloseAutoFocus)==null||f.call(t,c),c.defaultPrevented||(a.current||(h=o.triggerRef.current)==null||h.focus(),c.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:c=>{var g,y;(g=t.onInteractOutside)==null||g.call(t,c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const f=c.target;((y=o.triggerRef.current)==null?void 0:y.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),K0=m.forwardRef((t,r)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:c,...f}=t,h=Pn(Ho,o),g=m.useRef(null),y=Ze(r,g);return vv(),u.jsxs(u.Fragment,{children:[u.jsx(Df,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:c,children:u.jsx(cc,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":Yf(h.open),...f,ref:y,onDismiss:()=>h.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(WP,{titleId:h.titleId}),u.jsx(KP,{contentRef:g,descriptionId:h.descriptionId})]})]})}),Gf="DialogTitle",Q0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(Gf,o);return u.jsx(Be.h2,{id:l.titleId,...a,ref:r})});Q0.displayName=Gf;var q0="DialogDescription",G0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(q0,o);return u.jsx(Be.p,{id:l.descriptionId,...a,ref:r})});G0.displayName=q0;var Y0="DialogClose",X0=m.forwardRef((t,r)=>{const{__scopeDialog:o,...a}=t,l=Pn(Y0,o);return u.jsx(Be.button,{type:"button",...a,ref:r,onClick:Oe(t.onClick,()=>l.onOpenChange(!1))})});X0.displayName=Y0;function Yf(t){return t?"open":"closed"}var J0="DialogTitleWarning",[bj,Z0]=nC(J0,{contentName:Ho,titleName:Gf,docsSlug:"dialog"}),WP=({titleId:t})=>{const r=Z0(J0),o=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
338
338
 
339
339
  If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
340
340
 
341
- For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return m.useEffect(()=>{t&&(document.getElementById(t)||console.error(o))},[o,t]),null},WP="DialogDescriptionWarning",HP=({contentRef:t,descriptionId:r})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X0(WP).contentName}}.`;return m.useEffect(()=>{var c;const l=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&l&&(document.getElementById(r)||console.warn(a))},[a,t,r]),null},VP=_0,KP=$0,J0=B0,Z0=W0,ex=V0,tx=Q0,QP=G0;const Gf=VP,qP=KP,nx=m.forwardRef(({className:t,...r},o)=>u.jsx(J0,{ref:o,className:ge("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",t),...r}));nx.displayName=J0.displayName;const xc=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(qP,{children:[u.jsx(nx,{}),u.jsxs(Z0,{ref:a,className:ge("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/50 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-2xl",t),...o,children:[r,u.jsxs(QP,{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:[u.jsx(Af,{className:"h-4 w-4 text-gray-500"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xc.displayName=Z0.displayName;const wc=({className:t,...r})=>u.jsx("div",{className:ge("flex flex-col space-y-2 text-center sm:text-left",t),...r});wc.displayName="DialogHeader";const bc=({className:t,...r})=>u.jsx("div",{className:ge("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-3",t),...r});bc.displayName="DialogFooter";const Sc=m.forwardRef(({className:t,...r},o)=>u.jsx(ex,{ref:o,className:ge("text-lg font-semibold leading-tight tracking-tight text-gray-900",t),...r}));Sc.displayName=ex.displayName;const kc=m.forwardRef(({className:t,...r},o)=>u.jsx(tx,{ref:o,className:ge("text-sm text-gray-500 leading-relaxed",t),...r}));kc.displayName=tx.displayName;function GP({maskedValue:t,isSet:r,className:o,...a}){const[l,c]=m.useState(!1);return u.jsxs("div",{className:"relative",children:[u.jsx(He,{type:l?"text":"password",className:ge("pr-20",o),placeholder:r?`${E("apiKeySet")} (${E("unchanged")})`:"",...a}),u.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:(r||t)&&u.jsx(Ve,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>c(!l),children:l?u.jsx(jk,{className:"h-4 w-4"}):u.jsx(Tk,{className:"h-4 w-4"})})})]})}function YP({value:t,onChange:r,className:o}){const a=t?Object.entries(t):[],l=(h,g,y)=>{const x=[...a];x[h]=[g,y],r(Object.fromEntries(x))},c=()=>{r({...t,"":""})},f=h=>{const g=a.filter((y,x)=>x!==h);r(Object.fromEntries(g))};return u.jsxs("div",{className:ge("space-y-2",o),children:[a.map(([h,g],y)=>u.jsxs("div",{className:"flex gap-2",children:[u.jsx(He,{type:"text",value:h,onChange:x=>l(y,x.target.value,g),placeholder:E("headerName"),className:"flex-1"}),u.jsx(He,{type:"text",value:g,onChange:x=>l(y,h,x.target.value),placeholder:E("headerValue"),className:"flex-1"}),u.jsx(Ve,{type:"button",variant:"ghost",size:"icon",onClick:()=>f(y),children:u.jsx(Gl,{className:"h-4 w-4 text-red-500"})})]},y)),u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:c,children:[u.jsx(qd,{className:"h-4 w-4 mr-2"}),E("add")]})]})}function XP(){const{providerModal:t,closeProviderModal:r}=oi(),{data:o}=qs(),{data:a}=Vf(),{data:l}=Gs(),c=pP(),[f,h]=m.useState(""),[g,y]=m.useState(""),[x,b]=m.useState(null),[k,w]=m.useState("auto"),N=t.provider,v=a==null?void 0:a.providers.find(H=>H.name===N),C=N?o==null?void 0:o.providers[N]:null,R=l==null?void 0:l.uiHints,j=N?yt(`providers.${N}.apiKey`,R):void 0,P=N?yt(`providers.${N}.apiBase`,R):void 0,A=N?yt(`providers.${N}.extraHeaders`,R):void 0,$=N?yt(`providers.${N}.wireApi`,R):void 0;m.useEffect(()=>{if(C){y(C.apiBase||(v==null?void 0:v.defaultApiBase)||""),b(C.extraHeaders||null),h("");const H=C.wireApi||(v==null?void 0:v.defaultWireApi)||"auto";w(H)}},[C,v]);const B=H=>{H.preventDefault();const X={};if(f!==""&&(X.apiKey=f),g&&g!==(v==null?void 0:v.defaultApiBase)&&(X.apiBase=g),x&&Object.keys(x).length>0&&(X.extraHeaders=x),v!=null&&v.supportsWireApi){const W=(C==null?void 0:C.wireApi)||v.defaultWireApi||"auto";k!==W&&(X.wireApi=k)}N&&c.mutate({provider:N,data:X},{onSuccess:()=>r()})};return u.jsx(Gf,{open:t.open,onOpenChange:r,children:u.jsxs(xc,{className:"sm:max-w-[500px]",children:[u.jsx(wc,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center",children:u.jsx(ql,{className:"h-5 w-5 text-white"})}),u.jsxs("div",{children:[u.jsx(Sc,{children:(v==null?void 0:v.displayName)||N}),u.jsx(kc,{children:E("providerFormDescription")})]})]})}),u.jsxs("form",{onSubmit:B,className:"flex flex-col pt-2",children:[u.jsxs("div",{className:"space-y-5 max-h-[60vh] overflow-y-auto pr-1",children:[u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"apiKey",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(ql,{className:"h-3.5 w-3.5 text-gray-500"}),(j==null?void 0:j.label)??E("apiKey")]}),u.jsx(GP,{id:"apiKey",value:f,isSet:C==null?void 0:C.apiKeySet,onChange:H=>h(H.target.value),placeholder:C!=null&&C.apiKeySet?E("apiKeySet"):(j==null?void 0:j.placeholder)??E("enterApiKey"),className:"rounded-xl"})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"apiBase",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(av,{className:"h-3.5 w-3.5 text-gray-500"}),(P==null?void 0:P.label)??E("apiBase")]}),u.jsx(He,{id:"apiBase",type:"text",value:g,onChange:H=>y(H.target.value),placeholder:(v==null?void 0:v.defaultApiBase)||(P==null?void 0:P.placeholder)||"https://api.example.com",className:"rounded-xl"}),(P==null?void 0:P.help)&&u.jsx("p",{className:"text-xs text-gray-500",children:P.help})]}),(v==null?void 0:v.supportsWireApi)&&u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"wireApi",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(Ql,{className:"h-3.5 w-3.5 text-gray-500"}),($==null?void 0:$.label)??E("wireApi")]}),u.jsxs(so,{value:k,onValueChange:H=>w(H),children:[u.jsx(vr,{className:"rounded-xl",children:u.jsx(Bo,{})}),u.jsx(xr,{children:(v.wireApiOptions||["auto","chat","responses"]).map(H=>u.jsx(Ct,{value:H,children:E(H==="chat"?"wireApiChat":H==="responses"?"wireApiResponses":"wireApiAuto")},H))})]})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(Ql,{className:"h-3.5 w-3.5 text-gray-500"}),(A==null?void 0:A.label)??E("extraHeaders")]}),u.jsx(YP,{value:x,onChange:b})]})]}),u.jsxs(bc,{className:"pt-4 flex-shrink-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:r,children:E("cancel")}),u.jsx(Ve,{type:"submit",disabled:c.isPending,children:c.isPending?E("saving"):E("save")})]})]})]})})}function Yf({tabs:t,activeTab:r,onChange:o,className:a}){return u.jsx("div",{className:ge("flex items-center gap-6 border-b border-gray-200/60 mb-6",a),children:t.map(l=>{const c=r===l.id;return u.jsxs("button",{onClick:()=>o(l.id),className:ge("relative pb-3 text-[14px] font-medium transition-all duration-fast flex items-center gap-1.5",c?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[l.label,l.count!==void 0&&u.jsx("span",{className:ge("text-[11px] font-medium","text-gray-500"),children:Zy(l.count)}),c&&u.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-primary rounded-full"})]},l.id)})})}function rx({name:t,src:r,className:o,imgClassName:a,fallback:l}){const[c,f]=m.useState(!1),h=!!r&&!c;return u.jsx("div",{className:ge("flex items-center justify-center",o),children:h?u.jsx("img",{src:r,alt:`${t} logo`,className:ge("h-6 w-6 object-contain",a),onError:()=>f(!0),draggable:!1}):l??u.jsx("span",{className:"text-lg font-bold uppercase",children:t.slice(0,1)})})}const JP={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"},ZP={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 ox(t,r){const o=r.toLowerCase(),a=t[o];return a?`/logos/${a}`:null}function eR(t){return ox(JP,t)}function tR(t){return ox(ZP,t)}function sx({children:t,onClick:r,className:o}){return u.jsx("div",{onClick:r,className:ge("group relative flex flex-col p-6 rounded-2xl border border-gray-200/50 bg-white shadow-sm","transition-all duration-base cursor-pointer","hover:shadow-md hover:border-gray-200",o),children:t})}function ax({children:t,className:r}){return u.jsx("div",{className:ge("flex items-start justify-between mb-4",r),children:t})}function ix({title:t,description:r,className:o}){return u.jsxs("div",{className:ge("flex-1",o),children:[u.jsx("h3",{className:"text-[14px] font-bold text-gray-900 mb-0.5",children:t}),r&&u.jsx("p",{className:"text-[12px] text-gray-400 leading-relaxed line-clamp-2",children:r})]})}function lx({children:t,className:r}){return u.jsx("div",{className:ge("mt-4 pt-3 flex items-center justify-between",r),children:t})}const nR={active:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},ready:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},inactive:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},setup:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},warning:{dot:"bg-amber-400",text:"text-amber-600",bg:"bg-amber-50"}};function cx({status:t,label:r,className:o}){const a=nR[t];return u.jsxs("div",{className:ge("flex items-center gap-1.5 px-2 py-0.5 rounded-full",a.bg,o),children:[u.jsx("span",{className:ge("h-1.5 w-1.5 rounded-full",a.dot)}),u.jsx("span",{className:ge("text-[11px] font-medium",a.text),children:r})]})}function ux({label:t,className:r,onClick:o}){return u.jsxs("span",{onClick:o,className:ge("inline-flex items-center gap-1 text-[13px] font-medium text-gray-600 hover:text-primary transition-colors cursor-pointer group/action",r),children:[t,u.jsx(nv,{className:"h-3 w-3 transition-transform group-hover/action:translate-x-0.5"})]})}function rR(){const{data:t}=qs(),{data:r}=Vf(),{data:o}=Gs(),{openProviderModal:a}=oi(),[l,c]=m.useState("installed"),f=o==null?void 0:o.uiHints;if(!t||!r)return u.jsx("div",{className:"p-8",children:E("providersLoading")});const h=[{id:"installed",label:E("providersTabConfigured"),count:t.providers?Object.keys(t.providers).filter(y=>t.providers[y].apiKeySet).length:0},{id:"all",label:E("providersTabAll"),count:r.providers.length}],g=l==="installed"?r.providers.filter(y=>{var x;return(x=t.providers[y.name])==null?void 0:x.apiKeySet}):r.providers;return u.jsxs("div",{className:"animate-fade-in pb-20",children:[u.jsx("div",{className:"flex items-center justify-between mb-6",children:u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:E("providersPageTitle")})}),u.jsx(Yf,{tabs:h,activeTab:l,onChange:c}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:g.map(y=>{const x=t.providers[y.name],b=x==null?void 0:x.apiKeySet,k=yt(`providers.${y.name}`,f),w=(k==null?void 0:k.help)||E("providersDefaultDescription");return u.jsxs(sx,{onClick:()=>a(y.name),children:[u.jsxs(ax,{children:[u.jsx(rx,{name:y.name,src:eR(y.name),className:ge("h-11 w-11 rounded-xl border transition-all",b?"bg-white border-primary/30":"bg-white border-gray-200/60 group-hover:border-gray-300"),imgClassName:"h-6 w-6",fallback:u.jsx("span",{className:ge("text-base font-semibold uppercase",b?"text-gray-800":"text-gray-400"),children:y.name[0]})}),u.jsx(cx,{status:b?"ready":"setup",label:E(b?"statusReady":"statusSetup")})]}),u.jsx(ix,{title:y.displayName||y.name,description:w}),u.jsx(lx,{children:u.jsx(ux,{label:E(b?"actionConfigure":"actionAddProvider")})})]},y.name)})}),g.length===0&&u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u.jsx("div",{className:"h-14 w-14 flex items-center justify-center rounded-xl bg-gray-100/80 mb-4",children:u.jsx(ql,{className:"h-6 w-6 text-gray-300"})}),u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900 mb-1.5",children:E("providersEmptyTitle")}),u.jsx("p",{className:"text-[13px] text-gray-400 max-w-sm",children:E("providersEmptyDescription")})]}),u.jsx(XP,{})]})}const Xf=m.forwardRef(({className:t,checked:r=!1,onCheckedChange:o,...a},l)=>u.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:l,className:ge("peer inline-flex h-[22px] w-10 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/80 hover:bg-gray-300/80",t),onClick:()=>o==null?void 0:o(!r),...a,children:u.jsx("span",{className:ge("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")})}));Xf.displayName="Switch";function oR({value:t,onChange:r,className:o,placeholder:a=""}){const[l,c]=m.useState(""),f=g=>{g.key==="Enter"&&l.trim()?(g.preventDefault(),r([...t,l.trim()]),c("")):g.key==="Backspace"&&!l&&t.length>0&&r(t.slice(0,-1))},h=g=>{r(t.filter((y,x)=>x!==g))};return u.jsxs("div",{className:ge("flex flex-wrap gap-2 p-2 border rounded-md min-h-[42px]",o),children:[t.map((g,y)=>u.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded text-sm",children:[g,u.jsx("button",{type:"button",onClick:()=>h(y),className:"hover:text-red-300 transition-colors",children:u.jsx(Af,{className:"h-3 w-3"})})]},y)),u.jsx("input",{type:"text",value:l,onChange:g=>c(g.target.value),onKeyDown:f,className:"flex-1 outline-none min-w-[100px] bg-transparent text-sm",placeholder:a||E("enterTag")})]})}const Hg=[{value:"pairing",label:"pairing"},{value:"allowlist",label:"allowlist"},{value:"open",label:"open"},{value:"disabled",label:"disabled"}],Vg=[{value:"open",label:"open"},{value:"allowlist",label:"allowlist"},{value:"disabled",label:"disabled"}],sR=[{value:"off",label:"off"},{value:"partial",label:"partial"},{value:"block",label:"block"},{value:"progress",label:"progress"}],aR=t=>t.includes("token")||t.includes("secret")||t.includes("password")?u.jsx(ql,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("url")||t.includes("host")?u.jsx(av,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("email")||t.includes("mail")?u.jsx(Mf,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("id")||t.includes("from")?u.jsx(Ql,{className:"h-3.5 w-3.5 text-gray-500"}):t==="enabled"||t==="consentGranted"?u.jsx(Kk,{className:"h-3.5 w-3.5 text-gray-500"}):u.jsx(lv,{className:"h-3.5 w-3.5 text-gray-500"});function Kg(){return{telegram:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"token",type:"password",label:E("botToken")},{name:"allowFrom",type:"tags",label:E("allowFrom")},{name:"proxy",type:"text",label:E("proxy")},{name:"accountId",type:"text",label:E("accountId")},{name:"dmPolicy",type:"select",label:E("dmPolicy"),options:Hg},{name:"groupPolicy",type:"select",label:E("groupPolicy"),options:Vg},{name:"groupAllowFrom",type:"tags",label:E("groupAllowFrom")},{name:"requireMention",type:"boolean",label:E("requireMention")},{name:"mentionPatterns",type:"tags",label:E("mentionPatterns")},{name:"groups",type:"json",label:E("groupRulesJson")}],discord:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"token",type:"password",label:E("botToken")},{name:"allowBots",type:"boolean",label:E("allowBotMessages")},{name:"allowFrom",type:"tags",label:E("allowFrom")},{name:"gatewayUrl",type:"text",label:E("gatewayUrl")},{name:"intents",type:"number",label:E("intents")},{name:"proxy",type:"text",label:E("proxy")},{name:"mediaMaxMb",type:"number",label:E("attachmentMaxSizeMb")},{name:"streaming",type:"select",label:E("streamingMode"),options:sR},{name:"draftChunk",type:"json",label:E("draftChunkingJson")},{name:"textChunkLimit",type:"number",label:E("textChunkLimit")},{name:"accountId",type:"text",label:E("accountId")},{name:"dmPolicy",type:"select",label:E("dmPolicy"),options:Hg},{name:"groupPolicy",type:"select",label:E("groupPolicy"),options:Vg},{name:"groupAllowFrom",type:"tags",label:E("groupAllowFrom")},{name:"requireMention",type:"boolean",label:E("requireMention")},{name:"mentionPatterns",type:"tags",label:E("mentionPatterns")},{name:"groups",type:"json",label:E("groupRulesJson")}],whatsapp:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"bridgeUrl",type:"text",label:E("bridgeUrl")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],feishu:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"appId",type:"text",label:E("appId")},{name:"appSecret",type:"password",label:E("appSecret")},{name:"encryptKey",type:"password",label:E("encryptKey")},{name:"verificationToken",type:"password",label:E("verificationToken")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],dingtalk:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"clientId",type:"text",label:E("clientId")},{name:"clientSecret",type:"password",label:E("clientSecret")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],wecom:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"corpId",type:"text",label:E("corpId")},{name:"agentId",type:"text",label:E("agentId")},{name:"secret",type:"password",label:E("secret")},{name:"token",type:"password",label:E("token")},{name:"callbackPort",type:"number",label:E("callbackPort")},{name:"callbackPath",type:"text",label:E("callbackPath")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],slack:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"mode",type:"text",label:E("mode")},{name:"webhookPath",type:"text",label:E("webhookPath")},{name:"allowBots",type:"boolean",label:E("allowBotMessages")},{name:"botToken",type:"password",label:E("botToken")},{name:"appToken",type:"password",label:E("appToken")}],email:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"consentGranted",type:"boolean",label:E("consentGranted")},{name:"imapHost",type:"text",label:E("imapHost")},{name:"imapPort",type:"number",label:E("imapPort")},{name:"imapUsername",type:"text",label:E("imapUsername")},{name:"imapPassword",type:"password",label:E("imapPassword")},{name:"fromAddress",type:"email",label:E("fromAddress")}],mochat:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"baseUrl",type:"text",label:E("baseUrl")},{name:"clawToken",type:"password",label:E("clawToken")},{name:"agentUserId",type:"text",label:E("agentUserId")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],qq:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"appId",type:"text",label:E("appId")},{name:"secret",type:"password",label:E("appSecret")},{name:"markdownSupport",type:"boolean",label:E("markdownSupport")},{name:"allowFrom",type:"tags",label:E("allowFrom")}]}}const Qg={telegram:bs,slack:bs,email:Mf,default:bs},qg={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 rc(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function dx(t,r){const o={...t};for(const[a,l]of Object.entries(r)){const c=o[a];if(rc(c)&&rc(l)){o[a]=dx(c,l);continue}o[a]=l}return o}function iR(t,r){const o=t.split("."),a={};let l=a;for(let c=0;c<o.length-1;c+=1){const f=o[c];l[f]={},l=l[f]}return l[o[o.length-1]]=r,a}function lR(){var W,Y;const{channelModal:t,closeChannelModal:r}=oi(),{data:o}=qs(),{data:a}=Gs(),l=mP(),c=yP(),[f,h]=m.useState({}),[g,y]=m.useState({}),[x,b]=m.useState(null),k=t.channel,w=k?o==null?void 0:o.channels[k]:null,N=k?Kg()[k]??[]:[],v=a==null?void 0:a.uiHints,C=k?`channels.${k}`:null,R=((W=a==null?void 0:a.actions)==null?void 0:W.filter(_=>_.scope===C))??[],j=k&&(((Y=yt(`channels.${k}`,v))==null?void 0:Y.label)??k);m.useEffect(()=>{if(w){h({...w});const _={};(k?Kg()[k]??[]:[]).filter(Z=>Z.type==="json").forEach(Z=>{const ee=w[Z.name];_[Z.name]=JSON.stringify(ee??{},null,2)}),y(_)}else h({}),y({})},[w,k]);const P=(_,O)=>{h(Z=>({...Z,[_]:O}))},A=_=>{if(_.preventDefault(),!k)return;const O={...f};for(const Z of N){if(Z.type!=="json")continue;const ee=g[Z.name]??"";try{O[Z.name]=ee.trim()?JSON.parse(ee):{}}catch{Ue.error(`${E("invalidJson")}: ${Z.name}`);return}}l.mutate({channel:k,data:O},{onSuccess:()=>r()})},$=_=>{if(!_||!k)return;const O=_.channels;if(!rc(O))return;const Z=O[k];rc(Z)&&h(ee=>dx(ee,Z))},B=async _=>{if(!(!k||!C)){b(_.id);try{let O={...f};_.saveBeforeRun&&(O={...O,..._.savePatch??{}},h(O),await l.mutateAsync({channel:k,data:O}));const Z=await c.mutateAsync({actionId:_.id,data:{scope:C,draftConfig:iR(C,O)}});$(Z.patch),Z.ok?Ue.success(Z.message||E("success")):Ue.error(Z.message||E("error"))}catch(O){const Z=O instanceof Error?O.message:String(O);Ue.error(`${E("error")}: ${Z}`)}finally{b(null)}}},H=Qg[k||""]||Qg.default,X=qg[k||""]||qg.default;return u.jsx(Gf,{open:t.open,onOpenChange:r,children:u.jsxs(xc,{className:"sm:max-w-[550px] max-h-[85vh] overflow-hidden flex flex-col",children:[u.jsx(wc,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:`h-10 w-10 rounded-xl bg-gradient-to-br ${X} flex items-center justify-center`,children:u.jsx(H,{className:"h-5 w-5 text-white"})}),u.jsxs("div",{children:[u.jsx(Sc,{className:"capitalize",children:j}),u.jsx(kc,{children:E("configureMessageChannelParameters")})]})]})}),u.jsxs("form",{onSubmit:A,className:"flex flex-col flex-1 overflow-hidden",children:[u.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar py-2 pr-2 space-y-5",children:N.map(_=>{const O=k?yt(`channels.${k}.${_.name}`,v):void 0,Z=(O==null?void 0:O.label)??_.label,ee=O==null?void 0:O.placeholder;return u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:_.name,className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[aR(_.name),Z]}),_.type==="boolean"&&u.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-gray-50",children:[u.jsx("span",{className:"text-sm text-gray-500",children:f[_.name]?E("enabled"):E("disabled")}),u.jsx(Xf,{id:_.name,checked:f[_.name]||!1,onCheckedChange:G=>P(_.name,G),className:"data-[state=checked]:bg-emerald-500"})]}),(_.type==="text"||_.type==="email")&&u.jsx(He,{id:_.name,type:_.type,value:f[_.name]||"",onChange:G=>P(_.name,G.target.value),placeholder:ee,className:"rounded-xl"}),_.type==="password"&&u.jsx(He,{id:_.name,type:"password",value:f[_.name]||"",onChange:G=>P(_.name,G.target.value),placeholder:ee??E("leaveBlankToKeepUnchanged"),className:"rounded-xl"}),_.type==="number"&&u.jsx(He,{id:_.name,type:"number",value:f[_.name]||0,onChange:G=>P(_.name,parseInt(G.target.value)||0),placeholder:ee,className:"rounded-xl"}),_.type==="tags"&&u.jsx(oR,{value:f[_.name]||[],onChange:G=>P(_.name,G)}),_.type==="select"&&u.jsxs(so,{value:f[_.name]||"",onValueChange:G=>P(_.name,G),children:[u.jsx(vr,{className:"rounded-xl",children:u.jsx(Bo,{})}),u.jsx(xr,{children:(_.options??[]).map(G=>u.jsx(Ct,{value:G.value,children:G.label},G.value))})]}),_.type==="json"&&u.jsx("textarea",{id:_.name,value:g[_.name]??"{}",onChange:G=>y(ie=>({...ie,[_.name]:G.target.value})),className:"min-h-[120px] w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono"})]},_.name)})}),u.jsxs(bc,{className:"pt-4 flex-shrink-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:r,children:E("cancel")}),u.jsx(Ve,{type:"submit",disabled:l.isPending||!!x,children:l.isPending?E("saving"):E("save")}),R.filter(_=>_.trigger==="manual").map(_=>u.jsx(Ve,{type:"button",onClick:()=>B(_),disabled:l.isPending||!!x,variant:"secondary",children:x===_.id?E("connecting"):_.title},_.id))]})]})]})})}const Gg={telegram:bs,slack:Wk,email:Mf,webhook:kk,default:If},cR={telegram:"channelDescTelegram",slack:"channelDescSlack",email:"channelDescEmail",webhook:"channelDescWebhook",discord:"channelDescDiscord",feishu:"channelDescFeishu"};function uR(){const{data:t}=qs(),{data:r}=Vf(),{data:o}=Gs(),{openChannelModal:a}=oi(),[l,c]=m.useState("active"),f=o==null?void 0:o.uiHints;if(!t||!r)return u.jsx("div",{className:"p-8 text-gray-400",children:E("channelsLoading")});const h=[{id:"active",label:E("channelsTabEnabled"),count:r.channels.filter(y=>{var x;return(x=t.channels[y.name])==null?void 0:x.enabled}).length},{id:"all",label:E("channelsTabAll"),count:r.channels.length}],g=r.channels.filter(y=>{var b;const x=((b=t.channels[y.name])==null?void 0:b.enabled)||!1;return l==="all"||x});return u.jsxs("div",{className:"animate-fade-in pb-20",children:[u.jsx("div",{className:"flex items-center justify-between mb-6",children:u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:E("channelsPageTitle")})}),u.jsx(Yf,{tabs:h,activeTab:l,onChange:c}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:g.map(y=>{const x=t.channels[y.name],b=(x==null?void 0:x.enabled)||!1,k=Gg[y.name]||Gg.default,w=yt(`channels.${y.name}`,f),N=(w==null?void 0:w.help)||E(cR[y.name]||"channelDescriptionDefault");return u.jsxs(sx,{onClick:()=>a(y.name),children:[u.jsxs(ax,{children:[u.jsx(rx,{name:y.name,src:tR(y.name),className:ge("h-11 w-11 rounded-xl border transition-all",b?"bg-white border-primary/30":"bg-white border-gray-200/60 group-hover:border-gray-300"),imgClassName:"h-5 w-5",fallback:u.jsx(k,{className:"h-5 w-5"})}),u.jsx(cx,{status:b?"active":"inactive",label:E(b?"statusActive":"statusInactive")})]}),u.jsx(ix,{title:y.displayName||y.name,description:N}),u.jsxs(lx,{children:[u.jsx(ux,{label:E(b?"actionConfigure":"actionEnable")}),y.tutorialUrl&&u.jsx("a",{href:y.tutorialUrl,target:"_blank",rel:"noreferrer",onClick:v=>v.stopPropagation(),className:"flex items-center justify-center h-6 w-6 rounded-md text-gray-300 hover:text-gray-500 hover:bg-gray-100/60 transition-colors",title:E("channelsGuideTitle"),children:u.jsx(sv,{className:"h-3.5 w-3.5"})})]})]},y.name)})}),g.length===0&&u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u.jsx("div",{className:"h-14 w-14 flex items-center justify-center rounded-xl bg-gray-100/80 mb-4",children:u.jsx(If,{className:"h-6 w-6 text-gray-300"})}),u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900 mb-1.5",children:E("channelsEmptyTitle")}),u.jsx("p",{className:"text-[13px] text-gray-400 max-w-sm",children:E("channelsEmptyDescription")})]}),u.jsx(lR,{})]})}const dR=[{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 fR(){return{id:"",default:!1,workspace:"",model:"",maxTokens:void 0,contextTokens:void 0,maxToolIterations:void 0}}function hR(){return{agentId:"",match:{channel:"",accountId:""}}}function Nd(t){const r=t.trim();if(!r)return;const o=Number.parseInt(r,10);return Number.isFinite(o)?o:void 0}function pR(){const{data:t,isLoading:r}=qs(),{data:o}=Gs(),a=gP(),[l,c]=m.useState([]),[f,h]=m.useState([]),[g,y]=m.useState("per-channel-peer"),[x,b]=m.useState(0),[k,w]=m.useState(2e5);m.useEffect(()=>{var W,Y,_;t&&(c((t.agents.list??[]).map(O=>({id:O.id??"",default:!!O.default,workspace:O.workspace??"",model:O.model??"",maxTokens:O.maxTokens,contextTokens:O.contextTokens,maxToolIterations:O.maxToolIterations}))),h((t.bindings??[]).map(O=>{var Z,ee,G;return{agentId:O.agentId??"",match:{channel:((Z=O.match)==null?void 0:Z.channel)??"",accountId:((ee=O.match)==null?void 0:ee.accountId)??"",peer:(G=O.match)!=null&&G.peer?{kind:O.match.peer.kind,id:O.match.peer.id}:void 0}}})),y(((W=t.session)==null?void 0:W.dmScope)??"per-channel-peer"),b(((_=(Y=t.session)==null?void 0:Y.agentToAgent)==null?void 0:_.maxPingPongTurns)??0),w(t.agents.defaults.contextTokens??2e5))},[t]);const N=o==null?void 0:o.uiHints,v=yt("session.dmScope",N),C=yt("session.agentToAgent.maxPingPongTurns",N),R=yt("agents.defaults.contextTokens",N),j=yt("agents.list.*.contextTokens",N),P=yt("agents.list",N),A=yt("bindings",N),$=m.useMemo(()=>{const W=new Set(["main"]);return l.forEach(Y=>{const _=Y.id.trim();_&&W.add(_)}),W},[l]),B=(W,Y)=>{c(_=>_.map((O,Z)=>Z===W?{...O,...Y}:O))},H=(W,Y)=>{h(_=>_.map((O,Z)=>Z===W?Y:O))},X=()=>{try{const W=l.map((O,Z)=>{var ie,ce;const ee=O.id.trim();if(!ee)throw new Error(E("agentIdRequiredError").replace("{index}",String(Z)));const G={id:ee};return O.default&&(G.default=!0),(ie=O.workspace)!=null&&ie.trim()&&(G.workspace=O.workspace.trim()),(ce=O.model)!=null&&ce.trim()&&(G.model=O.model.trim()),typeof O.maxTokens=="number"&&(G.maxTokens=O.maxTokens),typeof O.contextTokens=="number"&&(G.contextTokens=Math.max(1e3,O.contextTokens)),typeof O.maxToolIterations=="number"&&(G.maxToolIterations=O.maxToolIterations),G}),Y=W.map(O=>O.id).filter((O,Z,ee)=>ee.indexOf(O)!==Z);if(Y.length>0){Ue.error(`${E("duplicateAgentId")}: ${Y[0]}`);return}const _=f.map((O,Z)=>{var Q,M,F,le;const ee=O.agentId.trim(),G=O.match.channel.trim(),ie=((Q=O.match.accountId)==null?void 0:Q.trim())??"",ce=(M=O.match.peer)==null?void 0:M.kind,K=((le=(F=O.match.peer)==null?void 0:F.id)==null?void 0:le.trim())??"";if(!ee)throw new Error(E("bindingAgentIdRequired").replace("{index}",String(Z)));if(!$.has(ee))throw new Error(`${E("bindingAgentIdNotFound").replace("{index}",String(Z))}: ${ee}`);if(!G)throw new Error(E("bindingChannelRequired").replace("{index}",String(Z)));const q={agentId:ee,match:{channel:G}};if(ie&&(q.match.accountId=ie),ce){if(!K)throw new Error(E("bindingPeerIdRequired").replace("{index}",String(Z)));q.match.peer={kind:ce,id:K}}return q});a.mutate({data:{agents:{defaults:{contextTokens:Math.max(1e3,k)},list:W},bindings:_,session:{dmScope:g,agentToAgent:{maxPingPongTurns:Math.min(5,Math.max(0,x))}}}})}catch(W){const Y=W instanceof Error?W.message:String(W);Ue.error(Y)}};return r||!t?u.jsx("div",{className:"p-8 text-gray-400",children:E("runtimeLoading")}):u.jsxs("div",{className:"space-y-6 pb-20 animate-fade-in",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:E("runtimePageTitle")}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:E("runtimePageDescription")})]}),u.jsxs(zo,{children:[u.jsxs(Fl,{children:[u.jsx(Ul,{children:(v==null?void 0:v.label)??E("dmScope")}),u.jsx($l,{children:(v==null?void 0:v.help)??E("dmScopeHelp")})]}),u.jsxs(Ua,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(R==null?void 0:R.label)??E("defaultContextTokens")}),u.jsx(He,{type:"number",min:1e3,step:1e3,value:k,onChange:W=>w(Math.max(1e3,Number.parseInt(W.target.value,10)||1e3))}),u.jsx("p",{className:"text-xs text-gray-500",children:(R==null?void 0:R.help)??E("defaultContextTokensHelp")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(v==null?void 0:v.label)??E("dmScope")}),u.jsxs(so,{value:g,onValueChange:W=>y(W),children:[u.jsx(vr,{children:u.jsx(Bo,{})}),u.jsx(xr,{children:dR.map(W=>u.jsx(Ct,{value:W.value,children:W.label},W.value))})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(C==null?void 0:C.label)??E("maxPingPongTurns")}),u.jsx(He,{type:"number",min:0,max:5,value:x,onChange:W=>b(Math.max(0,Number.parseInt(W.target.value,10)||0))}),u.jsx("p",{className:"text-xs text-gray-500",children:(C==null?void 0:C.help)??E("maxPingPongTurnsHelp")})]})]})]}),u.jsxs(zo,{children:[u.jsxs(Fl,{children:[u.jsx(Ul,{children:(P==null?void 0:P.label)??E("agentList")}),u.jsx($l,{children:(P==null?void 0:P.help)??E("agentListHelp")})]}),u.jsxs(Ua,{className:"space-y-3",children:[l.map((W,Y)=>u.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[u.jsx(He,{value:W.id,onChange:_=>B(Y,{id:_.target.value}),placeholder:E("agentIdPlaceholder")}),u.jsx(He,{value:W.workspace??"",onChange:_=>B(Y,{workspace:_.target.value}),placeholder:E("workspaceOverridePlaceholder")}),u.jsx(He,{value:W.model??"",onChange:_=>B(Y,{model:_.target.value}),placeholder:E("modelOverridePlaceholder")}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[u.jsx(He,{type:"number",min:1,value:W.maxTokens??"",onChange:_=>B(Y,{maxTokens:Nd(_.target.value)}),placeholder:E("maxTokensPlaceholder")}),u.jsx(He,{type:"number",min:1e3,step:1e3,value:W.contextTokens??"",onChange:_=>B(Y,{contextTokens:Nd(_.target.value)}),placeholder:(j==null?void 0:j.label)??E("contextTokensPlaceholder")}),u.jsx(He,{type:"number",min:1,value:W.maxToolIterations??"",onChange:_=>B(Y,{maxToolIterations:Nd(_.target.value)}),placeholder:E("maxToolsPlaceholder")})]})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(Xf,{checked:!!W.default,onCheckedChange:_=>{if(!_){B(Y,{default:!1});return}c(O=>O.map((Z,ee)=>({...Z,default:ee===Y})))}}),u.jsx("span",{children:E("defaultAgent")})]}),u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>c(_=>_.filter((O,Z)=>Z!==Y)),children:[u.jsx(Gl,{className:"h-4 w-4 mr-1"}),E("remove")]})]})]},`${Y}-${W.id}`)),u.jsxs(Ve,{type:"button",variant:"outline",onClick:()=>c(W=>[...W,fR()]),children:[u.jsx(qd,{className:"h-4 w-4 mr-2"}),E("addAgent")]})]})]}),u.jsxs(zo,{children:[u.jsxs(Fl,{children:[u.jsx(Ul,{children:(A==null?void 0:A.label)??E("bindings")}),u.jsx($l,{children:(A==null?void 0:A.help)??E("bindingsHelp")})]}),u.jsxs(Ua,{className:"space-y-3",children:[f.map((W,Y)=>{var O,Z;const _=((O=W.match.peer)==null?void 0:O.kind)??"";return u.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[u.jsx(He,{value:W.agentId,onChange:ee=>H(Y,{...W,agentId:ee.target.value}),placeholder:E("targetAgentIdPlaceholder")}),u.jsx(He,{value:W.match.channel,onChange:ee=>H(Y,{...W,match:{...W.match,channel:ee.target.value}}),placeholder:E("channelPlaceholder")}),u.jsx(He,{value:W.match.accountId??"",onChange:ee=>H(Y,{...W,match:{...W.match,accountId:ee.target.value}}),placeholder:E("accountIdOptionalPlaceholder")}),u.jsxs(so,{value:_||"__none__",onValueChange:ee=>{var ie;const G=ee==="__none__"?"":ee;if(!G){H(Y,{...W,match:{...W.match,peer:void 0}});return}H(Y,{...W,match:{...W.match,peer:{kind:G,id:((ie=W.match.peer)==null?void 0:ie.id)??""}}})},children:[u.jsx(vr,{children:u.jsx(Bo,{})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"__none__",children:E("peerKindOptional")}),u.jsx(Ct,{value:"direct",children:"direct"}),u.jsx(Ct,{value:"group",children:"group"}),u.jsx(Ct,{value:"channel",children:"channel"})]})]}),u.jsx(He,{value:((Z=W.match.peer)==null?void 0:Z.id)??"",onChange:ee=>H(Y,{...W,match:{...W.match,peer:_?{kind:_,id:ee.target.value}:void 0}}),placeholder:E("peerIdPlaceholder")})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>h(ee=>ee.filter((G,ie)=>ie!==Y)),children:[u.jsx(Gl,{className:"h-4 w-4 mr-1"}),E("remove")]})})]},`${Y}-${W.agentId}`)}),u.jsxs(Ve,{type:"button",variant:"outline",onClick:()=>h(W=>[...W,hR()]),children:[u.jsx(qd,{className:"h-4 w-4 mr-2"}),E("addBinding")]})]})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(Ve,{type:"button",onClick:X,disabled:a.isPending,children:[u.jsx(Bk,{className:"h-4 w-4 mr-2"}),a.isPending?E("saving"):E("saveRuntimeSettings")]})})]})}const mR=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:l=E("confirm"),cancelLabel:c=E("cancel"),variant:f="default",onConfirm:h,onCancel:g})=>{const y=()=>{h(),r(!1)},x=()=>{g(),r(!1)};return u.jsx(Gf,{open:t,onOpenChange:r,children:u.jsxs(xc,{className:"[&>:last-child]:hidden",onCloseAutoFocus:b=>b.preventDefault(),children:[u.jsxs(wc,{children:[u.jsx(Sc,{children:o}),a?u.jsx(kc,{children:a}):null]}),u.jsxs(bc,{className:"gap-2 sm:gap-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:x,children:c}),u.jsx(Ve,{type:"button",variant:f==="destructive"?"destructive":"default",onClick:y,children:l})]})]})})},gR={open:!1,title:"",description:"",confirmLabel:E("confirm"),cancelLabel:E("cancel"),variant:"default",resolve:null};function Jf(){const[t,r]=m.useState(gR),o=m.useCallback(c=>new Promise(f=>{r({open:!0,title:c.title,description:c.description??"",confirmLabel:c.confirmLabel??E("confirm"),cancelLabel:c.cancelLabel??E("cancel"),variant:c.variant??"default",resolve:h=>{f(h),r(g=>({...g,open:!1,resolve:null}))}})}),[]),a=m.useCallback(c=>{r(f=>(!c&&f.resolve&&f.resolve(!1),{...f,open:c,resolve:c?f.resolve:null}))},[]),l=m.useCallback(()=>u.jsx(mR,{open:t.open,onOpenChange:a,title:t.title,description:t.description||void 0,confirmLabel:t.confirmLabel,cancelLabel:t.cancelLabel,variant:t.variant,onConfirm:()=>{var c;return(c=t.resolve)==null?void 0:c.call(t,!0)},onCancel:()=>{var c;return(c=t.resolve)==null?void 0:c.call(t,!1)}}),[t,a]);return{confirm:o,ConfirmDialog:l}}const Ka="__unknown_channel__";function yR(t){return Tf(t)}function Il(t){const r=t.indexOf(":");return r<=0?Ka:t.slice(0,r).trim()||Ka}function cf(t){return t===Ka?E("sessionsUnknownChannel"):t}function vR({session:t,channel:r,isSelected:o,onSelect:a}){const l=cf(r),c=t.label||t.key.split(":").pop()||t.key;return u.jsxs("button",{onClick:a,className:ge("w-full text-left p-3.5 rounded-xl transition-all duration-200 outline-none focus:outline-none focus:ring-0 group",o?"bg-brand-50 border border-brand-100/50":"bg-transparent border border-transparent hover:bg-gray-50/80"),children:[u.jsxs("div",{className:"flex items-start justify-between mb-1.5",children:[u.jsx("div",{className:ge("font-semibold truncate pr-2 flex-1 text-sm",o?"text-brand-800":"text-gray-900"),children:c}),u.jsx("div",{className:ge("text-[10px] font-bold px-2 py-0.5 rounded-full shrink-0 capitalize",o?"bg-white text-brand-600 shadow-[0_1px_2px_rgba(0,0,0,0.02)]":"bg-gray-100 text-gray-500"),children:l})]}),u.jsxs("div",{className:ge("flex items-center text-xs justify-between mt-2 font-medium",o?"text-brand-600/80":"text-gray-400"),children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(Pk,{className:"w-3.5 h-3.5 opacity-70"}),u.jsx("span",{className:"truncate max-w-[100px]",children:vk(t.updatedAt)})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(bs,{className:"w-3.5 h-3.5 opacity-70"}),u.jsx("span",{children:t.messageCount})]})]})]})}function xR({message:t}){const r=t.role.toLowerCase()==="user";return u.jsx("div",{className:ge("flex w-full mb-6",r?"justify-end":"justify-start"),children:u.jsxs("div",{className:ge("max-w-[85%] rounded-[1.25rem] p-5 flex gap-3 text-sm",r?"bg-primary text-white rounded-tr-sm":"bg-gray-50 text-gray-800 rounded-tl-sm border border-gray-100/50"),children:[u.jsx("div",{className:"shrink-0 pt-0.5",children:r?u.jsx(Qk,{className:"w-4 h-4 text-primary-100"}):u.jsx(Ck,{className:"w-4 h-4 text-gray-400"})}),u.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[u.jsxs("div",{className:"flex items-baseline justify-between gap-4 mb-2",children:[u.jsx("span",{className:ge("font-semibold text-xs",r?"text-primary-50":"text-gray-900 capitalize"),children:t.role}),u.jsx("span",{className:ge("text-[10px]",r?"text-primary-200":"text-gray-400"),children:yR(t.timestamp)})]}),u.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-[15px]",children:t.content})]})]})})}function wR(){var O,Z,ee;const[t,r]=m.useState(""),[o]=m.useState(100),[a]=m.useState(0),[l,c]=m.useState(null),[f,h]=m.useState("all"),[g,y]=m.useState(""),[x,b]=m.useState(""),[k,w]=m.useState(!1),N=m.useMemo(()=>({q:t.trim()||void 0,limit:o,activeMinutes:a}),[t,o,a]),v=vP(N),C=xP(l,200),R=wP(),j=bP(),{confirm:P,ConfirmDialog:A}=Jf(),$=m.useMemo(()=>{var G;return((G=v.data)==null?void 0:G.sessions)??[]},[(O=v.data)==null?void 0:O.sessions]),B=m.useMemo(()=>$.find(G=>G.key===l),[$,l]),H=m.useMemo(()=>{const G=new Set;for(const ie of $)G.add(Il(ie.key));return Array.from(G).sort((ie,ce)=>ie===Ka?1:ce===Ka?-1:ie.localeCompare(ce))},[$]),X=m.useMemo(()=>f==="all"?$:$.filter(G=>Il(G.key)===f),[$,f]);m.useEffect(()=>{B?(y(B.label||""),b(B.preferredModel||"")):(y(""),b("")),w(!1)},[B]);const W=()=>{l&&(R.mutate({key:l,data:{label:g.trim()||null,preferredModel:x.trim()||null}}),w(!1))},Y=async()=>{if(!l)return;await P({title:E("sessionsClearHistory")+"?",variant:"destructive",confirmLabel:E("sessionsClearHistory")})&&R.mutate({key:l,data:{clearHistory:!0}})},_=async()=>{if(!l)return;await P({title:E("sessionsDeleteConfirm")+"?",variant:"destructive",confirmLabel:E("sessionsDeleteConfirm")})&&j.mutate({key:l},{onSuccess:()=>c(null)})};return u.jsxs("div",{className:"h-[calc(100vh-80px)] w-full max-w-[1400px] mx-auto animate-fade-in flex flex-col pt-6 pb-2",children:[u.jsx("div",{className:"flex items-center justify-between mb-6 shrink-0",children:u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 tracking-tight",children:E("sessionsPageTitle")}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:E("sessionsPageDescription")})]})}),u.jsxs("div",{className:"flex-1 flex gap-6 min-h-0 relative",children:[u.jsxs("div",{className:"w-[320px] flex flex-col shrink-0 bg-white rounded-2xl shadow-sm border border-gray-200 overflow-hidden",children:[u.jsxs("div",{className:"px-4 py-4 border-b border-gray-100 bg-white z-10 shrink-0 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider",children:[$.length," ",E("sessionsListTitle")]}),u.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>v.refetch(),children:u.jsx(Gd,{className:ge("h-3.5 w-3.5",v.isFetching&&"animate-spin")})})]}),u.jsxs(so,{value:f,onValueChange:h,children:[u.jsx(vr,{className:"w-full h-8.5 rounded-lg bg-gray-50/50 hover:bg-gray-100 border-gray-200 focus:ring-0 shadow-none text-xs font-medium text-gray-700",children:u.jsx(Bo,{placeholder:E("sessionsAllChannels")})}),u.jsxs(xr,{className:"rounded-xl shadow-lg border-gray-100 max-w-[280px]",children:[u.jsx(Ct,{value:"all",className:"rounded-lg text-xs",children:E("sessionsAllChannels")}),H.map(G=>u.jsx(Ct,{value:G,className:"rounded-lg text-xs truncate pr-6",children:cf(G)},G))]})]}),u.jsxs("div",{className:"relative w-full",children:[u.jsx(iv,{className:"h-3.5 w-3.5 absolute left-3 top-2.5 text-gray-400"}),u.jsx(He,{value:t,onChange:G=>r(G.target.value),placeholder:E("sessionsSearchPlaceholder"),className:"pl-8 h-8.5 rounded-lg bg-gray-50/50 border-gray-200 focus-visible:bg-white text-xs"})]})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-1 pb-10 custom-scrollbar relative",children:v.isLoading?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("sessionsLoading")}):X.length===0?u.jsxs("div",{className:"text-sm text-gray-400 p-4 text-center border-2 border-dashed border-gray-100 rounded-xl mt-4",children:[u.jsx(ug,{className:"w-8 h-8 mx-auto mb-2 text-gray-300"}),E("sessionsEmpty")]}):X.map(G=>u.jsx(vR,{session:G,channel:Il(G.key),isSelected:l===G.key,onSelect:()=>c(G.key)},G.key))})]}),u.jsxs("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden relative bg-white rounded-2xl shadow-sm border border-gray-200",children:[(R.isPending||j.isPending)&&u.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-primary/20 overflow-hidden z-20",children:u.jsx("div",{className:"h-full bg-primary animate-pulse w-1/3 rounded-r-full"})}),l&&B?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"shrink-0 border-b border-gray-100 bg-white px-8 py-5 z-10 space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"h-12 w-12 rounded-[14px] bg-gray-50 border border-gray-100 flex items-center justify-center text-gray-400 shrink-0",children:u.jsx(Ql,{className:"h-6 w-6"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2.5 mb-1.5",children:[u.jsx("h3",{className:"text-lg font-bold text-gray-900 tracking-tight",children:B.label||B.key.split(":").pop()||B.key}),u.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500 uppercase tracking-widest",children:cf(Il(B.key))})]}),u.jsx("div",{className:"text-xs text-gray-500 font-mono break-all line-clamp-1 opacity-70",title:l,children:l})]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>w(!k),className:ge("h-8.5 rounded-lg shadow-none border-gray-200 transition-all text-xs font-semibold",k?"bg-gray-100 text-gray-900":"hover:bg-gray-50 hover:text-gray-900"),children:[u.jsx(lv,{className:"w-3.5 h-3.5 mr-1.5"}),E("sessionsMetadata")]}),u.jsx(Ve,{variant:"outline",size:"sm",onClick:Y,className:"h-8.5 rounded-lg shadow-none hover:bg-gray-50 hover:text-gray-900 border-gray-200 text-xs font-semibold text-gray-500",children:E("sessionsClearHistory")}),u.jsx(Ve,{variant:"outline",size:"sm",onClick:_,className:"h-8.5 rounded-lg shadow-none hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 text-xs font-semibold text-red-500",children:E("delete")})]})]}),k&&u.jsxs("div",{className:"flex items-center gap-3 bg-gray-50/50 p-3 rounded-lg border border-gray-100 animate-slide-in",children:[u.jsx(He,{placeholder:E("sessionsLabelPlaceholder"),value:g,onChange:G=>y(G.target.value),className:"h-8 text-sm bg-white"}),u.jsx(He,{placeholder:E("sessionsModelPlaceholder"),value:x,onChange:G=>b(G.target.value),className:"h-8 text-sm bg-white"}),u.jsx(Ve,{size:"sm",onClick:W,className:"h-8 px-4 shrink-0 shadow-none",disabled:R.isPending,children:E("sessionsSaveMeta")})]})]}),u.jsxs("div",{className:`flex-1 overflow-y-auto p-6 relative
342
- [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:bg-gray-300/80 [&::-webkit-scrollbar-thumb]:rounded-full`,children:[C.isLoading&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/50 backdrop-blur-sm z-10",children:u.jsxs("div",{className:"flex flex-col items-center gap-3 animate-pulse",children:[u.jsx(Gd,{className:"w-6 h-6 text-primary animate-spin"}),u.jsx("span",{className:"text-sm font-medium text-gray-500",children:E("sessionsHistoryLoading")})]})}),C.error&&u.jsx("div",{className:"text-center p-6 bg-red-50 rounded-xl text-red-600 border border-red-100 text-sm",children:C.error.message}),!C.isLoading&&((Z=C.data)==null?void 0:Z.messages.length)===0&&u.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[u.jsx(bs,{className:"w-12 h-12 mb-3 text-gray-300"}),u.jsx("p",{className:"text-sm",children:E("sessionsEmpty")})]}),u.jsx("div",{className:"max-w-3xl mx-auto",children:(((ee=C.data)==null?void 0:ee.messages)??[]).map((G,ie)=>u.jsx(xR,{message:G},`${G.timestamp}-${ie}`))})]})]}):u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-gray-400 p-8 h-full bg-white",children:[u.jsx("div",{className:"w-20 h-20 bg-gray-50 rounded-3xl flex items-center justify-center mb-6 border border-gray-100 shadow-[0_2px_8px_-2px_rgba(0,0,0,0.02)] rotate-3",children:u.jsx(ug,{className:"h-8 w-8 text-gray-300 -rotate-3"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:E("sessionsNoSelectionTitle")}),u.jsx("p",{className:"text-sm text-center max-w-sm leading-relaxed",children:E("sessionsNoSelectionDescription")})]})]})]}),u.jsx(A,{})]})}function Yg(t){return Tf(t??void 0)}function bR(t){return typeof t!="number"||!Number.isFinite(t)?"-":Tf(new Date(t))}function SR(t){if(typeof t!="number"||!Number.isFinite(t))return"-";const r=Math.round(t/1e3);if(r<60)return`${r}s`;const o=Math.round(r/60);if(o<60)return`${o}m`;const a=Math.round(o/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}function kR(t){const r=t.schedule;return r.kind==="cron"?r.expr?`cron ${r.expr}`:"cron":r.kind==="every"?`every ${SR(r.everyMs)}`:r.kind==="at"?`at ${bR(r.atMs)}`:"-"}function CR(t){if(!t.payload.deliver)return"-";const r=t.payload.channel??"-",o=t.payload.to??"-";return`${r}:${o}`}function ER(t,r){const o=r.trim().toLowerCase();return o?[t.id,t.name,t.payload.message,t.payload.channel??"",t.payload.to??""].join(" ").toLowerCase().includes(o):!0}function NR(t,r){return r==="all"?!0:r==="enabled"?t.enabled:!t.enabled}function PR(){var N;const[t,r]=m.useState(""),[o,a]=m.useState("all"),l=SP({all:!0}),c=kP(),f=CP(),h=EP(),{confirm:g,ConfirmDialog:y}=Jf(),x=m.useMemo(()=>{var C;return(((C=l.data)==null?void 0:C.jobs)??[]).filter(R=>ER(R,t)).filter(R=>NR(R,o))},[l.data,t,o]),b=async v=>{await g({title:`${E("cronDeleteConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,variant:"destructive",confirmLabel:E("delete")})&&c.mutate({id:v.id})},k=async v=>{const C=!v.enabled;await g({title:C?`${E("cronEnableConfirm")}?`:`${E("cronDisableConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,variant:C?"default":"destructive",confirmLabel:E(C?"cronEnable":"cronDisable")})&&f.mutate({id:v.id,enabled:C})},w=async v=>{const C=!v.enabled;await g({title:C?`${E("cronRunForceConfirm")}?`:`${E("cronRunConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,confirmLabel:E("cronRunNow")})&&h.mutate({id:v.id,force:C})};return u.jsxs("div",{className:"h-[calc(100vh-80px)] w-full max-w-[1200px] mx-auto animate-fade-in flex flex-col pt-6 pb-2",children:[u.jsxs("div",{className:"flex items-center justify-between mb-6 shrink-0",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 tracking-tight",children:E("cronPageTitle")}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:E("cronPageDescription")})]}),u.jsx(Ve,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>l.refetch(),children:u.jsx(Gd,{className:ge("h-4 w-4",l.isFetching&&"animate-spin")})})]}),u.jsx("div",{className:"mb-6",children:u.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[u.jsxs("div",{className:"relative flex-1 min-w-[240px]",children:[u.jsx(He,{value:t,onChange:v=>r(v.target.value),placeholder:E("cronSearchPlaceholder"),className:"pl-9"}),u.jsx(tv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"})]}),u.jsx("div",{className:"min-w-[180px]",children:u.jsxs(so,{value:o,onValueChange:v=>a(v),children:[u.jsx(vr,{className:"w-full",children:u.jsx(Bo,{placeholder:E("cronStatusLabel")})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"all",children:E("cronStatusAll")}),u.jsx(Ct,{value:"enabled",children:E("cronStatusEnabled")}),u.jsx(Ct,{value:"disabled",children:E("cronStatusDisabled")})]})]})}),u.jsxs("div",{className:"text-xs text-gray-500 ml-auto",children:[E("cronTotalLabel"),": ",((N=l.data)==null?void 0:N.total)??0," / ",x.length]})]})}),u.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar",children:l.isLoading?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("cronLoading")}):x.length===0?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("cronEmpty")}):u.jsx("div",{className:"space-y-4",children:x.map(v=>u.jsx(zo,{className:"border border-gray-200",children:u.jsx(Ua,{className:"pt-5 pb-5",children:u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[u.jsxs("div",{className:"min-w-[220px] flex-1",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:v.name||v.id}),u.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500",children:v.id}),u.jsx("span",{className:ge("text-[10px] font-semibold px-2 py-0.5 rounded-full",v.enabled?"bg-emerald-50 text-emerald-700":"bg-gray-100 text-gray-500"),children:v.enabled?E("enabled"):E("disabled")}),v.deleteAfterRun&&u.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-amber-50 text-amber-700",children:E("cronOneShot")})]}),u.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[E("cronScheduleLabel"),": ",kR(v)]}),u.jsx("div",{className:"mt-2 text-sm text-gray-700 whitespace-pre-wrap break-words",children:v.payload.message}),u.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[E("cronDeliverTo"),": ",CR(v)]})]}),u.jsxs("div",{className:"min-w-[220px] text-xs text-gray-500 space-y-2",children:[u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronNextRun"),":"]})," ",Yg(v.state.nextRunAt)]}),u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronLastRun"),":"]})," ",Yg(v.state.lastRunAt)]}),u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronLastStatus"),":"]})," ",v.state.lastStatus??"-"]}),v.state.lastError&&u.jsx("div",{className:"text-[11px] text-red-500 break-words",children:v.state.lastError})]}),u.jsxs("div",{className:"flex items-start gap-2 flex-wrap justify-end",children:[u.jsxs(Ve,{variant:"subtle",size:"sm",onClick:()=>w(v),className:"gap-1",children:[u.jsx(Uk,{className:"h-3.5 w-3.5"}),E("cronRunNow")]}),u.jsxs(Ve,{variant:v.enabled?"outline":"primary",size:"sm",onClick:()=>k(v),className:"gap-1",children:[u.jsx($k,{className:"h-3.5 w-3.5"}),v.enabled?E("cronDisable"):E("cronEnable")]}),u.jsxs(Ve,{variant:"destructive",size:"sm",onClick:()=>b(v),className:"gap-1",children:[u.jsx(Gl,{className:"h-3.5 w-3.5"}),E("delete")]})]})]})})},v.id))})}),u.jsx(y,{})]})}var[Cc]=ni("Tooltip",[fc]),Ec=fc(),fx="TooltipProvider",RR=700,uf="tooltip.open",[jR,Zf]=Cc(fx),hx=t=>{const{__scopeTooltip:r,delayDuration:o=RR,skipDelayDuration:a=300,disableHoverableContent:l=!1,children:c}=t,f=m.useRef(!0),h=m.useRef(!1),g=m.useRef(0);return m.useEffect(()=>{const y=g.current;return()=>window.clearTimeout(y)},[]),u.jsx(jR,{scope:r,isOpenDelayedRef:f,delayDuration:o,onOpen:m.useCallback(()=>{window.clearTimeout(g.current),f.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>f.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(y=>{h.current=y},[]),disableHoverableContent:l,children:c})};hx.displayName=fx;var Qa="Tooltip",[TR,si]=Cc(Qa),px=t=>{const{__scopeTooltip:r,children:o,open:a,defaultOpen:l,onOpenChange:c,disableHoverableContent:f,delayDuration:h}=t,g=Zf(Qa,t.__scopeTooltip),y=Ec(r),[x,b]=m.useState(null),k=Lo(),w=m.useRef(0),N=f??g.disableHoverableContent,v=h??g.delayDuration,C=m.useRef(!1),[R,j]=ec({prop:a,defaultProp:l??!1,onChange:H=>{H?(g.onOpen(),document.dispatchEvent(new CustomEvent(uf))):g.onClose(),c==null||c(H)},caller:Qa}),P=m.useMemo(()=>R?C.current?"delayed-open":"instant-open":"closed",[R]),A=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,C.current=!1,j(!0)},[j]),$=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,j(!1)},[j]),B=m.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{C.current=!0,j(!0),w.current=0},v)},[v,j]);return m.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),u.jsx(Fv,{...y,children:u.jsx(TR,{scope:r,contentId:k,open:R,stateAttribute:P,trigger:x,onTriggerChange:b,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?B():A()},[g.isOpenDelayedRef,B,A]),onTriggerLeave:m.useCallback(()=>{N?$():(window.clearTimeout(w.current),w.current=0)},[$,N]),onOpen:A,onClose:$,disableHoverableContent:N,children:o})})};px.displayName=Qa;var df="TooltipTrigger",mx=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...a}=t,l=si(df,o),c=Zf(df,o),f=Ec(o),h=m.useRef(null),g=Ze(r,h,l.onTriggerChange),y=m.useRef(!1),x=m.useRef(!1),b=m.useCallback(()=>y.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),u.jsx(Uv,{asChild:!0,...f,children:u.jsx(Be.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...a,ref:g,onPointerMove:Oe(t.onPointerMove,k=>{k.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(l.onTriggerEnter(),x.current=!0)}),onPointerLeave:Oe(t.onPointerLeave,()=>{l.onTriggerLeave(),x.current=!1}),onPointerDown:Oe(t.onPointerDown,()=>{l.open&&l.onClose(),y.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:Oe(t.onFocus,()=>{y.current||l.onOpen()}),onBlur:Oe(t.onBlur,l.onClose),onClick:Oe(t.onClick,l.onClose)})})});mx.displayName=df;var eh="TooltipPortal",[MR,IR]=Cc(eh,{forceMount:void 0}),gx=t=>{const{__scopeTooltip:r,forceMount:o,children:a,container:l}=t,c=si(eh,r);return u.jsx(MR,{scope:r,forceMount:o,children:u.jsx(Ys,{present:o||c.open,children:u.jsx(hc,{asChild:!0,container:l,children:a})})})};gx.displayName=eh;var _s="TooltipContent",yx=m.forwardRef((t,r)=>{const o=IR(_s,t.__scopeTooltip),{forceMount:a=o.forceMount,side:l="top",...c}=t,f=si(_s,t.__scopeTooltip);return u.jsx(Ys,{present:a||f.open,children:f.disableHoverableContent?u.jsx(vx,{side:l,...c,ref:r}):u.jsx(AR,{side:l,...c,ref:r})})}),AR=m.forwardRef((t,r)=>{const o=si(_s,t.__scopeTooltip),a=Zf(_s,t.__scopeTooltip),l=m.useRef(null),c=Ze(r,l),[f,h]=m.useState(null),{trigger:g,onClose:y}=o,x=l.current,{onPointerInTransitChange:b}=a,k=m.useCallback(()=>{h(null),b(!1)},[b]),w=m.useCallback((N,v)=>{const C=N.currentTarget,R={x:N.clientX,y:N.clientY},j=_R(R,C.getBoundingClientRect()),P=FR(R,j),A=UR(v.getBoundingClientRect()),$=BR([...P,...A]);h($),b(!0)},[b]);return m.useEffect(()=>()=>k(),[k]),m.useEffect(()=>{if(g&&x){const N=C=>w(C,x),v=C=>w(C,g);return g.addEventListener("pointerleave",N),x.addEventListener("pointerleave",v),()=>{g.removeEventListener("pointerleave",N),x.removeEventListener("pointerleave",v)}}},[g,x,w,k]),m.useEffect(()=>{if(f){const N=v=>{const C=v.target,R={x:v.clientX,y:v.clientY},j=(g==null?void 0:g.contains(C))||(x==null?void 0:x.contains(C)),P=!$R(R,f);j?k():P&&(k(),y())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[g,x,f,y,k]),u.jsx(vx,{...t,ref:c})}),[LR,zR]=Cc(Qa,{isInside:!1}),DR=rC("TooltipContent"),vx=m.forwardRef((t,r)=>{const{__scopeTooltip:o,children:a,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:f,...h}=t,g=si(_s,o),y=Ec(o),{onClose:x}=g;return m.useEffect(()=>(document.addEventListener(uf,x),()=>document.removeEventListener(uf,x)),[x]),m.useEffect(()=>{if(g.trigger){const b=k=>{const w=k.target;w!=null&&w.contains(g.trigger)&&x()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[g.trigger,x]),u.jsx(ic,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:b=>b.preventDefault(),onDismiss:x,children:u.jsxs($v,{"data-state":g.stateAttribute,...y,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(DR,{children:a}),u.jsx(LR,{scope:o,isInside:!0,children:u.jsx(tE,{id:g.contentId,role:"tooltip",children:l||a})})]})})});yx.displayName=_s;var xx="TooltipArrow",OR=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...a}=t,l=Ec(o);return zR(xx,o).isInside?null:u.jsx(Bv,{...l,...a,ref:r})});OR.displayName=xx;function _R(t,r){const o=Math.abs(r.top-t.y),a=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(o,a,l,c)){case c:return"left";case l:return"right";case o:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function FR(t,r,o=5){const a=[];switch(r){case"top":a.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":a.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":a.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":a.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return a}function UR(t){const{top:r,right:o,bottom:a,left:l}=t;return[{x:l,y:r},{x:o,y:r},{x:o,y:a},{x:l,y:a}]}function $R(t,r){const{x:o,y:a}=t;let l=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const h=r[c],g=r[f],y=h.x,x=h.y,b=g.x,k=g.y;x>a!=k>a&&o<(b-y)*(a-x)/(k-x)+y&&(l=!l)}return l}function BR(t){const r=t.slice();return r.sort((o,a)=>o.x<a.x?-1:o.x>a.x?1:o.y<a.y?-1:o.y>a.y?1:0),WR(r)}function WR(t){if(t.length<=1)return t.slice();const r=[];for(let a=0;a<t.length;a++){const l=t[a];for(;r.length>=2;){const c=r[r.length-1],f=r[r.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}r.pop();const o=[];for(let a=t.length-1;a>=0;a--){const l=t[a];for(;o.length>=2;){const c=o[o.length-1],f=o[o.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))o.pop();else break}o.push(l)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var HR=hx,VR=px,KR=mx,QR=gx,wx=yx;const qR=HR,Pd=VR,Rd=KR,Wl=m.forwardRef(({className:t,sideOffset:r=4,...o},a)=>u.jsx(QR,{children:u.jsx(wx,{ref:a,sideOffset:r,className:ge("z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o})}));Wl.displayName=wx.displayName;async function GR(t={}){var l,c;const r=new URLSearchParams;(l=t.q)!=null&&l.trim()&&r.set("q",t.q.trim()),t.type&&r.set("type",t.type),(c=t.tag)!=null&&c.trim()&&r.set("tag",t.tag.trim()),t.sort&&r.set("sort",t.sort),typeof t.page=="number"&&Number.isFinite(t.page)&&r.set("page",String(Math.max(1,Math.trunc(t.page)))),typeof t.pageSize=="number"&&Number.isFinite(t.pageSize)&&r.set("pageSize",String(Math.max(1,Math.trunc(t.pageSize))));const o=r.toString(),a=await at.get(o?`/api/marketplace/items?${o}`:"/api/marketplace/items");if(!a.ok)throw new Error(a.error.message);return a.data}async function YR(t){const r=await at.post("/api/marketplace/install",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function XR(){const t=await at.get("/api/marketplace/installed");if(!t.ok)throw new Error(t.error.message);return t.data}async function JR(t){const r=await at.post("/api/marketplace/manage",t);if(!r.ok)throw new Error(r.error.message);return r.data}function ZR(t){return ao({queryKey:["marketplace-items",t],queryFn:()=>GR(t),staleTime:15e3})}function ej(){return ao({queryKey:["marketplace-installed"],queryFn:XR,staleTime:1e4})}function tj(){const t=Yt();return an({mutationFn:r=>YR(r),onSuccess:r=>{t.invalidateQueries({queryKey:["marketplace-installed"]}),t.refetchQueries({queryKey:["marketplace-installed"],type:"active"}),t.refetchQueries({queryKey:["marketplace-items"],type:"active"}),Ue.success(r.message||`${r.type} ${E("marketplaceInstalledCountSuffix")}`)},onError:r=>{Ue.error(r.message||E("marketplaceInstallFailed"))}})}function nj(){const t=Yt();return an({mutationFn:r=>JR(r),onSuccess:r=>{t.invalidateQueries({queryKey:["marketplace-installed"]}),t.invalidateQueries({queryKey:["marketplace-items"]}),t.refetchQueries({queryKey:["marketplace-installed"],type:"active"}),t.refetchQueries({queryKey:["marketplace-items"],type:"active"}),Ue.success(r.message||`${r.action} success`)},onError:r=>{Ue.error(r.message||E("marketplaceOperationFailed"))}})}const rj=12;function ff(t){return(t??"").trim().toLowerCase()}function Cs(t,r){const o=ff(r);return o.length>0?`${t}:${o}`:""}function oj(t){const r=new Map;for(const o of t){const a=[o.install.spec,o.slug,o.id];for(const l of a){const c=Cs(o.type,l);!c||r.has(c)||r.set(c,o)}}return r}function sj(t){const r=new Map;for(const o of t){const a=[o.spec,o.id,o.label];for(const l of a){const c=Cs(o.type,l);!c||r.has(c)||r.set(c,o)}}return r}function aj(t,r){const o=[t.install.spec,t.slug,t.id];for(const a of o){const l=Cs(t.type,a);if(!l)continue;const c=r.get(l);if(c)return c}}function ij(t,r){const o=r.get(Cs(t.type,t.spec));if(o)return o;const a=r.get(Cs(t.type,t.id));return a||r.get(Cs(t.type,t.label))}function lj(t,r,o){const a=ff(o);return a?[t.id,t.spec,t.label,r==null?void 0:r.name,r==null?void 0:r.slug,r==null?void 0:r.summary,...(r==null?void 0:r.tags)??[]].map(c=>ff(c)).filter(Boolean).some(c=>c.includes(a)):!0}function cj(t){const r=["bg-amber-600","bg-orange-500","bg-yellow-600","bg-emerald-600","bg-teal-600","bg-cyan-600","bg-stone-600","bg-rose-500","bg-violet-500"];let o=0;for(let a=0;a<t.length;a++)o=t.charCodeAt(a)+((o<<5)-o);return r[Math.abs(o)%r.length]}function uj({name:t,fallback:r}){const o=t||r,a=o.substring(0,2).toUpperCase(),l=cj(o);return u.jsx("div",{className:ge("flex items-center justify-center w-10 h-10 rounded-xl text-white font-semibold text-sm shrink-0",l),children:a})}function dj(t){return u.jsx("div",{className:"mb-4",children:u.jsxs("div",{className:"flex gap-3 items-center",children:[u.jsxs("div",{className:"flex-1 min-w-0 relative",children:[u.jsx(_k,{className:"h-4 w-4 text-gray-400 absolute left-3 top-1/2 -translate-y-1/2"}),u.jsx("input",{value:t.searchText,onChange:r=>t.onSearchTextChange(r.target.value),placeholder:E("marketplaceSearchPlaceholder"),className:"w-full h-9 border border-gray-200/80 rounded-xl pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40"})]}),u.jsx("div",{className:"inline-flex h-9 rounded-xl bg-gray-100/80 p-1 shrink-0",children:[{value:"all",label:E("marketplaceFilterAll")},{value:"plugin",label:E("marketplaceFilterPlugins")},{value:"skill",label:E("marketplaceFilterSkills")}].map(r=>u.jsx("button",{type:"button",onClick:()=>t.onTypeFilterChange(r.value),className:ge("px-3 rounded-lg text-sm font-medium transition-all whitespace-nowrap",t.typeFilter===r.value?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),children:r.label},r.value))}),t.scope==="all"&&u.jsxs(so,{value:t.sort,onValueChange:r=>t.onSortChange(r),children:[u.jsx(vr,{className:"h-9 w-[150px] shrink-0 rounded-lg",children:u.jsx(Bo,{})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"relevance",children:E("marketplaceSortRelevance")}),u.jsx(Ct,{value:"updated",children:E("marketplaceSortUpdated")})]})]})]})})}function Xg(t){var C,R,j,P;const r=t.record,o=(r==null?void 0:r.type)==="plugin"?r:void 0,a=((C=t.item)==null?void 0:C.type)??(r==null?void 0:r.type),l=((R=t.item)==null?void 0:R.name)??(r==null?void 0:r.label)??(r==null?void 0:r.id)??(r==null?void 0:r.spec)??E("marketplaceUnknownItem"),c=((j=t.item)==null?void 0:j.summary)??(r?E("marketplaceInstalledLocalSummary"):""),f=((P=t.item)==null?void 0:P.install.spec)??(r==null?void 0:r.spec)??"",h=(r==null?void 0:r.id)||(r==null?void 0:r.spec),g=!!h&&t.manageState.isPending&&t.manageState.targetId===h,y=!!o,x=(r==null?void 0:r.type)==="plugin"&&r.origin!=="bundled",b=(r==null?void 0:r.type)==="skill"&&r.source==="workspace",k=!!(x||b),w=r?r.enabled===!1||r.runtimeStatus==="disabled":!1,N=t.installState.isPending&&t.item&&t.installState.installingSpec===t.item.install.spec,v=E(a==="plugin"?"marketplaceTypePlugin":a==="skill"?"marketplaceTypeSkill":"marketplaceTypeExtension");return u.jsxs("article",{className:"group bg-white border border-gray-200/40 hover:border-gray-200/80 rounded-2xl px-5 py-4 hover:shadow-md shadow-sm transition-all flex items-start gap-3.5 justify-between cursor-default",children:[u.jsxs("div",{className:"flex gap-3 min-w-0 flex-1 h-full items-start",children:[u.jsx(uj,{name:l,fallback:f||E("marketplaceTypeExtension")}),u.jsx("div",{className:"min-w-0 flex-1 flex flex-col justify-center h-full",children:u.jsxs(qR,{delayDuration:400,children:[u.jsxs(Pd,{children:[u.jsx(Rd,{asChild:!0,children:u.jsx("div",{className:"text-[14px] font-semibold text-gray-900 truncate leading-tight cursor-default",children:l})}),u.jsx(Wl,{className:"max-w-[300px] text-xs",children:l})]}),u.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5 mb-1.5",children:[u.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:v}),f&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-[10px] text-gray-300",children:"•"}),u.jsxs(Pd,{children:[u.jsx(Rd,{asChild:!0,children:u.jsx("span",{className:"text-[11px] text-gray-400 truncate max-w-full font-mono cursor-default",children:f})}),u.jsx(Wl,{className:"max-w-[300px] text-xs font-mono break-all",children:f})]})]})]}),u.jsxs(Pd,{children:[u.jsx(Rd,{asChild:!0,children:u.jsx("p",{className:"text-[12px] text-gray-500/90 line-clamp-1 transition-colors leading-relaxed text-left cursor-default",children:c})}),c&&u.jsx(Wl,{className:"max-w-[400px] text-xs leading-relaxed",children:c})]})]})})]}),u.jsxs("div",{className:"shrink-0 flex items-center h-full",children:[t.item&&!r&&u.jsx("button",{onClick:()=>t.onInstall(t.item),disabled:t.installState.isPending,className:"inline-flex items-center gap-1.5 h-8 px-4 rounded-xl text-xs font-medium bg-primary text-white hover:bg-primary-600 disabled:opacity-50 transition-colors",children:E(N?"marketplaceInstalling":"marketplaceInstall")}),o&&y&&u.jsx("button",{disabled:t.manageState.isPending,onClick:()=>t.onManage(w?"enable":"disable",o),className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-gray-200/80 text-gray-600 bg-white hover:bg-gray-50 hover:border-gray-300 disabled:opacity-50 transition-colors",children:g&&t.manageState.action!=="uninstall"?t.manageState.action==="enable"?E("marketplaceEnabling"):E("marketplaceDisabling"):E(w?"marketplaceEnable":"marketplaceDisable")}),r&&k&&u.jsx("button",{disabled:t.manageState.isPending,onClick:()=>t.onManage("uninstall",r),className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-rose-100 text-rose-500 bg-white hover:bg-rose-50 hover:border-rose-200 disabled:opacity-50 transition-colors",children:g&&t.manageState.action==="uninstall"?E("marketplaceRemoving"):E("marketplaceUninstall")})]})]})}function fj(t){return u.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[u.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:t.onPrev,disabled:t.page<=1||t.busy,children:E("prev")}),u.jsx("div",{className:"text-sm text-gray-600 min-w-20 text-center",children:t.totalPages===0?"0 / 0":`${t.page} / ${t.totalPages}`}),u.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:t.onNext,disabled:t.totalPages===0||t.page>=t.totalPages||t.busy,children:E("next")})]})}function hj(){var G,ie,ce,K,q,Q,M,F,le;const[t,r]=m.useState(""),[o,a]=m.useState(""),[l,c]=m.useState("all"),[f,h]=m.useState("all"),[g,y]=m.useState("relevance"),[x,b]=m.useState(1);m.useEffect(()=>{const J=setTimeout(()=>{b(1),a(t.trim())},250);return()=>clearTimeout(J)},[t]);const k=ej(),w=ZR({q:o||void 0,type:f==="all"?void 0:f,sort:g,page:x,pageSize:rj}),N=tj(),v=nj(),{confirm:C,ConfirmDialog:R}=Jf(),j=m.useMemo(()=>{var J;return((J=k.data)==null?void 0:J.records)??[]},[(G=k.data)==null?void 0:G.records]),P=m.useMemo(()=>{var J;return((J=w.data)==null?void 0:J.items)??[]},[(ie=w.data)==null?void 0:ie.items]),A=m.useMemo(()=>oj(P),[P]),$=m.useMemo(()=>sj(j),[j]),B=m.useMemo(()=>{const J=j.filter(ue=>f==="all"?!0:ue.type===f).map(ue=>({key:`${ue.type}:${ue.spec}:${ue.id??""}`,record:ue,item:ij(ue,A)})).filter(ue=>lj(ue.record,ue.item,o));return J.sort((ue,xe)=>{const ne=ue.record.installedAt?Date.parse(ue.record.installedAt):Number.NaN,he=xe.record.installedAt?Date.parse(xe.record.installedAt):Number.NaN,be=!Number.isNaN(ne),Ce=!Number.isNaN(he);return be&&Ce&&ne!==he?he-ne:ue.record.spec.localeCompare(xe.record.spec)}),J},[j,f,A,o]),H=l==="installed"?B.length:((ce=w.data)==null?void 0:ce.total)??0,X=l==="installed"?1:((K=w.data)==null?void 0:K.totalPages)??0,W=m.useMemo(()=>l==="installed"?k.isLoading?E("loading"):`${B.length} ${E("marketplaceInstalledCountSuffix")}`:w.data?`${P.length} / ${H}`:E("loading"),[l,k.isLoading,B.length,w.data,P.length,H]),Y={isPending:N.isPending,installingSpec:(q=N.variables)==null?void 0:q.spec},_={isPending:v.isPending,targetId:((Q=v.variables)==null?void 0:Q.id)||((M=v.variables)==null?void 0:M.spec),action:(F=v.variables)==null?void 0:F.action},O=[{id:"all",label:E("marketplaceTabMarketplace")},{id:"installed",label:E("marketplaceTabInstalled"),count:((le=k.data)==null?void 0:le.total)??0}],Z=J=>{N.isPending||N.mutate({type:J.type,spec:J.install.spec,kind:J.install.kind})},ee=async(J,ue)=>{if(v.isPending)return;const xe=ue.id||ue.spec;xe&&(J==="uninstall"&&!await C({title:`${E("marketplaceUninstallTitle")} ${xe}?`,description:E("marketplaceUninstallDescription"),confirmLabel:E("marketplaceUninstall"),variant:"destructive"})||v.mutate({type:ue.type,action:J,id:xe,spec:ue.spec}))};return u.jsxs("div",{className:"animate-fade-in pb-20",children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:E("marketplacePageTitle")}),u.jsx("p",{className:"text-[12px] text-gray-400 mt-0.5",children:E("marketplacePageDescription")})]}),u.jsx(Yf,{tabs:O,activeTab:l,onChange:J=>{c(J),b(1)},className:"mb-4"}),u.jsx(dj,{scope:l,searchText:t,typeFilter:f,sort:g,onSearchTextChange:r,onTypeFilterChange:J=>{b(1),h(J)},onSortChange:J=>{b(1),y(J)}}),u.jsxs("section",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900",children:E(l==="installed"?"marketplaceSectionInstalled":"marketplaceSectionExtensions")}),u.jsx("span",{className:"text-[12px] text-gray-500",children:W})]}),l==="all"&&w.isError&&u.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[E("marketplaceErrorLoadingData"),": ",w.error.message]}),l==="installed"&&k.isError&&u.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[E("marketplaceErrorLoadingInstalled"),": ",k.error.message]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-3",children:[l==="all"&&P.map(J=>u.jsx(Xg,{item:J,record:aj(J,$),installState:Y,manageState:_,onInstall:Z,onManage:ee},J.id)),l==="installed"&&B.map(J=>u.jsx(Xg,{item:J.item,record:J.record,installState:Y,manageState:_,onInstall:Z,onManage:ee},J.key))]}),l==="all"&&!w.isLoading&&!w.isError&&P.length===0&&u.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:E("marketplaceNoItems")}),l==="installed"&&!k.isLoading&&!k.isError&&B.length===0&&u.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:E("marketplaceNoInstalledItems")})]}),l==="all"&&u.jsx(fj,{page:x,totalPages:X,busy:w.isFetching,onPrev:()=>b(J=>Math.max(1,J-1)),onNext:()=>b(J=>X>0?Math.min(X,J+1):J+1)}),u.jsx(R,{})]})}class pj{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 o=JSON.parse(r.data);this.emit(o)}catch(o){console.error("Failed to parse WebSocket message:",o)}},this.ws.onclose=()=>{console.log("WebSocket disconnected"),this.manualClose||this.scheduleReconnect()},this.ws.onerror=r=>{console.error("WebSocket error:",r)}}on(r,o){this.handlers.has(r)||this.handlers.set(r,new Set),this.handlers.get(r).add(o)}off(r,o){var a;(a=this.handlers.get(r))==null||a.delete(o)}emit(r){const o=this.handlers.get(r.type);o==null||o.forEach(a=>a(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 mj(t){const[r,o]=m.useState(null),{setConnectionStatus:a}=oi();return m.useEffect(()=>{const l=(()=>{const f=Bl==null?void 0:Bl.replace(/\/$/,"");if(!f)return"ws://127.0.0.1:18791/ws";try{const h=new URL(f,window.location.origin);return`${h.protocol==="https:"?"wss:":h.protocol==="http:"?"ws:":h.protocol}//${h.host}/ws`}catch{return f.startsWith("wss://")||f.startsWith("ws://")?`${f}/ws`:f.startsWith("https://")?`${f.replace(/^https:/,"wss:")}/ws`:f.startsWith("http://")?`${f.replace(/^http:/,"ws:")}/ws`:`${f}/ws`}})(),c=new pj(l);return c.on("connection.open",()=>{a("connected")}),c.on("config.updated",()=>{t&&t.invalidateQueries({queryKey:["config"]})}),c.on("error",f=>{f.type==="error"&&console.error("WebSocket error:",f.payload.message)}),c.connect(),o(c),()=>c.disconnect()},[a,t]),r}const Jg=new bS({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0}}});function gj(){mj(Jg);const t=wr();return u.jsxs(SS,{client:Jg,children:[u.jsx(xN,{children:u.jsx("div",{className:"animate-fade-in w-full h-full",children:u.jsxs(xb,{children:[u.jsx($n,{path:"/model",element:u.jsx(PP,{})}),u.jsx($n,{path:"/providers",element:u.jsx(rR,{})}),u.jsx($n,{path:"/channels",element:u.jsx(uR,{})}),u.jsx($n,{path:"/runtime",element:u.jsx(pR,{})}),u.jsx($n,{path:"/sessions",element:u.jsx(wR,{})}),u.jsx($n,{path:"/cron",element:u.jsx(PR,{})}),u.jsx($n,{path:"/marketplace",element:u.jsx(hj,{})}),u.jsx($n,{path:"/",element:u.jsx(Qm,{to:"/model",replace:!0})}),u.jsx($n,{path:"*",element:u.jsx(Qm,{to:"/model",replace:!0})})]})},t.pathname)}),u.jsx(fP,{position:"top-right",richColors:!0})]})}S1.createRoot(document.getElementById("root")).render(u.jsx(m.StrictMode,{children:u.jsx(Jk,{children:u.jsx(Wb,{children:u.jsx(gj,{})})})}));
341
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return m.useEffect(()=>{t&&(document.getElementById(t)||console.error(o))},[o,t]),null},VP="DialogDescriptionWarning",KP=({contentRef:t,descriptionId:r})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Z0(VP).contentName}}.`;return m.useEffect(()=>{var c;const l=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&l&&(document.getElementById(r)||console.warn(a))},[a,t,r]),null},QP=U0,qP=H0,ex=W0,tx=V0,nx=Q0,rx=G0,GP=X0;const Xf=QP,YP=qP,ox=m.forwardRef(({className:t,...r},o)=>u.jsx(ex,{ref:o,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",t),...r}));ox.displayName=ex.displayName;const bc=m.forwardRef(({className:t,children:r,...o},a)=>u.jsxs(YP,{children:[u.jsx(ox,{}),u.jsxs(tx,{ref:a,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/50 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-2xl",t),...o,children:[r,u.jsxs(GP,{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:[u.jsx(zf,{className:"h-4 w-4 text-gray-500"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bc.displayName=tx.displayName;const Sc=({className:t,...r})=>u.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",t),...r});Sc.displayName="DialogHeader";const kc=({className:t,...r})=>u.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-3",t),...r});kc.displayName="DialogFooter";const Cc=m.forwardRef(({className:t,...r},o)=>u.jsx(nx,{ref:o,className:me("text-lg font-semibold leading-tight tracking-tight text-gray-900",t),...r}));Cc.displayName=nx.displayName;const Ec=m.forwardRef(({className:t,...r},o)=>u.jsx(rx,{ref:o,className:me("text-sm text-gray-500 leading-relaxed",t),...r}));Ec.displayName=rx.displayName;function XP({maskedValue:t,isSet:r,className:o,...a}){const[l,c]=m.useState(!1);return u.jsxs("div",{className:"relative",children:[u.jsx(We,{type:l?"text":"password",className:me("pr-20",o),placeholder:r?`${E("apiKeySet")} (${E("unchanged")})`:"",...a}),u.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:(r||t)&&u.jsx(Ve,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>c(!l),children:l?u.jsx(Mk,{className:"h-4 w-4"}):u.jsx(Ik,{className:"h-4 w-4"})})})]})}function JP({value:t,onChange:r,className:o}){const a=t?Object.entries(t):[],l=(h,g,y)=>{const x=[...a];x[h]=[g,y],r(Object.fromEntries(x))},c=()=>{r({...t,"":""})},f=h=>{const g=a.filter((y,x)=>x!==h);r(Object.fromEntries(g))};return u.jsxs("div",{className:me("space-y-2",o),children:[a.map(([h,g],y)=>u.jsxs("div",{className:"flex gap-2",children:[u.jsx(We,{type:"text",value:h,onChange:x=>l(y,x.target.value,g),placeholder:E("headerName"),className:"flex-1"}),u.jsx(We,{type:"text",value:g,onChange:x=>l(y,h,x.target.value),placeholder:E("headerValue"),className:"flex-1"}),u.jsx(Ve,{type:"button",variant:"ghost",size:"icon",onClick:()=>f(y),children:u.jsx(Xl,{className:"h-4 w-4 text-red-500"})})]},y)),u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:c,children:[u.jsx(Yd,{className:"h-4 w-4 mr-2"}),E("add")]})]})}function ZP(){const{providerModal:t,closeProviderModal:r}=ai(),{data:o}=Ys(),{data:a}=Qf(),{data:l}=Xs(),c=gP(),[f,h]=m.useState(""),[g,y]=m.useState(""),[x,b]=m.useState(null),[k,w]=m.useState("auto"),N=t.provider,v=a==null?void 0:a.providers.find(W=>W.name===N),C=N?o==null?void 0:o.providers[N]:null,R=l==null?void 0:l.uiHints,j=N?yt(`providers.${N}.apiKey`,R):void 0,P=N?yt(`providers.${N}.apiBase`,R):void 0,A=N?yt(`providers.${N}.extraHeaders`,R):void 0,$=N?yt(`providers.${N}.wireApi`,R):void 0;m.useEffect(()=>{if(C){y(C.apiBase||(v==null?void 0:v.defaultApiBase)||""),b(C.extraHeaders||null),h("");const W=C.wireApi||(v==null?void 0:v.defaultWireApi)||"auto";w(W)}},[C,v]);const B=W=>{W.preventDefault();const X={};if(f!==""&&(X.apiKey=f),g&&g!==(v==null?void 0:v.defaultApiBase)&&(X.apiBase=g),x&&Object.keys(x).length>0&&(X.extraHeaders=x),v!=null&&v.supportsWireApi){const H=(C==null?void 0:C.wireApi)||v.defaultWireApi||"auto";k!==H&&(X.wireApi=k)}N&&c.mutate({provider:N,data:X},{onSuccess:()=>r()})};return u.jsx(Xf,{open:t.open,onOpenChange:r,children:u.jsxs(bc,{className:"sm:max-w-[500px]",children:[u.jsx(Sc,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center",children:u.jsx(Yl,{className:"h-5 w-5 text-white"})}),u.jsxs("div",{children:[u.jsx(Cc,{children:(v==null?void 0:v.displayName)||N}),u.jsx(Ec,{children:E("providerFormDescription")})]})]})}),u.jsxs("form",{onSubmit:B,className:"flex flex-col pt-2",children:[u.jsxs("div",{className:"space-y-5 max-h-[60vh] overflow-y-auto pr-1",children:[u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"apiKey",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(Yl,{className:"h-3.5 w-3.5 text-gray-500"}),(j==null?void 0:j.label)??E("apiKey")]}),u.jsx(XP,{id:"apiKey",value:f,isSet:C==null?void 0:C.apiKeySet,onChange:W=>h(W.target.value),placeholder:C!=null&&C.apiKeySet?E("apiKeySet"):(j==null?void 0:j.placeholder)??E("enterApiKey"),className:"rounded-xl"})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"apiBase",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(lv,{className:"h-3.5 w-3.5 text-gray-500"}),(P==null?void 0:P.label)??E("apiBase")]}),u.jsx(We,{id:"apiBase",type:"text",value:g,onChange:W=>y(W.target.value),placeholder:(v==null?void 0:v.defaultApiBase)||(P==null?void 0:P.placeholder)||"https://api.example.com",className:"rounded-xl"}),(P==null?void 0:P.help)&&u.jsx("p",{className:"text-xs text-gray-500",children:P.help})]}),(v==null?void 0:v.supportsWireApi)&&u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:"wireApi",className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(Gl,{className:"h-3.5 w-3.5 text-gray-500"}),($==null?void 0:$.label)??E("wireApi")]}),u.jsxs(so,{value:k,onValueChange:W=>w(W),children:[u.jsx(vr,{className:"rounded-xl",children:u.jsx(Bo,{})}),u.jsx(xr,{children:(v.wireApiOptions||["auto","chat","responses"]).map(W=>u.jsx(Ct,{value:W,children:E(W==="chat"?"wireApiChat":W==="responses"?"wireApiResponses":"wireApiAuto")},W))})]})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[u.jsx(Gl,{className:"h-3.5 w-3.5 text-gray-500"}),(A==null?void 0:A.label)??E("extraHeaders")]}),u.jsx(JP,{value:x,onChange:b})]})]}),u.jsxs(kc,{className:"pt-4 flex-shrink-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:r,children:E("cancel")}),u.jsx(Ve,{type:"submit",disabled:c.isPending,children:c.isPending?E("saving"):E("save")})]})]})]})})}function Jf({tabs:t,activeTab:r,onChange:o,className:a}){return u.jsx("div",{className:me("flex items-center gap-6 border-b border-gray-200/60 mb-6",a),children:t.map(l=>{const c=r===l.id;return u.jsxs("button",{onClick:()=>o(l.id),className:me("relative pb-3 text-[14px] font-medium transition-all duration-fast flex items-center gap-1.5",c?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[l.label,l.count!==void 0&&u.jsx("span",{className:me("text-[11px] font-medium","text-gray-500"),children:tv(l.count)}),c&&u.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-primary rounded-full"})]},l.id)})})}function sx({name:t,src:r,className:o,imgClassName:a,fallback:l}){const[c,f]=m.useState(!1),h=!!r&&!c;return u.jsx("div",{className:me("flex items-center justify-center",o),children:h?u.jsx("img",{src:r,alt:`${t} logo`,className:me("h-6 w-6 object-contain",a),onError:()=>f(!0),draggable:!1}):l??u.jsx("span",{className:"text-lg font-bold uppercase",children:t.slice(0,1)})})}const eR={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"},tR={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 ax(t,r){const o=r.toLowerCase(),a=t[o];return a?`/logos/${a}`:null}function nR(t){return ax(eR,t)}function rR(t){return ax(tR,t)}function ix({children:t,onClick:r,className:o}){return u.jsx("div",{onClick:r,className:me("group relative flex flex-col p-6 rounded-2xl border border-gray-200/50 bg-white shadow-card","transition-all duration-base cursor-pointer","hover:shadow-card-hover hover:border-gray-200",o),children:t})}function lx({children:t,className:r}){return u.jsx("div",{className:me("flex items-start justify-between mb-4",r),children:t})}function cx({title:t,description:r,className:o}){return u.jsxs("div",{className:me("flex-1",o),children:[u.jsx("h3",{className:"text-[14px] font-bold text-gray-900 mb-0.5",children:t}),r&&u.jsx("p",{className:"text-[12px] text-gray-400 leading-relaxed line-clamp-2",children:r})]})}function ux({children:t,className:r}){return u.jsx("div",{className:me("mt-4 pt-3 flex items-center justify-between",r),children:t})}const oR={active:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},ready:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},inactive:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},setup:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},warning:{dot:"bg-amber-400",text:"text-amber-600",bg:"bg-amber-50"}};function dx({status:t,label:r,className:o}){const a=oR[t];return u.jsxs("div",{className:me("flex items-center gap-1.5 px-2 py-0.5 rounded-full",a.bg,o),children:[u.jsx("span",{className:me("h-1.5 w-1.5 rounded-full",a.dot)}),u.jsx("span",{className:me("text-[11px] font-medium",a.text),children:r})]})}function fx({label:t,className:r,onClick:o}){return u.jsxs("span",{onClick:o,className:me("inline-flex items-center gap-1 text-[13px] font-medium text-gray-600 hover:text-primary transition-colors cursor-pointer group/action",r),children:[t,u.jsx(ov,{className:"h-3 w-3 transition-transform group-hover/action:translate-x-0.5"})]})}function sR(){const{data:t}=Ys(),{data:r}=Qf(),{data:o}=Xs(),{openProviderModal:a}=ai(),[l,c]=m.useState("installed"),f=o==null?void 0:o.uiHints;if(!t||!r)return u.jsx("div",{className:"p-8",children:E("providersLoading")});const h=[{id:"installed",label:E("providersTabConfigured"),count:t.providers?Object.keys(t.providers).filter(y=>t.providers[y].apiKeySet).length:0},{id:"all",label:E("providersTabAll"),count:r.providers.length}],g=l==="installed"?r.providers.filter(y=>{var x;return(x=t.providers[y.name])==null?void 0:x.apiKeySet}):r.providers;return u.jsxs(Wo,{children:[u.jsx(Vo,{title:E("providersPageTitle")}),u.jsx(Jf,{tabs:h,activeTab:l,onChange:c}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:g.map(y=>{const x=t.providers[y.name],b=x==null?void 0:x.apiKeySet,k=yt(`providers.${y.name}`,f),w=(k==null?void 0:k.help)||E("providersDefaultDescription");return u.jsxs(ix,{onClick:()=>a(y.name),children:[u.jsxs(lx,{children:[u.jsx(sx,{name:y.name,src:nR(y.name),className:me("h-11 w-11 rounded-xl border transition-all",b?"bg-white border-primary/30":"bg-white border-gray-200/60 group-hover:border-gray-300"),imgClassName:"h-6 w-6",fallback:u.jsx("span",{className:me("text-base font-semibold uppercase",b?"text-gray-800":"text-gray-400"),children:y.name[0]})}),u.jsx(dx,{status:b?"ready":"setup",label:E(b?"statusReady":"statusSetup")})]}),u.jsx(cx,{title:y.displayName||y.name,description:w}),u.jsx(ux,{children:u.jsx(fx,{label:E(b?"actionConfigure":"actionAddProvider")})})]},y.name)})}),g.length===0&&u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u.jsx("div",{className:"h-14 w-14 flex items-center justify-center rounded-xl bg-gray-100/80 mb-4",children:u.jsx(Yl,{className:"h-6 w-6 text-gray-300"})}),u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900 mb-1.5",children:E("providersEmptyTitle")}),u.jsx("p",{className:"text-[13px] text-gray-400 max-w-sm",children:E("providersEmptyDescription")})]}),u.jsx(ZP,{})]})}const Zf=m.forwardRef(({className:t,checked:r=!1,onCheckedChange:o,...a},l)=>u.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:l,className:me("peer inline-flex h-[22px] w-10 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/80 hover:bg-gray-300/80",t),onClick:()=>o==null?void 0:o(!r),...a,children:u.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")})}));Zf.displayName="Switch";function aR({value:t,onChange:r,className:o,placeholder:a=""}){const[l,c]=m.useState(""),f=g=>{g.key==="Enter"&&l.trim()?(g.preventDefault(),r([...t,l.trim()]),c("")):g.key==="Backspace"&&!l&&t.length>0&&r(t.slice(0,-1))},h=g=>{r(t.filter((y,x)=>x!==g))};return u.jsxs("div",{className:me("flex flex-wrap gap-2 p-2 border rounded-md min-h-[42px]",o),children:[t.map((g,y)=>u.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded text-sm",children:[g,u.jsx("button",{type:"button",onClick:()=>h(y),className:"hover:text-red-300 transition-colors",children:u.jsx(zf,{className:"h-3 w-3"})})]},y)),u.jsx("input",{type:"text",value:l,onChange:g=>c(g.target.value),onKeyDown:f,className:"flex-1 outline-none min-w-[100px] bg-transparent text-sm",placeholder:a||E("enterTag")})]})}const Kg=[{value:"pairing",label:"pairing"},{value:"allowlist",label:"allowlist"},{value:"open",label:"open"},{value:"disabled",label:"disabled"}],Qg=[{value:"open",label:"open"},{value:"allowlist",label:"allowlist"},{value:"disabled",label:"disabled"}],iR=[{value:"off",label:"off"},{value:"partial",label:"partial"},{value:"block",label:"block"},{value:"progress",label:"progress"}],lR=t=>t.includes("token")||t.includes("secret")||t.includes("password")?u.jsx(Yl,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("url")||t.includes("host")?u.jsx(lv,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("email")||t.includes("mail")?u.jsx(Af,{className:"h-3.5 w-3.5 text-gray-500"}):t.includes("id")||t.includes("from")?u.jsx(Gl,{className:"h-3.5 w-3.5 text-gray-500"}):t==="enabled"||t==="consentGranted"?u.jsx(qk,{className:"h-3.5 w-3.5 text-gray-500"}):u.jsx(uv,{className:"h-3.5 w-3.5 text-gray-500"});function qg(){return{telegram:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"token",type:"password",label:E("botToken")},{name:"allowFrom",type:"tags",label:E("allowFrom")},{name:"proxy",type:"text",label:E("proxy")},{name:"accountId",type:"text",label:E("accountId")},{name:"dmPolicy",type:"select",label:E("dmPolicy"),options:Kg},{name:"groupPolicy",type:"select",label:E("groupPolicy"),options:Qg},{name:"groupAllowFrom",type:"tags",label:E("groupAllowFrom")},{name:"requireMention",type:"boolean",label:E("requireMention")},{name:"mentionPatterns",type:"tags",label:E("mentionPatterns")},{name:"groups",type:"json",label:E("groupRulesJson")}],discord:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"token",type:"password",label:E("botToken")},{name:"allowBots",type:"boolean",label:E("allowBotMessages")},{name:"allowFrom",type:"tags",label:E("allowFrom")},{name:"gatewayUrl",type:"text",label:E("gatewayUrl")},{name:"intents",type:"number",label:E("intents")},{name:"proxy",type:"text",label:E("proxy")},{name:"mediaMaxMb",type:"number",label:E("attachmentMaxSizeMb")},{name:"streaming",type:"select",label:E("streamingMode"),options:iR},{name:"draftChunk",type:"json",label:E("draftChunkingJson")},{name:"textChunkLimit",type:"number",label:E("textChunkLimit")},{name:"accountId",type:"text",label:E("accountId")},{name:"dmPolicy",type:"select",label:E("dmPolicy"),options:Kg},{name:"groupPolicy",type:"select",label:E("groupPolicy"),options:Qg},{name:"groupAllowFrom",type:"tags",label:E("groupAllowFrom")},{name:"requireMention",type:"boolean",label:E("requireMention")},{name:"mentionPatterns",type:"tags",label:E("mentionPatterns")},{name:"groups",type:"json",label:E("groupRulesJson")}],whatsapp:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"bridgeUrl",type:"text",label:E("bridgeUrl")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],feishu:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"appId",type:"text",label:E("appId")},{name:"appSecret",type:"password",label:E("appSecret")},{name:"encryptKey",type:"password",label:E("encryptKey")},{name:"verificationToken",type:"password",label:E("verificationToken")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],dingtalk:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"clientId",type:"text",label:E("clientId")},{name:"clientSecret",type:"password",label:E("clientSecret")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],wecom:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"corpId",type:"text",label:E("corpId")},{name:"agentId",type:"text",label:E("agentId")},{name:"secret",type:"password",label:E("secret")},{name:"token",type:"password",label:E("token")},{name:"callbackPort",type:"number",label:E("callbackPort")},{name:"callbackPath",type:"text",label:E("callbackPath")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],slack:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"mode",type:"text",label:E("mode")},{name:"webhookPath",type:"text",label:E("webhookPath")},{name:"allowBots",type:"boolean",label:E("allowBotMessages")},{name:"botToken",type:"password",label:E("botToken")},{name:"appToken",type:"password",label:E("appToken")}],email:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"consentGranted",type:"boolean",label:E("consentGranted")},{name:"imapHost",type:"text",label:E("imapHost")},{name:"imapPort",type:"number",label:E("imapPort")},{name:"imapUsername",type:"text",label:E("imapUsername")},{name:"imapPassword",type:"password",label:E("imapPassword")},{name:"fromAddress",type:"email",label:E("fromAddress")}],mochat:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"baseUrl",type:"text",label:E("baseUrl")},{name:"clawToken",type:"password",label:E("clawToken")},{name:"agentUserId",type:"text",label:E("agentUserId")},{name:"allowFrom",type:"tags",label:E("allowFrom")}],qq:[{name:"enabled",type:"boolean",label:E("enabled")},{name:"appId",type:"text",label:E("appId")},{name:"secret",type:"password",label:E("appSecret")},{name:"markdownSupport",type:"boolean",label:E("markdownSupport")},{name:"allowFrom",type:"tags",label:E("allowFrom")}]}}const Gg={telegram:ks,slack:ks,email:Af,default:ks},Yg={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 sc(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function hx(t,r){const o={...t};for(const[a,l]of Object.entries(r)){const c=o[a];if(sc(c)&&sc(l)){o[a]=hx(c,l);continue}o[a]=l}return o}function cR(t,r){const o=t.split("."),a={};let l=a;for(let c=0;c<o.length-1;c+=1){const f=o[c];l[f]={},l=l[f]}return l[o[o.length-1]]=r,a}function uR(){var H,Y;const{channelModal:t,closeChannelModal:r}=ai(),{data:o}=Ys(),{data:a}=Xs(),l=yP(),c=xP(),[f,h]=m.useState({}),[g,y]=m.useState({}),[x,b]=m.useState(null),k=t.channel,w=k?o==null?void 0:o.channels[k]:null,N=k?qg()[k]??[]:[],v=a==null?void 0:a.uiHints,C=k?`channels.${k}`:null,R=((H=a==null?void 0:a.actions)==null?void 0:H.filter(_=>_.scope===C))??[],j=k&&(((Y=yt(`channels.${k}`,v))==null?void 0:Y.label)??k);m.useEffect(()=>{if(w){h({...w});const _={};(k?qg()[k]??[]:[]).filter(Z=>Z.type==="json").forEach(Z=>{const ee=w[Z.name];_[Z.name]=JSON.stringify(ee??{},null,2)}),y(_)}else h({}),y({})},[w,k]);const P=(_,O)=>{h(Z=>({...Z,[_]:O}))},A=_=>{if(_.preventDefault(),!k)return;const O={...f};for(const Z of N){if(Z.type!=="json")continue;const ee=g[Z.name]??"";try{O[Z.name]=ee.trim()?JSON.parse(ee):{}}catch{Ue.error(`${E("invalidJson")}: ${Z.name}`);return}}l.mutate({channel:k,data:O},{onSuccess:()=>r()})},$=_=>{if(!_||!k)return;const O=_.channels;if(!sc(O))return;const Z=O[k];sc(Z)&&h(ee=>hx(ee,Z))},B=async _=>{if(!(!k||!C)){b(_.id);try{let O={...f};_.saveBeforeRun&&(O={...O,..._.savePatch??{}},h(O),await l.mutateAsync({channel:k,data:O}));const Z=await c.mutateAsync({actionId:_.id,data:{scope:C,draftConfig:cR(C,O)}});$(Z.patch),Z.ok?Ue.success(Z.message||E("success")):Ue.error(Z.message||E("error"))}catch(O){const Z=O instanceof Error?O.message:String(O);Ue.error(`${E("error")}: ${Z}`)}finally{b(null)}}},W=Gg[k||""]||Gg.default,X=Yg[k||""]||Yg.default;return u.jsx(Xf,{open:t.open,onOpenChange:r,children:u.jsxs(bc,{className:"sm:max-w-[550px] max-h-[85vh] overflow-hidden flex flex-col",children:[u.jsx(Sc,{children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:`h-10 w-10 rounded-xl bg-gradient-to-br ${X} flex items-center justify-center`,children:u.jsx(W,{className:"h-5 w-5 text-white"})}),u.jsxs("div",{children:[u.jsx(Cc,{className:"capitalize",children:j}),u.jsx(Ec,{children:E("configureMessageChannelParameters")})]})]})}),u.jsxs("form",{onSubmit:A,className:"flex flex-col flex-1 overflow-hidden",children:[u.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar py-2 pr-2 space-y-5",children:N.map(_=>{const O=k?yt(`channels.${k}.${_.name}`,v):void 0,Z=(O==null?void 0:O.label)??_.label,ee=O==null?void 0:O.placeholder;return u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs(fr,{htmlFor:_.name,className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[lR(_.name),Z]}),_.type==="boolean"&&u.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-gray-50",children:[u.jsx("span",{className:"text-sm text-gray-500",children:f[_.name]?E("enabled"):E("disabled")}),u.jsx(Zf,{id:_.name,checked:f[_.name]||!1,onCheckedChange:G=>P(_.name,G),className:"data-[state=checked]:bg-emerald-500"})]}),(_.type==="text"||_.type==="email")&&u.jsx(We,{id:_.name,type:_.type,value:f[_.name]||"",onChange:G=>P(_.name,G.target.value),placeholder:ee,className:"rounded-xl"}),_.type==="password"&&u.jsx(We,{id:_.name,type:"password",value:f[_.name]||"",onChange:G=>P(_.name,G.target.value),placeholder:ee??E("leaveBlankToKeepUnchanged"),className:"rounded-xl"}),_.type==="number"&&u.jsx(We,{id:_.name,type:"number",value:f[_.name]||0,onChange:G=>P(_.name,parseInt(G.target.value)||0),placeholder:ee,className:"rounded-xl"}),_.type==="tags"&&u.jsx(aR,{value:f[_.name]||[],onChange:G=>P(_.name,G)}),_.type==="select"&&u.jsxs(so,{value:f[_.name]||"",onValueChange:G=>P(_.name,G),children:[u.jsx(vr,{className:"rounded-xl",children:u.jsx(Bo,{})}),u.jsx(xr,{children:(_.options??[]).map(G=>u.jsx(Ct,{value:G.value,children:G.label},G.value))})]}),_.type==="json"&&u.jsx("textarea",{id:_.name,value:g[_.name]??"{}",onChange:G=>y(ie=>({...ie,[_.name]:G.target.value})),className:"min-h-[120px] w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono"})]},_.name)})}),u.jsxs(kc,{className:"pt-4 flex-shrink-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:r,children:E("cancel")}),u.jsx(Ve,{type:"submit",disabled:l.isPending||!!x,children:l.isPending?E("saving"):E("save")}),R.filter(_=>_.trigger==="manual").map(_=>u.jsx(Ve,{type:"button",onClick:()=>B(_),disabled:l.isPending||!!x,variant:"secondary",children:x===_.id?E("connecting"):_.title},_.id))]})]})]})})}const Xg={telegram:ks,slack:Vk,email:Af,webhook:Ek,default:Lf},dR={telegram:"channelDescTelegram",slack:"channelDescSlack",email:"channelDescEmail",webhook:"channelDescWebhook",discord:"channelDescDiscord",feishu:"channelDescFeishu"};function fR(){const{data:t}=Ys(),{data:r}=Qf(),{data:o}=Xs(),{openChannelModal:a}=ai(),[l,c]=m.useState("active"),f=o==null?void 0:o.uiHints;if(!t||!r)return u.jsx("div",{className:"p-8 text-gray-400",children:E("channelsLoading")});const h=[{id:"active",label:E("channelsTabEnabled"),count:r.channels.filter(y=>{var x;return(x=t.channels[y.name])==null?void 0:x.enabled}).length},{id:"all",label:E("channelsTabAll"),count:r.channels.length}],g=r.channels.filter(y=>{var b;const x=((b=t.channels[y.name])==null?void 0:b.enabled)||!1;return l==="all"||x});return u.jsxs(Wo,{children:[u.jsx(Vo,{title:E("channelsPageTitle")}),u.jsx(Jf,{tabs:h,activeTab:l,onChange:c}),u.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:g.map(y=>{const x=t.channels[y.name],b=(x==null?void 0:x.enabled)||!1,k=Xg[y.name]||Xg.default,w=yt(`channels.${y.name}`,f),N=(w==null?void 0:w.help)||E(dR[y.name]||"channelDescriptionDefault");return u.jsxs(ix,{onClick:()=>a(y.name),children:[u.jsxs(lx,{children:[u.jsx(sx,{name:y.name,src:rR(y.name),className:me("h-11 w-11 rounded-xl border transition-all",b?"bg-white border-primary/30":"bg-white border-gray-200/60 group-hover:border-gray-300"),imgClassName:"h-5 w-5",fallback:u.jsx(k,{className:"h-5 w-5"})}),u.jsx(dx,{status:b?"active":"inactive",label:E(b?"statusActive":"statusInactive")})]}),u.jsx(cx,{title:y.displayName||y.name,description:N}),u.jsxs(ux,{children:[u.jsx(fx,{label:E(b?"actionConfigure":"actionEnable")}),y.tutorialUrl&&u.jsx("a",{href:y.tutorialUrl,target:"_blank",rel:"noreferrer",onClick:v=>v.stopPropagation(),className:"flex items-center justify-center h-6 w-6 rounded-md text-gray-300 hover:text-gray-500 hover:bg-gray-100/60 transition-colors",title:E("channelsGuideTitle"),children:u.jsx(iv,{className:"h-3.5 w-3.5"})})]})]},y.name)})}),g.length===0&&u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u.jsx("div",{className:"h-14 w-14 flex items-center justify-center rounded-xl bg-gray-100/80 mb-4",children:u.jsx(Lf,{className:"h-6 w-6 text-gray-300"})}),u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900 mb-1.5",children:E("channelsEmptyTitle")}),u.jsx("p",{className:"text-[13px] text-gray-400 max-w-sm",children:E("channelsEmptyDescription")})]}),u.jsx(uR,{})]})}const hR=[{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 pR(){return{id:"",default:!1,workspace:"",model:"",maxTokens:void 0,contextTokens:void 0,maxToolIterations:void 0}}function mR(){return{agentId:"",match:{channel:"",accountId:""}}}function Rd(t){const r=t.trim();if(!r)return;const o=Number.parseInt(r,10);return Number.isFinite(o)?o:void 0}function gR(){const{data:t,isLoading:r}=Ys(),{data:o}=Xs(),a=vP(),[l,c]=m.useState([]),[f,h]=m.useState([]),[g,y]=m.useState("per-channel-peer"),[x,b]=m.useState(0),[k,w]=m.useState(2e5);m.useEffect(()=>{var H,Y,_;t&&(c((t.agents.list??[]).map(O=>({id:O.id??"",default:!!O.default,workspace:O.workspace??"",model:O.model??"",maxTokens:O.maxTokens,contextTokens:O.contextTokens,maxToolIterations:O.maxToolIterations}))),h((t.bindings??[]).map(O=>{var Z,ee,G;return{agentId:O.agentId??"",match:{channel:((Z=O.match)==null?void 0:Z.channel)??"",accountId:((ee=O.match)==null?void 0:ee.accountId)??"",peer:(G=O.match)!=null&&G.peer?{kind:O.match.peer.kind,id:O.match.peer.id}:void 0}}})),y(((H=t.session)==null?void 0:H.dmScope)??"per-channel-peer"),b(((_=(Y=t.session)==null?void 0:Y.agentToAgent)==null?void 0:_.maxPingPongTurns)??0),w(t.agents.defaults.contextTokens??2e5))},[t]);const N=o==null?void 0:o.uiHints,v=yt("session.dmScope",N),C=yt("session.agentToAgent.maxPingPongTurns",N),R=yt("agents.defaults.contextTokens",N),j=yt("agents.list.*.contextTokens",N),P=yt("agents.list",N),A=yt("bindings",N),$=m.useMemo(()=>{const H=new Set(["main"]);return l.forEach(Y=>{const _=Y.id.trim();_&&H.add(_)}),H},[l]),B=(H,Y)=>{c(_=>_.map((O,Z)=>Z===H?{...O,...Y}:O))},W=(H,Y)=>{h(_=>_.map((O,Z)=>Z===H?Y:O))},X=()=>{try{const H=l.map((O,Z)=>{var ie,ce;const ee=O.id.trim();if(!ee)throw new Error(E("agentIdRequiredError").replace("{index}",String(Z)));const G={id:ee};return O.default&&(G.default=!0),(ie=O.workspace)!=null&&ie.trim()&&(G.workspace=O.workspace.trim()),(ce=O.model)!=null&&ce.trim()&&(G.model=O.model.trim()),typeof O.maxTokens=="number"&&(G.maxTokens=O.maxTokens),typeof O.contextTokens=="number"&&(G.contextTokens=Math.max(1e3,O.contextTokens)),typeof O.maxToolIterations=="number"&&(G.maxToolIterations=O.maxToolIterations),G}),Y=H.map(O=>O.id).filter((O,Z,ee)=>ee.indexOf(O)!==Z);if(Y.length>0){Ue.error(`${E("duplicateAgentId")}: ${Y[0]}`);return}const _=f.map((O,Z)=>{var Q,M,F,le;const ee=O.agentId.trim(),G=O.match.channel.trim(),ie=((Q=O.match.accountId)==null?void 0:Q.trim())??"",ce=(M=O.match.peer)==null?void 0:M.kind,K=((le=(F=O.match.peer)==null?void 0:F.id)==null?void 0:le.trim())??"";if(!ee)throw new Error(E("bindingAgentIdRequired").replace("{index}",String(Z)));if(!$.has(ee))throw new Error(`${E("bindingAgentIdNotFound").replace("{index}",String(Z))}: ${ee}`);if(!G)throw new Error(E("bindingChannelRequired").replace("{index}",String(Z)));const q={agentId:ee,match:{channel:G}};if(ie&&(q.match.accountId=ie),ce){if(!K)throw new Error(E("bindingPeerIdRequired").replace("{index}",String(Z)));q.match.peer={kind:ce,id:K}}return q});a.mutate({data:{agents:{defaults:{contextTokens:Math.max(1e3,k)},list:H},bindings:_,session:{dmScope:g,agentToAgent:{maxPingPongTurns:Math.min(5,Math.max(0,x))}}}})}catch(H){const Y=H instanceof Error?H.message:String(H);Ue.error(Y)}};return r||!t?u.jsx("div",{className:"p-8 text-gray-400",children:E("runtimeLoading")}):u.jsxs(Wo,{className:"space-y-6",children:[u.jsx(Vo,{title:E("runtimePageTitle"),description:E("runtimePageDescription")}),u.jsxs(zo,{children:[u.jsxs($l,{children:[u.jsx(Bl,{children:(v==null?void 0:v.label)??E("dmScope")}),u.jsx(Hl,{children:(v==null?void 0:v.help)??E("dmScopeHelp")})]}),u.jsxs(Ba,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(R==null?void 0:R.label)??E("defaultContextTokens")}),u.jsx(We,{type:"number",min:1e3,step:1e3,value:k,onChange:H=>w(Math.max(1e3,Number.parseInt(H.target.value,10)||1e3))}),u.jsx("p",{className:"text-xs text-gray-500",children:(R==null?void 0:R.help)??E("defaultContextTokensHelp")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(v==null?void 0:v.label)??E("dmScope")}),u.jsxs(so,{value:g,onValueChange:H=>y(H),children:[u.jsx(vr,{children:u.jsx(Bo,{})}),u.jsx(xr,{children:hR.map(H=>u.jsx(Ct,{value:H.value,children:H.label},H.value))})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("label",{className:"text-sm font-medium text-gray-800",children:(C==null?void 0:C.label)??E("maxPingPongTurns")}),u.jsx(We,{type:"number",min:0,max:5,value:x,onChange:H=>b(Math.max(0,Number.parseInt(H.target.value,10)||0))}),u.jsx("p",{className:"text-xs text-gray-500",children:(C==null?void 0:C.help)??E("maxPingPongTurnsHelp")})]})]})]}),u.jsxs(zo,{children:[u.jsxs($l,{children:[u.jsx(Bl,{children:(P==null?void 0:P.label)??E("agentList")}),u.jsx(Hl,{children:(P==null?void 0:P.help)??E("agentListHelp")})]}),u.jsxs(Ba,{className:"space-y-3",children:[l.map((H,Y)=>u.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[u.jsx(We,{value:H.id,onChange:_=>B(Y,{id:_.target.value}),placeholder:E("agentIdPlaceholder")}),u.jsx(We,{value:H.workspace??"",onChange:_=>B(Y,{workspace:_.target.value}),placeholder:E("workspaceOverridePlaceholder")}),u.jsx(We,{value:H.model??"",onChange:_=>B(Y,{model:_.target.value}),placeholder:E("modelOverridePlaceholder")}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[u.jsx(We,{type:"number",min:1,value:H.maxTokens??"",onChange:_=>B(Y,{maxTokens:Rd(_.target.value)}),placeholder:E("maxTokensPlaceholder")}),u.jsx(We,{type:"number",min:1e3,step:1e3,value:H.contextTokens??"",onChange:_=>B(Y,{contextTokens:Rd(_.target.value)}),placeholder:(j==null?void 0:j.label)??E("contextTokensPlaceholder")}),u.jsx(We,{type:"number",min:1,value:H.maxToolIterations??"",onChange:_=>B(Y,{maxToolIterations:Rd(_.target.value)}),placeholder:E("maxToolsPlaceholder")})]})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[u.jsx(Zf,{checked:!!H.default,onCheckedChange:_=>{if(!_){B(Y,{default:!1});return}c(O=>O.map((Z,ee)=>({...Z,default:ee===Y})))}}),u.jsx("span",{children:E("defaultAgent")})]}),u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>c(_=>_.filter((O,Z)=>Z!==Y)),children:[u.jsx(Xl,{className:"h-4 w-4 mr-1"}),E("remove")]})]})]},`${Y}-${H.id}`)),u.jsxs(Ve,{type:"button",variant:"outline",onClick:()=>c(H=>[...H,pR()]),children:[u.jsx(Yd,{className:"h-4 w-4 mr-2"}),E("addAgent")]})]})]}),u.jsxs(zo,{children:[u.jsxs($l,{children:[u.jsx(Bl,{children:(A==null?void 0:A.label)??E("bindings")}),u.jsx(Hl,{children:(A==null?void 0:A.help)??E("bindingsHelp")})]}),u.jsxs(Ba,{className:"space-y-3",children:[f.map((H,Y)=>{var O,Z;const _=((O=H.match.peer)==null?void 0:O.kind)??"";return u.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[u.jsx(We,{value:H.agentId,onChange:ee=>W(Y,{...H,agentId:ee.target.value}),placeholder:E("targetAgentIdPlaceholder")}),u.jsx(We,{value:H.match.channel,onChange:ee=>W(Y,{...H,match:{...H.match,channel:ee.target.value}}),placeholder:E("channelPlaceholder")}),u.jsx(We,{value:H.match.accountId??"",onChange:ee=>W(Y,{...H,match:{...H.match,accountId:ee.target.value}}),placeholder:E("accountIdOptionalPlaceholder")}),u.jsxs(so,{value:_||"__none__",onValueChange:ee=>{var ie;const G=ee==="__none__"?"":ee;if(!G){W(Y,{...H,match:{...H.match,peer:void 0}});return}W(Y,{...H,match:{...H.match,peer:{kind:G,id:((ie=H.match.peer)==null?void 0:ie.id)??""}}})},children:[u.jsx(vr,{children:u.jsx(Bo,{})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"__none__",children:E("peerKindOptional")}),u.jsx(Ct,{value:"direct",children:"direct"}),u.jsx(Ct,{value:"group",children:"group"}),u.jsx(Ct,{value:"channel",children:"channel"})]})]}),u.jsx(We,{value:((Z=H.match.peer)==null?void 0:Z.id)??"",onChange:ee=>W(Y,{...H,match:{...H.match,peer:_?{kind:_,id:ee.target.value}:void 0}}),placeholder:E("peerIdPlaceholder")})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>h(ee=>ee.filter((G,ie)=>ie!==Y)),children:[u.jsx(Xl,{className:"h-4 w-4 mr-1"}),E("remove")]})})]},`${Y}-${H.agentId}`)}),u.jsxs(Ve,{type:"button",variant:"outline",onClick:()=>h(H=>[...H,mR()]),children:[u.jsx(Yd,{className:"h-4 w-4 mr-2"}),E("addBinding")]})]})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(Ve,{type:"button",onClick:X,disabled:a.isPending,children:[u.jsx(Wk,{className:"h-4 w-4 mr-2"}),a.isPending?E("saving"):E("saveRuntimeSettings")]})})]})}const yR=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:l=E("confirm"),cancelLabel:c=E("cancel"),variant:f="default",onConfirm:h,onCancel:g})=>{const y=()=>{h(),r(!1)},x=()=>{g(),r(!1)};return u.jsx(Xf,{open:t,onOpenChange:r,children:u.jsxs(bc,{className:"[&>:last-child]:hidden",onCloseAutoFocus:b=>b.preventDefault(),children:[u.jsxs(Sc,{children:[u.jsx(Cc,{children:o}),a?u.jsx(Ec,{children:a}):null]}),u.jsxs(kc,{className:"gap-2 sm:gap-0",children:[u.jsx(Ve,{type:"button",variant:"outline",onClick:x,children:c}),u.jsx(Ve,{type:"button",variant:f==="destructive"?"destructive":"default",onClick:y,children:l})]})]})})},vR={open:!1,title:"",description:"",confirmLabel:E("confirm"),cancelLabel:E("cancel"),variant:"default",resolve:null};function eh(){const[t,r]=m.useState(vR),o=m.useCallback(c=>new Promise(f=>{r({open:!0,title:c.title,description:c.description??"",confirmLabel:c.confirmLabel??E("confirm"),cancelLabel:c.cancelLabel??E("cancel"),variant:c.variant??"default",resolve:h=>{f(h),r(g=>({...g,open:!1,resolve:null}))}})}),[]),a=m.useCallback(c=>{r(f=>(!c&&f.resolve&&f.resolve(!1),{...f,open:c,resolve:c?f.resolve:null}))},[]),l=m.useCallback(()=>u.jsx(yR,{open:t.open,onOpenChange:a,title:t.title,description:t.description||void 0,confirmLabel:t.confirmLabel,cancelLabel:t.cancelLabel,variant:t.variant,onConfirm:()=>{var c;return(c=t.resolve)==null?void 0:c.call(t,!0)},onCancel:()=>{var c;return(c=t.resolve)==null?void 0:c.call(t,!1)}}),[t,a]);return{confirm:o,ConfirmDialog:l}}const qa="__unknown_channel__";function xR(t){return If(t)}function Ll(t){const r=t.indexOf(":");return r<=0?qa:t.slice(0,r).trim()||qa}function df(t){return t===qa?E("sessionsUnknownChannel"):t}function wR({session:t,channel:r,isSelected:o,onSelect:a}){const l=df(r),c=t.label||t.key.split(":").pop()||t.key;return u.jsxs("button",{onClick:a,className:me("w-full text-left p-3.5 rounded-xl transition-all duration-200 outline-none focus:outline-none focus:ring-0 group",o?"bg-brand-50 border border-brand-100/50":"bg-transparent border border-transparent hover:bg-gray-50/80"),children:[u.jsxs("div",{className:"flex items-start justify-between mb-1.5",children:[u.jsx("div",{className:me("font-semibold truncate pr-2 flex-1 text-sm",o?"text-brand-800":"text-gray-900"),children:c}),u.jsx("div",{className:me("text-[10px] font-bold px-2 py-0.5 rounded-full shrink-0 capitalize",o?"bg-white text-brand-600 shadow-[0_1px_2px_rgba(0,0,0,0.02)]":"bg-gray-100 text-gray-500"),children:l})]}),u.jsxs("div",{className:me("flex items-center text-xs justify-between mt-2 font-medium",o?"text-brand-600/80":"text-gray-400"),children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(jk,{className:"w-3.5 h-3.5 opacity-70"}),u.jsx("span",{className:"truncate max-w-[100px]",children:wk(t.updatedAt)})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(ks,{className:"w-3.5 h-3.5 opacity-70"}),u.jsx("span",{children:t.messageCount})]})]})]})}function bR({message:t}){const r=t.role.toLowerCase()==="user";return u.jsx("div",{className:me("flex w-full mb-6",r?"justify-end":"justify-start"),children:u.jsxs("div",{className:me("max-w-[85%] rounded-[1.25rem] p-5 flex gap-3 text-sm",r?"bg-primary text-white rounded-tr-sm":"bg-gray-50 text-gray-800 rounded-tl-sm border border-gray-100/50"),children:[u.jsx("div",{className:"shrink-0 pt-0.5",children:r?u.jsx(Gk,{className:"w-4 h-4 text-primary-100"}):u.jsx(Nk,{className:"w-4 h-4 text-gray-400"})}),u.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[u.jsxs("div",{className:"flex items-baseline justify-between gap-4 mb-2",children:[u.jsx("span",{className:me("font-semibold text-xs",r?"text-primary-50":"text-gray-900 capitalize"),children:t.role}),u.jsx("span",{className:me("text-[10px]",r?"text-primary-200":"text-gray-400"),children:xR(t.timestamp)})]}),u.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-[15px]",children:t.content})]})]})})}function SR(){var O,Z,ee;const[t,r]=m.useState(""),[o]=m.useState(100),[a]=m.useState(0),[l,c]=m.useState(null),[f,h]=m.useState("all"),[g,y]=m.useState(""),[x,b]=m.useState(""),[k,w]=m.useState(!1),N=m.useMemo(()=>({q:t.trim()||void 0,limit:o,activeMinutes:a}),[t,o,a]),v=wP(N),C=bP(l,200),R=SP(),j=kP(),{confirm:P,ConfirmDialog:A}=eh(),$=m.useMemo(()=>{var G;return((G=v.data)==null?void 0:G.sessions)??[]},[(O=v.data)==null?void 0:O.sessions]),B=m.useMemo(()=>$.find(G=>G.key===l),[$,l]),W=m.useMemo(()=>{const G=new Set;for(const ie of $)G.add(Ll(ie.key));return Array.from(G).sort((ie,ce)=>ie===qa?1:ce===qa?-1:ie.localeCompare(ce))},[$]),X=m.useMemo(()=>f==="all"?$:$.filter(G=>Ll(G.key)===f),[$,f]);m.useEffect(()=>{B?(y(B.label||""),b(B.preferredModel||"")):(y(""),b("")),w(!1)},[B]);const H=()=>{l&&(R.mutate({key:l,data:{label:g.trim()||null,preferredModel:x.trim()||null}}),w(!1))},Y=async()=>{if(!l)return;await P({title:E("sessionsClearHistory")+"?",variant:"destructive",confirmLabel:E("sessionsClearHistory")})&&R.mutate({key:l,data:{clearHistory:!0}})},_=async()=>{if(!l)return;await P({title:E("sessionsDeleteConfirm")+"?",variant:"destructive",confirmLabel:E("sessionsDeleteConfirm")})&&j.mutate({key:l},{onSuccess:()=>c(null)})};return u.jsxs(Wo,{fullHeight:!0,children:[u.jsx(Vo,{title:E("sessionsPageTitle"),description:E("sessionsPageDescription")}),u.jsxs("div",{className:"flex-1 flex gap-6 min-h-0 relative",children:[u.jsxs("div",{className:"w-[320px] flex flex-col shrink-0 bg-white rounded-2xl shadow-sm border border-gray-200 overflow-hidden",children:[u.jsxs("div",{className:"px-4 py-4 border-b border-gray-100 bg-white z-10 shrink-0 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider",children:[$.length," ",E("sessionsListTitle")]}),u.jsx(Ve,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>v.refetch(),children:u.jsx(Xd,{className:me("h-3.5 w-3.5",v.isFetching&&"animate-spin")})})]}),u.jsxs(so,{value:f,onValueChange:h,children:[u.jsx(vr,{className:"w-full h-8.5 rounded-lg bg-gray-50/50 hover:bg-gray-100 border-gray-200 focus:ring-0 shadow-none text-xs font-medium text-gray-700",children:u.jsx(Bo,{placeholder:E("sessionsAllChannels")})}),u.jsxs(xr,{className:"rounded-xl shadow-lg border-gray-100 max-w-[280px]",children:[u.jsx(Ct,{value:"all",className:"rounded-lg text-xs",children:E("sessionsAllChannels")}),W.map(G=>u.jsx(Ct,{value:G,className:"rounded-lg text-xs truncate pr-6",children:df(G)},G))]})]}),u.jsxs("div",{className:"relative w-full",children:[u.jsx(cv,{className:"h-3.5 w-3.5 absolute left-3 top-2.5 text-gray-400"}),u.jsx(We,{value:t,onChange:G=>r(G.target.value),placeholder:E("sessionsSearchPlaceholder"),className:"pl-8 h-8.5 rounded-lg bg-gray-50/50 border-gray-200 focus-visible:bg-white text-xs"})]})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-1 pb-10 custom-scrollbar relative",children:v.isLoading?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("sessionsLoading")}):X.length===0?u.jsxs("div",{className:"text-sm text-gray-400 p-4 text-center border-2 border-dashed border-gray-100 rounded-xl mt-4",children:[u.jsx(fg,{className:"w-8 h-8 mx-auto mb-2 text-gray-300"}),E("sessionsEmpty")]}):X.map(G=>u.jsx(wR,{session:G,channel:Ll(G.key),isSelected:l===G.key,onSelect:()=>c(G.key)},G.key))})]}),u.jsxs("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden relative bg-white rounded-2xl shadow-sm border border-gray-200",children:[(R.isPending||j.isPending)&&u.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-primary/20 overflow-hidden z-20",children:u.jsx("div",{className:"h-full bg-primary animate-pulse w-1/3 rounded-r-full"})}),l&&B?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"shrink-0 border-b border-gray-100 bg-white px-8 py-5 z-10 space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"h-12 w-12 rounded-[14px] bg-gray-50 border border-gray-100 flex items-center justify-center text-gray-400 shrink-0",children:u.jsx(Gl,{className:"h-6 w-6"})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2.5 mb-1.5",children:[u.jsx("h3",{className:"text-lg font-bold text-gray-900 tracking-tight",children:B.label||B.key.split(":").pop()||B.key}),u.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500 uppercase tracking-widest",children:df(Ll(B.key))})]}),u.jsx("div",{className:"text-xs text-gray-500 font-mono break-all line-clamp-1 opacity-70",title:l,children:l})]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>w(!k),className:me("h-8.5 rounded-lg shadow-none border-gray-200 transition-all text-xs font-semibold",k?"bg-gray-100 text-gray-900":"hover:bg-gray-50 hover:text-gray-900"),children:[u.jsx(uv,{className:"w-3.5 h-3.5 mr-1.5"}),E("sessionsMetadata")]}),u.jsx(Ve,{variant:"outline",size:"sm",onClick:Y,className:"h-8.5 rounded-lg shadow-none hover:bg-gray-50 hover:text-gray-900 border-gray-200 text-xs font-semibold text-gray-500",children:E("sessionsClearHistory")}),u.jsx(Ve,{variant:"outline",size:"sm",onClick:_,className:"h-8.5 rounded-lg shadow-none hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 text-xs font-semibold text-red-500",children:E("delete")})]})]}),k&&u.jsxs("div",{className:"flex items-center gap-3 bg-gray-50/50 p-3 rounded-lg border border-gray-100 animate-slide-in",children:[u.jsx(We,{placeholder:E("sessionsLabelPlaceholder"),value:g,onChange:G=>y(G.target.value),className:"h-8 text-sm bg-white"}),u.jsx(We,{placeholder:E("sessionsModelPlaceholder"),value:x,onChange:G=>b(G.target.value),className:"h-8 text-sm bg-white"}),u.jsx(Ve,{size:"sm",onClick:H,className:"h-8 px-4 shrink-0 shadow-none",disabled:R.isPending,children:E("sessionsSaveMeta")})]})]}),u.jsxs("div",{className:`flex-1 overflow-y-auto p-6 relative
342
+ [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:bg-gray-300/80 [&::-webkit-scrollbar-thumb]:rounded-full`,children:[C.isLoading&&u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/50 backdrop-blur-sm z-10",children:u.jsxs("div",{className:"flex flex-col items-center gap-3 animate-pulse",children:[u.jsx(Xd,{className:"w-6 h-6 text-primary animate-spin"}),u.jsx("span",{className:"text-sm font-medium text-gray-500",children:E("sessionsHistoryLoading")})]})}),C.error&&u.jsx("div",{className:"text-center p-6 bg-red-50 rounded-xl text-red-600 border border-red-100 text-sm",children:C.error.message}),!C.isLoading&&((Z=C.data)==null?void 0:Z.messages.length)===0&&u.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[u.jsx(ks,{className:"w-12 h-12 mb-3 text-gray-300"}),u.jsx("p",{className:"text-sm",children:E("sessionsEmpty")})]}),u.jsx("div",{className:"max-w-3xl mx-auto",children:(((ee=C.data)==null?void 0:ee.messages)??[]).map((G,ie)=>u.jsx(bR,{message:G},`${G.timestamp}-${ie}`))})]})]}):u.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-gray-400 p-8 h-full bg-white",children:[u.jsx("div",{className:"w-20 h-20 bg-gray-50 rounded-3xl flex items-center justify-center mb-6 border border-gray-100 shadow-[0_2px_8px_-2px_rgba(0,0,0,0.02)] rotate-3",children:u.jsx(fg,{className:"h-8 w-8 text-gray-300 -rotate-3"})}),u.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:E("sessionsNoSelectionTitle")}),u.jsx("p",{className:"text-sm text-center max-w-sm leading-relaxed",children:E("sessionsNoSelectionDescription")})]})]})]}),u.jsx(A,{})]})}function Jg(t){return If(t??void 0)}function kR(t){return typeof t!="number"||!Number.isFinite(t)?"-":If(new Date(t))}function CR(t){if(typeof t!="number"||!Number.isFinite(t))return"-";const r=Math.round(t/1e3);if(r<60)return`${r}s`;const o=Math.round(r/60);if(o<60)return`${o}m`;const a=Math.round(o/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}function ER(t){const r=t.schedule;return r.kind==="cron"?r.expr?`cron ${r.expr}`:"cron":r.kind==="every"?`every ${CR(r.everyMs)}`:r.kind==="at"?`at ${kR(r.atMs)}`:"-"}function NR(t){if(!t.payload.deliver)return"-";const r=t.payload.channel??"-",o=t.payload.to??"-";return`${r}:${o}`}function PR(t,r){const o=r.trim().toLowerCase();return o?[t.id,t.name,t.payload.message,t.payload.channel??"",t.payload.to??""].join(" ").toLowerCase().includes(o):!0}function RR(t,r){return r==="all"?!0:r==="enabled"?t.enabled:!t.enabled}function jR(){var N;const[t,r]=m.useState(""),[o,a]=m.useState("all"),l=CP({all:!0}),c=EP(),f=NP(),h=PP(),{confirm:g,ConfirmDialog:y}=eh(),x=m.useMemo(()=>{var C;return(((C=l.data)==null?void 0:C.jobs)??[]).filter(R=>PR(R,t)).filter(R=>RR(R,o))},[l.data,t,o]),b=async v=>{await g({title:`${E("cronDeleteConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,variant:"destructive",confirmLabel:E("delete")})&&c.mutate({id:v.id})},k=async v=>{const C=!v.enabled;await g({title:C?`${E("cronEnableConfirm")}?`:`${E("cronDisableConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,variant:C?"default":"destructive",confirmLabel:E(C?"cronEnable":"cronDisable")})&&f.mutate({id:v.id,enabled:C})},w=async v=>{const C=!v.enabled;await g({title:C?`${E("cronRunForceConfirm")}?`:`${E("cronRunConfirm")}?`,description:v.name?`${v.name} (${v.id})`:v.id,confirmLabel:E("cronRunNow")})&&h.mutate({id:v.id,force:C})};return u.jsxs(Wo,{fullHeight:!0,children:[u.jsx(Vo,{title:E("cronPageTitle"),description:E("cronPageDescription"),actions:u.jsx(Ve,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>l.refetch(),children:u.jsx(Xd,{className:me("h-4 w-4",l.isFetching&&"animate-spin")})})}),u.jsx("div",{className:"mb-6",children:u.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[u.jsxs("div",{className:"relative flex-1 min-w-[240px]",children:[u.jsx(We,{value:t,onChange:v=>r(v.target.value),placeholder:E("cronSearchPlaceholder"),className:"pl-9"}),u.jsx(rv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"})]}),u.jsx("div",{className:"min-w-[180px]",children:u.jsxs(so,{value:o,onValueChange:v=>a(v),children:[u.jsx(vr,{className:"w-full",children:u.jsx(Bo,{placeholder:E("cronStatusLabel")})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"all",children:E("cronStatusAll")}),u.jsx(Ct,{value:"enabled",children:E("cronStatusEnabled")}),u.jsx(Ct,{value:"disabled",children:E("cronStatusDisabled")})]})]})}),u.jsxs("div",{className:"text-xs text-gray-500 ml-auto",children:[E("cronTotalLabel"),": ",((N=l.data)==null?void 0:N.total)??0," / ",x.length]})]})}),u.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar",children:l.isLoading?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("cronLoading")}):x.length===0?u.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:E("cronEmpty")}):u.jsx("div",{className:"space-y-4",children:x.map(v=>u.jsx(zo,{className:"border border-gray-200",children:u.jsx(Ba,{className:"pt-5 pb-5",children:u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[u.jsxs("div",{className:"min-w-[220px] flex-1",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"text-sm font-semibold text-gray-900",children:v.name||v.id}),u.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500",children:v.id}),u.jsx("span",{className:me("text-[10px] font-semibold px-2 py-0.5 rounded-full",v.enabled?"bg-emerald-50 text-emerald-700":"bg-gray-100 text-gray-500"),children:v.enabled?E("enabled"):E("disabled")}),v.deleteAfterRun&&u.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-amber-50 text-amber-700",children:E("cronOneShot")})]}),u.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[E("cronScheduleLabel"),": ",ER(v)]}),u.jsx("div",{className:"mt-2 text-sm text-gray-700 whitespace-pre-wrap break-words",children:v.payload.message}),u.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[E("cronDeliverTo"),": ",NR(v)]})]}),u.jsxs("div",{className:"min-w-[220px] text-xs text-gray-500 space-y-2",children:[u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronNextRun"),":"]})," ",Jg(v.state.nextRunAt)]}),u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronLastRun"),":"]})," ",Jg(v.state.lastRunAt)]}),u.jsxs("div",{children:[u.jsxs("span",{className:"font-medium text-gray-700",children:[E("cronLastStatus"),":"]})," ",v.state.lastStatus??"-"]}),v.state.lastError&&u.jsx("div",{className:"text-[11px] text-red-500 break-words",children:v.state.lastError})]}),u.jsxs("div",{className:"flex items-start gap-2 flex-wrap justify-end",children:[u.jsxs(Ve,{variant:"subtle",size:"sm",onClick:()=>w(v),className:"gap-1",children:[u.jsx(Bk,{className:"h-3.5 w-3.5"}),E("cronRunNow")]}),u.jsxs(Ve,{variant:v.enabled?"outline":"primary",size:"sm",onClick:()=>k(v),className:"gap-1",children:[u.jsx(Hk,{className:"h-3.5 w-3.5"}),v.enabled?E("cronDisable"):E("cronEnable")]}),u.jsxs(Ve,{variant:"destructive",size:"sm",onClick:()=>b(v),className:"gap-1",children:[u.jsx(Xl,{className:"h-3.5 w-3.5"}),E("delete")]})]})]})})},v.id))})}),u.jsx(y,{})]})}var[Nc]=oi("Tooltip",[pc]),Pc=pc(),px="TooltipProvider",TR=700,ff="tooltip.open",[MR,th]=Nc(px),mx=t=>{const{__scopeTooltip:r,delayDuration:o=TR,skipDelayDuration:a=300,disableHoverableContent:l=!1,children:c}=t,f=m.useRef(!0),h=m.useRef(!1),g=m.useRef(0);return m.useEffect(()=>{const y=g.current;return()=>window.clearTimeout(y)},[]),u.jsx(MR,{scope:r,isOpenDelayedRef:f,delayDuration:o,onOpen:m.useCallback(()=>{window.clearTimeout(g.current),f.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>f.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:m.useCallback(y=>{h.current=y},[]),disableHoverableContent:l,children:c})};mx.displayName=px;var Ga="Tooltip",[IR,ii]=Nc(Ga),gx=t=>{const{__scopeTooltip:r,children:o,open:a,defaultOpen:l,onOpenChange:c,disableHoverableContent:f,delayDuration:h}=t,g=th(Ga,t.__scopeTooltip),y=Pc(r),[x,b]=m.useState(null),k=Lo(),w=m.useRef(0),N=f??g.disableHoverableContent,v=h??g.delayDuration,C=m.useRef(!1),[R,j]=nc({prop:a,defaultProp:l??!1,onChange:W=>{W?(g.onOpen(),document.dispatchEvent(new CustomEvent(ff))):g.onClose(),c==null||c(W)},caller:Ga}),P=m.useMemo(()=>R?C.current?"delayed-open":"instant-open":"closed",[R]),A=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,C.current=!1,j(!0)},[j]),$=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,j(!1)},[j]),B=m.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{C.current=!0,j(!0),w.current=0},v)},[v,j]);return m.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),u.jsx($v,{...y,children:u.jsx(IR,{scope:r,contentId:k,open:R,stateAttribute:P,trigger:x,onTriggerChange:b,onTriggerEnter:m.useCallback(()=>{g.isOpenDelayedRef.current?B():A()},[g.isOpenDelayedRef,B,A]),onTriggerLeave:m.useCallback(()=>{N?$():(window.clearTimeout(w.current),w.current=0)},[$,N]),onOpen:A,onClose:$,disableHoverableContent:N,children:o})})};gx.displayName=Ga;var hf="TooltipTrigger",yx=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...a}=t,l=ii(hf,o),c=th(hf,o),f=Pc(o),h=m.useRef(null),g=Ze(r,h,l.onTriggerChange),y=m.useRef(!1),x=m.useRef(!1),b=m.useCallback(()=>y.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),u.jsx(Bv,{asChild:!0,...f,children:u.jsx(Be.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...a,ref:g,onPointerMove:Oe(t.onPointerMove,k=>{k.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(l.onTriggerEnter(),x.current=!0)}),onPointerLeave:Oe(t.onPointerLeave,()=>{l.onTriggerLeave(),x.current=!1}),onPointerDown:Oe(t.onPointerDown,()=>{l.open&&l.onClose(),y.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:Oe(t.onFocus,()=>{y.current||l.onOpen()}),onBlur:Oe(t.onBlur,l.onClose),onClick:Oe(t.onClick,l.onClose)})})});yx.displayName=hf;var nh="TooltipPortal",[AR,LR]=Nc(nh,{forceMount:void 0}),vx=t=>{const{__scopeTooltip:r,forceMount:o,children:a,container:l}=t,c=ii(nh,r);return u.jsx(AR,{scope:r,forceMount:o,children:u.jsx(Js,{present:o||c.open,children:u.jsx(mc,{asChild:!0,container:l,children:a})})})};vx.displayName=nh;var Us="TooltipContent",xx=m.forwardRef((t,r)=>{const o=LR(Us,t.__scopeTooltip),{forceMount:a=o.forceMount,side:l="top",...c}=t,f=ii(Us,t.__scopeTooltip);return u.jsx(Js,{present:a||f.open,children:f.disableHoverableContent?u.jsx(wx,{side:l,...c,ref:r}):u.jsx(zR,{side:l,...c,ref:r})})}),zR=m.forwardRef((t,r)=>{const o=ii(Us,t.__scopeTooltip),a=th(Us,t.__scopeTooltip),l=m.useRef(null),c=Ze(r,l),[f,h]=m.useState(null),{trigger:g,onClose:y}=o,x=l.current,{onPointerInTransitChange:b}=a,k=m.useCallback(()=>{h(null),b(!1)},[b]),w=m.useCallback((N,v)=>{const C=N.currentTarget,R={x:N.clientX,y:N.clientY},j=UR(R,C.getBoundingClientRect()),P=$R(R,j),A=BR(v.getBoundingClientRect()),$=WR([...P,...A]);h($),b(!0)},[b]);return m.useEffect(()=>()=>k(),[k]),m.useEffect(()=>{if(g&&x){const N=C=>w(C,x),v=C=>w(C,g);return g.addEventListener("pointerleave",N),x.addEventListener("pointerleave",v),()=>{g.removeEventListener("pointerleave",N),x.removeEventListener("pointerleave",v)}}},[g,x,w,k]),m.useEffect(()=>{if(f){const N=v=>{const C=v.target,R={x:v.clientX,y:v.clientY},j=(g==null?void 0:g.contains(C))||(x==null?void 0:x.contains(C)),P=!HR(R,f);j?k():P&&(k(),y())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[g,x,f,y,k]),u.jsx(wx,{...t,ref:c})}),[DR,OR]=Nc(Ga,{isInside:!1}),_R=sC("TooltipContent"),wx=m.forwardRef((t,r)=>{const{__scopeTooltip:o,children:a,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:f,...h}=t,g=ii(Us,o),y=Pc(o),{onClose:x}=g;return m.useEffect(()=>(document.addEventListener(ff,x),()=>document.removeEventListener(ff,x)),[x]),m.useEffect(()=>{if(g.trigger){const b=k=>{const w=k.target;w!=null&&w.contains(g.trigger)&&x()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[g.trigger,x]),u.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:b=>b.preventDefault(),onDismiss:x,children:u.jsxs(Hv,{"data-state":g.stateAttribute,...y,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(_R,{children:a}),u.jsx(DR,{scope:o,isInside:!0,children:u.jsx(rE,{id:g.contentId,role:"tooltip",children:l||a})})]})})});xx.displayName=Us;var bx="TooltipArrow",FR=m.forwardRef((t,r)=>{const{__scopeTooltip:o,...a}=t,l=Pc(o);return OR(bx,o).isInside?null:u.jsx(Wv,{...l,...a,ref:r})});FR.displayName=bx;function UR(t,r){const o=Math.abs(r.top-t.y),a=Math.abs(r.bottom-t.y),l=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(o,a,l,c)){case c:return"left";case l:return"right";case o:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function $R(t,r,o=5){const a=[];switch(r){case"top":a.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":a.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":a.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":a.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return a}function BR(t){const{top:r,right:o,bottom:a,left:l}=t;return[{x:l,y:r},{x:o,y:r},{x:o,y:a},{x:l,y:a}]}function HR(t,r){const{x:o,y:a}=t;let l=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const h=r[c],g=r[f],y=h.x,x=h.y,b=g.x,k=g.y;x>a!=k>a&&o<(b-y)*(a-x)/(k-x)+y&&(l=!l)}return l}function WR(t){const r=t.slice();return r.sort((o,a)=>o.x<a.x?-1:o.x>a.x?1:o.y<a.y?-1:o.y>a.y?1:0),VR(r)}function VR(t){if(t.length<=1)return t.slice();const r=[];for(let a=0;a<t.length;a++){const l=t[a];for(;r.length>=2;){const c=r[r.length-1],f=r[r.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}r.pop();const o=[];for(let a=t.length-1;a>=0;a--){const l=t[a];for(;o.length>=2;){const c=o[o.length-1],f=o[o.length-2];if((c.x-f.x)*(l.y-f.y)>=(c.y-f.y)*(l.x-f.x))o.pop();else break}o.push(l)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var KR=mx,QR=gx,qR=yx,GR=vx,Sx=xx;const YR=KR,jd=QR,Td=qR,Vl=m.forwardRef(({className:t,sideOffset:r=4,...o},a)=>u.jsx(GR,{children:u.jsx(Sx,{ref:a,sideOffset:r,className:me("z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...o})}));Vl.displayName=Sx.displayName;async function XR(t={}){var l,c;const r=new URLSearchParams;(l=t.q)!=null&&l.trim()&&r.set("q",t.q.trim()),t.type&&r.set("type",t.type),(c=t.tag)!=null&&c.trim()&&r.set("tag",t.tag.trim()),t.sort&&r.set("sort",t.sort),typeof t.page=="number"&&Number.isFinite(t.page)&&r.set("page",String(Math.max(1,Math.trunc(t.page)))),typeof t.pageSize=="number"&&Number.isFinite(t.pageSize)&&r.set("pageSize",String(Math.max(1,Math.trunc(t.pageSize))));const o=r.toString(),a=await at.get(o?`/api/marketplace/items?${o}`:"/api/marketplace/items");if(!a.ok)throw new Error(a.error.message);return a.data}async function JR(t){const r=await at.post("/api/marketplace/install",t);if(!r.ok)throw new Error(r.error.message);return r.data}async function ZR(){const t=await at.get("/api/marketplace/installed");if(!t.ok)throw new Error(t.error.message);return t.data}async function ej(t){const r=await at.post("/api/marketplace/manage",t);if(!r.ok)throw new Error(r.error.message);return r.data}function tj(t){return ao({queryKey:["marketplace-items",t],queryFn:()=>XR(t),staleTime:15e3})}function nj(){return ao({queryKey:["marketplace-installed"],queryFn:ZR,staleTime:1e4})}function rj(){const t=Yt();return an({mutationFn:r=>JR(r),onSuccess:r=>{t.invalidateQueries({queryKey:["marketplace-installed"]}),t.refetchQueries({queryKey:["marketplace-installed"],type:"active"}),t.refetchQueries({queryKey:["marketplace-items"],type:"active"}),Ue.success(r.message||`${r.type} ${E("marketplaceInstalledCountSuffix")}`)},onError:r=>{Ue.error(r.message||E("marketplaceInstallFailed"))}})}function oj(){const t=Yt();return an({mutationFn:r=>ej(r),onSuccess:r=>{t.invalidateQueries({queryKey:["marketplace-installed"]}),t.invalidateQueries({queryKey:["marketplace-items"]}),t.refetchQueries({queryKey:["marketplace-installed"],type:"active"}),t.refetchQueries({queryKey:["marketplace-items"],type:"active"}),Ue.success(r.message||`${r.action} success`)},onError:r=>{Ue.error(r.message||E("marketplaceOperationFailed"))}})}const sj=12;function pf(t){return(t??"").trim().toLowerCase()}function Ns(t,r){const o=pf(r);return o.length>0?`${t}:${o}`:""}function aj(t){const r=new Map;for(const o of t){const a=[o.install.spec,o.slug,o.id];for(const l of a){const c=Ns(o.type,l);!c||r.has(c)||r.set(c,o)}}return r}function ij(t){const r=new Map;for(const o of t){const a=[o.spec,o.id,o.label];for(const l of a){const c=Ns(o.type,l);!c||r.has(c)||r.set(c,o)}}return r}function lj(t,r){const o=[t.install.spec,t.slug,t.id];for(const a of o){const l=Ns(t.type,a);if(!l)continue;const c=r.get(l);if(c)return c}}function cj(t,r){const o=r.get(Ns(t.type,t.spec));if(o)return o;const a=r.get(Ns(t.type,t.id));return a||r.get(Ns(t.type,t.label))}function uj(t,r,o){const a=pf(o);return a?[t.id,t.spec,t.label,r==null?void 0:r.name,r==null?void 0:r.slug,r==null?void 0:r.summary,...(r==null?void 0:r.tags)??[]].map(c=>pf(c)).filter(Boolean).some(c=>c.includes(a)):!0}function dj(t){const r=["bg-amber-600","bg-orange-500","bg-yellow-600","bg-emerald-600","bg-teal-600","bg-cyan-600","bg-stone-600","bg-rose-500","bg-violet-500"];let o=0;for(let a=0;a<t.length;a++)o=t.charCodeAt(a)+((o<<5)-o);return r[Math.abs(o)%r.length]}function fj({name:t,fallback:r}){const o=t||r,a=o.substring(0,2).toUpperCase(),l=dj(o);return u.jsx("div",{className:me("flex items-center justify-center w-10 h-10 rounded-xl text-white font-semibold text-sm shrink-0",l),children:a})}function hj(t){return u.jsx("div",{className:"mb-4",children:u.jsxs("div",{className:"flex gap-3 items-center",children:[u.jsxs("div",{className:"flex-1 min-w-0 relative",children:[u.jsx(Uk,{className:"h-4 w-4 text-gray-400 absolute left-3 top-1/2 -translate-y-1/2"}),u.jsx("input",{value:t.searchText,onChange:r=>t.onSearchTextChange(r.target.value),placeholder:E("marketplaceSearchPlaceholder"),className:"w-full h-9 border border-gray-200/80 rounded-xl pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40"})]}),u.jsx("div",{className:"inline-flex h-9 rounded-xl bg-gray-100/80 p-1 shrink-0",children:[{value:"all",label:E("marketplaceFilterAll")},{value:"plugin",label:E("marketplaceFilterPlugins")},{value:"skill",label:E("marketplaceFilterSkills")}].map(r=>u.jsx("button",{type:"button",onClick:()=>t.onTypeFilterChange(r.value),className:me("px-3 rounded-lg text-sm font-medium transition-all whitespace-nowrap",t.typeFilter===r.value?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),children:r.label},r.value))}),t.scope==="all"&&u.jsxs(so,{value:t.sort,onValueChange:r=>t.onSortChange(r),children:[u.jsx(vr,{className:"h-9 w-[150px] shrink-0 rounded-lg",children:u.jsx(Bo,{})}),u.jsxs(xr,{children:[u.jsx(Ct,{value:"relevance",children:E("marketplaceSortRelevance")}),u.jsx(Ct,{value:"updated",children:E("marketplaceSortUpdated")})]})]})]})})}function Zg(t){var C,R,j,P;const r=t.record,o=(r==null?void 0:r.type)==="plugin"?r:void 0,a=((C=t.item)==null?void 0:C.type)??(r==null?void 0:r.type),l=((R=t.item)==null?void 0:R.name)??(r==null?void 0:r.label)??(r==null?void 0:r.id)??(r==null?void 0:r.spec)??E("marketplaceUnknownItem"),c=((j=t.item)==null?void 0:j.summary)??(r?E("marketplaceInstalledLocalSummary"):""),f=((P=t.item)==null?void 0:P.install.spec)??(r==null?void 0:r.spec)??"",h=(r==null?void 0:r.id)||(r==null?void 0:r.spec),g=!!h&&t.manageState.isPending&&t.manageState.targetId===h,y=!!o,x=(r==null?void 0:r.type)==="plugin"&&r.origin!=="bundled",b=(r==null?void 0:r.type)==="skill"&&r.source==="workspace",k=!!(x||b),w=r?r.enabled===!1||r.runtimeStatus==="disabled":!1,N=t.installState.isPending&&t.item&&t.installState.installingSpec===t.item.install.spec,v=E(a==="plugin"?"marketplaceTypePlugin":a==="skill"?"marketplaceTypeSkill":"marketplaceTypeExtension");return u.jsxs("article",{className:"group bg-white border border-gray-200/40 hover:border-gray-200/80 rounded-2xl px-5 py-4 hover:shadow-md shadow-sm transition-all flex items-start gap-3.5 justify-between cursor-default",children:[u.jsxs("div",{className:"flex gap-3 min-w-0 flex-1 h-full items-start",children:[u.jsx(fj,{name:l,fallback:f||E("marketplaceTypeExtension")}),u.jsx("div",{className:"min-w-0 flex-1 flex flex-col justify-center h-full",children:u.jsxs(YR,{delayDuration:400,children:[u.jsxs(jd,{children:[u.jsx(Td,{asChild:!0,children:u.jsx("div",{className:"text-[14px] font-semibold text-gray-900 truncate leading-tight cursor-default",children:l})}),u.jsx(Vl,{className:"max-w-[300px] text-xs",children:l})]}),u.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5 mb-1.5",children:[u.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:v}),f&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-[10px] text-gray-300",children:"•"}),u.jsxs(jd,{children:[u.jsx(Td,{asChild:!0,children:u.jsx("span",{className:"text-[11px] text-gray-400 truncate max-w-full font-mono cursor-default",children:f})}),u.jsx(Vl,{className:"max-w-[300px] text-xs font-mono break-all",children:f})]})]})]}),u.jsxs(jd,{children:[u.jsx(Td,{asChild:!0,children:u.jsx("p",{className:"text-[12px] text-gray-500/90 line-clamp-1 transition-colors leading-relaxed text-left cursor-default",children:c})}),c&&u.jsx(Vl,{className:"max-w-[400px] text-xs leading-relaxed",children:c})]})]})})]}),u.jsxs("div",{className:"shrink-0 flex items-center h-full",children:[t.item&&!r&&u.jsx("button",{onClick:()=>t.onInstall(t.item),disabled:t.installState.isPending,className:"inline-flex items-center gap-1.5 h-8 px-4 rounded-xl text-xs font-medium bg-primary text-white hover:bg-primary-600 disabled:opacity-50 transition-colors",children:E(N?"marketplaceInstalling":"marketplaceInstall")}),o&&y&&u.jsx("button",{disabled:t.manageState.isPending,onClick:()=>t.onManage(w?"enable":"disable",o),className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-gray-200/80 text-gray-600 bg-white hover:bg-gray-50 hover:border-gray-300 disabled:opacity-50 transition-colors",children:g&&t.manageState.action!=="uninstall"?t.manageState.action==="enable"?E("marketplaceEnabling"):E("marketplaceDisabling"):E(w?"marketplaceEnable":"marketplaceDisable")}),r&&k&&u.jsx("button",{disabled:t.manageState.isPending,onClick:()=>t.onManage("uninstall",r),className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-rose-100 text-rose-500 bg-white hover:bg-rose-50 hover:border-rose-200 disabled:opacity-50 transition-colors",children:g&&t.manageState.action==="uninstall"?E("marketplaceRemoving"):E("marketplaceUninstall")})]})]})}function pj(t){return u.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[u.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:t.onPrev,disabled:t.page<=1||t.busy,children:E("prev")}),u.jsx("div",{className:"text-sm text-gray-600 min-w-20 text-center",children:t.totalPages===0?"0 / 0":`${t.page} / ${t.totalPages}`}),u.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:t.onNext,disabled:t.totalPages===0||t.page>=t.totalPages||t.busy,children:E("next")})]})}function mj(){var G,ie,ce,K,q,Q,M,F,le;const[t,r]=m.useState(""),[o,a]=m.useState(""),[l,c]=m.useState("all"),[f,h]=m.useState("all"),[g,y]=m.useState("relevance"),[x,b]=m.useState(1);m.useEffect(()=>{const J=setTimeout(()=>{b(1),a(t.trim())},250);return()=>clearTimeout(J)},[t]);const k=nj(),w=tj({q:o||void 0,type:f==="all"?void 0:f,sort:g,page:x,pageSize:sj}),N=rj(),v=oj(),{confirm:C,ConfirmDialog:R}=eh(),j=m.useMemo(()=>{var J;return((J=k.data)==null?void 0:J.records)??[]},[(G=k.data)==null?void 0:G.records]),P=m.useMemo(()=>{var J;return((J=w.data)==null?void 0:J.items)??[]},[(ie=w.data)==null?void 0:ie.items]),A=m.useMemo(()=>aj(P),[P]),$=m.useMemo(()=>ij(j),[j]),B=m.useMemo(()=>{const J=j.filter(ue=>f==="all"?!0:ue.type===f).map(ue=>({key:`${ue.type}:${ue.spec}:${ue.id??""}`,record:ue,item:cj(ue,A)})).filter(ue=>uj(ue.record,ue.item,o));return J.sort((ue,xe)=>{const ne=ue.record.installedAt?Date.parse(ue.record.installedAt):Number.NaN,he=xe.record.installedAt?Date.parse(xe.record.installedAt):Number.NaN,be=!Number.isNaN(ne),Ce=!Number.isNaN(he);return be&&Ce&&ne!==he?he-ne:ue.record.spec.localeCompare(xe.record.spec)}),J},[j,f,A,o]),W=l==="installed"?B.length:((ce=w.data)==null?void 0:ce.total)??0,X=l==="installed"?1:((K=w.data)==null?void 0:K.totalPages)??0,H=m.useMemo(()=>l==="installed"?k.isLoading?E("loading"):`${B.length} ${E("marketplaceInstalledCountSuffix")}`:w.data?`${P.length} / ${W}`:E("loading"),[l,k.isLoading,B.length,w.data,P.length,W]),Y={isPending:N.isPending,installingSpec:(q=N.variables)==null?void 0:q.spec},_={isPending:v.isPending,targetId:((Q=v.variables)==null?void 0:Q.id)||((M=v.variables)==null?void 0:M.spec),action:(F=v.variables)==null?void 0:F.action},O=[{id:"all",label:E("marketplaceTabMarketplace")},{id:"installed",label:E("marketplaceTabInstalled"),count:((le=k.data)==null?void 0:le.total)??0}],Z=J=>{N.isPending||N.mutate({type:J.type,spec:J.install.spec,kind:J.install.kind})},ee=async(J,ue)=>{if(v.isPending)return;const xe=ue.id||ue.spec;xe&&(J==="uninstall"&&!await C({title:`${E("marketplaceUninstallTitle")} ${xe}?`,description:E("marketplaceUninstallDescription"),confirmLabel:E("marketplaceUninstall"),variant:"destructive"})||v.mutate({type:ue.type,action:J,id:xe,spec:ue.spec}))};return u.jsxs(Wo,{children:[u.jsx(Vo,{title:E("marketplacePageTitle"),description:E("marketplacePageDescription")}),u.jsx(Jf,{tabs:O,activeTab:l,onChange:J=>{c(J),b(1)},className:"mb-4"}),u.jsx(hj,{scope:l,searchText:t,typeFilter:f,sort:g,onSearchTextChange:r,onTypeFilterChange:J=>{b(1),h(J)},onSortChange:J=>{b(1),y(J)}}),u.jsxs("section",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsx("h3",{className:"text-[14px] font-semibold text-gray-900",children:E(l==="installed"?"marketplaceSectionInstalled":"marketplaceSectionExtensions")}),u.jsx("span",{className:"text-[12px] text-gray-500",children:H})]}),l==="all"&&w.isError&&u.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[E("marketplaceErrorLoadingData"),": ",w.error.message]}),l==="installed"&&k.isError&&u.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[E("marketplaceErrorLoadingInstalled"),": ",k.error.message]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-3",children:[l==="all"&&P.map(J=>u.jsx(Zg,{item:J,record:lj(J,$),installState:Y,manageState:_,onInstall:Z,onManage:ee},J.id)),l==="installed"&&B.map(J=>u.jsx(Zg,{item:J.item,record:J.record,installState:Y,manageState:_,onInstall:Z,onManage:ee},J.key))]}),l==="all"&&!w.isLoading&&!w.isError&&P.length===0&&u.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:E("marketplaceNoItems")}),l==="installed"&&!k.isLoading&&!k.isError&&B.length===0&&u.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:E("marketplaceNoInstalledItems")})]}),l==="all"&&u.jsx(pj,{page:x,totalPages:X,busy:w.isFetching,onPrev:()=>b(J=>Math.max(1,J-1)),onNext:()=>b(J=>X>0?Math.min(X,J+1):J+1)}),u.jsx(R,{})]})}class gj{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 o=JSON.parse(r.data);this.emit(o)}catch(o){console.error("Failed to parse WebSocket message:",o)}},this.ws.onclose=()=>{console.log("WebSocket disconnected"),this.manualClose||this.scheduleReconnect()},this.ws.onerror=r=>{console.error("WebSocket error:",r)}}on(r,o){this.handlers.has(r)||this.handlers.set(r,new Set),this.handlers.get(r).add(o)}off(r,o){var a;(a=this.handlers.get(r))==null||a.delete(o)}emit(r){const o=this.handlers.get(r.type);o==null||o.forEach(a=>a(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 yj(t){const[r,o]=m.useState(null),{setConnectionStatus:a}=ai();return m.useEffect(()=>{const l=(()=>{const f=Wl==null?void 0:Wl.replace(/\/$/,"");if(!f)return"ws://127.0.0.1:18791/ws";try{const h=new URL(f,window.location.origin);return`${h.protocol==="https:"?"wss:":h.protocol==="http:"?"ws:":h.protocol}//${h.host}/ws`}catch{return f.startsWith("wss://")||f.startsWith("ws://")?`${f}/ws`:f.startsWith("https://")?`${f.replace(/^https:/,"wss:")}/ws`:f.startsWith("http://")?`${f.replace(/^http:/,"ws:")}/ws`:`${f}/ws`}})(),c=new gj(l);return c.on("connection.open",()=>{a("connected")}),c.on("config.updated",()=>{t&&t.invalidateQueries({queryKey:["config"]})}),c.on("error",f=>{f.type==="error"&&console.error("WebSocket error:",f.payload.message)}),c.connect(),o(c),()=>c.disconnect()},[a,t]),r}const ey=new kS({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0}}});function vj(){yj(ey);const t=wr();return u.jsxs(CS,{client:ey,children:[u.jsx(bN,{children:u.jsx("div",{className:"animate-fade-in w-full h-full",children:u.jsxs(bb,{children:[u.jsx($n,{path:"/model",element:u.jsx(jP,{})}),u.jsx($n,{path:"/providers",element:u.jsx(sR,{})}),u.jsx($n,{path:"/channels",element:u.jsx(fR,{})}),u.jsx($n,{path:"/runtime",element:u.jsx(gR,{})}),u.jsx($n,{path:"/sessions",element:u.jsx(SR,{})}),u.jsx($n,{path:"/cron",element:u.jsx(jR,{})}),u.jsx($n,{path:"/marketplace",element:u.jsx(mj,{})}),u.jsx($n,{path:"/",element:u.jsx(Gm,{to:"/model",replace:!0})}),u.jsx($n,{path:"*",element:u.jsx(Gm,{to:"/model",replace:!0})})]})},t.pathname)}),u.jsx(pP,{position:"top-right",richColors:!0})]})}C1.createRoot(document.getElementById("root")).render(u.jsx(m.StrictMode,{children:u.jsx(eC,{children:u.jsx(Vb,{children:u.jsx(vj,{})})})}));