@goodfish/jarvy 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,604 @@
1
+ var o8=Object.defineProperty;var Sy=e=>{throw TypeError(e)};var s8=(e,a,i)=>a in e?o8(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i;var uc=(e,a,i)=>s8(e,typeof a!="symbol"?a+"":a,i),ky=(e,a,i)=>a.has(e)||Sy("Cannot "+i);var Ln=(e,a,i)=>(ky(e,a,"read from private field"),i?i.call(e):a.get(e)),Cy=(e,a,i)=>a.has(e)?Sy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,i),zm=(e,a,i,r)=>(ky(e,a,"write to private field"),r?r.call(e,i):a.set(e,i),i);function c8(e,a){for(var i=0;i<a.length;i++){const r=a[i];if(typeof r!="string"&&!Array.isArray(r)){for(const c in r)if(c!=="default"&&!(c in e)){const u=Object.getOwnPropertyDescriptor(r,c);u&&Object.defineProperty(e,c,u.get?u:{enumerable:!0,get:()=>r[c]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}})();function v0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lm={exports:{}},dc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ny;function u8(){if(Ny)return dc;Ny=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var f in c)f!=="key"&&(u[f]=c[f])}else u=c;return c=u.ref,{$$typeof:e,type:r,key:d,ref:c!==void 0?c:null,props:u}}return dc.Fragment=a,dc.jsx=i,dc.jsxs=i,dc}var Ey;function d8(){return Ey||(Ey=1,Lm.exports=u8()),Lm.exports}var o=d8(),Bm={exports:{}},Ke={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ty;function f8(){if(Ty)return Ke;Ty=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),j=Symbol.iterator;function S(F){return F===null||typeof F!="object"?null:(F=j&&F[j]||F["@@iterator"],typeof F=="function"?F:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function M(F,se,ye){this.props=F,this.context=se,this.refs=E,this.updater=ye||k}M.prototype.isReactComponent={},M.prototype.setState=function(F,se){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,se,"setState")},M.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function T(){}T.prototype=M.prototype;function _(F,se,ye){this.props=F,this.context=se,this.refs=E,this.updater=ye||k}var z=_.prototype=new T;z.constructor=_,C(z,M.prototype),z.isPureReactComponent=!0;var A=Array.isArray;function P(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function O(F,se,ye){var we=ye.ref;return{$$typeof:e,type:F,key:se,ref:we!==void 0?we:null,props:ye}}function G(F,se){return O(F.type,se,F.props)}function q(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function Q(F){var se={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ye){return se[ye]})}var V=/\/+/g;function Y(F,se){return typeof F=="object"&&F!==null&&F.key!=null?Q(""+F.key):se.toString(36)}function K(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(P,P):(F.status="pending",F.then(function(se){F.status==="pending"&&(F.status="fulfilled",F.value=se)},function(se){F.status==="pending"&&(F.status="rejected",F.reason=se)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function D(F,se,ye,we,ce){var xe=typeof F;(xe==="undefined"||xe==="boolean")&&(F=null);var Ce=!1;if(F===null)Ce=!0;else switch(xe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(F.$$typeof){case e:case a:Ce=!0;break;case y:return Ce=F._init,D(Ce(F._payload),se,ye,we,ce)}}if(Ce)return ce=ce(F),Ce=we===""?"."+Y(F,0):we,A(ce)?(ye="",Ce!=null&&(ye=Ce.replace(V,"$&/")+"/"),D(ce,se,ye,"",function(je){return je})):ce!=null&&(q(ce)&&(ce=G(ce,ye+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(V,"$&/")+"/")+Ce)),se.push(ce)),1;Ce=0;var pe=we===""?".":we+":";if(A(F))for(var W=0;W<F.length;W++)we=F[W],xe=pe+Y(we,W),Ce+=D(we,se,ye,xe,ce);else if(W=S(F),typeof W=="function")for(F=W.call(F),W=0;!(we=F.next()).done;)we=we.value,xe=pe+Y(we,W++),Ce+=D(we,se,ye,xe,ce);else if(xe==="object"){if(typeof F.then=="function")return D(K(F),se,ye,we,ce);throw se=String(F),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function $(F,se,ye){if(F==null)return F;var we=[],ce=0;return D(F,we,"","",function(xe){return se.call(ye,xe,ce++)}),we}function ne(F){if(F._status===-1){var se=F._result,ye=se();ye.then(function(we){(F._status===0||F._status===-1)&&(F._status=1,F._result=we,ye.status===void 0&&(ye.status="fulfilled",ye.value=we))},function(we){(F._status===0||F._status===-1)&&(F._status=2,F._result=we,ye.status===void 0&&(ye.status="rejected",ye.reason=we))}),F._status===-1&&(F._status=0,F._result=ye)}if(F._status===1)return F._result.default;throw F._result}var R=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)};function le(F){var se=H.T,ye={};ye.types=se!==null?se.types:null,H.T=ye;try{var we=F(),ce=H.S;ce!==null&&ce(ye,we),typeof we=="object"&&we!==null&&typeof we.then=="function"&&we.then(P,R)}catch(xe){R(xe)}finally{se!==null&&ye.types!==null&&(se.types=ye.types),H.T=se}}function ie(F){var se=H.T;if(se!==null){var ye=se.types;ye===null?se.types=[F]:ye.indexOf(F)===-1&&ye.push(F)}else le(ie.bind(null,F))}var B={map:$,forEach:function(F,se,ye){$(F,function(){se.apply(this,arguments)},ye)},count:function(F){var se=0;return $(F,function(){se++}),se},toArray:function(F){return $(F,function(se){return se})||[]},only:function(F){if(!q(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Ke.Activity=p,Ke.Children=B,Ke.Component=M,Ke.Fragment=i,Ke.Profiler=c,Ke.PureComponent=_,Ke.StrictMode=r,Ke.Suspense=m,Ke.ViewTransition=b,Ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ke.__COMPILER_RUNTIME={__proto__:null,c:function(F){return H.H.useMemoCache(F)}},Ke.addTransitionType=ie,Ke.cache=function(F){return function(){return F.apply(null,arguments)}},Ke.cacheSignal=function(){return null},Ke.cloneElement=function(F,se,ye){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var we=C({},F.props),ce=F.key;if(se!=null)for(xe in se.key!==void 0&&(ce=""+se.key),se)!U.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(we[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)we.children=ye;else if(1<xe){for(var Ce=Array(xe),pe=0;pe<xe;pe++)Ce[pe]=arguments[pe+2];we.children=Ce}return O(F.type,ce,we)},Ke.createContext=function(F){return F={$$typeof:d,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:u,_context:F},F},Ke.createElement=function(F,se,ye){var we,ce={},xe=null;if(se!=null)for(we in se.key!==void 0&&(xe=""+se.key),se)U.call(se,we)&&we!=="key"&&we!=="__self"&&we!=="__source"&&(ce[we]=se[we]);var Ce=arguments.length-2;if(Ce===1)ce.children=ye;else if(1<Ce){for(var pe=Array(Ce),W=0;W<Ce;W++)pe[W]=arguments[W+2];ce.children=pe}if(F&&F.defaultProps)for(we in Ce=F.defaultProps,Ce)ce[we]===void 0&&(ce[we]=Ce[we]);return O(F,xe,ce)},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function(F){return{$$typeof:f,render:F}},Ke.isValidElement=q,Ke.lazy=function(F){return{$$typeof:y,_payload:{_status:-1,_result:F},_init:ne}},Ke.memo=function(F,se){return{$$typeof:v,type:F,compare:se===void 0?null:se}},Ke.startTransition=le,Ke.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ke.use=function(F){return H.H.use(F)},Ke.useActionState=function(F,se,ye){return H.H.useActionState(F,se,ye)},Ke.useCallback=function(F,se){return H.H.useCallback(F,se)},Ke.useContext=function(F){return H.H.useContext(F)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function(F,se){return H.H.useDeferredValue(F,se)},Ke.useEffect=function(F,se){return H.H.useEffect(F,se)},Ke.useEffectEvent=function(F){return H.H.useEffectEvent(F)},Ke.useId=function(){return H.H.useId()},Ke.useImperativeHandle=function(F,se,ye){return H.H.useImperativeHandle(F,se,ye)},Ke.useInsertionEffect=function(F,se){return H.H.useInsertionEffect(F,se)},Ke.useLayoutEffect=function(F,se){return H.H.useLayoutEffect(F,se)},Ke.useMemo=function(F,se){return H.H.useMemo(F,se)},Ke.useOptimistic=function(F,se){return H.H.useOptimistic(F,se)},Ke.useReducer=function(F,se,ye){return H.H.useReducer(F,se,ye)},Ke.useRef=function(F){return H.H.useRef(F)},Ke.useState=function(F){return H.H.useState(F)},Ke.useSyncExternalStore=function(F,se,ye){return H.H.useSyncExternalStore(F,se,ye)},Ke.useTransition=function(){return H.H.useTransition()},Ke.version="19.3.0",Ke}var Ay;function y0(){return Ay||(Ay=1,Bm.exports=f8()),Bm.exports}var w=y0();const h8=v0(w),Ac=c8({__proto__:null,default:h8},[w]);var Im={exports:{}},fc={},Pm={exports:{}},Hm={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var _y;function m8(){return _y||(_y=1,(function(e){function a(K,D){var $=K.length;K.push(D);e:for(;0<$;){var ne=$-1>>>1,R=K[ne];if(0<c(R,D))K[ne]=D,K[$]=R,$=ne;else break e}}function i(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var D=K[0],$=K.pop();if($!==D){K[0]=$;e:for(var ne=0,R=K.length,le=R>>>1;ne<le;){var ie=2*(ne+1)-1,B=K[ie],F=ie+1,se=K[F];if(0>c(B,$))F<R&&0>c(se,B)?(K[ne]=se,K[F]=$,ne=F):(K[ne]=B,K[ie]=$,ne=ie);else if(F<R&&0>c(se,$))K[ne]=se,K[F]=$,ne=F;else break e}}return D}function c(K,D){var $=K.sortIndex-D.sortIndex;return $!==0?$:K.id-D.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],v=[],y=1,p=null,b=3,j=!1,S=!1,k=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function _(K){for(var D=i(v);D!==null;){if(D.callback===null)r(v);else if(D.startTime<=K)r(v),D.sortIndex=D.expirationTime,a(m,D);else break;D=i(v)}}function z(K){if(k=!1,_(K),!S)if(i(m)!==null)S=!0,A||(A=!0,q());else{var D=i(v);D!==null&&Y(z,D.startTime-K)}}var A=!1,P=-1,H=5,U=-1;function O(){return C?!0:!(e.unstable_now()-U<H)}function G(){if(C=!1,A){var K=e.unstable_now();U=K;var D=!0;try{e:{S=!1,k&&(k=!1,M(P),P=-1),j=!0;var $=b;try{t:{for(_(K),p=i(m);p!==null&&!(p.expirationTime>K&&O());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,b=p.priorityLevel;var R=ne(p.expirationTime<=K);if(K=e.unstable_now(),typeof R=="function"){p.callback=R,_(K),D=!0;break t}p===i(m)&&r(m),_(K)}else r(m);p=i(m)}if(p!==null)D=!0;else{var le=i(v);le!==null&&Y(z,le.startTime-K),D=!1}}break e}finally{p=null,b=$,j=!1}D=void 0}}finally{D?q():A=!1}}}var q;if(typeof T=="function")q=function(){T(G)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,V=Q.port2;Q.port1.onmessage=G,q=function(){V.postMessage(null)}}else q=function(){E(G,0)};function Y(K,D){P=E(function(){K(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.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},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var D=3;break;default:D=b}var $=b;b=D;try{return K()}finally{b=$}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(K,D){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var $=b;b=K;try{return D()}finally{b=$}},e.unstable_scheduleCallback=function(K,D,$){var ne=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ne+$:ne):$=ne,K){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=$+R,K={id:y++,callback:D,priorityLevel:K,startTime:$,expirationTime:R,sortIndex:-1},$>ne?(K.sortIndex=$,a(v,K),i(m)===null&&K===i(v)&&(k?(M(P),P=-1):k=!0,Y(z,$-ne))):(K.sortIndex=R,a(m,K),S||j||(S=!0,A||(A=!0,q()))),K},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(K){var D=b;return function(){var $=b;b=D;try{return K.apply(this,arguments)}finally{b=$}}}})(Hm)),Hm}var My;function p8(){return My||(My=1,Pm.exports=m8()),Pm.exports}var Um={exports:{}},An={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Ry;function g8(){if(Ry)return An;Ry=1;var e=y0();function a(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(y,p,b){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:j==null?null:j===d?d:""+j,children:y,containerInfo:p,implementation:b}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,An.browser=function(y){return{$$typeof:u,_reason:y}},An.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return f(y,p,null,b)},An.flushSync=function(y){var p=m.T,b=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=p,r.p=b,r.d.f()}},An.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(y,p))},An.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},An.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,k=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:j,integrity:S,fetchPriority:k}):b==="script"&&r.d.X(y,{crossOrigin:j,integrity:S,fetchPriority:k,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},An.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=v(p.as,p.crossOrigin);r.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&r.d.M(y)},An.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin);r.d.L(y,b,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},An.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=v(p.as,p.crossOrigin);r.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else r.d.m(y)},An.requestFormReset=function(y){r.d.r(y)},An.unstable_batchedUpdates=function(y,p){return y(p)},An.useFormState=function(y,p,b){return m.H.useFormState(y,p,b)},An.useFormStatus=function(){return m.H.useHostTransitionStatus()},An.version="19.3.0",An}var Dy;function Kb(){if(Dy)return Um.exports;Dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Um.exports=g8(),Um.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Oy;function v8(){if(Oy)return fc;Oy=1;var e=p8(),a=y0(),i=Kb();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var n=t,l=n;l&&!l.alternate;)n=l,(n.flags&4098)!==0&&(t=n.return),l=n.return;for(;n.return;)n=n.return;return n.tag===3?t:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(u(t)!==t)throw Error(r(188))}function v(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(r(188));return n!==t?null:t}for(var l=t,s=n;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(s=h.return,s!==null){l=s;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return m(h),t;if(g===s)return m(h),n;g=g.sibling}throw Error(r(188))}if(l.return!==s.return)l=h,s=g;else{for(var N=!1,L=h.child;L;){if(L===l){N=!0,l=h,s=g;break}if(L===s){N=!0,s=h,l=g;break}L=L.sibling}if(!N){for(L=g.child;L;){if(L===l){N=!0,l=g,s=h;break}if(L===s){N=!0,s=g,l=h;break}L=L.sibling}if(!N)throw Error(r(189))}}if(l.alternate!==s)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:n}function y(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=y(t),n!==null)return n;t=t.sibling}return null}function p(t,n,l,s,h,g){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,s,h,g)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&p(t.child,n,l,s,h,g))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function j(t){var n=!1;for(t=t.return;t!==null&&(t.tag===4&&(n=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return n}function S(t){var n=[null,null],l=b(t);return l===null||k(n,t,l.child,{foundSelf:!1}),n}function k(t,n,l,s){for(;l!==null;){if(l===n)s.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(s.foundSelf)return t[1]=l,!0;t[0]=l}else if((l.tag!==22||l.memoizedState===null)&&k(t,n,l.child,s))return!0;l=l.sibling}return!1}function C(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(r(559))}}var E=null,M=null;function T(t,n,l){return t===l?!0:t===n?(E=t,!0):!1}function _(t,n,l){return t===l?(M=t,!1):t===n?(M!==null&&(E=t),!0):!1}function z(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function A(t,n,l){for(var s=0,h=t;h;h=l(h))s++;h=0;for(var g=n;g;g=l(g))h++;for(;0<s-h;)t=l(t),s--;for(;0<h-s;)n=l(n),h--;for(;s--;){if(t===n||n!==null&&t===n.alternate)return t;t=l(t),n=l(n)}return null}var P=Object.assign,H=Symbol.for("react.element"),U=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),ie=Symbol.for("react.legacy_hidden"),B=Symbol.for("react.memo_cache_sentinel"),F=Symbol.for("react.view_transition"),se=Symbol.for("react.recoverable"),ye=Symbol.iterator;function we(t){return t===null||typeof t!="object"?null:(t=ye&&t[ye]||t["@@iterator"],typeof t=="function"?t:null)}var ce=Symbol.for("react.client.reference");function xe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case Q:return"Profiler";case q:return"StrictMode";case D:return"Suspense";case $:return"SuspenseList";case le:return"Activity";case F:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case O:return"Portal";case Y:return t.displayName||"Context";case V:return(t._context.displayName||"Context")+".Consumer";case K:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ne:return n=t.displayName||null,n!==null?n:xe(t.type)||"Memo";case R:n=t._payload,t=t._init;try{return xe(t(n))}catch{}}return null}var Ce=Array.isArray,pe=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,je={pending:!1,data:null,method:null,action:null},Re=[],Oe=-1;function Fe(t){return{current:t}}function Je(t){0>Oe||(t.current=Re[Oe],Re[Oe]=null,Oe--)}function We(t,n){Oe++,Re[Oe]=t.current,t.current=n}var Ct=Fe(null),rn=Fe(null),xn=Fe(null),Pn=Fe(null);function fa(t,n){switch(We(xn,n),We(rn,t),We(Ct,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?R2(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=R2(n),t=D2(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Je(Ct),We(Ct,t)}function ln(){Je(Ct),Je(rn),Je(xn)}function Ga(t){var n=t.memoizedState;n!==null&&(Ko._currentValue=n.memoizedState,We(Pn,t)),n=Ct.current;var l=D2(n,t.type);n!==l&&(We(rn,t),We(Ct,l))}function fe(t){rn.current===t&&(Je(Ct),Je(rn)),Pn.current===t&&(Je(Pn),Ko._currentValue=je)}var Ne,qe;function Ge(t){if(Ne===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Ne=n&&n[1]||"",qe=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ne+t+qe}var nt=!1;function Ut(t,n){if(!t||nt)return"";nt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(_e){var J=_e}Reflect.construct(t,[],ve)}else{try{ve.call()}catch(_e){J=_e}ve=!1;try{var oe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ve=!0,new t}finally{ve&&(oe!==void 0?Object.defineProperty(t.prototype,"props",oe):delete t.prototype.props)}}}else{try{throw Error()}catch(_e){J=_e}(ve=t())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(_e){if(_e&&J&&typeof _e.stack=="string")return[_e.stack,J.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),N=g[0],L=g[1];if(N&&L){var X=N.split(`
44
+ `),te=L.split(`
45
+ `);for(h=s=0;s<X.length&&!X[s].includes("DetermineComponentFrameRoot");)s++;for(;h<te.length&&!te[h].includes("DetermineComponentFrameRoot");)h++;if(s===X.length||h===te.length)for(s=X.length-1,h=te.length-1;1<=s&&0<=h&&X[s]!==te[h];)h--;for(;1<=s&&0<=h;s--,h--)if(X[s]!==te[h]){if(s!==1||h!==1)do if(s--,h--,0>h||X[s]!==te[h]){var de=`
46
+ `+X[s].replace(" at new "," at ");return t.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",t.displayName)),de}while(1<=s&&0<=h);break}}}finally{nt=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Ge(l):""}function dn(t,n){switch(t.tag){case 26:case 27:case 5:return Ge(t.type);case 16:return Ge("Lazy");case 13:return t.child!==n&&n!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return Ut(t.type,!1);case 11:return Ut(t.type.render,!1);case 1:return Ut(t.type,!0);case 31:return Ge("Activity");case 30:return Ge("ViewTransition");default:return""}}function qt(t){try{var n="",l=null;do n+=dn(t,l),l=t,t=t.return;while(t);return n}catch(s){return`
47
+ Error generating stack: `+s.message+`
48
+ `+s.stack}}var Rn=Object.prototype.hasOwnProperty,Hn=e.unstable_scheduleCallback,zt=e.unstable_cancelCallback,Dn=e.unstable_shouldYield,Xe=e.unstable_requestPaint,Yt=e.unstable_now,ml=e.unstable_getCurrentPriorityLevel,ui=e.unstable_ImmediatePriority,di=e.unstable_UserBlockingPriority,bn=e.unstable_NormalPriority,ha=e.unstable_LowPriority,pl=e.unstable_IdlePriority,ma=e.log,fo=e.unstable_setDisableYieldValue,Ya=null,fn=null;function It(t){if(typeof ma=="function"&&fo(t),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(Ya,t)}catch{}}var $t=Math.clz32?Math.clz32:Xa,fi=Math.log,hi=Math.LN2;function Xa(t){return t>>>=0,t===0?32:31-(fi(t)/hi|0)|0}var Ka=256,Ra=262144,Zn=4194304;function Qa(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function pa(t,n,l){var s=t.pendingLanes;if(s===0)return 0;var h=0,g=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var L=s&134217727;return L!==0?(s=L&~g,s!==0?h=Qa(s):(N&=L,N!==0?h=Qa(N):l||(l=L&~t,l!==0&&(h=Qa(l))))):(L=s&~g,L!==0?h=Qa(L):N!==0?h=Qa(N):l||(l=s&~t,l!==0&&(h=Qa(l)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:h}function ga(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function mi(t,n){(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var s=31-$t(l),h=1<<s;n|=t[s],l&=~h}return n}function gl(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function va(){var t=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),t}function Cr(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Za(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ja(t,n,l,s,h,g){var N=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var L=t.entanglements,X=t.expirationTimes,te=t.hiddenUpdates;for(l=N&~l;0<l;){var de=31-$t(l),ve=1<<de;L[de]=0,X[de]=-1;var J=te[de];if(J!==null)for(te[de]=null,de=0;de<J.length;de++){var oe=J[de];oe!==null&&(oe.lane&=-536870913)}l&=~ve}s!==0&&Un(t,s,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(N&~n))}function Un(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-$t(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|l&261930}function Vi(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var s=31-$t(l),h=1<<s;h&n|t[s]&n&&(t[s]|=n),l&=~h}}function Xt(t,n){var l=n&-n;return l=(l&42)!==0?1:on(l),(l&(t.suspendedLanes|n))!==0?0:l}function on(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Jn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Wn(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:gy(t.type))}function $i(t,n){var l=W.p;try{return W.p=t,n()}finally{W.p=l}}var xt=Math.random().toString(36).slice(2),Dt="__reactFiber$"+xt,sn="__reactProps$"+xt,jn="__reactContainer$"+xt,Gi="__reactEvents$"+xt,Nr="__reactListeners$"+xt,Er="__reactHandles$"+xt,pi="__reactResources$"+xt,Yi="__reactMarker$"+xt,Xi="__reactLoad$"+xt;function Ki(t){delete t[Dt],delete t[sn],delete t[Nr],delete t[Er]}function ea(t){var n;if(n=t[Dt])return n;for(var l=t.parentNode;l;){if(n=l[jn]||l[Dt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=Q2(t);t!==null;){if(l=t[Dt])return l;t=Q2(t)}return n}t=l,l=t.parentNode}return null}function gi(t){if(t=t[Dt]||t[jn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ue(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function be(t){var n=t[pi];return n||(n=t[pi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function I(t){t[Yi]=!0}function ae(t){t[Xi]=void 0}var me=new Set,Te={};function Ee(t,n){He(t,n),He(t+"Capture",n)}function He(t,n){for(Te[t]=n,t=0;t<n.length;t++)me.add(n[t])}var Ie=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ze={},Pe={};function ut(t){return Rn.call(Pe,t)?!0:Rn.call(ze,t)?!1:Ie.test(t)?Pe[t]=!0:(ze[t]=!0,!1)}var Ve=!1;function cn(){var t=Ve;return Ve=!1,t}function Pt(t,n,l){if(ut(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,l)}}function ya(t,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,l)}}function Kt(t,n,l,s){if(s===null)t.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,s)}}function Qt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ho(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function xs(t,n,l){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var h=s.get,g=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(N){l=""+N,g.call(this,N)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Qi(t){if(!t._valueTracker){var n=ho(t)?"checked":"value";t._valueTracker=xs(t,n,""+t[n])}}function mo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return t&&(s=ho(t)?t.checked?"true":"false":t.value),t=s,t!==l?(n.setValue(t),!0):!1}var qc=/[\n"\\]/g;function Ot(t){return t.replace(qc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function On(t,n,l,s,h,g,N,L){t.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.type=N:t.removeAttribute("type"),n!=null?N==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Qt(n)):t.value!==""+Qt(n)&&(t.value=""+Qt(n)):N!=="submit"&&N!=="reset"||t.removeAttribute("value"),n!=null?N==="number"&&t.value==n?po(t,Qt(t.value)):po(t,Qt(n)):l!=null?po(t,Qt(l)):s!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?t.name=""+Qt(L):t.removeAttribute("name")}function Tr(t,n,l,s,h,g,N,L){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Qi(t);return}l=l!=null?""+Qt(l):"",n=n!=null?""+Qt(n):l,L||n===t.value||(t.value=n),t.defaultValue=n}s=s??h,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=L?t.checked:!!s,t.defaultChecked=!!s,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Qi(t)}function po(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function ta(t,n,l,s){if(t=t.options,n){n={};for(var h=0;h<l.length;h++)n["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=n.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&s&&(t[l].defaultSelected=!0)}else{for(l=""+Qt(l),n=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,s&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function go(t,n,l){if(n!=null&&(n=""+Qt(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+Qt(l):""}function xa(t,n,l,s){if(n==null){if(s!=null){if(l!=null)throw Error(r(92));if(Ce(s)){if(1<s.length)throw Error(r(93));s=s[0]}l=s}l==null&&(l=""),n=l}l=Qt(n),t.defaultValue=l,s=t.textContent,s===l&&s!==""&&s!==null&&(t.value=s),Qi(t)}function qn(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Ar=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bs(t,n,l){var s=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,l):typeof l!="number"||l===0||Ar.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function ba(t,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(t=t.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="",Ve=!0);for(var h in n)s=n[h],n.hasOwnProperty(h)&&l[h]!==s&&(bs(t,h,s),Ve=!0)}else for(var g in n)n.hasOwnProperty(g)&&bs(t,g,n[g])}function vl(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var js=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ws=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(t){return ws.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fn(){}var yl=null;function xl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ht=null,hn=null;function Da(t){var n=gi(t);if(n&&(t=n.stateNode)){var l=t[sn]||null;e:switch(t=n.stateNode,n.type){case"input":if(On(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ot(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==t&&s.form===t.form){var h=s[sn]||null;if(!h)throw Error(r(90));On(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)s=l[n],s.form===t.form&&mo(s)}break e;case"textarea":go(t,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&ta(t,!!l.multiple,n,!1)}}}var ja=!1;function bl(t,n,l){if(ja)return t(n,l);ja=!0;try{var s=t(n);return s}finally{if(ja=!1,(ht!==null||hn!==null)&&(qu(),ht&&(n=ht,t=hn,hn=ht=null,Da(n),t)))for(n=0;n<t.length;n++)Da(t[n])}}function Zi(t,n){var l=t.stateNode;if(l===null)return null;var s=l[sn]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jl=!1;if(Sn)try{var Ss={};Object.defineProperty(Ss,"passive",{get:function(){jl=!0}}),window.addEventListener("test",Ss,Ss),window.removeEventListener("test",Ss,Ss)}catch{jl=!1}var _r=null,xf=null,Fc=null;function Tg(){if(Fc)return Fc;var t,n=xf,l=n.length,s,h="value"in _r?_r.value:_r.textContent,g=h.length;for(t=0;t<l&&n[t]===h[t];t++);var N=l-t;for(s=1;s<=N&&n[l-s]===h[g-s];s++);return Fc=h.slice(t,1<s?1-s:void 0)}function Vc(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function $c(){return!0}function Ag(){return!1}function Vn(t){function n(l,s,h,g,N){this._reactName=l,this._targetInst=h,this.type=s,this.nativeEvent=g,this.target=N,this.currentTarget=null;for(var L in t)t.hasOwnProperty(L)&&(l=t[L],this[L]=l?l(g):g[L]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?$c:Ag,this.isPropagationStopped=Ag,this}return P(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=$c)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=$c)},persist:function(){},isPersistent:$c}),n}var Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gc=Vn(Mr),ks=P({},Mr,{view:0,detail:0}),R5=Vn(ks),bf,jf,Cs,Yc=P({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Cs&&(Cs&&t.type==="mousemove"?(bf=t.screenX-Cs.screenX,jf=t.screenY-Cs.screenY):jf=bf=0,Cs=t),bf)},movementY:function(t){return"movementY"in t?t.movementY:jf}}),_g=Vn(Yc),D5=P({},Yc,{dataTransfer:0}),O5=Vn(D5),z5=P({},ks,{relatedTarget:0}),wf=Vn(z5),L5=P({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),B5=Vn(L5),I5=P({},Mr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),P5=Vn(I5),H5=P({},Mr,{data:0}),Mg=Vn(H5),U5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q5={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"},F5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V5(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=F5[t])?!!n[t]:!1}function Sf(){return V5}var $5=P({},ks,{key:function(t){if(t.key){var n=U5[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Vc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?q5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sf,charCode:function(t){return t.type==="keypress"?Vc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Vc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),G5=Vn($5),Y5=P({},Yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rg=Vn(Y5),X5=P({},Mr,{submitter:0}),K5=Vn(X5),Q5=P({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sf}),Z5=Vn(Q5),J5=P({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),W5=Vn(J5),e6=P({},Yc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),t6=Vn(e6),n6=P({},Mr,{newState:0,oldState:0,source:0}),a6=Vn(n6),i6=[9,13,27,32],kf=Sn&&"CompositionEvent"in window,Ns=null;Sn&&"documentMode"in document&&(Ns=document.documentMode);var r6=Sn&&"TextEvent"in window&&!Ns,Dg=Sn&&(!kf||Ns&&8<Ns&&11>=Ns),Og=" ",zg=!1;function Lg(t,n){switch(t){case"keyup":return i6.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vo=!1;function l6(t,n){switch(t){case"compositionend":return Bg(n);case"keypress":return n.which!==32?null:(zg=!0,Og);case"textInput":return t=n.data,t===Og&&zg?null:t;default:return null}}function o6(t,n){if(vo)return t==="compositionend"||!kf&&Lg(t,n)?(t=Tg(),Fc=xf=_r=null,vo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Dg&&n.locale!=="ko"?null:n.data;default:return null}}var s6={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 Ig(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!s6[t.type]:n==="textarea"}function Pg(t,n,l,s){ht?hn?hn.push(s):hn=[s]:ht=s,n=Xu(n,"onChange"),0<n.length&&(l=new Gc("onChange","change",null,l,s),t.push({event:l,listeners:n}))}var Es=null,Ts=null;function c6(t){N2(t,0)}function Xc(t){var n=ue(t);if(mo(n))return t}function Hg(t,n){if(t==="change")return n}var Ug=!1;if(Sn){var Cf;if(Sn){var Nf="oninput"in document;if(!Nf){var qg=document.createElement("div");qg.setAttribute("oninput","return;"),Nf=typeof qg.oninput=="function"}Cf=Nf}else Cf=!1;Ug=Cf&&(!document.documentMode||9<document.documentMode)}function Fg(){Es&&(Es.detachEvent("onpropertychange",Vg),Ts=Es=null)}function Vg(t){if(t.propertyName==="value"&&Xc(Ts)){var n=[];Pg(n,Ts,t,xl(t)),bl(c6,n)}}function u6(t,n,l){t==="focusin"?(Fg(),Es=n,Ts=l,Es.attachEvent("onpropertychange",Vg)):t==="focusout"&&Fg()}function d6(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Xc(Ts)}function f6(t,n){if(t==="click")return Xc(n)}function h6(t,n){if(t==="input"||t==="change")return Xc(n)}function m6(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var wa=typeof Object.is=="function"?Object.is:m6;function As(t,n){if(wa(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var l=Object.keys(t),s=Object.keys(n);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var h=l[s];if(!Rn.call(n,h)||!wa(t[h],n[h]))return!1}return!0}function Ef(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $g(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Gg(t,n){var l=$g(t);t=0;for(var s;l;){if(l.nodeType===3){if(s=t+l.textContent.length,t<=n&&s>=n)return{node:l,offset:n-t};t=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=$g(l)}}function Yg(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Yg(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Xg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Ef(t.document);n instanceof t.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)t=n.contentWindow;else break;n=Ef(t.document)}return n}function Tf(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var p6=Sn&&"documentMode"in document&&11>=document.documentMode,yo=null,Af=null,_s=null,_f=!1;function Kg(t,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_f||yo==null||yo!==Ef(s)||(s=yo,"selectionStart"in s&&Tf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),_s&&As(_s,s)||(_s=s,s=Xu(Af,"onSelect"),0<s.length&&(n=new Gc("onSelect","select",null,n,l),t.push({event:n,listeners:s}),n.target=yo)))}function wl(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var xo={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionrun:wl("Transition","TransitionRun"),transitionstart:wl("Transition","TransitionStart"),transitioncancel:wl("Transition","TransitionCancel"),transitionend:wl("Transition","TransitionEnd")},Mf={},Qg={};Sn&&(Qg=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function Sl(t){if(Mf[t])return Mf[t];if(!xo[t])return t;var n=xo[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in Qg)return Mf[t]=n[l];return t}var Zg=Sl("animationend"),Jg=Sl("animationiteration"),Wg=Sl("animationstart"),g6=Sl("transitionrun"),v6=Sl("transitionstart"),y6=Sl("transitioncancel"),e1=Sl("transitionend"),t1=new Map,Rf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Rf.push("scrollEnd");function Wa(t,n){t1.set(t,n),Ee(n,[t])}var x6=0;function Ji(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=ai.identifierPrefix;var l=x6++;return t="_"+t+"t_"+l.toString(32)+"_",n.autoName=t}function n1(t){if(t==null||typeof t=="string")return t;var n=null,l=Po;if(l!==null)for(var s=0;s<l.length;s++){var h=t[l[s]];if(h!=null){if(h==="none")return"none";n=n==null?h:n+(" "+h)}}return n??t.default}function Wi(t,n){return t=n1(t),n=n1(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var Kc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Oa=[],bo=0,Df=0;function Qc(){for(var t=bo,n=Df=bo=0;n<t;){var l=Oa[n];Oa[n++]=null;var s=Oa[n];Oa[n++]=null;var h=Oa[n];Oa[n++]=null;var g=Oa[n];if(Oa[n++]=null,s!==null&&h!==null){var N=s.pending;N===null?h.next=h:(h.next=N.next,N.next=h),s.pending=h}g!==0&&a1(l,h,g)}}function Zc(t,n,l,s){Oa[bo++]=t,Oa[bo++]=n,Oa[bo++]=l,Oa[bo++]=s,Df|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Of(t,n,l,s){return Zc(t,n,l,s),Jc(t)}function kl(t,n){return Zc(t,null,null,n),Jc(t)}function a1(t,n,l){t.lanes|=l;var s=t.alternate;s!==null&&(s.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,s=g.alternate,s!==null&&(s.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-$t(l),t=g.hiddenUpdates,s=t[h],s===null?t[h]=[n]:s.push(n),n.lane=l|536870912),g):null}function Jc(t){if(50<Js)throw Js=0,Uu=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var jo={};function b6(t,n,l,s){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(t,n,l,s){return new b6(t,n,l,s)}function zf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function er(t,n){var l=t.alternate;return l===null?(l=na(t.tag,n,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=n,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&1206910976,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,n=t.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function i1(t,n){t.flags&=1206910978;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,n=l.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Wc(t,n,l,s,h,g){var N=0;if(s=t,typeof s=="function")zf(s)&&(N=1);else if(typeof s=="string")N=Xk(t,l,Ct.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(s){case le:return t=na(31,l,n,h),t.elementType=le,t.lanes=g,t;case G:return Cl(l.children,h,g,n);case q:N=8,h|=24;break;case Q:return t=na(12,l,n,h|2),t.elementType=Q,t.lanes=g,t;case D:return t=na(13,l,n,h),t.elementType=D,t.lanes=g,t;case $:return t=na(19,l,n,h),t.elementType=$,t.lanes=g,t;case ie:case F:return t=h|32,t=na(30,l,n,t),t.elementType=F,t.lanes=g,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Y:N=10;break e;case V:N=9;break e;case K:N=11;break e;case ne:N=14;break e;case R:N=16,s=null;break e}N=29,l=Error(r(130,t===null?"null":typeof t,"")),s=null}return n=na(N,l,n,h),n.elementType=t,n.type=s,n.lanes=g,n}function Cl(t,n,l,s){return t=na(7,t,s,n),t.lanes=l,t}function Lf(t,n,l){return t=na(6,t,null,n),t.lanes=l,t}function r1(t){var n=na(18,null,null,0);return n.stateNode=t,n}function Bf(t,n,l){return n=na(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var l1=new WeakMap;function za(t,n){if(typeof t=="object"&&t!==null){var l=l1.get(t);return l!==void 0?l:(n={value:t,source:n,stack:qt(n)},l1.set(t,n),n)}return{value:t,source:n,stack:qt(n)}}var wo=[],So=0,eu=null,Ms=0,La=[],Ba=0,Rr=null,vi=1,yi="";function tr(t,n){wo[So++]=Ms,wo[So++]=eu,eu=t,Ms=n}function o1(t,n,l){La[Ba++]=vi,La[Ba++]=yi,La[Ba++]=Rr,Rr=t;var s=vi;t=yi;var h=32-$t(s)-1;s&=~(1<<h),l+=1;var g=32-$t(n)+h;if(30<g){var N=h-h%5;g=(s&(1<<N)-1).toString(32),s>>=N,h-=N,vi=1<<32-$t(n)+h|l<<h|s,yi=g+t}else vi=1<<g|l<<h|s,yi=t}function tu(t){t.return!==null&&(tr(t,1),o1(t,1,0))}function If(t){for(;t===eu;)eu=wo[--So],wo[So]=null,Ms=wo[--So],wo[So]=null;for(;t===Rr;)Rr=La[--Ba],La[Ba]=null,yi=La[--Ba],La[Ba]=null,vi=La[--Ba],La[Ba]=null}function s1(t,n){La[Ba++]=vi,La[Ba++]=yi,La[Ba++]=Rr,vi=n.id,yi=n.overflow,Rr=t}var mn=null,Mt=null,at=!1,Dr=null,Ia=!1,Pf=Error(r(519));function Or(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rs(za(n,t)),Pf}function c1(t){var n=t.stateNode,l=t.type,s=t.memoizedProps;switch(n[Dt]=t,n[sn]=s,l){case"dialog":lt("cancel",n),lt("close",n);break;case"iframe":case"object":case"embed":lt("load",n);break;case"video":case"audio":for(l=0;l<ec.length;l++)lt(ec[l],n);break;case"source":lt("error",n);break;case"img":case"image":case"link":lt("error",n),lt("load",n);break;case"details":lt("toggle",n);break;case"input":lt("invalid",n),Tr(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":lt("invalid",n);break;case"textarea":lt("invalid",n),xa(n,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||s.suppressHydrationWarning===!0||_2(n.textContent,l)?(s.popover!=null&&(lt("beforetoggle",n),lt("toggle",n)),s.onScroll!=null&&lt("scroll",n),s.onScrollEnd!=null&&lt("scrollend",n),s.onClick!=null&&(n.onclick=Fn),n=!0):n=!1,n||Or(t,!0)}function nu(t){for(mn=t.return;mn;)switch(mn.tag){case 5:case 31:case 13:Ia=!1;return;case 27:case 3:Ia=!0;return;default:mn=mn.return}}function ko(t){if(t!==mn)return!1;if(!at)return nu(t),at=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||pm(t.type,t.memoizedProps)),l=!l),l&&Mt&&Or(t),nu(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Mt=K2(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Mt=K2(t)}else n===27?(n=Mt,Qr(t.type)?(t=km,km=null,Mt=t):Mt=n):Mt=mn?Ha(t.stateNode.nextSibling):null;return!0}function Nl(){Mt=mn=null,at=!1}function Hf(){var t=Dr;return t!==null&&(ra===null?ra=t:ra.push.apply(ra,t),Dr=null),t}function Rs(t){Dr===null?Dr=[t]:Dr.push(t)}var Uf=Fe(null),El=null,nr=null;function zr(t,n,l){We(Uf,n._currentValue),n._currentValue=l}function ar(t){t._currentValue=Uf.current,Je(Uf)}function au(t,n,l){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===l)break;t=t.return}}function qf(t,n,l,s){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var N=h.child;g=g.firstContext;e:for(;g!==null;){var L=g;g=h;for(var X=0;X<n.length;X++)if(L.context===n[X]){g.lanes|=l,L=g.alternate,L!==null&&(L.lanes|=l),au(g.return,l,t),s||(N=null);break e}g=L.next}}else if(h.tag===18){if(N=h.return,N===null)throw Error(r(341));N.lanes|=l,g=N.alternate,g!==null&&(g.lanes|=l),au(N,l,t),N=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=l,N=h.alternate,N!==null&&(N.lanes|=l),au(h.return,l,t),N=h.child,N=N!==null?N.sibling:null):N=h.child;if(N!==null)N.return=h;else for(N=h;N!==null;){if(N===t){N=null;break}if(h=N.sibling,h!==null){h.return=N.return,N=h;break}N=N.return}h=N}}function Tl(t,n,l,s){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var N=h.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var L=h.type;wa(h.pendingProps.value,N.value)||(t!==null?t.push(L):t=[L])}}else if(h===Pn.current){if(N=h.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ko):t=[Ko])}h=h.return}return t!==null&&qf(n,t,l,s),n.flags|=262144,t!==null}function iu(t){for(t=t.firstContext;t!==null;){if(!wa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Al(t){El=t,nr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kn(t){return u1(El,t)}function ru(t,n){return El===null&&Al(t),u1(t,n)}function u1(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},nr===null){if(t===null)throw Error(r(308));nr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else nr=nr.next=n;return l}var j6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},w6=e.unstable_scheduleCallback,S6=e.unstable_NormalPriority,Zt={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new j6,data:new Map,refCount:0}}function Ds(t){t.refCount--,t.refCount===0&&w6(S6,function(){t.controller.abort()})}function d1(t,n){if((t.pendingLanes&4194048)!==0){var l=t.transitionTypes;for(l===null&&(l=t.transitionTypes=[]),t=0;t<n.length;t++){var s=n[t];l.indexOf(s)===-1&&l.push(s)}}}var Os=null;function k6(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var zs=null,Vf=0,_l=0,Co=null;function C6(t,n){if(zs===null){var l=zs=[];Vf=0,_l=lm(),Co={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Vf++,n.then(f1,f1),n}function f1(){if(--Vf===0&&(Os=null,zs!==null)){Co!==null&&(Co.status="fulfilled");var t=zs;zs=null,_l=0,Co=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function N6(t,n){var l=[],s={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(s.status="rejected",s.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),s}var h1=pe.S;pe.S=function(t,n){if(r2=Yt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&C6(t,n),Os!==null)for(var l=Fo;l!==null;)d1(l,Os),l=l.next;if(l=t.types,l!==null){for(var s=Fo;s!==null;)d1(s,l),s=s.next;if(_l!==0){s=Os,s===null&&(s=Os=[]);for(var h=0;h<l.length;h++){var g=l[h];s.indexOf(g)===-1&&s.push(g)}}}h1!==null&&h1(t,n)};var Ml=Fe(null);function $f(){var t=Ml.current;return t!==null?t:Tt.pooledCache}function lu(t,n){n===null?We(Ml,Ml.current):We(Ml,n.pool)}function m1(){var t=$f();return t===null?null:{parent:Zt._currentValue,pool:t}}var No=Error(r(460)),Gf=Error(r(474)),ou=Error(r(542)),su={then:function(){}};function p1(t){return t=t.status,t==="fulfilled"||t==="rejected"}function g1(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(Fn,Fn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,y1(t),t===void 0&&!("reason"in n)?Error(r(600)):t;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(t=Tt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=s}},function(s){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,y1(t),t}throw Dl=n,No}}function Rl(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Dl=l,No):l}}var Dl=null;function v1(){if(Dl===null)throw Error(r(459));var t=Dl;return Dl=null,t}function y1(t){if(t===No||t===ou)throw Error(r(483))}var Eo=null,Ls=0;function cu(t){var n=Ls;return Ls+=1,Eo===null&&(Eo=[]),g1(Eo,t,n)}function Lr(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function uu(t,n){throw n.$$typeof===H?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function x1(t){function n(ee,Z){if(t){var re=ee.deletions;re===null?(ee.deletions=[Z],ee.flags|=16):re.push(Z)}}function l(ee,Z){if(!t)return null;for(;Z!==null;)n(ee,Z),Z=Z.sibling;return null}function s(ee){for(var Z=new Map;ee!==null;)ee.key===null?Z.set(ee.index,ee):Z.set(ee.key,ee),ee=ee.sibling;return Z}function h(ee,Z){return ee=er(ee,Z),ee.index=0,ee.sibling=null,ee}function g(ee,Z,re){return ee.index=re,t?(re=ee.alternate,re!==null?(re=re.index,re<Z?(ee.flags|=2,Z):re):(ee.flags|=134217730,Z)):(ee.flags|=1048576,Z)}function N(ee){return t&&ee.alternate===null&&(ee.flags|=134217730),ee}function L(ee,Z,re,ge){return Z===null||Z.tag!==6?(Z=Lf(re,ee.mode,ge),Z.return=ee,Z):(Z=h(Z,re),Z.return=ee,Z)}function X(ee,Z,re,ge){var De=re.type;return De===G?(ee=de(ee,Z,re.props.children,ge,re.key),Lr(ee,re),ee):Z!==null&&(Z.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===R&&Rl(De)===Z.type)?(Z=h(Z,re.props),Lr(Z,re),Z.return=ee,Z):(Z=Wc(re.type,re.key,re.props,null,ee.mode,ge),Lr(Z,re),Z.return=ee,Z)}function te(ee,Z,re,ge){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==re.containerInfo||Z.stateNode.implementation!==re.implementation?(Z=Bf(re,ee.mode,ge),Z.return=ee,Z):(Z=h(Z,re.children||[]),Z.return=ee,Z)}function de(ee,Z,re,ge,De){return Z===null||Z.tag!==7?(Z=Cl(re,ee.mode,ge,De),Z.return=ee,Z):(Z=h(Z,re),Z.return=ee,Z)}function ve(ee,Z,re){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Lf(""+Z,ee.mode,re),Z.return=ee,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case U:return re=Wc(Z.type,Z.key,Z.props,null,ee.mode,re),Lr(re,Z),re.return=ee,re;case O:return Z=Bf(Z,ee.mode,re),Z.return=ee,Z;case R:return Z=Rl(Z),ve(ee,Z,re)}if(Ce(Z)||we(Z))return Z=Cl(Z,ee.mode,re,null),Z.return=ee,Z;if(typeof Z.then=="function")return ve(ee,cu(Z),re);if(Z.$$typeof===Y)return ve(ee,ru(ee,Z),re);uu(ee,Z)}return null}function J(ee,Z,re,ge){var De=Z!==null?Z.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return De!==null?null:L(ee,Z,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case U:return re.key===De?X(ee,Z,re,ge):null;case O:return re.key===De?te(ee,Z,re,ge):null;case R:return re=Rl(re),J(ee,Z,re,ge)}if(Ce(re)||we(re))return De!==null?null:de(ee,Z,re,ge,null);if(typeof re.then=="function")return J(ee,Z,cu(re),ge);if(re.$$typeof===Y)return J(ee,Z,ru(ee,re),ge);uu(ee,re)}return null}function oe(ee,Z,re,ge,De){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ee=ee.get(re)||null,L(Z,ee,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case U:return ee=ee.get(ge.key===null?re:ge.key)||null,X(Z,ee,ge,De);case O:return ee=ee.get(ge.key===null?re:ge.key)||null,te(Z,ee,ge,De);case R:return ge=Rl(ge),oe(ee,Z,re,ge,De)}if(Ce(ge)||we(ge))return ee=ee.get(re)||null,de(Z,ee,ge,De,null);if(typeof ge.then=="function")return oe(ee,Z,re,cu(ge),De);if(ge.$$typeof===Y)return oe(ee,Z,re,ru(Z,ge),De);uu(Z,ge)}return null}function _e(ee,Z,re,ge){for(var De=null,ft=null,Ue=Z,Ye=Z=0,en=null;Ue!==null&&Ye<re.length;Ye++){Ue.index>Ye?(en=Ue,Ue=null):en=Ue.sibling;var mt=J(ee,Ue,re[Ye],ge);if(mt===null){Ue===null&&(Ue=en);break}t&&Ue&&mt.alternate===null&&n(ee,Ue),Z=g(mt,Z,Ye),ft===null?De=mt:ft.sibling=mt,ft=mt,Ue=en}if(Ye===re.length)return l(ee,Ue),at&&tr(ee,Ye),De;if(Ue===null){for(;Ye<re.length;Ye++)Ue=ve(ee,re[Ye],ge),Ue!==null&&(Z=g(Ue,Z,Ye),ft===null?De=Ue:ft.sibling=Ue,ft=Ue);return at&&tr(ee,Ye),De}for(Ue=s(Ue);Ye<re.length;Ye++)en=oe(Ue,ee,Ye,re[Ye],ge),en!==null&&(t&&(mt=en.alternate,mt!==null&&Ue.delete(mt.key===null?Ye:mt.key)),Z=g(en,Z,Ye),ft===null?De=en:ft.sibling=en,ft=en);return t&&Ue.forEach(function(tl){return n(ee,tl)}),at&&tr(ee,Ye),De}function Le(ee,Z,re,ge){if(re==null)throw Error(r(151));for(var De=null,ft=null,Ue=Z,Ye=Z=0,en=null,mt=re.next();Ue!==null&&!mt.done;Ye++,mt=re.next()){Ue.index>Ye?(en=Ue,Ue=null):en=Ue.sibling;var tl=J(ee,Ue,mt.value,ge);if(tl===null){Ue===null&&(Ue=en);break}t&&Ue&&tl.alternate===null&&n(ee,Ue),Z=g(tl,Z,Ye),ft===null?De=tl:ft.sibling=tl,ft=tl,Ue=en}if(mt.done)return l(ee,Ue),at&&tr(ee,Ye),De;if(Ue===null){for(;!mt.done;Ye++,mt=re.next())mt=ve(ee,mt.value,ge),mt!==null&&(Z=g(mt,Z,Ye),ft===null?De=mt:ft.sibling=mt,ft=mt);return at&&tr(ee,Ye),De}for(Ue=s(Ue);!mt.done;Ye++,mt=re.next())mt=oe(Ue,ee,Ye,mt.value,ge),mt!==null&&(t&&(en=mt.alternate,en!==null&&Ue.delete(en.key===null?Ye:en.key)),Z=g(mt,Z,Ye),ft===null?De=mt:ft.sibling=mt,ft=mt);return t&&Ue.forEach(function(l8){return n(ee,l8)}),at&&tr(ee,Ye),De}function tt(ee,Z,re,ge){if(typeof re=="object"&&re!==null&&re.type===G&&re.key===null&&re.props.ref===void 0&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case U:e:{for(var De=re.key;Z!==null;){if(Z.key===De){if(De=re.type,De===G){if(Z.tag===7){l(ee,Z.sibling),ge=h(Z,re.props.children),Lr(ge,re),ge.return=ee,ee=ge;break e}}else if(Z.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===R&&Rl(De)===Z.type){l(ee,Z.sibling),ge=h(Z,re.props),Lr(ge,re),ge.return=ee,ee=ge;break e}l(ee,Z);break}else n(ee,Z);Z=Z.sibling}re.type===G?(ge=Cl(re.props.children,ee.mode,ge,re.key),Lr(ge,re),ge.return=ee,ee=ge):(ge=Wc(re.type,re.key,re.props,null,ee.mode,ge),Lr(ge,re),ge.return=ee,ee=ge)}return N(ee);case O:e:{for(De=re.key;Z!==null;){if(Z.key===De)if(Z.tag===4&&Z.stateNode.containerInfo===re.containerInfo&&Z.stateNode.implementation===re.implementation){l(ee,Z.sibling),ge=h(Z,re.children||[]),ge.return=ee,ee=ge;break e}else{l(ee,Z);break}else n(ee,Z);Z=Z.sibling}ge=Bf(re,ee.mode,ge),ge.return=ee,ee=ge}return N(ee);case R:return re=Rl(re),tt(ee,Z,re,ge)}if(Ce(re))return _e(ee,Z,re,ge);if(we(re)){if(De=we(re),typeof De!="function")throw Error(r(150));return re=De.call(re),Le(ee,Z,re,ge)}if(typeof re.then=="function")return tt(ee,Z,cu(re),ge);if(re.$$typeof===Y)return tt(ee,Z,ru(ee,re),ge);uu(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Z!==null&&Z.tag===6?(l(ee,Z.sibling),ge=h(Z,re),ge.return=ee,ee=ge):(l(ee,Z),ge=Lf(re,ee.mode,ge),ge.return=ee,ee=ge),N(ee)):l(ee,Z)}return function(ee,Z,re,ge){try{Ls=0;var De=tt(ee,Z,re,ge);return Eo=null,De}catch(Ue){if(Ue===No||Ue===ou)throw Ue;var ft=na(29,Ue,null,ee.mode);return ft.lanes=ge,ft.return=ee,ft}finally{}}}var Ol=x1(!0),b1=x1(!1),Br=!1;function Yf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xf(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ir(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Pr(t,n,l){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(yt&2)!==0){var h=s.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),s.pending=n,n=Jc(t),a1(t,null,l),n}return Zc(t,s,n,l),Jc(t)}function Bs(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,l|=s,n.lanes=l,Vi(t,l)}}function Kf(t,n){var l=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=N:g=g.next=N,l=l.next}while(l!==null);g===null?h=g=n:g=g.next=n}else h=g=n;l={baseState:s.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Qf=!1;function Is(){if(Qf){var t=Co;if(t!==null)throw t}}function Ps(t,n,l,s){Qf=!1;var h=t.updateQueue;Br=!1;var g=h.firstBaseUpdate,N=h.lastBaseUpdate,L=h.shared.pending;if(L!==null){h.shared.pending=null;var X=L,te=X.next;X.next=null,N===null?g=te:N.next=te,N=X;var de=t.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==N&&(L===null?de.firstBaseUpdate=te:L.next=te,de.lastBaseUpdate=X))}if(g!==null){var ve=h.baseState;N=0,de=te=X=null,L=g;do{var J=L.lane&-536870913,oe=J!==L.lane;if(oe?(dt&J)===J:(s&J)===J){J!==0&&J===_l&&(Qf=!0),de!==null&&(de=de.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var _e=t,Le=L;J=n;var tt=l;switch(Le.tag){case 1:if(_e=Le.payload,typeof _e=="function"){ve=_e.call(tt,ve,J);break e}ve=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Le.payload,J=typeof _e=="function"?_e.call(tt,ve,J):_e,J==null)break e;ve=P({},ve,J);break e;case 2:Br=!0}}J=L.callback,J!==null&&(t.flags|=64,oe&&(t.flags|=8192),oe=h.callbacks,oe===null?h.callbacks=[J]:oe.push(J))}else oe={lane:J,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(te=de=oe,X=ve):de=de.next=oe,N|=J;if(L=L.next,L===null){if(L=h.shared.pending,L===null)break;oe=L,L=oe.next,oe.next=null,h.lastBaseUpdate=oe,h.shared.pending=null}}while(!0);de===null&&(X=ve),h.baseState=X,h.firstBaseUpdate=te,h.lastBaseUpdate=de,g===null&&(h.shared.lanes=0),Gr|=N,t.lanes=N,t.memoizedState=ve}}function j1(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function w1(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)j1(l[t],n)}var Hr=Fe(null),du=Fe(0);function S1(t,n){t=sr,We(du,t),We(Hr,n),sr=t|n.baseLanes}function Zf(){We(du,sr),We(Hr,Hr.current)}function Jf(){sr=du.current,Je(Hr),Je(du)}var Cn=Fe(null),zn=null;function Ur(t){var n=t.alternate;We(Nn,Nn.current&1),We(Cn,t),zn===null&&(n===null||Hr.current!==null||n.memoizedState!==null)&&(zn=t)}function Wf(t){We(Nn,Nn.current),We(Cn,t),zn===null&&(zn=t)}function k1(t){t.tag===22?(We(Nn,Nn.current),We(Cn,t),zn===null&&(zn=t)):qr()}function qr(){We(Nn,Nn.current),We(Cn,Cn.current)}function Sa(t){Je(Cn),zn===t&&(zn=null),Je(Nn)}var Nn=Fe(0);function Hs(t,n){We(Cn,Cn.current),We(Nn,n)}function eh(t){Je(Nn),Je(Cn),zn===t&&(zn=null)}function fu(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||wm(l)||Sm(l)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!=="independent"){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ir=0,et=null,Nt=null,Jt=null,hu=!1,To=!1,zl=!1,mu=0,Us=0,Ao=null,E6=0;function Ft(){throw Error(r(321))}function th(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!wa(t[l],n[l]))return!1;return!0}function nh(t,n,l,s,h,g){return ir=g,et=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,pe.H=t===null||t.memoizedState===null?ov:sv,zl=!1,g=l(s,h),zl=!1,To&&(g=N1(n,l,s,h)),C1(t),g}function C1(t){pe.H=ju;var n=Nt!==null&&Nt.next!==null;if(ir=0,Jt=Nt=et=null,hu=!1,Us=0,Ao=null,n)throw Error(r(300));t===null||Wt||(t=t.dependencies,t!==null&&iu(t)&&(Wt=!0))}function N1(t,n,l,s){et=t;var h=0;do{if(To&&(Ao=null),Us=0,To=!1,25<=h)throw Error(r(301));if(h+=1,Jt=Nt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}pe.H=z6,g=n(l,s)}while(To);return g}function T6(){var t=pe.H,n=t.useState()[0];return n=typeof n.then=="function"?qs(n):n,t=t.useState()[0],(Nt!==null?Nt.memoizedState:null)!==t&&(et.flags|=1024),n}function ah(){var t=mu!==0;return mu=0,t}function ih(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function rh(t){if(hu){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}hu=!1}ir=0,Jt=Nt=et=null,To=!1,Us=mu=0,Ao=null}function $n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?et.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Gt(){if(Nt===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=Nt.next;var n=Jt===null?et.memoizedState:Jt.next;if(n!==null)Jt=n,Nt=t;else{if(t===null)throw et.alternate===null?Error(r(467)):Error(r(310));Nt=t,t={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},Jt===null?et.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function pu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qs(t){var n=Us;return Us+=1,Ao===null&&(Ao=[]),t=g1(Ao,t,n),n=et,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,pe.H=n===null||n.memoizedState===null?ov:sv),t}function gu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return qs(t);if(t.$$typeof===se)return;if(t.$$typeof===Y)return kn(t)}throw Error(r(438,String(t)))}function lh(t){var n=null,l=et.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var s=et.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=pu(),et.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),s=0;s<t;s++)l[s]=B;return n.index++,l}function rr(t,n){return typeof n=="function"?n(t):n}function vu(t){var n=Gt();return oh(n,Nt,t)}function oh(t,n,l){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=l;var h=t.baseQueue,g=s.pending;if(g!==null){if(h!==null){var N=h.next;h.next=g.next,g.next=N}n.baseQueue=h=g,s.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var L=N=null,X=null,te=n,de=!1;do{var ve=te.lane&-536870913;if(ve!==te.lane?(dt&ve)===ve:(ir&ve)===ve){var J=te.revertLane;if(J===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ve===_l&&(de=!0);else if((ir&J)===J){te=te.next,J===_l&&(de=!0);continue}else ve={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},X===null?(L=X=ve,N=g):X=X.next=ve,et.lanes|=J,Gr|=J;ve=te.action,zl&&l(g,ve),g=te.hasEagerState?te.eagerState:l(g,ve)}else J={lane:ve,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},X===null?(L=X=J,N=g):X=X.next=J,et.lanes|=ve,Gr|=ve;te=te.next}while(te!==null&&te!==n);if(X===null?N=g:X.next=L,!wa(g,t.memoizedState)&&(Wt=!0,de&&(l=Co,l!==null)))throw l;t.memoizedState=g,t.baseState=N,t.baseQueue=X,s.lastRenderedState=g}return h===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function sh(t){var n=Gt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var s=l.dispatch,h=l.pending,g=n.memoizedState;if(h!==null){l.pending=null;var N=h=h.next;do g=t(g,N.action),N=N.next;while(N!==h);wa(g,n.memoizedState)||(Wt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,s]}function E1(t,n,l){var s=et,h=Gt(),g=at;if(g){if(l===void 0)throw Error(r(407));l=l()}else l=n();var N=!wa((Nt||h).memoizedState,l);if(N&&(h.memoizedState=l,Wt=!0),h=h.queue,dh(_1.bind(null,s,h,t),[t]),t=h.getSnapshot!==n||N||Jt!==null&&(Jt.memoizedState.tag&1)!==0,_o(t?9:8,{destroy:void 0},A1.bind(null,s,h,l,n),null),t){if(s.flags|=2048,Tt===null)throw Error(r(349));g||(ir&127)!==0||T1(s,n,l)}return l}function T1(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=et.updateQueue,n===null?(n=pu(),et.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function A1(t,n,l,s){n.value=l,n.getSnapshot=s,M1(n)&&R1(t)}function _1(t,n,l){return l(function(){M1(n)&&R1(t)})}function M1(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!wa(t,l)}catch{return!0}}function R1(t){var n=kl(t,2);n!==null&&la(n,t,2)}function ch(t){var n=$n();if(typeof t=="function"){var l=t;if(t=l(),zl){It(!0);try{l()}finally{It(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rr,lastRenderedState:t},n}function D1(t,n,l,s){return t.baseState=l,oh(t,Nt,typeof s=="function"?s:rr)}function A6(t,n,l,s,h){if(bu(t))throw Error(r(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){g.listeners.push(N)}};pe.T!==null?l(!0):g.isTransition=!1,s(g),l=n.pending,l===null?(g.next=n.pending=g,O1(n,g)):(g.next=l.next,n.pending=l.next=g)}}function O1(t,n){var l=n.action,s=n.payload,h=t.state;if(n.isTransition){var g=pe.T,N={};N.types=g!==null?g.types:null,pe.T=N;try{var L=l(h,s),X=pe.S;X!==null&&X(N,L),z1(t,n,L)}catch(te){uh(t,n,te)}finally{g!==null&&N.types!==null&&(g.types=N.types),pe.T=g}}else try{g=l(h,s),z1(t,n,g)}catch(te){uh(t,n,te)}}function z1(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){L1(t,n,s)},function(s){return uh(t,n,s)}):L1(t,n,l)}function L1(t,n,l){n.status="fulfilled",n.value=l,B1(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,O1(t,l)))}function uh(t,n,l){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=l,B1(n),n=n.next;while(n!==s)}t.action=null}function B1(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function I1(t,n){return n}function P1(t,n){if(at){var l=Tt.formState;if(l!==null){e:{var s=et;if(at){if(Mt){t:{for(var h=Mt,g=Ia;h.nodeType!==8;){if(!g){h=null;break t}if(h=Ha(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){Mt=Ha(h.nextSibling),s=h.data==="F!";break e}}Or(s)}s=!1}s&&(n=l[0])}}return l=$n(),l.memoizedState=l.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:I1,lastRenderedState:n},l.queue=s,l=iv.bind(null,et,s),s.dispatch=l,s=ch(!1),g=gh.bind(null,et,!1,s.queue),s=$n(),h={state:n,dispatch:null,action:t,pending:null},s.queue=h,l=A6.bind(null,et,h,g,l),h.dispatch=l,s.memoizedState=t,[n,l,!1]}function H1(t){var n=Gt();return U1(n,Nt,t)}function U1(t,n,l){if(n=oh(t,n,I1)[0],t=vu(rr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=qs(n)}catch(N){throw N===No?ou:N}else s=n;n=Gt();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(et.flags|=2048,_o(9,{destroy:void 0},_6.bind(null,h,l),null)),[s,g,t]}function _6(t,n){t.action=n}function q1(t){var n=Gt(),l=Nt;if(l!==null)return U1(n,l,t);Gt(),n=n.memoizedState,l=Gt();var s=l.queue.dispatch;return l.memoizedState=t,[n,s,!1]}function _o(t,n,l,s){return t={tag:t,create:l,deps:s,inst:n,next:null},n=et.updateQueue,n===null&&(n=pu(),et.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(s=l.next,l.next=t,t.next=s,n.lastEffect=t),t}function F1(){return Gt().memoizedState}function yu(t,n,l,s){var h=$n();et.flags|=t,h.memoizedState=_o(1|n,{destroy:void 0},l,s===void 0?null:s)}function xu(t,n,l,s){var h=Gt();s=s===void 0?null:s;var g=h.memoizedState.inst;Nt!==null&&s!==null&&th(s,Nt.memoizedState.deps)?h.memoizedState=_o(n,g,l,s):(et.flags|=t,h.memoizedState=_o(1|n,g,l,s))}function V1(t,n){yu(8390656,8,t,n)}function dh(t,n){xu(2048,8,t,n)}function M6(t){et.flags|=4;var n=et.updateQueue;if(n===null)n=pu(),et.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function $1(t){var n=Gt().memoizedState;return M6({ref:n,nextImpl:t}),function(){if((yt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function G1(t,n){return xu(4,2,t,n)}function Y1(t,n){return xu(4,4,t,n)}function X1(t,n){if(typeof n=="function"){t=t();var l=n(t);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function K1(t,n,l){l=l!=null?l.concat([t]):null,xu(4,4,X1.bind(null,n,t),l)}function fh(){}function Q1(t,n){var l=Gt();n=n===void 0?null:n;var s=l.memoizedState;return n!==null&&th(n,s[1])?s[0]:(l.memoizedState=[t,n],t)}function Z1(t,n){var l=Gt();n=n===void 0?null:n;var s=l.memoizedState;if(n!==null&&th(n,s[1]))return s[0];if(s=t(),zl){It(!0);try{t()}finally{It(!1)}}return l.memoizedState=[s,n],s}function hh(t,n,l){return l===void 0||(ir&1073741824)!==0&&(dt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=o2(),et.lanes|=t,Gr|=t,l)}function J1(t,n,l,s){return wa(l,n)?l:Hr.current!==null?(t=hh(t,l,s),wa(t,n)||(Wt=!0),t):(ir&106)===0||(ir&1073741824)!==0&&(dt&261930)===0?(Wt=!0,t.memoizedState=l):(t=o2(),et.lanes|=t,Gr|=t,n)}function W1(t,n,l,s,h){var g=W.p;W.p=g!==0&&8>g?g:8;var N=pe.T,L={};L.types=N!==null?N.types:null,pe.T=L,gh(t,!1,n,l);try{var X=h(),te=pe.S;if(te!==null&&te(L,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=N6(X,s);Fs(t,n,de,Ea(t))}else Fs(t,n,s,Ea(t))}catch(ve){Fs(t,n,{then:function(){},status:"rejected",reason:ve},Ea())}finally{W.p=g,N!==null&&L.types!==null&&(N.types=L.types),pe.T=N}}function R6(){}function mh(t,n,l,s){if(t.tag!==5)throw Error(r(476));var h=ev(t).queue;W1(t,h,n,je,l===null?R6:function(){return tv(t),l(s)})}function ev(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:je,baseState:je,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rr,lastRenderedState:je},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rr,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function tv(t){var n=ev(t);n.next===null&&(n=t.alternate.memoizedState),Fs(t,n.next.queue,{},Ea())}function ph(){return kn(Ko)}function nv(){return Gt().memoizedState}function av(){return Gt().memoizedState}function D6(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=Ea();t=Ir(l);var s=Pr(n,t,l);s!==null&&(la(s,n,l),Bs(s,n,l)),n={cache:Ff()},t.payload=n;return}n=n.return}}function O6(t,n,l){var s=Ea();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},bu(t)?rv(n,l):(l=Of(t,n,l,s),l!==null&&(la(l,t,s),lv(l,n,s)))}function iv(t,n,l){var s=Ea();Fs(t,n,l,s)}function Fs(t,n,l,s){var h={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(bu(t))rv(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var N=n.lastRenderedState,L=g(N,l);if(h.hasEagerState=!0,h.eagerState=L,wa(L,N))return Zc(t,n,h,0),Tt===null&&Qc(),!1}catch{}finally{}if(l=Of(t,n,h,s),l!==null)return la(l,t,s),lv(l,n,s),!0}return!1}function gh(t,n,l,s){if(s={lane:2,revertLane:lm(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},bu(t)){if(n)throw Error(r(479))}else n=Of(t,l,s,2),n!==null&&la(n,t,2)}function bu(t){var n=t.alternate;return t===et||n!==null&&n===et}function rv(t,n){To=hu=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function lv(t,n,l){if((l&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,l|=s,n.lanes=l,Vi(t,l)}}var ju={readContext:kn,use:gu,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft,useEffectEvent:Ft},ov={readContext:kn,use:gu,useCallback:function(t,n){return $n().memoizedState=[t,n===void 0?null:n],t},useContext:kn,useEffect:V1,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,yu(4194308,4,X1.bind(null,n,t),l)},useLayoutEffect:function(t,n){return yu(4194308,4,t,n)},useInsertionEffect:function(t,n){yu(4,2,t,n)},useMemo:function(t,n){var l=$n();n=n===void 0?null:n;var s=t();if(zl){It(!0);try{t()}finally{It(!1)}}return l.memoizedState=[s,n],s},useReducer:function(t,n,l){var s=$n();if(l!==void 0){var h=l(n);if(zl){It(!0);try{l(n)}finally{It(!1)}}}else h=n;return s.memoizedState=s.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},s.queue=t,t=t.dispatch=O6.bind(null,et,t),[s.memoizedState,t]},useRef:function(t){var n=$n();return t={current:t},n.memoizedState=t},useState:function(t){t=ch(t);var n=t.queue,l=iv.bind(null,et,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:fh,useDeferredValue:function(t,n){var l=$n();return hh(l,t,n)},useTransition:function(){var t=ch(!1);return t=W1.bind(null,et,t.queue,!0,!1),$n().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var s=et,h=$n();if(at){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Tt===null)throw Error(r(349));(dt&127)!==0||T1(s,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,V1(_1.bind(null,s,g,t),[t]),s.flags|=2048,_o(9,{destroy:void 0},A1.bind(null,s,g,l,n),null),l},useId:function(){var t=$n(),n=Tt.identifierPrefix;if(at){var l=yi,s=vi;l=(s&~(1<<32-$t(s)-1)).toString(32)+l,n="_"+n+"R_"+l,l=mu++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=E6++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:ph,useFormState:P1,useActionState:P1,useOptimistic:function(t){var n=$n();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=gh.bind(null,et,!0,l),l.dispatch=n,[t,n]},useMemoCache:lh,useCacheRefresh:function(){return $n().memoizedState=D6.bind(null,et)},useEffectEvent:function(t){var n=$n(),l={impl:t};return n.memoizedState=l,function(){if((yt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},sv={readContext:kn,use:gu,useCallback:Q1,useContext:kn,useEffect:dh,useImperativeHandle:K1,useInsertionEffect:G1,useLayoutEffect:Y1,useMemo:Z1,useReducer:vu,useRef:F1,useState:function(){return vu(rr)},useDebugValue:fh,useDeferredValue:function(t,n){var l=Gt();return J1(l,Nt.memoizedState,t,n)},useTransition:function(){var t=vu(rr)[0],n=Gt().memoizedState;return[typeof t=="boolean"?t:qs(t),n]},useSyncExternalStore:E1,useId:nv,useHostTransitionStatus:ph,useFormState:H1,useActionState:H1,useOptimistic:function(t,n){var l=Gt();return D1(l,Nt,t,n)},useMemoCache:lh,useCacheRefresh:av,useEffectEvent:$1},z6={readContext:kn,use:gu,useCallback:Q1,useContext:kn,useEffect:dh,useImperativeHandle:K1,useInsertionEffect:G1,useLayoutEffect:Y1,useMemo:Z1,useReducer:sh,useRef:F1,useState:function(){return sh(rr)},useDebugValue:fh,useDeferredValue:function(t,n){var l=Gt();return Nt===null?hh(l,t,n):J1(l,Nt.memoizedState,t,n)},useTransition:function(){var t=sh(rr)[0],n=Gt().memoizedState;return[typeof t=="boolean"?t:qs(t),n]},useSyncExternalStore:E1,useId:nv,useHostTransitionStatus:ph,useFormState:q1,useActionState:q1,useOptimistic:function(t,n){var l=Gt();return Nt!==null?D1(l,Nt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:lh,useCacheRefresh:av,useEffectEvent:$1};function vh(t,n,l,s){n=t.memoizedState,l=l(s,n),l=l==null?n:P({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var yh={enqueueSetState:function(t,n,l){t=t._reactInternals;var s=Ea(),h=Ir(s);h.payload=n,l!=null&&(h.callback=l),n=Pr(t,h,s),n!==null&&(la(n,t,s),Bs(n,t,s))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var s=Ea(),h=Ir(s);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Pr(t,h,s),n!==null&&(la(n,t,s),Bs(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=Ea(),s=Ir(l);s.tag=2,n!=null&&(s.callback=n),n=Pr(t,s,l),n!==null&&(la(n,t,l),Bs(n,t,l))}};function cv(t,n,l,s,h,g,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,g,N):n.prototype&&n.prototype.isPureReactComponent?!As(l,s)||!As(h,g):!0}function uv(t,n,l,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,s),n.state!==t&&yh.enqueueReplaceState(n,n.state,null)}function Ll(t,n){var l=n;if("ref"in n){l={};for(var s in n)s!=="ref"&&(l[s]=n[s])}if(t=t.defaultProps){l===n&&(l=P({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function dv(t){Kc(t)}function fv(t){console.error(t)}function hv(t){Kc(t)}function wu(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function mv(t,n,l){try{var s=t.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function xh(t,n,l){return l=Ir(l),l.tag=3,l.payload={element:null},l.callback=function(){wu(t,n)},l}function pv(t){return t=Ir(t),t.tag=3,t}function gv(t,n,l,s){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;t.payload=function(){return h(g)},t.callback=function(){mv(n,l,s)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){mv(n,l,s),typeof h!="function"&&(Yr===null?Yr=new Set([this]):Yr.add(this));var L=s.stack;this.componentDidCatch(s.value,{componentStack:L!==null?L:""})})}function L6(t,n,l,s,h){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=l.alternate,n!==null&&Tl(n,l,h,!0),l=Cn.current,l!==null){switch(l.tag){case 31:case 13:case 19:return zn===null?Fu():l.alternate===null&&Vt===0&&(Vt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,s===su?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([s]):n.add(s),am(t,s,h)),!1;case 22:return l.flags|=65536,s===su?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([s]):l.add(s)),am(t,s,h)),!1}throw Error(r(435,l.tag))}return am(t,s,h),Fu(),!1}if(at)return n=Cn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,s!==Pf&&(t=Error(r(422),{cause:s}),Rs(za(t,l)))):(s!==Pf&&(n=Error(r(423),{cause:s}),Rs(za(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,s=za(s,l),h=xh(t.stateNode,s,h),Kf(t,h),Vt!==4&&(Vt=2)),!1;var g=Error(r(520),{cause:s});if(g=za(g,l),Zs===null?Zs=[g]:Zs.push(g),Vt!==4&&(Vt=2),n===null)return!0;s=za(s,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=xh(l.stateNode,s,t),Kf(l,t),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Yr===null||!Yr.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=pv(h),gv(h,t,l,s),Kf(l,h),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var bh=Error(r(461)),Wt=!1;function un(t,n,l,s){n.child=t===null?b1(n,null,l,s):Ol(n,t.child,l,s)}function vv(t,n,l,s,h){l=l.render;var g=n.ref;if("ref"in s){var N={};for(var L in s)L!=="ref"&&(N[L]=s[L])}else N=s;return Al(n),s=nh(t,n,l,N,g,h),L=ah(),t!==null&&!Wt?(ih(t,n,h),lr(t,n,h)):(at&&L&&tu(n),n.flags|=1,un(t,n,s,h),n.child)}function yv(t,n,l,s,h){if(t===null){var g=l.type;return typeof g=="function"&&!zf(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,xv(t,n,g,s,h)):(t=Wc(l.type,null,s,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Th(t,h)){var N=g.memoizedProps;if(l=l.compare,l=l!==null?l:As,l(N,s)&&t.ref===n.ref)return lr(t,n,h)}return n.flags|=1,t=er(g,s),t.ref=n.ref,t.return=n,n.child=t}function xv(t,n,l,s,h){if(t!==null){var g=t.memoizedProps;if(As(g,s)&&t.ref===n.ref)if(Wt=!1,n.pendingProps=s=g,Th(t,h))(t.flags&131072)!==0&&(Wt=!0);else return n.lanes=t.lanes,lr(t,n,h)}return jh(t,n,l,s,h)}function bv(t,n,l,s){var h=s.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,t!==null){for(s=n.child=t.child,h=0;s!==null;)h=h|s.lanes|s.childLanes,s=s.sibling;s=h&~g}else s=0,n.child=null;return jv(t,n,g,l,s)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&lu(n,g!==null?g.cachePool:null),g!==null?S1(n,g):Zf(),k1(n);else return s=n.lanes=536870912,jv(t,n,g!==null?g.baseLanes|l:l,l,s)}else g!==null?(lu(n,g.cachePool),S1(n,g),qr(),n.memoizedState=null):(t!==null&&lu(n,null),Zf(),qr());return un(t,n,h,l),n.child}function Vs(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function jv(t,n,l,s,h){var g=$f();return g=g===null?null:{parent:Zt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&lu(n,null),Zf(),k1(n),t!==null&&Tl(t,n,s,!0),n.childLanes=h,null}function Su(t,n){return n=ku({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function wv(t,n,l){return Ol(n,t.child,null,l),t=Su(n,n.pendingProps),t.flags|=2,Sa(n),n.memoizedState=null,t}function B6(t,n,l){var s=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(at){if(s.mode==="hidden")return t=Su(n,s),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Vs(null,t);if(Wf(n),(t=Mt)?(t=X2(t,Ia),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Rr!==null?{id:vi,overflow:yi}:null,retryLane:536870912,hydrationErrors:null},l=r1(t),l.return=n,n.child=l,mn=n,Mt=null)):t=null,t===null)throw Or(n);return n.lanes=536870912,null}return Su(n,s)}var g=t.memoizedState;if(g!==null){var N=g.dehydrated;if(Wf(n),h)if(n.flags&256)n.flags&=-257,n=wv(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(Wt||Tl(t,n,l,!1),h=(l&t.childLanes)!==0,Wt||h){if(Hr.current===null){if(s=Tt,s!==null&&(N=Xt(s,l),N!==0&&N!==g.retryLane))throw g.retryLane=N,kl(t,N),la(s,t,N),bh;Fu()}n=wv(t,n,l)}else t=g.treeContext,Mt=Ha(N.nextSibling),mn=n,at=!0,Dr=null,Ia=!1,t!==null&&s1(n,t),n=Su(n,s),n.flags|=134221824;return n}return t=er(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Mo(t,n){var l=n.ref;if(l===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function jh(t,n,l,s,h){return Al(n),l=nh(t,n,l,s,void 0,h),s=ah(),t!==null&&!Wt?(ih(t,n,h),lr(t,n,h)):(at&&s&&tu(n),n.flags|=1,un(t,n,l,h),n.child)}function Sv(t,n,l,s,h,g){return Al(n),n.updateQueue=null,l=N1(n,s,l,h),C1(t),s=ah(),t!==null&&!Wt?(ih(t,n,g),lr(t,n,g)):(at&&s&&tu(n),n.flags|=1,un(t,n,l,g),n.child)}function kv(t,n,l,s,h){if(Al(n),n.stateNode===null){var g=jo,N=l.contextType;typeof N=="object"&&N!==null&&(g=kn(N)),g=new l(s,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=yh,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=s,g.state=n.memoizedState,g.refs={},Yf(n),N=l.contextType,g.context=typeof N=="object"&&N!==null?kn(N):jo,g.state=n.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(vh(n,l,N,s),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(N=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),N!==g.state&&yh.enqueueReplaceState(g,g.state,null),Ps(n,s,g,h),Is(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){g=n.stateNode;var L=n.memoizedProps,X=Ll(l,L);g.props=X;var te=g.context,de=l.contextType;N=jo,typeof de=="object"&&de!==null&&(N=kn(de));var ve=l.getDerivedStateFromProps;de=typeof ve=="function"||typeof g.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,de||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(L||te!==N)&&uv(n,g,s,N),Br=!1;var J=n.memoizedState;g.state=J,Ps(n,s,g,h),Is(),te=n.memoizedState,L||J!==te||Br?(typeof ve=="function"&&(vh(n,l,ve,s),te=n.memoizedState),(X=Br||cv(n,l,X,s,J,te,N))?(de||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=te),g.props=s,g.state=te,g.context=N,s=X):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{g=n.stateNode,Xf(t,n),N=n.memoizedProps,de=Ll(l,N),g.props=de,ve=n.pendingProps,J=g.context,te=l.contextType,X=jo,typeof te=="object"&&te!==null&&(X=kn(te)),L=l.getDerivedStateFromProps,(te=typeof L=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(N!==ve||J!==X)&&uv(n,g,s,X),Br=!1,J=n.memoizedState,g.state=J,Ps(n,s,g,h),Is();var oe=n.memoizedState;N!==ve||J!==oe||Br||t!==null&&t.dependencies!==null&&iu(t.dependencies)?(typeof L=="function"&&(vh(n,l,L,s),oe=n.memoizedState),(de=Br||cv(n,l,de,s,J,oe,X)||t!==null&&t.dependencies!==null&&iu(t.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,oe,X),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,oe,X)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=oe),g.props=s,g.state=oe,g.context=X,s=de):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),s=!1)}return g=s,Mo(t,n),s=(n.flags&128)!==0,g||s?(g=n.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&s?(n.child=Ol(n,t.child,null,h),n.child=Ol(n,null,l,h)):un(t,n,l,h),n.memoizedState=g.state,t=n.child):t=lr(t,n,h),t}function Cv(t,n,l,s){return Nl(),n.flags|=256,un(t,n,l,s),n.child}var wh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sh(t){return{baseLanes:t,cachePool:m1()}}function kh(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Na),t}function Nv(t,n,l){var s=n.pendingProps,h=!1,g=(n.flags&128)!==0,N;if((N=g)||(N=t!==null&&t.memoizedState===null?!1:(Nn.current&2)!==0),N&&(h=!0,n.flags&=-129),N=(n.flags&32)!==0,n.flags&=-33,t===null){if(at){if(h?Ur(n):qr(),(t=Mt)?(t=X2(t,Ia),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Rr!==null?{id:vi,overflow:yi}:null,retryLane:536870912,hydrationErrors:null},l=r1(t),l.return=n,n.child=l,mn=n,Mt=null)):t=null,t===null)throw Or(n);return Sm(t)?n.lanes=32:n.lanes=536870912,null}return g=s.children,s=s.fallback,h?(qr(),h=n.mode,g=ku({mode:"hidden",children:g},h),s=Cl(s,h,l,null),g.return=n,s.return=n,g.sibling=s,n.child=g,s=n.child,s.memoizedState=Sh(l),s.childLanes=kh(t,N,l),n.memoizedState=wh,Vs(null,s)):(Ur(n),Ch(n,g))}var L=t.memoizedState;if(L!==null){var X=L.dehydrated;if(X!==null)return I6(t,n,g,N,s,X,L,l)}return h?(qr(),h=s.fallback,g=n.mode,L=t.child,X=L.sibling,s=er(L,{mode:"hidden",children:s.children}),s.subtreeFlags=L.subtreeFlags&1206910976,X!==null?h=er(X,h):(h=Cl(h,g,l,null),h.flags|=2),h.return=n,s.return=n,s.sibling=h,n.child=s,Vs(null,s),s=n.child,h=t.child.memoizedState,h===null?h=Sh(l):(g=h.cachePool,g!==null?(L=Zt._currentValue,g=g.parent!==L?{parent:L,pool:L}:g):g=m1(),h={baseLanes:h.baseLanes|l,cachePool:g}),s.memoizedState=h,s.childLanes=kh(t,N,l),n.memoizedState=wh,Vs(t.child,s)):(Ur(n),l=t.child,t=l.sibling,l=er(l,{mode:"visible",children:s.children}),l.return=n,l.sibling=null,t!==null&&(N=n.deletions,N===null?(n.deletions=[t],n.flags|=16):N.push(t)),n.child=l,n.memoizedState=null,l)}function Ch(t,n){return n=ku({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function ku(t,n){return t=na(22,t,null,n),t.lanes=0,t}function Cu(t,n,l){return Ol(n,t.child,null,l),t=Ch(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function I6(t,n,l,s,h,g,N,L){if(l)return n.flags&256?(Ur(n),n.flags&=-257,Cu(t,n,L)):n.memoizedState!==null?(qr(),n.child=t.child,n.flags|=128,null):(qr(),g=h.fallback,N=n.mode,h=ku({mode:"visible",children:h.children},N),g=Cl(g,N,L,null),g.flags|=2,h.return=n,g.return=n,h.sibling=g,n.child=h,Ol(n,t.child,null,L),h=n.child,h.memoizedState=Sh(L),h.childLanes=kh(t,s,L),n.memoizedState=wh,Vs(null,h));if(Ur(n),Sm(g)){if(s=g.nextSibling&&g.nextSibling.dataset,s)var X=s.dgst;return s=X,s!==""&&(h=Error(r(419)),h.stack="",h.digest=s,Rs({value:h,source:null,stack:null})),Cu(t,n,L)}if(Wt||Tl(t,n,L,!1),s=(L&t.childLanes)!==0,Wt||s){if(Hr.current!==null)return Cu(t,n,L);if(s=Tt,s!==null&&(h=Xt(s,L),h!==0&&h!==N.retryLane))throw N.retryLane=h,kl(t,h),la(s,t,h),bh;return wm(g)||Fu(),Cu(t,n,L)}return wm(g)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,Mt=Ha(g.nextSibling),mn=n,at=!0,Dr=null,Ia=!1,t!==null&&s1(n,t),n=Ch(n,h.children),n.flags|=134221824,n)}function Ev(t,n,l){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),au(t.return,n,l)}function Tv(t){for(var n=null;t!==null;){var l=t.alternate;l!==null&&fu(l)===null&&(n=t),t=t.sibling}return n}function Nu(t,n,l,s,h,g){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:h,treeForkCount:g}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=s,N.tail=l,N.tailMode=h,N.treeForkCount=g)}function Nh(t){var n=t.child;for(t.child=null;n!==null;){var l=n.sibling;n.sibling=t.child,t.child=n,n=l}}function Eh(t,n,l){var s=n.pendingProps,h=s.revealOrder,g=s.tail;s=s.children;var N=Nn.current;if(n.flags&128)return Hs(n,N),null;var L=(N&2)!==0;if(L?(N=N&1|2,n.flags|=128):N&=1,Hs(n,N),h==="backwards"&&t!==null?(Nh(t),un(t,n,s,l),Nh(t)):un(t,n,s,l),s=at?Ms:0,!L&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ev(t,l,n);else if(t.tag===19)Ev(t,l,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"backwards":l=Tv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null,Nh(n)),Nu(n,!0,h,null,g,s);break;case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&fu(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Nu(n,!0,l,null,g,s);break;case"together":Nu(n,!1,null,null,void 0,s);break;case"independent":n.memoizedState=null;break;default:l=Tv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Nu(n,!1,h,l,g,s)}return n.child}function Av(t,n,l){var s=n.pendingProps;return zr(n,n.type,s.value),un(t,n,s.children,l),n.child}function lr(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Gr|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(Tl(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,l=er(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=er(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function Th(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&iu(t)))}function P6(t,n,l){switch(n.tag){case 3:fa(n,n.stateNode.containerInfo),zr(n,Zt,t.memoizedState.cache),Nl();break;case 27:case 5:Ga(n);break;case 4:fa(n,n.stateNode.containerInfo);break;case 10:zr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Wf(n),null;break;case 13:var s=n.memoizedState;if(s!==null){if(s.dehydrated!==null)return Ur(n),n.flags|=128,null;s=Tl(t,n,l,!1);var h=n.child.childLanes;return s||(l&h)!==0?Nv(t,n,l):(Ur(n),t=lr(t,n,l),t!==null?t.sibling:null)}Ur(n);break;case 19:if(n.flags&128)return Eh(t,n,l);if(h=(t.flags&128)!==0,s=(l&n.childLanes)!==0,s||(Tl(t,n,l,!1),s=(l&n.childLanes)!==0),h){if(s)return Eh(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Hs(n,Nn.current),s)break;return null;case 22:return n.lanes=0,bv(t,n,l,n.pendingProps);case 24:zr(n,Zt,t.memoizedState.cache)}return lr(t,n,l)}function _v(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)Wt=!0;else{if(!Th(t,l)&&(n.flags&128)===0)return Wt=!1,P6(t,n,l);Wt=(t.flags&131072)!==0}else Wt=!1,at&&(n.flags&1048576)!==0&&o1(n,Ms,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=Rl(n.elementType),n.type=t,typeof t=="function")zf(t)?(s=Ll(t,s),n.tag=1,n=kv(null,n,t,s,l)):(n.tag=0,n=jh(null,n,t,s,l));else{if(t!=null){var h=t.$$typeof;if(h===K){n.tag=11,n=vv(null,n,t,s,l);break e}else if(h===ne){n.tag=14,n=yv(null,n,t,s,l);break e}else if(h===Y){n.tag=10,n.type=t,n=Av(null,n,l);break e}}throw n=xe(t)||t,Error(r(306,n,""))}}return n;case 0:return jh(t,n,n.type,n.pendingProps,l);case 1:return s=n.type,h=Ll(s,n.pendingProps),kv(t,n,s,h,l);case 3:e:{if(fa(n,n.stateNode.containerInfo),t===null)throw Error(r(387));s=n.pendingProps;var g=n.memoizedState;h=g.element,Xf(t,n),Ps(n,s,null,l);var N=n.memoizedState;if(s=N.cache,zr(n,Zt,s),s!==g.cache&&qf(n,[Zt],l,!0),Is(),s=N.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Cv(t,n,s,l);break e}else if(s!==h){h=za(Error(r(424)),n),Rs(h),n=Cv(t,n,s,l);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Mt=Ha(t.firstChild),mn=n,at=!0,Dr=null,Ia=!0,l=b1(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Nl(),s===h){n=lr(t,n,l);break e}un(t,n,s,l)}n=n.child}return n;case 26:return Mo(t,n),t===null?(l=ty(n.type,null,n.pendingProps,null))?n.memoizedState=l:at||(n.stateNode=O2(n.type,n.pendingProps,xn.current,n)):n.memoizedState=ty(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ga(n),t===null&&at&&(s=n.stateNode=Z2(n.type,n.pendingProps,xn.current),mn=n,Ia=!0,h=Mt,Qr(n.type)?(km=h,Mt=Ha(s.firstChild)):Mt=h),un(t,n,n.pendingProps.children,l),Mo(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&at&&((h=s=Mt)&&(s=Dk(s,n.type,n.pendingProps,Ia),s!==null?(n.stateNode=s,mn=n,Mt=Ha(s.firstChild),Ia=!1,h=!0):h=!1),h||Or(n)),Ga(n),h=n.type,g=n.pendingProps,N=t!==null?t.memoizedProps:null,s=g.children,pm(h,g)?s=null:N!==null&&pm(h,N)&&(n.flags|=32),n.memoizedState!==null&&(h=nh(t,n,T6,null,null,l),Ko._currentValue=h),Mo(t,n),un(t,n,s,l),n.child;case 6:return t===null&&at&&((t=l=Mt)&&(l=Ok(l,n.pendingProps,Ia),l!==null?(n.stateNode=l,mn=n,Mt=null,t=!0):t=!1),t||Or(n)),null;case 13:return Nv(t,n,l);case 4:return fa(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Ol(n,null,s,l):un(t,n,s,l),n.child;case 11:return vv(t,n,n.type,n.pendingProps,l);case 7:return s=n.pendingProps,Mo(t,n),un(t,n,s,l),n.child;case 8:return un(t,n,n.pendingProps.children,l),n.child;case 12:return un(t,n,n.pendingProps.children,l),n.child;case 10:return Av(t,n,l);case 9:return h=n.type._context,s=n.pendingProps.children,Al(n),h=kn(h),s=s(h),n.flags|=1,un(t,n,s,l),n.child;case 14:return yv(t,n,n.type,n.pendingProps,l);case 15:return xv(t,n,n.type,n.pendingProps,l);case 19:return Eh(t,n,l);case 31:return B6(t,n,l);case 22:return bv(t,n,l,n.pendingProps);case 24:return Al(n),s=kn(Zt),t===null?(h=$f(),h===null&&(h=Tt,g=Ff(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:s,cache:h},Yf(n),zr(n,Zt,h)):((t.lanes&l)!==0&&(Xf(t,n),Ps(n,null,null,l),Is()),h=t.memoizedState,g=n.memoizedState,h.parent!==s?(h={parent:s,cache:s},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),zr(n,Zt,s)):(s=g.cache,zr(n,Zt,s),s!==h.cache&&qf(n,[Zt],l,!0))),un(t,n,n.pendingProps.children,l),n.child;case 30:return n.stateNode===null&&(n.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=n.pendingProps,s.name!=null&&s.name!=="auto"?n.flags|=t===null?18882560:18874368:at&&tu(n),t!==null&&t.memoizedProps.name!==s.name?n.flags|=4194816:Mo(t,n),un(t,n,s.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function or(t){t.flags|=4}function Ah(t,n,l,s,h){var g;if((g=(t.mode&32)!==0)&&(g=l===null?ry(n,s):ry(n,s)&&(s.src!==l.src||s.srcSet!==l.srcSet)),g){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(d2())t.flags|=8192;else throw Dl=su,Gf}else t.flags&=-16777217}function Mv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ly(n))if(d2())t.flags|=8192;else throw Dl=su,Gf}function Eu(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?va():536870912,t.lanes|=n,Lo|=n)}function $s(t,n){if(!at)switch(t.tailMode){case"visible":break;case"collapsed":for(var l=t.tail,s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null;break;default:for(n=t.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t.tail=null:l.sibling=null}}function Rt(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,s=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,s|=h.subtreeFlags&1206910976,s|=h.flags&1206910976,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,s|=h.subtreeFlags,s|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=s,t.childLanes=l,n}function H6(t,n,l){var s=n.pendingProps;switch(If(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(n),null;case 1:return Rt(n),null;case 3:return l=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ar(Zt),ln(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ko(n)?or(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Hf())),Rt(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(or(n),g!==null?(Rt(n),Mv(n,g)):(Rt(n),Ah(n,h,null,s,l))):g?g!==t.memoizedState?(or(n),Rt(n),Mv(n,g)):(Rt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&or(n),Rt(n),Ah(n,h,t,s,l)),null;case 27:if(fe(n),l=xn.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&or(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return Rt(n),n.subtreeFlags&=-33554433,null}t=Ct.current,ko(n)?c1(n):(t=Z2(h,s,l),n.stateNode=t,or(n))}return Rt(n),n.subtreeFlags&=-33554433,null;case 5:if(fe(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&or(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return Rt(n),n.subtreeFlags&=-33554433,null}if(g=Ct.current,ko(n))c1(n);else{var N=nc(xn.current);switch(g){case 1:g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=N.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?N.createElement("select",{is:s.is}):N.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?N.createElement(h,{is:s.is}):N.createElement(h)}}g[Dt]=n,g[sn]=s;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)g.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===n)break e;for(;N.sibling===null;){if(N.return===null||N.return===n)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}n.stateNode=g;e:switch(Tn(g,h,s),h){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&or(n)}}return Rt(n),n.subtreeFlags&=-33554433,Ah(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&or(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(t=xn.current,ko(n)){if(t=n.stateNode,l=n.memoizedProps,s=null,h=mn,h!==null)switch(h.tag){case 27:case 5:s=h.memoizedProps}t[Dt]=n,t=!!(t.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||_2(t.nodeValue,l)),t||Or(n,!0)}else t=nc(t).createTextNode(s),t[Dt]=n,n.stateNode=t}return Rt(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(s=ko(n),l!==null){if(t===null){if(!s)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Dt]=n}else Nl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Rt(n),t=!1}else l=Hf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(Sa(n),n):(Sa(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Rt(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=ko(n),s!==null&&s.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[Dt]=n}else Nl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Rt(n),h=!1}else h=Hf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Sa(n),n):(Sa(n),null)}return Sa(n),(n.flags&128)!==0?(n.lanes=l,n):(l=s!==null,t=t!==null&&t.memoizedState!==null,l&&(s=n.child,h=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(h=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==h&&(s.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Eu(n,n.updateQueue),Rt(n),null);case 4:return ln(),t===null&&um(n.stateNode.containerInfo),n.flags|=67108864,Rt(n),null;case 10:return ar(n.type),Rt(n),null;case 19:if(eh(n),s=n.memoizedState,s===null)return Rt(n),null;if(h=(n.flags&128)!==0,g=s.rendering,g===null)if(h)$s(s,!1);else{if(Vt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=fu(t),g!==null){for(n.flags|=128,$s(s,!1),t=g.updateQueue,n.updateQueue=t,Eu(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)i1(l,t),l=l.sibling;return Hs(n,Nn.current&1|2),at&&tr(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Yt()>Pu&&(n.flags|=128,h=!0,$s(s,!1),n.lanes=4194304)}else{if(!h)if(t=fu(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Eu(n,t),$s(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!g.alternate&&!at)return Rt(n),null}else 2*Yt()-s.renderingStartTime>Pu&&l!==536870912&&(n.flags|=128,h=!0,$s(s,!1),n.lanes=4194304);s.isBackwards?(g.sibling=n.child,n.child=g):(t=s.last,t!==null?t.sibling=g:n.child=g,s.last=g)}if(s.tail!==null){t=s.tail;e:{for(l=t;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Yt(),t.sibling=null,g=Nn.current,g=h?g&1|2:g&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!l||at?Hs(n,g):(l=g,We(Cn,n),We(Nn,l),zn===null&&(zn=n)),at&&tr(n,s.treeForkCount),t}return Rt(n),null;case 22:case 23:return Sa(n),Jf(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(l&536870912)!==0&&(n.flags&128)===0&&(Rt(n),n.subtreeFlags&6&&(n.flags|=8192)):Rt(n),l=n.updateQueue,l!==null&&Eu(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048),t!==null&&Je(Ml),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ar(Zt),Rt(n),null;case 25:return null;case 30:return n.flags|=33554432,Rt(n),null}throw Error(r(156,n.tag))}function U6(t,n){switch(If(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ar(Zt),ln(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return fe(n),null;case 31:if(n.memoizedState!==null){if(Sa(n),n.alternate===null)throw Error(r(340));Nl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Sa(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Nl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return eh(n),t=n.flags,t&65536?(n.flags=t&-65537|128,t=n.memoizedState,t!==null&&(t.rendering=null,t.tail=null),n.flags|=4,n):null;case 4:return ln(),null;case 10:return ar(n.type),null;case 22:case 23:return Sa(n),Jf(),t!==null&&Je(Ml),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ar(Zt),null;case 25:return null;default:return null}}function Rv(t,n){switch(If(n),n.tag){case 3:ar(Zt),ln();break;case 26:case 27:case 5:fe(n);break;case 4:ln();break;case 31:n.memoizedState!==null&&Sa(n);break;case 13:Sa(n);break;case 19:eh(n);break;case 10:ar(n.type);break;case 22:case 23:Sa(n),Jf(),t!==null&&Je(Ml);break;case 24:ar(Zt)}}function Gs(t,n){try{var l=n.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var h=s.next;l=h;do{if((l.tag&t)===t){s=void 0;var g=l.create,N=l.inst;s=g(),N.destroy=s}l=l.next}while(l!==h)}}catch(L){wt(n,n.return,L)}}function Fr(t,n,l){try{var s=n.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var g=h.next;s=g;do{if((s.tag&t)===t){var N=s.inst,L=N.destroy;if(L!==void 0){N.destroy=void 0,h=n;var X=l,te=L;try{te()}catch(de){wt(h,X,de)}}}s=s.next}while(s!==g)}}catch(de){wt(n,n.return,de)}}function Dv(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{w1(n,l)}catch(s){wt(t,t.return,s)}}}function Ov(t,n,l){l.props=Ll(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(s){wt(t,n,s)}}function xi(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:var h=t.stateNode,g=Ji(t.memoizedProps,h);(h.ref===null||h.ref.name!==g)&&(h.ref=U2(g)),s=h.ref;break;case 7:if(t.stateNode===null){var N=new Ta(t);p(t.child,!1,Mk,N,void 0,void 0),t.stateNode=N}s=t.stateNode;break;default:s=t.stateNode}typeof l=="function"?t.refCleanup=l(s):l.current=s}}catch(L){wt(t,n,L)}}function En(t,n){var l=t.ref,s=t.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(h){wt(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){wt(t,n,h)}else l.current=null}function Tu(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var l=0;l<n.length;l++)Y2(t.stateNode,n[l])}function zv(t){for(var n=t.return;n!==null&&(Mh(n)&&Y2(t.stateNode,n.stateNode),!_h(n));)n=n.return}function Ys(t){for(var n=t.return;n!==null&&(Mh(n)&&Rk(t.stateNode,n.stateNode),!_h(n));)n=n.return}function _h(t){return t.tag===5||t.tag===3||t.tag===27}function Mh(t){return t&&t.tag===7&&t.stateNode!==null}function Rh(t){var n=t.type,l=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(h){wt(t,t.return,h)}}function Dh(t,n,l){try{var s=t.stateNode;hk(s,t.type,l,n),s[sn]=n}catch(h){wt(t,t.return,h)}}function Lv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Qr(t.type)||t.tag===4}function Oh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Lv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Qr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function zh(t,n,l,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(h,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(h),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Fn)),Tu(t,s),Ve=!0;else if(h!==4&&(h===27&&(Tu(t,s),s=null,Qr(t.type)&&(l=t.stateNode,n=null)),t=t.child,t!==null))for(zh(t,n,l,s),t=t.sibling;t!==null;)zh(t,n,l,s),t=t.sibling}function Au(t,n,l,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?l.insertBefore(h,n):l.appendChild(h),Tu(t,s),Ve=!0;else if(h!==4&&(h===27&&(Tu(t,s),s=null,Qr(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Au(t,n,l,s),t=t.sibling;t!==null;)Au(t,n,l,s),t=t.sibling}function Bv(t){var n=t.stateNode,l=t.memoizedProps;try{for(var s=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Tn(n,s,l),n[Dt]=t,n[sn]=l}catch(g){wt(t,t.return,g)}}var _u=!1,ka=null;function Iv(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(_u=!0)}var bi=null;function Pv(){var t=bi;return bi=null,t}var aa=0;function Ro(t,n,l,s,h){return aa=0,Hv(t.child,n,l,s,h)}function Hv(t,n,l,s,h){for(var g=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(s!==null){var L=ym(N);s.push(L),L.view&&(g=!0)}else g||ym(N).view&&(g=!0);_u=!0,P2(N,aa===0?n:n+"_"+aa,l),aa++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h||Hv(t.child,n,l,s,h)&&(g=!0));t=t.sibling}return g}function ji(t,n){for(;t!==null;)t.tag===5?H2(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||ji(t.child,n)),t=t.sibling}function Mu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Mu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var n=t.memoizedProps;if(n.name==null||n.name==="auto")throw Error(r(544));var l=n.name;n=Wi(n.default,n.share),n!=="none"&&(Ro(t,l,n,null,!1)||ji(t.child,!1))}t=t.sibling}}function Lh(t,n){if(t.tag===30){var l=t.stateNode,s=t.memoizedProps,h=Ji(s,l),g=Wi(s.default,l.paired?s.share:s.enter);g!=="none"?Ro(t,h,g,null,!1)?(Mu(t),l.paired||n||Ho(t,s.onEnter)):ji(t.child,!1):Mu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Lh(t,n),t=t.sibling;else Mu(t)}function Bh(t){if(ka!==null&&ka.size!==0){var n=ka;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var l=t.memoizedProps,s=l.name;if(s!=null&&s!=="auto"){var h=n.get(s);if(h!==void 0){var g=Wi(l.default,l.share);if(g!=="none"&&(Ro(t,s,g,null,!1)?(g=t.stateNode,h.paired=g,g.paired=h,Ho(t,l.onShare)):ji(t.child,!1)),n.delete(s),n.size===0)break}}}Bh(t)}t=t.sibling}}}function Ih(t){if(t.tag===30){var n=t.memoizedProps,l=Ji(n,t.stateNode),s=ka!==null?ka.get(l):void 0,h=Wi(n.default,s!==void 0?n.share:n.exit);h!=="none"&&(Ro(t,l,h,null,!1)?s!==void 0?(h=t.stateNode,s.paired=h,h.paired=s,ka.delete(l),Ho(t,n.onShare)):Ho(t,n.onExit):ji(t.child,!1)),ka!==null&&Bh(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ih(t),t=t.sibling;else ka!==null&&Bh(t)}function Uv(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,l=Ji(n,t.stateNode);n=Wi(n.default,n.update),t.flags&=-5,n!=="none"&&Ro(t,l,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Uv(t);t=t.sibling}}function Ph(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var n=t.stateNode;n.paired!==null&&(n.paired=null,ji(t.child,!1))}Ph(t)}t=t.sibling}}function Ru(t){if(t.tag===30)t.stateNode.paired=null,ji(t.child,!1),Ph(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ru(t),t=t.sibling;else Ph(t)}function qv(t){for(t=t.child;t!==null;)t.tag===30?ji(t.child,!1):(t.subtreeFlags&33554432)!==0&&qv(t),t=t.sibling}function Hh(t,n,l,s,h,g,N){for(var L=!1;n!==null;){if(n.tag===5){var X=n.stateNode;if(g!==null&&aa<g.length){var te=g[aa],de=ym(X);(te.view||de.view)&&(L=!0);var ve;if(ve=(t.flags&4)===0)if(de.clip)ve=!0;else{ve=te.rect;var J=de.rect;ve=ve.y!==J.y||ve.x!==J.x||ve.height!==J.height||ve.width!==J.width}ve&&(t.flags|=4),de.abs?de=!te.abs:(te=te.rect,de=de.rect,de=te.height!==de.height||te.width!==de.width),de&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&P2(X,aa===0?l:l+"_"+aa,h),L&&(t.flags&4)!==0||(bi===null&&(bi=[]),bi.push(X,aa===0?s:s+"_"+aa,n.memoizedProps)),aa++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&N?t.flags|=n.flags&32:Hh(t,n.child,l,s,h,g,N)&&(L=!0));n=n.sibling}return L}function Fv(t,n){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,s=t.stateNode,h=Ji(l,s),g=Wi(l.default,l.update),N;N=t.memoizedState,t.memoizedState=null,s=t;var L=t.child;aa=0,h=Hh(s,L,h,h,g,N,!1),(t.flags&4)!==0&&h&&Ho(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Fv(t);t=t.sibling}}var pn=!1,bt=!1,wi=!1,Uh=!1,Vv=typeof WeakSet=="function"?WeakSet:Set,gn=null,Si=!1,Xs=!1,Du=!1,qh=!1;function q6(t,n,l){if(t=t.containerInfo,hm=Qo,t=Xg(t),Tf(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var h=s.getSelection&&s.getSelection();if(h&&h.rangeCount!==0){s=h.anchorNode;var g=h.anchorOffset,N=h.focusNode;h=h.focusOffset;try{s.nodeType,N.nodeType}catch{s=null;break e}var L=0,X=-1,te=-1,de=0,ve=0,J=t,oe=null;t:for(;;){for(var _e;J!==s||g!==0&&J.nodeType!==3||(X=L+g),J!==N||h!==0&&J.nodeType!==3||(te=L+h),J.nodeType===3&&(L+=J.nodeValue.length),(_e=J.firstChild)!==null;)oe=J,J=_e;for(;;){if(J===t)break t;if(oe===s&&++de===g&&(X=L),oe===N&&++ve===h&&(te=L),(_e=J.nextSibling)!==null)break;J=oe,oe=J.parentNode}J=_e}s=X===-1||te===-1?null:{start:X,end:te}}else s=null}s=s||{start:0,end:0}}else s=null;for(mm={focusedElem:t,selectionRange:s},Qo=!1,l=(l&335544064)===l,gn=n,n=l?9270:1024;gn!==null;){if(t=gn,l&&(s=t.deletions,s!==null))for(g=0;g<s.length;g++)l&&Ih(s[g]);if(t.alternate===null&&(t.flags&2)!==0)l&&Iv(t),Ou(l);else{if(t.tag===22){if(s=t.alternate,t.memoizedState!==null){s!==null&&s.memoizedState===null&&l&&Ih(s),Ou(l);continue}else if(s!==null&&s.memoizedState!==null){l&&Iv(t),Ou(l);continue}}s=t.child,(t.subtreeFlags&n)!==0&&s!==null?(s.return=t,gn=s):(l&&Uv(t),Ou(l))}}ka=null}function Ou(t){for(;gn!==null;){var n=gn,l=t,s=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&s!==null){l=void 0,h=s.memoizedProps,s=s.memoizedState;var g=n.stateNode;try{var N=Ll(n.type,h);l=g.getSnapshotBeforeUpdate(N,s),g.__reactInternalSnapshotBeforeUpdate=l}catch(L){wt(n,n.return,L)}}break;case 3:if((h&1024)!==0){if(s=n.stateNode.containerInfo,l=s.nodeType,l===9)jm(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":jm(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&s!==null&&(l=Ji(s.memoizedProps,s.stateNode),h=n.memoizedProps,h=Wi(h.default,h.update),h!=="none"&&Ro(s,l,h,s.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(r(163))}if(s=n.sibling,s!==null){s.return=n.return,gn=s;break}gn=n.return}}function $v(t,n,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ki(t,l),s&4&&Gs(5,l);break;case 1:if(ki(t,l),s&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(N){wt(l,l.return,N)}else{var h=Ll(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){wt(l,l.return,N)}}s&64&&Dv(l),s&512&&xi(l,l.return);break;case 3:if(ki(t,l),s&64&&(t=l.updateQueue,t!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{w1(t,n)}catch(N){wt(l,l.return,N)}}break;case 27:n===null&&s&4&&Bv(l);case 26:case 5:ki(t,l),n===null&&s&4&&Rh(l),s&512&&xi(l,l.return);break;case 12:ki(t,l);break;case 31:ki(t,l),s&4&&Kv(t,l);break;case 13:ki(t,l),s&4&&Qv(t,l),s&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=ek.bind(null,l),zk(t,l))));break;case 22:if(s=l.memoizedState!==null||pn,!s){var g=n!==null&&n.memoizedState!==null||bt;n=pn,h=bt,pn=s,(bt=g)&&!h?(s=2,(l.subtreeFlags&8772)!==0&&(s|=1),ni(t,l,s)):ki(t,l),pn=n,bt=h}break;case 30:ki(t,l),s&512&&xi(l,l.return);break;case 7:s&512&&xi(l,l.return);default:ki(t,l)}}function Fh(t,n){for(t=t.child;t!==null;)Gv(t,n),t=t.sibling}function Gv(t,n){switch(t.tag){case 5:case 26:try{var l=t.stateNode;if(n){var s=l.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var h=t.stateNode,g=t.memoizedProps.style,N=g!=null&&g.hasOwnProperty("display")?g.display:null;h.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(X){wt(t,t.return,X)}Vh(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,Ve=!0}catch(X){wt(t,t.return,X)}break;case 18:try{var L=t.stateNode;n?I2(L,!0):I2(t.stateNode,!1)}catch(X){wt(t,t.return,X)}break;case 22:case 23:t.memoizedState===null&&Fh(t,n);break;default:Fh(t,n)}}function Vh(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var l=t,s=n;switch(l.tag){case 4:Gv(l,s);break e;case 22:l.memoizedState===null&&Vh(l,s);break e;default:Vh(l,s)}}t=t.sibling}}function Yv(t){var n=t.alternate;n!==null&&(t.alternate=null,Yv(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ki(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Lt=null,ia=!1;function ei(t,n,l){for(l=l.child;l!==null;)Xv(t,n,l),l=l.sibling}function Xv(t,n,l){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(Ya,l)}catch{}switch(l.tag){case 26:bt||En(l,n),ei(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!bt&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:bt||En(l,n),Ys(l);var s=Lt,h=ia;Qr(l.type)&&(Lt=l.stateNode,ia=!1),ei(t,n,l),J2(l.stateNode,l.type,l.memoizedProps),Lt=s,ia=h;break;case 5:bt||En(l,n),Ys(l);case 6:if(l.tag===6&&Ys(l),s=Lt,h=ia,Lt=null,ei(t,n,l),Lt=s,ia=h,Lt!==null)if(ia)try{(Lt.nodeType===9?Lt.body:Lt.nodeName==="HTML"?Lt.ownerDocument.body:Lt).removeChild(l.stateNode),Ve=!0}catch(g){wt(l,n,g)}else try{Lt.removeChild(l.stateNode),Ve=!0}catch(g){wt(l,n,g)}break;case 18:Lt!==null&&(ia?(t=Lt,B2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Zo(t)):B2(Lt,l.stateNode));break;case 4:s=Lt,h=ia,Lt=l.stateNode.containerInfo,ia=!0,ei(t,n,l),Lt=s,ia=h;break;case 0:case 11:case 14:case 15:Fr(2,l,n),bt||Fr(4,l,n),ei(t,n,l);break;case 1:bt||(En(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Ov(l,n,s)),ei(t,n,l);break;case 21:ei(t,n,l);break;case 22:bt=(s=bt)||l.memoizedState!==null,ei(t,n,l),bt=s;break;case 30:En(l,n),ei(t,n,l);break;case 7:bt||En(l,n),ei(t,n,l);break;default:ei(t,n,l)}}function Kv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Zo(t)}catch(l){wt(n,n.return,l)}}}function Qv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Zo(t)}catch(l){wt(n,n.return,l)}}function F6(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Vv),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Vv),n;default:throw Error(r(435,t.tag))}}function zu(t,n){var l=F6(t);n.forEach(function(s){if(!l.has(s)){l.add(s);var h=tk.bind(null,t,s);s.then(h,h)}})}function Gn(t,n,l){var s=n.deletions;if(s!==null)for(var h=0;h<s.length;h++){var g=s[h],N=t,L=n,X=L;e:for(;X!==null;){switch(X.tag){case 27:if(Qr(X.type)){Lt=X.stateNode,ia=!1;break e}break;case 5:Lt=X.stateNode,ia=!1;break e;case 3:case 4:Lt=X.stateNode.containerInfo,ia=!0;break e}X=X.return}if(Lt===null)throw Error(r(160));Xv(N,L,g),Lt=null,ia=!1,N=g.alternate,N!==null&&(N.return=null),g.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Zv(n,t,l),n=n.sibling}var ti=null;function Zv(t,n,l){var s=t.alternate,h=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(h&4&&(s=t.updateQueue,s=s!==null?s.events:null,s!==null))for(var g=0;g<s.length;g++){var N=s[g];N.ref.impl=N.nextImpl}Gn(n,t,l),Yn(t),h&4&&(Fr(3,t,t.return),Gs(3,t),Fr(5,t,t.return));break;case 1:Gn(n,t,l),Yn(t),h&512&&(bt||s===null||En(s,s.return)),h&64&&pn&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:if(g=ti,Gn(n,t,l),Yn(t),h&512&&(bt||s===null||En(s,s.return)),h&4)if(h=s!==null?s.memoizedState:null,l=t.memoizedState,s===null)if(l===null)if(t.stateNode===null)if(pn)t.stateNode=O2(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,l=t.memoizedProps,h=g.ownerDocument||g;t:switch(n){case"title":s=h.getElementsByTagName("title")[0],(!s||s[Yi]||s[Dt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=h.createElement(n),h.head.insertBefore(s,h.querySelector("head > title"))),Tn(s,n,l),s[Dt]=t,I(s),n=s;break e;case"link":if(g=iy("link","href",h).get(n+(l.href||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,l),h.head.appendChild(s);break;case"meta":if(g=iy("meta","content",h).get(n+(l.content||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,l),h.head.appendChild(s);break;default:throw Error(r(468,n))}s[Dt]=t,I(s),n=s}t.stateNode=n}else pn||Tm(g,t.type,t.stateNode);else t.stateNode=ay(g,l,t.memoizedProps);else h!==l?(h===null?(n=s.stateNode,n===null||bt||n.parentNode.removeChild(n)):h.count--,l===null?pn||Tm(g,t.type,t.stateNode):ay(g,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Dh(t,t.memoizedProps,s.memoizedProps);break;case 27:Gn(n,t,l),Yn(t),h&512&&(bt||s===null||En(s,s.return)),s!==null&&h&4&&Dh(t,t.memoizedProps,s.memoizedProps);break;case 5:if(g=wi,wi=!1,Gn(n,t,l),wi=g,Yn(t),h&512&&(bt||s===null||En(s,s.return)),t.flags&32){n=t.stateNode;try{qn(n,""),Ve=!0}catch(de){wt(t,t.return,de)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,Dh(t,n,s!==null?s.memoizedProps:n)),h&1024&&(Uh=!0);break;case 6:if(Gn(n,t,l),Yn(t),h&4){if(t.stateNode===null)throw Error(r(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n,Ve=!0}catch(de){wt(t,t.return,de)}}break;case 3:if(Ve=!1,Qu=null,g=ti,ti=ac(n.containerInfo),Gn(n,t,l),ti=g,Yn(t),h&4&&s!==null&&s.memoizedState.isDehydrated)try{Zo(n.containerInfo)}catch(de){wt(t,t.return,de)}Uh&&(Uh=!1,Jv(t)),Ve=!1;break;case 4:h=wi,wi=pn,s=cn(),g=ti,ti=ac(t.stateNode.containerInfo),Gn(n,t,l),Yn(t),ti=g,Ve&&Xs&&(Du=!0),Ve=s,wi=h;break;case 12:Gn(n,t,l),Yn(t);break;case 31:Gn(n,t,l),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 13:Gn(n,t,l),Yn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Iu=Yt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 22:g=t.memoizedState!==null,N=s!==null&&s.memoizedState!==null;var L=pn,X=bt,te=wi;pn=L||g,wi=te||g,bt=X||N,Gn(n,t,l),bt=X,wi=te,pn=L,Yn(t),h&8192&&(n=t.stateNode,n._visibility=g?n._visibility&-2:n._visibility|1,!g||s===null||N||pn||bt||(n=N||bt,l=pn,s=bt,pn=g||pn,bt=n,Vr(t,2),pn=l,bt=s),!g&&wi||Fh(t,g)),h&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,zu(t,l))));break;case 19:Gn(n,t,l),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 30:h&512&&(bt||s===null||En(s,s.return)),h=cn(),g=Xs,N=(l&335544064)===l,L=t.memoizedProps,Xs=N&&Wi(L.default,L.update)!=="none",Gn(n,t,l),Yn(t),N&&s!==null&&Ve&&(t.flags|=4),Xs=g,Ve=h;break;case 21:break;case 7:h&512&&(bt||s===null||En(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=t);default:Gn(n,t,l),Yn(t)}}function Yn(t){var n=t.flags;if(n&2){try{for(var l,s=t.return;s!==null;){if(Lv(s)){l=s;break}s=s.return}s=null;for(var h=t.return;h!==null;){if(Mh(h)){var g=h.stateNode;s===null?s=[g]:s.push(g)}if(_h(h))break;h=h.return}var N=s;if(l==null)throw Error(r(160));switch(l.tag){case 27:var L=l.stateNode,X=Oh(t);Au(t,X,L,N);break;case 5:var te=l.stateNode;l.flags&32&&(qn(te,""),l.flags&=-33);var de=Oh(t);Au(t,de,te,N);break;case 3:case 4:var ve=l.stateNode.containerInfo,J=Oh(t);zh(t,J,ve,N);break;default:throw Error(r(161))}}catch(oe){wt(t,t.return,oe)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Jv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Jv(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,Qo=!0,n.reset(),Qo=!1),t=t.sibling}}function Do(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)Wv(n,t),n=n.sibling;else Fv(n)}function Wv(t,n){var l=t.alternate;if(l===null)Lh(t,!1);else switch(t.tag){case 3:if(qh=Si=!1,Pv(),Do(n,t),!Si&&!Du){if(t=bi,t!==null)for(var s=0;s<t.length;s+=3){l=t[s];var h=t[s+1];H2(l,t[s+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+h+")"})}t=n.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),qh=!0}bi=null;break;case 5:Do(n,t);break;case 4:s=Si,Si=!1,Do(n,t),Si&&(Du=!0),Si=s;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Lh(t,!1):Do(n,t));break;case 30:s=Si,h=Pv(),Si=!1,Do(n,t),Si&&(t.flags|=4);var g=t.memoizedProps,N=t.stateNode;n=Ji(g,N),N=Ji(l.memoizedProps,N);var L=Wi(g.default,g.update);L==="none"?n=!1:(g=l.memoizedState,l.memoizedState=null,l=t.child,aa=0,n=Hh(t,l,n,N,L,g,!0),aa!==(g===null?0:g.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Ho(t,t.memoizedProps.onUpdate),bi=h):h!==null&&(h.push.apply(h,bi),bi=h),Si=(t.flags&32)!==0?!0:s;break;default:Do(n,t)}}function ki(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)$v(t,n.alternate,n),n=n.sibling}function Vr(t,n){for(t=t.child;t!==null;){var l=t,s=n;switch(l.tag){case 0:case 11:case 14:case 15:Fr(4,l,l.return),Vr(l,s);break;case 1:En(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&Ov(l,l.return,h),Vr(l,s);break;case 27:(s&2)!==0&&J2(l.stateNode,l.type,l.memoizedProps);case 5:En(l,l.return),l.tag!==5&&l.tag!==27||Ys(l),Vr(l,s);break;case 6:Ys(l);break;case 26:En(l,l.return),h=l.stateNode,l.memoizedState!==null||h===null||bt||h.parentNode.removeChild(h),Vr(l,s);break;case 22:l.memoizedState===null&&Vr(l,s);break;case 30:En(l,l.return),Vr(l,s);break;case 7:En(l,l.return);default:Vr(l,s)}t=t.sibling}}function ni(t,n,l){for(l=(n.subtreeFlags&8772)!==0?l:l&-2,n=n.child;n!==null;){var s=n.alternate,h=t,g=n,N=g.flags,L=(l&1)!==0;switch(g.tag){case 0:case 11:case 15:ni(h,g,l),Gs(4,g);break;case 1:if(ni(h,g,l),s=g,h=s.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(de){wt(s,s.return,de)}if(s=g,h=s.updateQueue,h!==null){var X=s.stateNode;try{var te=h.shared.hiddenCallbacks;if(te!==null)for(h.shared.hiddenCallbacks=null,h=0;h<te.length;h++)j1(te[h],X)}catch(de){wt(s,s.return,de)}}L&&N&64&&Dv(g),xi(g,g.return);break;case 27:(l&2)!==0&&Bv(g);case 5:g.tag!==5&&g.tag!==27||zv(g),ni(h,g,l),L&&s===null&&N&4&&Rh(g),xi(g,g.return);break;case 6:zv(g);break;case 26:X=g.stateNode,g.memoizedState!==null||X===null||pn||Tm(ac(X.ownerDocument),g.type,X),ni(h,g,l),L&&s===null&&N&4&&Rh(g),xi(g,g.return);break;case 12:ni(h,g,l);break;case 31:ni(h,g,l),L&&N&4&&Kv(h,g);break;case 13:ni(h,g,l),L&&N&4&&Qv(h,g);break;case 22:g.memoizedState===null&&ni(h,g,l),xi(g,g.return);break;case 30:ni(h,g,l),xi(g,g.return);break;case 7:xi(g,g.return);default:ni(h,g,l)}n=n.sibling}}function $h(t,n){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Ds(l))}function Gh(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ds(t))}function Pa(t,n,l,s){var h=(l&335544064)===l;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)e2(t,n,l,s),n=n.sibling;else h&&qv(n)}function e2(t,n,l,s){var h=(l&335544064)===l;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Ru(n);var g=n.flags;switch(n.tag){case 0:case 11:case 15:Pa(t,n,l,s),g&2048&&Gs(9,n);break;case 1:Pa(t,n,l,s);break;case 3:Pa(t,n,l,s),h&&qh&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),g&2048&&(g=null,n.alternate!==null&&(g=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==g&&(n.refCount++,g!=null&&Ds(g)));break;case 12:if(g&2048){Pa(t,n,l,s),g=n.stateNode;try{var N=n.memoizedProps,L=N.id,X=N.onPostCommit;typeof X=="function"&&X(L,n.alternate===null?"mount":"update",g.passiveEffectDuration,-0)}catch(te){wt(n,n.return,te)}}else Pa(t,n,l,s);break;case 31:Pa(t,n,l,s);break;case 13:Pa(t,n,l,s);break;case 23:break;case 22:N=n.stateNode,L=n.alternate,n.memoizedState!==null?(h&&L!==null&&L.memoizedState===null&&Ru(L),N._visibility&2?Pa(t,n,l,s):Ks(t,n)):(h&&L!==null&&L.memoizedState!==null&&Ru(n),N._visibility&2?Pa(t,n,l,s):(N._visibility|=2,Oo(t,n,l,s,(n.subtreeFlags&10256)!==0||!1))),g&2048&&$h(L,n);break;case 24:Pa(t,n,l,s),g&2048&&Gh(n.alternate,n);break;case 30:h&&(g=n.alternate,g!==null&&(ji(g.child,!0),ji(n.child,!0))),Pa(t,n,l,s);break;default:Pa(t,n,l,s)}}function Oo(t,n,l,s,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,N=n,L=l,X=s,te=N.flags;switch(N.tag){case 0:case 11:case 15:Oo(g,N,L,X,h),Gs(8,N);break;case 23:break;case 22:var de=N.stateNode;N.memoizedState!==null?de._visibility&2?Oo(g,N,L,X,h):Ks(g,N):(de._visibility|=2,Oo(g,N,L,X,h)),h&&te&2048&&$h(N.alternate,N);break;case 24:Oo(g,N,L,X,h),h&&te&2048&&Gh(N.alternate,N);break;default:Oo(g,N,L,X,h)}n=n.sibling}}function Ks(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,s=n,h=s.flags;switch(s.tag){case 22:Ks(l,s),h&2048&&$h(s.alternate,s);break;case 24:Ks(l,s),h&2048&&Gh(s.alternate,s);break;default:Ks(l,s)}n=n.sibling}}var Bl=8192;function Il(t,n,l){if(t.subtreeFlags&Bl)for(t=t.child;t!==null;)t2(t,n,l),t=t.sibling}function t2(t,n,l){switch(t.tag){case 26:Il(t,n,l),t.flags&Bl&&(t.memoizedState!==null?Kk(l,ti,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&sy(l,t)));break;case 5:Il(t,n,l),t.flags&Bl&&(t=t.stateNode,(n&335544128)===n&&sy(l,t));break;case 3:case 4:var s=ti;ti=ac(t.stateNode.containerInfo),Il(t,n,l),ti=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Bl,Bl=16777216,Il(t,n,l),Bl=s):Il(t,n,l));break;case 30:if((t.flags&Bl)!==0&&(s=t.memoizedProps.name,s!=null&&s!=="auto")){var h=t.stateNode;h.paired=null,ka===null&&(ka=new Map),ka.set(s,h)}Il(t,n,l);break;default:Il(t,n,l)}}function n2(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Qs(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];gn=s,i2(s,t)}n2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)a2(t),t=t.sibling}function a2(t){switch(t.tag){case 0:case 11:case 15:Qs(t),t.flags&2048&&Fr(9,t,t.return);break;case 3:Qs(t);break;case 12:Qs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Lu(t)):Qs(t);break;default:Qs(t)}}function Lu(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];gn=s,i2(s,t)}n2(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Fr(8,n,n.return),Lu(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Lu(n));break;default:Lu(n)}t=t.sibling}}function i2(t,n){for(;gn!==null;){var l=gn;switch(l.tag){case 0:case 11:case 15:Fr(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ds(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,gn=s;else e:for(l=t;gn!==null;){s=gn;var h=s.sibling,g=s.return;if(Yv(s),s===l){gn=null;break e}if(h!==null){h.return=g,gn=h;break e}gn=g}}}var V6={getCacheForType:function(t){var n=kn(Zt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return kn(Zt).controller.signal}},$6=typeof WeakMap=="function"?WeakMap:Map,yt=0,Tt=null,rt=null,dt=0,jt=0,Ca=null,$r=!1,zo=!1,Yh=!1,sr=0,Vt=0,Gr=0,Pl=0,Bu=0,Na=0,Lo=0,Zs=null,ra=null,Xh=!1,Iu=0,r2=0,Pu=1/0,Hu=null,Yr=null,Ht=0,ai=null,Hl=null,Ci=0,Kh=0,Qh=null,l2=null,Bo=null,Io=null,Po=null,Js=0,Uu=null;function Ea(){return(yt&2)!==0&&dt!==0?dt&-dt:pe.T!==null?lm():Wn()}function o2(){if(Na===0)if((dt&536870912)===0||at){var t=Ra;Ra<<=1,(Ra&3932160)===0&&(Ra=262144),Na=t}else Na=536870912;return t=Cn.current,t!==null&&(t.flags|=32),Na}function Ho(t,n){if(n!=null){var l=t.stateNode,s=l.ref;s===null&&(s=l.ref=U2(Ji(t.memoizedProps,l))),Io===null&&(Io=[]),Io.push(n.bind(null,s))}}function la(t,n,l){(t===Tt&&(jt===2||jt===9)||t.cancelPendingCommit!==null)&&(Uo(t,0),Xr(t,dt,Na,!1)),Za(t,l),((yt&2)===0||t!==Tt)&&(t===Tt&&((yt&2)===0&&(Pl|=l),Vt===4&&Xr(t,dt,Na,!1)),Ni(t))}function s2(t,n,l){if((yt&6)!==0)throw Error(r(327));var s=!l&&(n&127)===0&&(n&t.expiredLanes)===0||ga(t,n),h=s?X6(t,n):Jh(t,n,!0),g=s;do{if(h===0){zo&&!s&&Xr(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!G6(l)){h=Jh(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var L=t;h=Zs;var X=L.current.memoizedState.isDehydrated;if(X&&(Uo(L,N).flags|=256),N=Jh(L,N,!1),N!==2&&N!==6){if(Yh&&!X){L.errorRecoveryDisabledLanes|=g,Pl|=g,h=4;break e}g=ra,ra=h,g!==null&&(ra===null?ra=g:ra.push.apply(ra,g))}h=N}if(g=!1,h!==2)continue}}if(h===1){Uo(t,0),Xr(t,n,0,!0);break}e:{switch(s=t,g=h,g){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Xr(s,n,Na,!$r);break e;case 2:ra=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(h=Iu+300-Yt(),10<h)){if(Xr(s,n,Na,!$r),pa(s,0,!0)!==0)break e;Ci=n,s.timeoutHandle=vm(c2.bind(null,s,l,ra,Hu,Xh,n,Na,Pl,Lo,$r,g,"Throttled",-0,0),h);break e}c2(s,l,ra,Hu,Xh,n,Na,Pl,Lo,$r,g,null,-0,0)}}break}while(!0);Ni(t)}function c2(t,n,l,s,h,g,N,L,X,te,de,ve,J,oe){t.timeoutHandle=-1;var _e=n.subtreeFlags,Le=(g&335544064)===g;if(ve=null,(Le||_e&8192||(_e&16785408)===16785408)&&(ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},ka=null,t2(n,g,ve),Le&&(_e=ve,Le=t.containerInfo,Le=(Le.nodeType===9?Le:Le.ownerDocument).__reactViewTransition,Le!=null&&(_e.count++,_e.waitingForViewTransition=!0,_e=lc.bind(_e),Le.finished.then(_e,_e))),_e=(g&62914560)===g?Iu-Yt():(g&4194048)===g?r2-Yt():0,_e=Qk(ve,_e),_e!==null)){Ci=g,t.cancelPendingCommit=_e(v2.bind(null,t,n,g,l,s,h,N,L,X,te,de,ve,null,J,oe)),Xr(t,g,N,!te);return}v2(t,n,g,l,s,h,N,L,X,te,de,ve)}function G6(t){for(var n=t;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var h=l[s],g=h.getSnapshot;h=h.value;try{if(!wa(g(),h))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Xr(t,n,l,s){n=mi(t,n),n&=~Bu,n&=~Pl,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var h=n;0<h;){var g=31-$t(h),N=1<<g;s[g]=-1,h&=~N}l!==0&&Un(t,l,n)}function qu(){return(yt&6)===0?(Ws(0),!1):!0}function Zh(){if(rt!==null){if(jt===0)var t=rt.return;else t=rt,nr=El=null,rh(t),Eo=null,Ls=0,t=rt;for(;t!==null;)Rv(t.alternate,t),t=t.return;rt=null}}function Uo(t,n){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,gk(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Ci=0,Zh(),Tt=t,rt=l=er(t.current,null),dt=n,jt=0,Ca=null,$r=!1,zo=ga(t,n),Yh=!1,Lo=Na=Bu=Pl=Gr=Vt=0,ra=Zs=null,Xh=!1,sr=mi(t,n),Qc(),l}function u2(t,n){et=null,pe.H=ju,n===No||n===ou?(n=v1(),jt=3):n===Gf?(n=v1(),jt=4):jt=n===bh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ca=n,rt===null&&(Vt=1,wu(t,za(n,t.current)))}function d2(){var t=Cn.current;return t===null?!0:(dt&4194048)===dt?zn===null:(dt&62914560)===dt||(dt&536870912)!==0?t===zn:!1}function f2(){var t=pe.H;return pe.H=ju,t===null?ju:t}function h2(){var t=pe.A;return pe.A=V6,t}function Fu(){Vt=4,$r||(dt&4194048)!==dt&&Cn.current!==null||(zo=!0),(Gr&134217727)===0&&(Pl&134217727)===0||Tt===null||Xr(Tt,dt,Na,!1)}function Jh(t,n,l){var s=yt;yt|=2;var h=f2(),g=h2();(Tt!==t||dt!==n)&&(Hu=null,Uo(t,n)),n=!1;var N=Vt;e:do try{if(jt!==0&&rt!==null){var L=rt,X=Ca;switch(jt){case 8:Zh(),N=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(n=!0);var te=jt;if(jt=0,Ca=null,qo(t,L,X,te),l&&zo){N=0;break e}break;default:te=jt,jt=0,Ca=null,qo(t,L,X,te)}}Y6(),N=Vt;break}catch(de){u2(t,de)}while(!0);return n&&t.shellSuspendCounter++,nr=El=null,yt=s,pe.H=h,pe.A=g,rt===null&&(Tt=null,dt=0,Qc()),N}function Y6(){for(;rt!==null;)m2(rt)}function X6(t,n){var l=yt;yt|=2;var s=f2(),h=h2();Tt!==t||dt!==n?(Hu=null,Pu=Yt()+500,Uo(t,n)):zo=ga(t,n);e:do try{if(jt!==0&&rt!==null){n=rt;var g=Ca;t:switch(jt){case 1:jt=0,Ca=null,qo(t,n,g,1);break;case 2:case 9:if(p1(g)){jt=0,Ca=null,p2(n);break}n=function(){jt!==2&&jt!==9||Tt!==t||(jt=7),Ni(t)},g.then(n,n);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:p1(g)?(jt=0,Ca=null,p2(n)):(jt=0,Ca=null,qo(t,n,g,7));break;case 5:var N=null;switch(rt.tag){case 26:N=rt.memoizedState;case 5:case 27:var L=rt;if(N?ly(N):L.stateNode.complete){jt=0,Ca=null;var X=L.sibling;if(X!==null)rt=X;else{var te=L.return;te!==null?(rt=te,Vu(te)):rt=null}break t}}jt=0,Ca=null,qo(t,n,g,5);break;case 6:jt=0,Ca=null,qo(t,n,g,6);break;case 8:Zh(),Vt=6;break e;default:throw Error(r(462))}}K6();break}catch(de){u2(t,de)}while(!0);return nr=El=null,pe.H=s,pe.A=h,yt=l,rt!==null?0:(Tt=null,dt=0,Qc(),Vt)}function K6(){for(;rt!==null&&!Dn();)m2(rt)}function m2(t){var n=_v(t.alternate,t,sr);t.memoizedProps=t.pendingProps,n===null?Vu(t):rt=n}function p2(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=Sv(l,n,n.pendingProps,n.type,void 0,dt);break;case 11:n=Sv(l,n,n.pendingProps,n.type.render,n.ref,dt);break;case 5:rh(n);var s=n;s===mn&&(at?(nu(s),s.tag===5&&s.stateNode!=null&&(Mt=s.stateNode)):(nu(s),at=!0));default:Rv(l,n),n=rt=i1(n,sr),n=_v(l,n,sr)}t.memoizedProps=t.pendingProps,n===null?Vu(t):rt=n}function qo(t,n,l,s){nr=El=null,rh(n),Eo=null,Ls=0;var h=n.return;try{if(L6(t,h,n,l,dt)){Vt=1,wu(t,za(l,t.current)),rt=null;return}}catch(g){if(h!==null)throw rt=h,g;Vt=1,wu(t,za(l,t.current)),rt=null;return}n.flags&32768?(at||s===1?t=!0:zo||(dt&536870912)!==0?t=!1:($r=t=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),g2(n,t)):Vu(n)}function Vu(t){var n=t;do{if((n.flags&32768)!==0){g2(n,$r);return}t=n.return;var l=H6(n.alternate,n,sr);if(l!==null){rt=l;return}if(n=n.sibling,n!==null){rt=n;return}rt=n=t}while(n!==null);Vt===0&&(Vt=5)}function g2(t,n){do{var l=U6(t.alternate,t);if(l!==null){l.flags&=32767,rt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){rt=t;return}rt=t=l}while(t!==null);Vt=6,rt=null}function v2(t,n,l,s,h,g,N,L,X,te,de,ve){t.cancelPendingCommit=null;do $u();while(Ht!==0);if((yt&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));t===Tt&&(rt=Tt=null,dt=0),Hl=n,ai=t,Ci=l,Qh=h,l2=s,Q6(t,n,l,N,L,X,ve)}}function Q6(t,n,l,s,h,g,N){var L=n.lanes|n.childLanes;if(Kh=L,L|=Df,Ja(t,l,L,s,h,g),Io=null,(l&335544064)===l?(Po=k6(t),s=10262):(Po=null,s=10256),(n.subtreeFlags&s)!==0||(n.flags&s)!==0?(t.callbackNode=null,t.callbackPriority=0,nk(bn,function(){return nm(),null})):(t.callbackNode=null,t.callbackPriority=0),_u=!1,s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=pe.T,pe.T=null,h=W.p,W.p=2,g=yt,yt|=4;try{q6(t,n,l)}finally{yt=g,W.p=h,pe.T=s}}Ht=1,_u?Bo=wk(N,t.containerInfo,Po,Wh,em,J6,tm,nm,Z6):(Wh(),em(),tm())}function Z6(t){if(Ht!==0){var n=ai.onRecoverableError;n(t,{componentStack:null})}}function J6(){Ht===3&&(Ht=0,Wv(Hl,ai),Ht=4)}function Wh(){if(Ht===1){Ht=0;var t=ai,n=Hl,l=Ci,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=pe.T,pe.T=null;var h=W.p;W.p=2;var g=yt;yt|=4;try{Xs=Du=!1,Zv(n,t,l),l=mm;var N=Xg(t.containerInfo),L=l.focusedElem,X=l.selectionRange;if(N!==L&&L&&L.ownerDocument&&Yg(L.ownerDocument.documentElement,L)){if(X!==null&&Tf(L)){var te=X.start,de=X.end;if(de===void 0&&(de=te),"selectionStart"in L)L.selectionStart=te,L.selectionEnd=Math.min(de,L.value.length);else{var ve=L.ownerDocument||document,J=ve&&ve.defaultView||window;if(J.getSelection){var oe=J.getSelection(),_e=L.textContent.length,Le=Math.min(X.start,_e),tt=X.end===void 0?Le:Math.min(X.end,_e);!oe.extend&&Le>tt&&(N=tt,tt=Le,Le=N);var ee=Gg(L,Le),Z=Gg(L,tt);if(ee&&Z&&(oe.rangeCount!==1||oe.anchorNode!==ee.node||oe.anchorOffset!==ee.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var re=ve.createRange();re.setStart(ee.node,ee.offset),oe.removeAllRanges(),Le>tt?(oe.addRange(re),oe.extend(Z.node,Z.offset)):(re.setEnd(Z.node,Z.offset),oe.addRange(re))}}}}for(ve=[],oe=L;oe=oe.parentNode;)oe.nodeType===1&&ve.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<ve.length;L++){var ge=ve[L];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Qo=!!hm,mm=hm=null}finally{yt=g,W.p=h,pe.T=s}}t.current=n,Ht=2}}function em(){if(Ht===2){Ht=0;var t=ai,n=Hl,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=pe.T,pe.T=null;var s=W.p;W.p=2;var h=yt;yt|=4;try{$v(t,n.alternate,n)}finally{yt=h,W.p=s,pe.T=l}}Ht=3}}function tm(){if(Ht===4||Ht===3){Ht=0;var t=Bo;Bo=null,Xe();var n=ai,l=Hl,s=Ci,h=l2,g=(s&335544064)===s?10262:10256;if((l.subtreeFlags&g)!==0||(l.flags&g)!==0?Ht=5:(Ht=0,Hl=ai=null,y2(n,n.pendingLanes)),g=n.pendingLanes,g===0&&(Yr=null),Jn(s),l=l.stateNode,fn&&typeof fn.onCommitFiberRoot=="function")try{fn.onCommitFiberRoot(Ya,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=pe.T,g=W.p,W.p=2,pe.T=null;try{for(var N=n.onRecoverableError,L=0;L<h.length;L++){var X=h[L];N(X.value,{componentStack:X.stack})}}finally{pe.T=l,W.p=g}}if(h=Io,N=Po,Po=null,h!==null&&(Io=null,N===null&&(N=[]),t!==null))for(X=0;X<h.length;X++)l=(0,h[X])(N),l!==void 0&&t.finished.finally(l);(Ci&3)!==0&&$u(),Ni(n),g=n.pendingLanes,(s&261930)!==0&&(g&42)!==0?n===Uu?Js++:(Js=0,Uu=n):(Js=0,Uu=null),Ws(0)}}function y2(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ds(n)))}function $u(){return Bo!==null&&(Bo.skipTransition(),Bo=null),Wh(),em(),tm(),nm()}function nm(){if(Ht!==5)return!1;var t=ai,n=Kh;Kh=0;var l=Jn(Ci),s=pe.T,h=W.p;try{W.p=32>l?32:l,pe.T=null,l=Qh,Qh=null;var g=ai,N=Ci;if(Ht=0,Hl=ai=null,Ci=0,(yt&6)!==0)throw Error(r(331));var L=yt;if(yt|=4,a2(g.current),e2(g,g.current,N,l),yt=L,Ws(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(Ya,g)}catch{}return!0}finally{W.p=h,pe.T=s,y2(t,n)}}function x2(t,n,l){n=za(l,n),n=xh(t.stateNode,n,2),t=Pr(t,n,2),t!==null&&(Za(t,2),Ni(t))}function wt(t,n,l){if(t.tag===3)x2(t,t,l);else for(;n!==null;){if(n.tag===3){x2(n,t,l);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Yr===null||!Yr.has(s))){t=za(l,t),l=pv(2),s=Pr(n,l,2),s!==null&&(gv(l,s,n,t),Za(s,2),Ni(s));break}}n=n.return}}function am(t,n,l){var s=t.pingCache;if(s===null){s=t.pingCache=new $6;var h=new Set;s.set(n,h)}else h=s.get(n),h===void 0&&(h=new Set,s.set(n,h));h.has(l)||(Yh=!0,h.add(l),t=W6.bind(null,t,n,l),n.then(t,t))}function W6(t,n,l){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Tt===t&&(dt&l)===l&&((Vt===4||Vt===3&&(dt&62914560)===dt&&300>Yt()-Iu)&&(yt&2)===0?Uo(t,0):Bu|=l,Lo===dt&&(Lo=0)),Ni(t)}function b2(t,n){n===0&&(n=va()),t=kl(t,n),t!==null&&(Za(t,n),Ni(t))}function ek(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),b2(t,l)}function tk(t,n){var l=0;switch(t.tag){case 31:case 13:var s=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),b2(t,l)}function nk(t,n){return Hn(t,n)}var Fo=null,Vo=null,im=!1,Gu=!1,rm=!1,Kr=0;function Ni(t){t!==Vo&&t.next===null&&(Vo===null?Fo=Vo=t:Vo=Vo.next=t),Gu=!0,im||(im=!0,ik())}function Ws(t,n){if(!rm&&Gu){rm=!0;do for(var l=!1,s=Fo;s!==null;){if(t!==0){var h=s.pendingLanes;if(h===0)var g=0;else{var N=s.suspendedLanes,L=s.pingedLanes;g=(1<<31-$t(42|t)+1)-1,g&=h&~(N&~L),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,k2(s,g))}else g=dt,g=pa(s,s===Tt?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||ga(s,g)||(l=!0,k2(s,g));s=s.next}while(l);rm=!1}}function ak(){j2()}function j2(){Gu=im=!1;var t=0;Kr!==0&&pk()&&(t=Kr);for(var n=Yt(),l=null,s=Fo;s!==null;){var h=s.next,g=w2(s,n);g===0?(s.next=null,l===null?Fo=h:l.next=h,h===null&&(Vo=l)):(l=s,(t!==0||(g&3)!==0)&&(Gu=!0)),s=h}Ht!==0&&Ht!==5||Ws(t),Kr!==0&&(Kr=0)}function w2(t,n){for(var l=t.suspendedLanes,s=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var N=31-$t(g),L=1<<N,X=h[N];X===-1?((L&l)===0||(L&s)!==0)&&(h[N]=gl(L,n)):X<=n&&(t.expiredLanes|=L),g&=~L}if(n=Tt,l=dt,l=pa(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,l===0||t===n&&(jt===2||jt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&zt(s),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||ga(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(s!==null&&zt(s),Jn(l)){case 2:case 8:l=di;break;case 32:l=bn;break;case 268435456:l=pl;break;default:l=bn}return s=S2.bind(null,t),l=Hn(l,s),t.callbackPriority=n,t.callbackNode=l,n}return s!==null&&s!==null&&zt(s),t.callbackPriority=2,t.callbackNode=null,2}function S2(t,n){if(Ht!==0&&Ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if($u()&&t.callbackNode!==l)return null;var s=dt;return s=pa(t,t===Tt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(s2(t,s,n),w2(t,Yt()),t.callbackNode!=null&&t.callbackNode===l?S2.bind(null,t):null)}function k2(t,n){if($u())return null;s2(t,n,!0)}function ik(){vk(function(){(yt&6)!==0?Hn(ui,ak):j2()})}function lm(){if(Kr===0){var t=_l;t===0&&(t=Ka,Ka<<=1,(Ka&261888)===0&&(Ka=256)),Kr=t}return Kr}function C2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wn(t)}function rk(t,n,l,s,h){if(n==="submit"&&l&&l.stateNode===h){var g=C2((h[sn]||null).action),N=s.submitter;N&&(n=(n=N[sn]||null)?C2(n.formAction):N.getAttribute("formAction"),n!==null&&(g=n,N=null));var L=new Gc("action","action",null,s,h);t.push({event:L,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Kr!==0){var X=new FormData(h,N);mh(l,{pending:!0,data:X,method:h.method,action:g},null,X)}}else typeof g=="function"&&(L.preventDefault(),X=new FormData(h,N),mh(l,{pending:!0,data:X,method:h.method,action:g},g,X))},currentTarget:h}]})}}for(var om=0;om<Rf.length;om++){var sm=Rf[om],lk=sm.toLowerCase(),ok=sm[0].toUpperCase()+sm.slice(1);Wa(lk,"on"+ok)}Wa(Zg,"onAnimationEnd"),Wa(Jg,"onAnimationIteration"),Wa(Wg,"onAnimationStart"),Wa("dblclick","onDoubleClick"),Wa("focusin","onFocus"),Wa("focusout","onBlur"),Wa(g6,"onTransitionRun"),Wa(v6,"onTransitionStart"),Wa(y6,"onTransitionCancel"),Wa(e1,"onTransitionEnd"),He("onMouseEnter",["mouseout","mouseover"]),He("onMouseLeave",["mouseout","mouseover"]),He("onPointerEnter",["pointerout","pointerover"]),He("onPointerLeave",["pointerout","pointerover"]),Ee("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ee("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ee("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ee("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ee("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ee("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ec="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(" "),sk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function N2(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var s=t[l],h=s.event;s=s.listeners;e:{var g=void 0;if(n)for(var N=s.length-1;0<=N;N--){var L=s[N],X=L.instance,te=L.currentTarget;if(L=L.listener,X!==g&&h.isPropagationStopped())break e;g=L,h.currentTarget=te;try{g(h)}catch(de){Kc(de)}h.currentTarget=null,g=X}else for(N=0;N<s.length;N++){if(L=s[N],X=L.instance,te=L.currentTarget,L=L.listener,X!==g&&h.isPropagationStopped())break e;g=L,h.currentTarget=te;try{g(h)}catch(de){Kc(de)}h.currentTarget=null,g=X}}}}function lt(t,n){var l=n[Gi];l===void 0&&(l=n[Gi]=new Set);var s=t+"__bubble";l.has(s)||(E2(n,t,2,!1),l.add(s))}function cm(t,n,l){var s=0;n&&(s|=4),E2(l,t,s,n)}var Yu="_reactListening"+Math.random().toString(36).slice(2);function um(t){if(!t[Yu]){t[Yu]=!0,me.forEach(function(l){l!=="selectionchange"&&(sk.has(l)||cm(l,!1,t),cm(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Yu]||(n[Yu]=!0,cm("selectionchange",!1,n))}}function E2(t,n,l,s){switch(gy(n)){case 2:var h=e8;break;case 8:h=t8;break;default:h=_m}l=h.bind(null,n,l,t),h=void 0,!jl||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),s?h!==void 0?t.addEventListener(n,l,{capture:!0,passive:h}):t.addEventListener(n,l,!0):h!==void 0?t.addEventListener(n,l,{passive:h}):t.addEventListener(n,l,!1)}function dm(t,n,l,s,h){var g=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var N=s.tag;if(N===3||N===4){var L=s.stateNode.containerInfo;if(L===h)break;if(N===4)for(N=s.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===h)return;N=N.return}for(;L!==null;){if(N=ea(L),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){s=g=N;continue e}L=L.parentNode}}s=s.return}bl(function(){var te=g,de=xl(l),ve=[];e:{var J=t1.get(t);if(J!==void 0){var oe=Gc,_e=t;switch(t){case"keypress":if(Vc(l)===0)break e;case"keydown":case"keyup":oe=G5;break;case"focusin":_e="focus",oe=wf;break;case"focusout":_e="blur",oe=wf;break;case"beforeblur":case"afterblur":oe=wf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=O5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=Z5;break;case Zg:case Jg:case Wg:oe=B5;break;case e1:oe=W5;break;case"scroll":case"scrollend":oe=R5;break;case"wheel":oe=t6;break;case"copy":case"cut":case"paste":oe=P5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Rg;break;case"submit":oe=K5;break;case"toggle":case"beforetoggle":oe=a6}var Le=(n&4)!==0,tt=!Le&&(t==="scroll"||t==="scrollend"),ee=Le?J!==null?J+"Capture":null:J;Le=[];for(var Z=te,re;Z!==null;){var ge=Z;if(re=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||re===null||ee===null||(ge=Zi(Z,ee),ge!=null&&Le.push(tc(Z,ge,re))),tt)break;Z=Z.return}0<Le.length&&(J=new oe(J,_e,null,l,de),ve.push({event:J,listeners:Le}))}}if((n&7)===0){e:{if(oe=t==="mouseover"||t==="pointerover",J=t==="mouseout"||t==="pointerout",oe&&l!==yl&&(_e=l.relatedTarget||l.fromElement)&&(ea(_e)||_e[jn]))break e;(J||oe)&&(_e=de.window===de?de:(oe=de.ownerDocument)?oe.defaultView||oe.parentWindow:window,J?(oe=l.relatedTarget||l.toElement,J=te,oe=oe?ea(oe):null,oe!==null&&(tt=u(oe),Le=oe.tag,oe!==tt||Le!==5&&Le!==27&&Le!==6)&&(oe=null)):(J=null,oe=te),J!==oe&&(Le=_g,ge="onMouseLeave",ee="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(Le=Rg,ge="onPointerLeave",ee="onPointerEnter",Z="pointer"),tt=J==null?_e:ue(J),re=oe==null?_e:ue(oe),_e=new Le(ge,Z+"leave",J,l,de),_e.target=tt,_e.relatedTarget=re,ge=null,ea(de)===te&&(Le=new Le(ee,Z+"enter",oe,l,de),Le.target=re,Le.relatedTarget=tt,ge=Le),tt=ge,Le=J&&oe?A(J,oe,ck):null,J!==null&&T2(ve,_e,J,Le,!1),oe!==null&&tt!==null&&T2(ve,tt,oe,Le,!0)))}e:{if(J=te?ue(te):window,oe=J.nodeName&&J.nodeName.toLowerCase(),oe==="select"||oe==="input"&&J.type==="file")var De=Hg;else if(Ig(J))if(Ug)De=h6;else{De=d6;var ft=u6}else oe=J.nodeName,!oe||oe.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?te&&vl(te.elementType)&&(De=Hg):De=f6;if(De&&(De=De(t,te))){Pg(ve,De,l,de);break e}ft&&ft(t,J,te)}switch(ft=te?ue(te):window,t){case"focusin":(Ig(ft)||ft.contentEditable==="true")&&(yo=ft,Af=te,_s=null);break;case"focusout":_s=Af=yo=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,Kg(ve,l,de);break;case"selectionchange":if(p6)break;case"keydown":case"keyup":Kg(ve,l,de)}var Ue;if(kf)e:{switch(t){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else vo?Lg(t,l)&&(Ye="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Ye="onCompositionStart");Ye&&(Dg&&l.locale!=="ko"&&(vo||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&vo&&(Ue=Tg()):(_r=de,xf="value"in _r?_r.value:_r.textContent,vo=!0)),ft=Xu(te,Ye),0<ft.length&&(Ye=new Mg(Ye,t,null,l,de),ve.push({event:Ye,listeners:ft}),Ue?Ye.data=Ue:(Ue=Bg(l),Ue!==null&&(Ye.data=Ue)))),(Ue=r6?l6(t,l):o6(t,l))&&(Ye=Xu(te,"onBeforeInput"),0<Ye.length&&(ft=new Mg("onBeforeInput","beforeinput",null,l,de),ve.push({event:ft,listeners:Ye}),ft.data=Ue)),rk(ve,t,te,l,de)}N2(ve,n)})}function tc(t,n,l){return{instance:t,listener:n,currentTarget:l}}function Xu(t,n){for(var l=n+"Capture",s=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Zi(t,l),h!=null&&s.unshift(tc(t,h,g)),h=Zi(t,n),h!=null&&s.push(tc(t,h,g))),t.tag===3)return s;t=t.return}return[]}function ck(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function T2(t,n,l,s,h){for(var g=n._reactName,N=[];l!==null&&l!==s;){var L=l,X=L.alternate,te=L.stateNode;if(L=L.tag,X!==null&&X===s)break;L!==5&&L!==26&&L!==27||te===null||(X=te,h?(te=Zi(l,g),te!=null&&N.unshift(tc(l,te,X))):h||(te=Zi(l,g),te!=null&&N.push(tc(l,te,X)))),l=l.return}N.length!==0&&t.push({event:n,listeners:N})}var uk=/\r\n?/g,dk=/\u0000|\uFFFD/g;function A2(t){return(typeof t=="string"?t:""+t).replace(uk,`
49
+ `).replace(dk,"")}function _2(t,n){return n=A2(n),A2(t)===n}function St(t,n,l,s,h,g){switch(l){case"children":if(typeof s=="string")n==="body"||n==="textarea"&&s===""||qn(t,s);else if(typeof s=="number"||typeof s=="bigint")n!=="body"&&qn(t,""+s);else return;break;case"className":ya(t,"class",s);break;case"tabIndex":ya(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ya(t,l,s);break;case"style":ba(t,s,g);return;case"data":if(n!=="object"){ya(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=wn(s),t.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(n!=="input"&&St(t,n,"name",h.name,h,null),St(t,n,"formEncType",h.formEncType,h,null),St(t,n,"formMethod",h.formMethod,h,null),St(t,n,"formTarget",h.formTarget,h,null)):(St(t,n,"encType",h.encType,h,null),St(t,n,"method",h.method,h,null),St(t,n,"target",h.target,h,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=wn(s),t.setAttribute(l,s);break;case"onClick":s!=null&&(t.onclick=Fn);return;case"onScroll":s!=null&&lt("scroll",t);return;case"onScrollEnd":s!=null&&lt("scrollend",t);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(h.children!=null)throw Error(r(60));(g!=null?g.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}l=wn(s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,s):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":s===!0?t.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,s):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(l,s):t.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(l):t.setAttribute(l,s);break;case"popover":lt("beforetoggle",t),lt("toggle",t),Pt(t,"popover",s);break;case"xlinkActuate":Kt(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Kt(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Kt(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Kt(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Kt(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Kt(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Pt(t,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=js.get(l)||l,Pt(t,l,s);else return}Ve=!0}function fm(t,n,l,s,h,g){switch(l){case"style":ba(t,s,g);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(h.children!=null)throw Error(r(60));(g!=null?g.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof s=="string")qn(t,s);else if(typeof s=="number"||typeof s=="bigint")qn(t,""+s);else return;break;case"onScroll":s!=null&&lt("scroll",t);return;case"onScrollEnd":s!=null&&lt("scrollend",t);return;case"onClick":s!=null&&(t.onclick=Fn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Te.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),g=l.slice(2,h?l.length-7:void 0),n=t[sn]||null,n=n!=null?n[l]:null,typeof n=="function"&&t.removeEventListener(g,n,h),typeof s=="function")){typeof n!="function"&&n!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(g,s,h);break e}Ve=!0,l in t?t[l]=s:s===!0?t.setAttribute(l,""):Pt(t,l,s)}return}Ve=!0}function Tn(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",t),lt("load",t);var s=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var N=l[g];if(N!=null)switch(g){case"src":s=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:St(t,n,g,N,l,null)}}h&&St(t,n,"srcSet",l.srcSet,l,null),s&&St(t,n,"src",l.src,l,null);return;case"input":lt("invalid",t);var L=g=N=h=null,X=null,te=null;for(s in l)if(l.hasOwnProperty(s)){var de=l[s];if(de!=null)switch(s){case"name":h=de;break;case"type":N=de;break;case"checked":X=de;break;case"defaultChecked":te=de;break;case"value":g=de;break;case"defaultValue":L=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,n));break;default:St(t,n,s,de,l,null)}}Tr(t,g,L,X,te,N,h,!1);return;case"select":lt("invalid",t),s=N=g=null;for(h in l)if(l.hasOwnProperty(h)&&(L=l[h],L!=null))switch(h){case"value":g=L;break;case"defaultValue":N=L;break;case"multiple":s=L;default:St(t,n,h,L,l,null)}n=g,l=N,t.multiple=!!s,n!=null?ta(t,!!s,n,!1):l!=null&&ta(t,!!s,l,!0);return;case"textarea":lt("invalid",t),g=h=s=null;for(N in l)if(l.hasOwnProperty(N)&&(L=l[N],L!=null))switch(N){case"value":s=L;break;case"defaultValue":h=L;break;case"children":g=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(91));break;default:St(t,n,N,L,l,null)}xa(t,s,h,g);return;case"option":for(X in l)if(l.hasOwnProperty(X)&&(s=l[X],s!=null))switch(X){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:St(t,n,X,s,l,null)}return;case"dialog":lt("beforetoggle",t),lt("toggle",t),lt("cancel",t),lt("close",t);break;case"iframe":case"object":lt("load",t);break;case"video":case"audio":for(s=0;s<ec.length;s++)lt(ec[s],t);break;case"image":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"embed":case"source":case"link":lt("error",t),lt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in l)if(l.hasOwnProperty(te)&&(s=l[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:St(t,n,te,s,l,null)}return;default:if(vl(n)){for(de in l)l.hasOwnProperty(de)&&(s=l[de],s!==void 0&&fm(t,n,de,s,l,void 0));return}}for(L in l)l.hasOwnProperty(L)&&(s=l[L],s!=null&&St(t,n,L,s,l,null))}var fk={};function hk(t,n,l,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,N=null,L=null,X=null,te=null,de=null;for(oe in l){var ve=l[oe];if(l.hasOwnProperty(oe)&&ve!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=ve;default:s.hasOwnProperty(oe)||St(t,n,oe,null,s,ve)}}for(var J in s){var oe=s[J];if(ve=l[J],s.hasOwnProperty(J)&&(oe!=null||ve!=null))switch(J){case"type":oe!==ve&&(Ve=!0),g=oe;break;case"name":oe!==ve&&(Ve=!0),h=oe;break;case"checked":oe!==ve&&(Ve=!0),te=oe;break;case"defaultChecked":oe!==ve&&(Ve=!0),de=oe;break;case"value":oe!==ve&&(Ve=!0),N=oe;break;case"defaultValue":oe!==ve&&(Ve=!0),L=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,n));break;default:oe!==ve&&St(t,n,J,oe,s,ve)}}On(t,N,L,X,te,de,g,h);return;case"select":oe=N=L=J=null;for(g in l)if(X=l[g],l.hasOwnProperty(g)&&X!=null)switch(g){case"value":break;case"multiple":oe=X;default:s.hasOwnProperty(g)||St(t,n,g,null,s,X)}for(h in s)if(g=s[h],X=l[h],s.hasOwnProperty(h)&&(g!=null||X!=null))switch(h){case"value":g!==X&&(Ve=!0),J=g;break;case"defaultValue":g!==X&&(Ve=!0),L=g;break;case"multiple":g!==X&&(Ve=!0),N=g;default:g!==X&&St(t,n,h,g,s,X)}n=L,l=N,s=oe,J!=null?ta(t,!!l,J,!1):!!s!=!!l&&(n!=null?ta(t,!!l,n,!0):ta(t,!!l,l?[]:"",!1));return;case"textarea":oe=J=null;for(L in l)if(h=l[L],l.hasOwnProperty(L)&&h!=null&&!s.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:St(t,n,L,null,s,h)}for(N in s)if(h=s[N],g=l[N],s.hasOwnProperty(N)&&(h!=null||g!=null))switch(N){case"value":h!==g&&(Ve=!0),J=h;break;case"defaultValue":h!==g&&(Ve=!0),oe=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==g&&St(t,n,N,h,s,g)}go(t,J,oe);return;case"option":for(var _e in l)if(J=l[_e],l.hasOwnProperty(_e)&&J!=null&&!s.hasOwnProperty(_e))switch(_e){case"selected":t.selected=!1;break;default:St(t,n,_e,null,s,J)}for(X in s)if(J=s[X],oe=l[X],s.hasOwnProperty(X)&&J!==oe&&(J!=null||oe!=null))switch(X){case"selected":J!==oe&&(Ve=!0),t.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:St(t,n,X,J,s,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in l)J=l[Le],l.hasOwnProperty(Le)&&J!=null&&!s.hasOwnProperty(Le)&&St(t,n,Le,null,s,J);for(te in s)if(J=s[te],oe=l[te],s.hasOwnProperty(te)&&J!==oe&&(J!=null||oe!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:St(t,n,te,J,s,oe)}return;default:if(vl(n)){for(var tt in l)J=l[tt],l.hasOwnProperty(tt)&&J!==void 0&&!s.hasOwnProperty(tt)&&fm(t,n,tt,void 0,s,J);for(de in s)J=s[de],oe=l[de],!s.hasOwnProperty(de)||J===oe||J===void 0&&oe===void 0||fm(t,n,de,J,s,oe);return}}for(var ee in l)J=l[ee],l.hasOwnProperty(ee)&&J!=null&&!s.hasOwnProperty(ee)&&St(t,n,ee,null,s,J);for(ve in s)J=s[ve],oe=l[ve],!s.hasOwnProperty(ve)||J===oe||J==null&&oe==null||St(t,n,ve,J,s,oe)}function M2(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var h=l[s],g=h.transferSize,N=h.initiatorType,L=h.duration;if(g&&L&&M2(N)){for(N=0,L=h.responseEnd,s+=1;s<l.length;s++){var X=l[s],te=X.startTime;if(te>L)break;var de=X.transferSize,ve=X.initiatorType;de&&M2(ve)&&(X=X.responseEnd,N+=de*(X<L?1:(L-te)/(X-te)))}if(--s,n+=8*(g+N)/(h.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var hm=null,mm=null;function nc(t){return t.nodeType===9?t:t.ownerDocument}function R2(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function D2(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function O2(t,n,l,s){return l=nc(l).createElement(t),l[Dt]=s,l[sn]=n,Tn(l,t,n),I(l),l}function pm(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var gm=null;function pk(){var t=window.event;return t&&t.type==="popstate"?t===gm?!1:(gm=t,!0):(gm=null,!1)}var vm=typeof setTimeout=="function"?setTimeout:void 0,gk=typeof clearTimeout=="function"?clearTimeout:void 0,z2=typeof Promise=="function"?Promise:void 0,L2=typeof requestAnimationFrame=="function"?requestAnimationFrame:vm,vk=typeof queueMicrotask=="function"?queueMicrotask:typeof z2<"u"?function(t){return z2.resolve(null).then(t).catch(yk)}:vm;function yk(t){setTimeout(function(){throw t})}function Qr(t){return t==="head"}function B2(t,n){var l=n,s=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(s===0){t.removeChild(h),Zo(n);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Cm(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Cm(l);for(var g=l.firstChild;g;){var N=g.nextSibling,L=g.nodeName;g[Yi]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=N}}else l==="body"&&Cm(t.ownerDocument.body);l=h}while(l);Zo(n)}function I2(t,n){var l=t;t=0;do{var s=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=s}while(l)}function P2(t,n,l){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,t.style.viewTransitionName=n,l!=null&&(t.style.viewTransitionClass=l),l=getComputedStyle(t),l.display==="inline"){if(n=t.getClientRects(),n.length===1)var s=1;else for(var h=s=0;h<n.length;h++){var g=n[h];0<g.width&&0<g.height&&s++}s===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function H2(t,n){t=t.style,n=n.style;var l=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;t.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,t.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),t.display==="inline-block"&&(n==null?t.display=t.margin="":(l=n.display,t.display=l==null||typeof l=="boolean"?"":l,l=n.margin,l!=null?t.margin=l:(l=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],t.marginTop=l==null||typeof l=="boolean"?"":l,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],t.marginBottom=n==null||typeof n=="boolean"?"":n)))}function xk(t,n,l){return l=l.ownerDocument.defaultView,{rect:t,abs:n.position==="absolute"||n.position==="fixed",clip:n.clipPath!=="none"||n.overflow!=="visible"||n.filter!=="none"||n.mask!=="none"||n.mask!=="none"||n.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=l.innerHeight&&t.left<=l.innerWidth}}function ym(t){var n=t.getBoundingClientRect(),l=getComputedStyle(t);return xk(n,l,t)}function bk(t){return t.documentElement.clientHeight}function jk(t){this.addEventListener("load",t),this.addEventListener("error",t)}function wk(t,n,l,s,h,g,N,L,X){var te=n.nodeType===9?n:n.ownerDocument;try{var de=te.startViewTransition({update:function(){var J=te.defaultView,oe=J.navigation&&J.navigation.transition,_e=te.fonts.status;s();var Le=[];if(_e==="loaded"&&(bk(te),te.fonts.status==="loading"&&Le.push(te.fonts.ready)),_e=Le.length,t!==null)for(var tt=t.suspenseyImages,ee=0,Z=0;Z<tt.length;Z++){var re=tt[Z];if(!re.complete){var ge=re.getBoundingClientRect();if(0<ge.bottom&&0<ge.right&&ge.top<J.innerHeight&&ge.left<J.innerWidth){if(ee+=oy(re),ee>Zu){Le.length=_e;break}re=new Promise(jk.bind(re)),Le.push(re)}}}if(0<Le.length)return J=Promise.race([Promise.all(Le),new Promise(function(De){return setTimeout(De,500)})]).then(h,h),(oe?Promise.allSettled([oe.finished,J]):J).then(g,g);if(h(),oe)return oe.finished.then(g,g);g()},types:l});te.__reactViewTransition=de;var ve=[];return de.ready.then(function(){for(var J=te.documentElement.getAnimations({subtree:!0}),oe=0;oe<J.length;oe++){var _e=J[oe],Le=_e.effect,tt=Le.pseudoElement;if(tt!=null&&tt.startsWith("::view-transition")){ve.push(_e),_e=Le.getKeyframes();for(var ee=tt=void 0,Z=!0,re=0;re<_e.length;re++){var ge=_e[re],De=ge.width;if(tt===void 0)tt=De;else if(tt!==De){Z=!1;break}if(De=ge.height,ee===void 0)ee=De;else if(ee!==De){Z=!1;break}delete ge.width,delete ge.height,ge.transform==="none"&&delete ge.transform}Z&&tt!==void 0&&ee!==void 0&&(Le.setKeyframes(_e),Z=getComputedStyle(Le.target,Le.pseudoElement),Z.width!==tt||Z.height!==ee)&&(Z=_e[0],Z.width=tt,Z.height=ee,Z=_e[_e.length-1],Z.width=tt,Z.height=ee,Le.setKeyframes(_e))}}N()},function(J){te.__reactViewTransition===de&&(te.__reactViewTransition=null);try{if(typeof J=="object"&&J!==null)switch(J.name){case"InvalidStateError":(J.message==="View transition was skipped because document visibility state is hidden."||J.message==="Skipping view transition because document visibility state has become hidden."||J.message==="Skipping view transition because viewport size changed."||J.message==="Transition was aborted because of invalid state")&&(J=null)}J!==null&&X(J)}finally{s(),h(),N()}}),de.finished.finally(function(){for(var J=0;J<ve.length;J++)ve[J].cancel();te.__reactViewTransition===de&&(te.__reactViewTransition=null),L()}),de}catch{return s(),h(),N(),null}}function Ul(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}Ul.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:P({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},Ul.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,l=t.getAnimations({subtree:!0}),s=[],h=0;h<l.length;h++){var g=l[h].effect;g!==null&&g.target===t&&g.pseudoElement===n&&s.push(l[h])}return s},Ul.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function U2(t){return{name:t,group:new Ul("group",t),imagePair:new Ul("image-pair",t),old:new Ul("old",t),new:new Ul("new",t)}}function Ta(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ta.prototype.addEventListener=function(t,n,l){var s=null,h=null;if(!(l!=null&&typeof l!="boolean"&&(s=l.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var g=this._eventListeners;if(F2(g,t,n,l)===-1){var N=this,L=n;l!=null&&typeof l!="boolean"&&l.once===!0&&(L=function(X){N.removeEventListener(t,n,l),typeof n=="function"?n.call(this,X):n.handleEvent(X)}),s!==null&&(h=N.removeEventListener.bind(N,t,n,l),s.addEventListener("abort",h,{once:!0}),h=s.removeEventListener.bind(s,"abort",h)),s=$o(l),g.push({type:t,listener:n,optionsOrUseCapture:l,attachedListener:L,cleanup:h}),p(this._fragmentFiber.child,!1,Sk,t,L,s)}this._eventListeners=g}};function Sk(t,n,l,s){return C(t).addEventListener(n,l,s),!1}Ta.prototype.removeEventListener=function(t,n,l){var s=this._eventListeners;if(s!==null&&(n=F2(s,t,n,l),n!==-1)){var h=s[n];l=h.attachedListener;var g=h.cleanup;h=$o(h.optionsOrUseCapture),p(this._fragmentFiber.child,!1,kk,t,l,h),s.splice(n,1),g!==null&&g()}};function kk(t,n,l,s){return C(t).removeEventListener(n,l,s),!1}function $o(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function q2(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function F2(t,n,l,s){if(t.length===0)return-1;s=q2(s);for(var h=0;h<t.length;h++){var g=t[h];if(g.type===n&&g.listener===l&&q2(g.optionsOrUseCapture)===s)return h}return-1}Ta.prototype.dispatchEvent=function(t){var n=b(this._fragmentFiber);if(n===null)return!0;n=C(n);var l=this._eventListeners;if(l!==null&&0<l.length||!t.bubbles){var s=n.nodeType===9?n.createComment(""):document.createTextNode("");if(l)for(var h=0;h<l.length;h++){var g=l[h];s.addEventListener(g.type,g.attachedListener,$o(g.optionsOrUseCapture))}if(n.appendChild(s),t=s.dispatchEvent(t),l)for(h=0;h<l.length;h++)g=l[h],s.removeEventListener(g.type,g.attachedListener,$o(g.optionsOrUseCapture));return n.removeChild(s),t}return n.dispatchEvent(t)},Ta.prototype.focus=function(t){p(this._fragmentFiber.child,!0,V2,t,void 0,void 0)};function V2(t,n){return t.tag===6?!1:(t=C(t),Lk(t,n))}Ta.prototype.focusLast=function(t){var n=[];p(this._fragmentFiber.child,!0,xm,n,void 0,void 0);for(var l=n.length-1;0<=l&&!V2(n[l],t);l--);};function xm(t,n){return n.push(t),!1}Ta.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=C(t),t=nc(t).activeElement,t!==null&&p(this._fragmentFiber.child,!1,Ck,t,void 0,void 0))};function Ck(t,n){return t.tag===6?!1:(t=C(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Ta.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),p(this._fragmentFiber.child,!1,Nk,t,void 0,void 0)};function Nk(t,n){return t.tag===6||(t=C(t),n.observe(t)),!1}Ta.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),p(this._fragmentFiber.child,!1,Ek,t,void 0,void 0);for(var l=n=0;l<ii.length;l++){var s=ii[l];s.fragmentInstance===this&&s.observer===t?t.unobserve(s.instance):ii[n++]=s}ii.length=n}};function Ek(t,n){return t.tag===6||(t=C(t),n.unobserve(t)),!1}var ii=[],bm=!1;function Tk(t,n,l){ii.push({fragmentInstance:t,observer:n,instance:l}),bm||(bm=!0,Bk(function(){bm=!1;var s=ii;ii=[];for(var h=0;h<s.length;h++){var g=s[h];g.observer.unobserve(g.instance)}}))}Ta.prototype.getClientRects=function(){var t=[];return p(this._fragmentFiber.child,!1,Ak,t,void 0,void 0),t};function Ak(t,n){if(t.tag===6){t=t.stateNode;var l=t.ownerDocument.createRange();l.selectNodeContents(t),n.push.apply(n,l.getClientRects())}else t=C(t),n.push.apply(n,t.getClientRects());return!1}Ta.prototype.getRootNode=function(t){var n=b(this._fragmentFiber);return n===null?this:C(n).getRootNode(t)},Ta.prototype.compareDocumentPosition=function(t){var n=b(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];p(this._fragmentFiber.child,!1,xm,l,void 0,void 0);var s=C(n);if(l.length===0){if(l=s,j(this._fragmentFiber)){e:{for(n=this._fragmentFiber.return;n!==null;){if(n.tag===4){n=n.stateNode.containerInfo;break e}if(n.tag===3||n.tag===5||n.tag===27)break;n=n.return}n=null}n!=null&&(l=n)}n=this._fragmentFiber;var h=s=l.compareDocumentPosition(t);return l===t?h=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=S(n)[1],l===null?h=Node.DOCUMENT_POSITION_PRECEDING:(t=C(l).compareDocumentPosition(t),h=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),h|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}n=C(l[0]),h=C(l[l.length-1]);var g=j(this._fragmentFiber)?n.parentElement:s;if(g==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=g.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,g=g.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),L=h.compareDocumentPosition(t),X=N&Node.DOCUMENT_POSITION_CONTAINED_BY||L&Node.DOCUMENT_POSITION_CONTAINED_BY;return L=s&&g&&N&Node.DOCUMENT_POSITION_FOLLOWING&&L&Node.DOCUMENT_POSITION_PRECEDING,n=s&&n===t||g&&h===t||X||L?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&n===t||!g&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||_k(n,this._fragmentFiber,l[0],l[l.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _k(t,n,l,s,h){var g=ea(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!g)e:{for(;g!==null;){if(g.tag===7&&(g===n||g.alternate===n)){l=!0;break e}g=g.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(g===null)return g=h.ownerDocument,h===g||h===g.documentElement||h===g.body;e:{for(g=n,n=b(n);g!==null;){if(!(g.tag!==5&&g.tag!==3&&g.tag!==27||g!==n&&g.alternate!==n)){g=!0;break e}g=g.return}g=!1}return g}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!g)&&!(n=g===l)&&(n=A(l,g,z),n===null?n=!1:(p(n,!0,T,g,l),g=E,E=null,n=g!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!g)&&!(n=g===s)&&(n=A(s,g,z),n===null?n=!1:(p(n,!0,_,g,s),g=E,M=E=null,n=g!==null)),n):!1}function $2(t,n){var l=t.ownerDocument.createRange();l.selectNodeContents(t),t=l.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,n?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ta.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(r(566));var n=[];p(this._fragmentFiber.child,!1,xm,n,void 0,void 0);var l=t!==!1;if(n.length===0){var s=S(this._fragmentFiber);if(s=l?s[1]||s[0]||b(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){t=C(s),$2(t,l);return}if(s=C(s),s.nodeType!==9){if(s.nodeType===11){l="host"in s?s.host:null,l!==null&&l.scrollIntoView(t);return}s.scrollIntoView(t)}}for(s=l?n.length-1:0;s!==(l?-1:n.length);){var h=n[s];h.tag===6?(h=C(h),$2(h,l)):C(h).scrollIntoView(t),s+=l?-1:1}};function Mk(t,n){return t=C(t),G2(t,n),!1}function G2(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function Y2(t,n){var l=n._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var h=l[s];t.addEventListener(h.type,h.attachedListener,$o(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(g){for(var N=0,L=0;L<ii.length;L++){var X=ii[L];(X.fragmentInstance!==n||X.observer!==g||X.instance!==t)&&(ii[N++]=X)}ii.length=N,g.observe(t)}),G2(t,n))}function Rk(t,n){var l=n._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var h=l[s];t.removeEventListener(h.type,h.attachedListener,$o(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(g){typeof g.rootMargin=="string"?Tk(n,g,t):g.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function jm(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":jm(l),Ki(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Dk(t,n,l,s){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Yi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Ha(t.nextSibling),t===null)break}return null}function Ok(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ha(t.nextSibling),t===null))return null;return t}function X2(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ha(t.nextSibling),t===null))return null;return t}function wm(t){return t.data==="$?"||t.data==="$~"}function Sm(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function zk(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var s=function(){n(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ha(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var km=null;function K2(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Ha(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function Q2(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return t;n--}else l!=="/$"&&l!=="/&"||n++}t=t.previousSibling}return null}function Lk(t,n){function l(){s=!0}if(t.ownerDocument.activeElement===t)return!0;var s=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return s}function Bk(t){L2(function(){L2(function(n){return t(n)})})}function Z2(t,n,l){switch(n=nc(l),t){case"html":if(t=n.documentElement,!t)throw Error(r(452));return t;case"head":if(t=n.head,!t)throw Error(r(453));return t;case"body":if(t=n.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function J2(t,n,l){for(var s in l){var h=l[s];l.hasOwnProperty(s)&&h!=null&&St(t,n,s,null,fk,h)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Fn&&(t.onclick=null),Ki(t)}function Cm(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ki(t)}var Ua=new Map,W2=new Set;function ac(t){if(typeof t.getRootNode=="function"){var n=t.getRootNode();if(n.nodeType===9||n.nodeType===11)return n}return t.nodeType===9?t:t.ownerDocument}var cr=W.d;W.d={f:Ik,r:Pk,D:Hk,C:Uk,L:qk,m:Fk,X:$k,S:Vk,M:Gk};function Ik(){var t=cr.f(),n=qu();return t||n}function Pk(t){var n=gi(t);n!==null&&n.tag===5&&n.type==="form"?tv(n):cr.r(t)}var Go=typeof document>"u"?null:document;function ey(t,n,l){var s=Go;if(s&&typeof n=="string"&&n){var h=Ot(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),W2.has(h)||(W2.add(h),t={rel:t,crossOrigin:l,href:n},s.querySelector(h)===null&&(n=s.createElement("link"),Tn(n,"link",t),I(n),s.head.appendChild(n)))}}function Hk(t){cr.D(t),ey("dns-prefetch",t,null)}function Uk(t,n){cr.C(t,n),ey("preconnect",t,n)}function qk(t,n,l){cr.L(t,n,l);var s=Go;if(s&&t&&n){var h='link[rel="preload"][as="'+Ot(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Ot(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Ot(l.imageSizes)+'"]')):h+='[href="'+Ot(t)+'"]';var g=h;switch(n){case"style":g=Yo(t);break;case"script":g=Xo(t)}if(!(Ua.has(g)||(t=P({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),Ua.set(g,t),s.querySelector(h)!==null||n==="style"&&s.querySelector(ic(g))||n==="script"&&s.querySelector(rc(g))))){var N=s.createElement("link");Tn(N,"link",t),n==="style"&&(N[Xi]=!0,N.onload=N.onerror=function(){ae(N)}),I(N),s.head.appendChild(N)}}}function Fk(t,n){cr.m(t,n);var l=Go;if(l&&t){var s=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(t)+'"]',g=h;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Xo(t)}if(!Ua.has(g)&&(t=P({rel:"modulepreload",href:t},n),Ua.set(g,t),l.querySelector(h)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(rc(g)))return}s=l.createElement("link"),Tn(s,"link",t),I(s),l.head.appendChild(s)}}}function Vk(t,n,l){cr.S(t,n,l);var s=Go;if(s&&t){var h=be(s).hoistableStyles,g=Yo(t);n=n||"default";var N=h.get(g);if(!N){var L={loading:0,preload:null};if(N=s.querySelector(ic(g)))L.loading=5;else{t=P({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ua.get(g))&&Nm(t,l);var X=N=s.createElement("link");I(X),Tn(X,"link",t),X._p=new Promise(function(te,de){X.onload=te,X.onerror=de}),X.addEventListener("load",function(){L.loading|=1}),X.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Ku(N,n,s)}N={type:"stylesheet",instance:N,count:1,state:L},h.set(g,N)}}}function $k(t,n){cr.X(t,n);var l=Go;if(l&&t){var s=be(l).hoistableScripts,h=Xo(t),g=s.get(h);g||(g=l.querySelector(rc(h)),g||(t=P({src:t,async:!0},n),(n=Ua.get(h))&&Em(t,n),g=l.createElement("script"),I(g),Tn(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function Gk(t,n){cr.M(t,n);var l=Go;if(l&&t){var s=be(l).hoistableScripts,h=Xo(t),g=s.get(h);g||(g=l.querySelector(rc(h)),g||(t=P({src:t,async:!0,type:"module"},n),(n=Ua.get(h))&&Em(t,n),g=l.createElement("script"),I(g),Tn(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function ty(t,n,l,s){var h=(h=xn.current)?ac(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Yo(l.href),n=be(h).hoistableStyles,s=n.get(l),s||(s={type:"style",instance:null,count:0,state:null},n.set(l,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Yo(l.href);var g=be(h).hoistableStyles,N=g.get(t);if(N||(h=h.ownerDocument||h,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,N),(g=h.querySelector(ic(t)))?g._p||(N.instance=g,N.state.loading=5):(g=Ua.get(t),g||(g={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ua.set(t,g)),Yk(h,t,g,N.state))),n&&s===null)throw Error(r(528,""));return N}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(l=Xo(l),n=be(h).hoistableScripts,s=n.get(l),s||(s={type:"script",instance:null,count:0,state:null},n.set(l,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Yo(t){return'href="'+Ot(t)+'"'}function ic(t){return'link[rel="stylesheet"]['+t+"]"}function ny(t){return P({},t,{"data-precedence":t.precedence,precedence:null})}function Yk(t,n,l,s){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Xi]!==!0){s.loading=1;return}}else n=t.createElement("link"),n[Xi]=!0,n.onload=n.onerror=ae.bind(null,n),Tn(n,"link",l),I(n),t.head.appendChild(n);s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2})}function Xo(t){return'[src="'+Ot(t)+'"]'}function rc(t){return"script[async]"+t}function ay(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+Ot(l.href)+'"]');if(s)return n.instance=s,I(s),s;var h=P({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),I(s),Tn(s,"style",h),Ku(s,l.precedence,t),n.instance=s;case"stylesheet":h=Yo(l.href);var g=t.querySelector(ic(h));if(g)return n.state.loading|=4,n.instance=g,I(g),g;s=ny(l),(h=Ua.get(h))&&Nm(s,h),g=(t.ownerDocument||t).createElement("link"),I(g);var N=g;return N._p=new Promise(function(L,X){N.onload=L,N.onerror=X}),Tn(g,"link",s),n.state.loading|=4,Ku(g,l.precedence,t),n.instance=g;case"script":return g=Xo(l.src),(h=t.querySelector(rc(g)))?(n.instance=h,I(h),h):(s=l,(h=Ua.get(g))&&(s=P({},l),Em(s,h)),t=t.ownerDocument||t,h=t.createElement("script"),I(h),Tn(h,"link",s),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,Ku(s,l.precedence,t));return n.instance}function Ku(t,n,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=s.length?s[s.length-1]:null,g=h,N=0;N<s.length;N++){var L=s[N];if(L.dataset.precedence===n)g=L;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function Nm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Em(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var Qu=null;function iy(t,n,l){if(Qu===null){var s=new Map,h=Qu=new Map;h.set(l,s)}else h=Qu,s=h.get(l),s||(s=new Map,h.set(l,s));if(s.has(t))return s;for(s.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[Yi]||g[Dt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var N=g.getAttribute(n)||"";N=t+N;var L=s.get(N);L?L.push(g):s.set(N,[g])}}return s}function Tm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Xk(t,n,l){if(l===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function ry(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function ly(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function oy(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function sy(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=oy(n),t.suspenseyImages.push(n)),t=Zk.bind(t),n.decode().then(t,t))}function Kk(t,n,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Yo(s.href),g=n.querySelector(ic(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=lc.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,I(g);return}g=n.ownerDocument||n,s=ny(s),(h=Ua.get(h))&&Nm(s,h),g=g.createElement("link"),I(g);var N=g;N._p=new Promise(function(L,X){N.onload=L,N.onerror=X}),Tn(g,"link",s),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=lc.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var Zu=0;function Qk(t,n){return t.stylesheets&&t.count===0&&Wu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var s=setTimeout(function(){if(t.stylesheets&&Wu(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Zu===0&&(Zu=62500*mk());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Wu(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Zu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(h)}}:null}function cy(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Wu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function lc(){this.count--,cy(this)}function Zk(){this.imgCount--,cy(this)}var Ju=null;function Wu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ju=new Map,n.forEach(Jk,t),Ju=null,lc.call(t))}function Jk(t,n){if(!(n.state.loading&4)){var l=Ju.get(t);if(l)var s=l.get(null);else{l=new Map,Ju.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var N=h[g];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),s=N)}s&&l.set(null,s)}h=n.instance,N=h.getAttribute("data-precedence"),g=l.get(N)||s,g===s&&l.set(null,h),l.set(N,h),this.count++,s=lc.bind(this),h.addEventListener("load",s),h.addEventListener("error",s),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Ko={$$typeof:Y,Provider:null,Consumer:null,_currentValue:je,_currentValue2:je,_threadCount:0};function Wk(t,n,l,s,h,g,N,L,X){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cr(0),this.hiddenUpdates=Cr(null),this.identifierPrefix=s,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function uy(t,n,l,s,h,g,N,L,X,te,de,ve){return t=new Wk(t,n,l,N,X,te,de,ve,L),n=1,g===!0&&(n|=24),g=na(3,null,null,n),t.current=g,g.stateNode=t,n=Ff(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:s,isDehydrated:l,cache:n},Yf(g),t}function dy(t){return t?(t=jo,t):jo}function fy(t,n,l,s,h,g){h=dy(h),s.context===null?s.context=h:s.pendingContext=h,s=Ir(n),s.payload={element:l},g=g===void 0?null:g,g!==null&&(s.callback=g),l=Pr(t,s,n),l!==null&&(la(l,t,n),Bs(l,t,n))}function hy(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function Am(t,n){hy(t,n),(t=t.alternate)&&hy(t,n)}function my(t){if(t.tag===13||t.tag===31){var n=kl(t,67108864);n!==null&&la(n,t,67108864),Am(t,67108864)}}function py(t){if(t.tag===13||t.tag===31){var n=Ea();n=on(n);var l=kl(t,n);l!==null&&la(l,t,n),Am(t,n)}}var Qo=!0;function e8(t,n,l,s){var h=pe.T;pe.T=null;var g=W.p;try{W.p=2,_m(t,n,l,s)}finally{W.p=g,pe.T=h}}function t8(t,n,l,s){var h=pe.T;pe.T=null;var g=W.p;try{W.p=8,_m(t,n,l,s)}finally{W.p=g,pe.T=h}}function _m(t,n,l,s){if(Qo){var h=Mm(s);if(h===null)dm(t,n,s,ed,l),vy(t,s);else if(a8(h,t,n,l,s))s.stopPropagation();else if(vy(t,s),n&4&&-1<n8.indexOf(t)){for(;h!==null;){var g=gi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var N=Qa(g.pendingLanes);if(N!==0){var L=g;for(L.pendingLanes|=2,L.entangledLanes|=2;N;){var X=1<<31-$t(N);L.entanglements[1]|=X,N&=~X}Ni(g),(yt&6)===0&&(Pu=Yt()+500,Ws(0))}}break;case 31:case 13:L=kl(g,2),L!==null&&la(L,g,2),qu(),Am(g,2)}if(g=Mm(s),g===null&&dm(t,n,s,ed,l),g===h)break;h=g}h!==null&&s.stopPropagation()}else dm(t,n,s,null,l)}}function Mm(t){return t=xl(t),Rm(t)}var ed=null;function Rm(t){if(ed=null,t=ea(t),t!==null){var n=u(t);if(n===null)t=null;else{var l=n.tag;if(l===13){if(t=d(n),t!==null)return t;t=null}else if(l===31){if(t=f(n),t!==null)return t;t=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return ed=t,null}function gy(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ml()){case ui:return 2;case di:return 8;case bn:case ha:return 32;case pl:return 268435456;default:return 32}default:return 32}}var Dm=!1,Zr=null,Jr=null,Wr=null,oc=new Map,sc=new Map,el=[],n8="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function vy(t,n){switch(t){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":oc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":sc.delete(n.pointerId)}}function cc(t,n,l,s,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:l,eventSystemFlags:s,nativeEvent:g,targetContainers:[h]},n!==null&&(n=gi(n),n!==null&&my(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function a8(t,n,l,s,h){switch(n){case"focusin":return Zr=cc(Zr,t,n,l,s,h),!0;case"dragenter":return Jr=cc(Jr,t,n,l,s,h),!0;case"mouseover":return Wr=cc(Wr,t,n,l,s,h),!0;case"pointerover":var g=h.pointerId;return oc.set(g,cc(oc.get(g)||null,t,n,l,s,h)),!0;case"gotpointercapture":return g=h.pointerId,sc.set(g,cc(sc.get(g)||null,t,n,l,s,h)),!0}return!1}function yy(t){var n=ea(t.target);if(n!==null){var l=u(n);if(l!==null){if(n=l.tag,n===13){if(n=d(l),n!==null){t.blockedOn=n,$i(t.priority,function(){py(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,$i(t.priority,function(){py(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function td(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=Mm(t.nativeEvent);if(l===null){l=t.nativeEvent;var s=new l.constructor(l.type,l);yl=s,l.target.dispatchEvent(s),yl=null}else return n=gi(l),n!==null&&my(n),t.blockedOn=l,!1;n.shift()}return!0}function xy(t,n,l){td(t)&&l.delete(n)}function i8(){Dm=!1,Zr!==null&&td(Zr)&&(Zr=null),Jr!==null&&td(Jr)&&(Jr=null),Wr!==null&&td(Wr)&&(Wr=null),oc.forEach(xy),sc.forEach(xy)}function nd(t,n){t.blockedOn===n&&(t.blockedOn=null,Dm||(Dm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,i8)))}var ad=null;function by(t){ad!==t&&(ad=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ad===t&&(ad=null);for(var n=0;n<t.length;n+=3){var l=t[n],s=t[n+1],h=t[n+2];if(typeof s!="function"){if(Rm(s||l)===null)continue;break}var g=gi(l);g!==null&&(t.splice(n,3),n-=3,mh(g,{pending:!0,data:h,method:l.method,action:s},s,h))}}))}function Zo(t){function n(X){return nd(X,t)}Zr!==null&&nd(Zr,t),Jr!==null&&nd(Jr,t),Wr!==null&&nd(Wr,t),oc.forEach(n),sc.forEach(n);for(var l=0;l<el.length;l++){var s=el[l];s.blockedOn===t&&(s.blockedOn=null)}for(;0<el.length&&(l=el[0],l.blockedOn===null);)yy(l),l.blockedOn===null&&el.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var h=l[s],g=l[s+1],N=h[sn]||null;if(typeof g=="function")N||by(l);else if(N){var L=null;if(g&&g.hasAttribute("formAction")){if(h=g,N=g[sn]||null)L=N.formAction;else if(Rm(h)!==null)continue}else L=N.action;typeof L=="function"?l[s+1]=L:(l.splice(s,3),s-=3),by(l)}}}function jy(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(N){return h=N})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function Om(t){this._internalRoot=t}id.prototype.render=Om.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,s=Ea();fy(l,s,t,n,null,null)},id.prototype.unmount=Om.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;fy(t.current,2,null,t,null,null),qu(),n[jn]=null}};function id(t){this._internalRoot=t}id.prototype.unstable_scheduleHydration=function(t){if(t){var n=Wn();t={blockedOn:null,target:t,priority:n};for(var l=0;l<el.length&&n!==0&&n<el[l].priority;l++);el.splice(l,0,t),l===0&&yy(t)}};var wy=a.version;if(wy!=="19.3.0")throw Error(r(527,wy,"19.3.0"));W.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=v(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var r8={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:pe,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{Ya=rd.inject(r8),fn=rd}catch{}}return fc.createRoot=function(t,n){if(!c(t))throw Error(r(299));var l=!1,s="",h=dv,g=fv,N=hv;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=uy(t,1,!1,null,null,l,s,null,h,g,N,jy),t[jn]=n.current,um(t),new Om(n)},fc.hydrateRoot=function(t,n,l){if(!c(t))throw Error(r(299));var s=!1,h="",g=dv,N=fv,L=hv,X=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),n=uy(t,1,!0,n,l??null,s,h,X,g,N,L,jy),n.context=dy(null),l=n.current,s=Ea(),s=on(s),h=Ir(s),h.callback=null,Pr(l,h,s),l=s,n.current.lanes=l,Za(n,l),Ni(n),t[jn]=n.current,um(t),new id(n)},fc.version="19.3.0",fc}var zy;function y8(){if(zy)return Im.exports;zy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Im.exports=v8(),Im.exports}var x8=y8();const b8={"locale.name":"English","locale.short":"EN","common.close":"Close","common.continue":"Continue","common.failed":"Something went wrong. Please try again.","common.listSeparator":", ","login.subtitle":"Sign in to continue","login.form":"Sign in","login.username":"Username","login.password":"Password","login.showPassword":"Show password","login.hidePassword":"Hide password","login.submit":"Sign in","login.submitting":"Signing in…","login.wrong":"Wrong username or password.","login.tooMany":"Too many attempts. Please try again later.","login.offline":"Can't connect to Jarvy. Check your network and try again.","login.themeLight":"Switch to the light theme","login.themeDark":"Switch to the dark theme","general.language":"Language","general.theme":"Theme","general.light":"Light","general.dark":"Dark","about.tagline":"A group chat where you and your AI Bots work side by side, running entirely on your own machine.","about.version":"Version {version}","about.source":"Source","about.package":"npm package","about.license":"License","about.notices":"Third-party notices","status.signedIn":"Signed in","status.signedOut":"Signed out","status.configured":"Ready","status.notConfigured":"Not set up","account.menu":"Account menu","account.menuFor":"Account menu for {name}","account.toggleTheme":"Switch theme","account.signOut":"Sign out","entry.menu":"Chat actions","entry.pin":"Pin","entry.unpin":"Unpin","entry.mute":"Mute","entry.unmute":"Unmute","entry.botInfo":"Bot info","entry.channelInfo":"Channel info","entry.deleteBot":"Delete Bot","entry.deleteChannel":"Delete channel","hint.reaction":"{actor} reacted {emoji} to your message","hint.reactionInThread":"{actor} reacted {emoji} to your message in “{title}”","hint.threadSummary":"{actor} updated the summary of “{title}”","hint.summary":"{actor} updated the thread summary","hint.notice":"{actor} updated the notice","app.connecting":"Connecting to Jarvy…","app.channelDeleted":"Channel deleted","app.botDeleted":"{name} deleted","app.notInChannel":{one:"{names} isn't in this channel, so wasn't notified",other:"{names} aren't in this channel, so weren't notified"},"app.memberAdded":"{name} joined #{channel}","app.sourceGone":"The original message no longer exists","ui.closeNamed":"Close {name}","ui.copied":"Copied","ui.copyFailed":"Couldn't copy","ui.copyCode":"Copy code","ui.image":"[Image: {alt}]","ui.imageHidden":"external image hidden","app.deleteChannelTitle":"Delete channel #{name}","app.deleteChannelBody":"Its messages, threads and attachments will be deleted. This can't be undone.","app.resizePane":"Drag to resize the side panel","common.cancel":"Cancel","common.save":"Save","common.create":"Create","common.delete":"Delete","common.retry":"Retry","common.back":"Back","common.add":"Add","common.saveFailed":"Couldn't save","common.openNav":"Open the chat list","common.you":"You","common.member":"Member","common.noMatch":"No matching members","common.searchMembers":"Search members","common.attachment":"[Attachment]","actions.reply":"Reply to this message","actions.react":"Add a reaction","actions.pickEmoji":"Pick an emoji","actions.more":"More","actions.fold":"Fold to one line","actions.unfold":"Unfold","fold.folded":"Folded","fold.more":"Show all","fold.less":"Show less","dialogs.candidates":"Members you can add","dialogs.allInside":"Everyone is already in this channel","dialogs.addCount":"Add ({count})","dialogs.addFailed":"Couldn't add members","dialogs.optional":"Optional","dialogs.deleteSection":"Delete the group “{name}”? Its channels move under Channels.","dialogs.deleteFailed":"Couldn't delete. Please try again.","dialogs.editSection":"Edit channel group","dialogs.sectionName":"Group name","dialogs.newSection":"New group","api.offline":"Can't connect to Jarvy. Check your network and try again.","api.historyFailed":"Couldn't load the messages. Please try again.","error.autoconfigModel":"Enter the model ID.","error.autoconfigSource":"The selected setup source isn't valid. Choose another one.","error.botMissing":"Can't find this Bot. It may have been deleted.","error.agentUndeletable":"The agent Bot can't be deleted. You can rename or stop it.","error.chatAccessChanged":"Your access to this chat has changed. Refresh and try again.","error.computerFailed":"The sandbox couldn't start.","error.computerMissing":"This Bot has no sandbox.","error.dockerUnavailable":"Docker isn't available on the computer running Jarvy.","error.connectionMissing":"Can't find this model connection. It may have been deleted.","error.credentialChanged":"The credential changed. Please try again.","error.credentialScope":"The credential belongs to another connection.","error.credentialsMissing":"Set up this connection's credential first.","error.dataLocked":"Jarvy is already running, or another program is using its data directory.","error.discoveryFormat":"This address didn't return a model list for the selected protocol. Check the API URL and protocol.","error.discoveryHttp":"Couldn't fetch the models: HTTP {status}.","error.discoveryKey":"Enter the API key.","error.discoveryProtocol":"The selected protocol can't list models. Add models manually.","error.discoveryUrl":"The API URL isn't valid.","error.discoveryUrlMissing":"Enter the API URL.","error.historyMissing":"Can't find this History record.","error.invalidCredential":"The credential format isn't valid.","error.invalidRun":"The Bot's state just changed. Refresh and try again.","error.loginInput":"Enter the authorization code or the redirect URL.","error.loginOption":"Pick a sign-in method.","error.loginStep":"The sign-in step has changed. Please start again.","error.loginFailed":"Sign-in failed. Refresh and try again.","error.messageMissing":"Can't find this message. It may have been deleted.","error.modelIncomplete":"Fill in the model's context window and max output.","error.modelMissing":"Can't find this model. It may have been removed.","error.modelRequestFailed":"Model request failed: {detail}","error.modelRequired":"Pick a model for the Bot first.","error.modelSwitchUncertain":"The model switch didn't finish. Pick the model again.","error.nameTaken":"Another member already has this name.","error.providerNameTaken":"A provider with this name already exists.","error.connectionInUse":"In use by {bots}. Switch to another model before deleting this provider.","error.questionClosed":"This question is already settled.","error.questionExpired":"This question was ignored. The Bot is no longer waiting for an answer.","error.runtimeFailed":"The Bot's run failed. Check its model settings and try again.","error.sessionCorrupt":"The Bot couldn't start (the session file can't be read).","error.sessionMismatch":"The Bot couldn't start (the session file doesn't match).","error.sessionMissing":"The Bot couldn't start (the session file is missing).","error.sessionPath":"The Bot couldn't start (the session file path isn't valid).","error.stopping":"Jarvy is shutting down. Try again later.","error.thinkingFormat":"This thinking format isn't supported.","error.toolsMissing":"Couldn't load the Bot's tools. Restart the Bot and try again.","error.unsafeReplay":"The Bot may have already taken actions before it was interrupted, so it won't retry automatically to avoid doing them twice.","error.discoveryUnreachable":"Couldn't reach {host}. Check the API URL.","color.gray":"Gray","color.blue":"Blue","color.green":"Green","color.amber":"Amber","color.rose":"Pink","color.violet":"Purple","avatar.working":"Working","avatar.openInfo":"Open {name}'s Bot info"},j8={"settings.title":"Settings","settings.sections":"Settings sections","settings.general":"General","settings.models":"Models","settings.network":"Network","settings.secrets":"Secrets","settings.about":"About","group.custom":"Custom API","group.subscription":"Subscription","group.apiKey":"API key","models.add":"Add a provider","models.empty":"No model connection yet","models.count":{one:"{count} model",other:"{count} models"},"models.none":"No models yet","picker.back":"Back to the model page","picker.search":"Search providers","picker.searchPlaceholder":"Search providers…","picker.keyHint":{one:"API key · {count} model",other:"API key · {count} models"},"picker.loading":"Loading providers…","picker.retry":"Try again","picker.noMatch":"No provider matches","editor.back":"Back to the provider list","editor.delete":"Delete this provider","editor.connection":"Connection","editor.providerName":"Provider name","editor.name":"Connection name","editor.protocol":"API protocol","editor.url":"API URL","editor.defaultUrl":"The provider's own address","editor.key":"API key","editor.keyPlaceholder":"Enter the API key","editor.keySaved":"Saved. Leave empty to keep it.","editor.settings":"Connection settings","editor.models":"Model list","editor.selected":"{selected} of {total} selected","editor.fetch":"Get the model list","editor.fetching":"Getting…","editor.fetched":{one:"Got {count} model",other:"Got {count} models"},"editor.noneReturned":"This endpoint returned no models","editor.fetchFailed":"Couldn't get the model list","editor.loadingCatalog":"Loading the model catalog…","editor.autoSelected":"Autoconfigure selected","editor.addManually":"Add manually","editor.filter":"Filter models","editor.filterPlaceholder":"Filter models…","editor.selectVisible":"Select everything shown","editor.empty":"No models yet","editor.emptyCustom":"Get the model list, or add a model by hand.","editor.emptyBuiltin":"You can add a model by hand.","editor.autoSummary":"{parts}; saved with the form","editor.autoMatched":{one:"{count} configured",other:"{count} configured"},"editor.autoChoose":{one:"{count} needs a source",other:"{count} need a source"},"editor.autoNone":{one:"{count} not in the catalog",other:"{count} not in the catalog"},"editor.autoFailed":{one:"{count} failed",other:"{count} failed"},"editor.confirmDelete":'Delete "{name}" and its models?',"editor.deleteFailed":"Could not delete","editor.saveFailed":"Could not save","editor.saved":"Saved","editor.saving":"Saving…","editor.save":"Save","card.defaultProtocol":"The provider's own protocol","card.modelId":"Model ID","card.modelName":"Model name","card.optional":"Optional","card.newModel":"New model","card.enterId":"Enter the model ID","card.use":"Use {name}","card.remove":"Remove {name}","card.image":"Image","card.reasoning":"Thinking","card.capabilities":"Capabilities","card.reasoningThinking":"Thinking / reasoning","card.imageInput":"Image input","card.specs":"Model specs","card.hidePrices":"Hide prices","card.editPrices":"Edit prices","card.context":"Context window · tokens","card.maxOutput":"Maximum output · tokens","card.costTitle":"Price per million tokens","card.costInput":"Input","card.costOutput":"Output","card.costCacheRead":"Cache read","card.costCacheWrite":"Cache write","card.notProvided":"Not given","card.advanced":"Advanced","card.apiOverride":"API protocol","card.headers":"Headers","card.headerSaved":"Saved. Leave empty to keep it.","card.addHeader":"Add a header","card.removeHeader":"Remove this header","card.compat":"Compat flags","card.jsonObject":"Enter a JSON object","auto.run":"Autoconfigure","auto.pending":"Configuring…","auto.failed":"Autoconfigure failed","auto.tagChoose":"Pick a source","auto.tagNone":"Not in the catalog","auto.official":"Official","auto.matched":"Filled in from {source}{note}{suffix}","auto.reseller":" (a reseller's catalog, not the vendor's)","auto.applied":"; it takes effect once saved.","auto.apiMismatch":"The catalog has this model on the {api} protocol, not the one chosen here, so the thinking format and compat flags were left alone.","auto.changeSource":"Change the source","auto.multiple":"Several official sources share this model name; pick one:","auto.similar":"The catalog has no {modelId}; similar models:","auto.notFound":"The catalog has no such model. Fill it in by hand.","thinking.title":"Thinking","thinking.format":"Thinking format","thinking.protocolDefault":"The protocol's default","thinking.onlyCompletions":"Only used by the OpenAI Chat Completions protocol","thinking.levels":"Thinking levels","thinking.level.off":"Off","thinking.level.minimal":"Minimal","thinking.level.low":"Low","thinking.level.medium":"Medium","thinking.level.high":"High","thinking.level.xhigh":"Extra high","thinking.level.max":"Maximum","thinking.levelName":"{level} level","thinking.levelValue":"Value sent for the {level} level","thinking.supportedDefault":"Supported (default)","thinking.unsupported":"Not supported","thinking.supportedCustom":"Supported, send this value","thinking.supported":"Levels in use: {levels}","auth.title":"Account authorization","auth.running":"Authorizing","auth.openPage":"Open the authorization page","auth.code":"Code: {code}","auth.browser":"Sign in with the browser (OAuth)","auth.deviceCode":"Sign in with a device code","auth.redirectFull":"The full redirect URL","auth.redirectOrCode":"Code or redirect URL","auth.manualNote":"If the browser does not come back on its own, paste the redirect URL here.","auth.waiting":"Waiting for authorization…","auth.cancel":"Cancel authorization","auth.configureCredential":"Set up the credential","auth.signInAgain":"Sign in again","auth.signIn":"Sign in","auth.removeCredential":"Remove the credential","auth.signOut":"Sign out","auth.statusFailed":"Couldn't get the sign-in status","auth.refresh":"Refresh the state","picker.loadFailed":"Couldn't load the providers"},w8={"sidebar.label":"Chats","sidebar.create":"Create","sidebar.createMenu":"Create menu","sidebar.newChannel":"New channel","sidebar.newSection":"New channel group","sidebar.newBot":"New Bot","sidebar.alerts":"{count} unread for you","sidebar.unread":"{count} unread","sidebar.said":"{name}: {text}","sidebar.atMe":"[Mentioned you]","sidebar.more":"More actions for {name}","sidebar.asking":"(waiting for your answer)","sidebar.working":"(working)","sidebar.pinned":"Pinned","sidebar.muted":"Muted","sidebar.hasUnread":"Unread","sidebar.editSection":"Edit group: {name}","sidebar.search":"Search chats and messages","sidebar.results":"Search results","sidebar.chats":"Chats","sidebar.nav":"Channels and DMs","sidebar.followed":"Followed threads","sidebar.channels":"Channels","sidebar.dms":"DMs","sidebar.noDms":"No DMs yet","search.title":"Search","search.paneLabel":"Search in this chat","search.inThread":"This thread","search.inDm":"This DM","search.close":"Close search","search.placeholder":"Search messages","search.channelPlaceholder":"Search this channel and its threads","search.prompt":"Type what you're looking for","search.searching":"Searching…","search.noMessages":"No messages found","search.count":{one:"{count} message, newest first",other:"{count} messages, newest first"},"search.countLatest":"Showing the latest {count}","search.showAll":"Show all {count}","search.threads":"Threads","search.channels":"Channels (topics and notices)","search.messages":"Messages","search.channel":"Channel","member.unknown":"Unknown member","member.deleted":"{name} (deleted)","members.view":"View {name}","members.remove":"Remove {name}","members.count":{one:"{count} member",other:"{count} members"},"members.people":"People","members.removeTitle":"Remove {name} from #{channel}","members.removeBody":"They won't get this channel's messages anymore.","members.removeConfirm":"Remove","chat.area":"Conversation","chat.botDms":"{name}'s DMs with other Bots","chat.botStatus":"Bot status","chat.transcript":"Messages","chat.loading":"Loading…","chat.empty":"No messages yet","chat.start":"Start a conversation with {name}","chat.loadingOlder":"Loading earlier messages…","chat.toLatest":"Jump to the latest","chat.unseen":{one:"{count} new message",other:"{count} new messages"},"chat.toChannel":"Message #{name}","chat.toBot":"Message {name}…","chat.pickModel":"Choose a model for this Bot to start messaging","chat.pick":"Pick a chat","channel.infoFor":"Channel info: {name}","channel.membersCount":{one:"{count} member",other:"{count} members"},"channel.members":"Members","channel.search":"Search channel messages (Ctrl+F)","channel.threads":"Threads","notice.title":"Notice","notice.edit":"Edit the notice","notice.content":"Notice text","notice.none":"No notice yet","notice.version":"v{version}","chat.newBelow":"New messages","chat.today":"Today","chat.yesterday":"Yesterday","channel.echo":"Replied in “{title}”","channel.replies":{one:"{count} reply",other:"{count} replies"},"channel.threadDone":"Done","channel.lastReply":"Last reply {time}","channel.replyInThread":"Reply in thread","info.edit":"Edit {name}","info.memberList":"Member list","info.back":"Back to channel info","info.addMembers":"Add members","info.name":"Name","info.newChannel":"New channel","info.topic":"Topic","info.noTopic":"No topic yet","info.section":"Group","info.menu":"Channel","info.noSection":"None","mention.menu":"Mention a member","mention.inThread":"In this thread","mention.inChannel":"Others in the channel","mention.outside":"Not in this channel","mention.outsideList":"Members not in this channel","mention.searchOutside":"Search members not in this channel","mention.invites":"Choosing someone adds them to this channel","quote.inline":"“{text}”","quote.by":"{name}:","quote.remove":"Remove quote: {text}","quote.tooMany":"A message can quote up to {count} passages","quote.selection":"Selected text","quote.copy":"Copy","quote.quote":"Quote in reply","composer.busy":"Still uploading. Add more once it's done.","composer.tooMany":"A message can have up to {count} attachments.","composer.size":"Attachments can't be empty or larger than 10 MB.","composer.pasted":"pasted-image","composer.removeFile":"Remove attachment: {name}","composer.uploading":"Uploading: {name}","composer.replying":"Replying to","composer.cancelReply":"Cancel reply","composer.drop":"Drop to attach","composer.attach":"Attach files","composer.input":"Message","composer.send":"Send","files.preview":"Preview {name}","files.download":"Download {name}","files.gone":"This attachment doesn't exist or was deleted","files.readFailed":"Couldn't open the file ({status})","files.readError":"Couldn't open the file","files.kindImage":"Image","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"Text","files.kindFile":"File","files.downloadFile":"Download","files.showPreview":"Preview","files.showSource":"Source","files.showText":"Plain text","files.openTab":"Open in a new tab (isolated)","files.narrow":"Shrink the preview","files.widen":"Widen the preview","files.closePreview":"Close the preview","files.running":"Scripts are running in isolation: they can reach the network but can't read Jarvy's data.","files.scripts":{one:"This HTML has {count} script{hosts}. It isn't running. Once run, it can reach the network but can't read Jarvy's data.",other:"This HTML has {count} scripts{hosts}. They aren't running. Once run, they can reach the network but can't read Jarvy's data."},"files.scriptHosts":" (loading {hosts})","files.andMore":" and more","files.stop":"Stop scripts","files.run":"Run scripts","files.downloadToView":"Download this file to view it","files.tooLarge":"This file is over 1 MB, too large to preview here.","files.unsupported":"This file can't be previewed here.","files.reading":"Reading the file…","files.runningTitle":"{name} (running)","files.previous":"Previous attachment","files.choose":"Pick a file to preview","files.next":"Next attachment","question.failed":"Couldn't send the answer","question.dismissed":"Dismissed","question.chose":"Chose: {answer}","question.dismissLabel":"Close the question without answering","question.dismiss":"Skip","question.multiple":"Pick one or more","question.note":"Add a note (optional)","question.own":"Or write your own…","question.ownLabel":"Your own answer","question.confirmCount":"OK ({count})","question.confirm":"OK","question.send":"Send","directs.back":"Back to the list","directs.between":"{name} and {other}","directs.readOnly":"Read only","files.kindVideo":"Video","files.kindAudio":"Audio","files.cantPlay":"This browser can't play it","files.cantPlayHint":"Download it and open it in a player."},S8={"threadSort.title":"Sort","threadSort.current":"Sort: {order}","threadSort.updated":"Last updated","threadSort.created":"Created","threadSort.status":"Status","threads.list":"Thread list","threads.closeList":"Close the thread list","threads.byStatus":"Filter by status","threads.openCount":"Open {count}","threads.doneCount":"Done {count}","threads.all":"All","threads.loading":"Loading…","threads.none":"No threads yet","threads.following":"Following","threads.filter":"Filter","threads.unreadCount":"Unread {count}","threads.unread":"Unread","threads.noneUnread":"No unread threads","threads.noneOpen":"No open threads","threads.noneDone":"No finished threads","threads.notFollowing":"Not following","threads.pick":"Pick a thread","threads.open":"Open","thread.rename":"Rename","thread.title":"Thread title","thread.toggleStatus":"Switch status","thread.summary":"Summary","thread.editSummary":"Edit the summary","thread.conclude":"Mark done and post the summary to #{channel}","thread.addSummary":"Add a summary","thread.sourceElsewhere":"The original message isn't in this thread","thread.label":"Thread","thread.backToList":"Back to the thread list","thread.inChannel":"View in channel","thread.search":"Search thread messages (Ctrl+F)","thread.followingHint":"New replies count as unread","thread.notFollowingHint":"New replies don't count as unread","thread.follow":"Follow","thread.expand":"Expand","thread.collapse":"Back to the side panel","thread.close":"Close the thread panel","thread.conclusion":"Conclusion:","thread.concluded":"Marked done; the summary was posted to #{channel}","thread.noReplies":"No replies yet","thread.toLatest":"Jump to the latest reply","thread.reply":"Reply in thread"},k8={"usage.title":"Usage","usage.back":"Back to Bot info","usage.range":"Time range","usage.today":"Today","usage.days":"{count} days","usage.all":"All","usage.refresh":"Refresh","usage.refreshLabel":"Refresh usage","usage.retry":"Retry","usage.loading":"Loading usage…","usage.loadFailed":"Could not load usage","usage.empty":"No model calls in this period","usage.model":"Model","usage.calls":"Calls","usage.input":"Input","usage.output":"Output","usage.cacheRead":"Cache read","usage.cacheWrite":"Cache write","usage.cost":"Cost","usage.total":"Total","usage.unpriced":"No price set","usage.notePartial":"The total cost leaves out models with no price set.","activity.error":"Error","activity.running":"Running","activity.reasoning":"Thinking","activity.texting":"Replying","activity.toolCalling":"Using tools","activity.asking":"Waiting for your answer","activity.noModel":"No model","activity.idle":"Idle","activity.stopped":"Not running","bot.saved":"Saved","bot.changeFailed":"Couldn't change it","bot.color":"Avatar color","bot.contextHint":"Context in use, as the model reported it with the Bot's last reply","bot.contextStale":"The latest model request failed. This is the context usage from the last successful request.","bot.context":"Context","bot.unknown":"Unknown","bot.tokens":"{used} / {window} tokens","bot.profile":"Profile","bot.description":"Description","bot.descriptionPlaceholder":"What can this Bot do for you?","bot.personaPlaceholder":"The Bot's personality, duties and habits","bot.personaHint":"Applies from the next time it starts working.","bot.unsaved":"Unsaved changes","bot.saving":"Saving…","bot.runtime":"Runtime","agent.title":"Agent Bot","agent.intro":"{name} is your agent Bot: it helps you run Jarvy itself. Ask it in a DM or a channel to:","agent.create":"Create Bots and change their name, description and persona","agent.model":"Give Bots a model and a thinking level","agent.run":"Start or stop Bots, and see their usage","agent.delete":"Delete Bots, channels and channel groups, or remove members from a channel, always after you confirm on a card","bot.status":"Status","bot.aborting":"Interrupting…","bot.abort":"Interrupt the current task","bot.starting":"Starting…","bot.stopping":"Stopping…","bot.start":"Start","bot.stop":"Stop","bot.workspace":"Workspace","bot.copyWorkspace":"Copy the workspace path","bot.activity":"Activity","bot.subscriptions":"Subscriptions","bot.noSubscriptions":"No subscriptions","bot.threadIn":"Thread · #{channel}","botModel.auto":"Default level","botModel.off":"Off","botModel.minimal":"Minimal","botModel.low":"Low","botModel.medium":"Medium","botModel.high":"High","botModel.xhigh":"Extra high","botModel.max":"Maximum","botModel.loadFailed":"Couldn't load the model list","botModel.switchFailed":"Couldn't switch the model","botModel.pick":"Pick the Bot's model","botModel.broken":"This model isn't available anymore. Choose another one.","botModel.choose":"Pick a model","botModel.filter":"Filter the Bot's models","botModel.filterPlaceholder":"Filter models…","botModel.list":"Bot models","botModel.noMatch":"No matching models","botModel.none":"No models yet. Add one in Settings.","botModel.manage":"Manage models","botModel.thinking":"Thinking","botModel.pickThinking":"Pick the thinking level","botModel.loading":"Loading models…","botModel.switching":"Switching…","botModel.pickFor":"Pick a model for {name}","deleteBot.title":"Delete {name}","deleteBot.after":"Once deleted:","deleteBot.chats":{one:"Its {count} DM, channel memberships and subscriptions are deleted.",other:"Its {count} DMs, channel memberships and subscriptions are deleted."},"deleteBot.messages":"Its messages in channels and threads stay, shown as from “{name}”; the name can be used again.","deleteBot.history":"Its session history and unfinished tasks are cleared.","deleteBot.files":"Also delete the workspace folder","deleteBot.filesHint":"The workspace may hold files it made. It's kept unless you tick this.","deleteBot.deleting":"Deleting…","deleteBot.working":"Working…","history.reasoning":"Thinking","history.text":"Text","history.empty":"(empty)","history.image":"Image in History","history.toolCall":"Tool call","history.toolResult":"Tool result","history.error":"Error","history.related":"View related record #{id}","history.result":"Result","history.call":"Call","history.details":"Structured result","history.view":"Record view","history.content":"Content","history.json":"Raw JSON","history.contentLabel":"Record content","history.tools":"Tool definitions","history.toolsRemoved":"Removed tools","history.stopReason":"Stop reason","activity.detailFailed":"Couldn't load the record","activity.detailLoading":"Loading the record…","activity.openChat":"Open the chat","activity.sentBy":"Sent by call #{id}","activity.roleSystem":"System","activity.roleUser":"Input","activity.roleAssistant":"Assistant","activity.timeline":"Bot activity timeline","activity.chatMessage":"Chat message {id}","activity.viewMessage":"View message {sequence} · {chat}","activity.attachmentOnly":"Attachments only","activity.attachments":{one:"{count} attachment",other:"{count} attachments"},"activity.viewSentBy":"View call #{id}, which sent it","activity.historyRecord":"History record #{id}","activity.viewHistory":"View History #{id} · {role}","activity.emptyMessage":"(empty message)","activity.loadFailed":"Couldn't load the activity","activity.backToTimeline":"Back to the timeline","activity.chatRecord":"Chat message","activity.newestFirst":"Newest first","activity.refresh":"Refresh the activity","activity.reading":"Loading…","activity.columnChat":"Chat","activity.columnTime":"Time","activity.loading":"Loading the activity…","activity.empty":"No activity yet","activity.newer":"Newer","activity.page":"Page {page}","activity.older":"Older","activity.historyDetail":"History record details","activity.chatDetail":"Chat message details","activity.toolCall":"Called {name}","activity.toolResult":"{name} · result","activity.toolFailed":"{name} · failed","activity.images":{one:"{count} image",other:"{count} images"},"bot.newName":"New Bot","bot.newNameN":"New Bot {n}"},C8={"npc.toolbar":"NPC prototype","npc.replay":"Replay the turn","npc.mood":"Base mood","npc.mood.normal":"Normal","npc.mood.happy":"Happy","npc.mood.sad":"Sad","npc.mood.angry":"Angry","npc.mood.dizzy":"Dizzy","npc.poses":"Animations","npc.pose.sleep":"Sleeping","npc.pose.idle":"Idle","npc.pose.think":"Thinking","npc.pose.mutter":"Talking to itself","npc.pose.say":"Talking to you","npc.pose.ask":"Waiting for you","npc.pose.read":"Reading a file","npc.pose.work":"Editing, running","npc.pose.compact":"Compacting","npc.pose.busy":"Retrying","npc.pose.failed":"Failed","npc.pose.done":"Done","npc.pose.groom":"Grooming","npc.expand":"Show every step","npc.collapse":"Collapse","npc.panel":"This turn","npc.state.running":"Running","npc.state.ok":"Done","npc.state.failed":"Failed","npc.duration":"{value}s","npc.done":"Done · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"Thinking","npc.step.mutter":"Talked to itself","npc.step.read.running":"Reading {target}","npc.step.read.ok":"Read {target}","npc.step.write.running":"Editing {target}","npc.step.write.ok":"Edited {target}","npc.step.run.running":"Running {target}","npc.step.run.ok":"Ran {target}","npc.step.run.failed":"{target} failed","npc.step.compact.running":"Tidying up the context","npc.step.compact.ok":"Tidied up the context","npc.step.ask.running":"Waiting for your answer","npc.step.ask.ok":"You chose “{answer}”","npc.step.say.running":"Replying to you","npc.step.say.ok":"Replied to you","npc.step.post.running":"Posting to {chat}","npc.step.post.ok":"Posted to {chat}","npc.demo.think1":"fish says the thread pane jumps when it opens. The scroll may run at the wrong moment. Let me first see how ThreadPane scrolls.","npc.demo.think2":"It scrolls before the replies have their height. Scrolling after layout should fix it. The reply count belongs in the dependencies too.","npc.demo.mutter1":"Edited. Let me run the build first.","npc.demo.mutter2":"Hmm… the types don't pass; the ref can be null.","npc.demo.channel":"dev","npc.demo.post":"The thread pane no longer jumps when it opens, and the build passes. Waiting for fish to confirm.","npc.demo.question":"Fixed. Should I also update the screenshots in the docs?","npc.demo.yes":"Yes, update them","npc.demo.no":"Not now","npc.demo.replyYes":"Done: the thread pane now opens at the newest reply without jumping, and the screenshots in the docs are new. The build passes.","npc.demo.replyNo":"Done: the thread pane now opens at the newest reply without jumping. The build passes; I left the screenshots as they are.","npc.live.omitted":"… {count} characters left out …","npc.live.tokens":"Context: {before} → {after} tokens","npc.live.compact.running":"Tidying up the context","npc.live.compact.ok":"Tidied up the context","npc.live.compact.failed":"Couldn't tidy up the context","npc.live.retry.running":"Retrying ({attempt}/{max})","npc.live.retry.ok":"Retried","npc.live.retry.failed":"Retrying failed","npc.live.read.running":"Reading {target}","npc.live.read.ok":"Read {target}","npc.live.read.failed":"Couldn't read {target}","npc.live.edit.running":"Editing {target}","npc.live.edit.ok":"Edited {target}","npc.live.edit.failed":"Couldn't edit {target}","npc.live.write.running":"Writing {target}","npc.live.write.ok":"Wrote {target}","npc.live.write.failed":"Couldn't write {target}","npc.live.run.running":"Running {target}","npc.live.run.ok":"Ran {target}","npc.live.run.failed":"{target} failed","npc.live.script.running":"Running a script","npc.live.script.ok":"Ran a script","npc.live.script.failed":"The script failed","npc.live.tool.running":"Using {tool}","npc.live.tool.ok":"Used {tool}","npc.live.tool.failed":"{tool} failed","npc.live.sendFailed":"The message didn't go out","npc.live.switch.running":"Switching work environment","npc.live.switch.ok":"Switched work environment","npc.live.switch.failed":"Couldn't switch work environment","npc.live.askFailed":"The question didn't go out","npc.live.askClosed":"The question was closed","npc.live.answerBelow":"Answer on the card below","npc.live.answerIn":"Answer in {chat}","npc.live.browse.running":"Looking through {chat}","npc.live.browse.ok":"Looked through {chat}","npc.live.browseAll.running":"Looking through the chats","npc.live.browseAll.ok":"Looked through the chats","npc.done.interrupted":"Interrupted · {duration}","npc.done.failed":"The turn failed · {duration}"},N8={"environment.title":"Work environment","environment.computer":"Sandbox","environment.computerHint":"A Linux container that Jarvy makes and manages, used only by this Bot, with its workspace inside. Recommended.","environment.noDocker":"Needs Docker on the computer running Jarvy.","environment.host":"Your computer","environment.hostHint":"The computer running Jarvy, where it can access your files.","environment.default":"Default","environment.awayHost":"Now on your computer (the Bot switched there itself).","environment.awayComputer":"Now in its sandbox (the Bot switched there itself).","environment.details":"Sandbox details","environment.sandboxAbout":"A Linux container only this Bot uses, with its workspace as its home directory.","environment.external":"External environments it may use","environment.accessFailed":"Couldn't change the environments it may use","environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Error","environment.state.unavailable":"No Docker","environment.hint.preparing":"Creating the first sandbox takes a few minutes while the image is built on this machine.","environment.hint.running":"Keeps running until you stop it.","environment.hint.stopped":"Starts automatically when the Bot needs it.","environment.hint.failed":"Couldn't start. Please try again.","environment.hint.unavailable":"Docker isn't available on the computer running Jarvy.","environment.start":"Start","environment.starting":"Starting…","environment.stop":"Stop","environment.stopping":"Stopping…","environment.stopTitle":"Stop {name}'s sandbox?","environment.stopBody":"Programs running in the sandbox, such as background services, will be closed. Installed software and workspace files are kept, and it starts automatically when next needed.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in the sandbox will be removed, returning it to its initial state. Workspace files are kept.","environment.resetConfirm":"Reset","environment.changeFailed":"Couldn't change the work environment"},E8={"connection.lan":"LAN access","connection.localOnly":"This computer only","connection.localOnlyHint":"Jarvy accepts connections from this computer only. To use it from other devices on your network, restart it with {flag}.","connection.addresses":"Addresses","connection.copy":"Copy address","connection.root":"Security certificate","connection.download":"Download certificate","connection.fingerprint":"SHA-256 fingerprint","connection.fingerprintSha1":"SHA-1 fingerprint","connection.howTo":"Installation instructions","connection.howMac":"Mac: Open the certificate to add it to Keychain Access, double-click it, then under Trust set When using this certificate to Always Trust.","connection.howWindows":"Windows: Open the certificate, click Install Certificate, choose Place all certificates in the following store, then pick Trusted Root Certification Authorities. The Thumbprint on the certificate's Details tab is the SHA-1 fingerprint above.","connection.howIos":"iPhone and iPad: Download it in Safari, install it in Settings › General › VPN & Device Management, then turn on full trust in Settings › General › About › Certificate Trust Settings.","connection.howAndroid":"Android: Download it, then search Settings for CA certificate and install it. Where it lives varies by phone, usually under Security or Encryption & credentials.","connection.howRestart":"After installing, quit the browser completely and open it again so it picks up the certificate.","connection.allowHttp":"Allow HTTP access","connection.allowHttpHint":"Passwords and conversations travel in plain text; turn this on only on a network you trust.","connection.insecure":"This connection isn't encrypted. Others on the same network could see passwords and conversations.","connection.useHttps":"Switch to HTTPS"},T8={"secrets.add":"Add secret","secrets.empty":"No secrets yet","secrets.name":"Name","secrets.description":"Description","secrets.descriptionPlaceholder":"Optional, such as what it's for","secrets.value":"Value","secrets.newValue":"New value","secrets.newValuePlaceholder":"Leave empty to keep the current value","secrets.showValue":"Show value","secrets.hideValue":"Hide value","secrets.shortValue":"This value is shorter than 8 characters and may not be hidden when it appears in what Bots see.","secrets.noDescription":"No description","secrets.grantCount":{one:"{count} Bot",other:"{count} Bots"},"secrets.notGranted":"Not granted","secrets.unreadable":"Can't decrypt","secrets.unreadableHint":"This value was encrypted with a different master key and can't be read. Enter it again.","secrets.fingerprint":"Fingerprint","secrets.updated":"Updated {time}","secrets.usedCount":{one:"Used {count} time",other:"Used {count} times"},"secrets.neverUsed":"Never used","secrets.grants":"Bots that can use it","secrets.noBots":"No Bots yet.","secrets.addBots":"Add Bots","secrets.noGrants":"No Bot can use it yet.","secrets.searchBots":"Search Bots","secrets.noMatch":"No matching Bots","secrets.allGranted":"Every Bot can already use it.","secrets.revoke":"Remove {name}","secrets.onceTag":"This time only","secrets.edit":"Edit secret","secrets.uses":"Recent uses","secrets.noUses":"No uses yet.","secrets.deletedBot":"Deleted Bot","secrets.useCommand":"Command","secrets.useSsh":"SSH signature","secrets.delete":"Delete secret","secrets.deleteTitle":"Delete {name}?","secrets.deleteBody":"Bots that were granted it can no longer use it. Its use history is kept.","secrets.deleteConfirm":"Delete","secrets.masterKey":"Master key","secrets.keyFile":"Location","secrets.keyHint":"Copy this file too when you back up or move Jarvy; without it, secrets and API keys must be entered again.","secretCard.title":"Request to use the secret {name}","secretCard.valuePlaceholder":"Paste or type the value","secretCard.insecure":"This connection isn't encrypted, so others on the same network could see the value. Switch to HTTPS before entering it.","secretCard.exists":"This secret is already saved in Settings › Secrets.","secretCard.replace":"Replace value","secretCard.keepValue":"Use the saved value","secretCard.unreadable":"The saved value can't be decrypted. Enter it again.","secretCard.value":"Value","secretCard.valueHint":"It's saved encrypted in Settings › Secrets and never shown in the chat.","secretCard.scope":"How long the Bot can use it","secretCard.always":"Always allow","secretCard.alwaysHint":"Until you remove it in Settings › Secrets","secretCard.once":"This time only","secretCard.onceHint":"Ends when the Bot finishes its current task","secretCard.allow":"Allow","secretCard.saveAllow":"Save and allow","secretCard.decline":"Decline","secretCard.allowedAlways":"Allowed {name}. You can remove it in Settings › Secrets","secretCard.allowedOnce":"Allowed {name} this time only","secretCard.declined":"Declined {name}","secretCard.ignored":"Ignored the request for {name}","error.secretNameInvalid":"Use capital letters, digits and underscores, starting with a letter.","error.secretNameTaken":"Another secret already has this name.","error.secretValueMissing":"Enter a value.","error.secretValueTooLong":"The value is too long. The limit is 16 KB.","error.secretDescriptionInvalid":"The description must be a single line of up to 200 characters.","error.secretMissing":"Can't find this secret. It may have been deleted.","error.credentialUnreadable":"The saved API key can't be decrypted. Enter it again in Settings › Models."},A8={"settings.machines":"Environments","machines.add":"Add machine","machines.empty":"No machines yet","machines.host":"Host","machines.hostPlaceholder":"192.168.1.20 or dev.example.com","machines.port":"Port","machines.user":"User","machines.name":"Name","machines.directory":"Start directory","machines.directoryPlaceholder":"Home","machines.next":"Next","machines.scanning":"Connecting…","machines.fingerprint":"Host fingerprint","machines.fingerprintHint":"Check it against ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on that machine before going on.","machines.password":"Password","machines.passwordHint":"Used to install the key Jarvy generates. If the machine doesn't support key login, the password is stored encrypted and used to log in.","machines.byPassword":"Password","machines.byKey":"Public key","machines.publicKey":"Public key","machines.keyHint":"Add it to ~/.ssh/authorized_keys for {user}, then verify.","machines.copy":"Copy","machines.copied":"Copied","machines.verify":"Verify and add","machines.verifying":"Verifying…","machines.login":"Login","machines.loginKey":"Key","machines.loginPassword":"Password","machines.passwordLogin":"This machine doesn't support key login, so the saved password is used. Enable PubkeyAuthentication to switch to key login.","machines.newPassword":"New password","machines.updatePassword":"Update password","machines.passwordUpdated":"Password updated.","machines.useKey":"Switch to key login","machines.usingKey":"Switched to key login. The saved password was deleted.","machines.stillPassword":"This machine still doesn't accept Jarvy's key.","machines.connect":"Connect and add","machines.connecting":"Adding…","machines.back":"Back","machines.check":"Check fingerprint","machines.checking":"Checking…","machines.unchanged":"The fingerprint hasn't changed.","machines.changed":"The machine now shows a different fingerprint. If it was reinstalled or replaced, check the new one and accept it; otherwise something may be posing as it.","machines.trust":"Accept new fingerprint","machines.delete":"Delete machine","machines.deleteTitle":"Delete {name}?","machines.deleteBody":"Jarvy's key is removed from the machine first. Bots working there go back to their default environment.","machines.deleteConfirm":"Delete","machines.forceTitle":"Can't reach {name}","machines.forceBody":"Jarvy's key stays in ~/.ssh/authorized_keys there, on the line ending in {comment}; you can remove it later. Delete anyway?","machines.forceConfirm":"Delete anyway","machineCard.title":"Request to add {name}","machineCard.existing":"This machine is already in Settings › Environments.","machineCard.add":"Connect and add","machineCard.allow":"Allow","machineCard.decline":"Decline","machineCard.added":"Added {name}","machineCard.granted":"Allowed {name}","machineCard.declined":"Declined to add {name}","machineCard.ignored":"Ignored the request for {name}","environment.awayMachine":"Now on {name} (the Bot switched there itself).","error.machineMissing":"This machine wasn't found. It may have been deleted.","error.machineNameTaken":"Another machine already has this name.","error.sshPasswordMissing":"Enter the password.","error.sshKeyUnreadable":"This machine's key can't be decrypted with the current master key. Delete the machine and add it again.","error.sshBadHost":"The host must be a host name or an IP address.","error.sshBadUser":"Enter a user name on that machine.","error.sshBadPort":"The port must be 1–65535.","error.sshBadDirectory":"The start directory must be an absolute path or start with ~/.","error.sshAuthFailed":"Incorrect user name or password.","error.sshPasswordRefused":"This machine doesn't support password login. Use a public key instead.","error.sshKeyRefused":"This machine didn't accept Jarvy's public key. Make sure it's in ~/.ssh/authorized_keys and that sshd has PubkeyAuthentication enabled.","error.sshKeyExpired":"This public key is no longer valid. Get a new one and add it to the machine.","error.sshUnreachable":"Can't reach this machine. Check the host, port and network.","error.sshHostKeyChanged":"The machine shows a different fingerprint from the accepted one, so Jarvy didn't connect.","error.sshUnsupported":"Only Linux and macOS are supported for now.","error.sshFailed":"SSH failed: {detail}"},_8={"tasks.title":"Scheduled tasks","tasks.empty":"No scheduled tasks","tasks.add":"New task","tasks.edit":"Edit","tasks.delete":"Delete","tasks.deleteTitle":"Delete “{name}”?","tasks.deleteBody":"It won't run again. To stop it for a while, turn it off instead.","tasks.toggle":"Turn {name} on or off","tasks.next":"Next {time}","tasks.paused":"Off","tasks.done":"Done","tasks.newTitle":"New task","tasks.editTitle":"Edit task","tasks.name":"Name","tasks.namePlaceholder":"Morning news","tasks.instruction":"What to do","tasks.instructionPlaceholder":"Read the front pages of the news sites I follow and send me the three stories worth reading, with a line on each.","tasks.when":"When","tasks.kind.once":"Once","tasks.kind.every":"Repeat","tasks.kind.daily":"Daily","tasks.kind.weekly":"Weekly","tasks.at":"Date and time","tasks.everyCount":"Every","tasks.unit.minutes":"minutes","tasks.unit.hours":"hours","tasks.time":"Time","tasks.weekday":"Day","tasks.minimum":"5 minutes at the least.","tasks.saveFailed":"Couldn't save the task","tasks.changeFailed":"Couldn't change the task","tasks.loadFailed":"Couldn't load the tasks","tasks.schedule.once":"Once, {time}","tasks.schedule.minutes":{one:"Every minute",other:"Every {count} minutes"},"tasks.schedule.hours":{one:"Every hour",other:"Every {count} hours"},"tasks.schedule.daily":"Daily at {time}","tasks.schedule.weekly":"Every {day} at {time}","error.taskTimePast":"That time has already passed. Pick a time in the future.","error.taskScheduleInvalid":"Check the schedule: every 5 minutes at the least, and a valid time of day.","error.taskInvalid":"Give the task a name and say what to do."},M8={...b8,...j8,...w8,...S8,...k8,...C8,...N8,...E8,...T8,...A8,..._8},R8={"locale.name":"中文","locale.short":"中","common.close":"关闭","common.continue":"继续","common.failed":"操作失败,请重试。","common.listSeparator":",","login.subtitle":"登录以继续","login.form":"登录","login.username":"用户名","login.password":"密码","login.showPassword":"显示密码","login.hidePassword":"隐藏密码","login.submit":"登录","login.submitting":"正在登录…","login.wrong":"用户名或密码不正确。","login.tooMany":"尝试次数过多,请稍后再试。","login.offline":"无法连接到 Jarvy,请检查网络后重试。","login.themeLight":"切换为浅色主题","login.themeDark":"切换为深色主题","general.language":"语言","general.theme":"主题","general.light":"浅色","general.dark":"深色","about.tagline":"你和 AI Bot 一起工作的群聊,完整运行在你自己的电脑上。","about.version":"版本 {version}","about.source":"源代码","about.package":"npm 包","about.license":"许可证","about.notices":"第三方声明","status.signedIn":"已登录","status.signedOut":"未登录","status.configured":"已配置","status.notConfigured":"未配置","account.menu":"账户菜单","account.menuFor":"{name} 的账户菜单","account.toggleTheme":"切换主题","account.signOut":"退出登录","entry.menu":"会话操作","entry.pin":"置顶","entry.unpin":"取消置顶","entry.mute":"免打扰","entry.unmute":"取消免打扰","entry.botInfo":"Bot 信息","entry.channelInfo":"频道信息","entry.deleteBot":"删除 Bot","entry.deleteChannel":"删除频道","hint.reaction":"{actor} 用 {emoji} 回应了你的消息","hint.reactionInThread":"{actor} 用 {emoji} 回应了你在「{title}」中的消息","hint.threadSummary":"{actor} 更新了线程「{title}」的摘要","hint.summary":"{actor} 更新了线程摘要","hint.notice":"{actor} 更新了公告","app.connecting":"正在连接 Jarvy…","app.channelDeleted":"频道已删除","app.botDeleted":"{name} 已删除","app.notInChannel":{one:"{names} 不在本频道,没有收到通知",other:"{names} 不在本频道,没有收到通知"},"app.memberAdded":"{name} 已加入 #{channel}","app.sourceGone":"原消息已不存在","ui.closeNamed":"关闭{name}","ui.copied":"已复制","ui.copyFailed":"复制失败","ui.copyCode":"复制代码","ui.image":"[图片:{alt}]","ui.imageHidden":"外部图片已隐藏","app.deleteChannelTitle":"删除频道 #{name}","app.deleteChannelBody":"频道里的消息、线程和附件都会被删除,且无法恢复。","app.resizePane":"拖动调整侧栏宽度","common.cancel":"取消","common.save":"保存","common.create":"创建","common.delete":"删除","common.retry":"重试","common.back":"返回","common.add":"添加","common.saveFailed":"保存失败","common.openNav":"打开会话列表","common.you":"你","common.member":"成员","common.noMatch":"没有匹配的成员","common.searchMembers":"搜索成员","common.attachment":"[附件]","actions.reply":"回复这条消息","actions.react":"添加表情回应","actions.pickEmoji":"选择表情","actions.more":"更多","actions.fold":"折叠成一行","actions.unfold":"取消折叠","fold.folded":"已折叠","fold.more":"展开全文","fold.less":"收起","dialogs.candidates":"可添加的成员","dialogs.allInside":"所有成员都已在频道中","dialogs.addCount":"添加({count})","dialogs.addFailed":"添加成员失败","dialogs.optional":"可选","dialogs.deleteSection":"删除分组「{name}」?其中的频道会移到「频道」下。","dialogs.deleteFailed":"删除失败,请重试","dialogs.editSection":"编辑频道分组","dialogs.sectionName":"分组名称","dialogs.newSection":"新分组","api.offline":"无法连接到 Jarvy,请检查网络后重试。","api.historyFailed":"无法加载聊天记录,请重试。","error.autoconfigModel":"请填写模型 ID。","error.autoconfigSource":"所选的配置来源无效,请重新选择。","error.botMissing":"找不到这个 Bot,它可能已被删除。","error.agentUndeletable":"主 Bot 不能删除,但可以改名或停止。","error.chatAccessChanged":"你在这个聊天中的权限已变化,请刷新后重试。","error.computerFailed":"沙箱启动失败。","error.computerMissing":"这个 Bot 没有沙箱。","error.dockerUnavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","error.connectionMissing":"找不到这个模型连接,它可能已被删除。","error.credentialChanged":"凭证已更改,请重试。","error.credentialScope":"凭证连接不匹配。","error.credentialsMissing":"请先配置此模型连接的凭证。","error.dataLocked":"Jarvy 已经在运行,或数据目录被其他程序占用。","error.discoveryFormat":"这个地址返回的不是所选协议的模型列表,请检查 API URL 和协议。","error.discoveryHttp":"获取模型失败:HTTP {status}。","error.discoveryKey":"请填写 API Key。","error.discoveryProtocol":"所选协议不支持获取模型列表,请手动添加模型。","error.discoveryUrl":"API URL 无效。","error.discoveryUrlMissing":"请填写 API URL。","error.historyMissing":"找不到这条 History 记录。","error.invalidCredential":"凭证格式无效。","error.invalidRun":"Bot 的状态刚刚变化,请刷新后重试。","error.loginInput":"请填写授权码或回调地址。","error.loginOption":"请选择登录方式。","error.loginStep":"登录步骤已变化,请重新开始。","error.loginFailed":"登录操作失败,请刷新后重试。","error.messageMissing":"找不到这条消息,它可能已被删除。","error.modelIncomplete":"请补全模型的上下文窗口和最大输出。","error.modelMissing":"找不到这个模型,它可能已被移除。","error.modelRequestFailed":"模型请求失败:{detail}","error.modelRequired":"请先为 Bot 选择模型。","error.modelSwitchUncertain":"模型切换未完成,请重新选择模型。","error.nameTaken":"名称已被其他成员使用。","error.providerNameTaken":"已有同名的 Provider。","error.connectionInUse":"{bots} 正在使用这个 Provider 的模型,请先换成其他模型再删除。","error.questionClosed":"问题已结束。","error.questionExpired":"这个问题已忽略,Bot 不再等待回答。","error.runtimeFailed":"Bot 运行失败,请检查它的模型设置后重试。","error.sessionCorrupt":"Bot 启动失败(会话文件无法读取)。","error.sessionMismatch":"Bot 启动失败(会话文件不匹配)。","error.sessionMissing":"Bot 启动失败(会话文件缺失)。","error.sessionPath":"Bot 启动失败(会话文件路径无效)。","error.stopping":"Jarvy 正在关闭,请稍后再试。","error.thinkingFormat":"不支持此思考格式。","error.toolsMissing":"Bot 的工具加载失败,请重启 Bot 后重试。","error.unsafeReplay":"上次中断时 Bot 可能已经执行了操作,为避免重复,不会自动重试。","error.discoveryUnreachable":"无法连接 {host},请检查 API URL。","color.gray":"灰","color.blue":"蓝","color.green":"绿","color.amber":"琥珀","color.rose":"粉","color.violet":"紫","avatar.working":"工作中","avatar.openInfo":"查看 {name} 的 Bot 信息"},D8={"settings.title":"设置","settings.sections":"设置分类","settings.general":"通用","settings.models":"模型","settings.network":"网络","settings.secrets":"密钥","settings.about":"关于","group.custom":"自定义 API","group.subscription":"订阅服务","group.apiKey":"API Key","models.add":"添加 Provider","models.empty":"还没有模型连接","models.count":{one:"{count} 个模型",other:"{count} 个模型"},"models.none":"尚未添加模型","picker.back":"返回模型页面","picker.search":"搜索 Provider","picker.searchPlaceholder":"搜索 Provider…","picker.keyHint":{one:"API Key · {count} 个模型",other:"API Key · {count} 个模型"},"picker.loading":"正在加载 Provider…","picker.retry":"重试","picker.noMatch":"没有匹配的 Provider","editor.back":"返回 Provider 列表","editor.delete":"删除 Provider","editor.connection":"连接","editor.providerName":"Provider 名称","editor.name":"连接名称","editor.protocol":"API 协议","editor.url":"API URL","editor.defaultUrl":"使用 Provider 默认地址","editor.key":"API Key","editor.keyPlaceholder":"输入 API Key","editor.keySaved":"已保存,留空则不修改","editor.settings":"连接设置","editor.models":"模型列表","editor.selected":"已选 {selected} / {total}","editor.fetch":"获取模型列表","editor.fetching":"正在获取…","editor.fetched":{one:"获取到 {count} 个模型",other:"获取到 {count} 个模型"},"editor.noneReturned":"此端点没有返回模型","editor.fetchFailed":"获取模型列表失败","editor.loadingCatalog":"正在加载模型目录…","editor.autoSelected":"自动配置已选","editor.addManually":"手动添加","editor.filter":"筛选模型","editor.filterPlaceholder":"筛选模型…","editor.selectVisible":"全选当前结果","editor.empty":"还没有模型","editor.emptyCustom":"获取模型列表,或手动添加模型。","editor.emptyBuiltin":"可以手动添加模型。","editor.autoSummary":"{parts};保存后生效","editor.autoMatched":{one:"已配置 {count} 个",other:"已配置 {count} 个"},"editor.autoChoose":{one:"{count} 个需选择来源",other:"{count} 个需选择来源"},"editor.autoNone":{one:"{count} 个在目录中未找到",other:"{count} 个在目录中未找到"},"editor.autoFailed":{one:"{count} 个失败",other:"{count} 个失败"},"editor.confirmDelete":"删除「{name}」及其模型?","editor.deleteFailed":"删除失败","editor.saveFailed":"保存未完成","editor.saved":"已保存","editor.saving":"正在保存…","editor.save":"保存","card.defaultProtocol":"使用 Provider 默认协议","card.modelId":"模型 ID","card.modelName":"模型名称","card.optional":"可选","card.newModel":"新模型","card.enterId":"填写模型 ID","card.use":"使用 {name}","card.remove":"移除 {name}","card.image":"图片","card.reasoning":"推理","card.capabilities":"能力","card.reasoningThinking":"推理 / 思考","card.imageInput":"图片输入","card.specs":"模型规格","card.hidePrices":"收起价格","card.editPrices":"编辑价格","card.context":"上下文窗口 · tokens","card.maxOutput":"最大输出 · tokens","card.costTitle":"每百万 tokens 价格","card.costInput":"输入","card.costOutput":"输出","card.costCacheRead":"缓存读取","card.costCacheWrite":"缓存写入","card.notProvided":"未提供","card.advanced":"高级设置","card.apiOverride":"指定 API 协议","card.headers":"请求头","card.headerSaved":"已保存,留空则不修改","card.addHeader":"添加请求头","card.removeHeader":"移除请求头","card.compat":"兼容参数 · compat","card.jsonObject":"请输入 JSON 对象","auto.run":"自动配置","auto.pending":"正在配置…","auto.failed":"自动配置失败","auto.tagChoose":"需选择配置来源","auto.tagNone":"目录中未找到","auto.official":"原厂","auto.matched":"已按 {source}{note} 填入配置{suffix}","auto.reseller":"(来自转售目录,非原厂)","auto.applied":";保存后生效。","auto.apiMismatch":"目录中此模型使用 {api} 协议,与当前协议不同,思考格式和兼容参数未填入。","auto.changeSource":"更换来源","auto.multiple":"同名模型有多个原厂来源,请选择:","auto.similar":"目录中没有 {modelId},以下是相似模型:","auto.notFound":"目录中没有找到此模型,请手动填写。","thinking.title":"思考","thinking.format":"思考格式","thinking.protocolDefault":"协议默认","thinking.onlyCompletions":"仅 OpenAI Chat Completions 协议使用","thinking.levels":"思考档位","thinking.level.off":"关闭","thinking.level.minimal":"极低","thinking.level.low":"低","thinking.level.medium":"中","thinking.level.high":"高","thinking.level.xhigh":"超高","thinking.level.max":"最高","thinking.levelName":"{level}档位","thinking.levelValue":"{level}档位发送值","thinking.supportedDefault":"支持(默认值)","thinking.unsupported":"不支持","thinking.supportedCustom":"支持,发送指定值","thinking.supported":"可选档位:{levels}","auth.title":"账户授权","auth.running":"正在授权","auth.openPage":"打开授权页面","auth.code":"验证码:{code}","auth.browser":"浏览器登录(OAuth)","auth.deviceCode":"设备码登录","auth.redirectFull":"完整回调地址","auth.redirectOrCode":"授权码或回调地址","auth.manualNote":"完成授权后若未自动返回,请粘贴回调地址。","auth.waiting":"等待授权完成…","auth.cancel":"取消授权","auth.configureCredential":"配置凭证","auth.signInAgain":"重新登录","auth.signIn":"登录账户","auth.removeCredential":"移除凭证","auth.signOut":"退出登录","auth.statusFailed":"无法获取登录状态","auth.refresh":"刷新状态","picker.loadFailed":"无法加载 Provider 列表"},O8={"sidebar.label":"会话列表","sidebar.create":"打开新建菜单","sidebar.createMenu":"新建菜单","sidebar.newChannel":"新建频道","sidebar.newSection":"新建频道分组","sidebar.newBot":"新建 Bot","sidebar.alerts":"{count} 条发给你的未读","sidebar.unread":"{count} 条未读","sidebar.said":"{name}:{text}","sidebar.atMe":"[有人@我]","sidebar.more":"{name} 的更多操作","sidebar.asking":"(等你回答)","sidebar.working":"(工作中)","sidebar.pinned":"已置顶","sidebar.muted":"免打扰","sidebar.hasUnread":"有未读","sidebar.editSection":"编辑分组:{name}","sidebar.search":"搜索会话和消息","sidebar.results":"搜索结果","sidebar.chats":"会话","sidebar.nav":"频道与私信","sidebar.followed":"我关注的线程","sidebar.channels":"频道","sidebar.dms":"私信","sidebar.noDms":"暂无私信","search.title":"搜索","search.paneLabel":"聊天内搜索","search.inThread":"本线程","search.inDm":"本私信","search.close":"关闭搜索","search.placeholder":"搜索消息","search.channelPlaceholder":"搜索本频道及其线程中的消息","search.prompt":"输入关键词","search.searching":"正在搜索…","search.noMessages":"没有找到消息","search.count":{one:"{count} 条,最新在前",other:"{count} 条,最新在前"},"search.countLatest":"显示最近 {count} 条","search.showAll":"查看全部 {count} 条","search.threads":"线程","search.channels":"频道(主题与公告)","search.messages":"消息","search.channel":"频道","member.unknown":"未知成员","member.deleted":"{name}(已删除)","members.view":"查看 {name}","members.remove":"移出 {name}","members.count":{one:"{count} 位成员",other:"{count} 位成员"},"members.people":"用户","members.removeTitle":"把 {name} 移出 #{channel}","members.removeBody":"移出后,对方将无法再收到此频道的消息。","members.removeConfirm":"移出","chat.area":"对话区域","chat.botDms":"{name} 与其他 Bot 的私信","chat.botStatus":"Bot 状态","chat.transcript":"聊天记录","chat.loading":"正在加载…","chat.empty":"暂无消息","chat.start":"与 {name} 开始对话","chat.loadingOlder":"正在加载更早的消息…","chat.toLatest":"回到最新消息","chat.unseen":{one:"{count} 条新消息",other:"{count} 条新消息"},"chat.toChannel":"发消息到 #{name}","chat.toBot":"发消息给 {name}…","chat.pickModel":"为这个 Bot 选择模型后才能发消息","chat.pick":"选择一个会话","channel.infoFor":"频道信息:{name}","channel.membersCount":{one:"成员 {count}",other:"成员 {count}"},"channel.members":"成员","channel.search":"搜索频道消息(Ctrl+F)","channel.threads":"线程","notice.title":"公告","notice.edit":"编辑公告","notice.content":"公告内容","notice.none":"暂无公告","notice.version":"第 {version} 版","chat.newBelow":"以下为新消息","chat.today":"今天","chat.yesterday":"昨天","channel.echo":"回复了线程「{title}」","channel.replies":{one:"{count} 条回复",other:"{count} 条回复"},"channel.threadDone":"已完成","channel.lastReply":"最后回复 {time}","channel.replyInThread":"在线程中回复","info.edit":"编辑{name}","info.memberList":"成员列表","info.back":"返回频道信息","info.addMembers":"添加成员","info.name":"名称","info.newChannel":"新频道","info.topic":"主题","info.noTopic":"暂无主题","info.section":"分组","info.menu":"频道","info.noSection":"无","mention.menu":"提及成员","mention.inThread":"线程中","mention.inChannel":"频道其他成员","mention.outside":"不在本频道中","mention.outsideList":"不在本频道中的成员","mention.searchOutside":"搜索不在本频道中的成员","mention.invites":"选择后会把对方加入本频道","quote.inline":"「{text}」","quote.by":"{name}:","quote.remove":"移除引用:{text}","quote.tooMany":"一条消息最多引用 {count} 段","quote.selection":"选中的文字","quote.copy":"复制","quote.quote":"在回复中引用","composer.busy":"附件上传中,请稍后再添加。","composer.tooMany":"每条消息最多添加 {count} 个附件。","composer.size":"附件不能为空,也不能超过 10 MB。","composer.pasted":"粘贴图片","composer.removeFile":"移除附件:{name}","composer.uploading":"正在上传:{name}","composer.replying":"回复","composer.cancelReply":"取消回复","composer.drop":"松开以添加附件","composer.attach":"添加附件","composer.input":"输入消息","composer.send":"发送消息","files.preview":"预览 {name}","files.download":"下载 {name}","files.gone":"附件不存在或已被删除","files.readFailed":"无法打开文件({status})","files.readError":"无法打开文件","files.kindImage":"图片","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"文本","files.kindFile":"文件","files.downloadFile":"下载文件","files.showPreview":"预览","files.showSource":"源码","files.showText":"原文","files.openTab":"在新标签页中打开(隔离运行)","files.narrow":"收起预览","files.widen":"扩大预览","files.closePreview":"关闭附件预览","files.running":"脚本正在隔离环境中运行:可以联网,但无法读取 Jarvy 的数据。","files.scripts":{one:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。",other:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。"},"files.scriptHosts":"(引用 {hosts})","files.andMore":" 等","files.stop":"停止脚本","files.run":"运行脚本","files.downloadToView":"此文件请下载后查看","files.tooLarge":"文件超过 1 MB,无法在页面内预览。","files.unsupported":"此文件不支持在页面内预览。","files.reading":"正在读取文件…","files.runningTitle":"{name}(运行中)","files.previous":"上一个附件","files.choose":"选择预览文件","files.next":"下一个附件","question.failed":"提交失败","question.dismissed":"已忽略","question.chose":"已选:{answer}","question.dismissLabel":"关闭问题,不回答","question.dismiss":"跳过","question.multiple":"可多选","question.note":"补充说明(可选)","question.own":"或者自己填写…","question.ownLabel":"自己填写回答","question.confirmCount":"确定({count})","question.confirm":"确定","question.send":"发送","directs.back":"返回列表","directs.between":"{name} 与 {other}","directs.readOnly":"只读","files.kindVideo":"视频","files.kindAudio":"音频","files.cantPlay":"当前浏览器无法播放","files.cantPlayHint":"下载后用播放器打开。"},z8={"threadSort.title":"排序","threadSort.current":"排序:{order}","threadSort.updated":"最近更新","threadSort.created":"创建时间","threadSort.status":"状态","threads.list":"线程列表","threads.closeList":"关闭线程列表","threads.byStatus":"按状态筛选","threads.openCount":"进行中 {count}","threads.doneCount":"已完成 {count}","threads.all":"全部","threads.loading":"正在加载…","threads.none":"暂无线程","threads.following":"已关注","threads.filter":"筛选","threads.unreadCount":"未读 {count}","threads.unread":"未读","threads.noneUnread":"暂无未读线程","threads.noneOpen":"暂无进行中的线程","threads.noneDone":"暂无已完成的线程","threads.notFollowing":"未关注","threads.pick":"选择一个线程","threads.open":"进行中","thread.rename":"修改标题","thread.title":"线程标题","thread.toggleStatus":"切换状态","thread.summary":"摘要","thread.editSummary":"编辑摘要","thread.conclude":"完成并把摘要发到 #{channel}","thread.addSummary":"添加摘要","thread.sourceElsewhere":"原消息不在这个线程里","thread.label":"线程","thread.backToList":"返回线程列表","thread.inChannel":"在频道中查看","thread.search":"搜索线程消息(Ctrl+F)","thread.followingHint":"新回复会计入未读","thread.notFollowingHint":"新回复不会计入未读","thread.follow":"关注","thread.expand":"展开","thread.collapse":"收起到侧栏","thread.close":"关闭线程","thread.conclusion":"结论:","thread.concluded":"已完成,摘要已发到 #{channel}","thread.noReplies":"暂无回复","thread.toLatest":"回到最新回复","thread.reply":"回复线程"},L8={"usage.title":"用量","usage.back":"返回 Bot 信息","usage.range":"时间范围","usage.today":"今天","usage.days":"{count} 天","usage.all":"全部","usage.refresh":"刷新","usage.refreshLabel":"刷新用量","usage.retry":"重试","usage.loading":"正在加载用量…","usage.loadFailed":"用量加载失败","usage.empty":"这段时间没有模型调用","usage.model":"模型","usage.calls":"调用","usage.input":"输入","usage.output":"输出","usage.cacheRead":"缓存读取","usage.cacheWrite":"缓存写入","usage.cost":"费用","usage.total":"合计","usage.unpriced":"未设置价格","usage.notePartial":"合计费用不含未设置价格的模型。","activity.error":"运行出错","activity.running":"运行中","activity.reasoning":"思考中","activity.texting":"回复中","activity.toolCalling":"使用工具","activity.asking":"等你回答","activity.noModel":"未设置模型","activity.idle":"空闲","activity.stopped":"未运行","bot.saved":"已保存","bot.changeFailed":"修改失败","bot.color":"形象颜色","bot.contextHint":"截至 Bot 上次回复时,模型报告的上下文占用","bot.contextStale":"最近一次模型请求异常,当前显示的是上一次请求成功时的上下文占用。","bot.context":"上下文","bot.unknown":"未知","bot.tokens":"{used} / {window} tokens","bot.profile":"个人设定","bot.description":"描述","bot.descriptionPlaceholder":"这个 Bot 能帮你做什么?","bot.personaPlaceholder":"Bot 的性格、职责与行为偏好","bot.personaHint":"下次开始工作时生效。","bot.unsaved":"有未保存的修改","bot.saving":"正在保存…","bot.runtime":"运行","agent.title":"主 Bot","agent.intro":"{name} 是你的主 Bot,替你打理 Jarvy 本身。在私信或频道里跟它说一声,它就能:","agent.create":"新建 Bot,修改它们的名字、描述和 Persona","agent.model":"给 Bot 选模型和思考强度","agent.run":"启动、停止 Bot,查看用量","agent.delete":"删除 Bot、频道、频道分组,或把成员移出频道,每次都先弹卡片请你确认","bot.status":"状态","bot.aborting":"正在中断…","bot.abort":"中断当前任务","bot.starting":"正在启动…","bot.stopping":"正在停止…","bot.start":"启动","bot.stop":"停止","bot.workspace":"工作区","bot.copyWorkspace":"复制工作区路径","bot.activity":"活动历史","bot.subscriptions":"订阅","bot.noSubscriptions":"暂无订阅","bot.threadIn":"线程 · #{channel}","botModel.auto":"使用默认强度","botModel.off":"关闭思考","botModel.minimal":"最少思考","botModel.low":"少量思考","botModel.medium":"适中思考","botModel.high":"更多思考","botModel.xhigh":"高强度思考","botModel.max":"最高强度思考","botModel.loadFailed":"无法加载模型列表","botModel.switchFailed":"切换模型失败","botModel.pick":"选择 Bot 模型","botModel.broken":"这个模型已不可用,请重新选择","botModel.choose":"选择模型","botModel.filter":"筛选 Bot 模型","botModel.filterPlaceholder":"筛选模型…","botModel.list":"Bot 模型","botModel.noMatch":"没有匹配的模型","botModel.none":"暂无模型,请先在设置中添加","botModel.manage":"管理模型","botModel.thinking":"思考强度","botModel.pickThinking":"选择思考强度","botModel.loading":"正在加载模型…","botModel.switching":"正在切换…","botModel.pickFor":"为 {name} 选择模型","deleteBot.title":"删除 {name}","deleteBot.after":"删除后:","deleteBot.chats":{one:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。",other:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。"},"deleteBot.messages":"它在频道和线程里发过的消息会保留,发送者显示为「{name}」,名字可以重新使用。","deleteBot.history":"它的会话历史和未完成的任务都会被清除。","deleteBot.files":"同时删除工作区文件夹","deleteBot.filesHint":"工作区里可能有它生成的文件,不勾选则保留。","deleteBot.deleting":"正在删除…","deleteBot.working":"正在处理…","history.reasoning":"思考","history.text":"正文","history.empty":"(空)","history.image":"History 中的图片","history.toolCall":"工具调用","history.toolResult":"工具结果","history.error":"出错","history.related":"查看关联记录 #{id}","history.result":"结果","history.call":"调用","history.details":"结构化结果","history.view":"记录显示方式","history.content":"内容","history.json":"原始 JSON","history.contentLabel":"记录内容","history.tools":"工具定义","history.toolsRemoved":"移除的工具","history.stopReason":"结束原因","activity.detailFailed":"无法加载记录","activity.detailLoading":"正在加载记录…","activity.openChat":"打开聊天","activity.sentBy":"发送调用 #{id}","activity.roleSystem":"系统","activity.roleUser":"输入","activity.roleAssistant":"助手","activity.timeline":"Bot 活动时间线","activity.chatMessage":"聊天发言 {id}","activity.viewMessage":"查看聊天消息 {sequence} · {chat}","activity.attachmentOnly":"附件消息","activity.attachments":{one:"{count} 个附件",other:"{count} 个附件"},"activity.viewSentBy":"查看发送调用 #{id}","activity.historyRecord":"History 记录 #{id}","activity.viewHistory":"查看 History #{id} · {role}","activity.emptyMessage":"(空消息)","activity.loadFailed":"活动记录加载失败","activity.backToTimeline":"返回时间线","activity.chatRecord":"聊天记录","activity.newestFirst":"最新记录在前","activity.refresh":"刷新活动历史","activity.reading":"正在加载…","activity.columnChat":"聊天","activity.columnTime":"时间","activity.loading":"正在加载活动记录…","activity.empty":"还没有活动记录","activity.newer":"较新","activity.page":"第 {page} 页","activity.older":"较早","activity.historyDetail":"History 记录详情","activity.chatDetail":"聊天记录详情","activity.toolCall":"调用 {name}","activity.toolResult":"{name} · 执行结果","activity.toolFailed":"{name} · 执行出错","activity.images":{one:"{count} 张图片",other:"{count} 张图片"},"bot.newName":"新 Bot","bot.newNameN":"新 Bot {n}"},B8={"npc.toolbar":"NPC 原型","npc.replay":"重播","npc.mood":"基础心情","npc.mood.normal":"普通","npc.mood.happy":"开心","npc.mood.sad":"难过","npc.mood.angry":"生气","npc.mood.dizzy":"晕","npc.poses":"动作","npc.pose.sleep":"睡觉","npc.pose.idle":"空闲","npc.pose.think":"思考","npc.pose.mutter":"自言自语","npc.pose.say":"对你说话","npc.pose.ask":"等你回答","npc.pose.read":"读文件","npc.pose.work":"改文件、跑命令","npc.pose.compact":"压缩上下文","npc.pose.busy":"重试","npc.pose.failed":"报错","npc.pose.done":"做完了","npc.pose.groom":"舔爪子","npc.expand":"展开过程","npc.collapse":"收起","npc.panel":"这一轮","npc.state.running":"进行中","npc.state.ok":"成功","npc.state.failed":"失败","npc.duration":"{value} 秒","npc.done":"做完了 · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"思考","npc.step.mutter":"自言自语","npc.step.read.running":"在读 {target}","npc.step.read.ok":"读了 {target}","npc.step.write.running":"在改 {target}","npc.step.write.ok":"改好了 {target}","npc.step.run.running":"在跑 {target}","npc.step.run.ok":"跑完了 {target}","npc.step.run.failed":"{target} 失败了","npc.step.compact.running":"在整理上下文","npc.step.compact.ok":"整理好了上下文","npc.step.ask.running":"在等你回答","npc.step.ask.ok":"你选了「{answer}」","npc.step.say.running":"在回复你","npc.step.say.ok":"回复了你","npc.step.post.running":"在发到 {chat}","npc.step.post.ok":"发到了 {chat}","npc.demo.think1":"fish 说线程面板打开时会跳一下。可能是滚动的时机不对。先看看 ThreadPane 是怎么滚动的。","npc.demo.think2":"它在回复还没量好高度时就滚了。改成布局之后再滚应该就好。回复数也要算进依赖里。","npc.demo.mutter1":"改好了,先跑一遍构建看看。","npc.demo.mutter2":"嗯……类型没过,ref 可能是空的。","npc.demo.channel":"研发","npc.demo.post":"线程面板打开时跳一下的问题修好了,构建通过,等 fish 确认。","npc.demo.question":"修好了。要不要顺便更新文档里的截图?","npc.demo.yes":"要,一起更新","npc.demo.no":"先不用","npc.demo.replyYes":"好了:线程面板现在打开就停在最新回复,不会再跳;文档里的截图也换成了新的。构建通过。","npc.demo.replyNo":"好了:线程面板现在打开就停在最新回复,不会再跳。构建通过,截图先没动。","npc.live.omitted":"……省略 {count} 字……","npc.live.tokens":"上下文:{before} → {after} tokens","npc.live.compact.running":"在整理上下文","npc.live.compact.ok":"整理好了上下文","npc.live.compact.failed":"整理上下文失败了","npc.live.retry.running":"在重试(第 {attempt}/{max} 次)","npc.live.retry.ok":"重试成功","npc.live.retry.failed":"重试失败了","npc.live.read.running":"在读 {target}","npc.live.read.ok":"读了 {target}","npc.live.read.failed":"没读到 {target}","npc.live.edit.running":"在改 {target}","npc.live.edit.ok":"改好了 {target}","npc.live.edit.failed":"没改成 {target}","npc.live.write.running":"在写 {target}","npc.live.write.ok":"写好了 {target}","npc.live.write.failed":"没写成 {target}","npc.live.run.running":"在跑 {target}","npc.live.run.ok":"跑完了 {target}","npc.live.run.failed":"{target} 失败了","npc.live.script.running":"在跑一段脚本","npc.live.script.ok":"跑完了一段脚本","npc.live.script.failed":"脚本出错了","npc.live.tool.running":"在用 {tool}","npc.live.tool.ok":"用了 {tool}","npc.live.tool.failed":"{tool} 出错了","npc.live.sendFailed":"消息没发出去","npc.live.switch.running":"在切换工作环境","npc.live.switch.ok":"切换了工作环境","npc.live.switch.failed":"没能切换工作环境","npc.live.askFailed":"问题没发出去","npc.live.askClosed":"问题关掉了","npc.live.answerBelow":"在下面的卡片里回答","npc.live.answerIn":"去 {chat} 里回答","npc.live.browse.running":"在翻看 {chat}","npc.live.browse.ok":"翻看了 {chat}","npc.live.browseAll.running":"在翻看聊天","npc.live.browseAll.ok":"翻看了聊天","npc.done.interrupted":"被打断了 · {duration}","npc.done.failed":"这一轮失败了 · {duration}"},I8={"environment.title":"工作环境","environment.computer":"沙箱","environment.computerHint":"由 Jarvy 创建和管理、只供这个 Bot 使用的 Linux 容器,工作区就在其中。推荐。","environment.noDocker":"需要运行 Jarvy 的电脑装有 Docker。","environment.host":"你的电脑","environment.hostHint":"运行 Jarvy 的这台电脑,可以访问你的文件。","environment.default":"默认环境","environment.awayHost":"当前在你的电脑上(由 Bot 自行切换)。","environment.awayComputer":"当前在它的沙箱里(由 Bot 自行切换)。","environment.details":"沙箱详情","environment.sandboxAbout":"只供这个 Bot 使用的 Linux 容器,工作区是它在其中的主目录。","environment.external":"可以使用的外部环境","environment.accessFailed":"无法修改可使用的环境","environment.state.preparing":"准备中","environment.state.running":"运行中","environment.state.stopped":"已停止","environment.state.failed":"出错","environment.state.unavailable":"没有 Docker","environment.hint.preparing":"首次创建沙箱需要几分钟,用于在本机构建镜像。","environment.hint.running":"会一直运行,直到你停止。","environment.hint.stopped":"Bot 需要时会自动启动。","environment.hint.failed":"启动失败,请重试。","environment.hint.unavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","environment.start":"启动","environment.starting":"正在启动…","environment.stop":"停止","environment.stopping":"正在停止…","environment.stopTitle":"停止 {name} 的沙箱?","environment.stopBody":"沙箱里正在运行的程序(如后台服务)会被关闭。已安装的软件和工作区文件都会保留,下次需要时会自动启动。","environment.stopConfirm":"停止","environment.reset":"重置…","environment.resetTitle":"重置 {name} 的沙箱?","environment.resetBody":"沙箱里安装的软件会被清除,恢复到初始状态。工作区文件会保留。","environment.resetConfirm":"重置","environment.changeFailed":"无法切换工作环境"},P8={"connection.lan":"局域网访问","connection.localOnly":"仅限本机","connection.localOnlyHint":"Jarvy 目前只接受这台电脑上的访问。如需在局域网内的其他设备上使用,请用 {flag} 重新启动 Jarvy。","connection.addresses":"访问地址","connection.copy":"复制地址","connection.root":"安全证书","connection.download":"下载证书","connection.fingerprint":"SHA-256 指纹","connection.fingerprintSha1":"SHA-1 指纹","connection.howTo":"安装说明","connection.howMac":"Mac:打开证书将它添加到「钥匙串访问」,双击该证书,在「信任」中将「使用此证书时」设为「始终信任」。","connection.howWindows":"Windows:打开证书,点「安装证书」,选择「将所有的证书都放入下列存储」,再选「受信任的根证书颁发机构」。证书「详细信息」中的「指纹」就是上面的 SHA-1 指纹。","connection.howIos":"iPhone 和 iPad:在 Safari 中下载证书,前往「设置 › 通用 › VPN与设备管理」安装,再在「设置 › 通用 › 关于本机 › 证书信任设置」中针对它启用完全信任。","connection.howAndroid":"Android:下载证书后,在「设置」中搜索「CA 证书」并安装。不同手机的位置不同,通常在「安全」或「加密与凭据」里。","connection.howRestart":"装好后,完全退出浏览器再重新打开,新证书才会生效。","connection.allowHttp":"允许 HTTP 访问","connection.allowHttpHint":"密码和对话会明文传输,只在可信的网络中开启。","connection.insecure":"当前连接未加密,密码和对话内容可能被同一网络中的他人看到。","connection.useHttps":"切换到 HTTPS"},H8={"secrets.add":"添加密钥","secrets.empty":"还没有密钥","secrets.name":"名称","secrets.description":"说明","secrets.descriptionPlaceholder":"可选,例如用途","secrets.value":"值","secrets.newValue":"新值","secrets.newValuePlaceholder":"留空则不修改","secrets.showValue":"显示值","secrets.hideValue":"隐藏值","secrets.shortValue":"这个值少于 8 个字符,出现在 Bot 能看到的内容里时可能不会被隐藏。","secrets.noDescription":"无说明","secrets.grantCount":{one:"{count} 个 Bot",other:"{count} 个 Bot"},"secrets.notGranted":"未授权","secrets.unreadable":"无法解密","secrets.unreadableHint":"这个值是用另一个主密钥加密的,无法读取,请重新输入。","secrets.fingerprint":"指纹","secrets.updated":"更新于 {time}","secrets.usedCount":{one:"已使用 {count} 次",other:"已使用 {count} 次"},"secrets.neverUsed":"从未使用","secrets.grants":"可以使用的 Bot","secrets.noBots":"还没有 Bot。","secrets.addBots":"添加 Bot","secrets.noGrants":"还没有 Bot 可以使用它。","secrets.searchBots":"搜索 Bot","secrets.noMatch":"没有匹配的 Bot","secrets.allGranted":"所有 Bot 都已经可以使用它。","secrets.revoke":"移除 {name}","secrets.onceTag":"仅限本次","secrets.edit":"修改密钥","secrets.uses":"使用记录","secrets.noUses":"暂无使用记录。","secrets.deletedBot":"已删除的 Bot","secrets.useCommand":"命令","secrets.useSsh":"SSH 签名","secrets.delete":"删除密钥","secrets.deleteTitle":"删除 {name}?","secrets.deleteBody":"已授权的 Bot 将无法再使用它,使用记录会保留。","secrets.deleteConfirm":"删除","secrets.masterKey":"主密钥","secrets.keyFile":"保存位置","secrets.keyHint":"备份或迁移 Jarvy 时请一起复制这个文件,丢失后密钥和 API key 需要重新输入。","secretCard.title":"请求使用密钥 {name}","secretCard.valuePlaceholder":"粘贴或输入值","secretCard.insecure":"当前连接未加密,填写的值可能被同一网络中的他人看到。建议先切换到 HTTPS 再填写。","secretCard.exists":"这个密钥已保存在「设置 › 密钥」中。","secretCard.replace":"更换值","secretCard.keepValue":"使用已保存的值","secretCard.unreadable":"已保存的值无法解密,请重新输入。","secretCard.value":"值","secretCard.valueHint":"会加密保存到「设置 › 密钥」,不会出现在聊天里。","secretCard.scope":"Bot 可以使用多久","secretCard.always":"始终允许","secretCard.alwaysHint":"直到你在「设置 › 密钥」里移除","secretCard.once":"仅限本次","secretCard.onceHint":"Bot 当前的任务结束后失效","secretCard.allow":"允许","secretCard.saveAllow":"保存并允许","secretCard.decline":"拒绝","secretCard.allowedAlways":"已允许使用 {name},可以在「设置 › 密钥」中移除","secretCard.allowedOnce":"已允许本次使用 {name}","secretCard.declined":"已拒绝提供 {name}","secretCard.ignored":"已忽略 {name} 的请求","error.secretNameInvalid":"名称只能包含大写字母、数字和下划线,且以字母开头。","error.secretNameTaken":"已有同名的密钥。","error.secretValueMissing":"请输入值。","error.secretValueTooLong":"值太长,最多 16 KB。","error.secretDescriptionInvalid":"说明只能有一行,最多 200 个字符。","error.secretMissing":"找不到这个密钥,它可能已被删除。","error.credentialUnreadable":"已保存的 API key 无法解密,请在「设置 › 模型」中重新输入。"},U8={"settings.machines":"工作环境","machines.add":"添加机器","machines.empty":"还没有机器","machines.host":"地址","machines.hostPlaceholder":"192.168.1.20 或 dev.example.com","machines.port":"端口","machines.user":"用户名","machines.name":"名称","machines.directory":"起始目录","machines.directoryPlaceholder":"用户主目录","machines.next":"下一步","machines.scanning":"正在连接…","machines.fingerprint":"主机指纹","machines.fingerprintHint":"继续之前,请在这台机器上运行 ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub 核对。","machines.password":"登录密码","machines.passwordHint":"用于安装 Jarvy 生成的密钥;机器不支持密钥登录时,密码将加密保存并用于登录。","machines.byPassword":"密码","machines.byKey":"公钥","machines.publicKey":"公钥","machines.keyHint":"添加到 {user} 的 ~/.ssh/authorized_keys 后验证。","machines.copy":"复制","machines.copied":"已复制","machines.verify":"验证并添加","machines.verifying":"正在验证…","machines.login":"登录方式","machines.loginKey":"密钥","machines.loginPassword":"密码","machines.passwordLogin":"该机器不支持密钥登录,当前使用已保存的密码。启用 PubkeyAuthentication 后可切换为密钥登录。","machines.newPassword":"新密码","machines.updatePassword":"更新密码","machines.passwordUpdated":"密码已更新。","machines.useKey":"切换为密钥登录","machines.usingKey":"已切换为密钥登录,保存的密码已删除。","machines.stillPassword":"该机器仍不接受 Jarvy 的密钥。","machines.connect":"连接并添加","machines.connecting":"正在添加…","machines.back":"上一步","machines.check":"检查指纹","machines.checking":"正在检查…","machines.unchanged":"指纹没有变化。","machines.changed":"这台机器现在出示的指纹和之前接受的不同。如果它重装过系统或换了机器,核对后可以接受新指纹;否则可能有人在冒充它。","machines.trust":"接受新指纹","machines.delete":"删除机器","machines.deleteTitle":"删除 {name}?","machines.deleteBody":"会先从这台机器上移除 Jarvy 的密钥。正在使用它的 Bot 会回到默认环境。","machines.deleteConfirm":"删除","machines.forceTitle":"无法连接 {name}","machines.forceBody":"Jarvy 的密钥会留在这台机器的 ~/.ssh/authorized_keys 里(以 {comment} 结尾的那一行),之后可以手动移除。仍要删除吗?","machines.forceConfirm":"仍然删除","machineCard.title":"请求添加机器 {name}","machineCard.existing":"这台机器已在「设置 › 工作环境」中。","machineCard.add":"连接并添加","machineCard.allow":"允许","machineCard.decline":"拒绝","machineCard.added":"已添加 {name}","machineCard.granted":"已允许使用 {name}","machineCard.declined":"已拒绝添加 {name}","machineCard.ignored":"已忽略 {name} 的请求","environment.awayMachine":"当前在 {name} 上(由 Bot 自行切换)。","error.machineMissing":"找不到这台机器,它可能已被删除。","error.machineNameTaken":"已有同名的机器。","error.sshPasswordMissing":"请输入密码。","error.sshKeyUnreadable":"这台机器的密钥无法用当前主密钥解密,请删除后重新添加。","error.sshBadHost":"地址需要是主机名或 IP 地址。","error.sshBadUser":"请填写这台机器上的用户名。","error.sshBadPort":"端口需要在 1–65535 之间。","error.sshBadDirectory":"起始目录需要是绝对路径,或以 ~/ 开头。","error.sshAuthFailed":"用户名或密码错误。","error.sshPasswordRefused":"该机器不支持密码登录,请改用公钥。","error.sshKeyRefused":"该机器未接受 Jarvy 的公钥。请确认已添加到 ~/.ssh/authorized_keys,且 sshd 已启用 PubkeyAuthentication。","error.sshKeyExpired":"公钥已失效,请重新获取并添加到机器。","error.sshUnreachable":"连接不上这台机器,请检查地址、端口和网络。","error.sshHostKeyChanged":"这台机器出示的指纹和之前接受的不同,已停止连接。","error.sshUnsupported":"目前只支持 Linux 和 macOS。","error.sshFailed":"SSH 连接失败:{detail}"},q8={"tasks.title":"定时任务","tasks.empty":"暂无定时任务","tasks.add":"新建任务","tasks.edit":"编辑","tasks.delete":"删除","tasks.deleteTitle":"删除「{name}」?","tasks.deleteBody":"删除后不会再运行。只想停一阵子的话,把它关掉就行。","tasks.toggle":"开启或关闭{name}","tasks.next":"下次 {time}","tasks.paused":"已关闭","tasks.done":"已完成","tasks.newTitle":"新建任务","tasks.editTitle":"编辑任务","tasks.name":"名称","tasks.namePlaceholder":"早间新闻","tasks.instruction":"要做什么","tasks.instructionPlaceholder":"看一遍我关注的新闻网站首页,挑三条值得看的发给我,每条附一句话。","tasks.when":"时间","tasks.kind.once":"一次","tasks.kind.every":"间隔","tasks.kind.daily":"每天","tasks.kind.weekly":"每周","tasks.at":"日期和时间","tasks.everyCount":"每隔","tasks.unit.minutes":"分钟","tasks.unit.hours":"小时","tasks.time":"时间","tasks.weekday":"星期","tasks.minimum":"最短 5 分钟。","tasks.saveFailed":"任务保存失败","tasks.changeFailed":"任务修改失败","tasks.loadFailed":"任务加载失败","tasks.schedule.once":"一次,{time}","tasks.schedule.minutes":{one:"每分钟",other:"每 {count} 分钟"},"tasks.schedule.hours":{one:"每小时",other:"每 {count} 小时"},"tasks.schedule.daily":"每天 {time}","tasks.schedule.weekly":"每{day} {time}","error.taskTimePast":"这个时间已经过了,请选一个以后的时间。","error.taskScheduleInvalid":"检查一下周期:最短每 5 分钟,时间要是有效的。","error.taskInvalid":"给任务起个名字,写上要做什么。"},F8={...R8,...D8,...O8,...z8,...L8,...B8,...I8,...P8,...H8,...U8,...q8},Qb=["en","zh"],Zb={en:M8,zh:F8},_c={en:"en",zh:"zh-CN"},Jb="jarvy-locale";function V8(){var i;const e=localStorage.getItem(Jb);if(e==="en"||e==="zh")return e;const a=((i=navigator.languages)!=null&&i.length?navigator.languages:[navigator.language]).map(r=>r.toLowerCase()).find(r=>/^(en|zh)\b/.test(r));return a!=null&&a.startsWith("zh")?"zh":"en"}let Oi=V8();document.documentElement.lang=_c[Oi];const _p=new Set,eo=()=>Oi;function Wb(e){if(e!==Oi){Oi=e,localStorage.setItem(Jb,e),document.documentElement.lang=_c[e];for(const a of _p)a()}}function ej(){return w.useSyncExternalStore(e=>(_p.add(e),()=>{_p.delete(e)}),eo)}const Mp=(e,a)=>Zb[e][a==="name"?"locale.name":"locale.short"];function tj(e,a){const i=Zb[Oi][e];return typeof i=="string"?i:new Intl.PluralRules(_c[Oi]).select(Number(a))==="one"?i.one:i.other}function x(e,a){const i=tj(e,a==null?void 0:a.count);return a?i.replace(/\{(\w+)\}/g,(r,c)=>c in a?String(a[c]):r):i}const ua=(e,a)=>new Date(e).toLocaleString(_c[Oi],a),to=e=>ua(e,{hour:Oi==="zh"?"2-digit":"numeric",minute:"2-digit"}),x0=e=>{const a=new Date(e).getFullYear()===new Date().getFullYear();return ua(e,{year:a?void 0:"numeric",month:Oi==="zh"?"numeric":"short",day:"numeric"})},zi=(e,a)=>new Intl.NumberFormat(_c[Oi],a).format(e);function b0(e,a){return tj(e,a.count).split(/\{(\w+)\}/).map((i,r)=>o.jsx(w.Fragment,{children:r%2?a[i]??`{${i}}`:i},r))}class hr extends Error{constructor(a,i,r,c){super(i),this.status=a,this.code=r,this.params=c}}async function Se(e,a={}){let i;try{i=await fetch(`/api${e}`,{...a,credentials:"same-origin",headers:{...a.body&&!(a.body instanceof Blob)?{"Content-Type":"application/json"}:{},...a.headers}})}catch{throw new Error(x("api.offline"))}const r=await i.json().catch(()=>({}));if(!i.ok)throw nj(i.status,r);return r}const nj=(e,a)=>{const i=typeof a=="object"&&a!==null?a:{};return new hr(e,i.error===void 0?`HTTP ${e}`:String(i.error),typeof i.code=="string"?i.code:void 0,i.params)};function $8(e,a,i){return new Promise((r,c)=>{const u=new XMLHttpRequest;u.open("POST",`/api/chats/${e}/attachments`),u.setRequestHeader("Content-Type",a.type||"application/octet-stream"),u.setRequestHeader("X-File-Name",encodeURIComponent(a.name)),u.upload.onprogress=d=>{d.lengthComputable&&(i==null||i(d.loaded/d.total))},u.onerror=()=>c(new Error(x("api.offline"))),u.onload=()=>{let d={};try{d=JSON.parse(u.responseText)}catch{}u.status>=200&&u.status<300?r(d):c(nj(u.status,d))},u.send(a)})}async function G8(e,a=0){const i=[];let r=a;for(;;){const c=await Se(`/chats/${e}/messages?after=${r}&limit=1000`);if(i.push(...c.messages),!c.hasMore)return{messages:i};if(c.nextSequence<=r)throw new Error(x("api.historyFailed"));r=c.nextSequence}}const Qe=e=>JSON.stringify(e),he={me:()=>Se("/me"),search:(e,a)=>Se(`/search?q=${encodeURIComponent(e)}${a?`&in=${a}`:""}&limit=60`),login:(e,a)=>Se("/login",{method:"POST",body:Qe({username:e,password:a})}),logout:()=>Se("/logout",{method:"POST"}),bots:()=>Se("/bots"),createBot:e=>Se("/bots",{method:"POST",body:Qe({name:e})}),saveBot:(e,a)=>Se(`/bots/${e}`,{method:"PUT",body:Qe(a)}),modelOptions:()=>Se("/model-options"),selectBotModel:(e,a,i,r,c)=>Se(`/bots/${e}/model`,{method:"PUT",body:Qe({connectionId:a,modelId:i,thinkingLevel:r,language:c})}),answerQuestion:(e,a,i)=>Se(`/chats/${e}/questions/${a}`,{method:"POST",body:Qe(i)}),setBotColor:(e,a)=>Se(`/bots/${e}/color`,{method:"PUT",body:Qe({color:a})}),chats:()=>Se("/chats"),createChat:e=>Se("/chats",{method:"POST",body:Qe({botId:e})}),deleteChat:e=>Se(`/chats/${e}`,{method:"DELETE"}),members:()=>Se("/members"),sections:()=>Se("/sections"),createSection:e=>Se("/sections",{method:"POST",body:Qe(e)}),updateSection:(e,a)=>Se(`/sections/${e}`,{method:"PATCH",body:Qe(a)}),deleteSection:e=>Se(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>Se("/channels",{method:"POST",body:Qe(e)}),updateChannel:(e,a)=>Se(`/chats/${e}`,{method:"PATCH",body:Qe(a)}),addMember:(e,a)=>Se(`/chats/${e}/members`,{method:"POST",body:Qe({memberId:a})}),removeMember:(e,a)=>Se(`/chats/${e}/members/${a}`,{method:"DELETE"}),setNote:(e,a)=>Se(`/chats/${e}/note`,{method:"PUT",body:Qe({text:a})}),markRead:(e,a)=>Se(`/chats/${e}/read`,{method:"POST",body:Qe({sequence:a})}),messages:G8,latestMessages:(e,a)=>Se(`/chats/${e}/messages?tail=${a}`),olderMessages:(e,a,i)=>Se(`/chats/${e}/messages?before=${a}&limit=${i}`),send:(e,a,i,r,c=!1,u,d=[])=>Se(`/chats/${e}/messages`,{method:"POST",body:Qe({content:a,attachmentIds:i,clientMessageId:r,...c?{alsoToChannel:c}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),fold:(e,a)=>Se(`/messages/${e}/fold`,{method:"PUT",body:Qe({folded:a})}),react:(e,a,i)=>Se(`/messages/${e}/reaction`,{method:"PUT",body:Qe({emoji:a,on:i})}),pin:(e,a)=>Se(`/chats/${e}/pin`,{method:"PUT",body:Qe({pinned:a})}),mute:(e,a)=>Se(`/chats/${e}/mute`,{method:"PUT",body:Qe({muted:a})}),deleteBot:(e,a)=>Se(`/bots/${e}${a?"?files=delete":""}`,{method:"DELETE"}),chat:e=>Se(`/chats/${e}`),message:e=>Se(`/messages/${e}`),openThread:e=>Se(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>Se(`/chats/${e}/threads`),followedThreads:()=>Se("/threads"),updateThread:(e,a)=>Se(`/chats/${e}`,{method:"PATCH",body:Qe(a)}),follow:(e,a)=>Se(`/chats/${e}/follow`,{method:"PUT",body:Qe({following:a})}),botDirects:e=>Se(`/members/${e}/dms`),tasks:e=>Se(`/bots/${e}/tasks`),createTask:(e,a)=>Se(`/bots/${e}/tasks`,{method:"POST",body:Qe(a)}),updateTask:(e,a,i)=>Se(`/bots/${e}/tasks/${a}`,{method:"PUT",body:Qe(i)}),setTaskOn:(e,a,i)=>Se(`/bots/${e}/tasks/${a}/${i?"resume":"pause"}`,{method:"POST"}),deleteTask:(e,a)=>Se(`/bots/${e}/tasks/${a}`,{method:"DELETE"}),botSubscriptions:e=>Se(`/members/${e}/subscriptions`),controlBot:(e,a)=>Se(`/bots/${e}/${a}`,{method:"POST"}),setBotEnvironment:(e,a)=>Se(`/bots/${e}/environment`,{method:"PUT",body:Qe({home:a})}),grantHost:(e,a)=>Se(`/bots/${e}/environment`,{method:"PUT",body:Qe({hostGranted:a})}),grantBotMachine:(e,a,i)=>Se(`/bots/${e}/environment`,{method:"PUT",body:Qe({machineId:a,granted:i})}),machines:()=>Se("/environments"),scanMachine:e=>Se("/environments/scan",{method:"POST",body:Qe(e)}),addMachine:e=>Se("/environments",{method:"POST",body:Qe(e)}),prepareMachineKey:()=>Se("/environments/keys",{method:"POST"}),setMachinePassword:(e,a)=>Se(`/environments/${e}/password`,{method:"PUT",body:Qe({password:a})}),updateMachine:(e,a)=>Se(`/environments/${e}`,{method:"PUT",body:Qe(a)}),checkMachine:e=>Se(`/environments/${e}/check`,{method:"POST"}),trustMachine:(e,a)=>Se(`/environments/${e}/trust`,{method:"POST",body:Qe({fingerprints:a})}),deleteMachine:(e,a=!1)=>Se(`/environments/${e}${a?"?force=1":""}`,{method:"DELETE"}),grantMachine:(e,a,i)=>Se(`/environments/${e}/grants/${a}`,{method:"PUT",body:Qe({granted:i})}),fulfilMachine:(e,a,i)=>Se(`/environments/requests/${e}/${a}`,{method:"POST",body:Qe(i)}),computer:(e,a)=>Se(`/bots/${e}/computer/${a}`,{method:"POST"}),connection:()=>Se("/connection"),setConnection:e=>Se("/connection",{method:"PUT",body:Qe({allowHttp:e})}),secrets:()=>Se("/secrets"),createSecret:e=>Se("/secrets",{method:"POST",body:Qe(e)}),updateSecret:(e,a)=>Se(`/secrets/${e}`,{method:"PUT",body:Qe(a)}),deleteSecret:e=>Se(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,a,i)=>Se(`/secrets/${e}/grants/${a}`,{method:"PUT",body:Qe({granted:i})}),secretUses:e=>Se(`/secrets/${e}/uses`),fulfilSecret:(e,a,i)=>Se(`/secrets/requests/${e}/${a}`,{method:"POST",body:Qe(i)}),botStatus:e=>Se(`/bots/${e}/status`),uploadAttachment:$8,removeAttachment:e=>Se(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>Se(`/model-connections/${e}/auth`),authStart:e=>Se(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>Se(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,a,i)=>Se(`/model-connections/${e}/auth/input`,{method:"POST",body:Qe({promptId:a,value:i})}),authLogout:e=>Se(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>Se(`/model-connections/${e}/catalog`),providerModels:e=>Se(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>Se("/model-providers"),autoconfigModel:e=>Se("/model-autoconfig",{method:"POST",body:Qe(e)}),discoverModels:e=>Se("/model-discovery",{method:"POST",body:Qe(e)}),modelConnections:()=>Se("/model-connections"),createModelConnection:e=>Se("/model-connections",{method:"POST",body:Qe(e)}),updateModelConnection:(e,a)=>Se(`/model-connections/${e}`,{method:"PUT",body:Qe(a)}),deleteModelConnection:e=>Se(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,a,i=!1)=>Se(`/model-connections/${e}/credential`,{method:"PUT",body:Qe({apiKey:a,remove:i})}),saveConnectionModel:(e,a,i)=>Se(`/model-connections/${e}/models`,{method:i?"PUT":"POST",body:Qe({model:a,originalId:i})}),deleteConnectionModel:(e,a)=>Se(`/model-connections/${e}/models`,{method:"DELETE",body:Qe({modelId:a})})};/**
50
+ * @license lucide-react v1.47.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const Y8=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
55
+ * @license lucide-react v1.47.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */function X8(e,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Y8(e),size:24,node:a,...i.length>0?{aliases:i}:{}}}/**
60
+ * @license lucide-react v1.47.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const K8=e=>{let a="",i=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){i=a.length>0;continue}a.length===0?a+=r.toLowerCase():a+=i?r.toUpperCase():r,i=!1}return a};/**
65
+ * @license lucide-react v1.47.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const Q8=e=>{const a=K8(e);return a.charAt(0).toUpperCase()+a.slice(1)};/**
70
+ * @license lucide-react v1.47.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const Rp=(...e)=>e.filter((a,i,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===i).join(" ").trim();/**
75
+ * @license lucide-react v1.47.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const ql={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
80
+ * @license lucide-react v1.47.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */function qm(e){return e!=null}function Z8(e,a={}){var b,j;const i=a.attributeNames??{},r=S=>i[S]??S,c=e.size??e.width??ql.width,u=e.size??e.height??ql.height,d=((b=e.aliases)==null?void 0:b.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((j=a.className)==null?void 0:j.split(" ").filter(Boolean))??[],v=a.includeDefaultClasses===!1?Rp(...m):Rp("lucide",...f,...m),y=a.absoluteStrokeWidth?Number(a.strokeWidth??ql["stroke-width"])*Number(e.size??e.width??ql.width)/Number(a.size??a.width??ql.width):a.strokeWidth??ql["stroke-width"];return["svg",{...Object.entries(ql).reduce((S,[k,C])=>(S[r(k)]=C,S),{}),..."color"in a&&a.color&&{[r("stroke")]:a.color},..."size"in a&&qm(a.size)&&{[r("width")]:a.size,[r("height")]:a.size},..."width"in a&&qm(a.width)&&{[r("width")]:a.width},..."height"in a&&qm(a.height)&&{[r("height")]:a.height},[r("stroke-width")]:y,...v&&{[r("class")]:v},[r("viewBox")]:`0 0 ${c} ${u}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},e.node.map(S=>{const[k,C,E]=S,M=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...C}:C;return E?[k,M,E]:[k,M]})]}/**
85
+ * @license lucide-react v1.47.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */function J8(e,a={}){return Z8(e,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
90
+ * @license lucide-react v1.47.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const W8=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},eC=w.createContext({}),tC=()=>w.useContext(eC),nC=w.forwardRef(({color:e,size:a,width:i,height:r,strokeWidth:c,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...p},b)=>{const{size:j=24,strokeWidth:S=2,absoluteStrokeWidth:k=!1,nonScalingStroke:C=!1,color:E="currentColor",className:M=""}=tC()??{},T=!!m||W8(p),[_,z,A=[]]=J8(y,{color:e??E,width:i??a??j,height:r??a??j,strokeWidth:c??S,absoluteStrokeWidth:u??k,nonScalingStroke:d??C,className:Rp(M,f),hasA11yProp:T,attributes:p});return w.createElement(_,{ref:b,...z},[...A.map(([P,H])=>w.createElement(P,H)),...Array.isArray(m)?m:[m]])});/**
95
+ * @license lucide-react v1.47.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */function Me(e,a=[],i=[]){const r=typeof e=="string"?X8(e,a,i):e,c=w.forwardRef(({className:u,...d},f)=>w.createElement(nC,{ref:f,icon:r,className:u,...d}));return r.name&&(c.displayName=Q8(r.name)),c}/**
100
+ * @license lucide-react v1.47.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const aj={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};aj.node;const aC=Me(aj);/**
105
+ * @license lucide-react v1.47.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const ij={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};ij.node;const iC=Me(ij);/**
110
+ * @license lucide-react v1.47.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const rj={name:"arrow-down-up",size:24,node:[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]};rj.node;const rC=Me(rj);/**
115
+ * @license lucide-react v1.47.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const lj={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};lj.node;const Xd=Me(lj);/**
120
+ * @license lucide-react v1.47.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const oj={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};oj.node;const Dp=Me(oj);/**
125
+ * @license lucide-react v1.47.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const sj={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};sj.node;const lC=Me(sj);/**
130
+ * @license lucide-react v1.47.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const cj={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};cj.node;const oC=Me(cj);/**
135
+ * @license lucide-react v1.47.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const uj={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};uj.node;const sC=Me(uj);/**
140
+ * @license lucide-react v1.47.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const dj={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};dj.node;const cC=Me(dj);/**
145
+ * @license lucide-react v1.47.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const fj={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};fj.node;const uC=Me(fj);/**
150
+ * @license lucide-react v1.47.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const hj={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};hj.node;const Qn=Me(hj);/**
155
+ * @license lucide-react v1.47.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const mj={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};mj.node;const Li=Me(mj);/**
160
+ * @license lucide-react v1.47.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const pj={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};pj.node;const gj=Me(pj);/**
165
+ * @license lucide-react v1.47.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const vj={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};vj.node;const al=Me(vj);/**
170
+ * @license lucide-react v1.47.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const yj={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};yj.node;const dC=Me(yj);/**
175
+ * @license lucide-react v1.47.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const xj={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};xj.node;const Kd=Me(xj);/**
180
+ * @license lucide-react v1.47.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const bj={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};bj.node;const fC=Me(bj);/**
185
+ * @license lucide-react v1.47.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const jj={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};jj.node;const j0=Me(jj);/**
190
+ * @license lucide-react v1.47.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const wj={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};wj.node;const Ly=Me(wj);/**
195
+ * @license lucide-react v1.47.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const Sj={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};Sj.node;const hC=Me(Sj);/**
200
+ * @license lucide-react v1.47.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const kj={name:"external-link",size:24,node:[["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"}]]};kj.node;const mC=Me(kj);/**
205
+ * @license lucide-react v1.47.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const Cj={name:"eye-off",size:24,node:[["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"}]]};Cj.node;const Qd=Me(Cj);/**
210
+ * @license lucide-react v1.47.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const Nj={name:"eye",size:24,node:[["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"}]]};Nj.node;const Zd=Me(Nj);/**
215
+ * @license lucide-react v1.47.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const Ej={name:"face-slightly-smiling-plus",size:24,node:[["path",{d:"M13.267 2.08a10 10 0 108.653 8.653",key:"1wbpyh"}],["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M9 10V9",key:"1lazqi"}]],aliases:["smile-plus"]};Ej.node;const pC=Me(Ej);/**
220
+ * @license lucide-react v1.47.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const Tj={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],aliases:["file-audio","file-audio-2"]};Tj.node;const gC=Me(Tj);/**
225
+ * @license lucide-react v1.47.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Aj={name:"file-play",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};Aj.node;const vC=Me(Aj);/**
230
+ * @license lucide-react v1.47.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const _j={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};_j.node;const yC=Me(_j);/**
235
+ * @license lucide-react v1.47.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const Mj={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};Mj.node;const xC=Me(Mj);/**
240
+ * @license lucide-react v1.47.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const Rj={name:"fold-vertical",size:24,node:[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]]};Rj.node;const bC=Me(Rj);/**
245
+ * @license lucide-react v1.47.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const Dj={name:"folder",size:24,node:[["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"}]]};Dj.node;const jC=Me(Dj);/**
250
+ * @license lucide-react v1.47.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const Oj={name:"globe",size:24,node:[["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"}]]};Oj.node;const wC=Me(Oj);/**
255
+ * @license lucide-react v1.47.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const zj={name:"hash",size:24,node:[["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"}]]};zj.node;const SC=Me(zj);/**
260
+ * @license lucide-react v1.47.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const Lj={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};Lj.node;const kC=Me(Lj);/**
265
+ * @license lucide-react v1.47.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const Bj={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};Bj.node;const w0=Me(Bj);/**
270
+ * @license lucide-react v1.47.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const Ij={name:"key-round",size:24,node:[["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"}]]};Ij.node;const Pj=Me(Ij);/**
275
+ * @license lucide-react v1.47.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const Hj={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};Hj.node;const CC=Me(Hj);/**
280
+ * @license lucide-react v1.47.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const Uj={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Uj.node;const qj=Me(Uj);/**
285
+ * @license lucide-react v1.47.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const Fj={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};Fj.node;const NC=Me(Fj);/**
290
+ * @license lucide-react v1.47.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const Vj={name:"megaphone",size:24,node:[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]};Vj.node;const EC=Me(Vj);/**
295
+ * @license lucide-react v1.47.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const $j={name:"message-circle-question-mark",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["message-circle-question"]};$j.node;const Gj=Me($j);/**
300
+ * @license lucide-react v1.47.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const Yj={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};Yj.node;const TC=Me(Yj);/**
305
+ * @license lucide-react v1.47.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const Xj={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};Xj.node;const AC=Me(Xj);/**
310
+ * @license lucide-react v1.47.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const Kj={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};Kj.node;const _C=Me(Kj);/**
315
+ * @license lucide-react v1.47.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const Qj={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};Qj.node;const Zj=Me(Qj);/**
320
+ * @license lucide-react v1.47.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const Jj={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};Jj.node;const MC=Me(Jj);/**
325
+ * @license lucide-react v1.47.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const Wj={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Wj.node;const S0=Me(Wj);/**
330
+ * @license lucide-react v1.47.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const e4={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};e4.node;const RC=Me(e4);/**
335
+ * @license lucide-react v1.47.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const t4={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};t4.node;const DC=Me(t4);/**
340
+ * @license lucide-react v1.47.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const n4={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};n4.node;const k0=Me(n4);/**
345
+ * @license lucide-react v1.47.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const a4={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};a4.node;const OC=Me(a4);/**
350
+ * @license lucide-react v1.47.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const i4={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};i4.node;const zC=Me(i4);/**
355
+ * @license lucide-react v1.47.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const r4={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};r4.node;const Op=Me(r4);/**
360
+ * @license lucide-react v1.47.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const l4={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};l4.node;const sl=Me(l4);/**
365
+ * @license lucide-react v1.47.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const o4={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};o4.node;const LC=Me(o4);/**
370
+ * @license lucide-react v1.47.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const s4={name:"refresh-cw",size:24,node:[["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"}]]};s4.node;const C0=Me(s4);/**
375
+ * @license lucide-react v1.47.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const c4={name:"reply",size:24,node:[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]};c4.node;const BC=Me(c4);/**
380
+ * @license lucide-react v1.47.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const u4={name:"rotate-ccw-clock",size:24,node:[["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"}]],aliases:["history"]};u4.node;const IC=Me(u4);/**
385
+ * @license lucide-react v1.47.0 - ISC
386
+ *
387
+ * This source code is licensed under the ISC license.
388
+ * See the LICENSE file in the root directory of this source tree.
389
+ */const d4={name:"rotate-ccw",size:24,node:[["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"}]]};d4.node;const PC=Me(d4);/**
390
+ * @license lucide-react v1.47.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */const f4={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};f4.node;const Mc=Me(f4);/**
395
+ * @license lucide-react v1.47.0 - ISC
396
+ *
397
+ * This source code is licensed under the ISC license.
398
+ * See the LICENSE file in the root directory of this source tree.
399
+ */const h4={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};h4.node;const m4=Me(h4);/**
400
+ * @license lucide-react v1.47.0 - ISC
401
+ *
402
+ * This source code is licensed under the ISC license.
403
+ * See the LICENSE file in the root directory of this source tree.
404
+ */const p4={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};p4.node;const HC=Me(p4);/**
405
+ * @license lucide-react v1.47.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */const g4={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};g4.node;const UC=Me(g4);/**
410
+ * @license lucide-react v1.47.0 - ISC
411
+ *
412
+ * This source code is licensed under the ISC license.
413
+ * See the LICENSE file in the root directory of this source tree.
414
+ */const v4={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};v4.node;const qC=Me(v4);/**
415
+ * @license lucide-react v1.47.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ */const y4={name:"shrink",size:24,node:[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]};y4.node;const FC=Me(y4);/**
420
+ * @license lucide-react v1.47.0 - ISC
421
+ *
422
+ * This source code is licensed under the ISC license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */const x4={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};x4.node;const VC=Me(x4);/**
425
+ * @license lucide-react v1.47.0 - ISC
426
+ *
427
+ * This source code is licensed under the ISC license.
428
+ * See the LICENSE file in the root directory of this source tree.
429
+ */const b4={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};b4.node;const j4=Me(b4);/**
430
+ * @license lucide-react v1.47.0 - ISC
431
+ *
432
+ * This source code is licensed under the ISC license.
433
+ * See the LICENSE file in the root directory of this source tree.
434
+ */const w4={name:"speech",size:24,node:[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]};w4.node;const $C=Me(w4);/**
435
+ * @license lucide-react v1.47.0 - ISC
436
+ *
437
+ * This source code is licensed under the ISC license.
438
+ * See the LICENSE file in the root directory of this source tree.
439
+ */const S4={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};S4.node;const GC=Me(S4);/**
440
+ * @license lucide-react v1.47.0 - ISC
441
+ *
442
+ * This source code is licensed under the ISC license.
443
+ * See the LICENSE file in the root directory of this source tree.
444
+ */const k4={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};k4.node;const YC=Me(k4);/**
445
+ * @license lucide-react v1.47.0 - ISC
446
+ *
447
+ * This source code is licensed under the ISC license.
448
+ * See the LICENSE file in the root directory of this source tree.
449
+ */const C4={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};C4.node;const Rd=Me(C4);/**
450
+ * @license lucide-react v1.47.0 - ISC
451
+ *
452
+ * This source code is licensed under the ISC license.
453
+ * See the LICENSE file in the root directory of this source tree.
454
+ */const N4={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};N4.node;const N0=Me(N4);/**
455
+ * @license lucide-react v1.47.0 - ISC
456
+ *
457
+ * This source code is licensed under the ISC license.
458
+ * See the LICENSE file in the root directory of this source tree.
459
+ */const E4={name:"unfold-vertical",size:24,node:[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]]};E4.node;const XC=Me(E4);/**
460
+ * @license lucide-react v1.47.0 - ISC
461
+ *
462
+ * This source code is licensed under the ISC license.
463
+ * See the LICENSE file in the root directory of this source tree.
464
+ */const T4={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};T4.node;const KC=Me(T4);/**
465
+ * @license lucide-react v1.47.0 - ISC
466
+ *
467
+ * This source code is licensed under the ISC license.
468
+ * See the LICENSE file in the root directory of this source tree.
469
+ */const A4={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};A4.node;const QC=Me(A4);/**
470
+ * @license lucide-react v1.47.0 - ISC
471
+ *
472
+ * This source code is licensed under the ISC license.
473
+ * See the LICENSE file in the root directory of this source tree.
474
+ */const _4={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};_4.node;const ZC=Me(_4);/**
475
+ * @license lucide-react v1.47.0 - ISC
476
+ *
477
+ * This source code is licensed under the ISC license.
478
+ * See the LICENSE file in the root directory of this source tree.
479
+ */const M4={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};M4.node;const ds=Me(M4),R4={list:(e,a)=>Se(`/bots/${e}/activity${a===void 0?"":`?before=${encodeURIComponent(a)}`}`),message:(e,a)=>Se(`/bots/${e}/activity/messages/${a}`)};function D4(e){var a,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(a=0;a<c;a++)e[a]&&(i=D4(e[a]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function JC(){for(var e,a,i=0,r="",c=arguments.length;i<c;i++)(e=arguments[i])&&(a=D4(e))&&(r&&(r+=" "),r+=a);return r}const By=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Iy=JC,E0=(e,a)=>i=>{var r;if((a==null?void 0:a.variants)==null)return Iy(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:u}=a,d=Object.keys(c).map(v=>{const y=i==null?void 0:i[v],p=u==null?void 0:u[v];if(y===null)return null;const b=By(y)||By(p);return c[v][b]}),f=i&&Object.entries(i).reduce((v,y)=>{let[p,b]=y;return b===void 0||(v[p]=b),v},{}),m=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((v,y)=>{let{class:p,className:b,...j}=y;return Object.entries(j).every(S=>{let[k,C]=S;return Array.isArray(C)?C.includes({...u,...f}[k]):{...u,...f}[k]===C})?[...v,p,b]:v},[]);return Iy(e,d,m,i==null?void 0:i.class,i==null?void 0:i.className)},O4=48,Ui=(e,a=0)=>{const i=new Int32Array(e.length);for(let r=0;r<e.length;r++)i[r]=e.charCodeAt(r)-O4-a;return i},Jd=e=>{const a=new Int32Array(e.length+1);for(let i=0;i<e.length;i++)a[i+1]=a[i]+e[i];return a},rl=e=>{const a=new Int32Array(e.length);let i=0;for(let r=0;r<e.length;r++){const c=e.charCodeAt(r)-O4;i+=c>>>1^-(c&1),a[r]=i}return a},WC=384,e7=[],Yl=Jd(Ui("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),t7=Jd(Ui(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),n7="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",a7=(()=>{const e=Yl.length-1,a=new Int32Array(e);for(let c=e-1;c>=0;c--){let u=1,d=c+1;for(let f=Yl[c];f<Yl[c+1];f++)u+=a[d],d+=a[d];a[c]=u}const i=new Int32Array(Yl[e]);let r=0;for(let c=0;c<e;c++){let u=c+1;for(let d=Yl[c];d<Yl[c+1];d++)i[r++]=u,u+=a[u]}return i})(),i7=Ui("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),r7=Jd(Ui("123333359346463635126536711576")),l7=Ui("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),o7=Ui("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),s7=rl("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),c7=(()=>{const e=new Int32Array(319).fill(-1),a=rl("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=rl("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let r=0;r<a.length;r++)e[a[r]]=i[r];return e})(),u7="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const a=e.split(" "),i=a.shift();for(let r=0;r<a.length;r++)a[r]=i+a[r];return a}),Py=rl("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),d7=rl("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),f7=rl("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~‚22…ˆ‡:22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨©000¬00000000000000021M®­00°“000000000000000000000–222›HGHa1º222¿2À2222ÉÌ000­°2±"),z4=new Int32Array(995),L4=new Int32Array(995),B4=new Int32Array(995);let zp="";const Lp=new Int32Array(1038);{const e=new Map;let a=0,i=0;for(let r=0;r<Py.length;r++)for(const c of u7[f7[r]]){let u=e.get(c);u===void 0&&(u=a++,e.set(c,u),Lp[u*2]=zp.length,Lp[u*2+1]=c.length,zp+=c),z4[i]=Py[r],L4[i]=d7[r],B4[i]=u,i++}}const h7=rl("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),m7=Jd(Ui("1::24444432:442:44:44>222222:44:4421322511111311111114")),p7=rl("2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),g7=Ui("ij"),v7=Ui("—"),y7=Ui("1"),x7="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var b7={GROUP_COUNT:WC,customValidatorNames:e7,edgeStart:Yl,labelStart:t7,labelText:n7,edgeTarget:a7,nodeGroup:i7,nodeVlist:c7,vlistPat:r7,vlistOps:l7,vlistRef:o7,vlistGroup:s7,litAnchor:z4,litGroup:L4,litPool:B4,poolOffsets:Lp,poolText:zp,adjGid:h7,adjStart:m7,adjTgt:p7,patGid:g7,patTgt:v7,postfixLookupGroups:y7,orderSensitiveModifiers:x7};const j7="line"in new Error,Ei=-1,Fl=-1,Fm=(e,a,i)=>{let r=2166136261;for(let c=a;c<i;c++)r=Math.imul(r^e.charCodeAt(c),16777619);return r},kd=(e,a,i)=>{const r=i-a;let c=Math.imul(r,2654435761)^e.charCodeAt(a);if(r>3){const u=r>>2,d=r>>1;c=Math.imul(c^e.charCodeAt(a+1)<<8^e.charCodeAt(a+2)<<16^e.charCodeAt(a+u),2246822507),c=Math.imul(c^e.charCodeAt(a+d)<<8^e.charCodeAt(a+d+u)<<16^e.charCodeAt(i-3),3266489909),c^=e.charCodeAt(i-2)<<8^e.charCodeAt(i-1)<<16;for(let f=a+3,m=i-4;f<a+8&&f<m;f++,m--)c=Math.imul(c^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return c^c>>>15|0},w7=(e,a,i={})=>{const{GROUP_COUNT:r,edgeStart:c,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:p,vlistRef:b,vlistGroup:j,litAnchor:S,litGroup:k,litPool:C,poolOffsets:E,poolText:M,adjGid:T,adjStart:_,adjTgt:z,patGid:A,patTgt:P,postfixLookupGroups:H,customValidatorNames:U,orderSensitiveModifiers:O}=e,G=new Int32Array(r).fill(-1);for(let ue=0;ue<T.length;ue++)G[T[ue]]=ue;let q=0;for(let ue=0;ue+1<_.length;ue++){const be=_[ue+1]-_[ue];be>q&&(q=be)}let Q=32;for(;Q<2*(1+q+A.length);)Q<<=1;const V=new Int32Array(b.length+1);for(let ue=0;ue<b.length;ue++)V[ue+1]=V[ue]+y[b[ue]+1]-y[b[ue]];const Y=new Uint8Array(r);for(let ue=0;ue<H.length;ue++)Y[H[ue]]=1;const K=c.length-1,D=new Uint8Array(K);let $=0,ne=!0;for(let ue=0;ue<S.length;ue++){D[S[ue]]=1;const be=E[C[ue]*2+1];be>$&&($=be);const I=M.charCodeAt(E[C[ue]*2]);(I===91||I===40)&&(ne=!1)}let R=1;for(;R<S.length*2;)R<<=1;const le=new Int32Array(R).fill(-1);for(let ue=0;ue<S.length;ue++){const be=E[C[ue]*2];let I=(Fm(M,be,be+E[C[ue]*2+1])^Math.imul(S[ue],2654435761)|0)&R-1;for(;le[I]!==-1;)I=I+1&R-1;le[I]=ue}const ie=(ue,be,I,ae)=>{let me=(Fm(be,I,ae)^Math.imul(ue,2654435761)|0)&R-1;const Te=ae-I;for(;;){const Ee=le[me];if(Ee===-1)return-1;if(S[Ee]===ue&&E[C[Ee]*2+1]===Te){const He=E[C[Ee]*2];let Ie=!0;for(let ze=0;ze<Te;ze++)if(M.charCodeAt(He+ze)!==be.charCodeAt(I+ze)){Ie=!1;break}if(Ie)return k[Ee]}me=me+1&R-1}},B=i.cacheSize??8192,F=i.prefix??e.prefix??"",se=F===""?"":F+":",ye=se.length,we=(U??[]).map(ue=>{throw new Error("cn: missing validator "+ue)}),ce=/\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$/,xe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ce=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let W=0,je=-1,Re=-1,Oe=-1,Fe=-1;const Je=ue=>ue>=97&&ue<=122||ue>=65&&ue<=90||ue>=48&&ue<=57||ue===95,We=ue=>/\s/.test(String.fromCharCode(ue)),Ct=(ue,be,I)=>{if(W=0,je=-1,I-be<3)return;const ae=ue.charCodeAt(be),me=ue.charCodeAt(I-1);if(ae===91&&me===93)W=1;else if(ae===40&&me===41)W=2;else return;Oe=be+1,Fe=I-1;let Te=be+1;if(Je(ue.charCodeAt(Te))){for(Te++;Te<I-1;){const Ee=ue.charCodeAt(Te);if(!Je(Ee)&&Ee!==45)break;Te++}Te<I-2&&ue.charCodeAt(Te)===58&&(je=be+1,Re=Te,Oe=Te+1)}},rn=(ue,be,I,ae)=>{if(I-be!==ae.length)return!1;for(let me=0;me<ae.length;me++)if(ue.charCodeAt(be+me)!==ae.charCodeAt(me))return!1;return!0},xn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fa=ue=>!!ue&&!Number.isNaN(Number(ue)),ln=(ue,be,I)=>{if(I-be<11||!rn(ue,be,be+10,"@container"))return!1;if(ue.charCodeAt(be+10)===47)return I-be>=12;const ae=ue.charCodeAt(be+11);return ae===115&&I-be>=17&&rn(ue,be+10,be+16,"-size/")||ae===110&&I-be>=19&&rn(ue,be+10,be+18,"-normal/")},Ga=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],fe="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(ue=>ue.split(" ")),Ne=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],qe=(ue,be,I,ae)=>{if(ue>=10){if(ue>=25)return we[ue-25](be.slice(I,ae));const me=ue-10;if(W!==Ga[me])return!1;if(je>=0){for(const Te of fe[me])if(rn(be,je,Re,Te))return!0;return!1}switch(Ne[me]){case 0:return!1;case 1:return!0;case 2:{const Te=be.slice(Oe,Fe);return ce.test(Te)&&!xe.test(Te)}case 3:return fa(be.slice(Oe,Fe));case 4:return pe.test(be.slice(Oe,Fe));default:return Ce.test(be.slice(Oe,Fe))}}switch(ue){case 0:return!0;case 1:return W===0;case 2:return W===1;case 3:return W===2;case 4:return xn.test(be.slice(I,ae));case 5:return fa(be.slice(I,ae));case 6:{const me=be.slice(I,ae);return!!me&&Number.isInteger(Number(me))}case 7:return ae>I&&be.charCodeAt(ae-1)===37&&fa(be.slice(I,ae-1));case 8:return Pn.test(be.slice(I,ae));default:return ln(be,I,ae)}},Ge=new Set(typeof O=="string"?O.split(" "):O),nt=(ue,be,I,ae,me,Te)=>{const Ee=Fm(be,I,ae)^(me?2654435769:0)|0;let He=ue.get(Ee);if(He!==void 0)e:for(let Pe=0;Pe<He.length;Pe++){const ut=He[Pe];if(!(ut.imp!==me||ut.k.length!==ae-I)){for(let Ve=0;Ve<ut.k.length;Ve++)if(ut.k.charCodeAt(Ve)!==be.charCodeAt(I+Ve))continue e;return ut.id}}else ue.set(Ee,He=[]);const Ie=be.slice(I,ae),ze=Te(Ie);return He.push({k:Ie,imp:me,id:ze}),ze};let Ut=new Map,dn=new Map,qt=2;const Rn=4096,Hn=(ue,be)=>{const I=[];let ae=0,me=0,Te=0;for(let ze=0;ze<ue.length;ze++){const Pe=ue.charCodeAt(ze);ae===0&&me===0&&Pe===58?(I.push(ue.slice(Te,ze)),Te=ze+1):Pe===91?ae++:Pe===93?ae--:Pe===40?me++:Pe===41&&me--}I.push(ue.slice(Te));let Ee=I[0];if(I.length>1){const ze=[];let Pe=[];for(const ut of I)ut.charCodeAt(0)===91||Ge.has(ut)?(Pe.length&&(ze.push(...Pe.sort()),Pe=[]),ze.push(ut)):Pe.push(ut);Pe.length&&ze.push(...Pe.sort()),Ee=ze.join(":")}const He=be?Ee+" !":Ee;let Ie=dn.get(He);return Ie===void 0&&dn.set(He,Ie=qt++),Ie};let zt=new Map,Dn=r;const Xe=r+4096,Yt=()=>Dn++,ml=2097152,ui=8192,di=new Int32Array(ui),bn=new Array(ui).fill(null),ha=new Int32Array(ui),pl=new Int32Array(ui),ma=new Uint8Array(ui);let fo=0;const Ya=(ue,be,I,ae,me,Te,Ee,He)=>{let Ie=ue;if(bn[ue]!==null)if(bn[ue|1]===null)Ie=ue|1;else if((fo++&3)===0)Ie=ue|fo>>2&1;else return;bn[Ie]=be.slice(I,ae),di[Ie]=me,ha[Ie]=Te,pl[Ie]=Ee,ma[Ie]=He},fn=()=>bn.fill(null);let It=256,$t=[new Int32Array(It),new Int32Array(It),new Int32Array(It),new Int32Array(It)],[fi,hi,Xa,Ka]=$t,Ra=new Uint8Array(It),Zn=new Uint8Array(It);const Qa=()=>{It*=2,$t=$t.map(be=>{const I=new Int32Array(It);return I.set(be),I}),[fi,hi,Xa,Ka]=$t;const ue=new Uint8Array(It);ue.set(Ra),Ra=ue,Zn=new Uint8Array(It)};let pa=64,ga=new Int32Array(pa),mi=new Int32Array(pa);const gl=new Int32Array(r);let va=2048,Cr=21,Za=new Float64Array(va),Ja=new Int32Array(va),Un=0;const Vi=(ue,be)=>{if(ue===0&&be<r)return gl[be]===Un?1:(gl[be]=Un,0);const I=ue*2097152+be+1;let ae=Math.imul(I,2654435761)>>>Cr;for(;Ja[ae]===Un;){if(Za[ae]===I)return 1;ae=ae+1&va-1}return Za[ae]=I,Ja[ae]=Un,0},Xt=(ue,be,I,ae,me)=>{if(I-be>=2&&ue.charCodeAt(be)===91&&ue.charCodeAt(I-1)===93){let Te=-1;for(let Ee=be+1;Ee<I-1;Ee++)if(ue.charCodeAt(Ee)===58){Te=Ee;break}return Te===-1||Te===be+1?Ei:nt(zt,ue,be+1,Te,0,Yt)}if(ae>=0&&m[ae]>=0)return m[ae];for(let Te=me-1;Te>=0;Te--){const Ee=mi[Te];if(Ee>I)continue;const He=ga[Te],Ie=I-Ee;if(D[He]===1&&Ie>0&&Ie<=$){const Pt=ue.charCodeAt(Ee);if(ne===!1||Pt!==91&&Pt!==40){const ya=ie(He,ue,Ee,I);if(ya>=0)return ya}}const ze=v[He];if(ze<0)continue;const Pe=b[ze],ut=y[Pe],Ve=y[Pe+1];if(ut===Ve)continue;Ct(ue,Ee,I);const cn=V[ze]-ut;for(let Pt=ut;Pt<Ve;Pt++)if(qe(p[Pt],ue,Ee,I))return j[cn+Pt]}return Ei},on=ue=>{const be=ue.length;let I=0,ae=0,me=!1;(qt>Rn||Ut.size>Rn)&&(Ut=new Map,dn=new Map,qt=2,fn()),Dn>Xe&&(zt=new Map,Dn=r,fn());let Te=0;for(;Te<be;){let ze=ue.charCodeAt(Te);if(ze===32||ze>=9&&ze<=13||ze>=160&&We(ze)){ze!==32&&(me=!0),Te++;continue}const Pe=Te;let ut=0;for(;Te<be;){if(ze=ue.charCodeAt(Te),ze<=32){if(ze===32)break;if(ze>=9&&ze<=13){me=!0;break}}else if(ze>=160&&We(ze)){me=!0;break}ut=Math.imul(ut^ze,16777619),Te++}const Ve=Te,cn=Ve-Pe;I===It&&Qa();const Pt=I++;fi[Pt]=Pe,hi[Pt]=Ve,ae+=cn,ut^=Math.imul(cn,2654435761);const ya=ut^ut>>>15|0,Kt=ya&8190;{let ht=-1;if(di[Kt]===ya&&bn[Kt]!==null&&bn[Kt].length===cn?ht=Kt:di[Kt|1]===ya&&bn[Kt|1]!==null&&bn[Kt|1].length===cn&&(ht=Kt|1),ht>=0){const hn=bn[ht];let Da=!0;for(let ja=0;ja<cn;ja++)if(hn.charCodeAt(ja)!==ue.charCodeAt(Pe+ja)){Da=!1;break}if(Da){Xa[Pt]=ha[ht],Ka[Pt]=pl[ht],Ra[Pt]=ma[ht];continue}}}let Qt=Pe;if(ye!==0){if(Ve-Pe<=ye||!ue.startsWith(se,Pe)){Xa[Pt]=Ei,Ya(Kt,ue,Pe,Ve,ya,Ei,0,0);continue}Qt=Pe+ye}let ho=0,xs=0,Qi=-1,mo=-1;for(let ht=Qt;ht<Ve;ht++){const hn=ue.charCodeAt(ht);if(ho===0&&xs===0){if(hn===58){Qi=ht;continue}if(hn===47){mo=ht;continue}}hn===91?ho++:hn===93?ho--:hn===40?xs++:hn===41&&xs--}const qc=Qi>=Qt?Qi+1:Qt;let Ot=qc,On=Ve,Tr=!1,po=0;On>Ot&&ue.charCodeAt(On-1)===33?(Tr=!0,On--):On>Ot&&ue.charCodeAt(Ot)===33&&(Tr=!0,Ot++,po=1);let ta=-1;mo>qc&&(ta=mo+po,ta>=On&&(ta=-1));let go=Ot;On-Ot>1&&ue.charCodeAt(Ot)===45&&(go=Ot+1);let xa=0,qn=0,Ar=0,bs=-1,ba=0;(v[0]>=0||D[0]===1)&&(ga[0]=0,mi[0]=go,ba=1);let vl=Fl,js=0;for(let ht=go;ht<On;ht++)if(ht===ta&&(vl=qn<Ar?Fl:xa,js=ba),xa!==Fl){const hn=ue.charCodeAt(ht);let Da=-1;if(qn<Ar)d.charCodeAt(qn)===hn?(qn++,qn===Ar&&(Da=xa=bs)):xa=Fl;else{const ja=c[xa],bl=c[xa+1];let Zi=Fl;for(let Sn=ja;Sn<bl;Sn++){const jl=u[Sn];if(d.charCodeAt(jl)===hn){u[Sn+1]-jl===1?Da=Zi=f[Sn]:(qn=jl+1,Ar=u[Sn+1],bs=f[Sn],Zi=xa);break}}xa=Zi}if(Da>=0&&(v[Da]>=0||D[Da]===1)&&ht+1<On&&ue.charCodeAt(ht+1)===45){if(ba===pa){pa*=2;const ja=new Int32Array(pa);ja.set(ga),ga=ja;const bl=new Int32Array(pa);bl.set(mi),mi=bl}ga[ba]=Da,mi[ba]=ht+2,ba++}}ta===On&&(vl=qn<Ar?Fl:xa,js=ba);const ws=qn<Ar?Fl:xa;let wn,Fn=!1;if(ta>=0)if(Fn=!0,wn=Xt(ue,Ot,ta,vl,js),wn!==Ei&&wn<r&&Y[wn]){const ht=Xt(ue,Ot,On,ws,ba);ht!==Ei&&ht!==wn&&(wn=ht,Fn=!1)}else wn===Ei&&(wn=Xt(ue,Ot,On,ws,ba),Fn=!1);else wn=Xt(ue,Ot,On,ws,ba);let yl=0,xl=0;wn===Ei?Xa[Pt]=Ei:(xl=Fn?1:0,yl=Qt>=Qi?Tr?1:0:nt(Ut,ue,Qt,Qi,Tr?1:0,ht=>Hn(ht,Tr)),Xa[Pt]=wn,Ra[Pt]=xl,Ka[Pt]=yl),Ya(Kt,ue,Pe,Ve,ya,wn,yl,xl)}if(I===0)return"";if(I===1)return fi[0]===0&&hi[0]===be?ue:ue.slice(fi[0],hi[0]);if(I*Q>va){for(;I*Q>va;)va<<=1,Cr--;Za=new Float64Array(va),Ja=new Int32Array(va)}if(qt>=ml||Dn>=ml)throw new Error("cn: too many distinct classes in one merge");Un=Un+1|0,Un===0&&(gl.fill(0),Ja.fill(0),Un=1);let Ee=!1;for(let ze=I-1;ze>=0;ze--){const Pe=Xa[ze];if(Pe===Ei){Zn[ze]=1;continue}const ut=Ka[ze];if(Vi(ut,Pe)===1){Zn[ze]=0,Ee=!0;continue}if(Zn[ze]=1,Pe<r){const Ve=G[Pe];if(Ve>=0)for(let cn=_[Ve];cn<_[Ve+1];cn++)Vi(ut,z[cn]);if(Ra[ze]&1)for(let cn=0;cn<A.length;cn++)A[cn]===Pe&&Vi(ut,P[cn])}}if(!Ee&&!me&&be===ae+I-1)return ue;let He="",Ie=0;for(;Ie<I;){if(!Zn[Ie]){Ie++;continue}const ze=fi[Ie];let Pe=hi[Ie],ut=Ie+1;for(;ut<I&&Zn[ut]&&fi[ut]===Pe+1&&ue.charCodeAt(Pe)===32;)Pe=hi[ut],ut++;He.length>0&&(He+=" "),He+=ue.slice(ze,Pe),Ie=ut}return He},Jn=16384,Wn=new Int32Array(Jn*2);let $i=0,xt=1,Dt=Object.create(null),sn=Object.create(null),jn=new Map,Gi=new Map,Nr=0,Er=0;const pi=()=>{$i^=Jn,xt=xt+1|0,Er=0},Yi=ue=>{let be=Dt[ue];if(be!==void 0)return be;const I=kd(ue,0,ue.length),ae=(I&16383)+$i,me=Wn[ae]===(I^xt)||Wn[ae^Jn]===(I^xt-1);return me&&(be=sn[ue],be!==void 0)?(Dt[ue]=be,be):(be=on(ue),me?(Dt[ue]=be,++Nr>B&&(Nr=0,sn=Dt,Dt=Object.create(null),pi())):(Wn[ae]=I^xt,++Er>Jn&&pi()),be)},Xi=ue=>{let be=jn.get(ue);if(be!==void 0)return be;const I=kd(ue,0,ue.length),ae=(I&16383)+$i,me=Wn[ae]===(I^xt)||Wn[ae^Jn]===(I^xt-1);return me&&(be=Gi.get(ue),be!==void 0)?(jn.set(ue,be),be):(be=on(ue),me?(jn.set(ue,be),++Nr>B&&(Nr=0,Gi=jn,jn=new Map,pi())):(Wn[ae]=I^xt,++Er>Jn&&pi()),be)},Ki=ue=>{const be=kd(ue,0,ue.length),I=(be&16383)+$i;return Wn[I]===(be^xt)||Wn[I^Jn]===(be^xt-1)?!0:(Wn[I]=be^xt,++Er>Jn&&pi(),!1)},ea=B===0?on:j7?ue=>{const be=jn.get(ue);return be!==void 0?be:Xi(ue)}:Yi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ea(arguments[0]):ea(k7.apply(null,arguments))},mergeString:ea,seenBefore:B===0?()=>!1:Ki,mergeUncached:on}},Dd=(e,a)=>{if(!e)return"";if(typeof e=="string")return e;let i="";if(typeof e.length=="number"&&(!a||Array.isArray(e))){const r=e;for(let c=0;c<r.length;c++){const u=r[c];if(!u)continue;const d=typeof u=="string"?u:Dd(u,a);d&&(i&&(i+=" "),i+=d)}return i}if(a){if(typeof e=="number")return""+e;if(typeof e=="object")for(const r in e)e[r]&&(i&&(i+=" "),i+=r)}return i},S7=(e,a)=>{let i="";for(let r=0;r<e.length;r++){const c=e[r];if(!c)continue;const u=typeof c=="string"?c:Dd(c,a);u&&(i&&(i+=" "),i+=u)}return i},k7=function(){return S7(arguments,!1)},C7=256,Hy=16,N7=1024,Vm=4096,E7=(e,a)=>{const i=a===void 0?()=>!0:a.seenBefore,r=a===void 0?e:a.mergeUncached;let c=new Map,u=new Map,d=0,f=null,m=null,v=[],y=[],p=0;const b=(E,M,T)=>{m===null&&(m=new Array(Vm).fill(""),v=new Array(Vm).fill(""),y=new Array(Vm).fill(""));const _=kd(E,0,E.length)&4094;if(m[_]===E&&v[_]===M)return y[_];if(m[_|1]===E&&v[_|1]===M)return y[_|1];const z=e(T?M+" "+E:E),A=m[_]===""?_:_|(m[_|1]===""?1:p++&1);return m[A]=E,v[A]=M,y[A]=z,z},j=(E,M,T,_)=>{let z=0;if(M){if(M!==E.a0)return!1;z=1}if(T){if(T!==(z===0?E.a0:E.a1))return!1;z++}if(_){if(_!==(z===0?E.a0:z===1?E.a1:E.a2))return!1;z++}return z===E.t},S=(E,M)=>{const T=E.a;let _=0;for(let z=0;z<M.length;z++){const A=M[z];if(A){if(A!==T[_])return!1;_++}}return _===E.t},k=(E,M)=>{const T=E.length,_=f===null?null:f.n;if(!M){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let z="",A=-1,P=0,H=!1;for(let G=0;G<T;G++){let q=E[G];if(q){if(typeof q!="string"){if(q=E[G]=Dd(q,!0),!q)continue;H=!0}A<0&&(z=q,A=G),P++}}if(P===0)return"";if(P===1)return e(z);if(H){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let U=c.get(z);U===void 0&&(U=u.get(z),U!==void 0&&c.set(z,U));let O=null;if(U!==void 0){if(U.skip>0){U.skip--,f=null;let q=z;for(let Q=A+1;Q<T;Q++){const V=E[Q];V&&(q+=" "+V)}return b(q,"",!1)}const G=U.e;e:for(let q=0;q<G.length;q++){const Q=G[q];if(Q.t!==P)continue;const V=Q.a;let Y=1;for(let K=A+1;K<T;K++){const D=E[K];if(D&&D!==V[Y++])continue e}O=Q;break}O!==null&&(U.miss=0)}if(O===null){let G=z;const q=[z];for(let V=A+1;V<T;V++){const Y=E[V];Y&&(G+=" "+Y,q.push(Y))}if(!i(G))return r(G);O={r:e(G),t:q.length,a0:q[0],a1:q[1],a2:q[2]??"",a:q,n:null},U===void 0?c.set(z,U={e:[],miss:0,skip:0,at:0}):++U.miss>Hy&&(U.miss=Hy,U.skip=N7,U.e.length=0,U.at=0);const Q=U.e;Q.length<C7?Q.push(O):(Q[U.at]=O,U.at=U.at+1&255),++d>1e3&&(d=0,u=c,c=new Map)}return f!==null&&f!==O&&(f.n=O),f=O,O.r},C=E=>Array.isArray(E)?k(E.slice(),!1):e(Dd(E,!0));return function(E,M,T){const _=arguments.length;if((_|1)===3){const P=f;if(P!==null){const H=P.n;if(H!==null&&j(H,E,M,T))return f=H,H.r;if(P!==H&&j(P,E,M,T))return P.r}if(_===2&&typeof M=="string"&&M!==""){const H=c.get(E);if(H!==void 0&&H.skip>0)return H.skip--,f=null,b(M,E,!0)}return k([E,M,T],!0)}if(_===1)return typeof E=="string"?e(E):C(E);const z=f;if(z!==null){const P=z.n;if(P!==null){const H=P.a;let U=0,O=!0;for(let G=0;G<_;G++){const q=arguments[G];if(q){if(q!==H[U]){O=!1;break}U++}}if(O&&U===P.t)return f=P,P.r}if(z!==P){const H=z.a;let U=0,O=!0;for(let G=0;G<_;G++){const q=arguments[G];if(q){if(q!==H[U]){O=!1;break}U++}}if(O&&U===z.t)return z.r}}const A=[];for(let P=0;P<_;P++)A.push(arguments[P]);return k(A,!0)}},Uy=w7(b7),an=E7(Uy.mergeString,Uy);var so=Kb(),T7=Object.defineProperty,T0=(e,a)=>T7(e,"name",{value:a,configurable:!0});function Bp(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}T0(Bp,"setRef");function I4(...e){return a=>{let i=!1;const r=e.map(c=>{const u=Bp(c,a);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c<r.length;c++){const u=r[c];typeof u=="function"?u():Bp(e[c],null)}}}}T0(I4,"composeRefs");function kt(...e){return w.useCallback(I4(...e),e)}T0(kt,"useComposedRefs");var A7=Object.defineProperty,si=(e,a)=>A7(e,"name",{value:a,configurable:!0});function Bi(e){const a=w.forwardRef((i,r)=>{let{children:c,...u}=i,d=null,f=!1;const m=[];Ip(c)&&typeof ld=="function"&&(c=ld(c._payload)),w.Children.forEach(c,b=>{var j;if(q4(b)){f=!0;const S=b;let k="child"in S.props?S.props.child:S.props.children;Ip(k)&&typeof ld=="function"&&(k=ld(k._payload)),d=R7(S,k),m.push((j=d==null?void 0:d.props)==null?void 0:j.children)}else m.push(b)}),d?d=w.cloneElement(d,void 0,m):!f&&w.Children.count(c)===1&&w.isValidElement(c)&&(d=c);const v=d?U4(d):void 0,y=kt(r,v);if(!d){if(c||c===0)throw new Error(f?z7(e):O7(e));return c}const p=H4(u,d.props??{});return d.type!==w.Fragment&&(p.ref=r?y:v),w.cloneElement(d,p)});return a.displayName=`${e}.Slot`,a}si(Bi,"createSlot");var _7=Bi("Slot"),P4=Symbol.for("radix.slottable");function M7(e){const a=si(i=>"child"in i?i.children(i.child):i.children,"Slottable");return a.displayName=`${e}.Slottable`,a.__radixId=P4,a}si(M7,"createSlottable");var R7=si((e,a)=>{if("child"in e.props){const i=e.props.child;return w.isValidElement(i)?w.cloneElement(i,void 0,e.props.children(i.props.children)):null}return w.isValidElement(a)?a:null},"getSlottableElementFromSlottable");function H4(e,a){const i={...a};for(const r in a){const c=e[r],u=a[r];/^on[A-Z]/.test(r)?c&&u?i[r]=(...f)=>{const m=u(...f);return c(...f),m}:c&&(i[r]=c):r==="style"?i[r]={...c,...u}:r==="className"&&(i[r]=[c,u].filter(Boolean).join(" "))}return{...e,...i}}si(H4,"mergeProps");function U4(e){var r,c;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?e.ref:(a=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}si(U4,"getElementRef");function q4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===P4}si(q4,"isSlottable");var D7=Symbol.for("react.lazy");function Ip(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===D7&&"_payload"in e&&F4(e._payload)}si(Ip,"isLazyComponent");function F4(e){return typeof e=="object"&&e!==null&&"then"in e}si(F4,"isPromiseLike");var O7=si(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),z7=si(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ld=Ac[" use ".trim().toString()],L7=Object.defineProperty,B7=(e,a)=>L7(e,"name",{value:a,configurable:!0}),I7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bt=I7.reduce((e,a)=>{const i=Bi(`Primitive.${a}`),r=w.forwardRef((c,u)=>{const{asChild:d,...f}=c,m=d?i:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(m,{...f,ref:u})});return r.displayName=`Primitive.${a}`,{...e,[a]:r}},{});function V4(e,a){e&&so.flushSync(()=>e.dispatchEvent(a))}B7(V4,"dispatchDiscreteCustomEvent");var P7=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"}),H7=Object.defineProperty,Fa=(e,a)=>H7(e,"name",{value:a,configurable:!0});function U7(e,a){const i=w.createContext(a);i.displayName=e+"Context";const r=Fa(u=>{const{children:d,...f}=u,m=w.useMemo(()=>f,Object.values(f));return o.jsx(i.Provider,{value:m,children:d})},"Provider");r.displayName=e+"Provider";function c(u,d={}){const{optional:f=!1}=d,m=w.useContext(i);if(m)return m;if(a!==void 0)return a;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Fa(c,"useContext"),[r,c]}Fa(U7,"createContext");function cl(e,a=[]){let i=[];function r(u,d){const f=w.createContext(d);f.displayName=u+"Context";const m=i.length;i=[...i,d];const v=Fa(p=>{var E;const{scope:b,children:j,...S}=p,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useMemo(()=>S,Object.values(S));return o.jsx(k.Provider,{value:C,children:j})},"Provider");v.displayName=u+"Provider";function y(p,b,j={}){var E;const{optional:S=!1}=j,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useContext(k);if(C)return C;if(d!==void 0)return d;if(!S)throw new Error(`\`${p}\` must be used within \`${u}\``)}return Fa(y,"useContext"),[v,y]}Fa(r,"createContext");const c=Fa(()=>{const u=i.map(d=>w.createContext(d));return Fa(function(f){const m=(f==null?void 0:f[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return c.scopeName=e,[r,$4(c,...a)]}Fa(cl,"createContextScope");function $4(...e){const a=e[0];if(e.length===1)return a;const i=Fa(()=>{const r=e.map(c=>({useScope:c(),scopeName:c.scopeName}));return Fa(function(u){const d=r.reduce((f,{useScope:m,scopeName:v})=>{const p=m(u)[`__scope${v}`];return{...f,...p}},{});return w.useMemo(()=>({[`__scope${a.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return i.scopeName=a.scopeName,i}Fa($4,"composeContextScopes");var q7=Object.defineProperty,yn=(e,a)=>q7(e,"name",{value:a,configurable:!0});function G4(e){const a=e+"CollectionProvider",[i,r]=cl(a),[c,u]=i(a,{collectionRef:{current:null},itemMap:new Map}),d=yn(k=>{const{scope:C,children:E}=k,M=w.useRef(null),T=w.useRef(new Map).current;return o.jsx(c,{scope:C,itemMap:T,collectionRef:M,children:E})},"CollectionProvider");d.displayName=a;const f=e+"CollectionSlot",m=Bi(f),v=w.forwardRef((k,C)=>{const{scope:E,children:M}=k,T=u(f,E),_=kt(C,T.collectionRef);return o.jsx(m,{ref:_,children:M})});v.displayName=f;const y=e+"CollectionItemSlot",p="data-radix-collection-item",b=Bi(y),j=w.forwardRef((k,C)=>{const{scope:E,children:M,...T}=k,_=w.useRef(null),z=kt(C,_),A=u(y,E);return w.useEffect(()=>(A.itemMap.set(_,{ref:_,...T}),()=>void A.itemMap.delete(_))),o.jsx(b,{[p]:"",ref:z,children:M})});j.displayName=y;function S(k){const C=u(e+"CollectionConsumer",k);return w.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const T=Array.from(M.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((A,P)=>T.indexOf(A.ref.current)-T.indexOf(P.ref.current))},[C.collectionRef,C.itemMap])}return yn(S,"useCollection"),[{Provider:d,Slot:v,ItemSlot:j},S,r]}yn(G4,"createCollection");var qy=new WeakMap,tn,_a,$m=(_a=class extends Map{constructor(i){super(i);Cy(this,tn);zm(this,tn,[...super.keys()]),qy.set(this,!0)}set(i,r){return qy.get(this)&&(this.has(i)?Ln(this,tn)[Ln(this,tn).indexOf(i)]=i:Ln(this,tn).push(i)),super.set(i,r),this}insert(i,r,c){const u=this.has(r),d=Ln(this,tn).length,f=A0(i);let m=f>=0?f:d+f;const v=m<0||m>=d?-1:m;if(v===this.size||u&&v===this.size-1||v===-1)return this.set(r,c),this;const y=this.size+(u?0:1);f<0&&m++;const p=[...Ln(this,tn)];let b,j=!1;for(let S=m;S<y;S++)if(m===S){let k=p[S];p[S]===r&&(k=p[S+1]),u&&this.delete(r),b=this.get(k),this.set(r,c)}else{!j&&p[S-1]===r&&(j=!0);const k=p[j?S:S-1],C=b;b=this.get(k),this.delete(k),this.set(k,C)}return this}with(i,r,c){const u=new _a(this);return u.insert(i,r,c),u}before(i){const r=Ln(this,tn).indexOf(i)-1;if(!(r<0))return this.entryAt(r)}setBefore(i,r,c){const u=Ln(this,tn).indexOf(i);return u===-1?this:this.insert(u,r,c)}after(i){let r=Ln(this,tn).indexOf(i);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(i,r,c){const u=Ln(this,tn).indexOf(i);return u===-1?this:this.insert(u+1,r,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return zm(this,tn,[]),super.clear()}delete(i){const r=super.delete(i);return r&&Ln(this,tn).splice(Ln(this,tn).indexOf(i),1),r}deleteAt(i){const r=this.keyAt(i);return r!==void 0?this.delete(r):!1}at(i){const r=Cd(Ln(this,tn),i);if(r!==void 0)return this.get(r)}entryAt(i){const r=Cd(Ln(this,tn),i);if(r!==void 0)return[r,this.get(r)]}indexOf(i){return Ln(this,tn).indexOf(i)}keyAt(i){return Cd(Ln(this,tn),i)}from(i,r){const c=this.indexOf(i);if(c===-1)return;let u=c+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(i,r){const c=this.indexOf(i);if(c===-1)return;let u=c+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return u;c++}}findIndex(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return c;c++}return-1}filter(i,r){const c=[];let u=0;for(const d of this)Reflect.apply(i,r,[d,u,this])&&c.push(d),u++;return new _a(c)}map(i,r){const c=[];let u=0;for(const d of this)c.push([d[0],Reflect.apply(i,r,[d,u,this])]),u++;return new _a(c)}reduce(...i){const[r,c]=i;let u=0,d=c??this.at(0);for(const f of this)u===0&&i.length===1?d=f:d=Reflect.apply(r,this,[d,f,u,this]),u++;return d}reduceRight(...i){const[r,c]=i;let u=c??this.at(-1);for(let d=this.size-1;d>=0;d--){const f=this.at(d);d===this.size-1&&i.length===1?u=f:u=Reflect.apply(r,this,[u,f,d,this])}return u}toSorted(i){const r=[...this.entries()].sort(i);return new _a(r)}toReversed(){const i=new _a;for(let r=this.size-1;r>=0;r--){const c=this.keyAt(r),u=this.get(c);i.set(c,u)}return i}toSpliced(...i){const r=[...this.entries()];return r.splice(...i),new _a(r)}slice(i,r){const c=new _a;let u=this.size-1;if(i===void 0)return c;i<0&&(i=i+this.size),r!==void 0&&r>0&&(u=r-1);for(let d=i;d<=u;d++){const f=this.keyAt(d),m=this.get(f);c.set(f,m)}return c}every(i,r){let c=0;for(const u of this){if(!Reflect.apply(i,r,[u,c,this]))return!1;c++}return!0}some(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return!0;c++}return!1}},tn=new WeakMap,yn(_a,"OrderedDict"),_a);function Cd(e,a){if("at"in Array.prototype)return Array.prototype.at.call(e,a);const i=Y4(e,a);return i===-1?void 0:e[i]}yn(Cd,"at");function Y4(e,a){const i=e.length,r=A0(a),c=r>=0?r:i+r;return c<0||c>=i?-1:c}yn(Y4,"toSafeIndex");function A0(e){return e!==e||e===0?0:Math.trunc(e)}yn(A0,"toSafeInteger");function F7(e){const a=e+"CollectionProvider",[i,r]=cl(a),[c,u]=i(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new $m,setItemMap:yn(()=>{},"setItemMap")}),d=yn(({state:T,..._})=>T?o.jsx(m,{..._,state:T}):o.jsx(f,{..._}),"CollectionProvider");d.displayName=a;const f=yn(T=>{const _=C();return o.jsx(m,{...T,state:_})},"CollectionInit");f.displayName=a+"Init";const m=yn(T=>{const{scope:_,children:z,state:A}=T,P=w.useRef(null),[H,U]=w.useState(null),O=kt(P,U),[G,q]=A;return w.useEffect(()=>{if(!H)return;const Q=Q4(()=>{});return Q.observe(H,{childList:!0,subtree:!0}),()=>{Q.disconnect()}},[H]),o.jsx(c,{scope:_,itemMap:G,setItemMap:q,collectionRef:O,collectionRefObject:P,collectionElement:H,children:z})},"CollectionProviderImpl");m.displayName=a+"Impl";const v=e+"CollectionSlot",y=Bi(v),p=w.forwardRef((T,_)=>{const{scope:z,children:A}=T,P=u(v,z),H=kt(_,P.collectionRef);return o.jsx(y,{ref:H,children:A})});p.displayName=v;const b=e+"CollectionItemSlot",j="data-radix-collection-item",S=Bi(b),k=w.forwardRef((T,_)=>{const{scope:z,children:A,...P}=T,H=w.useRef(null),[U,O]=w.useState(null),G=kt(_,H,O),q=u(b,z),{setItemMap:Q}=q,V=w.useRef(P);X4(V.current,P)||(V.current=P);const Y=V.current;return w.useEffect(()=>{const K=Y;return Q(D=>U?D.has(U)?D.set(U,{...K,element:U}).toSorted(Pp):(D.set(U,{...K,element:U}),D.toSorted(Pp)):D),()=>{Q(D=>!U||!D.has(U)?D:(D.delete(U),new $m(D)))}},[U,Y,Q]),o.jsx(S,{[j]:"",ref:G,children:A})});k.displayName=b;function C(){return w.useState(new $m)}yn(C,"useInitCollection");function E(T){const{itemMap:_}=u(e+"CollectionConsumer",T);return _}return yn(E,"useCollection"),[{Provider:d,Slot:p,ItemSlot:k},{createCollectionScope:r,useCollection:E,useInitCollection:C}]}yn(F7,"createCollection");function X4(e,a){if(e===a)return!0;if(typeof e!="object"||typeof a!="object"||e==null||a==null)return!1;const i=Object.keys(e),r=Object.keys(a);if(i.length!==r.length)return!1;for(const c of i)if(!Object.prototype.hasOwnProperty.call(a,c)||e[c]!==a[c])return!1;return!0}yn(X4,"shallowEqual");function K4(e,a){return!!(a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}yn(K4,"isElementPreceding");function Pp(e,a){return!e[1].element||!a[1].element?0:K4(e[1].element,a[1].element)?-1:1}yn(Pp,"sortByDocumentPosition");function Q4(e){return new MutationObserver(i=>{for(const r of i)if(r.type==="childList"){e();return}})}yn(Q4,"getChildListObserver");var V7=Object.defineProperty,fs=(e,a)=>V7(e,"name",{value:a,configurable:!0}),Z4=!!(typeof window<"u"&&window.document&&window.document.createElement);function gt(e,a,{checkForDefaultPrevented:i=!0}={}){return fs(function(c){if(e==null||e(c),i===!1||!c||!c.defaultPrevented)return a==null?void 0:a(c)},"handleEvent")}fs(gt,"composeEventHandlers");function $7(e){var a;if(!Z4)throw new Error("Cannot access window outside of the DOM");return((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??window}fs($7,"getOwnerWindow");function Hp(e){if(!Z4)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}fs(Hp,"getOwnerDocument");function J4(e,a=!1){const{activeElement:i}=Hp(e);if(!(i!=null&&i.nodeName))return null;if(W4(i)&&i.contentDocument)return J4(i.contentDocument.body,a);if(a){const r=i.getAttribute("aria-activedescendant");if(r){const c=Hp(i).getElementById(r);if(c)return c}}return i}fs(J4,"getActiveElement");function W4(e){return e.tagName==="IFRAME"}fs(W4,"isFrame");var Mn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},G7=Object.defineProperty,Y7=(e,a)=>G7(e,"name",{value:a,configurable:!0}),Fy=Ac[" useEffectEvent ".trim().toString()],Vy=Ac[" useInsertionEffect ".trim().toString()];function ew(e){if(typeof Fy=="function")return Fy(e);const a=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Vy=="function"?Vy(()=>{a.current=e}):Mn(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}Y7(ew,"useEffectEvent");var X7=Object.defineProperty,Rc=(e,a)=>X7(e,"name",{value:a,configurable:!0}),K7=Ac[" useInsertionEffect ".trim().toString()]||Mn;function jc({prop:e,defaultProp:a,onChange:i=Rc(()=>{},"onChange"),caller:r}){const[c,u,d]=tw({defaultProp:a,onChange:i}),f=e!==void 0,m=f?e:c,v=w.useCallback(y=>{var p;if(f){const b=nw(y)?y(e):y;b!==e&&((p=d.current)==null||p.call(d,b))}else u(y)},[f,e,u,d]);return[m,v]}Rc(jc,"useControllableState");function tw({defaultProp:e,onChange:a}){const[i,r]=w.useState(e),c=w.useRef(i),u=w.useRef(a);return K7(()=>{u.current=a},[a]),w.useEffect(()=>{var d;c.current!==i&&((d=u.current)==null||d.call(u,i),c.current=i)},[i,c]),[i,r,u]}Rc(tw,"useUncontrolledState");function nw(e){return typeof e=="function"}Rc(nw,"isFunction");var $y=Symbol("RADIX:SYNC_STATE");function Q7(e,a,i,r){const{prop:c,defaultProp:u,onChange:d,caller:f}=a,m=c!==void 0,v=ew(d),y=[{...i,state:u}];r&&y.push(r);const[p,b]=w.useReducer((C,E)=>{if(E.type===$y)return{...C,state:E.state};const M=e(C,E);return m&&!Object.is(M.state,C.state)&&v(M.state),M},...y),j=p.state,S=w.useRef(j);w.useEffect(()=>{S.current!==j&&(S.current=j,m||v(j))},[j,S,m]);const k=w.useMemo(()=>c!==void 0?{...p,state:c}:p,[p,c]);return w.useEffect(()=>{m&&!Object.is(c,p.state)&&b({type:$y,state:c})},[c,p.state,m]),[k,b]}Rc(Q7,"useControllableStateReducer");var Z7=Object.defineProperty,mr=(e,a)=>Z7(e,"name",{value:a,configurable:!0});function aw(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}mr(aw,"useStateMachine");var qi=mr(e=>{const{present:a,children:i}=e,r=iw(a),c=typeof i=="function"?i({present:r.isPresent}):w.Children.only(i),u=rw(r.ref,lw(c));return typeof i=="function"||r.isPresent?w.cloneElement(c,{ref:u}):null},"Presence");function iw(e){const[a,i]=w.useState(),r=w.useRef(null),c=w.useRef(e),u=w.useRef("none"),d=w.useRef(void 0),f=e?"mounted":"unmounted",[m,v]=aw(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{m==="mounted"?(u.current=d.current??as(r.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=r.current,p=c.current;if(p!==e){const j=u.current,S=as(y);e?(d.current=S,v("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(p&&j!==S?"ANIMATION_OUT":"UNMOUNT"),c.current=e}},[e,v]),Mn(()=>{if(a){let y;const p=a.ownerDocument.defaultView??window,b=mr(S=>{const C=as(r.current).includes(CSS.escape(S.animationName));if(S.target===a&&C&&(v("ANIMATION_END"),!c.current)){const E=a.style.animationFillMode;a.style.animationFillMode="forwards",y=p.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=E)})}},"handleAnimationEnd"),j=mr(S=>{S.target===a&&(u.current=as(r.current))},"handleAnimationStart");return a.addEventListener("animationstart",j),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{p.clearTimeout(y),a.removeEventListener("animationstart",j),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[a,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{if(y){const p=getComputedStyle(y);r.current=p,d.current=as(p)}else r.current=null;i(y)},[])}}mr(iw,"usePresence");function Up(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}mr(Up,"setRef");function rw(...e){const a=w.useRef(e);return a.current=e,w.useCallback(i=>{const r=a.current;let c=!1;const u=r.map(d=>{const f=Up(d,i);return!c&&typeof f=="function"&&(c=!0),f});if(c)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():Up(r[d],null)}}},[])}mr(rw,"useStableComposedRefs");function as(e){return(e==null?void 0:e.animationName)||"none"}mr(as,"getAnimationName");function lw(e){var r,c;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?e.ref:(a=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}mr(lw,"getElementRef");var J7=Object.defineProperty,W7=(e,a)=>J7(e,"name",{value:a,configurable:!0}),e9=Ac[" useId ".trim().toString()]||(()=>{}),t9=0;function Zl(e){const[a,i]=w.useState(e9());return Mn(()=>{e||i(r=>r??String(t9++))},[e]),e||(a?`radix-${a}`:"")}W7(Zl,"useId");var n9=Object.defineProperty,a9=(e,a)=>n9(e,"name",{value:a,configurable:!0}),i9=w.createContext(void 0);function _0(e){const a=w.useContext(i9);return e||a||"ltr"}a9(_0,"useDirection");var r9=Object.defineProperty,l9=(e,a)=>r9(e,"name",{value:a,configurable:!0});function _n(e){const a=w.useRef(e);return w.useEffect(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}l9(_n,"useCallbackRef");var o9=Object.defineProperty,vn=(e,a)=>o9(e,"name",{value:a,configurable:!0}),qp="dismissableLayer.update",s9="dismissableLayer.pointerDownOutside",c9="dismissableLayer.focusOutside",Gy,ow=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),M0=w.forwardRef(vn(function(a,i){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,...y}=a,p=w.useContext(ow),[b,j]=w.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=w.useState({}),C=kt(i,j),E=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),T=M?E.indexOf(M):-1,_=b?E.indexOf(b):-1,z=p.layersWithOutsidePointerEventsDisabled.size>0,A=_>=T,P=w.useRef(!1),H=cw(q=>{d==null||d(q),m==null||m(q),q.defaultPrevented||v==null||v()},{ownerDocument:S,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(q=>{if(!(q instanceof Node))return!1;const Q=[...p.branches].some(V=>V.contains(q));return A&&!Q},[p.branches,A])}),U=uw(q=>{if(c&&P.current)return;const Q=q.target;[...p.branches].some(Y=>Y.contains(Q))||(f==null||f(q),m==null||m(q),q.defaultPrevented||v==null||v())},S),O=b?_===E.length-1:!1,G=_n(q=>{q.key==="Escape"&&(u==null||u(q),!q.defaultPrevented&&v&&(q.preventDefault(),v()))});return w.useEffect(()=>{if(O)return S.addEventListener("keydown",G,{capture:!0}),()=>S.removeEventListener("keydown",G,{capture:!0})},[S,O,G]),w.useEffect(()=>{if(b)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Gy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),Fp(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(b),p.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Gy))}},[b,S,r,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),Fp())},[b,p]),w.useEffect(()=>{const q=vn(()=>k({}),"handleUpdate");return document.addEventListener(qp,q),()=>document.removeEventListener(qp,q)},[]),o.jsx(Bt.div,{...y,ref:C,style:{pointerEvents:z?A?"auto":"none":void 0,...a.style},onFocusCapture:gt(a.onFocusCapture,U.onFocusCapture),onBlurCapture:gt(a.onBlurCapture,U.onBlurCapture),onPointerDownCapture:gt(a.onPointerDownCapture,H.onPointerDownCapture)})},"DismissableLayer"));function sw(){const e=w.useContext(ow),[a,i]=w.useState(null);return w.useEffect(()=>{if(a)return e.dismissableSurfaces.add(a),()=>{e.dismissableSurfaces.delete(a)}},[a,e.dismissableSurfaces]),i}vn(sw,"useDismissableLayerSurface");var u9=vn(()=>!0,"IS_TRUE");function cw(e,a){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:c,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=u9}=a,f=_n(e),m=w.useRef(!1),v=w.useRef(!1),y=w.useRef(new Map),p=w.useRef(()=>{});return w.useEffect(()=>{function b(){v.current=!1,c.current=!1,y.current.clear()}vn(b,"resetOutsideInteraction");function j(){return Array.from(y.current.values()).some(Boolean)}vn(j,"isOutsideInteractionIntercepted");function S(T){if(!v.current)return;const _=T.target;_ instanceof Node&&[...u].some(A=>A.contains(_))||y.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{v.current&&p.current()},0)}vn(S,"handleInteractionCapture");function k(T){v.current&&y.current.set(T.type,!1)}vn(k,"handleInteractionBubble");const C=vn(T=>{if(T.target&&!m.current){let _=function(){i.removeEventListener("click",p.current);const A=j();b(),A||R0(s9,f,z,{discrete:!0})};if(vn(_,"handleAndDispatchPointerDownOutsideEvent"),!d(T.target)){i.removeEventListener("click",p.current),b(),m.current=!1;return}const z={originalEvent:T};v.current=!0,c.current=r&&T.button===0,y.current.clear(),!r||T.button!==0?_():(i.removeEventListener("click",p.current),p.current=_,i.addEventListener("click",p.current,{once:!0}))}else i.removeEventListener("click",p.current),b();m.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of E)i.addEventListener(T,S,!0),i.addEventListener(T,k);const M=window.setTimeout(()=>{i.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),i.removeEventListener("pointerdown",C),i.removeEventListener("click",p.current);for(const T of E)i.removeEventListener(T,S,!0),i.removeEventListener(T,k)}},[i,f,r,c,u,d]),{onPointerDownCapture:vn(()=>m.current=!0,"onPointerDownCapture")}}vn(cw,"usePointerDownOutside");function uw(e,a=globalThis==null?void 0:globalThis.document){const i=_n(e),r=w.useRef(!1);return w.useEffect(()=>{const c=vn(u=>{u.target&&!r.current&&R0(c9,i,{originalEvent:u},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",c),()=>a.removeEventListener("focusin",c)},[a,i]),{onFocusCapture:vn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:vn(()=>r.current=!1,"onBlurCapture")}}vn(uw,"useFocusOutside");function Fp(){const e=new CustomEvent(qp);document.dispatchEvent(e)}vn(Fp,"dispatchUpdate");function R0(e,a,i,{discrete:r}){const c=i.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});a&&c.addEventListener(e,a,{once:!0}),r?V4(c,u):c.dispatchEvent(u)}vn(R0,"handleAndDispatchCustomEvent");var d9=Object.defineProperty,Kn=(e,a)=>d9(e,"name",{value:a,configurable:!0}),Gm="focusScope.autoFocusOnMount",Ym="focusScope.autoFocusOnUnmount",Yy={bubbles:!1,cancelable:!0},D0=w.forwardRef(Kn(function(a,i){const{loop:r=!1,trapped:c=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=a,[m,v]=w.useState(null),y=_n(u),p=_n(d),b=w.useRef(null),j=kt(i,v),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(c){let C=function(_){if(S.paused||!m)return;const z=_.target;m.contains(z)?b.current=z:ur(b.current,{select:!0})},E=function(_){if(S.paused||!m)return;const z=_.relatedTarget;z!==null&&(m.contains(z)||ur(b.current,{select:!0}))},M=function(_){if(document.activeElement===document.body)for(const A of _)A.removedNodes.length>0&&ur(m)};Kn(C,"handleFocusIn"),Kn(E,"handleFocusOut"),Kn(M,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",E);const T=new MutationObserver(M);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),T.disconnect()}}},[c,m,S.paused]),w.useEffect(()=>{if(m){Xy.add(S);const C=document.activeElement;if(!m.contains(C)){const M=new CustomEvent(Gm,Yy);m.addEventListener(Gm,y),m.dispatchEvent(M),M.defaultPrevented||(dw(gw(O0(m)),{select:!0}),document.activeElement===C&&ur(m))}return()=>{m.removeEventListener(Gm,y),setTimeout(()=>{const M=new CustomEvent(Ym,Yy);m.addEventListener(Ym,p),m.dispatchEvent(M),M.defaultPrevented||ur(C??document.body,{select:!0}),m.removeEventListener(Ym,p),Xy.remove(S)},0)}}},[m,y,p,S]);const k=w.useCallback(C=>{if(!r&&!c||S.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(E&&M){const T=C.currentTarget,[_,z]=fw(T);_&&z?!C.shiftKey&&M===z?(C.preventDefault(),r&&ur(_,{select:!0})):C.shiftKey&&M===_&&(C.preventDefault(),r&&ur(z,{select:!0})):M===T&&C.preventDefault()}},[r,c,S.paused]);return o.jsx(Bt.div,{tabIndex:-1,...f,ref:j,onKeyDown:k})},"FocusScope"));function dw(e,{select:a=!1}={}){const i=document.activeElement;for(const r of e)if(ur(r,{select:a}),document.activeElement!==i)return}Kn(dw,"focusFirst");function fw(e){const a=O0(e),i=Vp(a,e),r=Vp(a.reverse(),e);return[i,r]}Kn(fw,"getTabbableEdges");function O0(e){const a=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Kn(r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)a.push(i.currentNode);return a}Kn(O0,"getTabbableCandidates");function Vp(e,a){const i=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(i?!r.checkVisibility({checkVisibilityCSS:!0}):hw(r,{upTo:a})))return r}Kn(Vp,"findVisible");function hw(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Kn(hw,"isHidden");function mw(e){return e instanceof HTMLInputElement&&"select"in e}Kn(mw,"isSelectableInput");function ur(e,{select:a=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&mw(e)&&a&&e.select()}}Kn(ur,"focus");var Xy=pw();function pw(){let e=[];return{add(a){const i=e[0];a!==i&&(i==null||i.pause()),e=$p(e,a),e.unshift(a)},remove(a){var i;e=$p(e,a),(i=e[0])==null||i.resume()}}}Kn(pw,"createFocusScopesStack");function $p(e,a){const i=[...e],r=i.indexOf(a);return r!==-1&&i.splice(r,1),i}Kn($p,"arrayRemove");function gw(e){return e.filter(a=>a.tagName!=="A")}Kn(gw,"removeLinks");var f9=Object.defineProperty,h9=(e,a)=>f9(e,"name",{value:a,configurable:!0}),z0=w.forwardRef(h9(function(a,i){var m;const{container:r,...c}=a,[u,d]=w.useState(!1);Mn(()=>d(!0),[]);const f=r||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?so.createPortal(o.jsx(Bt.div,{...c,ref:i}),f):null},"Portal")),m9=Object.defineProperty,L0=(e,a)=>m9(e,"name",{value:a,configurable:!0}),od=0,Ti=null;function p9(e){return Dc(),e.children}L0(p9,"FocusGuards");function Dc(){w.useEffect(()=>{Ti||(Ti={start:Gp(),end:Gp()});const{start:e,end:a}=Ti;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),od++,()=>{od===1&&(Ti==null||Ti.start.remove(),Ti==null||Ti.end.remove(),Ti=null),od=Math.max(0,od-1)}},[])}L0(Dc,"useFocusGuards");function Gp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}L0(Gp,"createFocusGuard");var Mi=function(){return Mi=Object.assign||function(a){for(var i,r=1,c=arguments.length;r<c;r++){i=arguments[r];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(a[u]=i[u])}return a},Mi.apply(this,arguments)};function vw(e,a){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(e);c<r.length;c++)a.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(i[r[c]]=e[r[c]]);return i}function g9(e,a,i){if(i||arguments.length===2)for(var r=0,c=a.length,u;r<c;r++)(u||!(r in a))&&(u||(u=Array.prototype.slice.call(a,0,r)),u[r]=a[r]);return e.concat(u||Array.prototype.slice.call(a))}var Nd="right-scroll-bar-position",Ed="width-before-scroll-bar",v9="with-scroll-bars-hidden",y9="--removed-body-scroll-bar-size";function Xm(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}function x9(e,a){var i=w.useState(function(){return{value:e,callback:a,facade:{get current(){return i.value},set current(r){var c=i.value;c!==r&&(i.value=r,i.callback(r,c))}}}})[0];return i.callback=a,i.facade}var b9=typeof window<"u"?w.useLayoutEffect:w.useEffect,Ky=new WeakMap;function j9(e,a){var i=x9(null,function(r){return e.forEach(function(c){return Xm(c,r)})});return b9(function(){var r=Ky.get(i);if(r){var c=new Set(r),u=new Set(e),d=i.current;c.forEach(function(f){u.has(f)||Xm(f,null)}),u.forEach(function(f){c.has(f)||Xm(f,d)})}Ky.set(i,e)},[e]),i}function w9(e){return e}function S9(e,a){a===void 0&&(a=w9);var i=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(u){var d=a(u,r);return i.push(d),function(){i=i.filter(function(f){return f!==d})}},assignSyncMedium:function(u){for(r=!0;i.length;){var d=i;i=[],d.forEach(u)}i={push:function(f){return u(f)},filter:function(){return i}}},assignMedium:function(u){r=!0;var d=[];if(i.length){var f=i;i=[],f.forEach(u),d=i}var m=function(){var y=d;d=[],y.forEach(u)},v=function(){return Promise.resolve().then(m)};v(),i={push:function(y){d.push(y),v()},filter:function(y){return d=d.filter(y),i}}}};return c}function k9(e){e===void 0&&(e={});var a=S9(null);return a.options=Mi({async:!0,ssr:!1},e),a}var yw=function(e){var a=e.sideCar,i=vw(e,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=a.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Mi({},i))};yw.isSideCarExport=!0;function C9(e,a){return e.useMedium(a),yw}var xw=k9(),Km=function(){},Wd=w.forwardRef(function(e,a){var i=w.useRef(null),r=w.useState({onScrollCapture:Km,onWheelCapture:Km,onTouchMoveCapture:Km}),c=r[0],u=r[1],d=e.forwardProps,f=e.children,m=e.className,v=e.removeScrollBar,y=e.enabled,p=e.shards,b=e.sideCar,j=e.noRelative,S=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,T=e.gapMode,_=vw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=b,A=j9([i,a]),P=Mi(Mi({},_),c);return w.createElement(w.Fragment,null,y&&w.createElement(z,{sideCar:xw,removeScrollBar:v,shards:p,noRelative:j,noIsolation:S,inert:k,setCallbacks:u,allowPinchZoom:!!C,lockRef:i,gapMode:T}),d?w.cloneElement(w.Children.only(f),Mi(Mi({},P),{ref:A})):w.createElement(M,Mi({},P,{className:m,ref:A}),f))});Wd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wd.classNames={fullWidth:Ed,zeroRight:Nd};var N9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function E9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=N9();return a&&e.setAttribute("nonce",a),e}function T9(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function A9(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var _9=function(){var e=0,a=null;return{add:function(i){e==0&&(a=E9())&&(T9(a,i),A9(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},M9=function(){var e=_9();return function(a,i){w.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&i])}},bw=function(){var e=M9(),a=function(i){var r=i.styles,c=i.dynamic;return e(r,c),null};return a},R9={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},D9=function(e){var a=window.getComputedStyle(document.body),i=a[e==="padding"?"paddingLeft":"marginLeft"],r=a[e==="padding"?"paddingTop":"marginTop"],c=a[e==="padding"?"paddingRight":"marginRight"];return[Qm(i),Qm(r),Qm(c)]},O9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return R9;var a=D9(e),i=document.documentElement.clientWidth,r=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,r-i+a[2]-a[0])}},z9=bw(),ls="data-scroll-locked",L9=function(e,a,i,r){var c=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),`
480
+ .`.concat(v9,` {
481
+ overflow: hidden `).concat(r,`;
482
+ padding-right: `).concat(f,"px ").concat(r,`;
483
+ }
484
+ body[`).concat(ls,`] {
485
+ overflow: hidden `).concat(r,`;
486
+ overscroll-behavior: contain;
487
+ `).concat([a&&"position: relative ".concat(r,";"),i==="margin"&&`
488
+ padding-left: `.concat(c,`px;
489
+ padding-top: `).concat(u,`px;
490
+ padding-right: `).concat(d,`px;
491
+ margin-left:0;
492
+ margin-top:0;
493
+ margin-right: `).concat(f,"px ").concat(r,`;
494
+ `),i==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
495
+ }
496
+
497
+ .`).concat(Nd,` {
498
+ right: `).concat(f,"px ").concat(r,`;
499
+ }
500
+
501
+ .`).concat(Ed,` {
502
+ margin-right: `).concat(f,"px ").concat(r,`;
503
+ }
504
+
505
+ .`).concat(Nd," .").concat(Nd,` {
506
+ right: 0 `).concat(r,`;
507
+ }
508
+
509
+ .`).concat(Ed," .").concat(Ed,` {
510
+ margin-right: 0 `).concat(r,`;
511
+ }
512
+
513
+ body[`).concat(ls,`] {
514
+ `).concat(y9,": ").concat(f,`px;
515
+ }
516
+ `)},Qy=function(){var e=parseInt(document.body.getAttribute(ls)||"0",10);return isFinite(e)?e:0},B9=function(){w.useEffect(function(){return document.body.setAttribute(ls,(Qy()+1).toString()),function(){var e=Qy()-1;e<=0?document.body.removeAttribute(ls):document.body.setAttribute(ls,e.toString())}},[])},I9=function(e){var a=e.noRelative,i=e.noImportant,r=e.gapMode,c=r===void 0?"margin":r;B9();var u=w.useMemo(function(){return O9(c)},[c]);return w.createElement(z9,{styles:L9(u,!a,c,i?"":"!important")})},Yp=!1;if(typeof window<"u")try{var sd=Object.defineProperty({},"passive",{get:function(){return Yp=!0,!0}});window.addEventListener("test",sd,sd),window.removeEventListener("test",sd,sd)}catch{Yp=!1}var Jo=Yp?{passive:!1}:!1,P9=function(e){return e.tagName==="TEXTAREA"},jw=function(e,a){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[a]!=="hidden"&&!(i.overflowY===i.overflowX&&!P9(e)&&i[a]==="visible")},H9=function(e){return jw(e,"overflowY")},U9=function(e){return jw(e,"overflowX")},Zy=function(e,a){var i=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var c=ww(e,r);if(c){var u=Sw(e,r),d=u[1],f=u[2];if(d>f)return!0}r=r.parentNode}while(r&&r!==i.body);return!1},q9=function(e){var a=e.scrollTop,i=e.scrollHeight,r=e.clientHeight;return[a,i,r]},F9=function(e){var a=e.scrollLeft,i=e.scrollWidth,r=e.clientWidth;return[a,i,r]},ww=function(e,a){return e==="v"?H9(a):U9(a)},Sw=function(e,a){return e==="v"?q9(a):F9(a)},V9=function(e,a){return e==="h"&&a==="rtl"?-1:1},$9=function(e,a,i,r,c){var u=V9(e,window.getComputedStyle(a).direction),d=u*r,f=i.target,m=a.contains(f),v=!1,y=d>0,p=0,b=0;do{if(!f)break;var j=Sw(e,f),S=j[0],k=j[1],C=j[2],E=k-C-u*S;(S||E)&&ww(e,f)&&(p+=E,b+=S);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&f!==document.body||m&&(a.contains(f)||a===f));return(y&&Math.abs(p)<1||!y&&Math.abs(b)<1)&&(v=!0),v},cd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Jy=function(e){return[e.deltaX,e.deltaY]},Wy=function(e){return e&&"current"in e?e.current:e},G9=function(e,a){return e[0]===a[0]&&e[1]===a[1]},Y9=function(e){return`
517
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
518
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
519
+ `)},X9=0,Wo=[];function K9(e){var a=w.useRef([]),i=w.useRef([0,0]),r=w.useRef(),c=w.useState(X9++)[0],u=w.useState(bw)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(c));var k=g9([e.lockRef.current],(e.shards||[]).map(Wy),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(c))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var E=cd(k),M=i.current,T="deltaX"in k?k.deltaX:M[0]-E[0],_="deltaY"in k?k.deltaY:M[1]-E[1],z,A=k.target,P=Math.abs(T)>Math.abs(_)?"h":"v";if("touches"in k&&P==="h"&&A.type==="range")return!1;var H=window.getSelection(),U=H&&H.anchorNode,O=U?U===A||U.contains(A):!1;if(O)return!1;var G=Zy(P,A);if(!G)return!0;if(G?z=P:(z=P==="v"?"h":"v",G=Zy(P,A)),!G)return!1;if(!r.current&&"changedTouches"in k&&(T||_)&&(r.current=z),!z)return!0;var q=r.current||z;return $9(q,C,k,q==="h"?T:_)},[]),m=w.useCallback(function(k){var C=k;if(!(!Wo.length||Wo[Wo.length-1]!==u)){var E="deltaY"in C?Jy(C):cd(C),M=a.current.filter(function(z){return z.name===C.type&&(z.target===C.target||C.target===z.shadowParent)&&G9(z.delta,E)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var T=(d.current.shards||[]).map(Wy).filter(Boolean).filter(function(z){return z.contains(C.target)}),_=T.length>0?f(C,T[0]):!d.current.noIsolation;_&&C.cancelable&&C.preventDefault()}}},[]),v=w.useCallback(function(k,C,E,M){var T={name:k,delta:C,target:E,should:M,shadowParent:Q9(E)};a.current.push(T),setTimeout(function(){a.current=a.current.filter(function(_){return _!==T})},1)},[]),y=w.useCallback(function(k){i.current=cd(k),r.current=void 0},[]),p=w.useCallback(function(k){v(k.type,Jy(k),k.target,f(k,e.lockRef.current))},[]),b=w.useCallback(function(k){v(k.type,cd(k),k.target,f(k,e.lockRef.current))},[]);w.useEffect(function(){return Wo.push(u),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",m,Jo),document.addEventListener("touchmove",m,Jo),document.addEventListener("touchstart",y,Jo),function(){Wo=Wo.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,Jo),document.removeEventListener("touchmove",m,Jo),document.removeEventListener("touchstart",y,Jo)}},[]);var j=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:Y9(c)}):null,j?w.createElement(I9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Q9(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const Z9=C9(xw,K9);var ef=w.forwardRef(function(e,a){return w.createElement(Wd,Mi({},e,{ref:a,sideCar:Z9}))});ef.classNames=Wd.classNames;var J9=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},es=new WeakMap,ud=new WeakMap,dd={},Zm=0,kw=function(e){return e&&(e.host||kw(e.parentNode))},W9=function(e,a){return a.map(function(i){if(e.contains(i))return i;var r=kw(i);return r&&e.contains(r)?r:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},eN=function(e,a,i,r){var c=W9(a,Array.isArray(e)?e:[e]);dd[i]||(dd[i]=new WeakMap);var u=dd[i],d=[],f=new Set,m=new Set(c),v=function(p){!p||f.has(p)||(f.add(p),v(p.parentNode))};c.forEach(v);var y=function(p){!p||m.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))y(b);else try{var j=b.getAttribute(r),S=j!==null&&j!=="false",k=(es.get(b)||0)+1,C=(u.get(b)||0)+1;es.set(b,k),u.set(b,C),d.push(b),k===1&&S&&ud.set(b,!0),C===1&&b.setAttribute(i,"true"),S||b.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(a),f.clear(),Zm++,function(){d.forEach(function(p){var b=es.get(p)-1,j=u.get(p)-1;es.set(p,b),u.set(p,j),b||(ud.has(p)||p.removeAttribute(r),ud.delete(p)),j||p.removeAttribute(i)}),Zm--,Zm||(es=new WeakMap,es=new WeakMap,ud=new WeakMap,dd={})}},B0=function(e,a,i){i===void 0&&(i="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),c=J9(e);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),eN(r,c,i,"aria-hidden")):function(){return null}},tN=Object.defineProperty,ci=(e,a)=>tN(e,"name",{value:a,configurable:!0}),I0="Dialog",[Cw,wP]=cl(I0),[nN,br]=Cw(I0),aN=ci(e=>{const{__scopeDialog:a,children:i,open:r,defaultOpen:c,onOpenChange:u,modal:d=!0}=e,f=w.useRef(null),m=w.useRef(null),[v,y]=jc({prop:r,defaultProp:c??!1,onChange:u,caller:I0}),[p,b]=w.useState(0),[j,S]=w.useState(0);return o.jsx(nN,{scope:a,triggerRef:f,contentRef:m,contentId:Zl(),titleId:Zl(),descriptionId:Zl(),titlePresent:p>0,descriptionPresent:j>0,setTitleCount:b,setDescriptionCount:S,open:v,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(k=>!k),[y]),modal:d,children:i})},"Dialog"),Nw="DialogPortal",[iN,Ew]=Cw(Nw,{forceMount:void 0}),rN=ci(e=>{const{__scopeDialog:a,forceMount:i,children:r,container:c}=e,u=br(Nw,a);return o.jsx(iN,{scope:a,forceMount:i,children:w.Children.map(r,d=>o.jsx(qi,{present:i||u.open,children:o.jsx(z0,{asChild:!0,container:c,children:d})}))})},"DialogPortal"),Xp="DialogOverlay",lN=w.forwardRef(ci(function(a,i){const r=Ew(Xp,a.__scopeDialog),{forceMount:c=r.forceMount,...u}=a,d=br(Xp,a.__scopeDialog);return d.modal?o.jsx(qi,{present:c||d.open,children:o.jsx(sN,{...u,ref:i})}):null},"DialogOverlay")),oN=Bi("DialogOverlay.RemoveScroll"),sN=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=br(Xp,r),d=sw(),f=kt(i,d);return o.jsx(ef,{as:oN,allowPinchZoom:!0,shards:[u.contentRef],children:o.jsx(Bt.div,{"data-state":P0(u.open),...c,ref:f,style:{pointerEvents:"auto",...c.style}})})},"DialogOverlayImpl")),wc="DialogContent",cN=w.forwardRef(ci(function(a,i){const r=Ew(wc,a.__scopeDialog),{forceMount:c=r.forceMount,...u}=a,d=br(wc,a.__scopeDialog);return o.jsx(qi,{present:c||d.open,children:d.modal?o.jsx(uN,{...u,ref:i}):o.jsx(dN,{...u,ref:i})})},"DialogContent")),uN=w.forwardRef(ci(function(a,i){const r=br(wc,a.__scopeDialog),c=w.useRef(null),u=kt(i,r.contentRef,c);return w.useEffect(()=>{const d=c.current;if(d)return B0(d)},[]),o.jsx(Tw,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:gt(a.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:gt(a.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),dN=w.forwardRef(ci(function(a,i){const r=br(wc,a.__scopeDialog),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(Tw,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(c.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=r.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"DialogContentNonModal")),Tw=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=a,m=br(wc,r);return Dc(),o.jsx(o.Fragment,{children:o.jsx(D0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(M0,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":P0(m.open),...f,ref:i,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),fN="DialogTitle",hN=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=br(fN,r),{setTitleCount:d}=u;return Mn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),o.jsx(Bt.h2,{id:u.titleId,...c,ref:i})},"DialogTitle")),mN="DialogClose",pN=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=br(mN,r);return o.jsx(Bt.button,{type:"button",...c,ref:i,onClick:gt(a.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function P0(e){return e?"open":"closed"}ci(P0,"getState");var gN=Object.defineProperty,vN=(e,a)=>gN(e,"name",{value:a,configurable:!0});function Aw(e){const[a,i]=w.useState(void 0);return Mn(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,f;if("borderBoxSize"in u){const m=u.borderBoxSize,v=Array.isArray(m)?m[0]:m;d=v.inlineSize,f=v.blockSize}else d=e.offsetWidth,f=e.offsetHeight;i({width:d,height:f})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else i(void 0)},[e]),a}vN(Aw,"useSize");const yN=["top","right","bottom","left"],ll=Math.min,dr=Math.max,Od=Math.round,fd=Math.floor,fr=e=>({x:e,y:e}),xN={left:"right",right:"left",bottom:"top",top:"bottom"};function _w(e,a,i){return dr(e,ll(a,i))}function pr(e,a){return typeof e=="function"?e(a):e}function ol(e){return e.split("-")[0]}function hs(e){return e.split("-")[1]}function H0(e){return e==="x"?"y":"x"}function U0(e){return e==="y"?"height":"width"}function Di(e){const a=e[0];return a==="t"||a==="b"?"y":"x"}function q0(e){return H0(Di(e))}function bN(e,a,i){i===void 0&&(i=!1);const r=hs(e),c=q0(e),u=U0(c);let d=c==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(d=zd(d)),[d,zd(d)]}function jN(e){const a=zd(e);return[Kp(e),a,Kp(a)]}function Kp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ex=["left","right"],tx=["right","left"],wN=["top","bottom"],SN=["bottom","top"];function kN(e,a,i){switch(e){case"top":case"bottom":return i?a?tx:ex:a?ex:tx;case"left":case"right":return a?wN:SN;default:return[]}}function CN(e,a,i,r){const c=hs(e);let u=kN(ol(e),i==="start",r);return c&&(u=u.map(d=>d+"-"+c),a&&(u=u.concat(u.map(Kp)))),u}function zd(e){const a=ol(e);return xN[a]+e.slice(a.length)}function NN(e){var a,i,r,c;return{top:(a=e.top)!=null?a:0,right:(i=e.right)!=null?i:0,bottom:(r=e.bottom)!=null?r:0,left:(c=e.left)!=null?c:0}}function Mw(e){return typeof e!="number"?NN(e):{top:e,right:e,bottom:e,left:e}}function Ld(e){const{x:a,y:i,width:r,height:c}=e;return{width:r,height:c,top:i,left:a,right:a+r,bottom:i+c,x:a,y:i}}function nx(e,a,i){let{reference:r,floating:c}=e;const u=Di(a),d=q0(a),f=U0(d),m=ol(a),v=u==="y",y=r.x+r.width/2-c.width/2,p=r.y+r.height/2-c.height/2,b=r[f]/2-c[f]/2;let j;switch(m){case"top":j={x:y,y:r.y-c.height};break;case"bottom":j={x:y,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:p};break;case"left":j={x:r.x-c.width,y:p};break;default:j={x:r.x,y:r.y}}const S=hs(a);return S&&(j[d]+=b*(S==="end"?1:-1)*(i&&v?-1:1)),j}async function EN(e,a){var i;a===void 0&&(a={});const{x:r,y:c,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:p="floating",altBoundary:b=!1,padding:j=0}=pr(a,e),S=Mw(j),C=f[b?p==="floating"?"reference":"floating":p],E=Ld(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(C)))==null||i?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:v,rootBoundary:y,strategy:m})),M=p==="floating"?{x:r,y:c,width:d.floating.width,height:d.floating.height}:d.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),_=await(u.isElement==null?void 0:u.isElement(T))&&await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1},z=Ld(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:T,strategy:m}):M);return{top:(E.top-z.top+S.top)/_.y,bottom:(z.bottom-E.bottom+S.bottom)/_.y,left:(E.left-z.left+S.left)/_.x,right:(z.right-E.right+S.right)/_.x}}const TN=50,AN=async(e,a,i)=>{const{placement:r="bottom",strategy:c="absolute",middleware:u=[],platform:d}=i,f=d.detectOverflow?d:{...d,detectOverflow:EN},m=await(d.isRTL==null?void 0:d.isRTL(a));let v=await d.getElementRects({reference:e,floating:a,strategy:c}),{x:y,y:p}=nx(v,r,m),b=r,j=0;const S={};for(let k=0;k<u.length;k++){const C=u[k];if(!C)continue;const{name:E,fn:M}=C,{x:T,y:_,data:z,reset:A}=await M({x:y,y:p,initialPlacement:r,placement:b,strategy:c,middlewareData:S,rects:v,platform:f,elements:{reference:e,floating:a}});y=T??y,p=_??p,S[E]={...S[E],...z},A&&j<TN&&(j++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(v=A.rects===!0?await d.getElementRects({reference:e,floating:a,strategy:c}):A.rects),{x:y,y:p}=nx(v,b,m)),k=-1)}return{x:y,y:p,placement:b,strategy:c,middlewareData:S}},_N=e=>({name:"arrow",options:e,async fn(a){const{x:i,y:r,placement:c,rects:u,platform:d,elements:f,middlewareData:m}=a,{element:v,padding:y=0}=pr(e,a)||{};if(v==null)return{};const p=Mw(y),b={x:i,y:r},j=q0(c),S=U0(j),k=await d.getDimensions(v),C=j==="y",E=C?"top":"left",M=C?"bottom":"right",T=C?"clientHeight":"clientWidth",_=u.reference[S]+u.reference[j]-b[j]-u.floating[S],z=b[j]-u.reference[j],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let P=A?A[T]:0;(!P||!await(d.isElement==null?void 0:d.isElement(A)))&&(P=f.floating[T]||u.floating[S]);const H=_/2-z/2,U=P/2-k[S]/2-1,O=ll(p[E],U),G=ll(p[M],U),q=P-k[S]-G,Q=P/2-k[S]/2+H,V=_w(O,Q,q),Y=!m.arrow&&hs(c)!=null&&Q!==V&&u.reference[S]/2-(Q<O?O:G)-k[S]/2<0,K=Y?Q<O?Q-O:Q-q:0;return{[j]:b[j]+K,data:{[j]:V,centerOffset:Q-V-K,...Y&&{alignmentOffset:K}},reset:Y}}}),MN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var i,r;const{placement:c,middlewareData:u,rects:d,initialPlacement:f,platform:m,elements:v}=a,{mainAxis:y=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...C}=pr(e,a);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const E=ol(c),M=Di(f),T=ol(f)===f,_=await(m.isRTL==null?void 0:m.isRTL(v.floating)),z=b||(T||!k?[zd(f)]:jN(f)),A=S!=="none";!b&&A&&z.push(...CN(f,k,S,_));const P=[f,...z],H=await m.detectOverflow(a,C),U=[];let O=((r=u.flip)==null?void 0:r.overflows)||[];if(y&&U.push(H[E]),p){const V=bN(c,d,_);U.push(H[V[0]],H[V[1]])}if(O=[...O,{placement:c,overflows:U}],!U.every(V=>V<=0)){var G,q;const V=(((G=u.flip)==null?void 0:G.index)||0)+1,Y=P[V];if(Y&&(!(p==="alignment"?M!==Di(Y):!1)||O.every($=>Di($.placement)===M?$.overflows[0]>0:!0)))return{data:{index:V,overflows:O},reset:{placement:Y}};let K=(q=O.filter(D=>D.overflows[0]<=0).sort((D,$)=>D.overflows[1]-$.overflows[1])[0])==null?void 0:q.placement;if(!K)switch(j){case"bestFit":{var Q;const D=(Q=O.filter($=>{if(A){const ne=Di($.placement);return ne===M||ne==="y"}return!0}).map($=>[$.placement,$.overflows.filter(ne=>ne>0).reduce((ne,R)=>ne+R,0)]).sort(($,ne)=>$[1]-ne[1])[0])==null?void 0:Q[0];D&&(K=D);break}case"initialPlacement":K=f;break}if(c!==K)return{reset:{placement:K}}}return{}}}};function ax(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function ix(e){return yN.some(a=>e[a]>=0)}const RN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){const{rects:i,platform:r}=a,{strategy:c="referenceHidden",...u}=pr(e,a);switch(c){case"referenceHidden":{const d=await r.detectOverflow(a,{...u,elementContext:"reference"}),f=ax(d,i.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ix(f)}}}case"escaped":{const d=await r.detectOverflow(a,{...u,altBoundary:!0}),f=ax(d,i.floating);return{data:{escapedOffsets:f,escaped:ix(f)}}}default:return{}}}}},Rw=new Set(["left","top"]);async function DN(e,a){const{placement:i,platform:r,elements:c}=e,u=await(r.isRTL==null?void 0:r.isRTL(c.floating)),d=ol(i),f=hs(i),m=Di(i)==="y",v=Rw.has(d)?-1:1,y=u&&m?-1:1,p=pr(a,e);let{mainAxis:b,crossAxis:j,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof S=="number"&&(j=f==="end"?S*-1:S),m?{x:j*y,y:b*v}:{x:b*v,y:j*y}}const ON=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var i,r;const{x:c,y:u,placement:d,middlewareData:f}=a,m=await DN(a,e);return d===((i=f.offset)==null?void 0:i.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:c+m.x,y:u+m.y,data:{...m,placement:d}}}}},zN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){const{x:i,y:r,placement:c,platform:u}=a,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:T,y:_}=M;return{x:T,y:_}}},...v}=pr(e,a),y={x:i,y:r},p=await u.detectOverflow(a,v),b=Di(c),j=H0(b);let S=y[j],k=y[b];const C=(M,T)=>_w(T+p[M==="y"?"top":"left"],T,T-p[M==="y"?"bottom":"right"]);d&&(S=C(j,S)),f&&(k=C(b,k));const E=m.fn({...a,[j]:S,[b]:k});return{...E,data:{x:E.x-i,y:E.y-r,enabled:{[j]:d,[b]:f}}}}}},LN=function(e){return e===void 0&&(e={}),{options:e,fn(a){var i,r;const{x:c,y:u,placement:d,rects:f,middlewareData:m}=a,{offset:v=0,mainAxis:y=!0,crossAxis:p=!0}=pr(e,a),b={x:c,y:u},j=Di(d),S=H0(j);let k=b[S],C=b[j];const E=pr(v,a),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(i=E.mainAxis)!=null?i:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(y){const z=S==="y"?"height":"width",A=f.reference[S]-f.floating[z]+M.mainAxis,P=f.reference[S]+f.reference[z]-M.mainAxis;k<A?k=A:k>P&&(k=P)}if(p){var T,_;const z=S==="y"?"width":"height",A=Rw.has(ol(d)),P=f.reference[j]-f.floating[z]+(A&&((T=m.offset)==null?void 0:T[j])||0)+(A?0:M.crossAxis),H=f.reference[j]+f.reference[z]+(A?0:((_=m.offset)==null?void 0:_[j])||0)-(A?M.crossAxis:0);C<P?C=P:C>H&&(C=H)}return{[S]:k,[j]:C}}}},BN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(a){const{placement:i,rects:r,platform:c,elements:u}=a,{apply:d=()=>{},...f}=pr(e,a),m=await c.detectOverflow(a,f),v=ol(i),y=hs(i),p=Di(i)==="y",{width:b,height:j}=r.floating;let S,k;v==="top"||v==="bottom"?(S=v,k=y===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,S=y==="end"?"top":"bottom");const C=j-m.top-m.bottom,E=b-m.left-m.right,M=ll(j-m[S],C),T=ll(b-m[k],E),_=a.middlewareData.shift,z=!_;let A=M,P=T;_!=null&&_.enabled.x&&(P=E),_!=null&&_.enabled.y&&(A=C),z&&!y&&(p?P=b-2*dr(m.left,m.right):A=j-2*dr(m.top,m.bottom)),await d({...a,availableWidth:P,availableHeight:A});const H=await c.getDimensions(u.floating);return b!==H.width||j!==H.height?{reset:{rects:!0}}:{}}}};function tf(){return typeof window<"u"}function ms(e){return Dw(e)?(e.nodeName||"").toLowerCase():"#document"}function ca(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function jr(e){var a;return(a=(Dw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function Dw(e){return tf()?e instanceof Node||e instanceof ca(e).Node:!1}function Ii(e){return tf()?e instanceof Element||e instanceof ca(e).Element:!1}function ul(e){return tf()?e instanceof HTMLElement||e instanceof ca(e).HTMLElement:!1}function rx(e){return!tf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ca(e).ShadowRoot}function nf(e){const{overflow:a,overflowX:i,overflowY:r,display:c}=Pi(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&c!=="inline"&&c!=="contents"}function IN(e){return/^(table|td|th)$/.test(ms(e))}function af(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const PN=/transform|translate|scale|rotate|perspective|filter/,HN=/paint|layout|strict|content/,Vl=e=>!!e&&e!=="none";let Jm;function F0(e){const a=Ii(e)?Pi(e):e;return Vl(a.transform)||Vl(a.translate)||Vl(a.scale)||Vl(a.rotate)||Vl(a.perspective)||!V0()&&(Vl(a.backdropFilter)||Vl(a.filter))||PN.test(a.willChange||"")||HN.test(a.contain||"")}function UN(e){let a=no(e);for(;ul(a)&&!Sc(a);){if(F0(a))return a;if(af(a))return null;a=no(a)}return null}function V0(){return Jm==null&&(Jm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jm}function Sc(e){return/^(html|body|#document)$/.test(ms(e))}function Pi(e){return ca(e).getComputedStyle(e)}function rf(e){return Ii(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function no(e){if(ms(e)==="html")return e;const a=e.assignedSlot||e.parentNode||rx(e)&&e.host||jr(e);return rx(a)?a.host:a}function Ow(e){const a=no(e);return Sc(a)?(e.ownerDocument||e).body:ul(a)&&nf(a)?a:Ow(a)}function kc(e,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const c=Ow(e),u=c===((r=e.ownerDocument)==null?void 0:r.body),d=ca(c);if(u){const f=Qp(d);return a.concat(d,d.visualViewport||[],nf(c)?c:[],f&&i?kc(f):[])}else return a.concat(c,kc(c,[],i))}function Qp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zw(e){const a=Pi(e);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const c=ul(e),u=c?e.offsetWidth:i,d=c?e.offsetHeight:r,f=Od(i)!==u||Od(r)!==d;return f&&(i=u,r=d),{width:i,height:r,$:f}}function $0(e){return Ii(e)?e:e.contextElement}function os(e){const a=$0(e);if(!ul(a))return fr(1);const i=a.getBoundingClientRect(),{width:r,height:c,$:u}=zw(a);let d=(u?Od(i.width):i.width)/r,f=(u?Od(i.height):i.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const qN=fr(0);function Lw(e){const a=ca(e);return!V0()||!a.visualViewport?qN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function FN(e,a,i){return a===void 0&&(a=!1),!!i&&a&&i===ca(e)}function ao(e,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const c=e.getBoundingClientRect(),u=$0(e);let d=fr(1);a&&(r?Ii(r)&&(d=os(r)):d=os(e));const f=FN(u,i,r)?Lw(u):fr(0);let m=(c.left+f.x)/d.x,v=(c.top+f.y)/d.y,y=c.width/d.x,p=c.height/d.y;if(u&&r){const b=ca(u),j=Ii(r)?ca(r):r;let S=b,k=Qp(S);for(;k&&j!==S;){const C=os(k),E=k.getBoundingClientRect(),M=Pi(k),T=E.left+(k.clientLeft+parseFloat(M.paddingLeft))*C.x,_=E.top+(k.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,v*=C.y,y*=C.x,p*=C.y,m+=T,v+=_,S=ca(k),k=Qp(S)}}return Ld({width:y,height:p,x:m,y:v})}function lf(e,a){const i=rf(e).scrollLeft;return a?a.left+i:ao(jr(e)).left+i}function Bw(e,a){const i=e.getBoundingClientRect(),r=i.left+a.scrollLeft-lf(e,i),c=i.top+a.scrollTop;return{x:r,y:c}}function VN(e){let{elements:a,rect:i,offsetParent:r,strategy:c}=e;const u=c==="fixed",d=jr(r),f=a?af(a.floating):!1;if(r===d||f&&u)return i;let m={scrollLeft:0,scrollTop:0},v=fr(1);const y=fr(0),p=ul(r);if((p||!u)&&((ms(r)!=="body"||nf(d))&&(m=rf(r)),p)){const j=ao(r);v=os(r),y.x=j.x+r.clientLeft,y.y=j.y+r.clientTop}const b=d&&!p&&!u?Bw(d,m):fr(0);return{width:i.width*v.x,height:i.height*v.y,x:i.x*v.x-m.scrollLeft*v.x+y.x+b.x,y:i.y*v.y-m.scrollTop*v.y+y.y+b.y}}function $N(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function GN(e){const a=rf(e),i=e.ownerDocument.body,r=dr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),c=dr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-a.scrollLeft+lf(e);const d=-a.scrollTop;return Pi(i).direction==="rtl"&&(u+=dr(e.clientWidth,i.clientWidth)-r),{width:r,height:c,x:u,y:d}}const YN=25;function XN(e,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",c=ca(e),u=jr(e),d=c.visualViewport;let f=u.clientWidth,m=u.clientHeight,v=0,y=0;if(d){const b=!V0()||a==="fixed";r?b||(v=-d.offsetLeft,y=-d.offsetTop):(f=d.width,m=d.height,b&&(v=d.offsetLeft,y=d.offsetTop))}if(lf(u)<=0){const b=u.ownerDocument,j=b.body,S=getComputedStyle(j),k=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(u.clientWidth-j.clientWidth-k),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?C/2:C;E<=YN&&(f-=E)}return{width:f,height:m,x:v,y}}function KN(e,a){const i=ao(e,!0,a==="fixed"),r=i.top+e.clientTop,c=i.left+e.clientLeft,u=os(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=c*u.x,v=r*u.y;return{width:d,height:f,x:m,y:v}}function lx(e,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=XN(e,i,a);else if(a==="document")r=GN(jr(e));else if(Ii(a))r=KN(a,i);else{const c=Lw(e);r={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return Ld(r)}function QN(e,a){const i=a.get(e);if(i)return i;let r=kc(e,[],!1).filter(f=>Ii(f)&&ms(f)!=="body"),c=null;const u=Pi(e).position==="fixed";let d=u?no(e):e;for(;Ii(d)&&!Sc(d);){const f=Pi(d),m=F0(d),v=c?c.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&f.position==="static")?r=r.filter(p=>p!==d):c=f,d=no(d)}return a.set(e,r),r}function ZN(e){let{element:a,boundary:i,rootBoundary:r,strategy:c}=e;const d=[...i==="clippingAncestors"?af(a)?[]:QN(a,this._c):[].concat(i),r],f=lx(a,d[0],c);let m=f.top,v=f.right,y=f.bottom,p=f.left;for(let b=1;b<d.length;b++){const j=lx(a,d[b],c);m=dr(j.top,m),v=ll(j.right,v),y=ll(j.bottom,y),p=dr(j.left,p)}return{width:v-p,height:y-m,x:p,y:m}}function JN(e){const{width:a,height:i}=zw(e);return{width:a,height:i}}function WN(e,a,i){const r=ul(a),c=jr(a),u=i==="fixed",d=ao(e,!0,u,a);let f={scrollLeft:0,scrollTop:0};const m=fr(0);if((r||!u)&&((ms(a)!=="body"||nf(c))&&(f=rf(a)),r)){const b=ao(a,!0,u,a);m.x=b.x+a.clientLeft,m.y=b.y+a.clientTop}!r&&c&&(m.x=lf(c));const v=c&&!r&&!u?Bw(c,f):fr(0),y=d.left+f.scrollLeft-m.x-v.x,p=d.top+f.scrollTop-m.y-v.y;return{x:y,y:p,width:d.width,height:d.height}}function Wm(e){return Pi(e).position==="static"}function ox(e,a){if(!ul(e)||Pi(e).position==="fixed")return null;if(a)return a(e);let i=e.offsetParent;return jr(e)===i&&(i=i.ownerDocument.body),i}function Iw(e,a){const i=ca(e);if(af(e))return i;if(!ul(e)){let c=no(e);for(;c&&!Sc(c);){if(Ii(c)&&!Wm(c))return c;c=no(c)}return i}let r=ox(e,a);for(;r&&IN(r)&&Wm(r);)r=ox(r,a);return r&&Sc(r)&&Wm(r)&&!F0(r)?i:r||UN(e)||i}const eE=async function(e){const a=this.getOffsetParent||Iw,i=this.getDimensions,r=await i(e.floating);return{reference:WN(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tE(e){return Pi(e).direction==="rtl"}const nE={convertOffsetParentRelativeRectToViewportRelativeRect:VN,getDocumentElement:jr,getClippingRect:ZN,getOffsetParent:Iw,getElementRects:eE,getClientRects:$N,getDimensions:JN,getScale:os,isElement:Ii,isRTL:tE};function Pw(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function aE(e,a,i){let r=null,c;const u=jr(e);function d(){var y;clearTimeout(c),(y=r)==null||y.disconnect(),r=null}function f(y,p){y===void 0&&(y=!1),p===void 0&&(p=1),d();const b=e.getBoundingClientRect(),{left:j,top:S,width:k,height:C}=b;if(y||a(),!k||!C)return;const E=fd(S),M=fd(u.clientWidth-(j+k)),T=fd(u.clientHeight-(S+C)),_=fd(j),A={rootMargin:-E+"px "+-M+"px "+-T+"px "+-_+"px",threshold:dr(0,ll(1,p))||1};let P=!0;function H(U){const O=U[0].intersectionRatio;if(!Pw(b,e.getBoundingClientRect()))return f();if(O!==p){if(!P)return f();O?f(!1,O):c=setTimeout(()=>{f(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(H,{...A,root:u.ownerDocument})}catch{r=new IntersectionObserver(H,A)}r.observe(e)}const m=ca(e),v=()=>f(i);return m.addEventListener("resize",v),f(!0),()=>{m.removeEventListener("resize",v),d()}}function iE(e,a,i,r){r===void 0&&(r={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,v=$0(e),y=c||u?[...v?kc(v):[],...a?kc(a):[]]:[];y.forEach(E=>{c&&E.addEventListener("scroll",i),u&&E.addEventListener("resize",i)});const p=v&&f?aE(v,i,u):null;let b=-1,j=null;d&&(j=new ResizeObserver(E=>{let[M]=E;M&&M.target===v&&j&&a&&(j.unobserve(a),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var T;(T=j)==null||T.observe(a)})),i()}),v&&!m&&j.observe(v),a&&j.observe(a));let S,k=m?ao(e):null;m&&C();function C(){const E=ao(e);k&&!Pw(k,E)&&i(),k=E,S=requestAnimationFrame(C)}return i(),()=>{var E;y.forEach(M=>{c&&M.removeEventListener("scroll",i),u&&M.removeEventListener("resize",i)}),p==null||p(),(E=j)==null||E.disconnect(),j=null,m&&cancelAnimationFrame(S)}}const rE=ON,lE=zN,oE=MN,sE=BN,cE=RN,sx=_N,uE=LN,dE=(e,a,i)=>{const r=new Map,c=i??{},u={...nE,...c.platform,_c:r};return AN(e,a,{...c,platform:u})};var fE=typeof document<"u",hE=function(){},Td=fE?w.useLayoutEffect:hE;function Bd(e,a){if(e===a)return!0;if(typeof e!=typeof a)return!1;if(typeof e=="function"&&e.toString()===a.toString())return!0;let i,r,c;if(e&&a&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==a.length)return!1;for(r=i;r--!==0;)if(!Bd(e[r],a[r]))return!1;return!0}if(c=Object.keys(e),i=c.length,i!==Object.keys(a).length)return!1;for(r=i;r--!==0;)if(!{}.hasOwnProperty.call(a,c[r]))return!1;for(r=i;r--!==0;){const u=c[r];if(!(u==="_owner"&&e.$$typeof)&&!Bd(e[u],a[u]))return!1}return!0}return e!==e&&a!==a}function Hw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cx(e,a){const i=Hw(e);return Math.round(a*i)/i}function ep(e){const a=w.useRef(e);return Td(()=>{a.current=e}),a}function mE(e){e===void 0&&(e={});const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:c,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:m,open:v}=e,[y,p]=w.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[b,j]=w.useState(r);Bd(b,r)||j(r);const[S,k]=w.useState(null),[C,E]=w.useState(null),M=w.useCallback($=>{$!==A.current&&(A.current=$,k($))},[]),T=w.useCallback($=>{$!==P.current&&(P.current=$,E($))},[]),_=u||S,z=d||C,A=w.useRef(null),P=w.useRef(null),H=w.useRef(y),U=m!=null,O=ep(m),G=ep(c),q=ep(v),Q=w.useCallback(()=>{if(!A.current||!P.current)return;const $={placement:a,strategy:i,middleware:b};G.current&&($.platform=G.current),dE(A.current,P.current,$).then(ne=>{const R={...ne,isPositioned:q.current!==!1};V.current&&!Bd(H.current,R)&&(H.current=R,so.flushSync(()=>{p(R)}))})},[b,a,i,G,q]);Td(()=>{v===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[v]);const V=w.useRef(!1);Td(()=>(V.current=!0,()=>{V.current=!1}),[]),Td(()=>{if(_&&(A.current=_),z&&(P.current=z),_&&z){if(O.current)return O.current(_,z,Q);Q()}},[_,z,Q,O,U]);const Y=w.useMemo(()=>({reference:A,floating:P,setReference:M,setFloating:T}),[M,T]),K=w.useMemo(()=>({reference:_,floating:z}),[_,z]),D=w.useMemo(()=>{const $={position:i,left:0,top:0};if(!K.floating)return $;const ne=cx(K.floating,y.x),R=cx(K.floating,y.y);return f?{...$,transform:"translate("+ne+"px, "+R+"px)",...Hw(K.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:ne,top:R}},[i,f,K.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:Q,refs:Y,elements:K,floatingStyles:D}),[y,Q,Y,K,D])}const pE=e=>{function a(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){const{element:r,padding:c}=typeof e=="function"?e(i):e;return r&&a(r)?r.current!=null?sx({element:r.current,padding:c}).fn(i):{}:r?sx({element:r,padding:c}).fn(i):{}}}},gE=(e,a)=>{const i=rE(e);return{name:i.name,fn:i.fn,options:[e,a]}},vE=(e,a)=>{const i=lE(e);return{name:i.name,fn:i.fn,options:[e,a]}},yE=(e,a)=>({fn:uE(e).fn,options:[e,a]}),xE=(e,a)=>{const i=oE(e);return{name:i.name,fn:i.fn,options:[e,a]}},bE=(e,a)=>{const i=sE(e);return{name:i.name,fn:i.fn,options:[e,a]}},jE=(e,a)=>{const i=cE(e);return{name:i.name,fn:i.fn,options:[e,a]}},wE=(e,a)=>{const i=pE(e);return{name:i.name,fn:i.fn,options:[e,a]}};var SE=Object.defineProperty,il=(e,a)=>SE(e,"name",{value:a,configurable:!0}),Uw="Popper",[qw,of]=cl(Uw),[kE,Fw]=qw(Uw),CE=il(e=>{const{__scopePopper:a,children:i}=e,[r,c]=w.useState(null),[u,d]=w.useState(void 0);return o.jsx(kE,{scope:a,anchor:r,onAnchorChange:c,placementState:u,setPlacementState:d,children:i})},"Popper"),NE="PopperAnchor",EE=w.forwardRef(il(function(a,i){const{__scopePopper:r,virtualRef:c,...u}=a,d=Fw(NE,r),f=w.useRef(null),m=d.onAnchorChange,v=w.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=kt(i,v),p=w.useRef(null);w.useEffect(()=>{if(!c)return;const k=p.current;p.current=c.current,k!==p.current&&m(p.current)});const b=d.placementState&&sf(d.placementState),j=b==null?void 0:b[0],S=b==null?void 0:b[1];return c?null:o.jsx(Bt.div,{"data-radix-popper-side":j,"data-radix-popper-align":S,...u,ref:y})},"PopperAnchor")),Vw="PopperContent",[TE,SP]=qw(Vw),AE=w.forwardRef(il(function(a,i){var xe,Ce,pe,W,je,Re,Oe;const{__scopePopper:r,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:p=0,sticky:b="partial",hideWhenDetached:j=!1,updatePositionStrategy:S="optimized",onPlaced:k,...C}=a,E=Fw(Vw,r),[M,T]=w.useState(null),_=kt(i,T),[z,A]=w.useState(null),P=Aw(z),H=(P==null?void 0:P.width)??0,U=(P==null?void 0:P.height)??0,O=c+(d!=="center"?"-"+d:""),G=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},q=Array.isArray(y)?y:[y],Q=q.length>0,V={padding:G,boundary:q.filter($w),altBoundary:Q},{refs:Y,floatingStyles:K,placement:D,isPositioned:$,middlewareData:ne}=mE({strategy:"fixed",placement:O,whileElementsMounted:il((...Fe)=>iE(...Fe,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[gE({mainAxis:u+U,alignmentAxis:f}),v&&vE({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?yE():void 0,...V}),v&&xE({...V}),bE({...V,apply:il(({elements:Fe,rects:Je,availableWidth:We,availableHeight:Ct})=>{const{width:rn,height:xn}=Je.reference,Pn=Fe.floating.style;Pn.setProperty("--radix-popper-available-width",`${We}px`),Pn.setProperty("--radix-popper-available-height",`${Ct}px`),Pn.setProperty("--radix-popper-anchor-width",`${rn}px`),Pn.setProperty("--radix-popper-anchor-height",`${xn}px`)},"apply")}),z&&wE({element:z,padding:m}),_E({arrowWidth:H,arrowHeight:U}),j&&jE({strategy:"referenceHidden",...V,boundary:Q?V.boundary:void 0})]}),R=E.setPlacementState;Mn(()=>(R(D),()=>{R(void 0)}),[D,R]);const[le,ie]=sf(D),B=_n(k);Mn(()=>{$&&(B==null||B())},[$,B]);const F=(xe=ne.arrow)==null?void 0:xe.x,se=(Ce=ne.arrow)==null?void 0:Ce.y,ye=((pe=ne.arrow)==null?void 0:pe.centerOffset)!==0,[we,ce]=w.useState();return Mn(()=>{M&&ce(window.getComputedStyle(M).zIndex)},[M]),o.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:$?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[(W=ne.transformOrigin)==null?void 0:W.x,(je=ne.transformOrigin)==null?void 0:je.y].join(" "),...((Re=ne.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:o.jsx(TE,{scope:r,placedSide:le,placedAlign:ie,onArrowChange:A,arrowX:F,arrowY:se,shouldHideArrow:ye,children:o.jsx(Bt.div,{"data-side":le,"data-align":ie,...C,ref:_,style:{...C.style,animation:$?(Oe=C.style)==null?void 0:Oe.animation:"none"}})})})},"PopperContent"));function $w(e){return e!==null}il($w,"isNotNull");var _E=il(e=>({name:"transformOrigin",options:e,fn(a){var C,E,M;const{placement:i,rects:r,middlewareData:c}=a,d=((C=c.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[v,y]=sf(i),p={start:"0%",center:"50%",end:"100%"}[y],b=(((E=c.arrow)==null?void 0:E.x)??0)+f/2,j=(((M=c.arrow)==null?void 0:M.y)??0)+m/2;let S="",k="";return v==="bottom"?(S=d?p:`${b}px`,k=`${-m}px`):v==="top"?(S=d?p:`${b}px`,k=`${r.floating.height+m}px`):v==="right"?(S=`${-m}px`,k=d?p:`${j}px`):v==="left"&&(S=`${r.floating.width+m}px`,k=d?p:`${j}px`),{data:{x:S,y:k}}}}),"transformOrigin");function sf(e){const[a,i="center"]=e.split("-");return[a,i]}il(sf,"getSideAndAlignFromPlacement");var Gw=CE,Yw=EE,Xw=AE,ME=Object.defineProperty,RE=(e,a)=>ME(e,"name",{value:a,configurable:!0}),DE=w.forwardRef(RE(function(a,i){return o.jsx(Bt.label,{...a,ref:i,onMouseDown:r=>{var u;r.target.closest("button, input, select, textarea")||((u=a.onMouseDown)==null||u.call(a,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),OE=DE,zE=Object.defineProperty,LE=(e,a)=>zE(e,"name",{value:a,configurable:!0});function Kw(e){const a=w.useRef({value:e,previous:e});return w.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}LE(Kw,"usePrevious");var BE=Object.defineProperty,IE=(e,a)=>BE(e,"name",{value:a,configurable:!0});function Id(e,[a,i]){return Math.min(i,Math.max(a,e))}IE(Id,"clamp");var PE=Object.defineProperty,dl=(e,a)=>PE(e,"name",{value:a,configurable:!0}),G0="Popover",[Qw,kP]=cl(G0,[of]),Y0=of(),[HE,ps]=Qw(G0),UE=dl(e=>{const{__scopePopover:a,children:i,open:r,defaultOpen:c,onOpenChange:u,modal:d=!1}=e,f=Y0(a),m=w.useRef(null),[v,y]=w.useState(!1),[p,b]=jc({prop:r,defaultProp:c??!1,onChange:u,caller:G0});return o.jsx(Gw,{...f,children:o.jsx(HE,{scope:a,contentId:Zl(),triggerRef:m,open:p,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(j=>!j),[b]),hasCustomAnchor:v,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:d,children:i})})},"Popover"),qE="PopoverTrigger",FE=w.forwardRef(dl(function(a,i){const{__scopePopover:r,...c}=a,u=ps(qE,r),d=Y0(r),f=kt(i,u.triggerRef),m=o.jsx(Bt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":X0(u.open),...c,ref:f,onClick:gt(a.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:o.jsx(Yw,{asChild:!0,...d,children:m})},"PopoverTrigger")),Zw="PopoverPortal",[VE,$E]=Qw(Zw,{forceMount:void 0}),GE=dl(e=>{const{__scopePopover:a,forceMount:i,children:r,container:c}=e,u=ps(Zw,a);return o.jsx(VE,{scope:a,forceMount:i,children:o.jsx(qi,{present:i||u.open,children:o.jsx(z0,{asChild:!0,container:c,children:r})})})},"PopoverPortal"),Cc="PopoverContent",YE=w.forwardRef(dl(function(a,i){const r=$E(Cc,a.__scopePopover),{forceMount:c=r.forceMount,...u}=a,d=ps(Cc,a.__scopePopover);return o.jsx(qi,{present:c||d.open,children:d.modal?o.jsx(KE,{...u,ref:i}):o.jsx(QE,{...u,ref:i})})},"PopoverContent")),XE=Bi("PopoverContent.RemoveScroll"),KE=w.forwardRef(dl(function(a,i){const r=ps(Cc,a.__scopePopover),c=w.useRef(null),u=kt(i,c),d=w.useRef(!1);return w.useEffect(()=>{const f=c.current;if(f)return B0(f)},[]),o.jsx(ef,{as:XE,allowPinchZoom:!0,children:o.jsx(Jw,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(a.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,f=>{const m=f.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;d.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:gt(a.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),QE=w.forwardRef(dl(function(a,i){const r=ps(Cc,a.__scopePopover),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(Jw,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(c.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=r.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"PopoverContentNonModal")),Jw=w.forwardRef(dl(function(a,i){const{__scopePopover:r,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:p,...b}=a,j=ps(Cc,r),S=Y0(r);return Dc(),o.jsx(D0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(M0,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>j.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(Xw,{"data-state":X0(j.open),role:"dialog",id:j.contentId,...S,...b,ref:i,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function X0(e){return e?"open":"closed"}dl(X0,"getState");var Ww=UE,e3=FE,t3=GE,n3=YE,ZE=Object.defineProperty,st=(e,a)=>ZE(e,"name",{value:a,configurable:!0});function a3(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}st(a3,"useStateMachine");var i3="ScrollArea",[r3,CP]=cl(i3),[JE,$a]=r3(i3),WE=w.forwardRef(st(function(a,i){const{__scopeScrollArea:r,type:c="hover",dir:u,scrollHideDelay:d=600,...f}=a,[m,v]=w.useState(null),[y,p]=w.useState(null),[b,j]=w.useState(null),[S,k]=w.useState(null),[C,E]=w.useState(null),[M,T]=w.useState(0),[_,z]=w.useState(0),[A,P]=w.useState(!1),[H,U]=w.useState(!1),O=kt(i,v),G=_0(u);return o.jsx(JE,{scope:r,type:c,dir:G,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:p,content:b,onContentChange:j,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:A,onScrollbarXEnabledChange:P,scrollbarY:C,onScrollbarYChange:E,scrollbarYEnabled:H,onScrollbarYEnabledChange:U,onCornerWidthChange:T,onCornerHeightChange:z,children:o.jsx(Bt.div,{dir:G,...f,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":_+"px",...a.style}})})},"ScrollArea")),eT="ScrollAreaViewport",tT=w.forwardRef(st(function(a,i){const{__scopeScrollArea:r,children:c,nonce:u,...d}=a,f=$a(eT,r),m=w.useRef(null),v=kt(i,m,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(nT,{nonce:u}),o.jsx(Bt.div,{"data-radix-scroll-area-viewport":"",...d,ref:v,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...a.style},children:o.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:c})})]})},"ScrollAreaViewport")),nT=w.memo(st(function({nonce:a}){return o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a})},"ScrollAreaViewportStyle"),(e,a)=>e.nonce===a.nonce),wr="ScrollAreaScrollbar",aT=w.forwardRef(st(function(a,i){const{forceMount:r,...c}=a,u=$a(wr,a.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=a.orientation==="horizontal";return w.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?o.jsx(iT,{...c,ref:i,forceMount:r}):u.type==="scroll"?o.jsx(rT,{...c,ref:i,forceMount:r}):u.type==="auto"?o.jsx(l3,{...c,ref:i,forceMount:r}):u.type==="always"?o.jsx(K0,{...c,ref:i,"data-state":"visible"}):null},"ScrollAreaScrollbar")),iT=w.forwardRef(st(function(a,i){const{forceMount:r,...c}=a,u=$a(wr,a.__scopeScrollArea),[d,f]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=st(()=>{window.clearTimeout(v),f(!0)},"handlePointerEnter"),p=st(()=>{v=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",p),()=>{window.clearTimeout(v),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",p)}}},[u.scrollArea,u.scrollHideDelay]),o.jsx(qi,{present:r||d,children:o.jsx(l3,{"data-state":d?"visible":"hidden",...c,ref:i})})},"ScrollAreaScrollbarHover")),rT=w.forwardRef(st(function(a,i){const{forceMount:r,...c}=a,u=$a(wr,a.__scopeScrollArea),d=a.orientation==="horizontal",f=zc(()=>v("SCROLL_END"),100),[m,v]=a3("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),w.useEffect(()=>{const y=u.viewport,p=d?"scrollLeft":"scrollTop";if(y){let b=y[p];const j=st(()=>{const S=y[p];b!==S&&(v("SCROLL"),f()),b=S},"handleScroll");return y.addEventListener("scroll",j),()=>y.removeEventListener("scroll",j)}},[u.viewport,d,v,f]),o.jsx(qi,{present:r||m!=="hidden",children:o.jsx(K0,{"data-state":m==="hidden"?"hidden":"visible",...c,ref:i,onPointerEnter:gt(a.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:gt(a.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),l3=w.forwardRef(st(function(a,i){const r=$a(wr,a.__scopeScrollArea),{forceMount:c,...u}=a,[d,f]=w.useState(!1),m=a.orientation==="horizontal",v=zc(()=>{if(r.viewport){const y=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;f(m?y:p)}},10);return io(r.viewport,v),io(r.content,v),o.jsx(qi,{present:c||d,children:o.jsx(K0,{"data-state":d?"visible":"hidden",...u,ref:i})})},"ScrollAreaScrollbarAuto")),K0=w.forwardRef(st(function(a,i){const{orientation:r="vertical",...c}=a,u=$a(wr,a.__scopeScrollArea),d=w.useRef(null),f=w.useRef(0),[m,v]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=Q0(m.viewport,m.content),p={...c,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:st(j=>d.current=j,"onThumbChange"),onThumbPointerUp:st(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:st(j=>f.current=j,"onThumbPointerDown")};function b(j,S){return u3(j,f.current,m,S)}return st(b,"getScrollPosition"),r==="horizontal"?o.jsx(lT,{...p,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollLeft,S=Jp(j,m,u.dir);d.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollLeft=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollLeft=b(j,u.dir))}}):r==="vertical"?o.jsx(oT,{...p,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollTop,S=Jp(j,m);d.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollTop=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollTop=b(j))}}):null},"ScrollAreaScrollbarVisible")),lT=w.forwardRef(st(function(a,i){const{sizes:r,onSizesChange:c,...u}=a,d=$a(wr,a.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=kt(i,v,d.onScrollbarXChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(s3,{"data-orientation":"horizontal",...u,ref:y,sizes:r,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oc(r)+"px",...a.style},onThumbPointerDown:p=>a.onThumbPointerDown(p.x),onDragScroll:p=>a.onDragScroll(p.x),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollLeft+p.deltaX;a.onWheelScroll(j),J0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:Nc(f.paddingLeft),paddingEnd:Nc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),oT=w.forwardRef(st(function(a,i){const{sizes:r,onSizesChange:c,...u}=a,d=$a(wr,a.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=kt(i,v,d.onScrollbarYChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(s3,{"data-orientation":"vertical",...u,ref:y,sizes:r,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oc(r)+"px",...a.style},onThumbPointerDown:p=>a.onThumbPointerDown(p.y),onDragScroll:p=>a.onDragScroll(p.y),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollTop+p.deltaY;a.onWheelScroll(j),J0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:Nc(f.paddingTop),paddingEnd:Nc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[sT,o3]=r3(wr),s3=w.forwardRef(st(function(a,i){const{__scopeScrollArea:r,sizes:c,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:p,onResize:b,...j}=a,S=$a(wr,r),[k,C]=w.useState(null),E=kt(i,C),M=w.useRef(null),T=w.useRef(""),_=S.viewport,z=c.content-c.viewport,A=_n(p),P=_n(v),H=zc(b,10);function U(O){if(M.current){const G=O.clientX-M.current.left,q=O.clientY-M.current.top;y({x:G,y:q})}}return st(U,"handleDragScroll"),w.useEffect(()=>{const O=st(G=>{const q=G.target;(k==null?void 0:k.contains(q))&&A(G,z)},"handleWheel");return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[_,k,z,A]),w.useEffect(P,[c,P]),io(k,H),io(S.content,H),o.jsx(sT,{scope:r,scrollbar:k,hasThumb:u,onThumbChange:_n(d),onThumbPointerUp:_n(f),onThumbPositionChange:P,onThumbPointerDown:_n(m),children:o.jsx(Bt.div,{...j,ref:E,style:{position:"absolute",...j.style},onPointerDown:gt(a.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),M.current=k.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),U(O))}),onPointerMove:gt(a.onPointerMove,U),onPointerUp:gt(a.onPointerUp,O=>{const G=O.target;G.hasPointerCapture(O.pointerId)&&G.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=T.current,S.viewport&&(S.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),Zp="ScrollAreaThumb",cT=w.forwardRef(st(function(a,i){const{forceMount:r,...c}=a,u=o3(Zp,a.__scopeScrollArea);return o.jsx(qi,{present:r||u.hasThumb,children:o.jsx(uT,{ref:i,...c})})},"ScrollAreaThumb")),uT=w.forwardRef(st(function(a,i){const{__scopeScrollArea:r,style:c,...u}=a,d=$a(Zp,r),f=o3(Zp,r),{onThumbPositionChange:m}=f,v=kt(i,f.onThumbChange),y=w.useRef(void 0),p=zc(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const b=d.viewport;if(b){const j=st(()=>{if(p(),!y.current){const S=hT(b,m);y.current=S,m()}},"handleScroll");return m(),b.addEventListener("scroll",j),()=>b.removeEventListener("scroll",j)}},[d.viewport,p,m]),o.jsx(Bt.div,{"data-state":f.hasThumb?"visible":"hidden",...u,ref:v,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...c},onPointerDownCapture:gt(a.onPointerDownCapture,b=>{const S=b.target.getBoundingClientRect(),k=b.clientX-S.left,C=b.clientY-S.top;f.onThumbPointerDown({x:k,y:C})}),onPointerUp:gt(a.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),c3="ScrollAreaCorner",dT=w.forwardRef(st(function(a,i){const r=$a(c3,a.__scopeScrollArea),c=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&c?o.jsx(fT,{...a,ref:i}):null},"ScrollAreaCorner")),fT=w.forwardRef(st(function(a,i){const{__scopeScrollArea:r,...c}=a,u=$a(c3,r),[d,f]=w.useState(0),[m,v]=w.useState(0),y=!!(d&&m),{onCornerWidthChange:p,onCornerHeightChange:b}=u;return io(u.scrollbarX,()=>{var S;const j=((S=u.scrollbarX)==null?void 0:S.offsetHeight)||0;u.onCornerHeightChange(j),v(j)}),io(u.scrollbarY,()=>{var S;const j=((S=u.scrollbarY)==null?void 0:S.offsetWidth)||0;u.onCornerWidthChange(j),f(j)}),w.useEffect(()=>()=>{p(0),b(0)},[p,b]),y?o.jsx(Bt.div,{...c,ref:i,style:{width:d,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...a.style}}):null},"ScrollAreaCornerImpl"));function Nc(e){return e?parseInt(e,10):0}st(Nc,"toInt");function Q0(e,a){const i=e/a;return isNaN(i)?0:i}st(Q0,"getThumbRatio");function Oc(e){const a=Q0(e.viewport,e.content),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-i)*a;return Math.max(r,18)}st(Oc,"getThumbSize");function u3(e,a,i,r="ltr"){const c=Oc(i),u=c/2,d=a||u,f=c-d,m=i.scrollbar.paddingStart+d,v=i.scrollbar.size-i.scrollbar.paddingEnd-f,y=i.content-i.viewport,p=r==="ltr"?[0,y]:[y*-1,0];return Z0([m,v],p)(e)}st(u3,"getScrollPositionFromPointer");function Jp(e,a,i="ltr"){const r=Oc(a),c=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,u=a.scrollbar.size-c,d=a.content-a.viewport,f=u-r,m=i==="ltr"?[0,d]:[d*-1,0],v=Id(e,m);return Z0([0,d],[0,f])(v)}st(Jp,"getThumbOffsetFromScroll");function Z0(e,a){return i=>{if(e[0]===e[1]||a[0]===a[1])return a[0];const r=(a[1]-a[0])/(e[1]-e[0]);return a[0]+r*(i-e[0])}}st(Z0,"linearScale");function J0(e,a){return e>0&&e<a}st(J0,"isScrollingWithinScrollbarBounds");var hT=st((e,a=()=>{})=>{let i={left:e.scrollLeft,top:e.scrollTop},r=0;return st((function c(){const u={left:e.scrollLeft,top:e.scrollTop},d=i.left!==u.left,f=i.top!==u.top;(d||f)&&a(),i=u,r=window.requestAnimationFrame(c)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function zc(e,a){const i=_n(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(i,a)},[i,a])}st(zc,"useDebounceCallback");function io(e,a){const i=_n(a);Mn(()=>{let r=0;if(e){const c=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(i)});return c.observe(e),()=>{window.cancelAnimationFrame(r),c.unobserve(e)}}},[e,i])}st(io,"useResizeObserver");var mT=WE,pT=tT,gT=dT,vT=Object.defineProperty,Et=(e,a)=>vT(e,"name",{value:a,configurable:!0}),yT=[" ","Enter","ArrowUp","ArrowDown"],xT=[" ","Enter"],ss="Select",[cf,W0,bT]=G4(ss),[co,NP]=cl(ss,[bT,of]),eg=of(),[jT,fl]=co(ss),[wT,ST]=co(ss);function d3(e){const{__scopeSelect:a,children:i,open:r,defaultOpen:c,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:v,name:y,autoComplete:p,disabled:b,required:j,form:S,internal_do_not_use_render:k}=e,C=eg(a),[E,M]=w.useState(null),[T,_]=w.useState(null),[z,A]=w.useState(!1),P=_0(v),[H,U]=jc({prop:r,defaultProp:c??!1,onChange:u,caller:ss}),[O,G]=jc({prop:d,defaultProp:f,onChange:m,caller:ss}),q=w.useRef(null),Q=w.useRef(O);w.useEffect(()=>{const ie=S?E==null?void 0:E.ownerDocument.getElementById(S):E==null?void 0:E.form;if(ie instanceof HTMLFormElement){const B=Et(()=>G(Q.current),"reset");return ie.addEventListener("reset",B),()=>ie.removeEventListener("reset",B)}},[S,E,G]);const V=E?!!S||!!E.closest("form"):!0,[Y,K]=w.useState(new Set),D=Zl(),$=Array.from(Y).map(ie=>ie.props.value).join(";"),ne=w.useCallback(ie=>{K(B=>new Set(B).add(ie))},[]),R=w.useCallback(ie=>{K(B=>{const F=new Set(B);return F.delete(ie),F})},[]),le={required:j,trigger:E,onTriggerChange:M,valueNode:T,onValueNodeChange:_,valueNodeHasChildren:z,onValueNodeHasChildrenChange:A,contentId:D,value:O,onValueChange:G,open:H,onOpenChange:U,dir:P,triggerPointerDownPosRef:q,disabled:b,name:y,autoComplete:p,form:S,nativeOptions:Y,nativeSelectKey:$,isFormControl:V};return o.jsx(Gw,{...C,children:o.jsx(jT,{scope:a,...le,children:o.jsx(cf.Provider,{scope:a,children:o.jsx(wT,{scope:a,onNativeOptionAdd:ne,onNativeOptionRemove:R,children:m3(k)?k(le):i})})})})}Et(d3,"SelectProvider");var kT=Et(e=>{const{__scopeSelect:a,children:i,...r}=e;return o.jsx(d3,{__scopeSelect:a,...r,internal_do_not_use_render:({isFormControl:c})=>o.jsxs(o.Fragment,{children:[i,c?o.jsx(KT,{__scopeSelect:a}):null]})})},"Select"),CT="SelectTrigger",NT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,disabled:c=!1,...u}=a,d=eg(r),f=fl(CT,r),m=f.disabled||c,v=kt(i,f.onTriggerChange),y=W0(r),p=w.useRef("touch"),[b,j,S]=tg(C=>{const E=y().filter(_=>!_.disabled),M=E.find(_=>_.value===f.value),T=ng(E,C,M);T!==void 0&&f.onValueChange(T.value)}),k=Et(C=>{m||(f.onOpenChange(!0),S()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return o.jsx(Yw,{asChild:!0,...d,children:o.jsx(Bt.button,{type:"button",role:"combobox","aria-controls":f.open?f.contentId:void 0,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Lc(f.value)?"":void 0,...u,ref:v,onClick:gt(u.onClick,C=>{C.currentTarget.focus(),p.current!=="mouse"&&k(C)}),onPointerDown:gt(u.onPointerDown,C=>{p.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(k(C),C.preventDefault())}),onKeyDown:gt(u.onKeyDown,C=>{const E=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&j(C.key),!(E&&C.key===" ")&&yT.includes(C.key)&&(k(),C.preventDefault())})})})},"SelectTrigger")),ET="SelectValue",TT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,className:c,style:u,children:d,placeholder:f="",...m}=a,v=fl(ET,r),{onValueNodeHasChildrenChange:y}=v,p=d!==void 0,b=kt(i,v.onValueNodeChange);Mn(()=>{y(p)},[y,p]);const j=Lc(v.value);return o.jsx(Bt.span,{...m,asChild:j?!1:m.asChild,ref:b,style:{pointerEvents:"none"},children:o.jsx(w.Fragment,{children:j?f:d},j?"placeholder":"value")})},"SelectValue")),AT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,children:c,...u}=a;return o.jsx(Bt.span,{"aria-hidden":!0,...u,ref:i,children:c||"▼"})},"SelectIcon")),_T="SelectPortal",[MT,RT]=co(_T,{forceMount:void 0}),DT=Et(e=>{const{__scopeSelect:a,forceMount:i,...r}=e;return o.jsx(MT,{scope:e.__scopeSelect,forceMount:i,children:o.jsx(z0,{asChild:!0,...r})})},"SelectPortal"),ro="SelectContent",OT=w.forwardRef(Et(function(a,i){const r=RT(ro,a.__scopeSelect),{forceMount:c=r.forceMount,...u}=a,d=fl(ro,a.__scopeSelect),[f,m]=w.useState();return Mn(()=>{m(new DocumentFragment)},[]),o.jsx(qi,{present:c||d.open,children:({present:v})=>v?o.jsx(BT,{...u,ref:i}):o.jsx(zT,{...u,fragment:f})})},"SelectContent")),zT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,children:c,fragment:u}=a;return u?so.createPortal(o.jsx(f3,{scope:r,children:o.jsx(cf.Slot,{scope:r,children:o.jsx("div",{ref:i,children:c})})}),u):null},"SelectContentFragment")),ri=10,[f3,uf]=co(ro),LT=Bi("SelectContent.RemoveScroll"),BT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r}=a,{position:c="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E,...M}=a,T=fl(ro,r),[_,z]=w.useState(null),[A,P]=w.useState(null),H=kt(i,z),[U,O]=w.useState(null),[G,q]=w.useState(null),Q=W0(r),[V,Y]=w.useState(!1),K=w.useRef(!1);w.useEffect(()=>{if(_)return B0(_)},[_]),Dc();const D=w.useCallback(ce=>{const[xe,...Ce]=Q().map(je=>je.ref.current),[pe]=Ce.slice(-1),W=document.activeElement;for(const je of ce)if(je===W||(je==null||je.scrollIntoView({block:"nearest"}),je===xe&&A&&(A.scrollTop=0),je===pe&&A&&(A.scrollTop=A.scrollHeight),je==null||je.focus(),document.activeElement!==W))return},[Q,A]),$=w.useCallback(()=>D([U,_]),[D,U,_]);w.useEffect(()=>{V&&$()},[V,$]);const{onOpenChange:ne,triggerPointerDownPosRef:R}=T;w.useEffect(()=>{if(_){let ce={x:0,y:0};const xe=Et(pe=>{var W,je;ce={x:Math.abs(Math.round(pe.pageX)-(((W=R.current)==null?void 0:W.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((je=R.current)==null?void 0:je.y)??0))}},"handlePointerMove"),Ce=Et(pe=>{ce.x<=10&&ce.y<=10?pe.preventDefault():pe.composedPath().includes(_)||ne(!1),document.removeEventListener("pointermove",xe),R.current=null},"handlePointerUp");return R.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[_,ne,R]),w.useEffect(()=>{const ce=Et(()=>ne(!1),"close");return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[ne]);const[le,ie]=tg(ce=>{const xe=Q().filter(W=>!W.disabled),Ce=xe.find(W=>W.ref.current===document.activeElement),pe=ng(xe,ce,Ce);pe&&setTimeout(()=>{var W;return(W=pe.ref.current)==null?void 0:W.focus()})}),B=w.useCallback((ce,xe,Ce)=>{const pe=!K.current&&!Ce;(T.value!==void 0&&T.value===xe||pe)&&(O(ce),pe&&(K.current=!0))},[T.value]),F=w.useCallback(()=>_==null?void 0:_.focus(),[_]),se=w.useCallback((ce,xe,Ce)=>{const pe=!K.current&&!Ce;(T.value!==void 0&&T.value===xe||pe)&&q(ce)},[T.value]),ye=c==="popper"?ux:IT,we=ye===ux?{side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E}:{};return o.jsx(f3,{scope:r,content:_,viewport:A,onViewportChange:P,itemRefCallback:B,selectedItem:U,onItemLeave:F,itemTextRefCallback:se,focusSelectedItem:$,selectedItemText:G,position:c,isPositioned:V,searchRef:le,children:o.jsx(ef,{as:LT,allowPinchZoom:!0,children:o.jsx(D0,{asChild:!0,trapped:T.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:gt(u,ce=>{var xe;(xe=T.trigger)==null||xe.focus({preventScroll:!0}),ce.preventDefault()}),children:o.jsx(M0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:o.jsx(ye,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ce=>ce.preventDefault(),...M,...we,onPlaced:()=>Y(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:gt(M.onKeyDown,ce=>{const xe=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!xe&&ce.key.length===1&&ie(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let pe=Q().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const W=ce.target,je=pe.indexOf(W);pe=pe.slice(je+1)}setTimeout(()=>D(pe)),ce.preventDefault()}})})})})})})},"SelectContentImpl")),IT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,onPlaced:c,...u}=a,d=fl(ro,r),f=uf(ro,r),[m,v]=w.useState(null),[y,p]=w.useState(null),b=kt(i,p),j=W0(r),S=w.useRef(!1),k=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:M,focusSelectedItem:T}=f,_=w.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&C&&E&&M){const H=d.trigger.getBoundingClientRect(),U=y.getBoundingClientRect(),O=d.valueNode.getBoundingClientRect(),G=M.getBoundingClientRect();if(d.dir!=="rtl"){const W=G.left-U.left,je=O.left-W,Re=H.left-je,Oe=H.width+Re,Fe=Math.max(Oe,U.width),Je=window.innerWidth-ri,We=Id(je,[ri,Math.max(ri,Je-Fe)]);m.style.minWidth=Oe+"px",m.style.left=We+"px"}else{const W=U.right-G.right,je=window.innerWidth-O.right-W,Re=window.innerWidth-H.right-je,Oe=H.width+Re,Fe=Math.max(Oe,U.width),Je=window.innerWidth-ri,We=Id(je,[ri,Math.max(ri,Je-Fe)]);m.style.minWidth=Oe+"px",m.style.right=We+"px"}const q=j(),Q=window.innerHeight-ri*2,V=C.scrollHeight,Y=window.getComputedStyle(y),K=parseInt(Y.borderTopWidth,10),D=parseInt(Y.paddingTop,10),$=parseInt(Y.borderBottomWidth,10),ne=parseInt(Y.paddingBottom,10),R=K+D+V+ne+$,le=Math.min(E.offsetHeight*5,R),ie=window.getComputedStyle(C),B=parseInt(ie.paddingTop,10),F=parseInt(ie.paddingBottom,10),se=H.top+H.height/2-ri,ye=Q-se,we=E.offsetHeight/2,ce=E.offsetTop+we,xe=K+D+ce,Ce=R-xe;if(xe<=se){const W=q.length>0&&E===q[q.length-1].ref.current;m.style.bottom="0px";const je=y.clientHeight-C.offsetTop-C.offsetHeight,Re=Math.max(ye,we+(W?F:0)+je+$),Oe=xe+Re;m.style.height=Oe+"px"}else{const W=q.length>0&&E===q[0].ref.current;m.style.top="0px";const Re=Math.max(se,K+C.offsetTop+(W?B:0)+we)+Ce;m.style.height=Re+"px",C.scrollTop=xe-se+C.offsetTop}m.style.margin=`${ri}px 0`,m.style.minHeight=le+"px",m.style.maxHeight=Q+"px",c==null||c(),requestAnimationFrame(()=>S.current=!0)}},[j,d.trigger,d.valueNode,m,y,C,E,M,d.dir,c]);Mn(()=>_(),[_]);const[z,A]=w.useState();Mn(()=>{y&&A(window.getComputedStyle(y).zIndex)},[y]);const P=w.useCallback(H=>{H&&k.current===!0&&(_(),T==null||T(),k.current=!1)},[_,T]);return o.jsx(PT,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:P,children:o.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:o.jsx(Bt.div,{...u,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),ux=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,align:c="start",collisionPadding:u=ri,...d}=a,f=eg(r);return o.jsx(Xw,{...f,...d,ref:i,align:c,collisionPadding:u,style:{boxSizing:"border-box",...d.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)"}})},"SelectPopperPosition")),[PT,HT]=co(ro,{}),dx="SelectViewport",UT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,nonce:c,...u}=a,d=uf(dx,r),f=HT(dx,r),m=kt(i,d.onViewportChange),v=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.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:c}),o.jsx(cf.Slot,{scope:r,children:o.jsx(Bt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:gt(u.onScroll,y=>{const p=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:j}=f;if(j!=null&&j.current&&b){const S=Math.abs(v.current-p.scrollTop);if(S>0){const k=window.innerHeight-ri*2,C=parseFloat(b.style.minHeight),E=parseFloat(b.style.height),M=Math.max(C,E);if(M<k){const T=M+S,_=Math.min(k,T),z=T-_;b.style.height=_+"px",b.style.bottom==="0px"&&(p.scrollTop=z>0?z:0,b.style.justifyContent="flex-end")}}}v.current=p.scrollTop})})})]})},"SelectViewport")),qT="SelectGroup",[EP,TP]=co(qT),Wp="SelectItem",[FT,h3]=co(Wp),VT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,value:c,disabled:u=!1,textValue:d,...f}=a,m=fl(Wp,r),v=uf(Wp,r),y=m.value===c,[p,b]=w.useState(d??""),[j,S]=w.useState(!1),k=_n(_=>{var z;return(z=v.itemRefCallback)==null?void 0:z.call(v,_,c,u)}),C=kt(i,k),E=Zl(),M=w.useRef("touch"),T=Et(()=>{u||(m.onValueChange(c),m.onOpenChange(!1))},"handleSelect");return o.jsx(FT,{scope:r,value:c,disabled:u,textId:E,isSelected:y,onItemTextChange:w.useCallback(_=>{b(z=>z||((_==null?void 0:_.textContent)??"").trim())},[]),children:o.jsx(cf.ItemSlot,{scope:r,value:c,disabled:u,textValue:p,children:o.jsx(Bt.div,{role:"option","aria-labelledby":E,"data-highlighted":j?"":void 0,"aria-selected":y&&j,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:C,onFocus:gt(f.onFocus,()=>S(!0)),onBlur:gt(f.onBlur,()=>S(!1)),onClick:gt(f.onClick,()=>{M.current!=="mouse"&&T()}),onPointerUp:gt(f.onPointerUp,()=>{M.current==="mouse"&&T()}),onPointerDown:gt(f.onPointerDown,_=>{M.current=_.pointerType}),onPointerMove:gt(f.onPointerMove,_=>{var z;M.current=_.pointerType,u?(z=v.onItemLeave)==null||z.call(v):M.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:gt(f.onPointerLeave,_=>{var z;_.currentTarget===document.activeElement&&((z=v.onItemLeave)==null||z.call(v))}),onKeyDown:gt(f.onKeyDown,_=>{var A;u||_.target!==_.currentTarget||((A=v.searchRef)==null?void 0:A.current)!==""&&_.key===" "||(xT.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})},"SelectItem")),hd="SelectItemText",$T=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,className:c,style:u,...d}=a,f=fl(hd,r),m=uf(hd,r),v=h3(hd,r),y=ST(hd,r),[p,b]=w.useState(null),j=_n(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,v.value,v.disabled)}),S=kt(i,b,v.onItemTextChange,j),k=p==null?void 0:p.textContent,C=w.useMemo(()=>o.jsx("option",{value:v.value,disabled:v.disabled,children:k},v.value),[v.disabled,v.value,k]),{onNativeOptionAdd:E,onNativeOptionRemove:M}=y;return Mn(()=>(E(C),()=>M(C)),[E,M,C]),o.jsxs(o.Fragment,{children:[o.jsx(Bt.span,{id:v.textId,...d,ref:S}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Lc(f.value)?so.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),GT="SelectItemIndicator",YT=w.forwardRef(Et(function(a,i){const{__scopeSelect:r,...c}=a;return h3(GT,r).isSelected?o.jsx(Bt.span,{"aria-hidden":!0,...c,ref:i}):null},"SelectItemIndicator")),XT="SelectBubbleInput",KT=w.forwardRef(Et(function({__scopeSelect:a,...i},r){const c=fl(XT,a),{value:u,onValueChange:d,required:f,disabled:m,name:v,autoComplete:y,form:p}=c,{nativeOptions:b,nativeSelectKey:j}=c,S=w.useRef(null),k=kt(r,S),C=u??"",E=Kw(C),M=Array.from(b).some(T=>(T.props.value??"")==="");return w.useEffect(()=>{const T=S.current;if(!T)return;const _=window.HTMLSelectElement.prototype,A=Object.getOwnPropertyDescriptor(_,"value").set;if(E!==C&&A){const P=new Event("change",{bubbles:!0});A.call(T,C),T.dispatchEvent(P)}},[E,C]),o.jsxs(Bt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:p,onChange:T=>d(T.target.value),...i,style:{...P7,...i.style},ref:k,defaultValue:C,children:[Lc(u)&&!M?o.jsx("option",{value:""}):null,Array.from(b)]},j)},"SelectBubbleInput"));function m3(e){return typeof e=="function"}Et(m3,"isFunction");function Lc(e){return e===""||e===void 0}Et(Lc,"shouldShowPlaceholder");function tg(e){const a=_n(e),i=w.useRef(""),r=w.useRef(0),c=w.useCallback(d=>{const f=i.current+d;a(f),Et((function m(v){i.current=v,window.clearTimeout(r.current),v!==""&&(r.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[a]),u=w.useCallback(()=>{i.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[i,c,u]}Et(tg,"useTypeaheadSearch");function ng(e,a,i){const c=a.length>1&&Array.from(a).every(v=>v===a[0])?a[0]:a,u=i?e.indexOf(i):-1;let d=p3(e,Math.max(u,0));c.length===1&&(d=d.filter(v=>v!==i));const m=d.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return m!==i?m:void 0}Et(ng,"findNextItem");function p3(e,a){return e.map((i,r)=>e[(a+r)%e.length])}Et(p3,"wrapArray");const QT=E0("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ae({className:e,variant:a="default",size:i="default",asChild:r=!1,...c}){const u=r?_7:"button";return o.jsx(u,{"data-slot":"button","data-variant":a,"data-size":i,className:an(QT({variant:a,size:i,className:e})),...c})}const ag=e=>ua(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Kl({value:e}){return o.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function g3({blocks:e,links:a,onSelect:i}){return o.jsx(o.Fragment,{children:e.map((r,c)=>{if(r.type==="text"||r.type==="reasoning")return o.jsxs("section",{className:"jv-history-block",children:[o.jsx("h4",{children:x(r.type==="reasoning"?"history.reasoning":"history.text")}),o.jsx("pre",{className:"jv-history-text",children:r.text||x("history.empty")})]},c);if(r.type==="image")return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x("files.kindImage")," · ",r.mime_type]}),o.jsx("img",{className:"jv-history-image",src:`data:${r.mime_type};base64,${r.data}`,alt:x("history.image")})]},c);if(r.type==="tool_call"||r.type==="tool_result"){const u=a.filter(d=>d.tool_call_id===r.tool_call_id);return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x(r.type==="tool_call"?"history.toolCall":"history.toolResult")," · ",o.jsx("strong",{children:r.name}),r.type==="tool_result"&&r.is_error&&o.jsx("span",{className:"jv-history-error-tag",children:x("history.error")})]}),o.jsxs("div",{className:"jv-history-call",children:[o.jsx("code",{children:r.tool_call_id}),u.map(d=>o.jsxs("button",{type:"button",onClick:()=>i(d.id),"aria-label":x("history.related",{id:d.id}),children:[x(d.role==="tool"?"history.result":"history.call")," #",d.id]},d.id))]}),r.type==="tool_call"?o.jsx(Kl,{value:r.arguments}):o.jsxs(o.Fragment,{children:[o.jsx(g3,{blocks:r.result.content,links:[],onSelect:i}),r.result.details!==void 0&&o.jsxs("details",{children:[o.jsx("summary",{children:x("history.details")}),o.jsx(Kl,{value:r.result.details})]})]})]},c)}})})}function ZT({detail:e,onSelect:a}){const[i,r]=w.useState("content"),{record:c,links:u}=e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-history-detail-head",children:[o.jsxs("div",{children:[o.jsxs("h3",{children:["#",c.id," ",o.jsx("span",{children:c.role})]}),o.jsx("p",{children:ag(c.timestamp)})]}),o.jsxs("div",{role:"tablist","aria-label":x("history.view"),children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="content",onClick:()=>r("content"),children:x("history.content")}),o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="json",onClick:()=>r("json"),children:x("history.json")})]})]}),o.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":x(i==="content"?"history.contentLabel":"history.json"),children:i==="json"?o.jsx(Kl,{value:c}):o.jsxs(o.Fragment,{children:[c.model&&o.jsxs("div",{className:"jv-history-model",children:[o.jsx("span",{children:x("usage.model")}),o.jsx("strong",{children:c.model.id}),o.jsx("small",{children:c.model.provider})]}),o.jsx(g3,{blocks:c.message.content,links:u,onSelect:a}),c.message.tools&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsxs("summary",{children:[x("history.tools")," · ",c.message.tools.length]}),o.jsx(Kl,{value:c.message.tools})]}),c.message.tools_removed!==void 0&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:x("history.toolsRemoved")}),o.jsx(Kl,{value:c.message.tools_removed})]}),c.message.stop_reason&&o.jsxs("p",{className:"jv-history-note",children:[x("history.stopReason")," · ",c.message.stop_reason]}),c.message.error&&o.jsx("pre",{className:"jv-history-failure",children:c.message.error}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Usage"}),o.jsx(Kl,{value:c.usage})]}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Extra"}),o.jsx(Kl,{value:c.extra})]})]})})]})}const fx={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},hx=e=>ua(e,{year:"numeric",month:"long",day:"numeric"}),JT=e=>[e.preview,...e.tools.map(a=>x(a.kind==="call"?"activity.toolCall":a.error?"activity.toolFailed":"activity.toolResult",{name:a.name})),e.images?x("activity.images",{count:e.images}):""].filter(Boolean).join(" "),WT=e=>ua(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function eA({items:e,onSelect:a}){return o.jsx("ol",{className:"jv-activity-timeline","aria-label":x("activity.timeline"),children:e.map((i,r)=>{const{record:c}=i,u=hx(c.timestamp);return o.jsxs(w.Fragment,{children:[(r===0||hx(e[r-1].record.timestamp)!==u)&&o.jsx("li",{className:"jv-activity-day",children:o.jsx("span",{children:u})}),o.jsxs("li",{className:`jv-activity-row is-${i.kind}`,"data-kind":i.kind,children:[o.jsxs("div",{className:"jv-activity-time",children:[o.jsx("time",{dateTime:new Date(c.timestamp).toISOString(),title:`${ag(c.timestamp)}.${String(c.timestamp%1e3).padStart(3,"0")}`,children:WT(c.timestamp)}),o.jsx("span",{className:"jv-activity-dot"})]}),i.kind==="chat"?o.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":x("activity.chatMessage",{id:i.record.id}),children:[o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>a({kind:"chat",id:i.record.id}),"aria-label":x("activity.viewMessage",{sequence:i.record.sequence,chat:i.record.chatTitle}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx(_C,{}),o.jsx("strong",{title:i.record.chatTitle,children:i.record.chatTitle}),o.jsxs("span",{children:["#",i.record.sequence]})]}),o.jsx("span",{className:"jv-activity-preview",children:i.record.preview||x("activity.attachmentOnly")}),i.record.attachmentCount>0&&o.jsxs("span",{className:"jv-activity-attachment",children:[o.jsx(k0,{}),x("activity.attachments",{count:i.record.attachmentCount})]})]}),i.record.source&&o.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>a({kind:"history",id:i.record.source.historyId}),"aria-label":x("activity.viewSentBy",{id:i.record.source.historyId}),children:[x("activity.sentBy",{id:i.record.source.historyId}),o.jsx(Dp,{})]})]}):o.jsx("article",{className:"jv-activity-card jv-activity-history","aria-label":x("activity.historyRecord",{id:i.record.id}),children:o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>a({kind:"history",id:i.record.id}),"aria-label":x("activity.viewHistory",{id:i.record.id,role:i.record.role}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx("strong",{children:fx[i.record.role]?x(fx[i.record.role]):i.record.role}),o.jsxs("span",{children:["#",i.record.id]})]}),o.jsx("span",{className:"jv-activity-preview",children:JT(i.record)||x("activity.emptyMessage")})]})})]})]},`${i.kind}:${c.id}`)})})}const tA={read:(e,a)=>Se(`/bots/${e}/history/${a}`)};function nA(e,a){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const aA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rA={};function mx(e,a){return(rA.jsx?iA:aA).test(e)}const lA=/[ \t\n\f\r]/g;function oA(e){return typeof e=="object"?e.type==="text"?px(e.value):!1:px(e)}function px(e){return e.replace(lA,"")===""}class Bc{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Bc.prototype.normal={};Bc.prototype.property={};Bc.prototype.space=void 0;function v3(e,a){const i={},r={};for(const c of e)Object.assign(i,c.property),Object.assign(r,c.normal);return new Bc(i,r,a)}function e0(e){return e.toLowerCase()}class da{constructor(a,i){this.attribute=i,this.property=a}}da.prototype.attribute="";da.prototype.booleanish=!1;da.prototype.boolean=!1;da.prototype.commaOrSpaceSeparated=!1;da.prototype.commaSeparated=!1;da.prototype.defined=!1;da.prototype.mustUseProperty=!1;da.prototype.number=!1;da.prototype.overloadedBoolean=!1;da.prototype.property="";da.prototype.spaceSeparated=!1;da.prototype.space=void 0;let sA=0;const Ze=uo(),nn=uo(),t0=uo(),ke=uo(),At=uo(),Jl=uo(),Aa=uo();function uo(){return 2**++sA}const n0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:nn,commaOrSpaceSeparated:Aa,commaSeparated:Jl,number:ke,overloadedBoolean:t0,spaceSeparated:At},Symbol.toStringTag,{value:"Module"})),tp=Object.keys(n0);class ig extends da{constructor(a,i,r,c){let u=-1;if(super(a,i),gx(this,"space",c),typeof r=="number")for(;++u<tp.length;){const d=tp[u];gx(this,tp[u],(r&n0[d])===n0[d])}}}ig.prototype.defined=!0;function gx(e,a,i){i&&(e[a]=i)}function gs(e){const a={},i={};for(const[r,c]of Object.entries(e.properties)){const u=new ig(r,e.transform(e.attributes||{},r),c,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[e0(r)]=r,i[e0(u.attribute)]=r}return new Bc(a,i,e.space)}const y3=gs({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:At,ariaCurrent:null,ariaDescribedBy:At,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:At,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:At,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:At,ariaLevel:ke,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:At,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:At,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:nn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null},transform(e,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function x3(e,a){return a in e?e[a]:a}function b3(e,a){return x3(e,a.toLowerCase())}const cA=gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jl,acceptCharset:At,accessKey:At,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alpha:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:At,autoFocus:Ze,autoPlay:Ze,blocking:At,capture:null,charSet:null,checked:Ze,cite:null,className:At,closedBy:null,colorSpace:null,cols:ke,colSpan:ke,command:null,commandFor:null,content:null,contentEditable:nn,controls:Ze,controlsList:At,coords:ke|Jl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:t0,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:At,height:ke,hidden:t0,high:ke,href:null,hrefLang:null,htmlFor:At,httpEquiv:At,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:At,itemRef:At,itemScope:Ze,itemType:At,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ze,optimum:ke,pattern:null,ping:At,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:At,required:Ze,reversed:Ze,rows:ke,rowSpan:ke,sandbox:At,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootCustomElementRegistry:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shadowRootSerializable:Ze,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:nn,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:At,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ze,disablePictureInPicture:Ze,disableRemotePlayback:Ze,exportParts:Jl,part:At,prefix:null,property:null,results:ke,security:null,unselectable:null},space:"html",transform:b3}),uA=gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Aa,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:At,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jl,g2:Jl,glyphName:Jl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:Aa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:At,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Aa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Aa,rev:Aa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Aa,requiredFeatures:Aa,requiredFonts:Aa,requiredFormats:Aa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:Aa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Aa,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Aa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:x3}),j3=gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,a){return"xlink:"+a.slice(5).toLowerCase()}}),w3=gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:b3}),S3=gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,a){return"xml:"+a.slice(3).toLowerCase()}}),dA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},fA=/[A-Z]/g,vx=/-[a-z]/g,hA=/^data[-\w.:]+$/i;function mA(e,a){const i=e0(a);let r=a,c=da;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&hA.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(vx,gA);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!vx.test(u)){let d=u.replace(fA,pA);d.charAt(0)!=="-"&&(d="-"+d),a="data"+d}}c=ig}return new c(r,a)}function pA(e){return"-"+e.toLowerCase()}function gA(e){return e.charAt(1).toUpperCase()}const vA=v3([y3,cA,j3,w3,S3],"html"),rg=v3([y3,uA,j3,w3,S3],"svg");function yA(e){return e.join(" ").trim()}var ts={},np,yx;function xA(){if(yx)return np;yx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
520
+ `,v="/",y="*",p="",b="comment",j="declaration";function S(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var M=1,T=1;function _(V){var Y=V.match(a);Y&&(M+=Y.length);var K=V.lastIndexOf(m);T=~K?V.length-K:T+V.length}function z(){var V={line:M,column:T};return function(Y){return Y.position=new A(V),U(),Y}}function A(V){this.start=V,this.end={line:M,column:T},this.source=E.source}A.prototype.content=C;function P(V){var Y=new Error(E.source+":"+M+":"+T+": "+V);if(Y.reason=V,Y.filename=E.source,Y.line=M,Y.column=T,Y.source=C,!E.silent)throw Y}function H(V){var Y=V.exec(C);if(Y){var K=Y[0];return _(K),C=C.slice(K.length),Y}}function U(){H(i)}function O(V){var Y;for(V=V||[];Y=G();)Y!==!1&&V.push(Y);return V}function G(){var V=z();if(!(v!=C.charAt(0)||y!=C.charAt(1))){for(var Y=2;p!=C.charAt(Y)&&(y!=C.charAt(Y)||v!=C.charAt(Y+1));)++Y;if(Y+=2,p===C.charAt(Y-1))return P("End of comment missing");var K=C.slice(2,Y-2);return T+=2,_(K),C=C.slice(Y),T+=2,V({type:b,comment:K})}}function q(){var V=z(),Y=H(r);if(Y){if(G(),!H(c))return P("property missing ':'");var K=H(u),D=V({type:j,property:k(Y[0].replace(e,p)),value:K?k(K[0].replace(e,p)):p});return H(d),D}}function Q(){var V=[];O(V);for(var Y;Y=q();)Y!==!1&&(V.push(Y),O(V));return V}return U(),Q()}function k(C){return C?C.replace(f,p):p}return np=S,np}var xx;function bA(){if(xx)return ts;xx=1;var e=ts&&ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=i;const a=e(xA());function i(r,c){let u=null;if(!r||typeof r!="string")return u;const d=(0,a.default)(r),f=typeof c=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;f?c(v,y,m):y&&(u=u||{},u[v]=y)}),u}return ts}var hc={},bx;function jA(){if(bx)return hc;bx=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,u=function(v){return!v||i.test(v)||e.test(v)},d=function(v,y){return y.toUpperCase()},f=function(v,y){return"".concat(y,"-")},m=function(v,y){return y===void 0&&(y={}),u(v)?v:(v=v.toLowerCase(),y.reactCompat?v=v.replace(c,f):v=v.replace(r,f),v.replace(a,d))};return hc.camelCase=m,hc}var mc,jx;function wA(){if(jx)return mc;jx=1;var e=mc&&mc.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},a=e(bA()),i=jA();function r(c,u){var d={};return!c||typeof c!="string"||(0,a.default)(c,function(f,m){f&&m&&(d[(0,i.camelCase)(f,u)]=m)}),d}return r.default=r,mc=r,mc}var SA=wA();const kA=v0(SA),k3=C3("end"),lg=C3("start");function C3(e){return a;function a(i){const r=i&&i.position&&i.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function CA(e){const a=lg(e),i=k3(e);if(a&&i)return{start:a,end:i}}function vc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wx(e.position):"start"in e||"end"in e?wx(e):"line"in e||"column"in e?a0(e):""}function a0(e){return Sx(e&&e.line)+":"+Sx(e&&e.column)}function wx(e){return a0(e&&e.start)+"-"+a0(e&&e.end)}function Sx(e){return e&&typeof e=="number"?e:1}class In extends Error{constructor(a,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let c="",u={},d=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof a=="string"?c=a:!u.cause&&a&&(d=!0,c=a.message,u.cause=a),!u.ruleId&&!u.source&&typeof r=="string"){const m=r.indexOf(":");m===-1?u.ruleId=r:(u.source=r.slice(0,m),u.ruleId=r.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=f?f.line:void 0,this.name=vc(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=d&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}In.prototype.file="";In.prototype.name="";In.prototype.reason="";In.prototype.message="";In.prototype.stack="";In.prototype.column=void 0;In.prototype.line=void 0;In.prototype.ancestors=void 0;In.prototype.cause=void 0;In.prototype.fatal=void 0;In.prototype.place=void 0;In.prototype.ruleId=void 0;In.prototype.source=void 0;const og={}.hasOwnProperty,NA=new Map,EA=/[A-Z]/g,TA=new Set(["table","tbody","thead","tfoot","tr"]),AA=new Set(["td","th"]),N3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _A(e,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=a.filePath||void 0;let r;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=IA(i,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=BA(i,a.jsx,a.jsxs)}const c={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:r,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?rg:vA,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=E3(c,e,void 0);return u&&typeof u!="string"?u:c.create(e,c.Fragment,{children:u||void 0},void 0)}function E3(e,a,i){if(a.type==="element")return MA(e,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return RA(e,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return OA(e,a,i);if(a.type==="mdxjsEsm")return DA(e,a);if(a.type==="root")return zA(e,a,i);if(a.type==="text")return LA(e,a)}function MA(e,a,i){const r=e.schema;let c=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(c=rg,e.schema=c),e.ancestors.push(a);const u=A3(e,a.tagName,!1),d=PA(e,a);let f=cg(e,a);return TA.has(a.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!oA(m):!0})),T3(e,d,u,a),sg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function RA(e,a){if(a.data&&a.data.estree&&e.evaluater){const r=a.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ec(e,a.position)}function DA(e,a){if(a.data&&a.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(a.data.estree);Ec(e,a.position)}function OA(e,a,i){const r=e.schema;let c=r;a.name==="svg"&&r.space==="html"&&(c=rg,e.schema=c),e.ancestors.push(a);const u=a.name===null?e.Fragment:A3(e,a.name,!0),d=HA(e,a),f=cg(e,a);return T3(e,d,u,a),sg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function zA(e,a,i){const r={};return sg(r,cg(e,a)),e.create(a,e.Fragment,r,i)}function LA(e,a){return a.value}function T3(e,a,i,r){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(a.node=r)}function sg(e,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(e.children=i)}}function BA(e,a,i){return r;function r(c,u,d,f){const v=Array.isArray(d.children)?i:a;return f?v(u,d,f):v(u,d)}}function IA(e,a){return i;function i(r,c,u,d){const f=Array.isArray(u.children),m=lg(r);return a(c,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function PA(e,a){const i={};let r,c;for(c in a.properties)if(c!=="children"&&og.call(a.properties,c)){const u=UA(e,c,a.properties[c]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&AA.has(a.tagName)?r=f:i[d]=f}}if(r){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function HA(e,a){const i={};for(const r of a.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const d=u.expression;d.type;const f=d.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Ec(e,a.position);else{const c=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Ec(e,a.position);else u=r.value===null?!0:r.value;i[c]=u}return i}function cg(e,a){const i=[];let r=-1;const c=e.passKeys?new Map:NA;for(;++r<a.children.length;){const u=a.children[r];let d;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const v=c.get(m)||0;d=m+"-"+v,c.set(m,v+1)}}const f=E3(e,u,d);f!==void 0&&i.push(f)}return i}function UA(e,a,i){const r=mA(e.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?nA(i):yA(i)),r.property==="style"){let c=typeof i=="object"?i:qA(e,String(i));return e.stylePropertyNameCase==="css"&&(c=FA(c)),["style",c]}return[e.elementAttributeNameCase==="react"&&r.space?dA[r.property]||r.property:r.attribute,i]}}function qA(e,a){try{return kA(a,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,c=new In("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=e.filePath||void 0,c.url=N3+"#cannot-parse-style-attribute",c}}function A3(e,a,i){let r;if(!i)r={type:"Literal",value:a};else if(a.includes(".")){const c=a.split(".");let u=-1,d;for(;++u<c.length;){const f=mx(c[u])?{type:"Identifier",name:c[u]}:{type:"Literal",value:c[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}r=d}else r=mx(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const c=r.value;return og.call(e.components,c)?e.components[c]:c}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ec(e)}function Ec(e,a){const i=new In("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=N3+"#cannot-handle-mdx-estrees-without-createevaluater",i}function FA(e){const a={};let i;for(i in e)og.call(e,i)&&(a[VA(i)]=e[i]);return a}function VA(e){let a=e.replace(EA,$A);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function $A(e){return"-"+e.toLowerCase()}const ap={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},GA={};function ug(e,a){const i=GA,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,c=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return _3(e,r,c)}function _3(e,a,i){if(YA(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(a&&"alt"in e&&e.alt)return e.alt;if("children"in e)return kx(e.children,a,i)}return Array.isArray(e)?kx(e,a,i):""}function kx(e,a,i){const r=[];let c=-1;for(;++c<e.length;)r[c]=_3(e[c],a,i);return r.join("")}function YA(e){return!!(e&&typeof e=="object")}const Cx=document.createElement("i");function dg(e){const a="&"+e+";";Cx.innerHTML=a;const i=Cx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===a?!1:i}function Ma(e,a,i,r){const c=e.length;let u=0,d;if(a<0?a=-a>c?0:c+a:a=a>c?c:a,i=i>0?i:0,r.length<1e4)d=Array.from(r),d.unshift(a,i),e.splice(...d);else for(i&&e.splice(a,i);u<r.length;)d=r.slice(u,u+1e4),d.unshift(a,0),e.splice(...d),u+=1e4,a+=1e4}function qa(e,a){return e.length>0?(Ma(e,e.length,0,a),e):a}const Nx={}.hasOwnProperty;function M3(e){const a={};let i=-1;for(;++i<e.length;)XA(a,e[i]);return a}function XA(e,a){let i;for(i in a){const c=(Nx.call(e,i)?e[i]:void 0)||(e[i]={}),u=a[i];let d;if(u)for(d in u){Nx.call(c,d)||(c[d]=[]);const f=u[d];KA(c[d],Array.isArray(f)?f:f?[f]:[])}}}function KA(e,a){let i=-1;const r=[];for(;++i<a.length;)(a[i].add==="after"?e:r).push(a[i]);Ma(e,0,0,r)}function R3(e,a){const i=Number.parseInt(e,a);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function li(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=hl(/[A-Za-z]/),Bn=hl(/[\dA-Za-z]/),QA=hl(/[#-'*+\--9=?A-Z^-~]/);function Pd(e){return e!==null&&(e<32||e===127)}const i0=hl(/\d/),ZA=hl(/[\dA-Fa-f]/),JA=hl(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function _t(e){return e!==null&&(e<0||e===32)}function ot(e){return e===-2||e===-1||e===32}const df=hl(new RegExp("\\p{P}|\\p{S}","u")),lo=hl(/\s/);function hl(e){return a;function a(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function vs(e){const a=[];let i=-1,r=0,c=0;for(;++i<e.length;){const u=e.charCodeAt(i);let d="";if(u===37&&Bn(e.charCodeAt(i+1))&&Bn(e.charCodeAt(i+2)))c=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(d=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(d=String.fromCharCode(u,f),c=1):d="�"}else d=String.fromCharCode(u);d&&(a.push(e.slice(r,i),encodeURIComponent(d)),r=i+c+1,d=""),c&&(i+=c,c=0)}return a.join("")+e.slice(r)}function pt(e,a,i,r){const c=r?r-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return ot(m)?(e.enter(i),f(m)):a(m)}function f(m){return ot(m)&&u++<c?(e.consume(m),f):(e.exit(i),a(m))}}const WA={tokenize:e_};function e_(e){const a=e.attempt(this.parser.constructs.contentInitial,r,c);let i;return a;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),pt(e,a,"linePrefix")}function c(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return $e(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const t_={tokenize:n_},Ex={tokenize:a_};function n_(e){const a=this,i=[];let r=0,c,u,d;return f;function f(T){if(r<i.length){const _=i[r];return a.containerState=_[1],e.attempt(_[0].continuation,m,v)(T)}return v(T)}function m(T){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,c&&M();const _=a.events.length;let z=_,A;for(;z--;)if(a.events[z][0]==="exit"&&a.events[z][1].type==="chunkFlow"){A=a.events[z][1].end;break}E(r);let P=_;for(;P<a.events.length;)a.events[P][1].end={...A},P++;return Ma(a.events,z+1,0,a.events.slice(_)),a.events.length=P,v(T)}return f(T)}function v(T){if(r===i.length){if(!c)return b(T);if(c.currentConstruct&&c.currentConstruct.concrete)return S(T);a.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(Ex,y,p)(T)}function y(T){return c&&M(),E(r),b(T)}function p(T){return a.parser.lazy[a.now().line]=r!==i.length,d=a.now().offset,S(T)}function b(T){return a.containerState={},e.attempt(Ex,j,S)(T)}function j(T){return r++,i.push([a.currentConstruct,a.containerState]),b(T)}function S(T){if(T===null){c&&M(),E(0),e.consume(T);return}return c=c||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return $e(T)?(e.consume(T),C(e.exit("chunkFlow")),r=0,a.interrupt=void 0,f):(e.consume(T),k)}function C(T,_){const z=a.sliceStream(T);if(_&&z.push(null),T.previous=u,u&&(u.next=T),u=T,c.defineSkip(T.start),c.write(z),a.parser.lazy[T.start.line]){let A=c.events.length;for(;A--;)if(c.events[A][1].start.offset<d&&(!c.events[A][1].end||c.events[A][1].end.offset>d))return;const P=a.events.length;let H=P,U,O;for(;H--;)if(a.events[H][0]==="exit"&&a.events[H][1].type==="chunkFlow"){if(U){O=a.events[H][1].end;break}U=!0}for(E(r),A=P;A<a.events.length;)a.events[A][1].end={...O},A++;Ma(a.events,H+1,0,a.events.slice(P)),a.events.length=A}}function E(T){let _=i.length;for(;_-- >T;){const z=i[_];a.containerState=z[1],z[0].exit.call(a,e)}i.length=T}function M(){c.write([null]),u=void 0,c=void 0,a.containerState._closeFlow=void 0}}function a_(e,a,i){return pt(e,e.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cs(e){if(e===null||_t(e)||lo(e))return 1;if(df(e))return 2}function ff(e,a,i){const r=[];let c=-1;for(;++c<e.length;){const u=e[c].resolveAll;u&&!r.includes(u)&&(a=u(a,i),r.push(u))}return a}const r0={name:"attention",resolveAll:i_,tokenize:r_};function i_(e,a){let i=-1,r,c,u,d,f,m,v,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(r=i;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&a.sliceSerialize(e[r][1]).charCodeAt(0)===a.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[r][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;m=e[r][1].end.offset-e[r][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[i][1].start};Tx(p,-m),Tx(b,m),d={type:m>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},u={type:m>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[i][1].start}},c={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[r][1].end={...d.start},e[i][1].start={...f.end},v=[],e[r][1].end.offset-e[r][1].start.offset&&(v=qa(v,[["enter",e[r][1],a],["exit",e[r][1],a]])),v=qa(v,[["enter",c,a],["enter",d,a],["exit",d,a],["enter",u,a]]),v=qa(v,ff(a.parser.constructs.insideSpan.null,e.slice(r+1,i),a)),v=qa(v,[["exit",u,a],["enter",f,a],["exit",f,a],["exit",c,a]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,v=qa(v,[["enter",e[i][1],a],["exit",e[i][1],a]])):y=0,Ma(e,r-1,i-r+3,v),i=r+v.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function r_(e,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,c=cs(r);let u;return d;function d(m){return u=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===u)return e.consume(m),f;const v=e.exit("attentionSequence"),y=cs(m),p=!y||y===2&&c||i.includes(m),b=!c||c===2&&y||i.includes(r);return v._open=!!(u===42?p:p&&(c||!b)),v._close=!!(u===42?b:b&&(y||!p)),a(m)}}function Tx(e,a){e.column+=a,e.offset+=a,e._bufferIndex+=a}const l_={name:"autolink",tokenize:o_};function o_(e,a,i){let r=0;return c;function c(j){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(j){return Xn(j)?(e.consume(j),d):j===64?i(j):v(j)}function d(j){return j===43||j===45||j===46||Bn(j)?(r=1,f(j)):v(j)}function f(j){return j===58?(e.consume(j),r=0,m):(j===43||j===45||j===46||Bn(j))&&r++<32?(e.consume(j),f):(r=0,v(j))}function m(j){return j===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),a):j===null||j===32||j===60||Pd(j)?i(j):(e.consume(j),m)}function v(j){return j===64?(e.consume(j),y):QA(j)?(e.consume(j),v):i(j)}function y(j){return Bn(j)?p(j):i(j)}function p(j){return j===46?(e.consume(j),r=0,y):j===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),a):b(j)}function b(j){if((j===45||Bn(j))&&r++<63){const S=j===45?b:p;return e.consume(j),S}return i(j)}}const Ic={partial:!0,tokenize:s_};function s_(e,a,i){return r;function r(u){return ot(u)?pt(e,c,"linePrefix")(u):c(u)}function c(u){return u===null||$e(u)?a(u):i(u)}}const D3={continuation:{tokenize:u_},exit:d_,name:"blockQuote",tokenize:c_};function c_(e,a,i){const r=this;return c;function c(d){if(d===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),u}return i(d)}function u(d){return ot(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),a):(e.exit("blockQuotePrefix"),a(d))}}function u_(e,a,i){const r=this;return c;function c(d){return ot(d)?pt(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(D3,a,i)(d)}}function d_(e){e.exit("blockQuote")}const O3={name:"characterEscape",tokenize:f_};function f_(e,a,i){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),c}function c(u){return JA(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),a):i(u)}}const z3={name:"characterReference",tokenize:h_};function h_(e,a,i){const r=this;let c=0,u,d;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),m}function m(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),v):(e.enter("characterReferenceValue"),u=31,d=Bn,y(p))}function v(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=ZA,y):(e.enter("characterReferenceValue"),u=7,d=i0,y(p))}function y(p){if(p===59&&c){const b=e.exit("characterReferenceValue");return d===Bn&&!dg(r.sliceSerialize(b))?i(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),a)}return d(p)&&c++<u?(e.consume(p),y):i(p)}}const Ax={partial:!0,tokenize:p_},_x={concrete:!0,name:"codeFenced",tokenize:m_};function m_(e,a,i){const r=this,c={partial:!0,tokenize:z};let u=0,d=0,f;return m;function m(A){return v(A)}function v(A){const P=r.events[r.events.length-1];return u=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(A)}function y(A){return A===f?(d++,e.consume(A),y):d<3?i(A):(e.exit("codeFencedFenceSequence"),ot(A)?pt(e,p,"whitespace")(A):p(A))}function p(A){return A===null||$e(A)?(e.exit("codeFencedFence"),r.interrupt?a(A):e.check(Ax,k,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||$e(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):ot(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pt(e,j,"whitespace")(A)):A===96&&A===f?i(A):(e.consume(A),b)}function j(A){return A===null||$e(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||$e(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===f?i(A):(e.consume(A),S)}function k(A){return e.attempt(c,_,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return u>0&&ot(A)?pt(e,M,"linePrefix",u+1)(A):M(A)}function M(A){return A===null||$e(A)?e.check(Ax,k,_)(A):(e.enter("codeFlowValue"),T(A))}function T(A){return A===null||$e(A)?(e.exit("codeFlowValue"),M(A)):(e.consume(A),T)}function _(A){return e.exit("codeFenced"),a(A)}function z(A,P,H){let U=0;return O;function O(Y){return A.enter("lineEnding"),A.consume(Y),A.exit("lineEnding"),G}function G(Y){return A.enter("codeFencedFence"),ot(Y)?pt(A,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):q(Y)}function q(Y){return Y===f?(A.enter("codeFencedFenceSequence"),Q(Y)):H(Y)}function Q(Y){return Y===f?(U++,A.consume(Y),Q):U>=d?(A.exit("codeFencedFenceSequence"),ot(Y)?pt(A,V,"whitespace")(Y):V(Y)):H(Y)}function V(Y){return Y===null||$e(Y)?(A.exit("codeFencedFence"),P(Y)):H(Y)}}}function p_(e,a,i){const r=this;return c;function c(d){return d===null?i(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u)}function u(d){return r.parser.lazy[r.now().line]?i(d):a(d)}}const ip={name:"codeIndented",tokenize:v_},g_={partial:!0,tokenize:y_};function v_(e,a,i){const r=this;return c;function c(v){return e.enter("codeIndented"),pt(e,u,"linePrefix",5)(v)}function u(v){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(v):i(v)}function d(v){return v===null?m(v):$e(v)?e.attempt(g_,d,m)(v):(e.enter("codeFlowValue"),f(v))}function f(v){return v===null||$e(v)?(e.exit("codeFlowValue"),d(v)):(e.consume(v),f)}function m(v){return e.exit("codeIndented"),a(v)}}function y_(e,a,i){const r=this;return c;function c(d){return r.parser.lazy[r.now().line]?i(d):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):pt(e,u,"linePrefix",5)(d)}function u(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):$e(d)?c(d):i(d)}}const x_={name:"codeText",previous:j_,resolve:b_,tokenize:w_};function b_(e){let a=e.length-4,i=3,r,c;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[a][1].type==="lineEnding"||e[a][1].type==="space")){for(r=i;++r<a;)if(e[r][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[a][1].type="codeTextPadding",i+=2,a-=2;break}}for(r=i-1,a++;++r<=a;)c===void 0?r!==a&&e[r][1].type!=="lineEnding"&&(c=r):(r===a||e[r][1].type==="lineEnding")&&(e[c][1].type="codeTextData",r!==c+2&&(e[c][1].end=e[r-1][1].end,e.splice(c+2,r-c-2),a-=r-c-2,r=c+2),c=void 0);return e}function j_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function w_(e,a,i){let r=0,c,u;return d;function d(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),r++,f):(e.exit("codeTextSequence"),m(p))}function m(p){return p===null?i(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),m):p===96?(u=e.enter("codeTextSequence"),c=0,y(p)):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("codeTextData"),v(p))}function v(p){return p===null||p===32||p===96||$e(p)?(e.exit("codeTextData"),m(p)):(e.consume(p),v)}function y(p){return p===96?(e.consume(p),c++,y):c===r?(e.exit("codeTextSequence"),e.exit("codeText"),a(p)):(u.type="codeTextData",v(p))}}class S_{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(a,r):a>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(a,i,r){const c=i||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return r&&pc(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),pc(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),pc(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const i=this.left.splice(a,Number.POSITIVE_INFINITY);pc(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);pc(this.left,i.reverse())}}}function pc(e,a){let i=0;if(a.length<1e4)e.push(...a);else for(;i<a.length;)e.push(...a.slice(i,i+1e4)),i+=1e4}function L3(e){const a={};let i=-1,r,c,u,d,f,m,v;const y=new S_(e);for(;++i<y.length;){for(;i in a;)i=a[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=r[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(a,k_(y,i)),i=a[i],v=!0);else if(r[1]._container){for(u=i,c=void 0;u--;)if(d=y.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(c&&(y.get(c)[1].type="lineEndingBlank"),d[1].type="lineEnding",c=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;c&&(r[1].end={...y.get(c)[1].start},f=y.slice(c,i),f.unshift(r),y.splice(c,i-c+1,f))}}return Ma(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function k_(e,a){const i=e.get(a)[1],r=e.get(a)[2];let c=a-1;const u=[];let d=i._tokenizer;d||(d=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],v={};let y,p,b=-1,j=i,S=0,k=0;const C=[k];for(;j;){for(;e.get(++c)[1]!==j;);u.push(c),j._tokenizer||(y=r.sliceStream(j),j.next||y.push(null),p&&d.defineSkip(j.start),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),p=j,j=j.next}for(j=i;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(k=b+1,C.push(k),j._tokenizer=void 0,j.previous=void 0,j=j.next);for(d.events=[],j?(j._tokenizer=void 0,j.previous=void 0):C.pop(),b=C.length;b--;){const E=f.slice(C[b],C[b+1]),M=u.pop();m.push([M,M+E.length-1]),e.splice(M,2,E)}for(m.reverse(),b=-1;++b<m.length;)v[S+m[b][0]]=S+m[b][1],S+=m[b][1]-m[b][0]-1;return v}const C_={resolve:E_,tokenize:T_},N_={partial:!0,tokenize:A_};function E_(e){return L3(e),e}function T_(e,a){let i;return r;function r(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),c(f)}function c(f){return f===null?u(f):$e(f)?e.check(N_,d,u)(f):(e.consume(f),c)}function u(f){return e.exit("chunkContent"),e.exit("content"),a(f)}function d(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,c}}function A_(e,a,i){const r=this;return c;function c(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),pt(e,u,"linePrefix")}function u(d){if(d===null||$e(d))return i(d);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):e.interrupt(r.parser.constructs.flow,i,a)(d)}}function B3(e,a,i,r,c,u,d,f,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return p;function p(E){return E===60?(e.enter(r),e.enter(c),e.enter(u),e.consume(E),e.exit(u),b):E===null||E===32||E===41||Pd(E)?i(E):(e.enter(r),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function b(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(c),e.exit(r),a):(e.enter(f),e.enter("chunkString",{contentType:"string"}),j(E))}function j(E){return E===62?(e.exit("chunkString"),e.exit(f),b(E)):E===null||E===60||$e(E)?i(E):(e.consume(E),E===92?S:j)}function S(E){return E===60||E===62||E===92?(e.consume(E),j):j(E)}function k(E){return!y&&(E===null||E===41||_t(E))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(r),a(E)):y<v&&E===40?(e.consume(E),y++,k):E===41?(e.consume(E),y--,k):E===null||E===32||E===40||Pd(E)?i(E):(e.consume(E),E===92?C:k)}function C(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function I3(e,a,i,r,c,u){const d=this;let f=0,m;return v;function v(j){return e.enter(r),e.enter(c),e.consume(j),e.exit(c),e.enter(u),y}function y(j){return f>999||j===null||j===91||j===93&&!m||j===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?i(j):j===93?(e.exit(u),e.enter(c),e.consume(j),e.exit(c),e.exit(r),a):$e(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),p(j))}function p(j){return j===null||j===91||j===93||$e(j)||f++>999?(e.exit("chunkString"),y(j)):(e.consume(j),m||(m=!ot(j)),j===92?b:p)}function b(j){return j===91||j===92||j===93?(e.consume(j),f++,p):p(j)}}function P3(e,a,i,r,c,u){let d;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(c),e.consume(b),e.exit(c),d=b===40?41:b,m):i(b)}function m(b){return b===d?(e.enter(c),e.consume(b),e.exit(c),e.exit(r),a):(e.enter(u),v(b))}function v(b){return b===d?(e.exit(u),m(d)):b===null?i(b):$e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),pt(e,v,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===d||b===null||$e(b)?(e.exit("chunkString"),v(b)):(e.consume(b),b===92?p:y)}function p(b){return b===d||b===92?(e.consume(b),y):y(b)}}function yc(e,a){let i;return r;function r(c){return $e(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i=!0,r):ot(c)?pt(e,r,i?"linePrefix":"lineSuffix")(c):a(c)}}const __={name:"definition",tokenize:R_},M_={partial:!0,tokenize:D_};function R_(e,a,i){const r=this;let c;return u;function u(j){return e.enter("definition"),d(j)}function d(j){return I3.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(j)}function f(j){return c=li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),j===58?(e.enter("definitionMarker"),e.consume(j),e.exit("definitionMarker"),m):i(j)}function m(j){return _t(j)?yc(e,v)(j):v(j)}function v(j){return B3(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(j)}function y(j){return e.attempt(M_,p,p)(j)}function p(j){return ot(j)?pt(e,b,"whitespace")(j):b(j)}function b(j){return j===null||$e(j)?(e.exit("definition"),r.parser.defined.push(c),a(j)):i(j)}}function D_(e,a,i){return r;function r(f){return _t(f)?yc(e,c)(f):i(f)}function c(f){return P3(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return ot(f)?pt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||$e(f)?a(f):i(f)}}const O_={name:"hardBreakEscape",tokenize:z_};function z_(e,a,i){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),c}function c(u){return $e(u)?(e.exit("hardBreakEscape"),a(u)):i(u)}}const L_={name:"headingAtx",resolve:B_,tokenize:I_};function B_(e,a){let i=e.length-2,r=3,c,u;return e[r][1].type==="whitespace"&&(r+=2),i-2>r&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&e[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(c={type:"atxHeadingText",start:e[r][1].start,end:e[i][1].end},u={type:"chunkText",start:e[r][1].start,end:e[i][1].end,contentType:"text"},Ma(e,r,i-r+1,[["enter",c,a],["enter",u,a],["exit",u,a],["exit",c,a]])),e}function I_(e,a,i){let r=0;return c;function c(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&r++<6?(e.consume(y),d):y===null||_t(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||$e(y)?(e.exit("atxHeading"),a(y)):ot(y)?pt(e,f,"whitespace")(y):(e.enter("atxHeadingText"),v(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function v(y){return y===null||y===35||_t(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),v)}}const P_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Mx=["pre","script","style","textarea"],H_={concrete:!0,name:"htmlFlow",resolveTo:F_,tokenize:V_},U_={partial:!0,tokenize:G_},q_={partial:!0,tokenize:$_};function F_(e){let a=e.length;for(;a--&&!(e[a][0]==="enter"&&e[a][1].type==="htmlFlow"););return a>1&&e[a-2][1].type==="linePrefix"&&(e[a][1].start=e[a-2][1].start,e[a+1][1].start=e[a-2][1].start,e.splice(a-2,2)),e}function V_(e,a,i){const r=this;let c,u,d,f,m;return v;function v(B){return y(B)}function y(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),p}function p(B){return B===33?(e.consume(B),b):B===47?(e.consume(B),u=!0,k):B===63?(e.consume(B),c=3,r.interrupt?a:R):Xn(B)?(e.consume(B),d=String.fromCharCode(B),C):i(B)}function b(B){return B===45?(e.consume(B),c=2,j):B===91?(e.consume(B),c=5,f=0,S):Xn(B)?(e.consume(B),c=4,r.interrupt?a:R):i(B)}function j(B){return B===45?(e.consume(B),r.interrupt?a:R):i(B)}function S(B){const F="CDATA[";return B===F.charCodeAt(f++)?(e.consume(B),f===F.length?r.interrupt?a:q:S):i(B)}function k(B){return Xn(B)?(e.consume(B),d=String.fromCharCode(B),C):i(B)}function C(B){if(B===null||B===47||B===62||_t(B)){const F=B===47,se=d.toLowerCase();return!F&&!u&&Mx.includes(se)?(c=1,r.interrupt?a(B):q(B)):P_.includes(d.toLowerCase())?(c=6,F?(e.consume(B),E):r.interrupt?a(B):q(B)):(c=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(B):u?M(B):T(B))}return B===45||Bn(B)?(e.consume(B),d+=String.fromCharCode(B),C):i(B)}function E(B){return B===62?(e.consume(B),r.interrupt?a:q):i(B)}function M(B){return ot(B)?(e.consume(B),M):O(B)}function T(B){return B===47?(e.consume(B),O):B===58||B===95||Xn(B)?(e.consume(B),_):ot(B)?(e.consume(B),T):O(B)}function _(B){return B===45||B===46||B===58||B===95||Bn(B)?(e.consume(B),_):z(B)}function z(B){return B===61?(e.consume(B),A):ot(B)?(e.consume(B),z):T(B)}function A(B){return B===null||B===60||B===61||B===62||B===96?i(B):B===34||B===39?(e.consume(B),m=B,P):ot(B)?(e.consume(B),A):H(B)}function P(B){return B===m?(e.consume(B),m=null,U):B===null||$e(B)?i(B):(e.consume(B),P)}function H(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||_t(B)?z(B):(e.consume(B),H)}function U(B){return B===47||B===62||ot(B)?T(B):i(B)}function O(B){return B===62?(e.consume(B),G):i(B)}function G(B){return B===null||$e(B)?q(B):ot(B)?(e.consume(B),G):i(B)}function q(B){return B===45&&c===2?(e.consume(B),K):B===60&&c===1?(e.consume(B),D):B===62&&c===4?(e.consume(B),le):B===63&&c===3?(e.consume(B),R):B===93&&c===5?(e.consume(B),ne):$e(B)&&(c===6||c===7)?(e.exit("htmlFlowData"),e.check(U_,ie,Q)(B)):B===null||$e(B)?(e.exit("htmlFlowData"),Q(B)):(e.consume(B),q)}function Q(B){return e.check(q_,V,ie)(B)}function V(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),Y}function Y(B){return B===null||$e(B)?Q(B):(e.enter("htmlFlowData"),q(B))}function K(B){return B===45?(e.consume(B),R):q(B)}function D(B){return B===47?(e.consume(B),d="",$):q(B)}function $(B){if(B===62){const F=d.toLowerCase();return Mx.includes(F)?(e.consume(B),le):q(B)}return Xn(B)&&d.length<8?(e.consume(B),d+=String.fromCharCode(B),$):q(B)}function ne(B){return B===93?(e.consume(B),R):q(B)}function R(B){return B===62?(e.consume(B),le):B===45&&c===2?(e.consume(B),R):q(B)}function le(B){return B===null||$e(B)?(e.exit("htmlFlowData"),ie(B)):(e.consume(B),le)}function ie(B){return e.exit("htmlFlow"),a(B)}}function $_(e,a,i){const r=this;return c;function c(d){return $e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):i(d)}function u(d){return r.parser.lazy[r.now().line]?i(d):a(d)}}function G_(e,a,i){return r;function r(c){return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),e.attempt(Ic,a,i)}}const Y_={name:"htmlText",tokenize:X_};function X_(e,a,i){const r=this;let c,u,d;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),v):R===47?(e.consume(R),z):R===63?(e.consume(R),T):Xn(R)?(e.consume(R),H):i(R)}function v(R){return R===45?(e.consume(R),y):R===91?(e.consume(R),u=0,S):Xn(R)?(e.consume(R),M):i(R)}function y(R){return R===45?(e.consume(R),j):i(R)}function p(R){return R===null?i(R):R===45?(e.consume(R),b):$e(R)?(d=p,D(R)):(e.consume(R),p)}function b(R){return R===45?(e.consume(R),j):p(R)}function j(R){return R===62?K(R):R===45?b(R):p(R)}function S(R){const le="CDATA[";return R===le.charCodeAt(u++)?(e.consume(R),u===le.length?k:S):i(R)}function k(R){return R===null?i(R):R===93?(e.consume(R),C):$e(R)?(d=k,D(R)):(e.consume(R),k)}function C(R){return R===93?(e.consume(R),E):k(R)}function E(R){return R===62?K(R):R===93?(e.consume(R),E):k(R)}function M(R){return R===null||R===62?K(R):$e(R)?(d=M,D(R)):(e.consume(R),M)}function T(R){return R===null?i(R):R===63?(e.consume(R),_):$e(R)?(d=T,D(R)):(e.consume(R),T)}function _(R){return R===62?K(R):T(R)}function z(R){return Xn(R)?(e.consume(R),A):i(R)}function A(R){return R===45||Bn(R)?(e.consume(R),A):P(R)}function P(R){return $e(R)?(d=P,D(R)):ot(R)?(e.consume(R),P):K(R)}function H(R){return R===45||Bn(R)?(e.consume(R),H):R===47||R===62||_t(R)?U(R):i(R)}function U(R){return R===47?(e.consume(R),K):R===58||R===95||Xn(R)?(e.consume(R),O):$e(R)?(d=U,D(R)):ot(R)?(e.consume(R),U):K(R)}function O(R){return R===45||R===46||R===58||R===95||Bn(R)?(e.consume(R),O):G(R)}function G(R){return R===61?(e.consume(R),q):$e(R)?(d=G,D(R)):ot(R)?(e.consume(R),G):U(R)}function q(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),c=R,Q):$e(R)?(d=q,D(R)):ot(R)?(e.consume(R),q):(e.consume(R),V)}function Q(R){return R===c?(e.consume(R),c=void 0,Y):R===null?i(R):$e(R)?(d=Q,D(R)):(e.consume(R),Q)}function V(R){return R===null||R===34||R===39||R===60||R===61||R===96?i(R):R===47||R===62||_t(R)?U(R):(e.consume(R),V)}function Y(R){return R===47||R===62||_t(R)?U(R):i(R)}function K(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),a):i(R)}function D(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),$}function $(R){return ot(R)?pt(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ne(R)}function ne(R){return e.enter("htmlTextData"),d(R)}}const fg={name:"labelEnd",resolveAll:J_,resolveTo:W_,tokenize:eM},K_={tokenize:tM},Q_={tokenize:nM},Z_={tokenize:aM};function J_(e){let a=-1;const i=[];for(;++a<e.length;){const r=e[a][1];if(i.push(e[a]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const c=r.type==="labelImage"?4:2;r.type="data",a+=c}}return e.length!==i.length&&Ma(e,0,e.length,i),e}function W_(e,a){let i=e.length,r=0,c,u,d,f;for(;i--;)if(c=e[i][1],u){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[i][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(d){if(e[i][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(u=i,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(d=i);const m={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},v={type:"label",start:{...e[u][1].start},end:{...e[d][1].end}},y={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,a],["enter",v,a]],f=qa(f,e.slice(u+1,u+r+3)),f=qa(f,[["enter",y,a]]),f=qa(f,ff(a.parser.constructs.insideSpan.null,e.slice(u+r+4,d-3),a)),f=qa(f,[["exit",y,a],e[d-2],e[d-1],["exit",v,a]]),f=qa(f,e.slice(d+1)),f=qa(f,[["exit",m,a]]),Ma(e,u,e.length,f),e}function eM(e,a,i){const r=this;let c=r.events.length,u,d;for(;c--;)if((r.events[c][1].type==="labelImage"||r.events[c][1].type==="labelLink")&&!r.events[c][1]._balanced){u=r.events[c][1];break}return f;function f(b){return u?u._inactive?p(b):(d=r.parser.defined.includes(li(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),m):i(b)}function m(b){return b===40?e.attempt(K_,y,d?y:p)(b):b===91?e.attempt(Q_,y,d?v:p)(b):d?y(b):p(b)}function v(b){return e.attempt(Z_,y,p)(b)}function y(b){return a(b)}function p(b){return u._balanced=!0,i(b)}}function tM(e,a,i){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),c}function c(p){return _t(p)?yc(e,u)(p):u(p)}function u(p){return p===41?y(p):B3(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function d(p){return _t(p)?yc(e,m)(p):y(p)}function f(p){return i(p)}function m(p){return p===34||p===39||p===40?P3(e,v,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):y(p)}function v(p){return _t(p)?yc(e,y)(p):y(p)}function y(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),a):i(p)}}function nM(e,a,i){const r=this;return c;function c(f){return I3.call(r,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return r.parser.defined.includes(li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(f):i(f)}function d(f){return i(f)}}function aM(e,a,i){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),c}function c(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),a):i(u)}}const iM={name:"labelStartImage",resolveAll:fg.resolveAll,tokenize:rM};function rM(e,a,i){const r=this;return c;function c(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):i(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):a(f)}}const lM={name:"labelStartLink",resolveAll:fg.resolveAll,tokenize:oM};function oM(e,a,i){const r=this;return c;function c(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),u}function u(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(d):a(d)}}const rp={name:"lineEnding",tokenize:sM};function sM(e,a){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pt(e,a,"linePrefix")}}const Ad={name:"thematicBreak",tokenize:cM};function cM(e,a,i){let r=0,c;return u;function u(v){return e.enter("thematicBreak"),d(v)}function d(v){return c=v,f(v)}function f(v){return v===c?(e.enter("thematicBreakSequence"),m(v)):r>=3&&(v===null||$e(v))?(e.exit("thematicBreak"),a(v)):i(v)}function m(v){return v===c?(e.consume(v),r++,m):(e.exit("thematicBreakSequence"),ot(v)?pt(e,f,"whitespace")(v):f(v))}}const oa={continuation:{tokenize:hM},exit:pM,name:"list",tokenize:fM},uM={partial:!0,tokenize:gM},dM={partial:!0,tokenize:mM};function fM(e,a,i){const r=this,c=r.events[r.events.length-1];let u=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,d=0;return f;function f(j){const S=r.containerState.type||(j===42||j===43||j===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||j===r.containerState.marker:i0(j)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),j===42||j===45?e.check(Ad,i,v)(j):v(j);if(!r.interrupt||j===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(j)}return i(j)}function m(j){return i0(j)&&++d<10?(e.consume(j),m):(!r.interrupt||d<2)&&(r.containerState.marker?j===r.containerState.marker:j===41||j===46)?(e.exit("listItemValue"),v(j)):i(j)}function v(j){return e.enter("listItemMarker"),e.consume(j),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||j,e.check(Ic,r.interrupt?i:y,e.attempt(uM,b,p))}function y(j){return r.containerState.initialBlankLine=!0,u++,b(j)}function p(j){return ot(j)?(e.enter("listItemPrefixWhitespace"),e.consume(j),e.exit("listItemPrefixWhitespace"),b):i(j)}function b(j){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,a(j)}}function hM(e,a,i){const r=this;return r.containerState._closeFlow=void 0,e.check(Ic,c,u);function c(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pt(e,a,"listItemIndent",r.containerState.size+1)(f)}function u(f){return r.containerState.furtherBlankLines||!ot(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,d(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dM,a,d)(f))}function d(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,pt(e,e.attempt(oa,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function mM(e,a,i){const r=this;return pt(e,c,"listItemIndent",r.containerState.size+1);function c(u){const d=r.events[r.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===r.containerState.size?a(u):i(u)}}function pM(e){e.exit(this.containerState.type)}function gM(e,a,i){const r=this;return pt(e,c,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(u){const d=r.events[r.events.length-1];return!ot(u)&&d&&d[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const Rx={name:"setextUnderline",resolveTo:vM,tokenize:yM};function vM(e,a){let i=e.length,r,c,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(c=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const d={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[c][1].type="setextHeadingText",u?(e.splice(c,0,["enter",d,a]),e.splice(u+1,0,["exit",e[r][1],a]),e[r][1].end={...e[u][1].end}):e[r][1]=d,e.push(["exit",d,a]),e}function yM(e,a,i){const r=this;let c;return u;function u(v){let y=r.events.length,p;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){p=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),c=v,d(v)):i(v)}function d(v){return e.enter("setextHeadingLineSequence"),f(v)}function f(v){return v===c?(e.consume(v),f):(e.exit("setextHeadingLineSequence"),ot(v)?pt(e,m,"lineSuffix")(v):m(v))}function m(v){return v===null||$e(v)?(e.exit("setextHeadingLine"),a(v)):i(v)}}const xM={tokenize:bM};function bM(e){const a=this,i=e.attempt(Ic,r,e.attempt(this.parser.constructs.flowInitial,c,pt(e,e.attempt(this.parser.constructs.flow,c,e.attempt(C_,c)),"linePrefix")));return i;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),a.currentConstruct=void 0,i}function c(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a.currentConstruct=void 0,i}}const jM={resolveAll:U3()},wM=H3("string"),SM=H3("text");function H3(e){return{resolveAll:U3(e==="text"?kM:void 0),tokenize:a};function a(i){const r=this,c=this.parser.constructs[e],u=i.attempt(c,d,f);return d;function d(y){return v(y)?u(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return v(y)?(i.exit("data"),u(y)):(i.consume(y),m)}function v(y){if(y===null)return!0;const p=c[y];let b=-1;if(p)for(;++b<p.length;){const j=p[b];if(!j.previous||j.previous.call(r,r.previous))return!0}return!1}}}function U3(e){return a;function a(i,r){let c=-1,u;for(;++c<=i.length;)u===void 0?i[c]&&i[c][1].type==="data"&&(u=c,c++):(!i[c]||i[c][1].type!=="data")&&(c!==u+2&&(i[u][1].end=i[c-1][1].end,i.splice(u+2,c-u-2),c=u+2),u=void 0);return e?e(i,r):i}}function kM(e,a){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const r=e[i-1][1],c=a.sliceStream(r);let u=c.length,d=-1,f=0,m;for(;u--;){const v=c[u];if(typeof v=="string"){for(d=v.length;v.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(v===-2)m=!0,f++;else if(v!==-1){u++;break}}if(a._contentTypeTextTrailing&&i===e.length&&(f=0),f){const v={type:i===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?d:r.start._bufferIndex+d,_index:r.start._index+u,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...v.start},r.start.offset===r.end.offset?Object.assign(r,v):(e.splice(i,0,["enter",v,a],["exit",v,a]),i+=2)}i++}return e}const CM={42:oa,43:oa,45:oa,48:oa,49:oa,50:oa,51:oa,52:oa,53:oa,54:oa,55:oa,56:oa,57:oa,62:D3},NM={91:__},EM={[-2]:ip,[-1]:ip,32:ip},TM={35:L_,42:Ad,45:[Rx,Ad],60:H_,61:Rx,95:Ad,96:_x,126:_x},AM={38:z3,92:O3},_M={[-5]:rp,[-4]:rp,[-3]:rp,33:iM,38:z3,42:r0,60:[l_,Y_],91:lM,92:[O_,O3],93:fg,95:r0,96:x_},MM={null:[r0,jM]},RM={null:[42,95]},DM={null:[]},OM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RM,contentInitial:NM,disable:DM,document:CM,flow:TM,flowInitial:EM,insideSpan:MM,string:AM,text:_M},Symbol.toStringTag,{value:"Module"}));function zM(e,a,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const c={},u=[];let d=[],f=[];const m={attempt:P(z),check:P(A),consume:M,enter:T,exit:_,interrupt:P(A,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:j,write:p};let y=a.tokenize.call(v,m);return a.resolveAll&&u.push(a),v;function p(G){return d=qa(d,G),C(),d[d.length-1]!==null?[]:(H(a,0),v.events=ff(u,v.events,v),v.events)}function b(G,q){return BM(j(G),q)}function j(G){return LM(d,G)}function S(){const{_bufferIndex:G,_index:q,line:Q,column:V,offset:Y}=r;return{_bufferIndex:G,_index:q,line:Q,column:V,offset:Y}}function k(G){c[G.line]=G.column,O()}function C(){let G;for(;r._index<d.length;){const q=d[r._index];if(typeof q=="string")for(G=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<q.length;)E(q.charCodeAt(r._bufferIndex));else E(q)}}function E(G){y=y(G)}function M(G){$e(G)?(r.line++,r.column=1,r.offset+=G===-3?2:1,O()):G!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===d[r._index].length&&(r._bufferIndex=-1,r._index++)),v.previous=G}function T(G,q){const Q=q||{};return Q.type=G,Q.start=S(),v.events.push(["enter",Q,v]),f.push(Q),Q}function _(G){const q=f.pop();return q.end=S(),v.events.push(["exit",q,v]),q}function z(G,q){H(G,q.from)}function A(G,q){q.restore()}function P(G,q){return Q;function Q(V,Y,K){let D,$,ne,R;return Array.isArray(V)?ie(V):"tokenize"in V?ie([V]):le(V);function le(ye){return we;function we(ce){const xe=ce!==null&&ye[ce],Ce=ce!==null&&ye.null,pe=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return ie(pe)(ce)}}function ie(ye){return D=ye,$=0,ye.length===0?K:B(ye[$])}function B(ye){return we;function we(ce){return R=U(),ne=ye,ye.partial||(v.currentConstruct=ye),ye.name&&v.parser.constructs.disable.null.includes(ye.name)?se():ye.tokenize.call(q?Object.assign(Object.create(v),q):v,m,F,se)(ce)}}function F(ye){return G(ne,R),Y}function se(ye){return R.restore(),++$<D.length?B(D[$]):K}}}function H(G,q){G.resolveAll&&!u.includes(G)&&u.push(G),G.resolve&&Ma(v.events,q,v.events.length-q,G.resolve(v.events.slice(q),v)),G.resolveTo&&(v.events=G.resolveTo(v.events,v))}function U(){const G=S(),q=v.previous,Q=v.currentConstruct,V=v.events.length,Y=Array.from(f);return{from:V,restore:K};function K(){r=G,v.previous=q,v.currentConstruct=Q,v.events.length=V,f=Y,O()}}function O(){r.line in c&&r.column<2&&(r.column=c[r.line],r.offset+=c[r.line]-1)}}function LM(e,a){const i=a.start._index,r=a.start._bufferIndex,c=a.end._index,u=a.end._bufferIndex;let d;if(i===c)d=[e[i].slice(r,u)];else{if(d=e.slice(i,c),r>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(r):d.shift()}u>0&&d.push(e[c].slice(0,u))}return d}function BM(e,a){let i=-1;const r=[];let c;for(;++i<e.length;){const u=e[i];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
521
+ `;break}case-3:{d=`\r
522
+ `;break}case-2:{d=a?" ":" ";break}case-1:{if(!a&&c)continue;d=" ";break}default:d=String.fromCharCode(u)}c=u===-2,r.push(d)}return r.join("")}function IM(e){const r={constructs:M3([OM,...(e||{}).extensions||[]]),content:c(WA),defined:[],document:c(t_),flow:c(xM),lazy:{},string:c(wM),text:c(SM)};return r;function c(u){return d;function d(f){return zM(r,u,f)}}}function PM(e){for(;!L3(e););return e}const Dx=/[\0\t\n\r]/g;function HM(){let e=1,a="",i=!0,r;return c;function c(u,d,f){const m=[];let v,y,p,b,j;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),p=0,a="",i&&(u.charCodeAt(0)===65279&&p++,i=void 0);p<u.length;){if(Dx.lastIndex=p,v=Dx.exec(u),b=v&&v.index!==void 0?v.index:u.length,j=u.charCodeAt(b),!v){a=u.slice(p);break}if(j===10&&p===b&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),p<b&&(m.push(u.slice(p,b)),e+=b-p),j){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return f&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const UM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qM(e){return e.replace(UM,FM)}function FM(e,a,i){if(a)return a;if(i.charCodeAt(0)===35){const c=i.charCodeAt(1),u=c===120||c===88;return R3(i.slice(u?2:1),u?16:10)}return dg(i)||e}const q3={}.hasOwnProperty;function VM(e,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),$M(i)(PM(IM(i).document().write(HM()(e,a,!0))))}function $M(e){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ct),autolinkProtocol:U,autolinkEmail:U,atxHeading:u(Oe),blockQuote:u(Ce),characterEscape:U,characterReference:U,codeFenced:u(pe),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(pe,d),codeText:u(W,d),codeTextData:U,data:U,codeFlowValue:U,definition:u(je),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(Re),hardBreakEscape:u(Fe),hardBreakTrailing:u(Fe),htmlFlow:u(Je,d),htmlFlowData:U,htmlText:u(Je,d),htmlTextData:U,image:u(We),label:d,link:u(Ct),listItem:u(xn),listItemValue:b,listOrdered:u(rn,p),listUnordered:u(rn),paragraph:u(Pn),reference:B,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Oe),strong:u(fa),thematicBreak:u(Ga)},exit:{atxHeading:m(),atxHeadingSequence:z,autolink:m(),autolinkEmail:xe,autolinkProtocol:ce,blockQuote:m(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ye,characterReference:we,codeFenced:m(C),codeFencedFence:k,codeFencedFenceInfo:j,codeFencedFenceMeta:S,codeFlowValue:O,codeIndented:m(E),codeText:m(Y),codeTextData:O,data:O,definition:m(),definitionDestinationString:_,definitionLabelString:M,definitionTitleString:T,emphasis:m(),hardBreakEscape:m(q),hardBreakTrailing:m(q),htmlFlow:m(Q),htmlFlowData:O,htmlText:m(V),htmlTextData:O,image:m(D),label:ne,labelText:$,lineEnding:G,link:m(K),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:F,resourceDestinationString:R,resourceTitleString:le,resource:ie,setextHeading:m(H),setextHeadingLineSequence:P,setextHeadingText:A,strong:m(),thematicBreak:m()}};F3(a,(e||{}).mdastExtensions||[]);const i={};return r;function r(fe){let Ne={type:"root",children:[]};const qe={stack:[Ne],tokenStack:[],config:a,enter:f,exit:v,buffer:d,resume:y,data:i},Ge=[];let nt=-1;for(;++nt<fe.length;)if(fe[nt][1].type==="listOrdered"||fe[nt][1].type==="listUnordered")if(fe[nt][0]==="enter")Ge.push(nt);else{const Ut=Ge.pop();nt=c(fe,Ut,nt)}for(nt=-1;++nt<fe.length;){const Ut=a[fe[nt][0]];q3.call(Ut,fe[nt][1].type)&&Ut[fe[nt][1].type].call(Object.assign({sliceSerialize:fe[nt][2].sliceSerialize},qe),fe[nt][1])}if(qe.tokenStack.length>0){const Ut=qe.tokenStack[qe.tokenStack.length-1];(Ut[1]||Ox).call(qe,void 0,Ut[0])}for(Ne.position={start:nl(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:nl(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<a.transforms.length;)Ne=a.transforms[nt](Ne)||Ne;return Ne}function c(fe,Ne,qe){let Ge=Ne-1,nt=-1,Ut=!1,dn,qt,Rn,Hn;for(;++Ge<=qe;){const zt=fe[Ge];switch(zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{zt[0]==="enter"?nt++:nt--,Hn=void 0;break}case"lineEndingBlank":{zt[0]==="enter"&&(dn&&!Hn&&!nt&&!Rn&&(Rn=Ge),Hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Hn=void 0}if(!nt&&zt[0]==="enter"&&zt[1].type==="listItemPrefix"||nt===-1&&zt[0]==="exit"&&(zt[1].type==="listUnordered"||zt[1].type==="listOrdered")){if(dn){let Dn=Ge;for(qt=void 0;Dn--;){const Xe=fe[Dn];if(Xe[1].type==="lineEnding"||Xe[1].type==="lineEndingBlank"){if(Xe[0]==="exit")continue;qt&&(fe[qt][1].type="lineEndingBlank",Ut=!0),Xe[1].type="lineEnding",qt=Dn}else if(!(Xe[1].type==="linePrefix"||Xe[1].type==="blockQuotePrefix"||Xe[1].type==="blockQuotePrefixWhitespace"||Xe[1].type==="blockQuoteMarker"||Xe[1].type==="listItemIndent"))break}Rn&&(!qt||Rn<qt)&&(dn._spread=!0),dn.end=Object.assign({},qt?fe[qt][1].start:zt[1].end),fe.splice(qt||Ge,0,["exit",dn,zt[2]]),Ge++,qe++}if(zt[1].type==="listItemPrefix"){const Dn={type:"listItem",_spread:!1,start:Object.assign({},zt[1].start),end:void 0};dn=Dn,fe.splice(Ge,0,["enter",Dn,zt[2]]),Ge++,qe++,Rn=void 0,Hn=!0}}}return fe[Ne][1]._spread=Ut,qe}function u(fe,Ne){return qe;function qe(Ge){f.call(this,fe(Ge),Ge),Ne&&Ne.call(this,Ge)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(fe,Ne,qe){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Ne,qe||void 0]),fe.position={start:nl(Ne.start),end:void 0}}function m(fe){return Ne;function Ne(qe){fe&&fe.call(this,qe),v.call(this,qe)}}function v(fe,Ne){const qe=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==fe.type&&(Ne?Ne.call(this,fe,Ge[0]):(Ge[1]||Ox).call(this,fe,Ge[0]));else throw new Error("Cannot close `"+fe.type+"` ("+vc({start:fe.start,end:fe.end})+"): it’s not open");qe.position.end=nl(fe.end)}function y(){return ug(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const Ne=this.stack[this.stack.length-2];Ne.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function j(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.lang=fe}function S(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.meta=fe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=fe.replace(/(\r?\n|\r)$/g,"")}function M(fe){const Ne=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Ne,qe.identifier=li(this.sliceSerialize(fe)).toLowerCase()}function T(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.title=fe}function _(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.url=fe}function z(fe){const Ne=this.stack[this.stack.length-1];if(!Ne.depth){const qe=this.sliceSerialize(fe).length;Ne.depth=qe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function P(fe){const Ne=this.stack[this.stack.length-1];Ne.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function U(fe){const qe=this.stack[this.stack.length-1].children;let Ge=qe[qe.length-1];(!Ge||Ge.type!=="text")&&(Ge=ln(),Ge.position={start:nl(fe.start),end:void 0},qe.push(Ge)),this.stack.push(Ge)}function O(fe){const Ne=this.stack.pop();Ne.value+=this.sliceSerialize(fe),Ne.position.end=nl(fe.end)}function G(fe){const Ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=Ne.children[Ne.children.length-1];qe.position.end=nl(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(Ne.type)&&(U.call(this,fe),O.call(this,fe))}function q(){this.data.atHardBreak=!0}function Q(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=fe}function V(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=fe}function Y(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.value=fe}function K(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ne=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ne,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function D(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Ne=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Ne,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function $(fe){const Ne=this.sliceSerialize(fe),qe=this.stack[this.stack.length-2];qe.label=qM(Ne),qe.identifier=li(Ne).toLowerCase()}function ne(){const fe=this.stack[this.stack.length-1],Ne=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const Ge=fe.children;qe.children=Ge}else qe.alt=Ne}function R(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.url=fe}function le(){const fe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.title=fe}function ie(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function F(fe){const Ne=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Ne,qe.identifier=li(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function se(fe){this.data.characterReferenceType=fe.type}function ye(fe){const Ne=this.sliceSerialize(fe),qe=this.data.characterReferenceType;let Ge;qe?(Ge=R3(Ne,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=dg(Ne);const nt=this.stack[this.stack.length-1];nt.value+=Ge}function we(fe){const Ne=this.stack.pop();Ne.position.end=nl(fe.end)}function ce(fe){O.call(this,fe);const Ne=this.stack[this.stack.length-1];Ne.url=this.sliceSerialize(fe)}function xe(fe){O.call(this,fe);const Ne=this.stack[this.stack.length-1];Ne.url="mailto:"+this.sliceSerialize(fe)}function Ce(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function Je(){return{type:"html",value:""}}function We(){return{type:"image",title:null,url:"",alt:null}}function Ct(){return{type:"link",title:null,url:"",children:[]}}function rn(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function xn(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Pn(){return{type:"paragraph",children:[]}}function fa(){return{type:"strong",children:[]}}function ln(){return{type:"text",value:""}}function Ga(){return{type:"thematicBreak"}}}function nl(e){return{line:e.line,column:e.column,offset:e.offset}}function F3(e,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?F3(e,r):GM(e,r)}}function GM(e,a){let i;for(i in a)if(q3.call(a,i))switch(i){case"canContainEols":{const r=a[i];r&&e[i].push(...r);break}case"transforms":{const r=a[i];r&&e[i].push(...r);break}case"enter":case"exit":{const r=a[i];r&&Object.assign(e[i],r);break}}}function Ox(e,a){throw e?new Error("Cannot close `"+e.type+"` ("+vc({start:e.start,end:e.end})+"): a different token (`"+a.type+"`, "+vc({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+vc({start:a.start,end:a.end})+") is still open")}function YM(e){const a=this;a.parser=i;function i(r){return VM(r,{...a.data("settings"),...e,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function XM(e,a){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(a),!0)};return e.patch(a,i),e.applyData(a,i)}function KM(e,a){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(a,i),[e.applyData(a,i),{type:"text",value:`
523
+ `}]}function QM(e,a){const i=a.value?a.value+`
524
+ `:"",r={},c=a.lang?a.lang.split(/\s+/):[];c.length>0&&(r.className=["language-"+c[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return a.meta&&(u.data={meta:a.meta}),e.patch(a,u),u=e.applyData(a,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(a,u),u}function ZM(e,a){const i={type:"element",tagName:"del",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function JM(e,a){const i={type:"element",tagName:"em",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function WM(e,a){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),c=vs(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let d,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),d=e.footnoteOrder.length):d=u+1,f+=1,e.footnoteCounts.set(r,f);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+c,id:i+"fnref-"+c+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(a,m);const v={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(a,v),e.applyData(a,v)}function eR(e,a){const i={type:"element",tagName:"h"+a.depth,properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function tR(e,a){if(e.options.allowDangerousHtml){const i={type:"raw",value:a.value};return e.patch(a,i),e.applyData(a,i)}}function V3(e,a){const i=a.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+r}];const c=e.all(a),u=c[0];u&&u.type==="text"?u.value="["+u.value:c.unshift({type:"text",value:"["});const d=c[c.length-1];return d&&d.type==="text"?d.value+=r:c.push({type:"text",value:r}),c}function nR(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return V3(e,a);const c={src:vs(r.url||""),alt:a.alt};r.title!==null&&r.title!==void 0&&(c.title=r.title);const u={type:"element",tagName:"img",properties:c,children:[]};return e.patch(a,u),e.applyData(a,u)}function aR(e,a){const i={src:vs(a.url)};a.alt!==null&&a.alt!==void 0&&(i.alt=a.alt),a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(a,r),e.applyData(a,r)}function iR(e,a){const i={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};e.patch(a,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(a,r),e.applyData(a,r)}function rR(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return V3(e,a);const c={href:vs(r.url||"")};r.title!==null&&r.title!==void 0&&(c.title=r.title);const u={type:"element",tagName:"a",properties:c,children:e.all(a)};return e.patch(a,u),e.applyData(a,u)}function lR(e,a){const i={href:vs(a.url)};a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"a",properties:i,children:e.all(a)};return e.patch(a,r),e.applyData(a,r)}function oR(e,a,i){const r=e.all(a),c=i?sR(i):$3(a),u={},d=[];if(typeof a.checked=="boolean"){const y=r[0];let p;y&&y.type==="element"&&y.tagName==="p"?p=y:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const y=r[f];(c||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
525
+ `}),y.type==="element"&&y.tagName==="p"&&!c?d.push(...y.children):d.push(y)}const m=r[r.length-1];m&&(c||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
526
+ `});const v={type:"element",tagName:"li",properties:u,children:d};return e.patch(a,v),e.applyData(a,v)}function sR(e){let a=!1;if(e.type==="list"){a=e.spread||!1;const i=e.children;let r=-1;for(;!a&&++r<i.length;)a=$3(i[r])}return a}function $3(e){const a=e.spread;return a??e.children.length>1}function cR(e,a){const i={},r=e.all(a);let c=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++c<r.length;){const d=r[c];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:a.ordered?"ol":"ul",properties:i,children:e.wrap(r,!0)};return e.patch(a,u),e.applyData(a,u)}function uR(e,a){const i={type:"element",tagName:"p",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function dR(e,a){const i={type:"root",children:e.wrap(e.all(a))};return e.patch(a,i),e.applyData(a,i)}function fR(e,a){const i={type:"element",tagName:"strong",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function hR(e,a){const i=e.all(a),r=i.shift(),c=[];if(r){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(a.children[0],d),c.push(d)}if(i.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=lg(a.children[1]),m=k3(a.children[a.children.length-1]);f&&m&&(d.position={start:f,end:m}),c.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(c,!0)};return e.patch(a,u),e.applyData(a,u)}function mR(e,a,i){const r=i?i.children:void 0,u=(r?r.indexOf(a):1)===0?"th":"td",d=i&&i.type==="table"?i.align:void 0,f=d?d.length:a.children.length;let m=-1;const v=[];for(;++m<f;){const p=a.children[m],b={},j=d?d[m]:void 0;j&&(b.align=j);let S={type:"element",tagName:u,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),v.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(v,!0)};return e.patch(a,y),e.applyData(a,y)}function pR(e,a){const i={type:"element",tagName:"td",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}const zx=9,Lx=32;function gR(e){const a=String(e),i=/\r?\n|\r/g;let r=i.exec(a),c=0;const u=[];for(;r;)u.push(Bx(a.slice(c,r.index),c>0,!0),r[0]),c=r.index+r[0].length,r=i.exec(a);return u.push(Bx(a.slice(c),c>0,!1)),u.join("")}function Bx(e,a,i){let r=0,c=e.length;if(a){let u=e.codePointAt(r);for(;u===zx||u===Lx;)r++,u=e.codePointAt(r)}if(i){let u=e.codePointAt(c-1);for(;u===zx||u===Lx;)c--,u=e.codePointAt(c-1)}return c>r?e.slice(r,c):""}function vR(e,a){const i={type:"text",value:gR(String(a.value))};return e.patch(a,i),e.applyData(a,i)}function yR(e,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(a,i),e.applyData(a,i)}const xR={blockquote:XM,break:KM,code:QM,delete:ZM,emphasis:JM,footnoteReference:WM,heading:eR,html:tR,imageReference:nR,image:aR,inlineCode:iR,linkReference:rR,link:lR,listItem:oR,list:cR,paragraph:uR,root:dR,strong:fR,table:hR,tableCell:pR,tableRow:mR,text:vR,thematicBreak:yR,toml:md,yaml:md,definition:md,footnoteDefinition:md};function md(){}const G3=-1,hf=0,xc=1,Hd=2,hg=3,mg=4,pg=5,gg=6,Y3=7,X3=8,{defineProperty:bR}=Object,K3=typeof self=="object"?self:globalThis,Ix=(e,a)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new K3[e](a)},jR=(e,a)=>{const i=(c,u)=>(e.set(u,c),c),r=c=>{if(e.has(c))return e.get(c);const[u,d]=a[c];switch(u){case hf:case G3:return i(d,c);case xc:{const f=i([],c);for(const m of d)f.push(r(m));return f}case Hd:{const f=i({},c);for(const[m,v]of d){const y=r(m),p=r(v);y==="__proto__"?bR(f,y,{value:p,configurable:!0,enumerable:!0,writable:!0}):f[y]=p}return f}case hg:return i(new Date(d),c);case mg:{const{source:f,flags:m}=d;return i(new RegExp(f,m),c)}case pg:{const f=i(new Map,c);for(const[m,v]of d)f.set(r(m),r(v));return f}case gg:{const f=i(new Set,c);for(const m of d)f.add(r(m));return f}case Y3:{const{name:f,message:m}=d;return i(typeof K3[f]=="function"?Ix(f,m):new Error(m),c)}case X3:return i(BigInt(d),c);case"BigInt":return i(Object(BigInt(d)),c);case"ArrayBuffer":return i(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return i(new DataView(f),d)}case"-0":return-0}return i(Ix(u,d),c)};return r},Px=e=>jR(new Map,e)(0),Xl="",{toString:wR}={},{keys:SR,is:kR}=Object,gc=e=>{const a=typeof e;if(a!=="object"||!e)return[hf,a];const i=wR.call(e).slice(8,-1);switch(i){case"Array":return[xc,Xl];case"Object":return[Hd,Xl];case"Date":return[hg,Xl];case"RegExp":return[mg,Xl];case"Map":return[pg,Xl];case"Set":return[gg,Xl];case"DataView":return[xc,i]}return i.includes("Array")?[xc,i]:e instanceof Error?[Y3,e.name||"Error"]:[Hd,i]},pd=([e,a])=>e===hf&&(a==="function"||a==="symbol"),CR=(e,a,i,r)=>{const c=(d,f)=>{const m=r.push(d)-1;return i.set(f,m),m},u=d=>{if(i.has(d))return i.get(d);let[f,m]=gc(d);switch(f){case hf:{let y=d;switch(m){case"bigint":f=X3,y=d.toString();break;case"number":if(!d&&kR(d,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return c([G3],d)}return c([f,y],d)}case xc:{if(m){let b=d;return m==="DataView"?b=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(b=new Uint8Array(d)),c([m,[...b]],d)}const y=[],p=c([f,y],d);for(const b of d)y.push(u(b));return p}case Hd:{if(m)switch(m){case"BigInt":return c([m,d.toString()],d);case"Boolean":case"Number":case"String":return c([m,d.valueOf()],d)}if(a&&"toJSON"in d)return u(d.toJSON());const y=[],p=c([f,y],d);for(const b of SR(d))(e||!pd(gc(d[b])))&&y.push([u(b),u(d[b])]);return p}case hg:return c([f,isNaN(d.getTime())?Xl:d.toISOString()],d);case mg:{const{source:y,flags:p}=d;return c([f,{source:y,flags:p}],d)}case pg:{const y=[],p=c([f,y],d);for(const[b,j]of d)(e||!(pd(gc(b))||pd(gc(j))))&&y.push([u(b),u(j)]);return p}case gg:{const y=[],p=c([f,y],d);for(const b of d)(e||!pd(gc(b)))&&y.push(u(b));return p}}const{message:v}=d;return c([f,{name:m,message:v}],d)};return u},Hx=(e,{json:a,lossy:i}={})=>{const r=[];return CR(!(a||i),!!a,new Map,r)(e),r},Ud=typeof structuredClone=="function"?(e,a)=>a&&("json"in a||"lossy"in a)?Px(Hx(e,a)):structuredClone(e):(e,a)=>Px(Hx(e,a));function NR(e,a){const i=[{type:"text",value:"↩"}];return a>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),i}function ER(e,a){return"Back to reference "+(e+1)+(a>1?"-"+a:"")}function TR(e){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||NR,r=e.options.footnoteBackLabel||ER,c=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const v=e.footnoteById.get(e.footnoteOrder[m]);if(!v)continue;const y=e.all(v),p=String(v.identifier).toUpperCase(),b=vs(p.toLowerCase());let j=0;const S=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++j<=k;){S.length>0&&S.push({type:"text",value:" "});let M=typeof i=="string"?i:i(m,j);typeof M=="string"&&(M={type:"text",value:M}),S.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+b+(j>1?"-"+j:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(m,j),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=y[y.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else y.push(...S);const E={type:"element",tagName:"li",properties:{id:a+"fn-"+b},children:e.wrap(y,!0)};e.patch(v,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ud(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
527
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
528
+ `}]}}const mf=(function(e){if(e==null)return RR;if(typeof e=="function")return pf(e);if(typeof e=="object")return Array.isArray(e)?AR(e):_R(e);if(typeof e=="string")return MR(e);throw new Error("Expected function, string, or object as test")});function AR(e){const a=[];let i=-1;for(;++i<e.length;)a[i]=mf(e[i]);return pf(r);function r(...c){let u=-1;for(;++u<a.length;)if(a[u].apply(this,c))return!0;return!1}}function _R(e){const a=e;return pf(i);function i(r){const c=r;let u;for(u in e)if(c[u]!==a[u])return!1;return!0}}function MR(e){return pf(a);function a(i){return i&&i.type===e}}function pf(e){return a;function a(i,r,c){return!!(DR(i)&&e.call(this,i,typeof r=="number"?r:void 0,c||void 0))}}function RR(){return!0}function DR(e){return e!==null&&typeof e=="object"&&"type"in e}const Q3=[],OR=!0,l0=!1,zR="skip";function Z3(e,a,i,r){let c;typeof a=="function"&&typeof i!="function"?(r=i,i=a):c=a;const u=mf(c),d=r?-1:1;f(e,void 0,[])();function f(m,v,y){const p=m&&typeof m=="object"?m:{};if(typeof p.type=="string"){const j=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(m.type+(j?"<"+j+">":""))+")"})}return b;function b(){let j=Q3,S,k,C;if((!a||u(m,v,y[y.length-1]||void 0))&&(j=LR(i(m,y)),j[0]===l0))return j;if("children"in m&&m.children){const E=m;if(E.children&&j[0]!==zR)for(k=(r?E.children.length:-1)+d,C=y.concat(E);k>-1&&k<E.children.length;){const M=E.children[k];if(S=f(M,k,C)(),S[0]===l0)return S;k=typeof S[1]=="number"?S[1]:k+d}}return j}}}function LR(e){return Array.isArray(e)?e:typeof e=="number"?[OR,e]:e==null?Q3:[e]}function vg(e,a,i,r){let c,u,d;typeof a=="function"&&typeof i!="function"?(u=void 0,d=a,c=i):(u=a,d=i,c=r),Z3(e,u,f,c);function f(m,v){const y=v[v.length-1],p=y?y.children.indexOf(m):void 0;return d(m,p,y)}}const o0={}.hasOwnProperty,BR={};function IR(e,a){const i=a||BR,r=new Map,c=new Map,u=new Map,d={...xR,...i.handlers},f={all:v,applyData:HR,definitionById:r,footnoteById:c,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:i,patch:PR,wrap:qR};return vg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const p=y.type==="definition"?r:c,b=String(y.identifier).toUpperCase();p.has(b)||p.set(b,y)}}),f;function m(y,p){const b=y.type,j=f.handlers[b];if(o0.call(f.handlers,b)&&j)return j(f,y,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:k,...C}=y,E=Ud(C);return E.children=f.all(y),E}return Ud(y)}return(f.options.unknownHandler||UR)(f,y,p)}function v(y){const p=[];if("children"in y){const b=y.children;let j=-1;for(;++j<b.length;){const S=f.one(b[j],y);if(S){if(j&&b[j-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Ux(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Ux(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function PR(e,a){e.position&&(a.position=CA(e))}function HR(e,a){let i=a;if(e&&e.data){const r=e.data.hName,c=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const d="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:d}}i.type==="element"&&u&&Object.assign(i.properties,Ud(u)),"children"in i&&i.children&&c!==null&&c!==void 0&&(i.children=c)}return i}function UR(e,a){const i=a.data||{},r="value"in a&&!(o0.call(i,"hProperties")||o0.call(i,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:e.all(a)};return e.patch(a,r),e.applyData(a,r)}function qR(e,a){const i=[];let r=-1;for(a&&i.push({type:"text",value:`
529
+ `});++r<e.length;)r&&i.push({type:"text",value:`
530
+ `}),i.push(e[r]);return a&&e.length>0&&i.push({type:"text",value:`
531
+ `}),i}function Ux(e){let a=0,i=e.charCodeAt(a);for(;i===9||i===32;)a++,i=e.charCodeAt(a);return e.slice(a)}function qx(e,a){const i=IR(e,a),r=i.one(e,void 0),c=TR(i),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return c&&u.children.push({type:"text",value:`
532
+ `},c),u}function FR(e,a){return e&&"run"in e?async function(i,r){const c=qx(i,{file:r,...a});await e.run(c,r)}:function(i,r){return qx(i,{file:r,...e||a})}}function Fx(e){if(e)throw e}var lp,Vx;function VR(){if(Vx)return lp;Vx=1;var e=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=function(v){return typeof Array.isArray=="function"?Array.isArray(v):a.call(v)==="[object Array]"},u=function(v){if(!v||a.call(v)!=="[object Object]")return!1;var y=e.call(v,"constructor"),p=v.constructor&&v.constructor.prototype&&e.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!p)return!1;var b;for(b in v);return typeof b>"u"||e.call(v,b)},d=function(v,y){i&&y.name==="__proto__"?i(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},f=function(v,y){if(y==="__proto__")if(e.call(v,y)){if(r)return r(v,y).value}else return;return v[y]};return lp=function m(){var v,y,p,b,j,S,k=arguments[0],C=1,E=arguments.length,M=!1;for(typeof k=="boolean"&&(M=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<E;++C)if(v=arguments[C],v!=null)for(y in v)p=f(k,y),b=f(v,y),k!==b&&(M&&b&&(u(b)||(j=c(b)))?(j?(j=!1,S=p&&c(p)?p:[]):S=p&&u(p)?p:{},d(k,{name:y,newValue:m(M,S,b)})):typeof b<"u"&&d(k,{name:y,newValue:b}));return k},lp}var $R=VR();const op=v0($R);function s0(e){if(typeof e!="object"||e===null)return!1;const a=Object.getPrototypeOf(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function GR(){const e=[],a={run:i,use:r};return a;function i(...c){let u=-1;const d=c.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...c);function f(m,...v){const y=e[++u];let p=-1;if(m){d(m);return}for(;++p<c.length;)(v[p]===null||v[p]===void 0)&&(v[p]=c[p]);c=v,y?YR(y,f)(...v):d(null,...v)}}function r(c){if(typeof c!="function")throw new TypeError("Expected `middelware` to be a function, not "+c);return e.push(c),a}}function YR(e,a){let i;return r;function r(...d){const f=e.length>d.length;let m;f&&d.push(c);try{m=e.apply(this,d)}catch(v){const y=v;if(f&&i)throw y;return c(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,c):m instanceof Error?c(m):u(m))}function c(d,...f){i||(i=!0,a(d,...f))}function u(d){c(null,d)}}const Ai={basename:XR,dirname:KR,extname:QR,join:ZR,sep:"/"};function XR(e,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Pc(e);let i=0,r=-1,c=e.length,u;if(a===void 0||a.length===0||a.length>e.length){for(;c--;)if(e.codePointAt(c)===47){if(u){i=c+1;break}}else r<0&&(u=!0,r=c+1);return r<0?"":e.slice(i,r)}if(a===e)return"";let d=-1,f=a.length-1;for(;c--;)if(e.codePointAt(c)===47){if(u){i=c+1;break}}else d<0&&(u=!0,d=c+1),f>-1&&(e.codePointAt(c)===a.codePointAt(f--)?f<0&&(r=c):(f=-1,r=d));return i===r?r=d:r<0&&(r=e.length),e.slice(i,r)}function KR(e){if(Pc(e),e.length===0)return".";let a=-1,i=e.length,r;for(;--i;)if(e.codePointAt(i)===47){if(r){a=i;break}}else r||(r=!0);return a<0?e.codePointAt(0)===47?"/":".":a===1&&e.codePointAt(0)===47?"//":e.slice(0,a)}function QR(e){Pc(e);let a=e.length,i=-1,r=0,c=-1,u=0,d;for(;a--;){const f=e.codePointAt(a);if(f===47){if(d){r=a+1;break}continue}i<0&&(d=!0,i=a+1),f===46?c<0?c=a:u!==1&&(u=1):c>-1&&(u=-1)}return c<0||i<0||u===0||u===1&&c===i-1&&c===r+1?"":e.slice(c,i)}function ZR(...e){let a=-1,i;for(;++a<e.length;)Pc(e[a]),e[a]&&(i=i===void 0?e[a]:i+"/"+e[a]);return i===void 0?".":JR(i)}function JR(e){Pc(e);const a=e.codePointAt(0)===47;let i=WR(e,!a);return i.length===0&&!a&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),a?"/"+i:i}function WR(e,a){let i="",r=0,c=-1,u=0,d=-1,f,m;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(c===d-1||u===1))if(c!==d-1&&u===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",r=0):(i=i.slice(0,m),r=i.length-1-i.lastIndexOf("/")),c=d,u=0;continue}}else if(i.length>0){i="",r=0,c=d,u=0;continue}}a&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+e.slice(c+1,d):i=e.slice(c+1,d),r=d-c-1;c=d,u=0}else f===46&&u>-1?u++:u=-1}return i}function Pc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const eD={cwd:tD};function tD(){return"/"}function c0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function nD(e){if(typeof e=="string")e=new URL(e);else if(!c0(e)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(e.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return aD(e)}function aD(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const a=e.pathname;let i=-1;for(;++i<a.length;)if(a.codePointAt(i)===37&&a.codePointAt(i+1)===50){const r=a.codePointAt(i+2);if(r===70||r===102){const c=new TypeError("File URL path must not include encoded / characters");throw c.code="ERR_INVALID_FILE_URL_PATH",c}}return decodeURIComponent(a)}const sp=["history","path","basename","stem","extname","dirname"];class J3{constructor(a){let i;a?c0(a)?i={path:a}:typeof a=="string"||iD(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":eD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sp.length;){const u=sp[r];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let c;for(c in i)sp.includes(c)||(this[c]=i[c])}get basename(){return typeof this.path=="string"?Ai.basename(this.path):void 0}set basename(a){up(a,"basename"),cp(a,"basename"),this.path=Ai.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?Ai.dirname(this.path):void 0}set dirname(a){$x(this.basename,"dirname"),this.path=Ai.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?Ai.extname(this.path):void 0}set extname(a){if(cp(a,"extname"),$x(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ai.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){c0(a)&&(a=nD(a)),up(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?Ai.basename(this.path,this.extname):void 0}set stem(a){up(a,"stem"),cp(a,"stem"),this.path=Ai.join(this.dirname||"",a+(this.extname||""))}fail(a,i,r){const c=this.message(a,i,r);throw c.fatal=!0,c}info(a,i,r){const c=this.message(a,i,r);return c.fatal=void 0,c}message(a,i,r){const c=new In(a,i,r);return this.path&&(c.name=this.path+":"+c.name,c.file=this.path),c.fatal=!1,this.messages.push(c),c}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function cp(e,a){if(e&&e.includes(Ai.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+Ai.sep+"`")}function up(e,a){if(!e)throw new Error("`"+a+"` cannot be empty")}function $x(e,a){if(!e)throw new Error("Setting `"+a+"` requires `path` to be set too")}function iD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rD=(function(e){const r=this.constructor.prototype,c=r[e],u=function(){return c.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),lD={}.hasOwnProperty;class yg extends rD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GR()}copy(){const a=new yg;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(op(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(hp("data",this.frozen),this.namespace[a]=i,this):lD.call(this.namespace,a)&&this.namespace[a]||void 0:a?(hp("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const c=i.call(a,...r);typeof c=="function"&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=gd(a),r=this.parser||this.Parser;return dp("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),dp("process",this.parser||this.Parser),fp("process",this.compiler||this.Compiler),i?c(void 0,i):new Promise(c);function c(u,d){const f=gd(a),m=r.parse(f);r.run(m,f,function(y,p,b){if(y||!p||!b)return v(y);const j=p,S=r.stringify(j,b);cD(S)?b.value=S:b.result=S,v(y,b)});function v(y,p){y||!p?d(y):u?u(p):i(void 0,p)}}}processSync(a){let i=!1,r;return this.freeze(),dp("processSync",this.parser||this.Parser),fp("processSync",this.compiler||this.Compiler),this.process(a,c),Yx("processSync","process",i),r;function c(u,d){i=!0,Fx(u),r=d}}run(a,i,r){Gx(a),this.freeze();const c=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?u(void 0,r):new Promise(u);function u(d,f){const m=gd(i);c.run(a,m,v);function v(y,p,b){const j=p||a;y?f(y):d?d(j):r(void 0,j,b)}}}runSync(a,i){let r=!1,c;return this.run(a,i,u),Yx("runSync","run",r),c;function u(d,f){Fx(d),c=f,r=!0}}stringify(a,i){this.freeze();const r=gd(i),c=this.compiler||this.Compiler;return fp("stringify",c),Gx(a),c(a,r)}use(a,...i){const r=this.attachers,c=this.namespace;if(hp("use",this.frozen),a!=null)if(typeof a=="function")m(a,i);else if(typeof a=="object")Array.isArray(a)?f(a):d(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function u(v){if(typeof v=="function")m(v,[]);else if(typeof v=="object")if(Array.isArray(v)){const[y,...p]=v;m(y,p)}else d(v);else throw new TypeError("Expected usable value, not `"+v+"`")}function d(v){if(!("plugins"in v)&&!("settings"in v))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(v.plugins),v.settings&&(c.settings=op(!0,c.settings,v.settings))}function f(v){let y=-1;if(v!=null)if(Array.isArray(v))for(;++y<v.length;){const p=v[y];u(p)}else throw new TypeError("Expected a list of plugins, not `"+v+"`")}function m(v,y){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===v){b=p;break}if(b===-1)r.push([v,...y]);else if(y.length>0){let[j,...S]=y;const k=r[b][1];s0(k)&&s0(j)&&(j=op(!0,k,j)),r[b]=[v,j,...S]}}}}const oD=new yg().freeze();function dp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hp(e,a){if(a)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gx(e){if(!s0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yx(e,a,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+a+"` instead")}function gd(e){return sD(e)?e:new J3(e)}function sD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cD(e){return typeof e=="string"||uD(e)}function uD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xx=[],Kx={allowDangerousHtml:!0},fD=/^(https?|ircs?|mailto|xmpp)$/i,hD=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mD(e){const a=pD(e),i=gD(e);return vD(a.runSync(a.parse(i),i),e)}function pD(e){const a=e.rehypePlugins||Xx,i=e.remarkPlugins||Xx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Kx}:Kx;return oD().use(YM).use(i).use(FR,r).use(a)}function gD(e){const a=e.children||"",i=new J3;return typeof a=="string"&&(i.value=a),i}function vD(e,a){const i=a.allowedElements,r=a.allowElement,c=a.components,u=a.disallowedElements,d=a.skipHtml,f=a.unwrapDisallowed,m=a.urlTransform||yD;for(const y of hD)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+dD+y.id,void 0);return vg(e,v),_A(e,{Fragment:o.Fragment,components:c,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function v(y,p,b){if(y.type==="raw"&&b&&typeof p=="number")return d?b.children.splice(p,1):b.children[p]={type:"text",value:y.value},p;if(y.type==="element"){let j;for(j in ap)if(Object.hasOwn(ap,j)&&Object.hasOwn(y.properties,j)){const S=y.properties[j],k=ap[j];(k===null||k.includes(y.tagName))&&(y.properties[j]=m(String(S||""),j,y))}}if(y.type==="element"){let j=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!j&&r&&typeof p=="number"&&(j=!r(y,p,b)),j&&b&&typeof p=="number")return f&&y.children?b.children.splice(p,1,...y.children):b.children.splice(p,1),p}}}function yD(e){const a=e.indexOf(":"),i=e.indexOf("?"),r=e.indexOf("#"),c=e.indexOf("/");return a===-1||c!==-1&&a>c||i!==-1&&a>i||r!==-1&&a>r||fD.test(e.slice(0,a))?e:""}function xD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W3(e,a,i){const c=mf((i||{}).ignore||[]),u=bD(a);let d=-1;for(;++d<u.length;)Z3(e,"text",f);function f(v,y){let p=-1,b;for(;++p<y.length;){const j=y[p],S=b?b.children:void 0;if(c(j,S?S.indexOf(j):void 0,b))return;b=j}if(b)return m(v,y)}function m(v,y){const p=y[y.length-1],b=u[d][0],j=u[d][1];let S=0;const C=p.children.indexOf(v);let E=!1,M=[];b.lastIndex=0;let T=b.exec(v.value);for(;T;){const _=T.index,z={index:T.index,input:T.input,stack:[...y,v]};let A=j(...T,z);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(S!==_&&M.push({type:"text",value:v.value.slice(S,_)}),Array.isArray(A)?M.push(...A):A&&M.push(A),S=_+T[0].length,E=!0),!b.global)break;T=b.exec(v.value)}return E?(S<v.value.length&&M.push({type:"text",value:v.value.slice(S)}),p.children.splice(C,1,...M)):M=[v],C+M.length}}function bD(e){const a=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<i.length;){const c=i[r];a.push([jD(c[0]),wD(c[1])])}return a}function jD(e){return typeof e=="string"?new RegExp(xD(e),"g"):e}function wD(e){return typeof e=="function"?e:function(){return e}}function SD(e){W3(e,[/\r?\n|\r/g,kD])}function kD(){return{type:"break"}}function CD(){return function(e){SD(e)}}const ND=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,ED=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function TD(e){var r;const a=((r=e.children)==null?void 0:r.length)===1?e.children[0]:void 0;if((a==null?void 0:a.type)!=="text"||!a.value)return;const i=a.value;return e.url===i||e.url===`http://${i}`||e.url===`mailto:${i}`?i:void 0}function eS(e,a){return{type:"link",url:e,children:[{type:"text",value:a}]}}function AD(e){const a=[];let i=0;for(const r of e.matchAll(ED))r.index>i&&a.push({type:"text",value:e.slice(i,r.index)}),a.push(eS(r[0],r[0])),i=r.index+r[0].length;return i<e.length&&a.push({type:"text",value:e.slice(i)}),a}function tS(e){const a=e.children;if(a)for(let i=0;i<a.length;i++){const r=a[i];if(r.type!=="link"){tS(r);continue}const c=TD(r),u=c===void 0?-1:c.search(ND);if(c===void 0||u<=0)continue;const d=c.slice(0,u),f=r.url.slice(0,r.url.length-c.length),m=AD(c.slice(u));a.splice(i,1,eS(f+d,d),...m),i+=m.length}}function _D(){return e=>tS(e)}function Qx(e,a){const i=String(e);if(typeof a!="string")throw new TypeError("Expected character");let r=0,c=i.indexOf(a);for(;c!==-1;)r++,c=i.indexOf(a,c+a.length);return r}const mp="phrasing",pp=["autolink","link","image","label"];function MD(){return{transforms:[ID],enter:{literalAutolink:DD,literalAutolinkEmail:gp,literalAutolinkHttp:gp,literalAutolinkWww:gp},exit:{literalAutolink:BD,literalAutolinkEmail:LD,literalAutolinkHttp:OD,literalAutolinkWww:zD}}}function RD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:mp,notInConstruct:pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:mp,notInConstruct:pp},{character:":",before:"[ps]",after:"\\/",inConstruct:mp,notInConstruct:pp}]}}function DD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function gp(e){this.config.enter.autolinkProtocol.call(this,e)}function OD(e){this.config.exit.autolinkProtocol.call(this,e)}function zD(e){this.config.exit.data.call(this,e);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(e)}function LD(e){this.config.exit.autolinkEmail.call(this,e)}function BD(e){this.exit(e)}function ID(e){W3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,PD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),HD]],{ignore:["link","linkReference"]})}function PD(e,a,i,r,c){let u="";if(!nS(c)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!UD(i)))return!1;const d=qD(i+r);if(!d[0])return!1;const f={type:"link",title:null,url:u+a+d[0],children:[{type:"text",value:a+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function HD(e,a,i,r){return!nS(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function UD(e){const a=e.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function qD(e){const a=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!a)return[e,void 0];e=e.slice(0,a.index);let i=a[0],r=i.indexOf(")");const c=Qx(e,"(");let u=Qx(e,")");for(;r!==-1&&c>u;)e+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),u++;return[e,i]}function nS(e,a){const i=e.input.charCodeAt(e.index-1);return(e.index===0||lo(i)||df(i))&&(!a||i!==47)}aS.peek=ZD;function FD(){this.buffer()}function VD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $D(){this.buffer()}function GD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YD(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=li(this.sliceSerialize(e)).toLowerCase(),i.label=a}function XD(e){this.exit(e)}function KD(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=li(this.sliceSerialize(e)).toLowerCase(),i.label=a}function QD(e){this.exit(e)}function ZD(){return"["}function aS(e,a,i,r){const c=i.createTracker(r);let u=c.move("[^");const d=i.enter("footnoteReference"),f=i.enter("reference");return u+=c.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),d(),u+=c.move("]"),u}function JD(){return{enter:{gfmFootnoteCallString:FD,gfmFootnoteCall:VD,gfmFootnoteDefinitionLabelString:$D,gfmFootnoteDefinition:GD},exit:{gfmFootnoteCallString:YD,gfmFootnoteCall:XD,gfmFootnoteDefinitionLabelString:KD,gfmFootnoteDefinition:QD}}}function WD(e){let a=!1;return e&&e.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:aS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,c,u,d){const f=u.createTracker(d);let m=f.move("[^");const v=u.enter("footnoteDefinition"),y=u.enter("label");return m+=f.move(u.safe(u.associationId(r),{before:m,after:"]"})),y(),m+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),m+=f.move((a?`
533
+ `:" ")+u.indentLines(u.containerFlow(r,f.current()),a?iS:eO))),v(),m}}function eO(e,a,i){return a===0?e:iS(e,a,i)}function iS(e,a,i){return(i?"":" ")+e}const tO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rS.peek=lO;function nO(){return{canContainEols:["delete"],enter:{strikethrough:iO},exit:{strikethrough:rO}}}function aO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tO}],handlers:{delete:rS}}}function iO(e){this.enter({type:"delete",children:[]},e)}function rO(e){this.exit(e)}function rS(e,a,i,r){const c=i.createTracker(r),u=i.enter("strikethrough");let d=c.move("~~");return d+=i.containerPhrasing(e,{...c.current(),before:d,after:"~"}),d+=c.move("~~"),u(),d}function lO(){return"~"}function oO(e){return e.length}function sO(e,a){const i=a||{},r=(i.align||[]).concat(),c=i.stringLength||oO,u=[],d=[],f=[],m=[];let v=0,y=-1;for(;++y<e.length;){const k=[],C=[];let E=-1;for(e[y].length>v&&(v=e[y].length);++E<e[y].length;){const M=cO(e[y][E]);if(i.alignDelimiters!==!1){const T=c(M);C[E]=T,(m[E]===void 0||T>m[E])&&(m[E]=T)}k.push(M)}d[y]=k,f[y]=C}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<v;)u[p]=Zx(r[p]);else{const k=Zx(r);for(;++p<v;)u[p]=k}p=-1;const b=[],j=[];for(;++p<v;){const k=u[p];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let M=i.alignDelimiters===!1?1:Math.max(1,m[p]-C.length-E.length);const T=C+"-".repeat(M)+E;i.alignDelimiters!==!1&&(M=C.length+M+E.length,M>m[p]&&(m[p]=M),j[p]=M),b[p]=T}d.splice(1,0,b),f.splice(1,0,j),y=-1;const S=[];for(;++y<d.length;){const k=d[y],C=f[y];p=-1;const E=[];for(;++p<v;){const M=k[p]||"";let T="",_="";if(i.alignDelimiters!==!1){const z=m[p]-(C[p]||0),A=u[p];A===114?T=" ".repeat(z):A===99?z%2?(T=" ".repeat(z/2+.5),_=" ".repeat(z/2-.5)):(T=" ".repeat(z/2),_=T):_=" ".repeat(z)}i.delimiterStart!==!1&&!p&&E.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&M==="")&&(i.delimiterStart!==!1||p)&&E.push(" "),i.alignDelimiters!==!1&&E.push(T),E.push(M),i.alignDelimiters!==!1&&E.push(_),i.padding!==!1&&E.push(" "),(i.delimiterEnd!==!1||p!==v-1)&&E.push("|")}S.push(i.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
534
+ `)}function cO(e){return e==null?"":String(e)}function Zx(e){const a=typeof e=="string"?e.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function uO(e,a,i,r){const c=i.enter("blockquote"),u=i.createTracker(r);u.move("> "),u.shift(2);const d=i.indentLines(i.containerFlow(e,u.current()),dO);return c(),d}function dO(e,a,i){return">"+(i?"":" ")+e}function fO(e,a){return Jx(e,a.inConstruct,!0)&&!Jx(e,a.notInConstruct,!1)}function Jx(e,a,i){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return i;let r=-1;for(;++r<a.length;)if(e.includes(a[r]))return!0;return!1}function Wx(e,a,i,r){let c=-1;for(;++c<i.unsafe.length;)if(i.unsafe[c].character===`
535
+ `&&fO(i.stack,i.unsafe[c]))return/[ \t]/.test(r.before)?"":" ";return`\\
536
+ `}function hO(e,a){const i=String(e);let r=i.indexOf(a),c=r,u=0,d=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===c?++u>d&&(d=u):u=1,c=r+a.length,r=i.indexOf(a,c);return d}function mO(e,a){return!!(a.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function pO(e){const a=e.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function gO(e,a,i,r){const c=pO(i),u=e.value||"",d=c==="`"?"GraveAccent":"Tilde";if(mO(e,i)){const p=i.enter("codeIndented"),b=i.indentLines(u,vO);return p(),b}const f=i.createTracker(r),m=c.repeat(Math.max(hO(u,c)+1,3)),v=i.enter("codeFenced");let y=f.move(m);if(e.lang){const p=i.enter(`codeFencedLang${d}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=i.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
537
+ `,encode:["`"],...f.current()})),p()}return y+=f.move(`
538
+ `),u&&(y+=f.move(u+`
539
+ `)),y+=f.move(m),v(),y}function vO(e,a,i){return(i?"":" ")+e}function xg(e){const a=e.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function yO(e,a,i,r){const c=xg(i),u=c==='"'?"Quote":"Apostrophe",d=i.enter("definition");let f=i.enter("label");const m=i.createTracker(r);let v=m.move("[");return v+=m.move(i.safe(i.associationId(e),{before:v,after:"]",...m.current()})),v+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(i.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=i.enter("destinationRaw"),v+=m.move(i.safe(e.url,{before:v,after:e.title?" ":`
540
+ `,...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(i.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),d(),v}function xO(e){const a=e.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Tc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qd(e,a,i){const r=cs(e),c=cs(a);return r===void 0?c===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}lS.peek=bO;function lS(e,a,i,r){const c=xO(i),u=i.enter("emphasis"),d=i.createTracker(r),f=d.move(c);let m=d.move(i.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=qd(r.before.charCodeAt(r.before.length-1),v,c);y.inside&&(m=Tc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=qd(r.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+Tc(p));const j=d.move(c);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function bO(e,a,i){return i.options.emphasis||"*"}function jO(e,a){let i=!1;return vg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,l0}),!!((!e.depth||e.depth<3)&&ug(e)&&(a.options.setext||i))}function wO(e,a,i,r){const c=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(r);if(jO(e,i)){const y=i.enter("headingSetext"),p=i.enter("phrasing"),b=i.containerPhrasing(e,{...u.current(),before:`
541
+ `,after:`
542
+ `});return p(),y(),b+`
543
+ `+(c===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
544
+ `))+1))}const d="#".repeat(c),f=i.enter("headingAtx"),m=i.enter("phrasing");u.move(d+" ");let v=i.containerPhrasing(e,{before:"# ",after:`
545
+ `,...u.current()});return/^[\t ]/.test(v)&&(v=Tc(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,i.options.closeAtx&&(v+=" "+d),m(),f(),v}oS.peek=SO;function oS(e){return e.value||""}function SO(){return"<"}sS.peek=kO;function sS(e,a,i,r){const c=xg(i),u=c==='"'?"Quote":"Apostrophe",d=i.enter("image");let f=i.enter("label");const m=i.createTracker(r);let v=m.move("![");return v+=m.move(i.safe(e.alt,{before:v,after:"]",...m.current()})),v+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(i.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=i.enter("destinationRaw"),v+=m.move(i.safe(e.url,{before:v,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(i.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),v+=m.move(")"),d(),v}function kO(){return"!"}cS.peek=CO;function cS(e,a,i,r){const c=e.referenceType,u=i.enter("imageReference");let d=i.enter("label");const f=i.createTracker(r);let m=f.move("![");const v=i.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=i.stack;i.stack=[],d=i.enter("reference");const p=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function CO(){return"!"}uS.peek=NO;function uS(e,a,i){let r=e.value||"",c="`",u=-1;for(;new RegExp("(^|[^`])"+c+"([^`]|$)").test(r);)c+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<i.unsafe.length;){const d=i.unsafe[u],f=i.compilePattern(d);let m;if(d.atBreak)for(;m=f.exec(r);){let v=m.index;r.charCodeAt(v)===10&&r.charCodeAt(v-1)===13&&v--,r=r.slice(0,v)+" "+r.slice(m.index+1)}}return c+r+c}function NO(){return"`"}function dS(e,a){const i=ug(e);return!!(!a.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fS.peek=EO;function fS(e,a,i,r){const c=xg(i),u=c==='"'?"Quote":"Apostrophe",d=i.createTracker(r);let f,m;if(dS(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let p=d.move("<");return p+=d.move(i.containerPhrasing(e,{before:p,after:">",...d.current()})),p+=d.move(">"),f(),i.stack=y,p}f=i.enter("link"),m=i.enter("label");let v=d.move("[");return v+=d.move(i.containerPhrasing(e,{before:v,after:"](",...d.current()})),v+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=i.enter("destinationLiteral"),v+=d.move("<"),v+=d.move(i.safe(e.url,{before:v,after:">",...d.current()})),v+=d.move(">")):(m=i.enter("destinationRaw"),v+=d.move(i.safe(e.url,{before:v,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=i.enter(`title${u}`),v+=d.move(" "+c),v+=d.move(i.safe(e.title,{before:v,after:c,...d.current()})),v+=d.move(c),m()),v+=d.move(")"),f(),v}function EO(e,a,i){return dS(e,i)?"<":"["}hS.peek=TO;function hS(e,a,i,r){const c=e.referenceType,u=i.enter("linkReference");let d=i.enter("label");const f=i.createTracker(r);let m=f.move("[");const v=i.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=i.stack;i.stack=[],d=i.enter("reference");const p=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function TO(){return"["}function bg(e){const a=e.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function AO(e){const a=bg(e),i=e.options.bulletOther;if(!i)return a==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+i+"`) to be different");return i}function _O(e){const a=e.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function mS(e){const a=e.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function MO(e,a,i,r){const c=i.enter("list"),u=i.bulletCurrent;let d=e.ordered?_O(i):bg(i);const f=e.ordered?d==="."?")":".":AO(i);let m=a&&i.bulletLastUsed?d===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(m=!0),mS(i)===d&&y){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=f),i.bulletCurrent=d;const v=i.containerFlow(e,r);return i.bulletLastUsed=d,i.bulletCurrent=u,c(),v}function RO(e){const a=e.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw new Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function DO(e,a,i,r){const c=RO(i);let u=i.bulletCurrent||bg(i);a&&a.type==="list"&&a.ordered&&(u=(typeof a.start=="number"&&a.start>-1?a.start:1)+(i.options.incrementListMarker===!1?0:a.children.indexOf(e))+u);let d=u.length+1;(c==="tab"||c==="mixed"&&(a&&a.type==="list"&&a.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=i.createTracker(r);f.move(u+" ".repeat(d-u.length)),f.shift(d);const m=i.enter("listItem"),v=i.indentLines(i.containerFlow(e,f.current()),y);return m(),v;function y(p,b,j){return b?(j?"":" ".repeat(d))+p:(j?u:u+" ".repeat(d-u.length))+p}}function OO(e,a,i,r){const c=i.enter("paragraph"),u=i.enter("phrasing"),d=i.containerPhrasing(e,r);return u(),c(),d}const zO=mf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function LO(e,a,i,r){return(e.children.some(function(d){return zO(d)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function BO(e){const a=e.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}pS.peek=IO;function pS(e,a,i,r){const c=BO(i),u=i.enter("strong"),d=i.createTracker(r),f=d.move(c+c);let m=d.move(i.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=qd(r.before.charCodeAt(r.before.length-1),v,c);y.inside&&(m=Tc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=qd(r.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+Tc(p));const j=d.move(c+c);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function IO(e,a,i){return i.options.strong||"*"}function PO(e,a,i,r){return i.safe(e.value,r)}function HO(e){const a=e.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function UO(e,a,i){const r=(mS(i)+(i.options.ruleSpaces?" ":"")).repeat(HO(i));return i.options.ruleSpaces?r.slice(0,-1):r}const gS={blockquote:uO,break:Wx,code:gO,definition:yO,emphasis:lS,hardBreak:Wx,heading:wO,html:oS,image:sS,imageReference:cS,inlineCode:uS,link:fS,linkReference:hS,list:MO,listItem:DO,paragraph:OO,root:LO,strong:pS,text:PO,thematicBreak:UO};function qO(){return{enter:{table:FO,tableData:eb,tableHeader:eb,tableRow:$O},exit:{codeText:GO,table:VO,tableData:vp,tableHeader:vp,tableRow:vp}}}function FO(e){const a=e._align;this.enter({type:"table",align:a.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function VO(e){this.exit(e),this.data.inTable=void 0}function $O(e){this.enter({type:"tableRow",children:[]},e)}function vp(e){this.exit(e)}function eb(e){this.enter({type:"tableCell",children:[]},e)}function GO(e){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,YO));const i=this.stack[this.stack.length-1];i.type,i.value=a,this.exit(e)}function YO(e,a){return a==="|"?a:e}function XO(e){const a=e||{},i=a.tableCellPadding,r=a.tablePipeAlign,c=a.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
546
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:d,tableCell:m,tableRow:f}};function d(j,S,k,C){return v(y(j,k,C),j.align)}function f(j,S,k,C){const E=p(j,k,C),M=v([E]);return M.slice(0,M.indexOf(`
547
+ `))}function m(j,S,k,C){const E=k.enter("tableCell"),M=k.enter("phrasing"),T=k.containerPhrasing(j,{...C,before:u,after:u});return M(),E(),T}function v(j,S){return sO(j,{align:S,alignDelimiters:r,padding:i,stringLength:c})}function y(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("table");for(;++E<C.length;)M[E]=p(C[E],S,k);return T(),M}function p(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("tableRow");for(;++E<C.length;)M[E]=m(C[E],j,S,k);return T(),M}function b(j,S,k){let C=gS.inlineCode(j,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function KO(){return{exit:{taskListCheckValueChecked:tb,taskListCheckValueUnchecked:tb,paragraph:ZO}}}function QO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JO}}}function tb(e){const a=this.stack[this.stack.length-2];a.type,a.checked=e.type==="taskListCheckValueChecked"}function ZO(e){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const c=a.children;let u=-1,d;for(;++u<c.length;){const f=c[u];if(f.type==="paragraph"){d=f;break}}d===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function JO(e,a,i,r){const c=e.children[0],u=typeof e.checked=="boolean"&&c&&c.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=i.createTracker(r);u&&f.move(d);let m=gS.listItem(e,a,i,{...r,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,v)),m;function v(y){return y+d}}function WO(){return[MD(),JD(),nO(),qO(),KO()]}function ez(e){return{extensions:[RD(),WD(e),aO(),XO(e),QO()]}}const tz={tokenize:oz,partial:!0},vS={tokenize:sz,partial:!0},yS={tokenize:cz,partial:!0},xS={tokenize:uz,partial:!0},nz={tokenize:dz,partial:!0},bS={name:"wwwAutolink",tokenize:rz,previous:wS},jS={name:"protocolAutolink",tokenize:lz,previous:SS},Sr={name:"emailAutolink",tokenize:iz,previous:kS},Fi={};function az(){return{text:Fi}}let $l=48;for(;$l<123;)Fi[$l]=Sr,$l++,$l===58?$l=65:$l===91&&($l=97);Fi[43]=Sr;Fi[45]=Sr;Fi[46]=Sr;Fi[95]=Sr;Fi[72]=[Sr,jS];Fi[104]=[Sr,jS];Fi[87]=[Sr,bS];Fi[119]=[Sr,bS];function iz(e,a,i){const r=this;let c,u;return d;function d(p){return!u0(p)||!kS.call(r,r.previous)||jg(r.events)?i(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return u0(p)?(e.consume(p),f):p===64?(e.consume(p),m):i(p)}function m(p){return p===46?e.check(nz,y,v)(p):p===45||p===95||Bn(p)?(u=!0,e.consume(p),m):y(p)}function v(p){return e.consume(p),c=!0,m}function y(p){return u&&c&&Xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),a(p)):i(p)}}function rz(e,a,i){const r=this;return c;function c(d){return d!==87&&d!==119||!wS.call(r,r.previous)||jg(r.events)?i(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tz,e.attempt(vS,e.attempt(yS,u),i),i)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),a(d)}}function lz(e,a,i){const r=this;let c="",u=!1;return d;function d(p){return(p===72||p===104)&&SS.call(r,r.previous)&&!jg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),c+=String.fromCodePoint(p),e.consume(p),f):i(p)}function f(p){if(Xn(p)&&c.length<5)return c+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=c.toLowerCase();if(b==="http"||b==="https")return e.consume(p),m}return i(p)}function m(p){return p===47?(e.consume(p),u?v:(u=!0,m)):i(p)}function v(p){return p===null||Pd(p)||_t(p)||lo(p)||df(p)?i(p):e.attempt(vS,e.attempt(yS,y),i)(p)}function y(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),a(p)}}function oz(e,a,i){let r=0;return c;function c(d){return(d===87||d===119)&&r<3?(r++,e.consume(d),c):d===46&&r===3?(e.consume(d),u):i(d)}function u(d){return d===null?i(d):a(d)}}function sz(e,a,i){let r,c,u;return d;function d(v){return v===46||v===95?e.check(xS,m,f)(v):v===null||_t(v)||lo(v)||v!==45&&df(v)?m(v):(u=!0,e.consume(v),d)}function f(v){return v===95?r=!0:(c=r,r=void 0),e.consume(v),d}function m(v){return c||r||!u?i(v):a(v)}}function cz(e,a){let i=0,r=0;return c;function c(d){return d===40?(i++,e.consume(d),c):d===41&&r<i?u(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?e.check(xS,a,u)(d):d===null||_t(d)||lo(d)?a(d):(e.consume(d),c)}function u(d){return d===41&&r++,e.consume(d),c}}function uz(e,a,i){return r;function r(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),r):f===38?(e.consume(f),u):f===93?(e.consume(f),c):f===60||f===null||_t(f)||lo(f)?a(f):i(f)}function c(f){return f===null||f===40||f===91||_t(f)||lo(f)?a(f):r(f)}function u(f){return Xn(f)?d(f):i(f)}function d(f){return f===59?(e.consume(f),r):Xn(f)?(e.consume(f),d):i(f)}}function dz(e,a,i){return r;function r(u){return e.consume(u),c}function c(u){return Bn(u)?i(u):a(u)}}function wS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_t(e)}function SS(e){return!Xn(e)}function kS(e){return!(e===47||u0(e))}function u0(e){return e===43||e===45||e===46||e===95||Bn(e)}function jg(e){let a=e.length,i=!1;for(;a--;){const r=e[a][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const fz={tokenize:bz,partial:!0};function hz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vz,continuation:{tokenize:yz},exit:xz}},text:{91:{name:"gfmFootnoteCall",tokenize:gz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mz,resolveTo:pz}}}}function mz(e,a,i){const r=this;let c=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let d;for(;c--;){const m=r.events[c][1];if(m.type==="labelImage"){d=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!d||!d._balanced)return i(m);const v=li(r.sliceSerialize({start:d.end,end:r.now()}));return v.codePointAt(0)!==94||!u.includes(v.slice(1))?i(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),a(m))}}function pz(e,a){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};c.end.column++,c.end.offset++,c.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},c.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",r,a],e[i+3],e[i+4],["enter",c,a],["exit",c,a],["enter",u,a],["enter",d,a],["exit",d,a],["exit",u,a],e[e.length-2],e[e.length-1],["exit",r,a]];return e.splice(i,e.length-i+1,...f),e}function gz(e,a,i){const r=this,c=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,d;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),m}function m(p){return p!==94?i(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",v)}function v(p){if(u>999||p===93&&!d||p===null||p===91||_t(p))return i(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return c.includes(li(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),a):i(p)}return _t(p)||(d=!0),u++,e.consume(p),p===92?y:v}function y(p){return p===91||p===92||p===93?(e.consume(p),u++,v):v(p)}}function vz(e,a,i){const r=this,c=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(S)}function y(S){if(d>999||S===93&&!f||S===null||S===91||_t(S))return i(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=li(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return _t(S)||(f=!0),d++,e.consume(S),S===92?p:y}function p(S){return S===91||S===92||S===93?(e.consume(S),d++,y):y(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),c.includes(u)||c.push(u),pt(e,j,"gfmFootnoteDefinitionWhitespace")):i(S)}function j(S){return a(S)}}function yz(e,a,i){return e.check(Ic,a,e.attempt(fz,a,i))}function xz(e){e.exit("gfmFootnoteDefinition")}function bz(e,a,i){const r=this;return pt(e,c,"gfmFootnoteDefinitionIndent",5);function c(u){const d=r.events[r.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?a(u):i(u)}}function jz(e){let i=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:c};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function c(d,f){let m=-1;for(;++m<d.length;)if(d[m][0]==="enter"&&d[m][1].type==="strikethroughSequenceTemporary"&&d[m][1]._close){let v=m;for(;v--;)if(d[v][0]==="exit"&&d[v][1].type==="strikethroughSequenceTemporary"&&d[v][1]._open&&d[m][1].end.offset-d[m][1].start.offset===d[v][1].end.offset-d[v][1].start.offset){d[m][1].type="strikethroughSequence",d[v][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},d[v][1].start),end:Object.assign({},d[m][1].end)},p={type:"strikethroughText",start:Object.assign({},d[v][1].end),end:Object.assign({},d[m][1].start)},b=[["enter",y,f],["enter",d[v][1],f],["exit",d[v][1],f],["enter",p,f]],j=f.parser.constructs.insideSpan.null;j&&Ma(b,b.length,0,ff(j,d.slice(v+1,m),f)),Ma(b,b.length,0,[["exit",p,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",y,f]]),Ma(d,v-1,m-v+3,b),m=v+b.length-2;break}}for(m=-1;++m<d.length;)d[m][1].type==="strikethroughSequenceTemporary"&&(d[m][1].type="data");return d}function u(d,f,m){const v=this.previous,y=this.events;let p=0;return b;function b(S){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(S):(d.enter("strikethroughSequenceTemporary"),j(S))}function j(S){const k=cs(v);if(S===126)return p>1?m(S):(d.consume(S),p++,j);if(p<2&&!i)return m(S);const C=d.exit("strikethroughSequenceTemporary"),E=cs(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,f(S)}}}class wz{constructor(){this.map=[],this.index=new Map}add(a,i,r){Sz(this,a,i,r)}consume(a){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(a.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),a.length=this.map[i][0];r.push(a.slice()),a.length=0;let c=r.pop();for(;c;){for(const u of c)a.push(u);c=r.pop()}this.map.length=0,this.index.clear()}}function Sz(e,a,i,r){if(i===0&&r.length===0)return;const c=e.index.get(a);if(c){c[1]+=i,c[2].push(...r);return}const u=[a,i,r];e.map.push(u),e.index.set(a,u)}function kz(e,a){let i=!1;const r=[];for(;a<e.length;){const c=e[a];if(i){if(c[0]==="enter")c[1].type==="tableContent"&&r.push(e[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(c[1].type==="tableContent"){if(e[a-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(c[1].type==="tableDelimiterRow")break}else c[0]==="enter"&&c[1].type==="tableDelimiterRow"&&(i=!0);a+=1}return r}function Cz(){return{flow:{null:{name:"table",tokenize:Nz,resolveAll:Ez}}}}function Nz(e,a,i){const r=this;let c=0,u=0,d;return f;function f(O){let G=r.events.length-1;for(;G>-1;){const{type:V}=r.events[G][1];if(V==="lineEnding"||V==="linePrefix")G--;else break}const q=G>-1?r.events[G][1].type:null,Q=q==="tableHead"||q==="tableRow"?A:m;return Q===A&&r.parser.lazy[r.now().line]?i(O):Q(O)}function m(O){return e.enter("tableHead"),e.enter("tableRow"),v(O)}function v(O){return O===124||(d=!0,u+=1),y(O)}function y(O){return O===null?i(O):$e(O)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),j):i(O):ot(O)?pt(e,y,"whitespace")(O):(u+=1,d&&(d=!1,c+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||_t(O)?(e.exit("data"),y(O)):(e.consume(O),O===92?b:p)}function b(O){return O===92||O===124?(e.consume(O),p):p(O)}function j(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(O):(e.enter("tableDelimiterRow"),d=!1,ot(O)?pt(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?C(O):O===124?(d=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):z(O)}function k(O){return ot(O)?pt(e,C,"whitespace")(O):C(O)}function C(O){return O===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(u+=1,E(O)):O===null||$e(O)?_(O):z(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),M(O)):z(O)}function M(O){return O===45?(e.consume(O),M):O===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(O))}function T(O){return ot(O)?pt(e,_,"whitespace")(O):_(O)}function _(O){return O===124?S(O):O===null||$e(O)?!d||c!==u?z(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),a(O)):z(O)}function z(O){return i(O)}function A(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||$e(O)?(e.exit("tableRow"),a(O)):ot(O)?pt(e,P,"whitespace")(O):(e.enter("data"),H(O))}function H(O){return O===null||O===124||_t(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?U:H)}function U(O){return O===92||O===124?(e.consume(O),H):H(O)}}function Ez(e,a){let i=-1,r=!0,c=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,v,y,p;const b=new wz;for(;++i<e.length;){const j=e[i],S=j[1];j[0]==="enter"?S.type==="tableHead"?(f=!1,m!==0&&(nb(b,a,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(i,0,[["enter",v,a]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,u=[0,0,0,0],d=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(i,0,[["enter",y,a]])),c=S.type==="tableDelimiterRow"?2:y?3:1):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],p=vd(b,a,u,c,void 0,p),u=[0,0,0,0]),d[2]=i)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(d[0]=d[1],p=vd(b,a,u,c,void 0,p)),u=d,d=[u[1],i,0,0])):S.type==="tableHead"?(f=!0,m=i):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=i,u[1]!==0?(d[0]=d[1],p=vd(b,a,u,c,i,p)):d[1]!==0&&(p=vd(b,a,d,c,i,p)),c=0):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(d[3]=i)}for(m!==0&&nb(b,a,m,v,y),b.consume(a.events),i=-1;++i<a.events.length;){const j=a.events[i];j[0]==="enter"&&j[1].type==="table"&&(j[1]._align=kz(a.events,i))}return e}function vd(e,a,i,r,c,u){const d=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},is(a.events,i[0])),e.add(i[0],0,[["exit",u,a]]));const m=is(a.events,i[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},e.add(i[1],0,[["enter",u,a]]),i[2]!==0){const v=is(a.events,i[2]),y=is(a.events,i[3]),p={type:f,start:Object.assign({},v),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",p,a]]),r!==2){const b=a.events[i[2]],j=a.events[i[3]];if(b[1].end=Object.assign({},j[1].end),b[1].type="chunkText",b[1].contentType="text",i[3]>i[2]+1){const S=i[2]+1,k=i[3]-i[2]-1;e.add(S,k,[])}}e.add(i[3]+1,0,[["exit",p,a]])}return c!==void 0&&(u.end=Object.assign({},is(a.events,c)),e.add(c,0,[["exit",u,a]]),u=void 0),u}function nb(e,a,i,r,c){const u=[],d=is(a.events,i);c&&(c.end=Object.assign({},d),u.push(["exit",c,a])),r.end=Object.assign({},d),u.push(["exit",r,a]),e.add(i+1,0,u)}function is(e,a){const i=e[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const Tz={name:"tasklistCheck",tokenize:_z};function Az(){return{text:{91:Tz}}}function _z(e,a,i){const r=this;return c;function c(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return _t(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),d):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),d):i(m)}function d(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(m)}function f(m){return $e(m)?a(m):ot(m)?e.check({tokenize:Mz},a,i)(m):i(m)}}function Mz(e,a,i){return pt(e,r,"whitespace");function r(c){return c===null?i(c):a(c)}}function Rz(e){return M3([az(),hz(),jz(e),Cz(),Az()])}const Dz={};function Oz(e){const a=this,i=e||Dz,r=a.data(),c=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),d=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);c.push(Rz(i)),u.push(WO()),d.push(ez(i))}function Fd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const zz={add:sl,"chat-bubble":TC,window:aC,close:ds,"chevron-left":gj,"chevron-right":al,"chevron-down":Li,gear:HC,"person-add":KC,"arrow-bracket-to-left":NC,"arrow-up":lC,copy:Kd,check:Qn,"cloud-download":j0,bell:sC,"bell-slash":oC,image:kC,paperclip:k0,"smiley-plus":pC,info:w0,people:QC,pencil:zC,file:xC,"file-video":vC,"file-audio":gC,folder:jC,"layout-sidebar-left":DC,sun:YC,moon:RC,"arrows-expand":hC,"arrows-contract":FC,"arrow-u-up-right":BC,"list-bullets":CC,eye:Zd,"eye-slash":Qd,pin:Op,megaphone:EC,trash:Rd,search:Mc,quote:LC,fold:bC,unfold:XC};function Be({name:e}){const a=zz[e]??w0;return o.jsx(a,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function ct({icon:e,label:a,className:i="",...r}){return o.jsx("button",{type:"button",className:`ui-iconbtn ${i}`,"aria-label":a,title:a,...r,children:o.jsx(Be,{name:e})})}function us({title:e,onClose:a,children:i,className:r=""}){const c=w.useRef(null),u=w.useId();return w.useEffect(()=>{const d=c.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),so.createPortal(o.jsxs("dialog",{ref:c,className:`ui-small-dialog ${r}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),a()},children:[o.jsx(ct,{icon:"close",label:x("ui.closeNamed",{name:e}),className:"ui-dialog-close",onClick:a}),o.jsxs("div",{className:"ui-dialog-body",children:[o.jsx("h1",{id:u,children:e}),i]})]}),document.body)}async function Hc(e){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const a=document.createElement("textarea");a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.append(a),a.select();try{return document.execCommand("copy")}finally{a.remove()}}function Lz({children:e}){const a=w.useRef(null),[i,r]=w.useState("idle");w.useEffect(()=>{if(i==="idle")return;const u=setTimeout(()=>r("idle"),1500);return()=>clearTimeout(u)},[i]);const c=async()=>{var u;return r(await Hc((((u=a.current)==null?void 0:u.textContent)??"").replace(/\n$/,""))?"copied":"failed")};return o.jsxs("figure",{className:"ui-code-figure",children:[o.jsx("pre",{ref:a,children:e}),o.jsx(ct,{icon:i==="copied"?"check":"copy",label:x(i==="copied"?"ui.copied":i==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void c()})]})}const Bz=[Oz,_D,CD],Uc=w.memo(function({text:a,renderQuote:i}){return ej(),o.jsx(mD,{remarkPlugins:Bz,skipHtml:!0,components:{a:({href:r,children:c})=>r==="#mention"||r==="#mention-me"?o.jsx("span",{className:"jv-mention","data-me":r==="#mention-me"||void 0,children:c}):i&&(r!=null&&r.startsWith("#quote-"))?i(Number(r.slice(7))):o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:c}),img:({alt:r})=>o.jsx("span",{children:x("ui.image",{alt:r||x("ui.imageHidden")})}),pre:({children:r})=>o.jsx(Lz,{children:r})},children:a})}),Iz={agent_undeletable:"error.agentUndeletable",autoconfig_model:"error.autoconfigModel",autoconfig_source:"error.autoconfigSource",bot_missing:"error.botMissing",chat_access_changed:"error.chatAccessChanged",computer_failed:"error.computerFailed",computer_missing:"error.computerMissing",docker_unavailable:"error.dockerUnavailable",connection_in_use:"error.connectionInUse",connection_missing:"error.connectionMissing",credential_changed:"error.credentialChanged",credential_unreadable:"error.credentialUnreadable",credential_scope:"error.credentialScope",credentials_missing:"error.credentialsMissing",data_locked:"error.dataLocked",discovery_format:"error.discoveryFormat",discovery_http:"error.discoveryHttp",discovery_key:"error.discoveryKey",discovery_protocol:"error.discoveryProtocol",discovery_url:"error.discoveryUrl",discovery_url_missing:"error.discoveryUrlMissing",discovery_unreachable:"error.discoveryUnreachable",machine_missing:"error.machineMissing",machine_name_taken:"error.machineNameTaken",ssh_auth_failed:"error.sshAuthFailed",ssh_bad_directory:"error.sshBadDirectory",ssh_bad_host:"error.sshBadHost",ssh_bad_port:"error.sshBadPort",ssh_bad_user:"error.sshBadUser",ssh_failed:"error.sshFailed",ssh_host_key_changed:"error.sshHostKeyChanged",ssh_key_unreadable:"error.sshKeyUnreadable",ssh_password_missing:"error.sshPasswordMissing",ssh_unreachable:"error.sshUnreachable",ssh_unsupported:"error.sshUnsupported",ssh_password_refused:"error.sshPasswordRefused",ssh_key_refused:"error.sshKeyRefused",ssh_key_expired:"error.sshKeyExpired",history_missing:"error.historyMissing",invalid_credential:"error.invalidCredential",invalid_run:"error.invalidRun",login_input:"error.loginInput",login_option:"error.loginOption",login_step:"error.loginStep",message_missing:"error.messageMissing",model_incomplete:"error.modelIncomplete",model_missing:"error.modelMissing",model_request_failed:"error.modelRequestFailed",model_required:"error.modelRequired",model_switch_uncertain:"error.modelSwitchUncertain",name_taken:"error.nameTaken",provider_name_taken:"error.providerNameTaken",question_closed:"error.questionClosed",question_expired:"error.questionExpired",secret_description_invalid:"error.secretDescriptionInvalid",secret_missing:"error.secretMissing",secret_name_invalid:"error.secretNameInvalid",secret_name_taken:"error.secretNameTaken",secret_value_missing:"error.secretValueMissing",secret_value_too_long:"error.secretValueTooLong",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",task_invalid:"error.taskInvalid",task_schedule_invalid:"error.taskScheduleInvalid",task_time_past:"error.taskTimePast",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay"},CS=(e,a)=>{const i=e?Iz[e]:void 0;return i?x(i,a):null};function it(e,a="common.failed"){return e instanceof hr?CS(e.code,e.params)??(e.status<500?e.message:x(a)):e instanceof Error&&e.message?e.message:x(a)}const Pz=e=>CS(e.errorCode,e.errorParams)??e.error??"";function Hz({botId:e,selected:a,onSelect:i,onOpenChat:r}){const[c,u]=w.useState(null),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0);if(w.useEffect(()=>{let S=!0;return f(!0),v(""),u(null),(a.kind==="history"?tA.read(e,a.id).then(C=>({kind:"history",data:C})):R4.message(e,a.id).then(C=>({kind:"chat",data:C}))).then(C=>{S&&u(C)}).catch(C=>{S&&v(it(C,"activity.detailFailed"))}).finally(()=>{S&&f(!1)}),()=>{S=!1}},[e,a.kind,a.id,y]),d)return o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.detailLoading")});if(m)return o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:m}),o.jsx(Ae,{variant:"outline",size:"sm",onClick:()=>p(S=>S+1),children:x("common.retry")})]});if(!c)return null;if(c.kind==="history")return o.jsx(ZT,{detail:c.data,onSelect:S=>i({kind:"history",id:S})},c.data.record.id);const{chat:b,message:j}=c.data;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-activity-message-head",children:[o.jsxs("div",{children:[o.jsx("h3",{children:b.title}),o.jsx("p",{children:ag(j.createdAt)})]}),o.jsxs(Ae,{variant:"ghost",size:"sm",onClick:()=>r(b.id),children:[x("activity.openChat"),o.jsx(Dp,{})]})]}),o.jsxs("div",{className:"jv-activity-message-body",children:[j.content&&o.jsx(Uc,{text:j.content}),j.attachments.length>0&&o.jsx("div",{className:"jv-activity-message-files",children:j.attachments.map(S=>o.jsxs("a",{href:`/api/attachments/${S.id}`,download:S.name,children:[o.jsx(k0,{}),S.name]},S.id))}),j.source&&o.jsxs(Ae,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>i({kind:"history",id:j.source.historyId}),children:[x("activity.sentBy",{id:j.source.historyId}),o.jsx(Dp,{})]})]})]})}const NS=aN;function ES({className:e,children:a,showCloseButton:i=!0,...r}){return o.jsxs(rN,{children:[o.jsx(lN,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),o.jsxs(cN,{"data-slot":"dialog-content",className:an("fixed top-1/2 left-1/2 z-[81] flex max-h-[calc(100dvh-24px)] w-[min(720px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-background text-foreground shadow-lg outline-none",e),...r,children:[a,i&&o.jsx(pN,{className:"absolute top-4 right-4 rounded-sm p-1 text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring","aria-label":x("common.close"),children:o.jsx(ds,{className:"size-4"})})]})]})}function wg({className:e,...a}){return o.jsx("div",{"data-slot":"dialog-header",className:an("flex flex-col gap-2",e),...a})}function gf({className:e,...a}){return o.jsx(hN,{"data-slot":"dialog-title",className:an("text-lg font-semibold",e),...a})}function Uz({botId:e,botName:a,onBack:i,onOpenChat:r}){const[c,u]=w.useState([void 0]),d=c.at(-1),[f,m]=w.useState({items:[],nextBefore:null}),[v,y]=w.useState(!0),[p,b]=w.useState(""),[j,S]=w.useState(0),[k,C]=w.useState(null),E=w.useRef(null),M=w.useRef(0),T=w.useRef(null);w.useEffect(()=>{let A=!0;return y(!0),b(""),m({items:[],nextBefore:null}),E.current&&(E.current.scrollTop=0),R4.list(e,d).then(P=>{A&&m(P)}).catch(P=>{A&&b(it(P,"activity.loadFailed"))}).finally(()=>{A&&y(!1)}),()=>{A=!1}},[e,d,j]);const _=A=>{var P;k||(M.current=((P=E.current)==null?void 0:P.scrollTop)??0,T.current=document.activeElement),C(A)},z=()=>{if(!k){i();return}C(null),requestAnimationFrame(()=>{var A;E.current&&(E.current.scrollTop=M.current),(A=T.current)==null||A.focus({preventScroll:!0})})};return o.jsxs(o.Fragment,{children:[o.jsxs(wg,{className:"jv-bot-info-navigation",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(k?"activity.backToTimeline":"usage.back"),onClick:z,children:o.jsx(Xd,{})}),o.jsx(gf,{children:k?k.kind==="history"?"History":x("activity.chatRecord"):x("bot.activity")}),o.jsx("span",{className:"jv-bot-page-name",children:a})]}),o.jsxs("div",{className:"jv-activity",children:[o.jsxs("div",{className:"jv-activity-list",hidden:k!==null,children:[o.jsxs("div",{className:"jv-activity-toolbar",children:[o.jsx("span",{children:x("activity.newestFirst")}),o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),S(A=>A+1)},"aria-label":x("activity.refresh"),children:[o.jsx(C0,{}),x(v?"activity.reading":"usage.refresh")]})]}),o.jsxs("div",{className:"jv-activity-columns","aria-hidden":"true",children:[o.jsx("span",{children:x("activity.columnChat")}),o.jsx("span",{children:x("activity.columnTime")}),o.jsx("span",{children:"History"})]}),o.jsx("div",{className:"jv-activity-scroll",ref:E,children:v?o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.loading")}):p?o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:p}),o.jsx(Ae,{variant:"outline",size:"sm",onClick:()=>S(A=>A+1),children:x("common.retry")})]}):f.items.length?o.jsx(eA,{items:f.items,onSelect:_}):o.jsx("div",{className:"jv-activity-state jv-activity-empty",children:o.jsx("p",{children:x("activity.empty")})})}),o.jsxs("div",{className:"jv-activity-pagination",children:[o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:v||c.length===1,onClick:()=>u(A=>A.slice(0,-1)),children:[o.jsx(gj,{}),x("activity.newer")]}),o.jsx("span",{children:x("activity.page",{page:c.length})}),o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:v||f.nextBefore===null,onClick:()=>u(A=>[...A,f.nextBefore]),children:[x("activity.older"),o.jsx(al,{})]})]})]}),k&&o.jsx("section",{className:"jv-activity-detail","aria-label":x(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:o.jsx(Hz,{botId:e,selected:k,onSelect:_,onOpenChat:r})})]})]})}const qz={list:(e,a)=>Se(`/bots/${e}/usage?since=${a}`)},Fz=["today","7d","30d","all"],Vz=e=>e==="today"?x("usage.today"):e==="all"?x("usage.all"):x("usage.days",{count:e==="7d"?7:30}),yd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function $z(e){if(e==="all")return 0;const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()-(e==="7d"?6:e==="30d"?29:0)),a.getTime()}const ab=e=>zi(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),ib=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function Gz({botId:e,botName:a,onBack:i}){const[r,c]=w.useState("today"),[u,d]=w.useState(null),[f,m]=w.useState(""),[v,y]=w.useState(0);w.useEffect(()=>{let S=!0;return d(null),m(""),qz.list(e,$z(r)).then(k=>{S&&d(k.models)}).catch(k=>{S&&m(it(k,"usage.loadFailed"))}),()=>{S=!1}},[e,r,v]);const p=(u==null?void 0:u.filter(S=>S.cost!==null))??[],b=u&&Object.fromEntries(yd.map(([S])=>[S,u.reduce((k,C)=>k+C[S],0)])),j=p.length?ib(p.reduce((S,k)=>S+k.cost,0)):x("usage.unpriced");return o.jsxs(o.Fragment,{children:[o.jsxs(wg,{className:"jv-bot-info-navigation",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x("usage.back"),onClick:i,children:o.jsx(Xd,{})}),o.jsx(gf,{children:x("usage.title")}),o.jsx("span",{className:"jv-bot-page-name",children:a})]}),o.jsxs("div",{className:"jv-usage",children:[o.jsxs("div",{className:"jv-usage-toolbar",children:[o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("usage.range"),children:Fz.map(S=>o.jsx("button",{type:"button",role:"tab","aria-selected":r===S,onClick:()=>c(S),children:Vz(S)},S))}),o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(S=>S+1),"aria-label":x("usage.refreshLabel"),children:[o.jsx(C0,{}),x("usage.refresh")]})]}),o.jsx("div",{className:"jv-usage-scroll",children:f?o.jsxs("div",{className:"jv-usage-state",children:[o.jsx("p",{role:"alert",children:f}),o.jsx(Ae,{variant:"outline",size:"sm",onClick:()=>y(S=>S+1),children:x("usage.retry")})]}):u?u.length?o.jsxs(o.Fragment,{children:[o.jsxs("table",{className:"jv-usage-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:x("usage.model")}),yd.map(([S,k])=>o.jsx("th",{scope:"col",children:x(k)},S)),o.jsx("th",{scope:"col",children:x("usage.cost")})]})}),o.jsx("tbody",{children:u.map(S=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsxs("span",{className:"jv-usage-model",children:[o.jsx("strong",{children:S.model}),o.jsx("span",{children:S.provider})]})}),yd.map(([k,C])=>o.jsx("td",{"data-label":x(C),title:zi(S[k]),children:ab(S[k])},k)),o.jsx("td",{"data-label":x("usage.cost"),className:S.cost===null?"jv-usage-unpriced":void 0,title:S.cost===null?void 0:`$${S.cost.toFixed(4)}`,children:S.cost===null?x("usage.unpriced"):ib(S.cost)})]},`${S.provider}/${S.model}`))}),u.length>1&&b&&o.jsx("tfoot",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsx("strong",{children:x("usage.total")})}),yd.map(([S,k])=>o.jsx("td",{"data-label":x(k),title:zi(b[S]),children:ab(b[S])},S)),o.jsx("td",{"data-label":x("usage.cost"),className:p.length?void 0:"jv-usage-unpriced",children:j})]})})]}),p.length>0&&p.length<u.length&&o.jsx("p",{className:"jv-usage-note",children:x("usage.notePartial")})]}):o.jsx("div",{className:"jv-usage-state jv-usage-empty",children:o.jsx("p",{children:x("usage.empty")})}):o.jsx("p",{className:"jv-usage-state",role:"status",children:x("usage.loading")})})]})]})}const Va={gray:{hex:14079179,label:"color.gray"},blue:{hex:10470376,label:"color.blue"},green:{hex:11064750,label:"color.green"},amber:{hex:15778426,label:"color.amber"},rose:{hex:15642820,label:"color.rose"},violet:{hex:12759274,label:"color.violet"}},Yz=["normal","happy","sad","angry","dizzy"],TS=e=>{var a;return`#${(((a=Va[e])==null?void 0:a.hex)??Va.gray.hex).toString(16).padStart(6,"0")}`},Xz="modulepreload",Kz=function(e){return"/"+e},rb={},Vd=function(a,i,r){let c=Promise.resolve();if(i&&i.length>0){let d=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));c=d(i.map(v=>{if(v=Kz(v),v in rb)return;rb[v]=!0;const y=v.endsWith(".css"),p=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${p}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Xz,y||(b.as="script"),b.crossOrigin="",b.href=v,m&&b.setAttribute("nonce",m),document.head.appendChild(b),y)return new Promise((j,S)=>{b.addEventListener("load",j),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return c.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return a().catch(u)})};let lb;const yp=new Map;let ob=Promise.resolve();function Qz(){return lb??(lb=Promise.all([Vd(()=>import("./three.module-BdMZo7zQ.js"),[]),Vd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([e,a])=>{const i=new e.WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});a.configureRenderer(e,i);const{scene:r,camera:c,ground:u}=a.createStage(e),d=new a.CatFigure(e,Va.gray.hex);return r.add(d.root),a.frameCamera(c,1,3.3),{render(f,m,v,y,p){var b;return i.setSize(v,v,!1),d.setColor(((b=Va[f])==null?void 0:b.hex)??Va.gray.hex),d.setCrown(p),d.pose(m),u.visible=y,i.render(r,c),i.domElement.toDataURL("image/png")}}})),lb}function Zz(e,a,i,r=!1){const c=Math.round(i*Math.min(3,Math.max(1,window.devicePixelRatio||1))),u=`${e}:${a}:${c}:${r}`;let d=yp.get(u);return d||(d=ob.then(()=>Qz()).then(f=>f.render(e,a,c,i>=40,r)),ob=d.catch(()=>{}),yp.set(u,d),d.catch(()=>yp.delete(u))),d}function oo({color:e,mood:a="normal",size:i=36,badge:r,crown:c=!1}){const[u,d]=w.useState();return w.useEffect(()=>{let f=!0;return d(void 0),Zz(e,a,i,c).then(m=>{f&&d(m)}).catch(()=>{}),()=>{f=!1}},[e,a,i,c]),o.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${i}px`,"--jv-avatar-color":TS(e)},"aria-hidden":"true",children:[u?o.jsx("img",{src:u,alt:""}):o.jsx("span",{className:"jv-bot-avatar-tile"}),r==="working"&&o.jsxs("span",{className:"jv-typing",title:x("avatar.working"),children:[o.jsx("i",{}),o.jsx("i",{}),o.jsx("i",{})]}),r==="asking"&&o.jsx("span",{className:"jv-typing jv-asking",title:x("activity.asking"),children:"?"})]})}const gr=kT,vr=TT;function yr({className:e,children:a,...i}){return o.jsxs(NT,{"data-slot":"select-trigger",className:an("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50",e),...i,children:[a,o.jsx(AT,{asChild:!0,children:o.jsx(Li,{className:"size-4 opacity-50"})})]})}function xr({className:e,children:a,container:i,...r}){return o.jsx(DT,{container:i??void 0,children:o.jsx(OT,{"data-slot":"select-content",position:"popper",sideOffset:5,className:an("z-[100] max-h-[min(300px,70dvh)] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md border bg-popover bg-background p-1 text-foreground shadow-md",e),...r,children:o.jsx(UT,{children:a})})})}function sa({className:e,children:a,...i}){return o.jsxs(VT,{"data-slot":"select-item",className:an("relative flex cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50",e),...i,children:[o.jsx($T,{children:a}),o.jsx(YT,{"data-slot":"select-indicator",className:"absolute right-2",children:o.jsx(Qn,{className:"size-4"})})]})}const sb={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},Jz=(e,a)=>JSON.stringify([e,a]);function AS({bot:e,connections:a,onSaved:i,onManage:r}){const[c,u]=w.useState([]),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0),[b,j]=w.useState(!1),[S,k]=w.useState(""),[C,E]=w.useState(!1),[M,T]=w.useState(""),[_,z]=w.useState(-1),A=w.useRef(null),P=w.useRef(null),[H,U]=w.useState(null),O=w.useId();w.useEffect(()=>{let B=!0;return f(!0),v(""),he.modelOptions().then(F=>{B&&u(F.connections)}).catch(F=>{B&&v(it(F,"botModel.loadFailed"))}).finally(()=>{B&&f(!1)}),()=>{B=!1}},[a,y]);const G=c.flatMap(B=>B.models.map(F=>({...F,connectionId:B.id,connectionName:B.name,key:Jz(B.id,F.id)}))).sort((B,F)=>B.name.localeCompare(F.name,void 0,{numeric:!0})),q=G.find(B=>B.connectionId===e.connectionId&&B.id===e.modelId),Q=a.find(B=>B.id===e.connectionId),V=Q==null?void 0:Q.models.find(B=>B.id===e.modelId),Y=G.filter(B=>`${B.name} ${B.id} ${B.connectionName}`.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase())),K=c.map(B=>({...B,models:Y.filter(F=>F.connectionId===B.id)})).filter(B=>B.models.length),D=K.flatMap(B=>B.models),$=G.length>8,ne=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function R(B){E(B),T(""),z(-1)}async function le(B,F,se){R(!1),j(!0),k("");try{i(await he.selectBotModel(e.id,B,F,se,eo()))}catch(ye){k(it(ye,"botModel.switchFailed"))}finally{j(!1)}}function ie(B){var F;if(B.key==="ArrowDown"||B.key==="ArrowUp"){B.preventDefault();const se=B.key==="ArrowDown"?Math.min(_+1,D.length-1):Math.max(_-1,0);z(se),(F=document.getElementById(`${O}-${se}`))==null||F.scrollIntoView({block:"nearest"})}else if(B.key==="Enter"&&D[_]){B.preventDefault();const se=D[_];le(se.connectionId,se.id,e.thinkingLevel)}}return o.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":b||d,ref:B=>U((B==null?void 0:B.closest("[data-slot=dialog-content]"))??null),children:[o.jsxs("div",{className:"jv-bot-model-fields",children:[o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("usage.model")}),o.jsxs(Ww,{open:C,onOpenChange:R,children:[o.jsxs(e3,{className:"jv-model-trigger","aria-label":x("botModel.pick"),"aria-haspopup":"listbox",disabled:b||d||!!m,children:[o.jsx("span",{children:(q==null?void 0:q.name)??(V==null?void 0:V.name)??x(e.connectionId?"botModel.broken":"botModel.choose")}),b?o.jsx(qj,{className:"animate-spin"}):o.jsx(Li,{})]}),o.jsx(t3,{container:H,children:o.jsxs(n3,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,collisionBoundary:H,onOpenAutoFocus:B=>{var F;B.preventDefault(),(F=$?A.current:P.current)==null||F.focus()},onKeyDown:ie,children:[$&&o.jsxs("div",{className:"jv-model-search",children:[o.jsx(Mc,{}),o.jsx("input",{ref:A,role:"combobox","aria-label":x("botModel.filter"),"aria-expanded":"true","aria-controls":O,"aria-activedescendant":_>=0?`${O}-${_}`:void 0,placeholder:x("botModel.filterPlaceholder"),value:M,onChange:B=>{T(B.target.value),z(-1)},autoComplete:"off",spellCheck:!1})]}),o.jsxs("div",{ref:P,id:O,role:"listbox","aria-label":x("botModel.list"),tabIndex:-1,"aria-activedescendant":_>=0?`${O}-${_}`:void 0,className:"jv-model-options",children:[K.map(B=>o.jsxs("div",{role:"group","aria-label":B.name,children:[o.jsx("div",{className:"jv-model-group-label",children:B.name}),B.models.map(F=>{const se=D.indexOf(F),ye=F.connectionId===e.connectionId&&F.id===e.modelId;return o.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${O}-${se}`,"aria-selected":ye,"data-active":se===_||void 0,title:F.id,onClick:()=>void le(F.connectionId,F.id,e.thinkingLevel),children:[o.jsx("span",{className:"jv-option-check",children:ye&&o.jsx(Qn,{})}),o.jsx("span",{children:F.name})]},F.key)})]},B.id)),!D.length&&o.jsx("p",{className:"jv-menu-empty",children:x(G.length?"botModel.noMatch":"botModel.none")})]}),o.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{R(!1),r()},children:x("botModel.manage")})]})})]}),(q||Q)&&o.jsx("span",{className:"jv-field-note",children:(q==null?void 0:q.connectionName)??(Q==null?void 0:Q.displayName)})]}),o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("botModel.thinking")}),o.jsxs(gr,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:b||d||!q||!!m,onValueChange:B=>{e.connectionId&&le(e.connectionId,e.modelId,B)},children:[o.jsx(yr,{className:"jv-thinking-trigger","aria-label":x("botModel.pickThinking"),children:o.jsx(vr,{children:ne})}),o.jsx(xr,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(q==null?void 0:q.thinking.levels)??[]].map(B=>{const F=q==null?void 0:q.thinkingLevelMap[B],se=F&&F!==B?F:B;return o.jsx(sa,{value:B,children:o.jsxs("span",{className:"jv-thinking-option",children:[o.jsxs("span",{children:[se,F&&F!==B&&o.jsxs("small",{children:[" (",B,")"]})]}),o.jsx("small",{children:sb[B]&&x(sb[B])})]})},B)})})]})]})]}),d&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.loading")}),b&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.switching")}),m&&o.jsxs("p",{className:"jv-model-error",role:"alert",children:[m," ",o.jsx("button",{type:"button",onClick:()=>p(B=>B+1),children:x("common.retry")})]}),S&&o.jsx("p",{className:"jv-model-error",role:"alert",children:S})]})}const Wz={preparing:["environment.state.preparing","environment.hint.preparing"],running:["environment.state.running","environment.hint.running"],stopped:["environment.state.stopped","environment.hint.stopped"],failed:["environment.state.failed","environment.hint.failed"],unavailable:["environment.state.unavailable","environment.hint.unavailable"]};function eL({bot:e,onSaved:a}){const[i,r]=w.useState(!1),[c,u]=w.useState(""),{home:d,docker:f}=e.environment;async function m(y){if(!(y===d||i)){r(!0),u("");try{a(await he.setBotEnvironment(e.id,y))}catch(p){u(it(p,"environment.changeFailed"))}finally{r(!1)}}}const v=(y,p,b,j)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d===y,disabled:i||j,className:"jv-list-row jv-choice-row jv-env-option",onClick:()=>void m(y),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:p}),o.jsx("span",{children:b})]}),d===y&&o.jsx(Qn,{"aria-hidden":"true"})]},y);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-label":x("environment.title"),children:[v("computer",x("environment.computer"),x(f?"environment.computerHint":"environment.noDocker"),!f),v("host",x("environment.host"),x("environment.hostHint"),!1)]}),c&&o.jsx("p",{className:"jv-note-error",role:"alert",children:c})]})}function tL({bot:e,onSaved:a}){const[i,r]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,v]=w.useState(""),y=w.useId(),{computer:p,home:b,current:j,currentName:S,hostGranted:k,docker:C,machines:E=[]}=e.environment;async function M(U,O,G){r(U),v("");try{a(await O())}catch(q){v(it(q,G))}finally{r(null)}}const T=U=>{U!==b&&!i&&M("move",()=>he.setBotEnvironment(e.id,U),"environment.changeFailed")},_=U=>void M(U,()=>he.computer(e.id,U),"common.failed"),z=p==null?void 0:p.state,[A,P]=z?Wz[z]:[null,null],H=j===b?null:j==="ssh"?x("environment.awayMachine",{name:S??""}):x(j==="host"?"environment.awayHost":"environment.awayComputer");return o.jsxs("section",{className:"jv-section","aria-label":x("environment.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("environment.title")}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("environment.default")}),H&&o.jsx("span",{className:"jv-env-away",children:H})]}),o.jsx("div",{className:"jv-env-seg",role:"radiogroup","aria-label":x("environment.default"),children:["computer","host"].map(U=>o.jsx("button",{type:"button",role:"radio","aria-checked":b===U,disabled:!!i||U==="computer"&&!C,title:U==="computer"&&!C?x("environment.noDocker"):void 0,onClick:()=>T(U),children:x(U==="computer"?"environment.computer":"environment.host")},U))})]}),b==="computer"&&z&&A&&P&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-choice-row jv-env-disclosure","aria-expanded":c,"aria-controls":y,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("environment.details")})}),o.jsx("span",{className:"jv-status","data-ok":z==="running"||void 0,"data-busy":z==="preparing"||void 0,children:x(A)}),o.jsx(Li,{"aria-hidden":"true"})]}),c&&o.jsxs("div",{id:y,className:"jv-list-row jv-static-row jv-env-details",children:[o.jsxs("p",{children:[x("environment.sandboxAbout"),x(P)]}),z!=="unavailable"&&!d&&o.jsxs("div",{className:"jv-env-actions",children:[o.jsx(Ae,{type:"button",variant:"outline",size:"sm",disabled:!!i||z==="preparing",onClick:()=>z==="running"?f("stop"):_("start"),children:x(i==="start"?"environment.starting":i==="stop"?"environment.stopping":z==="running"?"environment.stop":"environment.start")}),o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",disabled:!!i||z==="preparing",onClick:()=>f("reset"),children:x("environment.reset")})]}),d&&o.jsxs("div",{className:"jv-env-confirm",role:"group","aria-label":x(`environment.${d}Title`,{name:e.name}),children:[o.jsx("strong",{children:x(`environment.${d}Title`,{name:e.name})}),o.jsx("p",{children:x(`environment.${d}Body`)}),o.jsxs("div",{className:"jv-env-confirm-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const U=d;f(null),_(U)},children:x(`environment.${d}Confirm`)})]})]})]})]})]}),(b==="computer"||E.length>0)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{className:"jv-env-heading",children:x("environment.external")}),o.jsxs("div",{className:"jv-list",role:"group","aria-label":x("environment.external"),children:[b==="computer"&&o.jsxs("button",{type:"button",role:"switch","aria-checked":k,disabled:!!i,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void M("grant",()=>he.grantHost(e.id,!k),"environment.accessFailed"),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("environment.host")})}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]}),E.map(U=>o.jsxs("button",{type:"button",role:"switch","aria-checked":U.granted,disabled:!!i,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void M("grant",()=>he.grantBotMachine(e.id,U.id,!U.granted),"environment.accessFailed"),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:U.name})}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]},U.id))]})]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function vt({className:e,type:a,...i}){return o.jsx("input",{type:a,"data-slot":"input",className:an("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...i})}function $d({className:e,...a}){return o.jsx("textarea",{"data-slot":"textarea",className:an("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...a})}const cb=(e,a)=>to(new Date(2e3,0,1,e,a)),_S=e=>ua(new Date(2023,0,1+e),{weekday:"long"}),MS=e=>`${x0(e)} ${to(e)}`;function nL(e){switch(e.kind){case"once":return x("tasks.schedule.once",{time:MS(e.at)});case"every":return e.minutes%60===0?x("tasks.schedule.hours",{count:e.minutes/60}):x("tasks.schedule.minutes",{count:e.minutes});case"daily":return x("tasks.schedule.daily",{time:cb(e.hour,e.minute)});case"weekly":return x("tasks.schedule.weekly",{day:_S(e.weekday),time:cb(e.hour,e.minute)})}}const rs=e=>String(e).padStart(2,"0"),ub=e=>{const a=new Date(e);return`${a.getFullYear()}-${rs(a.getMonth()+1)}-${rs(a.getDate())}T${rs(a.getHours())}:${rs(a.getMinutes())}`},aL=(e,a)=>`${rs(e)}:${rs(a)}`,iL=["once","every","daily","weekly"],RS=5;function rL(e){const a=Date.now()+36e5,i={at:ub(a-a%(300*1e3)),count:"30",unit:"minutes",time:"09:00",weekday:"1"};return e&&(e.kind==="once"&&(i.at=ub(e.at)),e.kind==="every"&&Object.assign(i,e.minutes%60===0?{count:String(e.minutes/60),unit:"hours"}:{count:String(e.minutes),unit:"minutes"}),(e.kind==="daily"||e.kind==="weekly")&&(i.time=aL(e.hour,e.minute)),e.kind==="weekly"&&(i.weekday=String(e.weekday))),i}function lL(e,a){const[i,r]=a.time.split(":").map(Number),c=Number.isInteger(i)&&Number.isInteger(r)?{hour:i,minute:r}:null;if(e==="once"){const u=new Date(a.at).getTime();return Number.isFinite(u)?{kind:e,at:u}:null}if(e==="every"){const u=Number(a.count)*(a.unit==="hours"?60:1);return Number.isInteger(u)&&u>=RS?{kind:e,minutes:u}:null}return c?e==="daily"?{kind:e,...c}:{kind:e,weekday:Number(a.weekday),...c}:null}function oL({task:e,busy:a,error:i,onSave:r,onDelete:c,onCancel:u}){const[d,f]=w.useState((e==null?void 0:e.name)??""),[m,v]=w.useState((e==null?void 0:e.instruction)??""),[y,p]=w.useState((e==null?void 0:e.schedule.kind)??"daily"),[b,j]=w.useState(()=>rL(e==null?void 0:e.schedule)),[S,k]=w.useState(!1),C=lL(y,b),E=T=>j(_=>({..._,...T}));function M(T){T.preventDefault(),C&&d.trim()&&m.trim()&&r({name:d.trim(),instruction:m.trim(),schedule:C})}return o.jsxs("form",{className:"jv-panel jv-task-editor",onSubmit:M,"aria-label":x(e?"tasks.editTitle":"tasks.newTitle"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.name")}),o.jsx(vt,{required:!0,maxLength:80,value:d,placeholder:x("tasks.namePlaceholder"),onChange:T=>f(T.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.instruction")}),o.jsx($d,{required:!0,maxLength:8e3,rows:4,value:m,placeholder:x("tasks.instructionPlaceholder"),onChange:T=>v(T.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.when")}),o.jsx("div",{className:"jv-env-seg jv-task-kinds",role:"radiogroup","aria-label":x("tasks.when"),children:iL.map(T=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===T,onClick:()=>p(T),children:x(`tasks.kind.${T}`)},T))}),o.jsxs("div",{className:"jv-task-when","data-kind":y,children:[y==="once"&&o.jsx(vt,{type:"datetime-local","aria-label":x("tasks.at"),value:b.at,onChange:T=>E({at:T.target.value})}),y==="every"&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"jv-task-label",children:x("tasks.everyCount")}),o.jsx(vt,{type:"number",min:b.unit==="hours"?1:RS,step:1,"aria-label":x("tasks.everyCount"),value:b.count,onChange:T=>E({count:T.target.value})}),o.jsxs(gr,{value:b.unit,onValueChange:T=>E({unit:T}),children:[o.jsx(yr,{"aria-label":x("tasks.everyCount"),children:o.jsx(vr,{})}),o.jsx(xr,{className:"jv-select-menu",children:["minutes","hours"].map(T=>o.jsx(sa,{value:T,children:x(`tasks.unit.${T}`)},T))})]})]}),y==="weekly"&&o.jsxs(gr,{value:b.weekday,onValueChange:T=>E({weekday:T}),children:[o.jsx(yr,{"aria-label":x("tasks.weekday"),children:o.jsx(vr,{})}),o.jsx(xr,{className:"jv-select-menu",children:[1,2,3,4,5,6,0].map(T=>o.jsx(sa,{value:String(T),children:_S(T)},T))})]}),(y==="daily"||y==="weekly")&&o.jsx(vt,{type:"time","aria-label":x("tasks.time"),value:b.time,onChange:T=>E({time:T.target.value})})]}),y==="every"&&!C&&o.jsx("small",{className:"jv-hint",children:x("tasks.minimum")})]}),i&&o.jsx("p",{className:"jv-note-error",role:"alert",children:i}),S&&c&&o.jsxs("div",{className:"jv-env-confirm jv-task-confirm",role:"group","aria-label":x("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""}),children:[o.jsx("strong",{children:x("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""})}),o.jsx("p",{children:x("tasks.deleteBody")}),o.jsxs("div",{className:"jv-env-confirm-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(!1),children:x("common.cancel")}),o.jsx(Ae,{type:"button",variant:"ghost",className:"jv-task-delete",size:"sm",disabled:a,onClick:c,children:x("tasks.delete")})]})]}),o.jsxs("div",{className:"jv-form-footer",children:[o.jsx("div",{className:"jv-task-editor-actions",children:c&&o.jsx(Ae,{type:"button",variant:"ghost",className:"jv-task-delete",disabled:a,onClick:()=>k(!0),children:x("tasks.delete")})}),o.jsxs("div",{className:"jv-task-editor-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",onClick:u,children:x("common.cancel")}),o.jsx(Ae,{type:"submit",className:"jv-primary",disabled:a||!C||!d.trim()||!m.trim(),children:x("common.save")})]})]})]})}function sL({bot:e,runs:a}){const[i,r]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(!1),[m,v]=w.useState(""),[y,p]=w.useState("");w.useEffect(()=>{let _=!0;return he.tasks(e.id).then(z=>{_&&r(z.tasks)}).catch(z=>{_&&v(it(z,"tasks.loadFailed"))}),()=>{_=!1}},[e.id,a]);const b=_=>r(z=>(z??[]).some(A=>A.id===_.id)?z.map(A=>A.id===_.id?_:A):[...z??[],_]);function j(_){v(""),p(""),u(_)}async function S(_){f(!0),p("");try{b(c==="new"||!c?await he.createTask(e.id,_):await he.updateTask(e.id,c.id,_)),u(null)}catch(z){p(it(z,"tasks.saveFailed"))}finally{f(!1)}}async function k(_){f(!0),v("");try{await _()}catch(z){v(it(z,"tasks.changeFailed"))}finally{f(!1)}}const C=_=>k(async()=>b(await he.setTaskOn(e.id,_.id,_.state!=="active"))),E=_=>k(async()=>{await he.deleteTask(e.id,_.id),r(z=>(z==null?void 0:z.filter(A=>A.id!==_.id))??null),u(null)}),M=_=>_.state==="active"?_.schedule.kind==="once"||!_.nextRunAt?"":x("tasks.next",{time:MS(_.nextRunAt)}):x(_.state==="done"?"tasks.done":"tasks.paused"),T=_=>[nL(_.schedule),M(_)].filter(Boolean).join(" · ");return o.jsxs("section",{className:"jv-section","aria-label":x("tasks.title"),children:[o.jsxs("div",{className:"jv-task-head",children:[o.jsx("h3",{className:"jv-section-title",children:x("tasks.title")}),!c&&o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:d||i===null,onClick:()=>j("new"),children:[o.jsx(sl,{}),x("tasks.add")]})]}),c?o.jsx(oL,{task:c==="new"?void 0:c,busy:d,error:y,onSave:_=>void S(_),onCancel:()=>u(null),...c==="new"?{}:{onDelete:()=>void E(c)}}):i&&o.jsx("div",{className:"jv-list",children:i.length===0?o.jsx("div",{className:"jv-list-row jv-static-row",children:o.jsx("span",{className:"jv-row-text",children:o.jsx("span",{children:x("tasks.empty")})})}):i.map(_=>o.jsxs("div",{className:"jv-task-row","data-state":_.state,children:[o.jsx("button",{type:"button",className:"jv-list-row jv-task-open","aria-label":_.name,onClick:()=>j(_),children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:_.name}),o.jsx("span",{children:T(_)})]})}),_.state!=="done"&&o.jsx("button",{type:"button",role:"switch","aria-checked":_.state==="active","aria-label":x("tasks.toggle",{name:_.name}),disabled:d,className:"jv-env-access jv-task-switch",onClick:()=>void C(_),children:o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})})]},_.id))}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function cL(){const[e,a]=w.useState(!1),i=r=>c=>{c.pointerType==="mouse"&&a(r)};return o.jsxs(Ww,{open:e,onOpenChange:a,children:[o.jsx(e3,{className:"jv-context-stale",title:"","aria-label":x("bot.contextStale"),onPointerEnter:i(!0),onPointerLeave:i(!1),children:o.jsx(N0,{"aria-hidden":"true"})}),o.jsx(t3,{children:o.jsx(n3,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:r=>r.preventDefault(),children:x("bot.contextStale")})})]})}const uL={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function dL({bot:e,status:a,connections:i,chats:r,onSaved:c,onManageModels:u,onClose:d,onOpenChat:f,onOpenSubscription:m}){const[v,y]=w.useState("info"),[p,b]=w.useState(e.name),[j,S]=w.useState(e.description),[k,C]=w.useState(e.systemPrompt),[E,M]=w.useState(!1),[T,_]=w.useState(null),[z,A]=w.useState(null),[P,H]=w.useState(null),[U,O]=w.useState(""),[G,q]=w.useState(!1),[Q,V]=w.useState(null);w.useEffect(()=>{let ie=!0;return he.botSubscriptions(e.id).then(B=>{ie&&V(B.chats)}).catch(()=>{}),()=>{ie=!1}},[e.id]),w.useEffect(()=>{if(!G)return;const ie=setTimeout(()=>q(!1),1500);return()=>clearTimeout(ie)},[G]);const Y=p!==e.name||j!==e.description||k!==e.systemPrompt,K=(a==null?void 0:a.status)??"stop",D=a==null?void 0:a.context;async function $(ie){H(ie),O("");try{await he.controlBot(e.id,ie)}catch(B){O(it(B,"common.failed"))}finally{H(null)}}async function ne(ie){ie.preventDefault(),M(!0),_(null);try{c(await he.saveBot(e.id,{name:p,description:j,systemPrompt:k})),_({kind:"ok",text:x("bot.saved")})}catch(B){_({kind:"error",text:it(B,"common.saveFailed")})}finally{M(!1)}}async function R(ie){if(ie!==e.color){M(!0),A(null);try{c(await he.setBotColor(e.id,ie))}catch(B){A({kind:"error",text:it(B,"bot.changeFailed")})}finally{M(!1)}}}const le=ie=>ie&&o.jsx("p",{className:ie.kind==="error"?"jv-note-error":"jv-note-ok",role:ie.kind==="error"?"alert":"status",children:ie.text});return o.jsx(NS,{open:!0,onOpenChange:ie=>{ie||d()},children:o.jsx(ES,{className:`jv-bot-info jv-ui ${v==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:v==="activity"?o.jsx(Uz,{botId:e.id,botName:e.name,onBack:()=>y("info"),onOpenChat:f}):v==="usage"?o.jsx(Gz,{botId:e.id,botName:e.name,onBack:()=>y("info")}):o.jsxs(o.Fragment,{children:[o.jsx(wg,{className:"jv-dialog-header",children:o.jsx(gf,{children:x("entry.botInfo")})}),o.jsxs("div",{className:"jv-bot-scroll",children:[o.jsxs("section",{className:"jv-bot-hero",children:[o.jsx(oo,{color:e.color,mood:e.mood,size:72,crown:e.agent}),o.jsxs("div",{className:"jv-bot-identity",children:[o.jsx("strong",{children:e.name}),e.description&&o.jsx("span",{children:e.description}),o.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":x("bot.color"),children:Object.keys(Va).map(ie=>o.jsx("button",{type:"button",role:"radio","aria-checked":e.color===ie,"aria-label":x(Va[ie].label),title:x(Va[ie].label),disabled:E,style:{background:TS(ie)},onClick:()=>void R(ie)},ie))}),le(z)]})]}),e.agent&&o.jsxs("section",{className:"jv-section","aria-label":x("agent.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("agent.title")}),o.jsxs("div",{className:"jv-panel jv-agent-about",children:[o.jsx("p",{children:x("agent.intro",{name:e.name})}),o.jsx("ul",{children:["agent.create","agent.model","agent.run","agent.delete"].map(ie=>o.jsx("li",{children:x(ie)},ie))})]})]}),o.jsxs("section",{className:"jv-section","aria-label":x("usage.model"),children:[o.jsx("h3",{className:"jv-section-title",children:x("usage.model")}),o.jsxs("div",{className:"jv-panel",children:[o.jsx(AS,{bot:e,connections:i,onSaved:c,onManage:u}),D&&o.jsxs("div",{className:"jv-context",title:x("bot.contextHint"),children:[o.jsxs("div",{className:"jv-context-label",children:[o.jsx("span",{children:x("bot.context")}),o.jsxs("span",{"data-stale":D.stale&&D.tokens!==null||void 0,children:[D.stale&&D.tokens!==null&&o.jsx(cL,{}),D.tokens===null?x("bot.unknown"):x("bot.tokens",{used:zi(D.tokens),window:zi(D.contextWindow)})]})]}),D.tokens!==null&&o.jsx("div",{className:"jv-context-bar",children:o.jsx("span",{style:{width:`${Math.min(100,Math.max(1,D.tokens/D.contextWindow*100))}%`}})})]})]})]}),o.jsxs("section",{className:"jv-section","aria-label":x("bot.profile"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.profile")}),o.jsxs("form",{className:"jv-panel",onSubmit:ie=>void ne(ie),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("info.name")}),o.jsx(vt,{id:"jarvy-bot-name",required:!0,maxLength:80,value:p,onChange:ie=>b(ie.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("bot.description")}),o.jsx($d,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:j,onChange:ie=>S(ie.target.value),placeholder:x("bot.descriptionPlaceholder")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:"Persona"}),o.jsx($d,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:k,onChange:ie=>C(ie.target.value),placeholder:x("bot.personaPlaceholder")}),o.jsx("small",{className:"jv-hint",children:x("bot.personaHint")})]}),o.jsxs("div",{className:"jv-form-footer",children:[le((T==null?void 0:T.kind)==="error"||!Y?T:null)??(Y?o.jsx("p",{className:"jv-hint",children:x("bot.unsaved")}):o.jsx("span",{})),o.jsx(Ae,{type:"submit",className:"jv-primary",disabled:E||!Y,children:x(E?"bot.saving":"common.save")})]})]})]}),o.jsx(tL,{bot:e,onSaved:c}),o.jsx(sL,{bot:e,runs:`${K}:${(a==null?void 0:a.runId)??""}`}),o.jsxs("section",{className:"jv-section","aria-label":x("bot.runtime"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.runtime")}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("bot.status")})}),o.jsx("span",{className:"jv-status","data-ok":K!=="stop"||void 0,"data-busy":K==="running"||void 0,children:x(uL[K])}),K==="running"&&o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",disabled:!!P,onClick:()=>void $("abort"),children:x(P==="abort"?"bot.aborting":"bot.abort")}),o.jsx(Ae,{type:"button",variant:"outline",size:"sm",disabled:!!P||!e.connectionId,onClick:()=>void $(K==="stop"?"start":"stop"),children:x(P==="start"?"bot.starting":P==="stop"?"bot.stopping":K==="stop"?"bot.start":"bot.stop")})]}),o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.workspace")}),o.jsx("code",{title:e.workspacePath,children:e.workspacePath})]}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(G?"ui.copied":"bot.copyWorkspace"),onClick:()=>void Hc(e.workspacePath).then(ie=>q(ie)),children:G?o.jsx(Qn,{}):o.jsx(Kd,{})})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("activity"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(IC,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("bot.activity")})}),o.jsx(al,{className:"jv-row-chevron"})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("usage"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(uC,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("usage.title")})}),o.jsx(al,{className:"jv-row-chevron"})]})]}),U&&o.jsx("p",{className:"jv-note-error",role:"alert",children:U})]}),Q&&o.jsxs("section",{className:"jv-section","aria-label":x("bot.subscriptions"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.subscriptions")}),o.jsx("div",{className:"jv-list",children:Q.length===0?o.jsx("div",{className:"jv-list-row jv-static-row",children:o.jsx("span",{className:"jv-row-text",children:o.jsx("span",{children:x("bot.noSubscriptions")})})}):Q.map(ie=>{var B;return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>m(ie),children:[o.jsx("span",{className:"jv-row-icon",children:ie.type==="thread"?o.jsx(Zj,{}):o.jsx(SC,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:ie.title}),o.jsx("span",{children:ie.type==="thread"?x("bot.threadIn",{channel:((B=r.find(F=>F.id===ie.parentId))==null?void 0:B.title)??""}):x("info.menu")})]}),o.jsx(al,{className:"jv-row-chevron"})]},ie.id)})})]})]})]})})})}function DS({id:e,value:a,sections:i,onChange:r}){const[c,u]=w.useState(null);return o.jsxs(gr,{value:a??"none",onValueChange:d=>r(d==="none"?null:d),children:[o.jsx(yr,{id:e,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:o.jsx(vr,{})}),o.jsxs(xr,{className:"jv-select-menu",position:"popper",sideOffset:4,container:c,children:[o.jsx(sa,{value:"none",children:x("info.noSection")}),i.map(d=>o.jsx(sa,{value:d.id,children:d.name},d.id))]})]})}const fL=1024*1024,hL=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],Ql=e=>`/api/attachments/${e.id}`,OS=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function vf(e){const a=OS(e),i=e.mimeType.toLowerCase();return a==="svg"||i==="image/svg+xml"?"svg":i.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(a)?"image":i.startsWith("video/")?"video":i.startsWith("audio/")?"audio":["webm","mp4","mov"].includes(a)?"video":["mp3","wav","ogg"].includes(a)?"audio":["html","htm"].includes(a)||i==="text/html"?"html":["md","markdown"].includes(a)?"markdown":i.startsWith("text/")||hL.includes(a)?"text":"download"}const bc=e=>e==="image"||e==="svg",zS=e=>e==="video"||e==="audio",LS={image:"files.kindImage",svg:"files.kindSvg",video:"files.kindVideo",audio:"files.kindAudio",html:"files.kindHtml",markdown:"files.kindMarkdown",text:"files.kindText",download:"files.kindFile"};function BS(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}async function IS(e,a){const i=await fetch(Ql(e),{signal:a,credentials:"same-origin"});if(!i.ok)throw new Error(i.status===404?x("files.gone"):x("files.readFailed",{status:i.status}));return i.text()}async function PS(e,a){return vf(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await IS(e,a))}`:Ql(e)}const db=e=>`/api/attachments/${e.id}/run`;function mL(e){const a=new DOMParser().parseFromString(e,"text/html");let i=a.querySelectorAll("script").length;const r=new Set;return a.querySelectorAll("*").forEach(c=>{for(const u of[...c.attributes])if(u.name.startsWith("on"))i++;else if(/^\s*javascript:/i.test(u.value)&&["href","src","action","formaction","xlink:href"].includes(u.name))i++;else if(["src","href"].includes(u.name)&&c.tagName!=="A")try{const d=new URL(u.value);(d.protocol==="http:"||d.protocol==="https:")&&r.add(d.host)}catch{}}),i?{count:i,hosts:[...r]}:null}function pL(e){const a=new DOMParser().parseFromString(e,"text/html");return a.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(i=>i.remove()),a.querySelectorAll("*").forEach(i=>{for(const r of[...i.attributes])(r.name.startsWith("on")||["href","xlink:href","srcset","action","formaction","target","autofocus","contenteditable"].includes(r.name)||r.name==="src"&&!r.value.startsWith("data:image/"))&&i.removeAttribute(r.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(i.tagName)&&i.setAttribute("disabled","")}),`<!doctype html><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; form-action 'none'; base-uri 'none'"><meta charset="utf-8">${a.documentElement.outerHTML}`}function gL({file:e,onSize:a}){const[i,r]=w.useState(),[c,u]=w.useState(!1);return w.useEffect(()=>{const d=new AbortController;return u(!1),PS(e,d.signal).then(r).catch(()=>{d.signal.aborted||u(!0)}),()=>d.abort()},[e.id]),c?o.jsx("span",{className:"ui-broken-image",children:o.jsx(Be,{name:"image"})}):i?o.jsx("img",{src:i,alt:e.name,loading:"lazy",onError:()=>u(!0),onLoad:d=>{const{naturalWidth:f,naturalHeight:m}=d.currentTarget;f&&m&&a({width:f,height:m})}}):o.jsx(Be,{name:"image"})}function vL({file:e,onOpen:a}){const[i,r]=w.useState(),c=vf(e),u=bc(c),d=zS(c),f=OS(e).toUpperCase(),m=u&&i?{"--image-w":`${i.width}px`,"--image-ratio":`${i.width/i.height}`}:void 0;return o.jsxs("div",{className:`ui-message-file ${u?"ui-message-image":""}`,"data-sized":m?"":void 0,style:m,children:[o.jsxs("button",{type:"button",className:"ui-message-open",onClick:a,"aria-label":x("files.preview",{name:e.name}),children:[u?o.jsx("span",{className:"ui-image-frame",children:o.jsx(gL,{file:e,onSize:r})}):o.jsx("span",{className:"ui-file-icon","data-kind":d?c:void 0,children:o.jsx(Be,{name:d?`file-${c}`:"file"})}),o.jsxs("span",{className:"ui-file-copy",children:[o.jsx("strong",{title:e.name,children:e.name}),o.jsxs("small",{children:[d?`${x(LS[c])} · `:"",f?`${f} · `:"",BS(e.size)]})]})]}),o.jsx("a",{className:"ui-iconbtn",href:Ql(e),download:e.name,"aria-label":x("files.download",{name:e.name}),title:x("files.download",{name:e.name}),children:o.jsx(Be,{name:"cloud-download"})})]})}function HS({files:e,onOpen:a}){const i=e.some(r=>bc(vf(r)));return o.jsx("div",{className:`ui-message-files ${i?"ui-has-images":""}`,children:e.map((r,c)=>o.jsx(vL,{file:r,onOpen:()=>a(c)},r.id))})}function yL({message:e,onSettled:a}){var z;const i=e.question,r=i.secret,[c,u]=w.useState(""),[d,f]=w.useState(!1),[m,v]=w.useState(!1),[y,p]=w.useState("always"),[b,j]=w.useState(!1),[S,k]=w.useState("");if(i.state!=="pending"){const A=((z=i.answer)==null?void 0:z.selected[0])===1?"once":"always",P=i.state==="answered"?x(A==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:r.name}):x(i.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:r.name});return o.jsxs("p",{className:"jv-question-done","data-state":i.state,title:`${P}
548
+ ${r.purpose}`,children:[i.state==="answered"?o.jsx(Qn,{"aria-hidden":"true"}):o.jsx(S0,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:P}),o.jsx("span",{className:"jv-question-asked",children:r.purpose})]})}const C=r.needsValue||m,E=c.length>0&&c.length<8;async function M(A){if(!b){j(!0),k("");try{a(await A())}catch(P){k(it(P,"question.failed"))}finally{j(!1)}}}const T=()=>M(()=>he.fulfilSecret(e.chatId,e.id,{scope:y,...C?{value:c}:{}})),_=()=>M(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"}));return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":x("secretCard.title",{name:r.name}),"aria-busy":b||void 0,onSubmit:A=>{A.preventDefault(),(!C||c)&&T()},children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(Pj,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:"jv-question-title jv-secret-request-name",children:r.name}),o.jsx("p",{className:"jv-question-detail",children:r.purpose})]})]}),o.jsxs("div",{className:"jv-question-body",children:[!window.isSecureContext&&o.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[o.jsx(N0,{"aria-hidden":"true"}),x("secretCard.insecure")]}),r.exists&&!r.needsValue&&o.jsxs("p",{className:"jv-secret-request-note",children:[x("secretCard.exists"),o.jsx("button",{type:"button",className:"jv-secret-request-link",onClick:()=>{v(!m),u("")},children:x(m?"secretCard.keepValue":"secretCard.replace")})]}),r.exists&&r.needsValue&&o.jsx("p",{className:"jv-secret-request-note",children:x("secretCard.unreadable")}),C&&o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:x("secretCard.value")}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:d?"text":"password",autoComplete:"new-password",spellCheck:!1,autoFocus:!0,placeholder:x("secretCard.valuePlaceholder"),value:c,disabled:b,onChange:A=>u(A.target.value)}),o.jsx("button",{type:"button","aria-label":x(d?"secrets.hideValue":"secrets.showValue"),onClick:()=>f(!d),children:d?o.jsx(Qd,{}):o.jsx(Zd,{})})]}),o.jsx("small",{"data-short":E||void 0,children:x(E?"secrets.shortValue":"secretCard.valueHint")})]}),o.jsxs("div",{className:"jv-secret-request-scope",children:[o.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":x("secretCard.scope"),children:["always","once"].map(A=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===A,disabled:b,onClick:()=>p(A),children:x(A==="always"?"secretCard.always":"secretCard.once")},A))}),o.jsx("small",{children:x(y==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]}),S&&o.jsx("p",{className:"jv-question-error",role:"alert",children:S})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:b,onClick:()=>void _(),children:x("secretCard.decline")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:b||C&&!c,children:x(C?"secretCard.saveAllow":"secretCard.allow")})]})]})}function Sg({publicKey:e}){const[a,i]=w.useState(!1);return w.useEffect(()=>{if(!a)return;const r=setTimeout(()=>i(!1),1500);return()=>clearTimeout(r)},[a]),o.jsxs("div",{className:"jv-machine-key",children:[o.jsx("code",{children:e}),o.jsxs("button",{type:"button",className:"ui-button jv-machine-copy","aria-label":x("machines.copy"),onClick:()=>void Hc(e).then(i),children:[a?o.jsx(Qn,{"aria-hidden":"true"}):o.jsx(Kd,{"aria-hidden":"true"}),o.jsx("span",{children:x(a?"machines.copied":"machines.copy")})]})]})}function US(e){const[a,i]=w.useState(null),[r,c]=w.useState(null);return w.useEffect(()=>{if(!e||a)return;let u=!0;return he.prepareMachineKey().then(d=>{u&&i(d)}).catch(d=>{u&&c(it(d))}),()=>{u=!1}},[e,a]),{key:a,error:r,renew:()=>{i(null),c(null)}}}function xL({message:e,onSettled:a}){const i=e.question,r=i.machine,[c,u]=w.useState(""),[d,f]=w.useState(!1),[m,v]=w.useState(!1),[y,p]=w.useState(""),[b,j]=w.useState("password"),S=US(i.state==="pending"&&!r.existing&&b==="key"),k=`${r.user}@${r.host}${r.port===22?"":`:${r.port}`}`;if(i.state!=="pending"){const z=x(i.state==="answered"?r.existing?"machineCard.granted":"machineCard.added":i.state==="dismissed"?"machineCard.declined":"machineCard.ignored",{name:r.name});return o.jsxs("p",{className:"jv-question-done","data-state":i.state,title:`${z}
549
+ ${r.purpose}`,children:[i.state==="answered"?o.jsx(Qn,{"aria-hidden":"true"}):o.jsx(S0,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:z}),o.jsx("span",{className:"jv-question-asked",children:r.purpose})]})}async function C(z){if(!m){v(!0),p("");try{a(await z())}catch(A){A instanceof hr&&A.code==="ssh_key_expired"&&S.renew(),p(it(A,"question.failed"))}finally{v(!1)}}}const E=!r.existing,M=!E||(b==="key"?!!S.key:!!c),T=()=>C(()=>he.fulfilMachine(e.chatId,e.id,b==="key"&&S.key?{keyId:S.key.keyId}:{password:c})),_=()=>C(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"}));return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":x("machineCard.title",{name:r.name}),"aria-busy":m||void 0,onSubmit:z=>{z.preventDefault(),M&&T()},children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(m4,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:"jv-question-title",children:r.name}),o.jsx("p",{className:"jv-question-detail",children:r.purpose})]})]}),o.jsxs("div",{className:"jv-question-body",children:[o.jsxs("p",{className:"jv-machine-where",children:[o.jsx("code",{children:k}),r.directory&&o.jsx("code",{children:r.directory})]}),r.existing?o.jsx("p",{className:"jv-secret-request-note",children:x("machineCard.existing")}):o.jsxs(o.Fragment,{children:[!window.isSecureContext&&o.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[o.jsx(N0,{"aria-hidden":"true"}),x("secretCard.insecure")]}),o.jsxs("div",{className:"jv-machine-card-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:r.hostKeys.fingerprints.map(z=>o.jsx("code",{children:z},z))}),o.jsx("small",{children:x("machines.fingerprintHint")})]}),o.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":x("machines.login"),children:["password","key"].map(z=>o.jsx("button",{type:"button",role:"radio","aria-checked":b===z,disabled:m,onClick:()=>{j(z),p("")},children:x(z==="password"?"machines.byPassword":"machines.byKey")},z))}),b==="password"?o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:x("machines.password")}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:d?"text":"password",autoComplete:"new-password",spellCheck:!1,value:c,disabled:m,onChange:z=>u(z.target.value)}),o.jsx("button",{type:"button","aria-label":x(d?"secrets.hideValue":"secrets.showValue"),onClick:()=>f(!d),children:d?o.jsx(Qd,{}):o.jsx(Zd,{})})]}),o.jsx("small",{children:x("machines.passwordHint")})]}):o.jsxs("div",{className:"jv-machine-card-field",children:[o.jsx("span",{children:x("machines.publicKey")}),S.key?o.jsx(Sg,{publicKey:S.key.publicKey}):S.error?o.jsx("p",{className:"jv-question-error",role:"alert",children:S.error}):o.jsx("small",{children:"…"}),o.jsx("small",{children:x("machines.keyHint",{user:r.user})})]})]}),y&&o.jsx("p",{className:"jv-question-error",role:"alert",children:y})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:m,onClick:()=>void _(),children:x("machineCard.decline")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:m||!M,children:x(E?b==="key"?m?"machines.verifying":"machines.verify":m?"machines.connecting":"machineCard.add":"machineCard.allow")})]})]})}const fb=e=>String.fromCharCode(65+e),hb=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function qS(e){const{message:a}=e,{secret:i,machine:r}=a.question;return i?o.jsx(yL,{message:{...a,question:{...a.question,secret:i}},onSettled:e.onSettled}):r?o.jsx(xL,{message:{...a,question:{...a.question,machine:r}},onSettled:e.onSettled}):o.jsx(bL,{...e})}function bL({message:e,keyboard:a,onSettled:i}){var M,T;const r=e.question,c=r.state==="pending",u=w.useId(),[d,f]=w.useState([]),[m,v]=w.useState(""),[y,p]=w.useState(!1),[b,j]=w.useState("");async function S(_){if(!(y||!c)){p(!0),j("");try{i(await he.answerQuestion(e.chatId,e.id,_))}catch(z){j(it(z,"question.failed"))}finally{p(!1)}}}const k=_=>{if(!r.multiple){S({action:"answer",selected:[_]});return}f(z=>z.includes(_)?z.filter(A=>A!==_):[...z,_])},C=()=>void S({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),E=()=>{m.trim()&&(r.multiple?C():S({action:"answer",selected:[],custom:m.trim()}))};if(w.useEffect(()=>{if(!a||!c)return;const _=z=>{if(z.defaultPrevented||z.metaKey||z.ctrlKey||z.altKey||z.key.length!==1||hb(z.target)||hb(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const A=z.key.toUpperCase().charCodeAt(0)-65;A<0||A>=r.options.length||(z.preventDefault(),k(A))};return document.addEventListener("keydown",_,!0),()=>document.removeEventListener("keydown",_,!0)}),!c){const _=r.state==="answered"?[...(((M=r.answer)==null?void 0:M.selected)??[]).map(z=>{var A;return((A=r.options[z])==null?void 0:A.label)??""}),...(T=r.answer)!=null&&T.custom?[r.answer.custom]:[]].filter(Boolean).join(x("common.listSeparator")):null;return o.jsxs("p",{className:"jv-question-done","data-state":r.state,title:`${r.question}
550
+ ${_===null?x("question.dismissed"):x("question.chose",{answer:_})}`,children:[_===null?o.jsx(S0,{"aria-hidden":"true"}):o.jsx(Qn,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:_===null?x("question.dismissed"):b0("question.chose",{answer:o.jsx("strong",{children:_})})}),o.jsx("span",{className:"jv-question-asked",children:r.question})]})}return o.jsxs("div",{className:"jv-question",role:"group","aria-labelledby":u,"aria-busy":y||void 0,children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(Gj,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{id:u,className:"jv-question-title",children:r.question}),r.detail&&o.jsx("p",{className:"jv-question-detail",children:r.detail})]}),o.jsx("button",{type:"button",className:"jv-question-dismiss","aria-label":x("question.dismissLabel"),title:x("question.dismiss"),disabled:y,onClick:()=>void S({action:"dismiss"}),children:o.jsx(ds,{"aria-hidden":"true"})})]}),o.jsxs("div",{className:"jv-question-body",children:[o.jsx("div",{className:"jv-question-options",role:r.multiple?"group":void 0,"aria-label":r.multiple?x("question.multiple"):void 0,children:r.options.map((_,z)=>{const A=d.includes(z);return o.jsxs("button",{type:"button",className:"jv-question-option","data-style":_.style,"data-on":A||void 0,"aria-pressed":r.multiple?A:void 0,"aria-keyshortcuts":a?fb(z).toLowerCase():void 0,disabled:y,onClick:()=>k(z),children:[o.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:A?o.jsx(Qn,{}):fb(z)}),o.jsxs("span",{className:"jv-question-copy",children:[o.jsx("strong",{children:_.label}),_.description&&o.jsx("small",{children:_.description})]})]},_.label)})}),b&&o.jsx("p",{className:"jv-question-error",role:"alert",children:b})]}),(r.allowCustom||r.multiple)&&o.jsxs("div",{className:"jv-question-foot",children:[r.allowCustom&&o.jsx("input",{className:"jv-question-custom",value:m,maxLength:2e3,placeholder:x(r.multiple?"question.note":"question.own"),"aria-label":x("question.ownLabel"),disabled:y,onChange:_=>v(_.target.value),onKeyDown:_=>{_.key==="Enter"&&!_.nativeEvent.isComposing&&(_.preventDefault(),E())}}),r.multiple?o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:C,children:d.length?x("question.confirmCount",{count:d.length}):x("question.confirm")}):o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!m.trim(),onClick:E,children:x("question.send")})]})]})}function Hi(e){return e?e.deleted?x("member.deleted",{name:e.name}):e.name:x("member.unknown")}const jL={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},FS=e=>x(jL[e??""]??"activity.running"),oi=e=>e.filter(a=>!a.deleted);function wL(e){const a=new Set(e.map(r=>r.toLowerCase()));let i=x("bot.newName");for(let r=2;a.has(i.toLowerCase());r++)i=x("bot.newNameN",{n:r});return i}const xp=/[\p{Script=Latin}\p{Nd}_]/u;function kg(e,a){const i=e.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),r=i.toLowerCase(),c=[...a].sort((d,f)=>f.name.length-d.name.length),u=[];for(let d=r.indexOf("@");d>=0;d=r.indexOf("@",d+1)){if(d>0&&xp.test(i[d-1]))continue;const f=c.find(m=>{const v=m.name.toLowerCase();if(!v||!r.startsWith(v,d+1))return!1;const y=i[d+1+v.length];return!(y&&xp.test(y)&&xp.test(v.at(-1)))});f&&(u.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return u}function SL(e,a,i){let r="",c=0;for(const u of kg(e,a))r+=e.slice(c,u.at)+`[${e.slice(u.at,u.at+u.length)}](${u.member.id===i?"#mention-me":"#mention"})`,c=u.at+u.length;return r+e.slice(c)}const VS=/\[\[q(\d+)\]\]/g,d0=(e,a=40)=>{const i=e.replace(/\s+/g," ").trim();return i.length>a?`${i.slice(0,a)}…`:i};function Cg(e){return e.content.replace(VS,(a,i)=>{const r=e.quotes[Number(i)-1];return r?x("quote.inline",{text:r.text}):a})}function ys(e){return Cg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||x("common.attachment")}function $S({message:e,members:a,me:i,onJump:r}){const c=SL(e.content,a.filter(d=>e.mentions.includes(d.id)),i).replace(VS,(d,f)=>e.quotes[Number(f)-1]?`[q${f}](#quote-${f})`:d),u=d=>{const f=e.quotes[d-1];if(!f)return null;const m=Hi(a.find(v=>v.id===f.senderId));return o.jsxs("button",{type:"button",className:"jv-quote-tag",title:x("sidebar.said",{name:m,text:f.text}),"data-gone":f.messageId?void 0:"",onClick:()=>r==null?void 0:r(f.messageId,f.text),children:[o.jsx(Be,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:m})}),o.jsx("span",{className:"jv-quote-text",children:d0(f.text,80)})]})};return o.jsx(Uc,{text:c,renderQuote:u})}function GS(e,a){var p;const i=a.replace(/\s+/g,"");if(!i||typeof CSS>"u"||!("highlights"in CSS))return!1;const r=e.querySelector(".ui-bubble")??e,c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),u=[];for(let b=c.nextNode();b;b=c.nextNode())if(!((p=b.parentElement)!=null&&p.closest(".jv-quote-tag, button")))for(let j=0;j<b.data.length;j++)/\s/.test(b.data[j])||u.push({node:b,offset:j});const d=u.map(b=>b.node.data[b.offset]).join(""),f=d.indexOf(i);if(f<0)return!1;const m=u[f],v=u[f+i.length-1],y=new Range;return y.setStart(m.node,m.offset),y.setEnd(v.node,v.offset+1),CSS.highlights.set("jv-passage",new Highlight(y)),setTimeout(()=>CSS.highlights.delete("jv-passage"),2400),!0}function YS(e,a){var i;(i=e.querySelector(".jv-long-toggle[aria-expanded='false']"))==null||i.click(),e.scrollIntoView({block:"center",behavior:"smooth"}),!(a&&GS(e,a))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function kL({quotes:e,onRemove:a}){return e.length?o.jsx("div",{className:"jv-compose-quotes",children:e.map((i,r)=>o.jsxs("span",{className:"jv-quote-tag",title:x("sidebar.said",{name:i.name,text:i.text}),children:[o.jsx(Be,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:i.name})}),o.jsx("span",{className:"jv-quote-text",children:d0(i.text)}),o.jsx("button",{type:"button","aria-label":x("quote.remove",{text:d0(i.text,20)}),onClick:()=>a(r),children:"×"})]},r))}):null}function XS({container:e,drafts:a,chatId:i,source:r,members:c,onNotice:u}){const d=(y,p)=>{const b=r(y);b&&!CL(a,i,b,c,p)&&u(x("quote.tooMany",{count:10}))},[f,m]=w.useState(null);if(w.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const p=E=>{var M;return(M=E instanceof Element?E:E==null?void 0:E.parentElement)==null?void 0:M.closest(".ui-bubble")},b=()=>{var A,P;const E=getSelection(),M=(E==null?void 0:E.toString())??"";if(!E||E.isCollapsed||!M.trim()){m(null);return}const T=p(E.anchorNode),_=T==null?void 0:T.closest("[data-message]");if(!T||!_||!y.contains(T)||p(E.focusNode)!==T||(P=(A=E.anchorNode)==null?void 0:A.parentElement)!=null&&P.closest(".jv-quote-tag, button")){m(null);return}const z=E.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(z.left+z.width/2,90),innerWidth-90),y:Math.max(z.top-8,48),messageId:_.getAttribute("data-message"),text:M.trim()})},j=()=>requestAnimationFrame(b),S=()=>m(null),k=E=>{E.key==="Escape"&&S()},C=()=>{var E;(E=getSelection())!=null&&E.isCollapsed&&S()};return y.addEventListener("mouseup",j),y.addEventListener("scroll",S,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",C),()=>{y.removeEventListener("mouseup",j),y.removeEventListener("scroll",S,!0),document.removeEventListener("keydown",k),document.removeEventListener("selectionchange",C)}},[e]),!f)return null;const v=()=>{var y;m(null),(y=getSelection())==null||y.removeAllRanges()};return o.jsxs("div",{className:"ui-popover jv-selection-menu",role:"menu","aria-label":x("quote.selection"),style:{left:f.x,top:f.y},onMouseDown:y=>y.preventDefault(),children:[o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{Hc(f.text),v()},children:[o.jsx(Be,{name:"copy"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.copy")})]}),o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{d(f.messageId,f.text),v()},children:[o.jsx(Be,{name:"quote"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.quote")})]})]})}function CL(e,a,i,r,c){if(e.get(a).passages.length>=10)return!1;const u={messageId:i.id,name:Hi(r.find(d=>d.id===i.senderId)),text:c};return e.update(a,d=>({passages:[...d.passages,u]})),!0}const NL=["👍","👎","✅","❌","😄","😂","😵‍💫","🤔"],mb=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵‍💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function KS({message:e,members:a,onJump:i}){if(!e.replyTo)return null;const r=a.find(c=>c.id===e.replyTo.senderId);return o.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>i(e.replyTo.id),children:[o.jsx("span",{className:"jv-reply-author",children:Hi(r)}),o.jsx("span",{className:"jv-reply-text",children:ys(e.replyTo)})]})}function QS({message:e,me:a,members:i,onReact:r,onError:c}){return e.reactions.length?o.jsx("div",{className:"jv-reactions",children:e.reactions.map(u=>{const d=u.memberIds.includes(a);return o.jsxs("button",{type:"button",className:"jv-reaction","data-mine":d||void 0,title:u.memberIds.map(f=>Hi(i.find(m=>m.id===f))).join(x("common.listSeparator")),onClick:()=>{try{r(e,u.emoji,!d)}catch(f){c(f)}},children:[o.jsx("span",{className:"jv-reaction-emoji",children:u.emoji}),o.jsx("span",{className:"jv-reaction-count",children:u.memberIds.length})]},u.emoji)})}):null}function ZS({message:e,me:a,onReply:i,onReact:r,onError:c}){const[u,d]=w.useState(!1),[f,m]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{if(!u)return;const b=j=>{var S;(S=v.current)!=null&&S.contains(j.target)||d(!1)};return document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)},[u]);const y=b=>{var S;const j=!((S=e.reactions.find(k=>k.emoji===b))!=null&&S.memberIds.includes(a));try{r(e,b,j)}catch(k){c(k)}d(!1)},p=()=>{var S,k,C;const b=(S=v.current)==null?void 0:S.getBoundingClientRect(),j=(C=(k=v.current)==null?void 0:k.closest(".ui-transcript, .ui-pane-body"))==null?void 0:C.getBoundingClientRect();m(!!b&&((j==null?void 0:j.bottom)??window.innerHeight)-b.bottom<240),d(!u)};return o.jsxs("div",{className:"jv-message-actions",ref:v,children:[i&&o.jsx(ct,{icon:"arrow-u-up-right",label:x("actions.reply"),onClick:()=>i(e)}),o.jsx(ct,{icon:"smiley-plus",label:x("actions.react"),"aria-expanded":u,onClick:p}),u&&o.jsxs("div",{className:"jv-emoji-menu",role:"menu","aria-label":x("actions.pickEmoji"),"data-up":f||void 0,children:[o.jsx("div",{className:"jv-emoji-quick",children:NL.map(b=>o.jsx("button",{type:"button",role:"menuitem",onClick:()=>y(b),children:b},b))}),o.jsxs("details",{className:"jv-emoji-more",children:[o.jsx("summary",{children:x("actions.more")}),o.jsx("div",{className:"jv-emoji-grid",children:mb.filter((b,j)=>mb.indexOf(b)===j).map(b=>o.jsx("button",{type:"button",onClick:()=>y(b),children:b},b))})]})]})]})}const EL=12;function JS({children:e,whole:a=!1}){const i=w.useRef(null),[r,c]=w.useState(null),[u,d]=w.useState(a);w.useLayoutEffect(()=>{const m=i.current;if(!m)return;const v=()=>{const p=parseFloat(getComputedStyle(m).lineHeight)||24,b=Math.round(EL*p);c(m.scrollHeight>b+2*p?b:null)};v();const y=new ResizeObserver(v);return y.observe(m),()=>y.disconnect()},[]);const f=r!==null&&!u;return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:i,className:"jv-long","data-cut":f||void 0,style:f?{maxHeight:r}:void 0,children:e}),r!==null&&o.jsx("button",{type:"button",className:"jv-long-toggle","aria-expanded":u,onClick:()=>d(!u),children:x(u?"fold.less":"fold.more")})]})}function WS(){const[e,a]=w.useState(new Set);return{has:i=>e.has(i),add:i=>a(r=>new Set(r).add(i))}}function e5({message:e}){return o.jsxs("div",{className:"jv-folded",children:[o.jsx("span",{className:"jv-folded-text",children:ys(e)}),o.jsxs("span",{className:"jv-folded-tag",children:[o.jsx(Be,{name:"fold"}),x("fold.folded")]})]})}const TL=5*6e4,Wl=e=>new Date(e).toDateString(),Ng=(e,a)=>a===void 0||Wl(e)!==Wl(a),t5=(e,a,i=a==null?void 0:a.createdAt)=>Ng(e.createdAt,i)||(a==null?void 0:a.senderId)!==e.senderId||e.createdAt-a.createdAt>=TL;function AL(e){const a=new Date,i=new Date(e),r=new Date(a.getFullYear(),a.getMonth(),a.getDate()-1);if(Wl(e)===Wl(a.getTime()))return x("chat.today");if(Wl(e)===r.toDateString())return x("chat.yesterday");const c=eo()==="zh"?"long":"short";return i.getFullYear()===a.getFullYear()?ua(e,{weekday:"short",month:c,day:"numeric"}):ua(e,{year:"numeric",month:c,day:"numeric"})}const _L=e=>ua(e,{year:"numeric",month:eo()==="zh"?"long":"short",day:"numeric",hour:eo()==="zh"?"2-digit":"numeric",minute:"2-digit"}),ML=e=>Wl(e)===Wl(Date.now())?to(e):`${x0(e)} ${to(e)}`;function n5({time:e}){return o.jsx("div",{className:"jv-day",role:"separator",children:o.jsx("span",{children:AL(e)})})}function f0({time:e,className:a}){return o.jsx("time",{className:a,dateTime:new Date(e).toISOString(),title:_L(e),children:to(e)})}const a5="jarvy-notice-closed",RL=()=>{try{return JSON.parse(localStorage.getItem(a5)??"[]")}catch{return[]}};function kr({member:e,bots:a,size:i,working:r=!1}){const c=(e==null?void 0:e.kind)==="bot"?a.find(u=>u.id===e.id):void 0;return c?o.jsx(oo,{color:c.color,mood:c.mood,size:i,badge:r?"working":void 0,crown:c.agent}):o.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:i,height:i,fontSize:Math.round(i*.38)},children:((e==null?void 0:e.name)??"?").slice(0,2).toUpperCase()})}function DL({chat:e,members:a,bots:i,infoOpen:r,membersOpen:c,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:v,onThreads:y,onSearch:p}){const b=a.filter(j=>e.memberIds.includes(j.id));return o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:f}),o.jsxs("button",{type:"button",className:"jv-channel-title","aria-label":x("channel.infoFor",{name:e.title}),"aria-pressed":r,onClick:m,children:[o.jsx("span",{className:"jv-hash",children:"#"}),e.title,o.jsx(Be,{name:"chevron-down"})]}),e.topic&&o.jsx("span",{className:"jv-channel-topic",children:e.topic})]}),o.jsxs("div",{className:"ui-header-actions",children:[o.jsxs("button",{type:"button",className:"jv-members-button","aria-label":x("channel.membersCount",{count:b.length}),"aria-pressed":c,title:x("channel.members"),onClick:v,children:[o.jsx("span",{className:"jv-stack",children:b.slice(0,3).map(j=>o.jsx("span",{className:"jv-stack-item",children:o.jsx(kr,{member:j,bots:i,size:22})},j.id))}),o.jsx("span",{className:"jv-members-count",children:b.length})]}),o.jsx(ct,{icon:"search",label:x("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:p}),o.jsx(ct,{icon:"chat-bubble",label:x("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function OL({chat:e,onSave:a}){var j;const[i,r]=w.useState(RL),[c,u]=w.useState(null),[d,f]=w.useState(!1);w.useEffect(()=>u(null),[e.id]);const m=!i.includes(e.id),v=e.note,y=()=>r(S=>{const k=m?[...S,e.id]:S.filter(C=>C!==e.id);return localStorage.setItem(a5,JSON.stringify(k)),k}),p=async()=>{if(c!=null&&c.trim()){f(!0);try{await a(c.trim()),u(null)}finally{f(!1)}}};if(c!==null)return o.jsxs("div",{className:"jv-notice","data-editing":!0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsx(Be,{name:"megaphone"}),o.jsx("strong",{children:x("notice.edit")})]}),o.jsx("textarea",{className:"jv-notice-input",value:c,autoFocus:!0,"aria-label":x("notice.content"),onChange:S=>u(S.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>u(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!c.trim(),onClick:()=>void p(),children:x("common.save")})]})]});if(!v)return o.jsxs("div",{className:"jv-notice","data-empty":!0,children:[o.jsx(Be,{name:"megaphone"}),o.jsx("span",{className:"jv-muted",children:x("notice.none")}),o.jsx(ct,{icon:"pencil",label:x("notice.edit"),onClick:()=>u("")})]});const b=((j=v.text.split(`
551
+ `).find(S=>S.trim()&&!S.startsWith("#")))==null?void 0:j.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-notice","data-open":m||void 0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsxs("button",{type:"button",className:"jv-notice-toggle","aria-expanded":m,onClick:y,children:[o.jsx(Be,{name:"megaphone"}),o.jsx("strong",{children:x("notice.title")}),!m&&o.jsx("span",{className:"jv-notice-first",children:b}),o.jsx(Be,{name:m?"chevron-down":"chevron-right"})]}),o.jsxs("span",{className:"jv-muted jv-notice-meta",children:[v.updatedBy.name," · ",ua(v.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",x("notice.version",{version:v.version})]}),o.jsx(ct,{icon:"pencil",label:x("notice.edit"),onClick:()=>u(v.text)})]}),m&&o.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:o.jsx(Uc,{text:v.text})})]})}function Gd({messages:e,members:a,bots:i,me:r,divider:c,before:u,activeQuestion:d,onSettled:f,onPreview:m,onReply:v,onOpenThread:y,onQuote:p,onReact:b,onFold:j,onJump:S,onError:k}){var M;const C=(M=e.find(T=>T.sequence>c&&T.senderId!==r))==null?void 0:M.id,E=WS();return o.jsx(o.Fragment,{children:e.map((T,_)=>{const z=e[_-1],A=a.find(O=>O.id===T.senderId),P=(z==null?void 0:z.createdAt)??u,H=!t5(T,z,P)&&T.id!==C,U=T.folded;return o.jsxs("div",{children:[Ng(T.createdAt,P)&&o.jsx(n5,{time:T.createdAt}),T.id===C&&o.jsx("div",{className:"jv-divider",role:"separator",children:o.jsx("span",{children:x("chat.newBelow")})}),o.jsxs("div",{className:"jv-row",tabIndex:-1,"data-message":T.id,"data-folded":H||void 0,"data-mention":T.mentions.includes(r)||void 0,"data-shut":U||void 0,children:[o.jsx("div",{className:"jv-row-gutter",children:H?o.jsx(f0,{time:T.createdAt,className:"jv-row-time"}):o.jsx(kr,{member:A,bots:i,size:32})}),o.jsxs("div",{className:"jv-row-body",children:[!H&&o.jsxs("div",{className:"jv-row-head",children:[o.jsx("strong",{children:Hi(A)}),(A==null?void 0:A.kind)==="bot"&&o.jsx("span",{className:"jv-role",children:"Bot"}),o.jsx(f0,{time:T.createdAt})]}),U?o.jsx(e5,{message:T}):o.jsxs(o.Fragment,{children:[T.echoOf&&o.jsx("button",{type:"button",className:"jv-echo",onClick:()=>y==null?void 0:y(T.echoOf.id),children:x("channel.echo",{title:T.echoOf.title})}),T.replyTo&&o.jsx(KS,{message:T,members:a,onJump:O=>S==null?void 0:S(O)}),T.question?o.jsx(qS,{message:{...T,question:T.question},keyboard:T.id===d,onSettled:f}):o.jsxs("div",{className:"ui-bubble jv-flat",children:[T.content&&o.jsx(JS,{whole:E.has(T.id),children:o.jsx($S,{message:T,members:a,me:r,onJump:S})}),T.attachments.length>0&&o.jsx(HS,{files:T.attachments,onOpen:O=>m(T.attachments,O)})]}),b&&o.jsx(QS,{message:T,me:r,members:a,onReact:b,onError:k??(()=>{})})]}),T.thread&&T.thread.replies>0&&o.jsxs("button",{type:"button",className:"jv-thread-link","data-done":T.thread.status==="done"||void 0,onClick:()=>y==null?void 0:y(T.thread.id),children:[x("channel.replies",{count:T.thread.replies}),T.thread.status==="done"&&` · ${x("channel.threadDone")}`,T.thread.lastReplyAt&&o.jsx("span",{className:"jv-muted",children:x("channel.lastReply",{time:ML(T.thread.lastReplyAt)})})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[v&&!T.echoOf&&o.jsx(ct,{icon:"chat-bubble",label:x("channel.replyInThread"),onClick:()=>v(T)}),b&&o.jsx(ZS,{message:T,me:r,onReply:p,onReact:b,onError:k??(()=>{})}),j&&o.jsx(ct,{icon:T.folded?"unfold":"fold",label:x(T.folded?"actions.unfold":"actions.fold"),onClick:()=>{T.folded&&E.add(T.id),j(T,!T.folded)}})]})]})]},T.id)})})}function i5({candidates:e,bots:a,busy:i,onCancel:r,onConfirm:c}){const[u,d]=w.useState(""),[f,m]=w.useState([]),v=e.filter(p=>p.name.toLowerCase().includes(u.trim().toLowerCase())),y=p=>m(b=>b.includes(p)?b.filter(j=>j!==p):[...b,p]);return o.jsxs("div",{className:"jv-picker",children:[o.jsx("div",{className:"ui-field",children:o.jsx("input",{type:"search",value:u,autoFocus:!0,placeholder:x("common.searchMembers"),"aria-label":x("common.searchMembers"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),v.length===1&&y(v[0].id))}})}),o.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":x("dialogs.candidates"),children:[v.map(p=>o.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(p.id),className:"jv-member-option",onClick:()=>y(p.id),children:[o.jsx(kr,{member:p,bots:a,size:24}),o.jsx("span",{className:"jv-member-name",children:p.name}),o.jsx("span",{className:"jv-muted",children:p.kind==="bot"?"Bot":x("common.member")}),o.jsx("span",{className:"jv-check",children:f.includes(p.id)&&o.jsx(Be,{name:"check"})})]},p.id)),v.length===0&&o.jsx("p",{className:"jv-picker-empty",children:x(e.length?"common.noMatch":"dialogs.allInside")})]}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:r,children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:i||f.length===0,onClick:()=>c(f),children:f.length?x("dialogs.addCount",{count:f.length}):x("common.add")})]})]})}function zL({chat:e,members:a,bots:i,onClose:r,onChanged:c}){const[u,d]=w.useState(!1),[f,m]=w.useState("");async function v(y){d(!0),m("");try{let p=e;for(const b of y)p=await he.addMember(e.id,b);c(p),r()}catch(p){m(it(p,"dialogs.addFailed"))}finally{d(!1)}}return o.jsxs(us,{title:x("info.addMembers"),onClose:r,className:"jv-channel-dialog",children:[o.jsx(i5,{candidates:a.filter(y=>!e.memberIds.includes(y.id)),bots:i,busy:u,onCancel:r,onConfirm:y=>void v(y)}),f&&o.jsx("p",{className:"jv-form-error",role:"alert",children:f})]})}function LL({sections:e,members:a,bots:i,me:r,onClose:c,onSaved:u}){const d=w.useId(),[f,m]=w.useState(""),[v,y]=w.useState(""),[p,b]=w.useState(null),[j,S]=w.useState([r]),[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState("");async function z(P){if(P.preventDefault(),!(!f.trim()||E)){M(!0),_("");try{u(await he.createChannel({name:f.trim(),topic:v.trim(),sectionId:p,memberIds:j.filter(H=>H!==r)}))}catch(H){_(it(H,"common.saveFailed"))}finally{M(!1)}}}const A=a.filter(P=>j.includes(P.id));return k?o.jsx(us,{title:x("info.addMembers"),onClose:c,className:"jv-channel-dialog",children:o.jsx(i5,{candidates:a.filter(P=>!j.includes(P.id)),bots:i,busy:!1,onCancel:()=>C(!1),onConfirm:P=>{S(H=>[...H,...P]),C(!1)}})}):o.jsx(us,{title:x("sidebar.newChannel"),onClose:c,className:"jv-channel-dialog",children:o.jsxs("form",{onSubmit:P=>void z(P),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-name`,children:x("info.name")}),o.jsx("input",{id:`${d}-name`,value:f,maxLength:80,autoFocus:!0,placeholder:x("info.newChannel"),onChange:P=>m(P.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-topic`,children:x("info.topic")}),o.jsx("input",{id:`${d}-topic`,value:v,maxLength:200,placeholder:x("dialogs.optional"),onChange:P=>y(P.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-section`,children:x("info.section")}),o.jsx(DS,{id:`${d}-section`,value:p,sections:e,onChange:b})]}),o.jsxs("div",{className:"jv-members",children:[o.jsxs("div",{className:"jv-members-head",children:[o.jsxs("span",{children:[x("channel.members")," · ",A.length]}),o.jsxs("button",{type:"button",className:"ui-button",onClick:()=>C(!0),children:[o.jsx(Be,{name:"person-add"}),x("info.addMembers")]})]}),A.map(P=>o.jsxs("div",{className:"jv-member-option",children:[o.jsx(kr,{member:P,bots:i,size:24}),o.jsx("span",{className:"jv-member-name",children:P.name}),o.jsx("span",{className:"jv-muted",children:P.id===r?x("common.you"):P.kind==="bot"?"Bot":x("common.member")}),P.id!==r&&o.jsx(ct,{icon:"close",label:x("members.remove",{name:P.name}),className:"jv-member-remove",onClick:()=>S(H=>H.filter(U=>U!==P.id))})]},P.id))]}),T&&o.jsx("p",{className:"jv-form-error",role:"alert",children:T}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:c,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:E||!f.trim(),children:x("common.create")})]})]})})}function BL({section:e,onClose:a,onSaved:i,onDeleted:r}){const c=w.useId(),[u,d]=w.useState((e==null?void 0:e.name)??""),[f,m]=w.useState(!1),[v,y]=w.useState("");async function p(j){if(j.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{i(e?await he.updateSection(e.id,{name:u.trim()}):await he.createSection({name:u.trim()}))}catch(S){y(it(S,"common.saveFailed")),m(!1)}}}async function b(){if(!(!e||!confirm(x("dialogs.deleteSection",{name:e.name})))){m(!0);try{await he.deleteSection(e.id),r==null||r(e.id)}catch(j){y(it(j,"dialogs.deleteFailed")),m(!1)}}}return o.jsx(us,{title:x(e?"dialogs.editSection":"sidebar.newSection"),onClose:a,children:o.jsxs("form",{onSubmit:j=>void p(j),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${c}-name`,children:x("dialogs.sectionName")}),o.jsx("input",{id:`${c}-name`,value:u,maxLength:80,autoFocus:!0,placeholder:x("dialogs.newSection"),onChange:j=>d(j.target.value)})]}),v&&o.jsx("p",{className:"jv-form-error",role:"alert",children:v}),o.jsxs("div",{className:"ui-dialog-actions",children:[e&&o.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void b(),children:x("common.delete")}),o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:a,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:f||!u.trim(),children:x(e?"common.save":"common.create")})]})]})})}function IL({bot:e,chats:a,onClose:i,onConfirm:r}){const[c,u]=w.useState(!1),[d,f]=w.useState(!1);return o.jsx(us,{title:x("deleteBot.title",{name:e.name}),onClose:i,className:"jv-dialog",children:o.jsxs("div",{className:"jv-dialog-body",children:[o.jsx("p",{children:x("deleteBot.after")}),o.jsxs("ul",{className:"jv-dialog-list",children:[o.jsx("li",{children:x("deleteBot.chats",{count:a})}),o.jsx("li",{children:x("deleteBot.messages",{name:x("member.deleted",{name:e.name})})}),o.jsx("li",{children:x("deleteBot.history")})]}),o.jsxs("label",{className:"jv-checkline",children:[o.jsx("input",{type:"checkbox",checked:c,onChange:m=>u(m.target.checked)}),o.jsx("span",{children:x("deleteBot.files")})]}),o.jsx("p",{className:"jv-hint",children:x("deleteBot.filesHint")}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",onClick:i,children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),r(c).finally(()=>f(!1))},children:x(d?"deleteBot.deleting":"common.delete")})]})]})})}function r5({title:e,body:a,confirm:i,onClose:r,onConfirm:c}){const[u,d]=w.useState(!1);return o.jsx(us,{title:e,onClose:r,className:"jv-dialog",children:o.jsxs("div",{className:"jv-dialog-body",children:[o.jsx("p",{children:a}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",onClick:r,children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),c().finally(()=>d(!1))},children:u?x("deleteBot.working"):i})]})]})})}function PL({target:e,x:a,y:i,onClose:r,onOpenBot:c,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:v}){const y=w.useRef(null);w.useEffect(()=>{const j=k=>{var C;(C=y.current)!=null&&C.contains(k.target)||r()},S=k=>{k.key==="Escape"&&r()};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",S),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",S)}},[r]);const p=e.chat,b={left:Math.max(8,Math.min(a,window.innerWidth-200)),top:Math.max(8,Math.min(i,window.innerHeight-210))};return o.jsxs("div",{ref:y,className:"ui-popover jv-entry-menu",role:"menu","aria-label":x("entry.menu"),style:b,children:[p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(p,!p.pinned),r()},children:[o.jsx(Be,{name:"pin"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.pinned?"entry.unpin":"entry.pin")})]}),p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(p,!p.muted),r()},children:[o.jsx(Be,{name:p.muted?"bell":"bell-slash"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{c(e.bot),r()},children:[o.jsx(Be,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.botInfo")})]}):o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{u(e.chat),r()},children:[o.jsx(Be,{name:"info"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.channelInfo")})]}),!(e.kind==="dm"&&e.bot.agent)&&o.jsx("hr",{className:"ui-menu-divider"}),e.kind==="dm"?!e.bot.agent&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{v(e.bot),r()},children:[o.jsx(Be,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteBot")})]}):o.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{m(e.chat),r()},children:[o.jsx(Be,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})}function HL({files:e,initialIndex:a=0,onClose:i}){const[r,c]=w.useState(a),[u,d]=w.useState("preview"),[f,m]=w.useState(!1),[v,y]=w.useState(""),[p,b]=w.useState(""),[j,S]=w.useState(""),[k,C]=w.useState(!0),[E,M]=w.useState(0),[T,_]=w.useState(!1),[z,A]=w.useState(!1),P=w.useRef(null),H=w.useRef(null),U=w.useRef(new Map),O=e[r],G=vf(O),q=zS(G),Q=!q&&O.size>fL,V=!q&&!Q&&G!=="download";w.useEffect(()=>{const le=P.current,ie=document.activeElement;return le.showModal(),()=>{le.close(),ie!=null&&ie.isConnected&&ie.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const le=new AbortController;return y(""),b(""),S(""),d("preview"),_(!1),A(!1),C(V),V&&(bc(G)?PS(O,le.signal).then(b):IS(O,le.signal).then(y)).then(()=>C(!1)).catch(ie=>{le.signal.aborted||(S(it(ie,"files.readError")),C(!1))}),()=>le.abort()},[O.id,E]),w.useEffect(()=>{H.current&&(H.current.scrollTop=U.current.get(`${r}:${u}`)??0)},[r,u,k]);const Y=()=>{var le;return U.current.set(`${r}:${u}`,((le=H.current)==null?void 0:le.scrollTop)??0)},K=le=>{Y(),c(Math.max(0,Math.min(e.length-1,le)))},D=w.useMemo(()=>G==="html"&&v?mL(v):null,[G,v]),$=V&&["markdown","html"].includes(G)&&!k&&!j,ne=bc(G)||q&&!z?"ui-image-view":G==="html"&&u==="preview"?"ui-html-view":G==="markdown"&&u==="preview"?"ui-document":"",R=o.jsxs("a",{className:"ui-button",href:Ql(O),download:O.name,children:[o.jsx(Be,{name:"cloud-download"}),x("files.downloadFile")]});return so.createPortal(o.jsxs("dialog",{ref:P,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:le=>{le.preventDefault(),i()},onKeyDown:le=>{!["ArrowLeft","ArrowRight"].includes(le.key)||["SELECT","INPUT","TEXTAREA"].includes(le.target.tagName)||(le.preventDefault(),K(r+(le.key==="ArrowLeft"?-1:1)))},children:[o.jsxs("header",{className:"ui-preview-header",children:[o.jsxs("div",{className:"ui-preview-heading",children:[o.jsx("h1",{id:"jvPreviewTitle",children:O.name}),o.jsxs("small",{children:[x(LS[G])," · ",BS(O.size)]})]}),o.jsxs("div",{className:"ui-preview-actions",children:[$&&o.jsx("button",{type:"button",className:"ui-button",onClick:()=>{Y(),d(u==="source"?"preview":"source")},children:x(u==="source"?"files.showPreview":G==="html"?"files.showSource":"files.showText")}),T&&o.jsx(ct,{icon:"window",label:x("files.openTab"),onClick:()=>window.open(db(O),"_blank","noopener,noreferrer")}),o.jsx("a",{className:"ui-iconbtn",href:Ql(O),download:O.name,"aria-label":x("files.download",{name:O.name}),title:x("files.download",{name:O.name}),children:o.jsx(Be,{name:"cloud-download"})}),o.jsx(ct,{icon:f?"arrows-contract":"arrows-expand",label:x(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),o.jsx(ct,{icon:"close",label:x("files.closePreview"),"data-action":"ui-close",onClick:i})]})]}),D&&u==="preview"&&!k&&!j&&o.jsxs("div",{className:"jv-run-tip",role:"status",children:[o.jsx("p",{children:T?x("files.running"):x("files.scripts",{count:D.count,hosts:D.hosts.length?x("files.scriptHosts",{hosts:D.hosts.slice(0,3).join(x("common.listSeparator"))+(D.hosts.length>3?x("files.andMore"):"")}):""})}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>_(!T),children:x(T?"files.stop":"files.run")})]}),o.jsx("div",{className:`ui-preview-body ${ne}`,ref:H,tabIndex:-1,children:q?z?o.jsxs("div",{className:"ui-fallback",children:[o.jsx(Be,{name:`file-${G}`}),o.jsx("strong",{children:x("files.cantPlay")}),o.jsx("p",{children:x("files.cantPlayHint")}),R]}):G==="video"?o.jsx("video",{className:"ui-preview-video",src:Ql(O),controls:!0,preload:"metadata",playsInline:!0,onError:()=>A(!0)},O.id):o.jsx("audio",{className:"ui-preview-audio",src:Ql(O),controls:!0,preload:"metadata",onError:()=>A(!0)},O.id):V?k?o.jsx("p",{className:"ui-unloaded",children:x("files.reading")}):j?o.jsxs("div",{className:"ui-error",role:"alert",children:[o.jsx("p",{children:j}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(le=>le+1),children:x("common.retry")})]}):bc(G)?o.jsx("img",{className:"ui-preview-image",src:p,alt:O.name}):u==="source"||G==="text"?o.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):G==="html"?T?o.jsx("iframe",{title:x("files.runningTitle",{name:O.name}),sandbox:"allow-scripts",src:db(O),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):o.jsx("iframe",{title:O.name,sandbox:"",srcDoc:pL(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):o.jsx("article",{className:"ui-prose",children:o.jsx(Uc,{text:v})}):o.jsxs("div",{className:"ui-fallback",children:[o.jsx(Be,{name:"file"}),o.jsx("strong",{children:x("files.downloadToView")}),o.jsx("p",{children:x(Q?"files.tooLarge":"files.unsupported")}),R]})}),e.length>1&&o.jsxs("footer",{className:"ui-preview-nav",children:[o.jsx(ct,{icon:"chevron-left",label:x("files.previous"),disabled:r===0,onClick:()=>K(r-1)}),o.jsx("select",{id:"ui-preview-select","aria-label":x("files.choose"),value:r,onChange:le=>K(Number(le.target.value)),children:e.map((le,ie)=>o.jsx("option",{value:ie,children:le.name},le.id))}),o.jsxs("span",{children:[r+1," / ",e.length]}),o.jsx(ct,{icon:"chevron-right",label:x("files.next"),disabled:r===e.length-1,onClick:()=>K(r+1)})]})]}),document.body)}function UL({dialog:e,entryMenu:a,confirm:i,preview:r,infoBot:c,bots:u,statuses:d,chats:f,sections:m,members:v,connections:y,meId:p,onDialog:b,onEntryMenu:j,onConfirm:S,onPreview:k,onInfoBot:C,onSettings:E,onChannelInfo:M,onOpenChatId:T,chatSaved:_,openChat:z,onSectionSaved:A,onSectionDeleted:P,updateBot:H,openAnywhere:U,removeChannel:O,deleteBot:G,pinChat:q,muteChat:Q}){return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&o.jsx(LL,{sections:m,members:oi(v),bots:u,me:p,onClose:()=>b(null),onSaved:V=>{_(V),b(null),z(V)}}),(e==null?void 0:e.kind)==="members"&&o.jsx(zL,{chat:f.find(V=>V.id===e.chat.id)??e.chat,members:oi(v),bots:u,onClose:()=>b(null),onChanged:_}),(e==null?void 0:e.kind)==="section"&&o.jsx(BL,{section:e.section,onClose:()=>b(null),onSaved:A,onDeleted:P}),a&&o.jsx(PL,{target:a.target,x:a.at.x,y:a.at.y,onClose:()=>j(null),onOpenBot:V=>C(V.id),onSettings:V=>{V.type==="channel"&&M(V)},onPin:(V,Y)=>void q(V,Y),onMute:(V,Y)=>void Q(V,Y),onDeleteChat:V=>S({kind:"chat",chat:V}),onDeleteBot:V=>S({kind:"bot",bot:V})}),(i==null?void 0:i.kind)==="chat"&&o.jsx(r5,{title:x("app.deleteChannelTitle",{name:i.chat.title}),confirm:x("common.delete"),onClose:()=>S(null),body:x("app.deleteChannelBody"),onConfirm:async()=>{await O(i.chat),S(null)}}),(i==null?void 0:i.kind)==="bot"&&o.jsx(IL,{bot:i.bot,chats:f.filter(V=>V.type==="dm"&&V.botId===i.bot.id).length,onClose:()=>S(null),onConfirm:async V=>{await G(i.bot,V),S(null)}}),c&&o.jsx(dL,{bot:c,status:d[c.id],connections:y,chats:f,onSaved:H,onOpenChat:V=>{C(null),T(V)},onOpenSubscription:U,onManageModels:()=>{C(null),E()},onClose:()=>C(null)},c.id),r&&o.jsx(HL,{files:r.files,initialIndex:r.index,onClose:()=>k(null)})]})}function l5(e,a,i){const[r,c]=w.useState(null),[u,d]=w.useState(!1);return w.useEffect(()=>{const f=e.trim();if(!f){c(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void he.search(f,a).then(y=>{m&&c(y)}).catch(y=>{m&&i(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[e,a]),{result:r,loading:u}}function o5(e,a,i){var r;return e.type==="thread"?`#${((r=a.find(c=>c.id===e.parentId))==null?void 0:r.title)??x("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:Hi(i.find(c=>c.id===e.botId))}function s5({text:e,query:a,room:i=24}){const r=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),c=r.toLocaleLowerCase().indexOf(a.trim().toLocaleLowerCase());if(c<0||!a.trim())return o.jsx(o.Fragment,{children:r.slice(0,120)});const u=Math.max(0,c-i),d=c+a.trim().length;return o.jsxs(o.Fragment,{children:[u>0&&"…",r.slice(u,c),o.jsx("mark",{className:"jv-hit",children:r.slice(c,d)}),r.slice(d,d+120)]})}const qL=e=>new Date(e).toDateString()===new Date().toDateString()?to(e):x0(e);function c5({message:e,chat:a,chats:i,members:r,query:c,showPlace:u=!0,onOpen:d}){return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(a,e.id),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:Hi(r.find(f=>f.id===e.senderId))}),u&&o.jsx("span",{className:"jv-hit-place",children:o5(a,i,r)}),o.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:qL(e.createdAt)})]}),o.jsx("span",{className:"jv-hit-text",children:o.jsx(s5,{text:Cg(e),query:c})})]})}const pb=5;function _d({label:e,items:a,empty:i}){const[r,c]=w.useState(!1);return!a.length&&!i?null:o.jsxs("section",{className:"jv-result-group","aria-label":e,children:[o.jsxs("h3",{className:"jv-result-head",children:[e,o.jsx("span",{children:a.length})]}),a.length?r?a:a.slice(0,pb):o.jsx("p",{className:"jv-result-empty",children:i}),!r&&a.length>pb&&o.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>c(!0),children:[x("search.showAll",{count:a.length}),o.jsx(Be,{name:"chevron-down"})]})]})}function FL({query:e,shown:a,chats:i,members:r,onOpenChat:c,onOpenMessage:u,onError:d}){const{result:f,loading:m}=l5(e,void 0,d),v=((f==null?void 0:f.chats)??[]).filter(p=>!a.has(p.id)),y=p=>{var b,j;return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>c(p),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:p.type==="thread"?p.title:`#${p.title}`}),p.type==="thread"&&o.jsx("span",{className:"jv-hit-place",children:o5(p,i,r).split(" › ")[0]})]}),(((b=p.note)==null?void 0:b.text)||p.topic)&&o.jsx("span",{className:"jv-hit-text",children:o.jsx(s5,{text:((j=p.note)==null?void 0:j.text)||p.topic,query:e})})]},p.id)};return o.jsxs("div",{className:"jv-results","aria-live":"polite",children:[o.jsx(_d,{label:x("search.threads"),items:v.filter(p=>p.type==="thread").map(y)}),o.jsx(_d,{label:x("search.channels"),items:v.filter(p=>p.type==="channel").map(y)}),f?o.jsx(_d,{label:x("search.messages"),empty:x("search.noMessages"),items:f.messages.map(({message:p,chat:b})=>o.jsx(c5,{message:p,chat:b,chats:i,members:r,query:e,onOpen:u},p.id))}):m&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")})]})}function VL({className:e,...a}){return o.jsx("div",{"data-slot":"input-group",role:"group",className:an("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...a})}const $L=E0("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function GL({className:e,align:a="inline-start",...i}){return o.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:an($L({align:a}),e),onClick:r=>{var c,u;r.target.closest("button")||(u=(c=r.currentTarget.parentElement)==null?void 0:c.querySelector("input"))==null||u.focus()},...i})}function YL({className:e,...a}){return o.jsx(vt,{"data-slot":"input-group-control",className:an("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...a})}function XL({className:e,children:a,...i}){return o.jsxs(mT,{"data-slot":"scroll-area",className:an("relative",e),...i,children:[o.jsx(pT,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),o.jsx(KL,{}),o.jsx(gT,{})]})}function KL({className:e,orientation:a="vertical",...i}){return o.jsx(aT,{"data-slot":"scroll-area-scrollbar",orientation:a,className:an("flex touch-none p-px transition-colors select-none",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...i,children:o.jsx(cT,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const u5="jarvy-collapsed-sections",QL=()=>{try{return JSON.parse(localStorage.getItem(u5)??"[]")}catch{return[]}};function gb({chat:e}){return e.alerts>0?o.jsx("span",{className:"jv-badge","aria-label":x("sidebar.alerts",{count:e.alerts}),children:e.alerts}):e.unread>0?o.jsx("span",{className:"jv-count","aria-label":x("sidebar.unread",{count:e.unread}),children:e.unread}):null}function d5(e){const a=e.hint;if(!a||a.createdAt<e.updatedAt-1e3)return null;const i=a.chatType==="thread"&&a.chatId!==e.id,r={actor:a.actor,emoji:a.detail,title:a.title.length>16?`${a.title.slice(0,16)}…`:a.title};return a.kind==="reaction"?x(i?"hint.reactionInThread":"hint.reaction",r):x(i?"hint.threadSummary":a.chatType==="thread"?"hint.summary":"hint.notice",r)}function ZL(e){var a;return e.type==="channel"&&d5(e)&&((a=e.hint)==null?void 0:a.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function vb({chat:e,channel:a}){const i=d5(e),r=e.lastMessage&&ys(e.lastMessage),c=i??(r?a&&e.lastSender?x("sidebar.said",{name:e.lastSender,text:r}):r:a?e.topic:"");return o.jsxs("span",{className:"jv-digest",children:[e.atMe&&o.jsx("span",{className:"jv-at-me",children:x("sidebar.atMe")}),o.jsx("span",{className:i?"jv-hint-line":void 0,children:c})]})}const yb=e=>{const a=e.getBoundingClientRect();return{x:a.right-168,y:a.bottom+4}};function JL({chats:e,sections:a,bots:i,members:r,onOpenMessage:c,onOpenFound:u,onError:d,working:f,asking:m,selected:v,filter:y,followed:p,followedOpen:b,onFilterChange:j,onSelect:S,onOpenBot:k,onOpenFollowed:C,onMenu:E,onEditSection:M}){const[T,_]=w.useState(QL),z=D=>_($=>{const ne=$.includes(D)?$.filter(R=>R!==D):[...$,D];return localStorage.setItem(u5,JSON.stringify(ne)),ne}),A=y.toLocaleLowerCase(),P=e.filter(D=>{var $;return D.type!=="thread"&&`${D.title} ${D.topic} ${(($=i.find(ne=>ne.id===D.botId))==null?void 0:$.name)??""}`.toLocaleLowerCase().includes(A)}),H=p.reduce((D,$)=>D+$.unread,0),U=p.reduce((D,$)=>D+$.mentions,0),O=P.filter(D=>D.type==="channel").sort((D,$)=>Number($.pinned)-Number(D.pinned)||D.title.localeCompare($.title,"zh-CN")),G=i.map(D=>({bot:D,chat:e.find($=>$.type==="dm"&&$.botId===D.id)})).filter(({bot:D})=>D.name.toLocaleLowerCase().includes(A)).sort((D,$)=>{var ne,R,le,ie;return Number($.bot.agent)-Number(D.bot.agent)||+!!((ne=$.chat)!=null&&ne.pinned)-+!!((R=D.chat)!=null&&R.pinned)||(((le=$.chat)==null?void 0:le.updatedAt)??0)-(((ie=D.chat)==null?void 0:ie.updatedAt)??0)}),q=D=>o.jsxs("div",{className:"jv-side-wrap",onContextMenu:$=>{$.preventDefault(),E({kind:"channel",chat:D},{x:$.clientX,y:$.clientY})},children:[o.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===D.id||void 0,"data-unread":D.unread>0||void 0,"aria-current":v===D.id?"page":void 0,onClick:()=>S(D),children:[D.pinned?o.jsx(Op,{className:"jv-side-pin","aria-label":x("sidebar.pinned")}):o.jsx("span",{className:"jv-hash","aria-hidden":"true",children:"#"}),o.jsxs("span",{className:"jv-side-text",children:[o.jsxs("span",{className:"jv-side-line",children:[o.jsx("span",{className:"jv-side-label",title:D.title,children:D.title}),D.muted&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(Be,{name:"bell-slash"})})]}),o.jsxs("span",{className:"jv-side-line",children:[o.jsx(vb,{chat:D,channel:!0}),o.jsx(gb,{chat:D})]})]})]}),o.jsx("button",{type:"button",className:"jv-side-more","aria-label":x("sidebar.more",{name:D.title}),onClick:$=>E({kind:"channel",chat:D},yb($.currentTarget)),children:o.jsx(Ly,{"aria-hidden":"true"})})]},D.id),Q=({bot:D,chat:$})=>{const ne=m.has(D.id)?"asking":f.has(D.id)?"working":void 0,R=!!$&&v===$.id;return o.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:le=>{le.preventDefault(),E({kind:"dm",bot:D,chat:$},{x:le.clientX,y:le.clientY})},children:[o.jsxs(Ae,{type:"button",variant:"ghost","data-active":R,"aria-current":R?"page":void 0,className:"h-15 w-full justify-start gap-2.5 rounded-md px-2 text-left hover:bg-accent/70 data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",onClick:()=>$?S($):k(D),children:[o.jsx(oo,{color:D.color,mood:D.mood,size:36,badge:ne,crown:D.agent}),ne&&o.jsx("span",{className:"sr-only",children:x(ne==="asking"?"sidebar.asking":"sidebar.working")}),o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${$!=null&&$.unread?"font-semibold":"font-medium"}`,title:D.name,children:D.name}),($==null?void 0:$.muted)&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(Be,{name:"bell-slash"})}),($==null?void 0:$.pinned)&&o.jsx(Op,{className:"jv-dm-pin shrink-0","aria-label":x("sidebar.pinned")}),$&&o.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date($.updatedAt).toISOString(),children:to($.updatedAt)})]}),o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-normal text-muted-foreground",children:$?o.jsx(vb,{chat:$,channel:!1}):""}),$&&o.jsx(gb,{chat:$})]})]})]}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-xs","aria-label":x("sidebar.more",{name:D.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:le=>E({kind:"dm",bot:D,chat:$},yb(le.currentTarget)),children:o.jsx(Ly,{"aria-hidden":"true"})})]},D.id)},V=(D,$,ne,R,le)=>o.jsxs("div",{className:"jv-side-section-head",children:[o.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!ne,onClick:()=>z(D),children:[o.jsx("span",{className:"jv-side-chevron",children:o.jsx(Be,{name:ne?"chevron-right":"chevron-down"})}),o.jsxs("span",{className:"jv-side-section-name",children:[$,ne&&R&&o.jsx("span",{className:"jv-dot","aria-label":x("sidebar.hasUnread")})]})]}),le&&o.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":x("sidebar.editSection",{name:$}),onClick:()=>M(le),children:o.jsx(Be,{name:"pencil"})})]}),Y=D=>!A&&T.includes(D),K=(D,$,ne,R)=>o.jsxs("div",{className:"jv-side-section",children:[V(D,$,Y(D),ne.some(le=>le.unread>0),R),!Y(D)&&ne.map(q)]},D);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:o.jsxs(VL,{className:"h-9 bg-background",children:[o.jsx(YL,{id:"jarvy-search",type:"search",value:y,onChange:D=>j(D.target.value),placeholder:x("sidebar.search"),"aria-label":x("sidebar.search"),onKeyDown:D=>{D.key==="Escape"&&y&&(D.preventDefault(),j(""))},className:"text-sm"}),o.jsx(GL,{align:"inline-start",children:o.jsx(Mc,{"aria-hidden":"true"})})]})}),o.jsx(XL,{className:"min-h-0 flex-1",type:"auto",children:A?o.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":x("sidebar.results"),children:[o.jsx(_d,{label:x("sidebar.chats"),items:[...O.map(q),...G.map(Q)]}),o.jsx(FL,{query:y,shown:new Set(O.map(D=>D.id)),chats:e,members:r,onOpenChat:u,onOpenMessage:c,onError:d})]}):o.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":x("sidebar.nav"),children:[p.length>0&&o.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":b||void 0,"data-unread":H>0||void 0,"aria-current":b?"page":void 0,onClick:C,children:[o.jsx(Be,{name:"chat-bubble"}),o.jsx("span",{className:"jv-side-label",children:x("sidebar.followed")}),U>0?o.jsx("span",{className:"jv-badge",children:U}):H>0&&o.jsx("span",{className:"jv-count",children:H})]}),a.map(D=>K(`s:${D.id}`,D.name,O.filter($=>$.sectionId===D.id),D)),O.some(D=>!D.sectionId||!a.some($=>$.id===D.sectionId))&&K("channels",x("sidebar.channels"),O.filter(D=>!D.sectionId||!a.some($=>$.id===D.sectionId))),o.jsxs("div",{className:"jv-side-section",children:[V("dms",x("sidebar.dms"),Y("dms"),G.some(({chat:D})=>!!(D!=null&&D.unread))),!Y("dms")&&o.jsx("div",{className:"space-y-1",children:G.map(Q)}),!Y("dms")&&G.length===0&&o.jsx("p",{className:"jv-side-empty",children:x("sidebar.noDms")})]})]})})]})}function WL({username:e,chats:a,sections:i,bots:r,members:c,followed:u,followedOpen:d,working:f,asking:m,selected:v,filter:y,creating:p,createMenu:b,accountMenu:j,onFilterChange:S,onOpenFollowed:k,onOpenChat:C,onOpenBot:E,onOpenMenu:M,onEditSection:T,onCreate:_,onFind:z,onOpenFound:A,onError:P,onToggleCreate:H,onToggleAccount:U,onSettings:O,onToggleTheme:G,onLogOut:q}){const Q=w.useRef(null),V=w.useRef(null);return w.useEffect(()=>{if(!j&&!b)return;const Y=K=>{var D,$;j&&!((D=V.current)!=null&&D.contains(K.target))&&U(!1),b&&!(($=Q.current)!=null&&$.contains(K.target))&&H(!1)};return document.addEventListener("pointerdown",Y),()=>document.removeEventListener("pointerdown",Y)},[j,b]),o.jsxs(o.Fragment,{children:[o.jsxs("aside",{className:"ui-sidebar","aria-label":x("sidebar.label"),children:[o.jsx("header",{className:"ui-sidebar-header",children:o.jsxs("div",{className:"jarvy-sidebar-create",ref:Q,children:[o.jsx(ct,{icon:"add",label:x("sidebar.create"),"aria-expanded":b,"aria-haspopup":"menu",disabled:p,onClick:()=>H(!b)}),b&&o.jsxs("div",{className:"ui-popover jarvy-create-menu",role:"menu","aria-label":x("sidebar.createMenu"),children:[o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("channel"),children:[o.jsx(Be,{name:"list-bullets"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newChannel")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("section"),children:[o.jsx(Be,{name:"folder"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newSection")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("bot"),children:[o.jsx(Be,{name:"person-add"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newBot")})]})]})]})}),o.jsx(JL,{chats:a,sections:i,bots:r,members:c,onOpenMessage:z,onOpenFound:A,onError:P,working:f,asking:m,selected:v,filter:y,onFilterChange:S,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:C,onOpenBot:E,onMenu:M,onEditSection:T}),o.jsx("footer",{className:"ui-sidebar-footer",children:o.jsxs("button",{type:"button",className:"ui-footer-entry","aria-label":x("account.menuFor",{name:e}),"aria-expanded":j,onClick:()=>U(!j),children:[o.jsx("span",{className:"ui-user-avatar",children:e.slice(0,2).toUpperCase()}),o.jsx("span",{children:e}),o.jsx(Be,{name:"chevron-down"})]})})]}),j&&o.jsxs("div",{ref:V,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":x("account.menu"),children:[o.jsx("div",{className:"ui-menu-note ui-small",children:e}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:O,children:[o.jsx(Be,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("settings.title")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:G,children:[o.jsx(Be,{name:"moon"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.toggleTheme")})]}),o.jsx("hr",{className:"ui-menu-divider"}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:q,children:[o.jsx(Be,{name:"arrow-bracket-to-left"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.signOut")})]})]})]})}function eB({textarea:e,value:a,setValue:i,inside:r,outside:c,bots:u,onInvite:d,participants:f}){const[m,v]=w.useState(null),[y,p]=w.useState(0),[b,j]=w.useState(null),S=w.useRef(null),k=w.useRef(null),C=w.useRef(null);w.useLayoutEffect(()=>{C.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(C.current,C.current),C.current=null)},[a,e]);const E=(R,le)=>R.name.toLowerCase().includes(le.toLowerCase()),M=m===null?[]:r.filter(R=>E(R,m)),T=f?M.filter(R=>f.has(R.id)):M,_=f?M.filter(R=>!f.has(R.id)):[],z=T.length>0&&_.length>0,A=[...T,..._],P=m===null?[]:c.filter(R=>E(R,m)),H=b?c.filter(R=>E(R,b.search)):[],U=A.length+(P.length?1:0),O=()=>{v(null),j(null)};function G(R=a){const le=e.current,ie=le?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(R.slice(0,le.selectionStart)):null;v(ie?ie[1]:null),p(0),j(null)}function q(R){const le=e.current;if(!le)return;r.some(F=>F.id===R.id)||d(R);const ie=a.slice(0,le.selectionStart).replace(/@([^\s@]*)$/u,`@${R.name} `),B=ie+a.slice(le.selectionStart);C.current=ie.length,i(B),O()}function Q(R){b||j({search:m??"",active:0}),R&&requestAnimationFrame(()=>{var le;return(le=k.current)==null?void 0:le.focus()})}function V(){var R;j(null),(R=e.current)==null||R.focus()}function Y(R){if(!U||R.nativeEvent.isComposing)return!1;const le=y===A.length;return R.key==="ArrowDown"||R.key==="ArrowUp"?(R.preventDefault(),p((y+(R.key==="ArrowDown"?1:-1)+U)%U),j(null),!0):(R.key==="Enter"||R.key==="Tab")&&!le?(R.preventDefault(),q(A[y]),!0):(R.key==="Enter"||R.key==="Tab"||R.key==="ArrowRight")&&le?(R.preventDefault(),Q(!0),!0):R.key==="Escape"?(R.preventDefault(),O(),!0):!1}function K(R){!b||R.nativeEvent.isComposing||((R.key==="ArrowDown"||R.key==="ArrowUp")&&H.length?(R.preventDefault(),j({...b,active:(b.active+(R.key==="ArrowDown"?1:-1)+H.length)%H.length})):R.key==="Enter"?(R.preventDefault(),H[b.active]&&q(H[b.active])):(R.key==="Escape"||R.key==="ArrowLeft"&&!b.search)&&(R.preventDefault(),V()))}const D=R=>{var ie;const le=R.relatedTarget;(!le||!((ie=S.current)!=null&&ie.contains(le))&&le!==e.current)&&O()},$=(R,le)=>o.jsxs("button",{type:"button",role:"option","aria-selected":le,className:"ui-menu-item","data-active":le||void 0,onMouseDown:ie=>{ie.preventDefault(),q(R)},children:[o.jsx(kr,{member:R,bots:u,size:20}),o.jsx("span",{className:"ui-menu-copy",children:R.name}),o.jsx("span",{className:"jv-muted",children:R.kind==="bot"?"Bot":x("common.member")})]},R.id);return{menu:U>0?o.jsxs("div",{ref:S,className:"jv-mention-box","data-side":b?"":void 0,onBlur:D,children:[o.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":x("mention.menu"),children:[z&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inThread")}),T.map((R,le)=>$(R,le===y)),z&&o.jsx("div",{className:"jv-mention-sep",role:"separator"}),z&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inChannel")}),_.map((R,le)=>$(R,T.length+le===y)),P.length>0&&o.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!b,"data-active":y===A.length||void 0,onMouseEnter:()=>{p(A.length),Q(!1)},onMouseDown:R=>{R.preventDefault(),p(A.length),Q(!0)},children:[o.jsx("span",{className:"ui-menu-copy",children:x("mention.outside")}),o.jsx("span",{className:"jv-muted",children:P.length}),o.jsx(Be,{name:"chevron-right"})]})]}),b&&o.jsxs("div",{className:"ui-popover jv-mention-side",role:"listbox","aria-label":x("mention.outsideList"),children:[o.jsxs("div",{className:"jv-mention-side-head",children:[o.jsx("button",{type:"button",className:"jv-mention-back","aria-label":x("common.back"),onMouseDown:R=>{R.preventDefault(),V()},children:o.jsx(Be,{name:"chevron-left"})}),o.jsx("input",{ref:k,type:"search",value:b.search,placeholder:x("common.searchMembers"),"aria-label":x("mention.searchOutside"),onChange:R=>j({search:R.target.value,active:0}),onKeyDown:K})]}),o.jsx("div",{className:"jv-mention-side-list",children:H.length?H.map((R,le)=>$(R,le===b.active)):o.jsx("p",{className:"jv-mention-empty",children:x("common.noMatch")})}),o.jsx("p",{className:"ui-menu-note ui-small",children:x("mention.invites")})]})]}):null,track:G,onKeyDown:Y,close:O,leaves:D}}const xb={text:null,files:[],quote:null,passages:[],key:null,signature:null,outgoing:null,sending:!1};function f5(e,a){var c;const i=((c=a.text)==null?void 0:c.trim())??"",r=e.text??"";return{text:r.trim()?i?`${i}
552
+
553
+ ${r}`:r:i||e.text,files:[...a.files.filter(u=>!e.files.some(d=>d.id===u.id)),...e.files],quote:e.quote??a.quote,passages:[...a.passages,...e.passages],outgoing:null}}class tB{constructor(a){uc(this,"drafts",new Map);uc(this,"listeners",new Set);uc(this,"timer",null);uc(this,"subscribe",a=>(this.listeners.add(a),()=>{this.listeners.delete(a)}));this.storageKey=a;try{const i=JSON.parse(localStorage.getItem(a)??"{}");for(const[r,c]of Object.entries(i)){const u={...xb,...c,sending:!1};this.drafts.set(r,u.outgoing?{...u,...f5(u,u.outgoing)}:u)}}catch{localStorage.removeItem(a)}}get(a){return this.drafts.get(a)??xb}update(a,i){const r=this.get(a),c=typeof i=="function"?i(r):i;this.drafts.set(a,{...r,...c}),this.listeners.forEach(d=>d());const u=Object.keys(c).every(d=>d==="text"||d==="sending");this.timer&&clearTimeout(this.timer),u?this.timer=setTimeout(()=>this.save(),300):this.save()}save(){var i;this.timer&&(clearTimeout(this.timer),this.timer=null);const a={};for(const[r,{sending:c,...u}]of this.drafts)((i=u.text)!=null&&i.trim()||u.files.length||u.quote||u.passages.length||u.outgoing)&&(a[r]=u);Object.keys(a).length?localStorage.setItem(this.storageKey,JSON.stringify(a)):localStorage.removeItem(this.storageKey)}async clear(a){this.timer&&(clearTimeout(this.timer),this.timer=null);const i=[...this.drafts.values()].flatMap(r=>{var c;return[...r.files,...((c=r.outgoing)==null?void 0:c.files)??[]]});await Promise.all(i.map(r=>a(r.id).catch(c=>console.warn(`Pending attachment ${r.id} was not deleted on log-out`,c)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(r=>r())}}const nB=e=>`jarvy-drafts:${e}`;function h5(e,a,i){e.update(a.chatId,{quote:{id:a.id,name:Hi(i.find(r=>r.id===a.senderId)),text:Cg(a).replace(/\s+/g," ").slice(0,160)}})}function aB(e,a){return w.useSyncExternalStore(e.subscribe,()=>e.get(a))}const bb=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function m5({chatId:e,id:a,drafts:i,placeholder:r,disabled:c=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:v,onError:y,onNotice:p}){const b=aB(i,e),j=b.sending,[S,k]=w.useState([]),[C,E]=w.useState(!1),M=S.filter(D=>D.chatId===e),T=M.length>0,_=w.useRef(null),z=b.text??d??"",A=b.files,P=b.quote,H=D=>i.update(e,{text:D}),U=eB({textarea:_,value:z,setValue:H,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:D=>u==null?void 0:u.onInvite(D),participants:u==null?void 0:u.participants});async function O(D){const $=e;if(!D.length)return;if(T){p(x("composer.busy"));return}if(A.length+D.length>5){p(x("composer.tooMany",{count:5}));return}if(D.some(ie=>ie.size===0||ie.size>10*1024*1024)){p(x("composer.size"));return}const ne=D.map(ie=>({key:bb(),chatId:$,name:ie.name,done:0})),R=ne.map(ie=>ie.key),le=(ie,B)=>k(F=>F.map(se=>se.key===ie?{...se,done:B}:se));k(ie=>[...ie,...ne]);try{for(const[ie,B]of D.entries()){const F=R[ie],se=await he.uploadAttachment($,B,ye=>le(F,ye));i.update($,ye=>({files:[...ye.files,se]})),k(ye=>ye.filter(we=>we.key!==F))}}catch(ie){y(ie)}finally{k(ie=>ie.filter(B=>!R.includes(B.key)))}}async function G(D){const $=e;try{await he.removeAttachment(D),i.update($,ne=>({files:ne.files.filter(R=>R.id!==D)}))}catch(ne){y(ne)}}function q(D){const $=[...D.clipboardData.files];if(!$.length)return;D.preventDefault();const ne=new Date().toISOString().replace(/\D/g,"").slice(0,14);O($.map((R,le)=>R.type.startsWith("image/")&&/^image\.\w+$/.test(R.name)?new File([R],`${x("composer.pasted")}-${ne}${$.length>1?`-${le+1}`:""}.${R.name.split(".").pop()}`,{type:R.type}):R))}const Q=D=>D.dataTransfer.types.includes("Files");function V(D){!Q(D)||c||(D.preventDefault(),D.dataTransfer.dropEffect="copy",E(!0))}function Y(D){Q(D)&&(D.preventDefault(),E(!1),c||O([...D.dataTransfer.files]))}async function K(D){D==null||D.preventDefault();const $=e,ne=i.get($),R=(ne.text??d??"").trim(),le=ne.files,ie=ne.quote,B=ne.passages,se=[B.map((xe,Ce)=>`[[q${Ce+1}]]`).join(`
554
+ `),R].filter(Boolean).join(`
555
+
556
+ `);if(!se&&!le.length||ne.sending||T||c)return;const ye=JSON.stringify([se,le.map(xe=>xe.id),(ie==null?void 0:ie.id)??null,B]),we=ne.signature===ye&&ne.key?ne.key:bb(),ce={text:R,files:le,quote:ie,passages:B};i.update($,{text:"",files:[],quote:null,passages:[],key:we,signature:ye,outgoing:ce,sending:!0});try{await v(se,le.map(xe=>xe.id),we,ie==null?void 0:ie.id,B.map(({messageId:xe,text:Ce})=>({messageId:xe,text:Ce}))),i.update($,{key:null,signature:null,outgoing:null})}catch(xe){i.update($,Ce=>f5(Ce,ce)),y(xe)}finally{i.update($,{sending:!1})}}return w.useLayoutEffect(()=>{const D=()=>{const $=_.current,ne=m==null?void 0:m.current;if(!$)return;const R=ne==null?void 0:ne.scrollTop;$.style.height="auto",$.style.height=`${$.scrollHeight}px`,ne&&R!==void 0&&ne.scrollTop!==R&&ne.scrollTo({top:R,behavior:"instant"})};return D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[z,e,m]),o.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:D=>void K(D),onDragEnter:V,onDragOver:V,onDragLeave:D=>{D.currentTarget.contains(D.relatedTarget)||E(!1)},onDrop:Y,children:[A.length+M.length>0&&o.jsxs("div",{className:"jarvy-pending-files",children:[A.map(D=>o.jsxs("span",{className:"jarvy-file-chip",children:[o.jsx(Be,{name:"paperclip"}),o.jsx("span",{title:D.name,children:D.name}),o.jsx("button",{type:"button","aria-label":x("composer.removeFile",{name:D.name}),onClick:()=>void G(D.id),children:"×"})]},D.id)),M.map(D=>o.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[o.jsx(Be,{name:"paperclip"}),o.jsx("span",{title:D.name,children:D.name}),o.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":x("composer.uploading",{name:D.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(D.done*100),children:o.jsx("span",{style:{width:`${D.done*100}%`}})})]},D.key))]}),P&&o.jsxs("div",{className:"jv-compose-quote",children:[o.jsx("span",{className:"jv-compose-quote-label",children:x("composer.replying")}),o.jsx("span",{className:"jv-reply-author",children:P.name}),o.jsx("span",{className:"jv-reply-text",children:P.text||x("common.attachment")}),o.jsx("button",{type:"button","aria-label":x("composer.cancelReply"),onClick:()=>i.update(e,{quote:null}),children:"×"})]}),o.jsx(kL,{quotes:b.passages,onRemove:D=>i.update(e,$=>({passages:$.passages.filter((ne,R)=>R!==D)}))}),o.jsxs("div",{className:"ui-composer jv-composer",children:[u&&U.menu,C&&o.jsx("span",{className:"jarvy-drop-hint",role:"status",children:x("composer.drop")}),o.jsxs("label",{className:"jarvy-attach-trigger",title:x("composer.attach"),children:[o.jsx(Be,{name:"add"}),o.jsx("input",{type:"file",multiple:!0,"aria-label":x("composer.attach"),disabled:j||T||c||A.length>=5,onChange:D=>{const $=[...D.target.files??[]];D.target.value="",O($)}})]}),o.jsx("textarea",{ref:_,id:a,rows:1,maxLength:32e3,value:z,onPaste:q,placeholder:r,disabled:c,"aria-label":x("composer.input"),onChange:D=>{H(D.target.value),u&&U.track(D.target.value)},onKeyDown:D=>{u&&U.onKeyDown(D)||D.key==="Enter"&&!D.shiftKey&&!D.nativeEvent.isComposing&&(D.preventDefault(),K())},onClick:()=>{u&&U.track()},onBlur:u?U.leaves:void 0}),o.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":x("composer.send"),disabled:j||T||c||!z.trim()&&!A.length&&!b.passages.length,children:o.jsx(Be,{name:"arrow-up"})})]})]})}function iB({messages:e,members:a,me:i,activeQuestion:r,onSettled:c,onPreview:u,onQuote:d,onReact:f,onFold:m,onJump:v,onError:y,bot:p}){const b=WS();return o.jsx(o.Fragment,{children:e.map((j,S)=>{const k=e[S-1],C=e[S+1],E=j.role==="assistant"&&!!(C!=null&&C.question)&&C.senderId===j.senderId,M=j.folded;return o.jsxs(w.Fragment,{children:[Ng(j.createdAt,k==null?void 0:k.createdAt)&&o.jsx(n5,{time:j.createdAt}),o.jsxs("div",{className:`ui-message-row ${j.role==="user"?"ui-user":""}`,"data-message":j.id,"data-asks":E||void 0,"data-shut":M||void 0,tabIndex:-1,children:[j.role==="assistant"&&o.jsx("span",{className:"jarvy-bubble-avatar",children:o.jsx(oo,{color:(p==null?void 0:p.color)??"gray",mood:p==null?void 0:p.mood,size:22,crown:p==null?void 0:p.agent})}),o.jsxs("div",{className:"jv-dm-stack",children:[t5(j,k)&&o.jsx(f0,{time:j.createdAt,className:"jv-dm-time"}),M?o.jsx("div",{className:"ui-bubble jv-folded-bubble",children:o.jsx(e5,{message:j})}):o.jsxs(o.Fragment,{children:[j.replyTo&&o.jsx(KS,{message:j,members:a,onJump:v}),j.question?o.jsx(qS,{message:{...j,question:j.question},keyboard:j.id===r,onSettled:c}):o.jsxs("div",{className:"ui-bubble",children:[j.content&&o.jsx(JS,{whole:b.has(j.id),children:o.jsx($S,{message:j,members:a,me:i,onJump:v})}),j.attachments.length>0&&o.jsx(HS,{files:j.attachments,onOpen:T=>u(j.attachments,T)})]}),o.jsx(QS,{message:j,me:i,members:a,onReact:f,onError:y})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[o.jsx(ZS,{message:j,me:i,onReply:d,onReact:f,onError:y}),o.jsx(ct,{icon:j.folded?"unfold":"fold",label:x(j.folded?"actions.unfold":"actions.fold"),onClick:()=>{j.folded&&b.add(j.id),m(j,!j.folded)}})]})]})]},j.id)})})}function rB(e,a,i,r,c,u=0){const v=a.offsetWidth,y=a.offsetLeft,p=a.offsetTop,b=Math.max(300,Math.round(i*.4));e.style.maxHeight="";const j=e.hasAttribute("data-fit"),S=e.offsetHeight,k=D=>D==="left"||D==="right",C=D=>D==="left"?y-10-8:D==="right"?i-y-v-10-8:D==="below"?r-p-v-10-8:p-10-8,E=y+v/2>i/2,M=D=>j?k(D)?Math.min(b,Math.max(160,C(D))):Math.min(b,E?y+v-8:i-y-8):e.offsetWidth,T=D=>k(D)?M(D)<=C(D):Math.min(120,S)<=C(D),_=u>.05?"right":u<-.05?"left":null,A=(_==="left"||_===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(T)??(C("below")>=C("above")?"below":"above"),P=e.dataset.side,U=P!==void 0&&P!==A&&k(P)===k(A)&&T(P)&&C(P)+40>=C(A)?P:A,O=j&&(U==="left"||!k(U)&&E),G=U==="left"?y-10:U==="right"?y+v+10:E?y+v:y;e.style.width="",e.style.maxWidth=j?`${M(U)}px`:"",O?(e.style.left="",e.style.right=`${i-G}px`):(e.style.right="",j&&(e.style.left=`${G}px`));const q=e.offsetWidth,Q=j?O?G-q:G:U==="left"?y-10-q:U==="right"?y+v+10:Math.min(Math.max(8,y+v-q),Math.max(8,i-q-8)),V=c&&Q<c.right&&Q+q>c.left?c.bottom+6:0,Y=Math.min(Math.max(8,V),Math.max(8,r-140));let K;U==="below"?(K=Math.max(8,Math.min(p+v+10,r-8-Math.min(S,120))),e.style.maxHeight=`${Math.max(40,r-K-8)}px`):U==="above"?(e.style.maxHeight=`${Math.max(40,p-10-Y)}px`,K=Math.max(Y,p-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,r-Y-8)}px`,K=Math.min(Math.max(Y,p+6),Math.max(Y,r-e.offsetHeight-8))),j||(e.style.left=`${Q}px`),e.style.top=`${K}px`,e.dataset.side=U,e.style.setProperty("--npc-tail",k(U)?`${Math.min(e.offsetHeight-18,Math.max(18,p+v/2-K))}px`:`${Math.min(q-18,Math.max(18,y+v/2-Q))}px`)}const jb=.06,lB=matchMedia("(prefers-reduced-motion: reduce)");function xd({text:e,limit:a,streaming:i=!1}){const[,r]=w.useState(0),c=w.useRef({text:"",count:0,rate:jb,at:performance.now()}),u=performance.now(),d=c.current;d.count=Math.min(d.text.length,d.count+d.rate*(u-d.at)),d.at=u,e!==d.text&&(d.text=e,d.count=Math.min(d.count,e.length),d.rate=Math.max(jb,(e.length-d.count)/a));const f=!lB.matches&&d.count<e.length;w.useEffect(()=>{if(!f)return;const v=requestAnimationFrame(()=>r(y=>y+1));return()=>cancelAnimationFrame(v)});const m=f?e.slice(0,Math.floor(d.count)).replace(/[\uD800-\uDBFF]$/,""):e;return o.jsxs(o.Fragment,{children:[m,(f||i)&&o.jsx("i",{className:"jv-npc-caret"})]})}function oB({className:e,children:a,onReading:i}){const r=w.useRef(null),c=w.useRef(null),u=w.useRef(i),[d,f]=w.useState(!1);return u.current=i,w.useEffect(()=>{const m=r.current,v=c.current;if(!m||!v)return;let y=!0,p=0;const b=()=>{m.scrollTop=m.scrollHeight,p=m.scrollTop},j=()=>{y&&b(),f(m.scrollTop>1)},S=()=>{const C=m.scrollHeight-m.scrollTop-m.clientHeight<4;C&&!y?(y=!0,p=m.scrollTop,u.current(!1)):!C&&y&&(m.scrollTop<p-1?(y=!1,u.current(!0)):b()),f(m.scrollTop>1)},k=new ResizeObserver(j);return k.observe(v),k.observe(m),j(),m.addEventListener("scroll",S,{passive:!0}),()=>{k.disconnect(),m.removeEventListener("scroll",S),u.current(!1)}},[]),o.jsx("span",{ref:r,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:o.jsx("span",{ref:c,children:a})})}const p5={think:cC,mutter:$C,read:yC,write:OC,run:GC,script:dC,compact:iC,retry:C0,ask:Gj,say:AC,chat:Zj,tool:ZC},h0=e=>x("npc.duration",{value:zi(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),sB={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function cB({view:e,name:a,cat:i,area:r,avoid:c,layout:u,facing:d,toolbar:f}){var G,q,Q;const m=w.useRef(null),v=w.useRef(null),[y,p]=w.useState(!1),[,b]=w.useState(0);w.useLayoutEffect(()=>{u.current=()=>{var $;if(!m.current||!i.current||!r.current)return;const Y=r.current.getBoundingClientRect(),K=c.current?c.current.getBoundingClientRect().top-Y.top:Y.height,D=($=v.current)==null?void 0:$.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),rB(m.current,i.current,Y.width,K,D?{left:D.left-Y.left,right:D.right-Y.left,bottom:D.bottom-Y.top}:null,d())},u.current();const V=new ResizeObserver(()=>{var Y;return(Y=u.current)==null?void 0:Y.call(u)});for(const Y of[m.current,v.current])Y&&V.observe(Y);return()=>{V.disconnect(),u.current=null}},[y]);const j=e.steps.some(V=>V.state==="running");w.useEffect(()=>{if(!y||!j)return;const V=setInterval(()=>b(Y=>Y+1),200);return()=>clearInterval(V)},[y,j]),w.useEffect(()=>{if(!y)return;const V=Y=>{Y.key==="Escape"&&p(!1)};return addEventListener("keydown",V),()=>removeEventListener("keydown",V)},[y]);const S=(G=e.steps[0])==null?void 0:G.id;w.useEffect(()=>{p(!1)},[S]);const[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState(null),z=k||E;w.useEffect(()=>{var V;_(z?((V=e.shown)==null?void 0:V.id)??null:null)},[z]);const A=T&&e.steps.find(V=>V.id===T)||e.shown,P=A?A.look:e.done?"action":null;let H=null;if((A==null?void 0:A.look)==="thought"||(A==null?void 0:A.look)==="mutter"){const V=(A.line??"").replace(/\n\s*\n\s*/g,`
557
+
558
+ `).trim(),Y=o.jsx(xd,{text:V,limit:300,streaming:A.look==="thought"&&A.state==="running"},A.id),[K,D]=x("npc.mutter",{text:""}).split("");H=o.jsx(oB,{className:A.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:M,children:A.look==="thought"?Y:o.jsxs(o.Fragment,{children:[K,Y,D]})},A.id)}else if((A==null?void 0:A.look)==="speech")H=o.jsx("span",{className:"jv-npc-speech",children:o.jsx(xd,{text:A.line??"",limit:1500,streaming:A.state==="running"&&A.icon==="say"},A.id)});else if(A){const V=p5[A.icon];H=o.jsxs("span",{className:"jv-npc-action","data-state":A.state,children:[o.jsx(V,{}),o.jsx(xd,{text:A.title,limit:300},A.id),A.state==="running"&&o.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(H=o.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?o.jsx(Qn,{}):o.jsx(ds,{}),o.jsx(xd,{text:x(sB[e.done.outcome],{duration:h0(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const U=e.steps.length>0,O=(A==null?void 0:A.icon)==="ask"&&A.state==="running";return w.useEffect(()=>{H||C(!1)},[!H]),o.jsxs(o.Fragment,{children:[f==null?void 0:f(v,()=>p(!1)),o.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:P??void 0,"data-kind":A==null?void 0:A.icon,"data-fading":!y&&!A&&((q=e.done)==null?void 0:q.fading)||void 0,hidden:!y&&!H,onPointerEnter:V=>{V.pointerType==="mouse"&&C(!0)},onPointerLeave:()=>C(!1),children:y?o.jsxs("section",{className:"jv-npc-panel","aria-label":x("npc.panel"),children:[o.jsxs("header",{children:[o.jsx("strong",{children:x("npc.panel")}),e.startedAt>0&&o.jsx("span",{children:h0((e.endedAt??Date.now()+e.skew)-e.startedAt)}),o.jsx("button",{type:"button",onClick:()=>p(!1),"aria-label":x("npc.collapse"),title:x("npc.collapse"),children:o.jsx(MC,{})})]}),o.jsx("ol",{children:e.steps.map(V=>o.jsx(uB,{step:V,skew:e.skew},V.id))})]}):o.jsxs(o.Fragment,{children:[P==="speech"&&o.jsxs("span",{className:"jv-npc-name",children:[a,(A==null?void 0:A.to)&&o.jsx("em",{children:x("npc.to",{chat:A.to})})]}),U?o.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>p(!0),title:x("npc.expand"),onKeyDown:V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),p(!0))},children:H}):o.jsx("div",{className:"jv-npc-line",children:H}),O&&e.answer&&((Q=A.options)==null?void 0:Q.some(V=>V.value))&&o.jsx("div",{className:"jv-npc-options",children:A.options.map(V=>o.jsx("button",{type:"button",onClick:()=>e.answer(V.value),children:V.label},V.label))}),O&&!e.answer&&A.hint&&o.jsx("p",{className:"jv-npc-hint",children:A.hint})]})})]})}function uB({step:e,skew:a}){const[i,r]=w.useState(!1),c=p5[e.icon],u=e.detail;return o.jsxs("li",{"data-state":e.state,style:e.depth?{paddingLeft:`${e.depth*16}px`}:void 0,children:[o.jsxs("button",{type:"button","aria-expanded":u?i:void 0,disabled:!u,onClick:()=>r(d=>!d),children:[o.jsx(c,{className:"jv-npc-kind"}),o.jsx("span",{className:"jv-npc-title",children:e.title}),o.jsxs("span",{className:"jv-npc-state",children:[e.state==="running"?o.jsx(qj,{}):e.state==="ok"?o.jsx(Qn,{}):o.jsx(ds,{}),x(`npc.state.${e.state}`)]}),o.jsx("span",{className:"jv-npc-time",children:h0((e.endedAt??Date.now()+a)-e.startedAt)}),u&&o.jsx(al,{className:"jv-npc-chevron"})]}),i&&u&&o.jsx("pre",{"data-kind":e.icon,children:u})]})}const Md="src/web/thread/ThreadPane.tsx",Yd="npm run build",dB=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
559
+ `),fB=["> tsc -p tsconfig.web.json","src/web/thread/ThreadPane.tsx:58:41 - error TS2345: Argument of type","'HTMLDivElement | null' is not assignable to parameter of type 'HTMLDivElement'.","","Found 1 error."].join(`
560
+ `),g5={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},hB=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:Md,ms:2600,output:dB},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:Md,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
561
+ `)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:Yd,ms:3200,failed:!0,output:fB},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:Md,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:Yd,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
562
+ `)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...g5},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],m0=[{key:"sleep",label:"npc.pose.sleep",motion:"sleep"},{key:"idle",label:"npc.pose.idle",motion:"idle"},{key:"think",label:"npc.pose.think",motion:"think",step:{kind:"think",text:"npc.demo.think1"}},{key:"mutter",label:"npc.pose.mutter",motion:"work",step:{kind:"mutter",text:"npc.demo.mutter2"}},{key:"say",label:"npc.pose.say",motion:"turn",step:{kind:"say",text:"npc.demo.replyNo"}},{key:"ask",label:"npc.pose.ask",motion:"ask",step:{kind:"ask",...g5}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:Md}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:Yd}},{key:"compact",label:"npc.pose.compact",motion:"yawn",step:{kind:"compact"}},{key:"busy",label:"npc.pose.busy",motion:"busy"},{key:"failed",label:"npc.pose.failed",motion:"idle",mood:"dizzy",shake:!0,step:{kind:"run",target:Yd,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function mB({controls:e,onReplay:a,toolbar:i}){const[r,c]=w.useState(!1);return o.jsxs("div",{ref:i,className:"jv-npc-toolbar",role:"toolbar","aria-label":x("npc.toolbar"),children:[o.jsxs("div",{className:"jv-npc-toolbar-row",children:[o.jsx("span",{children:x("npc.toolbar")}),o.jsx("button",{type:"button",className:"jv-npc-icon",onClick:a,"aria-label":x("npc.replay"),title:x("npc.replay"),children:o.jsx(PC,{})}),o.jsxs(gr,{value:e.baseMood,onValueChange:u=>e.setBaseMood(u),children:[o.jsx(yr,{className:"jv-npc-mood","aria-label":x("npc.mood"),title:x("npc.mood"),children:o.jsx(vr,{})}),o.jsx(xr,{className:"jv-select-menu",position:"popper",sideOffset:4,children:Yz.map(u=>o.jsx(sa,{value:u,children:x(`npc.mood.${u}`)},u))})]}),o.jsxs("button",{type:"button",className:"jv-npc-toggle","aria-expanded":r,onClick:()=>c(u=>!u),children:[o.jsx(UC,{}),x("npc.poses")]})]}),r&&o.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":x("npc.poses"),children:m0.map(u=>{var d;return o.jsx("button",{type:"button","aria-pressed":((d=e.pose)==null?void 0:d.key)===u.key,onClick:()=>e.hold(u.key),children:x(u.label)},u.key)})})]})}const pB={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},wb=e=>e.text?[...x(e.text)].slice(0,e.typed).join(""):"";function gB(e){var r;if(e.kind==="think"||e.kind==="mutter")return x(`npc.step.${e.kind}`);if(e.kind==="ask"&&e.answer)return x("npc.step.ask.ok",{answer:x(e.answer.label)});const a=e.state==="failed"&&e.kind==="run"?"failed":e.state==="running"?"running":"ok",i=e.kind==="say"&&e.to?"post":e.kind;return x(`npc.step.${i}.${a}`,{target:((r=e.target)==null?void 0:r.split("/").pop())??"",chat:e.to?`#${x(e.to)}`:""})}function Sb(e){var r;const a=e.kind==="think"?"thought":e.kind==="mutter"?"mutter":e.kind==="say"||e.kind==="ask"?"speech":"action",i=e.kind==="ask"?x(e.question):wb(e);return{id:String(e.id),look:a,icon:pB[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:gB(e),line:a==="action"?void 0:i,to:e.to?`#${x(e.to)}`:void 0,options:e.kind==="ask"&&e.state==="running"?(r=e.options)==null?void 0:r.map(c=>({label:x(c.label),value:c.value})):void 0,detail:e.kind==="ask"?x(e.question):e.text?wb(e):e.output}}const bp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},vB=40,kb=6e3,Cb=500,yB={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class jp extends Error{}const xB=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...x(e.text)].length:0});function bB(e,a){const[i,r]=w.useState(bp),[c,u]=w.useState(a),[d,f]=w.useState(0),[m,v]=w.useState(null),[,y]=w.useState(0),p=w.useRef(null);w.useEffect(()=>{if(!e||m)return;let _=!0;const z=new Set,A=O=>new Promise((G,q)=>{const Q=setTimeout(()=>{z.delete(Q),_?G():q(new jp)},O);z.add(Q)}),P=(O,G)=>r(q=>({...q,steps:q.steps.map(Q=>Q.id===O?{...Q,...G}:Q)})),H=(O,G)=>r(q=>({...q,flash:{mood:O,until:Date.now()+G}})),U=async(O,G,q)=>{const Q=[...x(G)].length,V=q?Math.max(16,q/Q):vB;for(let Y=1;Y<=Q;Y++)P(O,{typed:Y}),await A(V)};return(async()=>{r({...bp}),await A(700);const O=Date.now();let G="";r(Q=>({...Q,phase:"turn",startedAt:O}));for(const[Q,V]of hB.entries()){const{ms:Y,failed:K,replies:D,...$}=V,ne=D?D[G]:V.text;if(r(R=>({...R,steps:[...R.steps,{...$,text:ne,id:Q,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),V.kind==="ask"){if(G=await new Promise(R=>{p.current=R}),p.current=null,!_)throw new jp;P(Q,{state:"ok",endedAt:Date.now(),answer:V.options.find(R=>R.value===G)});continue}ne?await U(Q,ne,V.kind==="think"?Y??null:null):await A(Y??1e3),(V.kind==="mutter"||V.kind==="say")&&await A(1100),P(Q,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(r(R=>({...R,shake:R.shake+1})),H("dizzy",2600),await A(900))}const q=Date.now();for(r(Q=>({...Q,phase:"stretch",endedAt:q,recapUntil:q+kb})),q-O>2e4&&H("happy",3200),await A(2200);;)r(Q=>({...Q,phase:"idle"})),await A(9e3),r(Q=>({...Q,phase:"groom"})),await A(2800)})().catch(O=>{if(!(O instanceof jp))throw O}),()=>{var O;_=!1;for(const G of z)clearTimeout(G);(O=p.current)==null||O.call(p,"")}},[e,d,m]),w.useEffect(()=>{var P;const _=Date.now(),z=[((P=i.flash)==null?void 0:P.until)??0,i.recapUntil-Cb,i.recapUntil].filter(H=>H>_);if(!z.length)return;const A=setTimeout(()=>y(H=>H+1),Math.min(...z)-_+20);return()=>clearTimeout(A)});const b=m0.find(_=>_.key===m)??null,j=Date.now(),S=b?null:i.phase==="turn"?[...i.steps].reverse().find(_=>_.state==="running")??null:null,k=b?b.motion:S?yB[S.kind]:i.phase==="stretch"?"stretch":i.phase==="groom"?"groom":i.phase==="turn"?"think":"idle",C=i.flash&&i.flash.until>j?i.flash.mood:null,E=i.endedAt!==null&&j<i.recapUntil,M=b?b.step?xB(b.step):null:S??(i.phase==="turn"?i.steps.at(-1)??null:null);return{...{view:{steps:i.steps.map(Sb),shown:M?Sb(M):null,startedAt:i.startedAt,endedAt:i.endedAt,skew:0,answer:_=>{var z;return(z=p.current)==null?void 0:z.call(p,_)},done:b!=null&&b.done?{ms:31400,outcome:"completed",fading:!1}:!b&&E?{ms:i.endedAt-i.startedAt,outcome:"completed",fading:j>=i.recapUntil-Cb}:null},motion:k,fast:b?!!b.fast:(S==null?void 0:S.kind)==="write"||(S==null?void 0:S.kind)==="run",mood:(b==null?void 0:b.mood)??C??c,shake:i.shake,canRecap:!b&&i.endedAt!==null&&!E,showRecap:()=>r(_=>({..._,recapUntil:Date.now()+kb}))},controls:{pose:b,baseMood:c,setBaseMood:u,replay:()=>{v(null),f(_=>_+1)},hold:_=>{v(_),r(z=>{var A;return{...bp,shake:z.shake+((A=m0.find(P=>P.key===_))!=null&&A.shake?1:0)}})}}}}const jB=4e3,Nb={turn:null,last:null,skew:0};function wB(e,a){const i=[...e.steps];let r=e.dropped;for(const c of a)if(c.op==="step"){const u=i.findIndex(d=>d.id===c.step.id);u>=0?i[u]=c.step:i.push(c.step)}else if(c.op==="text"){const u=i.findIndex(v=>v.id===c.id),d=i[u];if(!d)continue;const f=(d.text??"")+c.append,m=Math.max(0,f.length-jB);i[u]={...d,text:f.slice(m),omitted:(d.omitted??0)+m}}else{const u=i.findIndex(d=>d.id===c.id);u>=0&&(i.splice(u,1),r++)}return{...e,steps:i,dropped:r}}function SB(e){const[a,i]=w.useState(Nb);return w.useEffect(()=>{if(i(Nb),!e)return;const r=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),c=u=>JSON.parse(u.data);return r.addEventListener("snapshot",u=>{const d=c(u);i(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),r.addEventListener("start",u=>{const{turn:d}=c(u);i(f=>({...f,turn:d}))}),r.addEventListener("patch",u=>{const{patches:d}=c(u);i(f=>f.turn?{...f,turn:wB(f.turn,d)}:f)}),r.addEventListener("end",u=>{const{outcome:d,endedAt:f}=c(u);i(m=>m.turn?{...m,turn:null,last:{...m.turn,outcome:d,endedAt:f}}:m)}),()=>r.close()},[e]),a}const wp=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),_i=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",Sp=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",kB=e=>{const a=(e??"").split(`
563
+ `)[0].trim();return a.length>40?`${a.slice(0,39)}…`:a},Eb=e=>e.type==="channel"?`#${e.title}`:e.title;function kp(e){return e?e.omitted?`${e.head}
564
+ ${x("npc.live.omitted",{count:zi(e.omitted)})}
565
+ ${e.tail}`:e.head+e.tail:""}const Tb=e=>e.omitted?`${x("npc.live.omitted",{count:zi(e.omitted)})}
566
+ `:"";function Cp(e){switch(e.icon){case"think":return{motion:"think",fast:!1};case"mutter":return{motion:"work",fast:!1};case"read":case"chat":return{motion:"read",fast:!1};case"say":return{motion:"turn",fast:!1};case"ask":return{motion:"ask",fast:!1};case"compact":return{motion:"yawn",fast:!1};case"retry":return{motion:"busy",fast:!1};default:return{motion:"work",fast:!0}}}function CB(e,a,i){const r={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:a},c=(m,v,y)=>({...r,look:"action",icon:m,title:v,detail:y});switch(e.kind){case"thinking":return{...r,look:"thought",icon:"think",title:x("npc.step.think"),line:e.text??"",detail:Tb(e)+(e.text??"")};case"text":return{...r,look:"mutter",icon:"mutter",title:x("npc.step.mutter"),line:e.text??"",detail:Tb(e)+(e.text??"")};case"compaction":return c("compact",x(`npc.live.compact.${_i(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?x("npc.live.tokens",{before:zi(e.tokensBefore),after:zi(e.tokensAfter)}):kp(e.output));case"retry":return c("retry",e.state==="running"?x("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):x(`npc.live.retry.${_i(e)}`),kp(e.output))}const u=e.input??{},d=kp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
567
+
568
+ `);switch(e.tool){case"read":return c("read",x(`npc.live.read.${_i(e)}`,{target:Sp(u.path)}),f);case"edit":return c("write",x(`npc.live.edit.${_i(e)}`,{target:Sp(u.path)}),f);case"write":return c("write",x(`npc.live.write.${_i(e)}`,{target:Sp(u.path)}),f);case"bash":return c("run",x(`npc.live.run.${_i(e)}`,{target:kB(u.command)}),f);case"codemode":return c("script",x(`npc.live.script.${_i(e)}`),f);case"chat":return NB(e,r,i,d);default:return c("tool",x(`npc.live.tool.${_i(e)}`,{tool:e.tool??""}),f)}}function NB(e,a,i,r){const c=e.input??{},u=c.action??"",d=c.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==i)?Eb(d):void 0;if(u==="messages.send")return{...a,look:"speech",icon:"say",to:f,line:c.text??"",detail:[c.text,e.state==="failed"?r:""].filter(Boolean).join(`
569
+
570
+ `),title:e.state==="failed"?x("npc.live.sendFailed"):f?x(`npc.step.post.${e.state==="running"?"running":"ok"}`,{chat:f}):x(`npc.step.say.${e.state==="running"?"running":"ok"}`)};if(u==="messages.ask"){const y=EB(e);return{...a,look:"speech",icon:"ask",to:f,line:c.text??"",options:(c.options??[]).map(p=>({label:p})),hint:f?x("npc.live.answerIn",{chat:f}):x("npc.live.answerBelow"),detail:[c.text,...(c.options??[]).map(p=>`· ${p}`),r].filter(Boolean).join(`
571
+ `),title:e.state==="running"?x("npc.step.ask.running"):y?x("npc.step.ask.ok",{answer:y}):x(e.state==="failed"?"npc.live.askFailed":"npc.live.askClosed")}}if(u==="environments.switch")return{...a,look:"action",icon:"tool",title:x(`npc.live.switch.${_i(e)}`),detail:r};const m=d?Eb(d):"",v=wp.has(u)?m?x(`npc.live.browse.${e.state==="running"?"running":"ok"}`,{chat:m}):x(`npc.live.browseAll.${e.state==="running"?"running":"ok"}`):x(`npc.live.tool.${_i(e)}`,{tool:u||"chat"});return{...a,look:"action",icon:wp.has(u)?"chat":"tool",title:e.state==="failed"&&wp.has(u)?x("npc.live.tool.failed",{tool:u}):v,detail:r}}function EB(e){try{const a=JSON.parse(e.output?e.output.head+e.output.tail:"");return a.status!=="answered"?null:[...(a.selected??[]).map(i=>i.label??""),a.custom??""].filter(Boolean).join(x("common.listSeparator"))}catch{return null}}function Ab(e,a){const i=new Map(e.steps.map(c=>[c.id,c.parentId])),r=c=>{let u=0,d=c.parentId;for(;d&&u<4;)u++,d=i.get(d)??null;return u};return e.steps.map(c=>CB(c,r(c),a))}function bd(e){var i;const a=((i=e.line)==null?void 0:i.length)??0;if(e.look==="speech"){const r=Math.min(7e3,Math.max(2500,1500+50*a))+Math.min(1500,a/.06);return{firm:r,light:r}}return e.look==="mutter"?{firm:1500,light:Math.min(3500,Math.max(1500,800+30*a))}:e.state==="failed"?{firm:2e3,light:2e3}:{firm:0,light:e.look==="action"?900:0}}const TB=4e3,_b=1500;function Mb(e,a,i,r){var j;const c=S=>S-i;let u=null;for(const S of e)S.state==="running"&&(!u||S.startedAt>=u.startedAt)&&(u=S);const d=[];for(const S of e.filter(k=>k.state!=="running"&&k.endedAt!==null&&bd(k).firm).sort((k,C)=>k.endedAt-C.endedAt)){const k=c(S.endedAt),C=d.at(-1);C&&S.look==="speech"&&(C.end=Math.min(C.end,Math.max(C.start+_b,k)));const E=Math.max(k,(C==null?void 0:C.end)??0);E-k>TB||d.push({step:S,start:E,end:E+bd(S).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const S=c(f.startedAt);for(let k=d.length-1;k>=0;k--){const C=d[k];C.start>=S&&C.start>a?d.splice(k,1):C.end>S&&(C.end=Math.max(C.start+_b,S))}}let m=null;for(const S of e){if(S.state==="running"||S.endedAt===null||!bd(S).light)continue;const k=c(S.endedAt)+bd(S).light;k>a&&(!m||S.endedAt>=m.step.endedAt)&&(m={step:S,end:k})}const v=d.find(S=>S.start<=a&&a<S.end),y=(v==null?void 0:v.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),p=y??f??u??(r?e.at(-1)??null:null),b=[...d.flatMap(S=>[S.start,S.end]),(m==null?void 0:m.end)??0].filter(S=>S>a);return{shown:p,lingering:!!y,next:b.length?Math.min(...b):0,wordsEnd:((j=d.at(-1))==null?void 0:j.end)??0}}const Rb=6e3,Db=500,Ob=2200,AB=2e4,_B=10*6e4,zb=3e4,MB=2e4,RB=2800;function DB(e,a,i,r,c){var G;const{turn:u,last:d,skew:f}=SB(e),[m,v]=w.useState(null),[y,p]=w.useState(0),[b,j]=w.useState(0),[,S]=w.useState(0),k=w.useRef(new Set),C=w.useRef(Date.now()),E=w.useMemo(()=>u?Ab(u,a):d?Ab(d,a):[],[u,d,a]);w.useEffect(()=>{for(const q of(u==null?void 0:u.steps)??[])q.state==="failed"&&!k.current.has(q.id)&&(k.current.add(q.id),p(Q=>Q+1),v({mood:"dizzy",until:Date.now()+2600}))},[u]),w.useEffect(()=>{d&&(k.current.clear(),C.current=Date.now(),j(Math.max(Date.now(),Mb(E,Date.now(),f,!1).wordsEnd)+Rb),d.outcome==="completed"&&d.endedAt-d.startedAt>AB&&v({mood:"happy",until:Date.now()+3200}))},[d]),w.useEffect(()=>{u&&(C.current=Date.now())},[u!==null]);const M=Date.now(),T=Mb(E,M,f,u!==null),_=T.shown,z=E.filter(q=>q.state==="running").sort((q,Q)=>Q.startedAt-q.startedAt)[0],A=!u&&(d==null?void 0:d.outcome)==="completed"&&M+f-d.endedAt<Ob,P=M-C.current,H=!u&&(i==null?void 0:i.status)==="idle"&&P>zb&&(P-zb)%MB<RB,U=z&&z.look!=="thought"?Cp(z):T.lingering&&_?Cp(_):z?Cp(z):u?{motion:"think",fast:!1}:A?{motion:"stretch",fast:!1}:H?{motion:"groom",fast:!1}:c,O=!u&&!_&&d!==null&&M<b;return w.useEffect(()=>{const q=[(m==null?void 0:m.until)??0,b-Db,b,((d==null?void 0:d.endedAt)??0)-f+Ob,T.next].filter(V=>V>Date.now()),Q=setTimeout(()=>S(V=>V+1),q.length?Math.min(...q)-Date.now()+20:1e3);return()=>clearTimeout(Q)}),{view:{steps:E,shown:_,skew:f,startedAt:((G=u??d)==null?void 0:G.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:O?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:M>=b-Db}:null},motion:U.motion,fast:U.fast,mood:m&&m.until>M?m.mood:r,shake:y,canRecap:!u&&d!==null&&!O&&M+f-d.endedAt<_B,showRecap:()=>j(Date.now()+Rb)}}const v5="jarvy-floating-bot",ns=10,OB=4,jd=new URLSearchParams(location.search).get("npc")==="demo";function zB(e){return!e||e.status==="stop"?{motion:"sleep",fast:!1}:e.status!=="running"||e.activity==="asking"?{motion:"idle",fast:!1}:["compacting","retrying","aborting"].includes(e.phase)?{motion:"busy",fast:!1}:e.activity==="tool_calling"||e.phase==="tool"?{motion:"work",fast:!0}:e.activity==="texting"||e.phase==="texting"?{motion:"work",fast:!1}:{motion:"think",fast:!1}}function LB(){try{const e=JSON.parse(localStorage.getItem(v5)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function BB({bot:e,chatId:a,status:i,area:r,avoid:c,onOpen:u}){const d=w.useRef(null),f=w.useRef(null),m=w.useRef(LB()),v=w.useRef(null),y=w.useRef(!1),p=w.useRef(null),b=w.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),j=w.useRef(null),[S,k]=w.useState(!1),C=w.useRef(null),E=bB(jd,e.mood),M=DB(jd?null:e.id,a,i,e.mood,zB(i)),T=jd?E:M;b.current.motion=T.motion,b.current.fast=T.fast,b.current.mood=T.mood;function _(){const H=r.current.getBoundingClientRect(),U=d.current.offsetWidth,O=c.current?c.current.getBoundingClientRect().top-H.top:H.height,G=Math.max(ns,H.width-U-ns),q=Math.max(ns,O-U-ns);return{minX:ns,minY:ns,maxX:G,maxY:q}}function z(){var G;const H=(G=r.current)==null?void 0:G.getBoundingClientRect(),U=d.current;if(!H||!U)return 0;const O=H.width/2-U.offsetWidth/2;return O>0?Math.max(-1,Math.min(1,(O-U.offsetLeft)/O)):0}function A(){var O;if(!d.current||!r.current)return;const H=_(),U=d.current;U.style.left=`${H.minX+m.current.x*(H.maxX-H.minX)}px`,U.style.top=`${H.minY+m.current.y*(H.maxY-H.minY)}px`,(O=C.current)==null||O.call(C)}w.useLayoutEffect(()=>{A();const H=new ResizeObserver(A);for(const U of[r.current,c.current,d.current])U&&H.observe(U);return()=>H.disconnect()},[]),w.useEffect(()=>{var H;(H=j.current)==null||H.setColor((Va[e.color]??Va.gray).hex)},[e.color]),w.useEffect(()=>{var H;(H=j.current)==null||H.setCrown(e.agent)},[e.agent]);const P=i!=null&&i.error?`${i.runId??""}:${i.error}`:null;return w.useEffect(()=>{var H;P&&((H=j.current)==null||H.shake(performance.now()))},[P]),w.useEffect(()=>{var H;T.shake&&((H=j.current)==null||H.shake(performance.now()))},[T.shake]),w.useEffect(()=>{const H=G=>{(G.pointerType==="mouse"||G.type==="pointerdown")&&(p.current={x:G.clientX,y:G.clientY})},U=G=>{G.relatedTarget||(p.current=null)},O=G=>{const q=G.target;if(q.id!=="jarvy-composer")return;const Q=q.getBoundingClientRect();p.current={x:Q.left+Q.width/2,y:Q.top+Q.height/2}};return window.addEventListener("pointermove",H),window.addEventListener("pointerdown",H),document.addEventListener("pointerout",U),document.addEventListener("input",O),document.addEventListener("focusin",O),()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerdown",H),document.removeEventListener("pointerout",U),document.removeEventListener("input",O),document.removeEventListener("focusin",O)}},[]),w.useEffect(()=>{let H=!0,U=0,O=()=>{};const G=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([Vd(()=>import("./three.module-BdMZo7zQ.js"),[]),Vd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([q,Q])=>{if(!H||!f.current)return;const V=new q.WebGLRenderer({canvas:f.current,antialias:!0,alpha:!0});Q.configureRenderer(q,V);const{scene:Y,camera:K}=Q.createStage(q),D=new Q.CatFigure(q,(Va[e.color]??Va.gray).hex);D.setCrown(e.agent),D.pose(b.current.mood),Y.add(D.root),Q.frameCamera(K,1,3.3),j.current=D;let $=0;const ne=le=>{var B;const ie=d.current;if(ie){const F=Math.round(ie.offsetWidth*Math.min(2,devicePixelRatio||1));F!==$&&($=F,V.setSize(F,F,!1));const se=ie.getBoundingClientRect(),ye=p.current;b.current.lookX=ye?Math.max(-1,Math.min(1,(ye.x-se.left-se.width/2)/320)):0,b.current.lookY=ye?Math.max(-1,Math.min(1,(ye.y-se.top-se.height/2)/320)):0,b.current.reduced=G.matches;const we=b.current.motion,ce=!!((B=v.current)!=null&&B.moved)&&(we==="idle"||we==="groom"||we==="stretch");(b.current.faceX===void 0||!(ce||we==="sleep"))&&(b.current.faceX=z()),D.frame(le,b.current),V.render(Y,K)}U=requestAnimationFrame(ne)},R=()=>{cancelAnimationFrame(U),document.hidden||(U=requestAnimationFrame(ne))};document.addEventListener("visibilitychange",R),R(),k(!0),O=()=>{document.removeEventListener("visibilitychange",R),cancelAnimationFrame(U),D.dispose(),V.dispose(),V.forceContextLoss(),j.current=null}}).catch(()=>{}),()=>{H=!1,O()}},[]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":S||void 0,"data-motion":T.motion,title:e.name,"aria-label":x("avatar.openInfo",{name:e.name}),onPointerDown:H=>{if(H.button!==0)return;const U=H.currentTarget;U.setPointerCapture(H.pointerId),v.current={id:H.pointerId,x:H.clientX,y:H.clientY,left:U.offsetLeft,top:U.offsetTop,moved:!1}},onPointerMove:H=>{const U=v.current;if(!U||U.id!==H.pointerId)return;const O=H.clientX-U.x,G=H.clientY-U.y;if(!U.moved&&Math.hypot(O,G)<OB)return;U.moved=!0;const q=_(),Q=Math.min(q.maxX,Math.max(q.minX,U.left+O)),V=Math.min(q.maxY,Math.max(q.minY,U.top+G));m.current={x:q.maxX>q.minX?(Q-q.minX)/(q.maxX-q.minX):0,y:q.maxY>q.minY?(V-q.minY)/(q.maxY-q.minY):0},A()},onPointerUp:H=>{const U=v.current;!U||U.id!==H.pointerId||(v.current=null,y.current=U.moved,U.moved&&localStorage.setItem(v5,JSON.stringify(m.current)))},onPointerCancel:()=>{v.current=null},onClick:()=>{if(y.current){y.current=!1;return}T.canRecap?T.showRecap():u()},style:{"--jv-avatar-size":"100%"},children:[o.jsx("canvas",{ref:f,"aria-hidden":"true"}),!S&&o.jsx(oo,{color:e.color,mood:e.mood,size:88,crown:e.agent})]}),o.jsx(cB,{view:T.view,name:e.name,cat:d,area:r,avoid:c,layout:C,facing:z,toolbar:jd?(H,U)=>o.jsx(mB,{controls:E.controls,toolbar:H,onReplay:()=>{U(),E.controls.replay()}}):void 0})]})}function IB({className:e,...a}){return o.jsx("div",{"data-slot":"card",className:an("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...a})}function PB({className:e,...a}){return o.jsx("div",{"data-slot":"card-header",className:an("grid gap-1 px-5",e),...a})}function HB({className:e,...a}){return o.jsx("div",{"data-slot":"card-title",className:an("font-semibold leading-none",e),...a})}function UB({className:e,...a}){return o.jsx("div",{"data-slot":"card-content",className:an("px-5",e),...a})}function qB({bot:e,connections:a,onSaved:i,onManage:r}){return o.jsxs(IB,{className:"jarvy-model-picker jv-ui",children:[o.jsx(PB,{children:o.jsx(HB,{children:x("botModel.pickFor",{name:e.name})})}),o.jsxs(UB,{children:[o.jsx(AS,{bot:e,connections:a,onSaved:i,onManage:r}),o.jsxs("div",{className:"jv-env-setup",children:[o.jsx("h4",{children:x("environment.title")}),o.jsx(eL,{bot:e,onSaved:i})]})]})]})}function FB({chat:e,inChannel:a,bots:i,members:r,meId:c,drafts:u,composeReady:d,botName:f,activeBot:m,status:v,connections:y,activity:p,history:b,divider:j,activeQuestion:S,pane:k,onPane:C,onToggleInfo:E,find:M,onNav:T,onBot:_,hasBotDirects:z,onInvite:A,onQuote:P,onReply:H,onReact:U,onFold:O,onJump:G,onSettled:q,onSend:Q,onPreview:V,onSaveNote:Y,notice:K,createBot:D,creating:$,updateBot:ne,onManageModels:R,error:le,chatArea:ie,transcript:B,composeWrap:F,hidden:se,onOpenThread:ye}){const{messages:we,loading:ce,hasOlder:xe,loadingOlder:Ce,top:pe,away:W,unseen:je,toLatest:Re}=b;return o.jsxs("main",{className:"ui-chat","aria-label":x("chat.area"),ref:ie,hidden:se,children:[!a&&o.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:x("common.openNav"),onClick:T}),!a&&z&&o.jsx(ct,{icon:"people",className:"jv-floating-dms",label:x("chat.botDms",{name:f}),"aria-pressed":(k==null?void 0:k.kind)==="botdms",onClick:()=>C((k==null?void 0:k.kind)==="botdms"?null:{kind:"botdms"})}),o.jsx("span",{className:"sr-only",role:"status","aria-label":x("chat.botStatus"),children:a?"":p}),e?o.jsxs(o.Fragment,{children:[a?o.jsx(DL,{chat:e,members:oi(r),bots:i,onNav:T,infoOpen:(k==null?void 0:k.kind)==="info"&&k.page==="main",onInfo:()=>E("main"),membersOpen:(k==null?void 0:k.kind)==="info"&&k.page==="members",onMembers:()=>E("members"),threadsOpen:(k==null?void 0:k.kind)==="threads",onThreads:()=>C((k==null?void 0:k.kind)==="threads"?null:{kind:"threads"}),searchOpen:(k==null?void 0:k.kind)==="search",onSearch:()=>(k==null?void 0:k.kind)==="search"?C(null):M.search(e)}):m&&o.jsx(BB,{bot:m,chatId:e.id,status:v,area:ie,avoid:F,onOpen:()=>_(m.id)}),a&&o.jsx(OL,{chat:e,onSave:Y}),o.jsxs("div",{className:`ui-transcript jarvy-transcript${a?" jv-channel-transcript":""}`,ref:B,"aria-label":x("chat.transcript"),role:"log",children:[!a&&!(m!=null&&m.connectionId)&&m&&o.jsx("div",{className:"jarvy-model-onboarding",children:o.jsx(qB,{bot:m,connections:y,onSaved:ne,onManage:R})}),ce?o.jsx("p",{className:"jarvy-empty-text",children:x("chat.loading")}):we.length===0?a?o.jsx("div",{className:"jarvy-empty-chat",children:o.jsx("p",{children:x("chat.empty")})}):m!=null&&m.connectionId?o.jsx("div",{className:"jarvy-empty-chat",children:o.jsx("h2",{children:x("chat.start",{name:f})})}):null:o.jsxs(o.Fragment,{children:[xe&&o.jsx("div",{ref:pe,className:"jv-history-more","aria-live":"polite",children:Ce?x("chat.loadingOlder"):""}),a?o.jsx(Gd,{messages:we,members:r,bots:i,me:c,divider:j,activeQuestion:S,onSettled:q,onPreview:V,onReply:H,onOpenThread:ye,onQuote:P,onReact:U,onFold:O,onJump:G,onError:le}):o.jsx(iB,{messages:we,members:r,me:c,activeQuestion:S,bot:m,onSettled:q,onPreview:V,onQuote:P,onReact:U,onFold:O,onJump:G,onError:le})]}),W&&we.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button",onClick:Re,"aria-label":x("chat.toLatest"),children:[je>0&&o.jsx("span",{children:x("chat.unseen",{count:je})}),o.jsx(Be,{name:"chevron-down"})]})})]}),o.jsx(m5,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:F,scrollRef:B,disabled:!d,placeholder:a?x("chat.toChannel",{name:e.title}):m!=null&&m.connectionId?x("chat.toBot",{name:f}):x("chat.pickModel"),mention:a?{bots:i,inside:oi(r).filter(Oe=>Oe.id!==c&&e.memberIds.includes(Oe.id)),outside:oi(r).filter(Oe=>!e.memberIds.includes(Oe.id)),onInvite:Oe=>A(e.id,Oe)}:void 0,onSend:Q,onError:le,onNotice:K})]}):o.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:i.length?o.jsx("p",{children:x("chat.pick")}):o.jsxs("button",{className:"ui-button ui-primary",onClick:D,disabled:$,children:[o.jsx(Be,{name:"person-add"}),x("sidebar.newBot")]})}),e&&o.jsx(XS,{container:B,drafts:u,chatId:e.id,source:Oe=>we.find(Fe=>Fe.id===Oe),members:r,onNotice:K})]})}const VB=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function $B(e,a){const[i,r]=w.useState([]);return w.useEffect(()=>{if(r([]),!e)return;let c=!0;return he.botDirects(e).then(u=>{c&&r(u.chats)}).catch(()=>{}),()=>{c=!1}},[e,a]),i}function GB({bot:e,chats:a,members:i,bots:r,me:c,tick:u,onClose:d,onPreview:f,onError:m}){const[v,y]=w.useState(null),[p,b]=w.useState(null);w.useEffect(()=>{if(b(null),!v)return;let k=!0;return he.messages(v).then(C=>{k&&b(C.messages)}).catch(C=>{k&&m(C)}),()=>{k=!1}},[v,u]);const j=k=>i.find(C=>C.id!==e.id&&k.memberIds.includes(C.id)),S=a.find(k=>k.id===v);return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("chat.botDms",{name:e.name}),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[S&&o.jsx(ct,{icon:"chevron-left",label:x("directs.back"),onClick:()=>y(null)}),o.jsx("strong",{children:S?x("directs.between",{name:e.name,other:Hi(j(S))}):x("chat.botDms",{name:e.name})}),o.jsx("span",{className:"jv-spacer"}),o.jsx(ct,{icon:"close",label:x("common.close"),onClick:d})]}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ui-pane-body jv-pane-body",children:p===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):p.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("chat.empty")}):o.jsx(Gd,{messages:p,members:i,bots:r,me:c,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:f})}),o.jsx("p",{className:"jv-readonly",children:x("directs.readOnly")})]}):o.jsx("div",{className:"ui-pane-body jv-pane-body",children:a.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("sidebar.noDms")}):a.map(k=>{const C=j(k);return o.jsxs("button",{type:"button",className:"jv-thread-item",onClick:()=>y(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx(kr,{member:C,bots:r,size:20}),o.jsx("strong",{children:Hi(C)}),o.jsx("span",{className:"jv-muted",children:VB(k.updatedAt)})]}),k.lastMessage&&o.jsx("span",{className:"jv-muted jv-thread-item-meta",children:ys(k.lastMessage)})]},k.id)})})]})}function YB(e,a){return e!=null&&e.connectionId?a!=null&&a.error?{label:x("activity.error"),tone:"error"}:(a==null?void 0:a.status)==="running"?{label:FS(a.activity),tone:"busy"}:{label:x((a==null?void 0:a.status)==="idle"?"activity.idle":"activity.stopped")}:{label:x("activity.noModel")}}function XB({channel:e,members:a,bots:i,statuses:r,me:c,onAdd:u,onBot:d,onChanged:f,onError:m}){const[v,y]=w.useState(null),p=a.filter(k=>e.memberIds.includes(k.id)),b=p.filter(k=>k.kind!=="bot").sort((k,C)=>+(C.id===c)-+(k.id===c)),j=p.filter(k=>k.kind==="bot"),S=k=>{const C=k.kind==="bot"?i.find(_=>_.id===k.id):void 0,E=r[k.id],M=k.kind==="bot"?YB(C,E):void 0,T=o.jsxs(o.Fragment,{children:[o.jsx(kr,{member:k,bots:i,size:28,working:(E==null?void 0:E.status)==="running"&&E.activity!=="asking"}),o.jsxs("span",{className:"jv-member-name",children:[k.name,k.id===c&&o.jsx("span",{className:"jv-role",children:x("common.you")})]}),M&&o.jsx("span",{className:"jv-member-state","data-tone":M.tone,children:M.label})]});return o.jsxs("div",{className:"jv-member-row",children:[C?o.jsx("button",{type:"button",className:"jv-member-main","aria-label":x("members.view",{name:k.name}),onClick:()=>d(k.id),children:T}):o.jsx("div",{className:"jv-member-main",children:T}),k.id!==c&&o.jsx(ct,{icon:"close",label:x("members.remove",{name:k.name}),className:"jv-member-remove",onClick:()=>y(k)})]},k.id)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-member-bar",children:[o.jsx("span",{children:x("members.count",{count:p.length})}),o.jsxs("button",{type:"button",className:"ui-button ui-primary jv-member-pane-add",onClick:u,children:[o.jsx(Be,{name:"person-add"}),x("common.add")]})]}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",x("members.people"),b],["bots","Bot",j]].map(([k,C,E])=>E.length>0&&o.jsxs("section",{className:"jv-member-group","aria-label":C,children:[o.jsxs("h3",{children:[C," · ",E.length]}),E.map(S)]},k))}),v&&o.jsx(r5,{title:x("members.removeTitle",{name:v.name,channel:e.title}),body:x("members.removeBody"),confirm:x("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{f(await he.removeMember(e.id,v.id)),y(null)}catch(k){m(k)}}})]})}function Lb({label:e,value:a,empty:i,maxLength:r,required:c=!1,onSave:u}){const d=w.useId(),[f,m]=w.useState(null),[v,y]=w.useState(!1);w.useEffect(()=>m(null),[a]);const p=async()=>{if(!(f===null||v||c&&!f.trim())){if(f.trim()===a){m(null);return}y(!0);try{await u(f.trim()),m(null)}catch{}finally{y(!1)}}};return o.jsxs("div",{className:"jv-info-field",children:[o.jsxs("div",{className:"jv-info-label",children:[o.jsx("label",{htmlFor:d,children:e}),f===null&&o.jsx(ct,{icon:"pencil",label:x("info.edit",{name:e}),className:"jv-info-edit",onClick:()=>m(a)})]}),f===null?o.jsx("p",{className:"jv-info-value","data-empty":!a||void 0,children:a||i}):o.jsxs("div",{className:"jv-inline-edit",children:[o.jsx("input",{id:d,value:f,maxLength:r,autoFocus:!0,placeholder:i,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),p()),b.key==="Escape"&&(b.stopPropagation(),m(null))}}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>m(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:v||c&&!f.trim(),onClick:()=>void p(),children:x("common.save")})]})]})}function KB({channel:e,page:a,sections:i,members:r,bots:c,statuses:u,me:d,onPage:f,onPin:m,onMute:v,onAdd:y,onBot:p,onDelete:b,onChanged:j,onClose:S,onError:k}){const C=w.useId(),E=async T=>{try{j(await he.updateChannel(e.id,T))}catch(_){throw k(_),_}},M=r.filter(T=>e.memberIds.includes(T.id)).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x(a==="members"?"info.memberList":"entry.channelInfo"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[a==="members"&&o.jsx(ct,{icon:"chevron-left",label:x("info.back"),className:"jv-pane-back",onClick:()=>f("main")}),o.jsx("strong",{children:x(a==="members"?"channel.members":"entry.channelInfo")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),o.jsx("span",{className:"jv-spacer"}),o.jsx(ct,{icon:"close",label:x("common.close"),onClick:S})]}),a==="members"?o.jsx(XB,{channel:e,members:r,bots:c,statuses:u,me:d,onAdd:y,onBot:p,onChanged:j,onError:k}):o.jsxs("div",{className:"ui-pane-body jv-pane-body jv-info",children:[o.jsxs("div",{className:"jv-info-actions",children:[o.jsxs("button",{type:"button","aria-pressed":e.pinned,onClick:m,children:[o.jsx(Be,{name:"pin"}),x("entry.pin")]}),o.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:v,children:[o.jsx(Be,{name:e.muted?"bell-slash":"bell"}),x("entry.mute")]}),o.jsxs("button",{type:"button",onClick:y,children:[o.jsx(Be,{name:"person-add"}),x("info.addMembers")]})]}),o.jsx(Lb,{label:x("info.name"),value:e.title,empty:x("info.newChannel"),maxLength:80,required:!0,onSave:T=>E({name:T})}),o.jsx(Lb,{label:x("info.topic"),value:e.topic,empty:x("info.noTopic"),maxLength:200,onSave:T=>E({topic:T})}),o.jsxs("div",{className:"jv-info-field",children:[o.jsx("div",{className:"jv-info-label",children:o.jsx("label",{htmlFor:C,children:x("info.section")})}),o.jsx(DS,{id:C,value:e.sectionId,sections:i,onChange:T=>void E({sectionId:T}).catch(()=>{})})]}),o.jsxs("nav",{className:"jv-info-menu","aria-label":x("info.menu"),children:[o.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>f("members"),children:[o.jsx(Be,{name:"people"}),o.jsx("span",{className:"ui-menu-copy",children:x("channel.members")}),o.jsx("span",{className:"jv-muted",children:M}),o.jsx(Be,{name:"chevron-right"})]}),o.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:b,children:[o.jsx(Be,{name:"trash"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})]})]})}function QB({chat:e,chats:a,members:i,focusKey:r,onOpenMessage:c,onClose:u,onError:d}){const[f,m]=w.useState(""),v=w.useRef(null);w.useEffect(()=>{var j,S;(j=v.current)==null||j.focus(),(S=v.current)==null||S.select()},[r,e.id]);const{result:y,loading:p}=l5(f,e.id,d),b=e.type==="channel"?`#${e.title}`:x(e.type==="thread"?"search.inThread":"search.inDm");return o.jsxs("aside",{className:"ui-pane jv-pane jv-search-pane","aria-label":x("search.paneLabel"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("search.title")}),o.jsx("span",{className:"jv-muted jv-pane-sub",children:b}),o.jsx("span",{className:"jv-spacer"}),o.jsx(ct,{icon:"close",label:x("search.close"),onClick:u})]}),o.jsx("div",{className:"jv-pane-search",children:o.jsx("input",{ref:v,type:"search",value:f,placeholder:x(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":x("search.placeholder"),onChange:j=>m(j.target.value),onKeyDown:j=>{j.key==="Escape"&&(j.preventDefault(),f?m(""):u())}})}),o.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:f.trim()?y?y.messages.length?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-result-count",children:x(y.messages.length>=60?"search.countLatest":"search.count",{count:y.messages.length})}),y.messages.map(({message:j,chat:S})=>o.jsx(c5,{message:j,chat:S,chats:a,members:i,query:f,showPlace:S.id!==e.id,onOpen:c},j.id))]}):o.jsx("p",{className:"jv-result-empty",children:x("search.noMessages")}):p&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")}):o.jsx("p",{className:"jv-result-empty",children:x("search.prompt")})})]})}const ZB=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function JB({chat:e,channelName:a,expanded:i=!1,onTitle:r,onStatus:c,onSummary:u,onConclude:d}){var T;const[f,m]=w.useState(null),[v,y]=w.useState(null),[p,b]=w.useState(!1),[j,S]=w.useState(i);w.useEffect(()=>{m(null),y(null),S(i)},[e.id,i]);const k=async(_,z)=>{b(!0);try{await _(),z()}catch{}finally{b(!1)}},C=e.status==="done",E=e.note,M=((T=E==null?void 0:E.text.split(`
572
+ `).find(_=>_.trim()&&!_.startsWith("#")))==null?void 0:T.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-thread-meta","data-open":j||void 0,children:[o.jsxs("div",{className:"jv-thread-title-row",children:[f===null?o.jsxs(o.Fragment,{children:[o.jsx("h2",{className:"jv-thread-title",title:e.title,children:e.title}),o.jsx(ct,{icon:"pencil",label:x("thread.rename"),onClick:()=>m(e.title)})]}):o.jsxs("form",{className:"jv-inline-edit",onSubmit:_=>{_.preventDefault(),f.trim()&&k(()=>r(f.trim()),()=>m(null))},children:[o.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":x("thread.title"),onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Escape"&&m(null)}}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:p||!f.trim(),children:x("common.save")})]}),o.jsx("button",{type:"button",className:"jv-thread-status","data-done":C||void 0,disabled:p,title:x("thread.toggleStatus"),onClick:()=>void k(()=>c(C?"open":"done"),()=>{}),children:C?o.jsxs(o.Fragment,{children:[o.jsx(Be,{name:"check"}),x("channel.threadDone")]}):x("threads.open")})]}),v!==null?o.jsxs("div",{className:"jv-summary","data-editing":!0,children:[o.jsx("textarea",{className:"jv-notice-input",value:v,autoFocus:!0,"aria-label":x("thread.summary"),onChange:_=>y(_.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>y(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:p||!v.trim(),onClick:()=>void k(()=>u(v.trim()),()=>y(null)),children:x("common.save")})]})]}):E?o.jsxs("div",{className:"jv-summary",children:[o.jsxs("div",{className:"jv-summary-head",children:[o.jsxs("button",{type:"button",className:"jv-summary-toggle","aria-expanded":j,onClick:()=>S(!j),children:[o.jsx("strong",{children:x("thread.summary")}),!j&&o.jsx("span",{className:"jv-summary-first",children:M}),o.jsx(Be,{name:j?"chevron-down":"chevron-right"})]}),j&&o.jsxs("span",{className:"jv-muted jv-summary-meta",children:[E.updatedBy.name," · ",ZB(E.updatedAt)," · ",x("notice.version",{version:E.version})]}),o.jsx(ct,{icon:"pencil",label:x("thread.editSummary"),onClick:()=>y(E.text)})]}),j&&o.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:o.jsx(Uc,{text:E.text})}),j&&!C&&o.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:p,onClick:()=>void k(d,()=>{}),children:[o.jsx(Be,{name:"check"}),x("thread.conclude",{channel:a})]})]}):o.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>y(""),children:[o.jsx(Be,{name:"add"}),x("thread.addSummary")]})]})}function Bb({threadId:e,mode:a,showSummary:i=!1,focus:r,onSearch:c,channel:u,drafts:d,members:f,bots:m,me:v,tick:y,onClose:p,onToggleMode:b,onNav:j,onChanged:S,onInvite:k,onPreview:C,onError:E,onNotice:M}){const[T,_]=w.useState(null),[z,A]=w.useState(null),[P,H]=w.useState([]),[U,O]=w.useState(null),G=w.useRef(P);G.current=P;const q=w.useRef(null),Q=w.useRef(null),V=w.useRef(null),Y=w.useRef(!1),K=w.useRef(!0),[D,$]=w.useState(!1),ne=w.useRef(0),R=w.useRef(0);w.useEffect(()=>{_(null),A(null),H([]),O(null),Y.current=!1,K.current=!0,$(!1),ne.current=0,R.current=0},[e]),w.useEffect(()=>{let W=!0;return Promise.all([he.chat(e),he.messages(e)]).then(async([je,Re])=>{if(W&&(_(je),H(Re.messages),V.current!==e&&(V.current=e,O(je.readSequence)),je.rootMessageId)){const Oe=await he.message(je.rootMessageId);W&&A(Oe)}}).catch(je=>{W&&E(je)}),()=>{W=!1}},[e,y]),w.useLayoutEffect(()=>{const W=q.current;if(!W||!T)return;const je=()=>W.scrollTo({top:W.scrollHeight,behavior:"instant"}),Re=P.at(-1),Oe=(Re==null?void 0:Re.senderId)===v&&Re.sequence>R.current;if(R.current=Math.max(R.current,(Re==null?void 0:Re.sequence)??0),Y.current)(K.current||Oe)&&W.scrollTo({top:W.scrollHeight,behavior:"smooth"});else{if(!P.length&&!z)return;Y.current=!0;const Fe=r?W.querySelector(`[data-message="${r.id}"]`):null;if(Fe){if(K.current=!1,Fe.scrollIntoView({block:"center"}),r!=null&&r.passage&&GS(Fe,r.passage))return;Fe.classList.add("jv-jump"),setTimeout(()=>Fe.classList.remove("jv-jump"),1600);return}je(),requestAnimationFrame(je)}(K.current||Oe)&&(ne.current=(Re==null?void 0:Re.sequence)??0)},[P,z,T]),w.useEffect(()=>{Y.current&&r&&F(r.id,r.passage)},[r]),w.useEffect(()=>{const W=q.current,je=Q.current;if(!W||!je)return;const Re=new ResizeObserver(()=>{!Y.current||!K.current||W.scrollHeight-W.scrollTop-W.clientHeight<8||W.scrollTo({top:W.scrollHeight,behavior:"instant"})});Re.observe(je);const Oe=()=>{var Fe;K.current=W.scrollHeight-W.scrollTop-W.clientHeight<120,K.current&&(ne.current=Math.max(ne.current,((Fe=G.current.at(-1))==null?void 0:Fe.sequence)??0)),$(!K.current)};return Oe(),W.addEventListener("scroll",Oe,{passive:!0}),()=>{Re.disconnect(),W.removeEventListener("scroll",Oe)}},[q.current,e,T]),w.useEffect(()=>{const W=P.at(-1);if(!T||!W||W.chatId!==T.id)return;const je=()=>{if(document.visibilityState!=="visible"||T.readSequence>=W.sequence)return;const Re={...T,readSequence:W.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};_(Re),he.markRead(T.id,W.sequence).then(()=>S(Re)).catch(E)};return je(),document.addEventListener("visibilitychange",je),()=>document.removeEventListener("visibilitychange",je)},[P,T]);const le=async W=>{try{const je=await W();_(je),S(je)}catch(je){throw E(je),je}},ie=async(W,je,Re)=>{try{const Oe=await he.react(W.id,je,Re),Fe=Je=>Je.id===Oe.id?{...Je,reactions:Oe.reactions}:Je;H(Je=>Je.map(Fe)),A(Je=>Je&&Fe(Je))}catch(Oe){E(Oe)}},B=async(W,je)=>{try{const Re=await he.fold(W.id,je),Oe=Fe=>Fe.id===Re.id?{...Fe,folded:Re.folded}:Fe;H(Fe=>Fe.map(Oe)),A(Fe=>Fe&&Oe(Fe))}catch(Re){E(Re)}},F=(W,je)=>{var Oe;const Re=W&&((Oe=q.current)==null?void 0:Oe.querySelector(`[data-message="${W}"]`));if(!Re){M(x(W?"thread.sourceElsewhere":"app.sourceGone"));return}YS(Re,je)},se={onQuote:W=>h5(d,W,f),onReact:ie,onFold:B,onJump:F,onError:E},ye=async(W,je,Re,Oe,Fe=[],Je=!1)=>{await he.send(e,W,je,Re,Je,Oe,Fe);const We=u?[...new Set(kg(W,oi(f)).filter(Ct=>!u.memberIds.includes(Ct.member.id)).map(Ct=>Ct.member.name))]:[];We.length&&M(x("app.notInChannel",{names:We.join(x("common.listSeparator")),count:We.length})),Promise.all([he.chat(e),he.messages(e)]).then(([Ct,rn])=>{_(Ct),H(rn.messages),S(Ct)}).catch(E)},we=(u==null?void 0:u.title)??x("search.channel"),ce=f.find(W=>W.id===(z==null?void 0:z.senderId)),xe=D?P.filter(W=>W.sequence>ne.current&&W.senderId!==v).length:0,Ce=a==="pane"?"aside":a==="embed"?"section":"main",pe=new Set([...z?[z.senderId,...z.mentions]:[],...P.flatMap(W=>[W.senderId,...W.mentions])]);return pe.delete(v),o.jsxs(Ce,{className:a==="pane"?"ui-pane jv-pane":a==="embed"?"ui-chat jv-thread-full jv-thread-embed":"ui-chat jv-thread-full","aria-label":x("thread.label"),onKeyDown:W=>{T&&c&&(W.ctrlKey||W.metaKey)&&W.key.toLowerCase()==="f"&&(W.preventDefault(),c(T))},children:[o.jsxs("header",{className:a==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[a==="full"&&o.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:j}),a==="embed"&&o.jsx(ct,{icon:"chevron-left",className:"ui-mobile-only",label:x("thread.backToList"),onClick:p}),a==="full"?o.jsxs("button",{type:"button",className:"jv-crumb",onClick:p,children:[o.jsx(Be,{name:"chevron-left"}),o.jsx("span",{className:"jv-hash",children:"#"}),we]}):a==="embed"?o.jsxs("button",{type:"button",className:"jv-crumb",title:x("thread.inChannel"),onClick:b,children:[o.jsx("span",{className:"jv-hash",children:"#"}),we]}):o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:x("thread.label")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",we]})]}),o.jsx("span",{className:"jv-spacer"}),T&&c&&o.jsx(ct,{icon:"search",label:x("thread.search"),onClick:()=>c(T)}),T&&o.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":T.following||void 0,title:x(T.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void le(()=>he.follow(e,!T.following)).catch(()=>{}),children:[o.jsx(Be,{name:"bell"}),x(T.following?"threads.following":"thread.follow")]}),a!=="embed"&&o.jsx(ct,{icon:a==="pane"?"arrows-expand":"arrows-contract",className:"jv-desktop-only",label:x(a==="pane"?"thread.expand":"thread.collapse"),onClick:b}),a==="pane"&&o.jsx(ct,{icon:"close",label:x("thread.close"),onClick:p})]}),T&&o.jsx("div",{className:a==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:o.jsx(JB,{chat:T,channelName:we,expanded:i,onTitle:W=>le(()=>he.updateThread(e,{title:W})),onStatus:W=>le(()=>he.updateThread(e,{status:W})),onSummary:W=>le(()=>he.setNote(e,W)),onConclude:async()=>{var W;try{await ye(`${x("thread.conclusion")}
573
+
574
+ ${((W=T.note)==null?void 0:W.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),je=>je.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await le(()=>he.updateThread(e,{status:"done"})),M(x("thread.concluded",{channel:we}))}catch(je){throw E(je),je}}})}),o.jsxs("div",{ref:q,className:a==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[o.jsxs("div",{ref:Q,children:[z&&o.jsx(Gd,{messages:[{...z,thread:null}],members:f,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:ie,onFold:B,onJump:F,onError:E}),o.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:o.jsx("span",{children:P.length?x("channel.replies",{count:P.length}):x("thread.noReplies")})}),o.jsx(Gd,{messages:P,members:f,bots:m,me:v,divider:U??Number.MAX_SAFE_INTEGER,before:z==null?void 0:z.createdAt,onSettled:W=>H(je=>je.map(Re=>Re.id===W.id?W:Re)),onPreview:C,...se})]}),D&&P.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button","aria-label":x("thread.toLatest"),onClick:()=>{var W;return(W=q.current)==null?void 0:W.scrollTo({top:q.current.scrollHeight,behavior:"smooth"})},children:[xe>0&&o.jsx("span",{children:x("chat.unseen",{count:xe})}),o.jsx(Be,{name:"chevron-down"})]})})]}),o.jsx(m5,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:x("thread.reply"),scrollRef:q,disabled:!T,initialText:P.length===0&&z&&z.senderId!==v&&ce&&!ce.deleted?`@${ce.name} `:void 0,mention:{bots:m,inside:oi(f).filter(W=>W.id!==v&&!!(u!=null&&u.memberIds.includes(W.id))),outside:oi(f).filter(W=>!(u!=null&&u.memberIds.includes(W.id))),onInvite:k,participants:pe},onSend:ye,onError:E,onNotice:M}),o.jsx(XS,{container:q,drafts:d,chatId:e,members:f,onNotice:M,source:W=>W===(z==null?void 0:z.id)?z:P.find(je=>je.id===W)})]})}const Np={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},wd=e=>e.lastReplyAt??e.createdAt;function y5(e,a){const i=a==="created"?(r,c)=>c.createdAt-r.createdAt:a==="status"?(r,c)=>+(r.status==="done")-+(c.status==="done")||wd(c)-wd(r):(r,c)=>wd(c)-wd(r);return[...e].sort(i)}function x5(e){const a=`jarvy-thread-sort-${e}`,[i,r]=w.useState(()=>{const c=localStorage.getItem(a);return c==="created"||c==="status"?c:"updated"});return[i,c=>{r(c),localStorage.setItem(a,c)}]}function b5({value:e,onChange:a}){return o.jsxs(gr,{value:e,onValueChange:i=>a(i),children:[o.jsxs(yr,{className:"jv-thread-sort","aria-label":x("threadSort.current",{order:x(Np[e])}),title:x("threadSort.title"),children:[o.jsx(rC,{}),o.jsx(vr,{})]}),o.jsx(xr,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(Np).map(i=>o.jsx(sa,{value:i,children:x(Np[i])},i))})]})}const j5=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function WB({channel:e,members:a,bots:i,tick:r,onOpen:c,onClose:u,onError:d}){const[f,m]=w.useState(null),[v,y]=w.useState("open"),[p,b]=x5("channel");w.useEffect(()=>{let k=!0;return he.channelThreads(e.id).then(C=>{k&&m(C.threads)}).catch(C=>{k&&d(C)}),()=>{k=!1}},[e.id,r]);const j=y5((f??[]).filter(k=>v==="all"||k.status===v),p),S=k=>(f??[]).filter(C=>C.status===k).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("channel.threads")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),o.jsx("span",{className:"jv-spacer"}),o.jsx(b5,{value:p,onChange:b}),o.jsx(ct,{icon:"close",label:x("threads.closeList"),onClick:u})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.byStatus"),children:[["open",x("threads.openCount",{count:S("open")})],["done",x("threads.doneCount",{count:S("done")})],["all",x("threads.all")]].map(([k,C])=>o.jsx("button",{type:"button",role:"tab","aria-selected":v===k,onClick:()=>y(k),children:C},k))}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:f===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):j.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("threads.none")}):j.map(k=>{const C=a.find(E=>{var M;return E.id===((M=k.root)==null?void 0:M.senderId)});return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":k.unread>0||void 0,onClick:()=>c(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:k.title}),k.alerts>0?o.jsx("span",{className:"jv-badge",children:k.alerts}):k.unread>0&&o.jsx("span",{className:"jv-count",children:k.unread}),o.jsx("span",{className:"jv-thread-status","data-done":k.status==="done"||void 0,children:x(k.status==="done"?"channel.threadDone":"threads.open")})]}),k.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(kr,{member:C,bots:i,size:16}),o.jsx("span",{children:ys(k.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[x("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${j5(k.lastReplyAt)}`:"",k.following?` · ${x("threads.following")}`:""]})]},k.id)})})]})}function eI({threads:e,chats:a,members:i,bots:r,onNav:c,renderThread:u}){const[d,f]=w.useState(e),[m,v]=w.useState(null),[y,p]=w.useState("all"),[b,j]=x5("followed");w.useEffect(()=>f(M=>[...e,...M.filter(T=>!e.some(_=>_.id===T.id)).map(T=>({...T,following:!1,unread:0,alerts:0}))]),[e]);const S=y5(d,b).filter(M=>y==="all"||(y==="unread"?M.unread>0:M.status===y)),k=d.filter(M=>M.unread>0).length,C=d.find(M=>M.id===m),E=M=>d.filter(T=>T.status===M).length;return o.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":x("sidebar.followed"),"data-open":C?"":void 0,children:[o.jsxs("section",{className:"jv-followed-list","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:c}),o.jsx("strong",{className:"jv-channel-title",children:x("sidebar.followed")})]}),o.jsx(b5,{value:b,onChange:j})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.filter"),children:[["all",x("threads.all")],["unread",k?x("threads.unreadCount",{count:k}):x("threads.unread")],["open",x("threads.openCount",{count:E("open")})],["done",x("threads.doneCount",{count:E("done")})]].map(([M,T])=>o.jsx("button",{type:"button",role:"tab","aria-selected":y===M,onClick:()=>p(M),children:T},M))}),o.jsx("div",{className:"jv-followed-items",children:S.length===0?o.jsx("p",{className:"jv-picker-empty",children:x({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):S.map(M=>{const T=i.find(z=>{var A;return z.id===((A=M.root)==null?void 0:A.senderId)}),_=a.find(z=>z.id===M.parentId);return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":M.unread>0||void 0,"aria-current":M.id===m||void 0,onClick:()=>v(M.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:M.title}),M.alerts>0?o.jsx("span",{className:"jv-badge",children:M.alerts}):M.unread>0&&o.jsx("span",{className:"jv-count",children:M.unread}),o.jsx("span",{className:"jv-thread-status","data-done":M.status==="done"||void 0,children:x(M.status==="done"?"channel.threadDone":"threads.open")})]}),M.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(kr,{member:T,bots:r,size:16}),o.jsx("span",{children:ys(M.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(_==null?void 0:_.title)??""," · ",x("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${j5(M.lastReplyAt)}`:"",M.following?"":` · ${x("threads.notFollowing")}`]})]},M.id)})})]}),C?u(C,()=>v(null)):o.jsx("div",{className:"jv-followed-empty",children:o.jsx("p",{children:x("threads.pick")})})]})}function tI({pane:e,followedView:a,followed:i,chats:r,sections:c,members:u,bots:d,statuses:f,meId:m,drafts:v,tick:y,paneChannel:p,activeBot:b,botDirects:j,find:S,onPane:k,onNav:C,onBackToChannel:E,onAddMembers:M,onOpenBot:T,onPin:_,onMute:z,onDeleteChannel:A,onChannelSaved:P,onThreadChanged:H,onInvite:U,onPreview:O,onNotice:G,onError:q,paneWidth:Q,onResize:V}){var $,ne;const Y=(e==null?void 0:e.kind)==="thread"?e:null,K=(Y==null?void 0:Y.mode)==="full",D=()=>k(null);return o.jsxs(o.Fragment,{children:[a&&!K&&o.jsx(eI,{threads:i,chats:r,members:u,bots:d,onNav:C,renderThread:(R,le)=>o.jsx(Bb,{threadId:R.id,mode:"embed",channel:r.find(ie=>ie.id===R.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:H,onClose:le,onToggleMode:()=>E({id:R.id,parentId:R.parentId},!0),onInvite:ie=>U(R.parentId,ie),onPreview:O,onError:q,onNotice:G},R.id)}),Y&&o.jsx(Bb,{threadId:Y.id,mode:Y.mode,showSummary:Y.summary,focus:Y.focus,onSearch:S.search,channel:r.find(R=>R.id===Y.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:H,onClose:()=>K?E(Y,!1):D(),onToggleMode:()=>K?E(Y,!0):k({...Y,mode:"full"}),onInvite:R=>U(Y.parentId,R),onPreview:O,onError:q,onNotice:G},`${Y.id}:${(($=Y.focus)==null?void 0:$.id)??""}:${((ne=Y.focus)==null?void 0:ne.passage)??""}`),(e==null?void 0:e.kind)==="search"&&o.jsx(QB,{chat:e.chat,chats:r,members:u,focusKey:S.focusKey,onOpenMessage:S.openMessage,onClose:D,onError:q}),(e==null?void 0:e.kind)==="threads"&&p&&o.jsx(WB,{channel:p,members:u,bots:d,tick:y,onOpen:R=>k({kind:"thread",id:R,parentId:p.id,mode:"pane"}),onClose:D,onError:q}),(e==null?void 0:e.kind)==="info"&&p&&o.jsx(KB,{channel:p,page:e.page,sections:c,members:oi(u),bots:d,statuses:f,me:m,onPage:R=>k({kind:"info",page:R}),onPin:()=>_(p),onMute:()=>z(p),onAdd:()=>M(p),onBot:T,onDelete:()=>A(p),onChanged:P,onClose:D,onError:q}),(e==null?void 0:e.kind)==="botdms"&&b&&!p&&o.jsx(GB,{bot:b,chats:j,members:u,bots:d,me:m,tick:y,onClose:D,onPreview:O,onError:q}),e&&!K&&o.jsx("div",{className:"jv-resize",style:{right:Q-4},onPointerDown:V,role:"separator","aria-orientation":"vertical","aria-label":x("app.resizePane")})]})}const Ib="@goodfish/jarvy",w5="0.9.0",nI={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},aI="Apache-2.0",p0=nI.url.replace(/^git\+/,"").replace(/\.git$/,""),Pb=`${p0}/blob/v${w5}`,iI=[{label:"about.source",detail:p0.replace(/^https:\/\//,""),href:p0},{label:"about.package",detail:Ib,href:`https://www.npmjs.com/package/${Ib}`},{label:"about.license",detail:aI,href:`${Pb}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${Pb}/THIRD_PARTY_NOTICE.md`}];function rI(){return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("h2",{children:x("settings.about")})}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-about-intro",children:[o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:"Jarvy"}),o.jsx("span",{children:x("about.tagline")})]}),o.jsx("span",{className:"jv-row-meta",children:x("about.version",{version:w5})})]}),iI.map(e=>o.jsxs("a",{className:"jv-list-row jv-link-row",href:e.href,target:"_blank",rel:"noreferrer",children:[o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:x(e.label)}),o.jsx("span",{children:e.detail})]}),o.jsx(mC,{"aria-hidden":"true"})]},e.label))]})]})}function lI(){const[e,a]=w.useState(document.documentElement.classList.contains("dark")),i=c=>{Fd(c?"dark":"light"),a(c)},r=(c,u,d,f,m)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:m,className:"jv-list-row jv-choice-row",onClick:f,children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:u})}),d&&o.jsx(Qn,{"aria-hidden":"true"})]},c);return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("h2",{children:x("settings.general")})}),o.jsxs("section",{className:"jv-section","aria-labelledby":"general-language",children:[o.jsx("h3",{id:"general-language",className:"jv-section-title",children:x("general.language")}),o.jsx("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-language",children:Qb.map(c=>r(c,Mp(c,"name"),eo()===c,()=>Wb(c),c))})]}),o.jsxs("section",{className:"jv-section","aria-labelledby":"general-theme",children:[o.jsx("h3",{id:"general-theme",className:"jv-section-title",children:x("general.theme")}),o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-theme",children:[r("light",x("general.light"),!e,()=>i(!1)),r("dark",x("general.dark"),e,()=>i(!0))]})]})]})}const oI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.797 6.282a.451.451 0 01-.336-.315 1.019 1.019 0 010-.505c.156-.86.3-1.725.501-2.577.14-.7.42-1.367.823-1.96.305-.431.75-.746 1.262-.89.877-.217 1.24.629.937 1.348-.259.593-.877.914-1.334 1.348-.835.795-1.096 2.14-1.336 3.212a.427.427 0 01-.186.277.437.437 0 01-.331.062z" fill="url(#lobe-icons-ant-group-0-_R_0_)" transform="translate(3)"></path><path d="M6.334 4.672c.33-.121.682.146.946.297.278.145.587.219.901.214.231.01.466 0 .688.018 4.098.176 7.484 3.22 8.05 7.237.565 4.016-1.852 7.859-5.745 9.134-3.894 1.276-8.153-.38-10.126-3.935A8.339 8.339 0 013.133 7.081c.348-.278.716-.53 1.102-.755a8.404 8.404 0 001.318-.79c.28-.243.45-.742.781-.864zm4.406 2.15c-2.841.003-4.898 2.533-4.628 5.642.27 3.109 2.781 5.641 5.613 5.665 2.832.024 4.932-2.512 4.658-5.644-.273-3.133-2.802-5.666-5.643-5.663zm.357.57a4.707 4.707 0 013.304 1.446 5.703 5.703 0 011.643 3.49 4.841 4.841 0 01-1.141 3.705v.015a3.923 3.923 0 01-2.808 1.303 4.664 4.664 0 01-3.367-1.387 5.678 5.678 0 01-1.71-3.518 4.832 4.832 0 011.14-3.753 3.923 3.923 0 012.813-1.3h.126z" fill="url(#lobe-icons-ant-group-1-_R_0_)" transform="translate(3)"></path><path d="M2.346 2.054a1.26 1.26 0 01.384-.594.842.842 0 011.165.11c.694.82.169 2.078.142 3.02.013.805.208 1.597.57 2.318.084.134.147.279.186.43a.539.539 0 01-.3.577c-.345.17-.568-.19-.709-.446-.324-.6-.617-1.216-.877-1.846a8.698 8.698 0 01-.618-1.987 7.523 7.523 0 01-.051-.37 3.717 3.717 0 01-.024-.34 2.506 2.506 0 01.132-.872z" fill="url(#lobe-icons-ant-group-2-_R_0_)" transform="translate(3)"></path><defs><linearGradient id="lobe-icons-ant-group-0-_R_0_" x1="31.373%" x2="61.365%" y1="95.551%" y2="-.348%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-1-_R_0_" x1="4.366%" x2="94.359%" y1="65.982%" y2="32.918%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-2-_R_0_" x1="56.255%" x2="45.986%" y1="99.257%" y2="1.384%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient></defs></svg>
575
+ `,sI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>
576
+ `,cI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.242 1.613A1.11 1.11 0 018.295.857h6.977L8.03 22.316a1.11 1.11 0 01-1.052.755h-5.43a1.11 1.11 0 01-1.053-1.466L7.242 1.613z" fill="url(#lobe-icons-azure-0-_R_0_)"></path><path d="M18.397 15.296H7.4a.51.51 0 00-.347.882l7.066 6.595c.206.192.477.298.758.298h6.226l-2.706-7.775z" fill="#0078D4"></path><path d="M15.272.857H7.497L0 23.071h7.775l1.596-4.73 5.068 4.73h6.665l-2.707-7.775h-7.998L15.272.857z" fill="url(#lobe-icons-azure-1-_R_0_)"></path><path d="M17.193 1.613a1.11 1.11 0 00-1.052-.756h-7.81.035c.477 0 .9.304 1.052.756l6.748 19.992a1.11 1.11 0 01-1.052 1.466h-.12 7.895a1.11 1.11 0 001.052-1.466L17.193 1.613z" fill="url(#lobe-icons-azure-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-0-_R_0_" x1="8.247" x2="1.002" y1="1.626" y2="23.03"><stop stop-color="#114A8B"></stop><stop offset="1" stop-color="#0669BC"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-1-_R_0_" x1="14.042" x2="12.324" y1="15.302" y2="15.888"><stop stop-opacity=".3"></stop><stop offset=".071" stop-opacity=".2"></stop><stop offset=".321" stop-opacity=".1"></stop><stop offset=".623" stop-opacity=".05"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-2-_R_0_" x1="12.841" x2="20.793" y1="1.626" y2="22.814"><stop stop-color="#3CCBF4"></stop><stop offset="1" stop-color="#2892DF"></stop></linearGradient></defs></svg>
577
+ `,uI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.316 4.8h14.682v4.8H7.31a.302.302 0 00-.308.3v4.2c0 .171.14.3.308.3h9.688v4.8h-4.686a.302.302 0 00-.308.3v4.2c0 .171.141.3.308.3h4.378a.297.297 0 00.308-.3v-4.5h4.694a.302.302 0 00.308-.3v-4.2c0-.171-.14-.3-.308-.3h-4.694V9.6h4.694A.302.302 0 0022 9.3V5.1c0-.171-.14-.3-.308-.3h-4.694V.3c0-.171-.14-.3-.308-.3H2.316A.31.31 0 002 .3v4.2c0 .171.14.3.316.3z"></path></svg>
578
+ `,dI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-bedrock-_R_0_" x1="80%" x2="20%" y1="20%" y2="80%"><stop offset="0%" stop-color="#6350FB"></stop><stop offset="50%" stop-color="#3D8FFF"></stop><stop offset="100%" stop-color="#9AD8F8"></stop></linearGradient></defs><path d="M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z" fill="url(#lobe-icons-bedrock-_R_0_)" fill-rule="nonzero"></path></svg>
579
+ `,fI=`<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>
580
+ `,hI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>
581
+ `,mI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>
582
+ `,pI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"></path></svg>
583
+ `,gI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
584
+ `,vI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z" fill="#4285F4"></path><path d="M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z" fill="#34A853"></path><path d="M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z" fill="#FBBC05"></path><path d="M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z" fill="#EB4335"></path></svg>
585
+ `,yI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>
586
+ `,xI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path><path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path><path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path><path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path><path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path><path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path></svg>
587
+ `,bI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>
588
+ `,jI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z" fill="url(#lobe-icons-meta-0-_R_0_)"></path><path d="M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z" fill="url(#lobe-icons-meta-1-_R_0_)"></path><path d="M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z" fill="url(#lobe-icons-meta-2-_R_0_)"></path><path d="M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z" fill="url(#lobe-icons-meta-3-_R_0_)"></path><path d="M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z" fill="url(#lobe-icons-meta-4-_R_0_)"></path><path d="M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z" fill="url(#lobe-icons-meta-5-_R_0_)"></path><path d="M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z" fill="#0082FB"></path><path d="M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z" fill="url(#lobe-icons-meta-6-_R_0_)"></path><path d="M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z" fill="#0082FB"></path><path d="M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z" fill="url(#lobe-icons-meta-7-_R_0_)"></path><path d="M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z" fill="url(#lobe-icons-meta-8-_R_0_)"></path><path d="M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z" fill="url(#lobe-icons-meta-9-_R_0_)"></path><path d="M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z" fill="url(#lobe-icons-meta-10-_R_0_)"></path><path d="M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z" fill="url(#lobe-icons-meta-11-_R_0_)"></path><path d="M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z" fill="url(#lobe-icons-meta-12-_R_0_)"></path><defs><linearGradient id="lobe-icons-meta-0-_R_0_" x1="75.897%" x2="26.312%" y1="89.199%" y2="12.194%"><stop offset=".06%" stop-color="#0867DF"></stop><stop offset="45.39%" stop-color="#0668E1"></stop><stop offset="85.91%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-1-_R_0_" x1="21.67%" x2="97.068%" y1="75.874%" y2="23.985%"><stop offset="13.23%" stop-color="#0064DF"></stop><stop offset="99.88%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-2-_R_0_" x1="38.263%" x2="60.895%" y1="89.127%" y2="16.131%"><stop offset="1.47%" stop-color="#0072EC"></stop><stop offset="68.81%" stop-color="#0064DF"></stop></linearGradient><linearGradient id="lobe-icons-meta-3-_R_0_" x1="47.032%" x2="52.15%" y1="90.19%" y2="15.745%"><stop offset="7.31%" stop-color="#007CF6"></stop><stop offset="99.43%" stop-color="#0072EC"></stop></linearGradient><linearGradient id="lobe-icons-meta-4-_R_0_" x1="52.155%" x2="47.591%" y1="58.301%" y2="37.004%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#007CF6"></stop></linearGradient><linearGradient id="lobe-icons-meta-5-_R_0_" x1="37.689%" x2="61.961%" y1="12.502%" y2="63.624%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-6-_R_0_" x1="34.808%" x2="62.313%" y1="68.859%" y2="23.174%"><stop offset="27.99%" stop-color="#007FF8"></stop><stop offset="91.41%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-7-_R_0_" x1="43.762%" x2="57.602%" y1="6.235%" y2="98.514%"><stop offset="0%" stop-color="#0082FB"></stop><stop offset="99.95%" stop-color="#0081FA"></stop></linearGradient><linearGradient id="lobe-icons-meta-8-_R_0_" x1="60.055%" x2="39.88%" y1="4.661%" y2="69.077%"><stop offset="6.19%" stop-color="#0081FA"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-9-_R_0_" x1="30.282%" x2="61.081%" y1="59.32%" y2="33.244%"><stop offset="0%" stop-color="#027AF3"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-10-_R_0_" x1="20.433%" x2="82.112%" y1="50.001%" y2="50.001%"><stop offset="0%" stop-color="#0377EF"></stop><stop offset="99.94%" stop-color="#0279F1"></stop></linearGradient><linearGradient id="lobe-icons-meta-11-_R_0_" x1="40.303%" x2="72.394%" y1="35.298%" y2="57.811%"><stop offset=".19%" stop-color="#0471E9"></stop><stop offset="100%" stop-color="#0377EF"></stop></linearGradient><linearGradient id="lobe-icons-meta-12-_R_0_" x1="32.254%" x2="68.003%" y1="19.719%" y2="84.908%"><stop offset="27.65%" stop-color="#0867DF"></stop><stop offset="100%" stop-color="#0471E9"></stop></linearGradient></defs></svg>
589
+ `,wI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-minimax-_R_0_" x1="0%" x2="100.182%" y1="50.057%" y2="50.057%"><stop offset="0%" stop-color="#E2167E"></stop><stop offset="100%" stop-color="#FE603C"></stop></linearGradient></defs><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z" fill="url(#lobe-icons-minimax-_R_0_)" fill-rule="nonzero"></path></svg>
590
+ `,SI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>
591
+ `,kI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path></svg>
592
+ `,CI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>
593
+ `,NI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
594
+ `,EI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
595
+ `,TI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z" fill="#C8FF00"></path></svg>
596
+ `,AI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>
597
+ `,_I=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z" fill="#EF2CC1"></path><path d="M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z" fill="#CAAEF5"></path><path d="M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z" fill="#FC4C02"></path></svg>
598
+ `,MI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0l12 20.785H0L12 0z"></path></svg>
599
+ `,RI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z" fill="#4285F4"></path><path clip-rule="evenodd" d="M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z" fill="#669DF6" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z" fill="#AECBFA" fill-rule="evenodd"></path><path d="M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#AECBFA"></path><path d="M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#669DF6"></path><path d="M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z" fill="#AECBFA"></path></svg>
600
+ `,DI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
601
+ `,OI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
602
+ `,zI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>
603
+ `,LI=Object.assign({"./antgroup.svg":oI,"./anthropic.svg":sI,"./azure.svg":cI,"./baseten.svg":uI,"./bedrock.svg":dI,"./cerebras.svg":fI,"./cloudflare.svg":hI,"./deepseek.svg":mI,"./fireworks.svg":pI,"./githubcopilot.svg":gI,"./google.svg":vI,"./groq.svg":yI,"./huggingface.svg":xI,"./kimi.svg":bI,"./meta.svg":jI,"./minimax.svg":wI,"./mistral.svg":SI,"./moonshot.svg":kI,"./nvidia.svg":CI,"./openai.svg":NI,"./opencode.svg":EI,"./openrouter.svg":TI,"./qwen.svg":AI,"./together.svg":_I,"./vercel.svg":MI,"./vertexai.svg":RI,"./xai.svg":DI,"./xiaomimimo.svg":OI,"./zai.svg":zI}),Hb={"amazon-bedrock":"bedrock","ant-ling":"antgroup",anthropic:"anthropic",azure:"azure",baseten:"baseten",cerebras:"cerebras","cloudflare-ai-gateway":"cloudflare","cloudflare-workers-ai":"cloudflare",deepseek:"deepseek",fireworks:"fireworks","github-copilot":"githubcopilot",google:"google","google-vertex":"vertexai",groq:"groq",huggingface:"huggingface","kimi-coding":"kimi",meta:"meta",minimax:"minimax","minimax-cn":"minimax",mistral:"mistral",moonshotai:"moonshot","moonshotai-cn":"moonshot",nvidia:"nvidia",openai:"openai","openai-codex":"openai",opencode:"opencode","opencode-go":"opencode",openrouter:"openrouter","qwen-token-plan":"qwen","qwen-token-plan-cn":"qwen","qwen-token-plan-individual":"qwen",together:"together","vercel-ai-gateway":"vercel",xai:"xai",xiaomi:"xiaomimimo","xiaomi-token-plan-ams":"xiaomimimo","xiaomi-token-plan-cn":"xiaomimimo","xiaomi-token-plan-sgp":"xiaomimimo",zai:"zai","zai-coding-cn":"zai"},BI=e=>e&&Hb[e]?LI[`./${Hb[e]}.svg`]:void 0;function Eg({name:e,provider:a}){var r;const i=BI(a);return i?o.jsx("span",{className:"jv-provider-mark","data-logo":"","aria-hidden":"true",dangerouslySetInnerHTML:{__html:i}}):o.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((r=[...e.trim()][0])==null?void 0:r.toUpperCase())??"?"})}function S5(e){const a=e.authType==="oauth";return e.configured?{ok:!0,label:x(a?"status.signedIn":"status.configured")}:{ok:!1,label:x(a?"status.signedOut":"status.notConfigured")}}const k5=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],C5=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",II={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function PI({onBack:e,onSelect:a}){const[i,r]=w.useState([]),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!0),[y,p]=w.useState(0);w.useEffect(()=>{let S=!0;return v(!0),f(""),he.modelProviders().then(k=>{S&&r(k.providers)}).catch(k=>{S&&f(it(k,"picker.loadFailed"))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[y]);const b=[II,...i].filter(S=>`${S.name} ${S.id}`.toLowerCase().includes(c.toLowerCase())),j=S=>C5({authType:S.authType,custom:S.id==="custom"});return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx(Ae,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":x("picker.back"),children:o.jsx(Xd,{})}),o.jsx("h2",{children:x("models.add")})]}),o.jsxs("label",{className:"jv-search",children:[o.jsx(Mc,{}),o.jsx("input",{autoFocus:!0,"aria-label":x("picker.search"),placeholder:x("picker.searchPlaceholder"),value:c,onChange:S=>u(S.target.value)})]}),k5.filter(S=>b.some(k=>j(k)===S.id)).map(({id:S,label:k})=>o.jsxs("section",{className:"jv-section","aria-label":x(k),children:[o.jsx("h3",{className:"jv-section-title",children:x(k)}),o.jsx("div",{className:"jv-list",children:b.filter(C=>j(C)===S).map(C=>o.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>a(C),children:[o.jsx(Eg,{name:C.id==="custom"?"+":C.name,provider:C.id}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:C.name}),C.id!=="custom"&&C.authType!=="oauth"&&o.jsx("span",{children:x("picker.keyHint",{count:C.modelCount})})]}),o.jsx(al,{className:"jv-row-chevron"})]},`${C.id}:${C.authType}`))})]},S)),m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("picker.loading")}),d&&o.jsxs("div",{className:"jv-empty",role:"alert",children:[o.jsx("strong",{children:d}),o.jsx(Ae,{variant:"outline",onClick:()=>p(S=>S+1),children:x("picker.retry")})]}),!m&&!d&&!b.length&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("picker.noMatch")})})]})}const HI=E0("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",destructive:"border-transparent bg-destructive text-white"}},defaultVariants:{variant:"default"}});function UI({className:e,variant:a,...i}){return o.jsx("span",{"data-slot":"badge",className:an(HI({variant:a}),e),...i})}function N5({className:e,...a}){return o.jsx(OE,{"data-slot":"label",className:an("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}function qI({connection:e,providerName:a,authType:i,ensureConnection:r,onChanged:c}){var q,Q;const[u,d]=w.useState({phase:"idle"}),[f,m]=w.useState(""),[v,y]=w.useState(!1),[p,b]=w.useState(""),[j,S]=w.useState(0),k=w.useRef(void 0),C=e==null?void 0:e.id,E=w.useRef(c);E.current=c;const M=w.useRef(u.phase);M.current=u.phase,w.useEffect(()=>{if(!C)return;const V=C;let Y=!0,K;async function D(){var $;try{let ne=await he.authStatus(V);if(!Y)return;if(k.current&&(($=ne.prompt)==null?void 0:$.type)==="select"){const le=k.current;if(k.current=void 0,ne=await he.authInput(V,ne.prompt.id,le),!Y)return}const R=M.current==="running"&&ne.phase!=="running";M.current=ne.phase,d(ne),R&&await E.current(),ne.phase==="running"&&Y&&(K=setTimeout(()=>void D(),750))}catch(ne){Y&&b(it(ne,"auth.statusFailed"))}}return D(),()=>{Y=!1,clearTimeout(K)}},[C,u.phase,j]),w.useEffect(()=>m(""),[(q=u.prompt)==null?void 0:q.id]);async function T(V){y(!0),b("");try{const Y=await V();d(Y),Y.phase!=="running"&&await c()}catch(Y){b(it(Y,"common.failed"))}finally{y(!1)}}function _(V){k.current=V,T(async()=>{const Y=C??await r();return he.authStart(Y)})}const z=a==="openai-codex"&&i==="oauth",A=a==="openai"&&i==="oauth",P=u.phase==="running",H=u.prompt,U=u.event,O=(U==null?void 0:U.type)==="auth_url"?U.url:(U==null?void 0:U.type)==="device_code"?U.verificationUri:null,G=V=>{H&&C&&T(()=>he.authInput(C,H.id,V))};return o.jsxs("section",{className:"jv-auth","aria-label":x("auth.title"),children:[o.jsxs("div",{className:"jv-auth-header",children:[o.jsx("h3",{children:x("auth.title")}),o.jsx(UI,{variant:"outline","data-state":P?"running":e!=null&&e.configured?"connected":"disconnected",children:x(P?"auth.running":e!=null&&e.configured?i==="oauth"?"status.signedIn":"status.configured":i==="oauth"?"status.signedOut":"status.notConfigured")})]}),P?o.jsxs("div",{className:"jv-auth-flow",children:[O&&o.jsx(Ae,{asChild:!0,variant:"outline",children:o.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:O,target:"_blank",rel:"noopener noreferrer",children:x("auth.openPage")})}),(U==null?void 0:U.type)==="device_code"&&o.jsx("p",{children:x("auth.code",{code:U.userCode})}),(H==null?void 0:H.type)==="select"&&o.jsx("div",{className:"flex flex-wrap gap-2",children:(Q=H.options)==null?void 0:Q.map(V=>o.jsx(Ae,{type:"button",variant:"outline",disabled:v,onClick:()=>G(V.id),children:z&&V.id==="browser"?x("auth.browser"):z&&V.id==="device_code"?x("auth.deviceCode"):V.label},V.id))}),H&&H.type!=="select"&&o.jsxs("div",{className:"jv-auth-input",children:[o.jsx(N5,{htmlFor:`oauth-input-${C??a}`,children:H.type==="manual_code"?x(A?"auth.redirectFull":"auth.redirectOrCode"):H.message}),H.type==="manual_code"&&o.jsx("p",{className:"jv-auth-note",children:x("auth.manualNote")}),o.jsx(vt,{id:`oauth-input-${C??a}`,type:H.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:v,onChange:V=>m(V.target.value),onKeyDown:V=>{V.key==="Enter"&&(V.preventDefault(),G(f))}}),o.jsx(Ae,{type:"button",variant:"outline",disabled:v||!f.trim(),onClick:()=>G(f),children:x("common.continue")})]}),!H&&o.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:x("auth.waiting")}),(U==null?void 0:U.type)==="info"&&o.jsx("p",{className:"text-sm",children:U.message}),o.jsx(Ae,{type:"button",variant:"ghost",disabled:v,onClick:()=>void T(()=>he.authCancel(C)),children:x("auth.cancel")})]}):o.jsxs("div",{className:"flex flex-wrap gap-2",children:[z?o.jsxs(o.Fragment,{children:[o.jsx(Ae,{type:"button",variant:"outline",disabled:v,onClick:()=>_("browser"),children:x("auth.browser")}),o.jsx(Ae,{type:"button",variant:"outline",disabled:v,onClick:()=>_("device_code"),children:x("auth.deviceCode")})]}):o.jsx(Ae,{type:"button",variant:"outline",disabled:v,onClick:()=>_(),children:x(i==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&o.jsx(Ae,{type:"button",variant:"outline",disabled:v,onClick:()=>void T(async()=>(await he.authLogout(C),{phase:"idle"})),children:x(i==="api_key"?"auth.removeCredential":"auth.signOut")})]}),(p||u.phase==="error")&&o.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:p||x("error.loginFailed")}),p&&o.jsx(Ae,{type:"button",variant:"link",disabled:v,onClick:()=>{b(""),S(V=>V+1)},children:x("auth.refresh")})]})}async function FI(e,a,i){try{return await he.autoconfigModel({modelId:e.id,api:e.api||a,...i?{choice:i}:{}})}catch(r){return{status:"error",message:it(r,"auto.failed")}}}function VI(e,a){if(a.status!=="matched")return{...e,auto:a};const{fields:i,...r}=a,c=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...i,name:c?e.model.name:a.source.name||e.model.id},auto:r}}const E5=e=>`${e.provider} / ${e.modelId}`;function Ub({items:e,onPick:a}){return o.jsx("div",{className:"jv-auto-sources",children:e.map(i=>o.jsxs("button",{type:"button",onClick:()=>a(i),children:[o.jsx("span",{className:"jv-mono",children:E5(i)}),i.official&&o.jsx("em",{children:x("auto.official")}),o.jsx("small",{children:i.api})]},`${i.provider}/${i.modelId}`))})}function $I({state:e,modelId:a,onRun:i}){const r=u=>i({provider:u.provider,modelId:u.modelId}),c=(e==null?void 0:e.status)==="pending";return o.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[o.jsxs(Ae,{type:"button",variant:"outline",size:"sm",disabled:!a.trim()||c,onClick:()=>i(),children:[o.jsx(j4,{}),x(c?"auto.pending":"auto.run")]}),e&&!c&&o.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:b0("auto.matched",{source:o.jsx("strong",{className:"jv-mono",children:E5(e.source)}),note:e.reseller?x("auto.reseller"):"",suffix:x("auto.applied")})}),e.apiMismatch&&o.jsx("p",{className:"jv-auto-warn",children:x("auto.apiMismatch",{api:e.source.api})}),e.alternatives.length>0&&o.jsxs("details",{children:[o.jsx("summary",{children:x("auto.changeSource")}),o.jsx(Ub,{items:e.alternatives,onPick:r})]})]}),e.status==="choose"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:e.reason==="multiple"?x("auto.multiple"):x("auto.similar",{modelId:a})}),o.jsx(Ub,{items:e.options,onPick:r})]}),e.status==="none"&&o.jsx("p",{children:x("auto.notFound")}),e.status==="error"&&o.jsx("p",{role:"alert",children:e.message})]})]})}const Ep=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],T5=[["off","thinking.level.off"],["minimal","thinking.level.minimal"],["low","thinking.level.low"],["medium","thinking.level.medium"],["high","thinking.level.high"],["xhigh","thinking.level.xhigh"],["max","thinking.level.max"]],A5=e=>e==="xhigh"||e==="max";function _5(e,a){const i=e[a];return i===null||i===void 0&&A5(a)?"unsupported":i===void 0?"default":"custom"}function GI(e){return e.reasoning?T5.filter(([a])=>_5(e.thinkingLevelMap,a)!=="unsupported").map(([,a])=>x(a)):[x("thinking.level.off")]}function YI({model:e,api:a,onChange:i}){const r=e.thinkingLevelMap,c=(f,m,v)=>{const y={...r};m==="default"?delete y[f]:m==="unsupported"?y[f]=null:y[f]=v??(typeof r[f]=="string"?r[f]:f),i({thinkingLevelMap:y})},u=a==="openai-completions",d=e.thinkingFormat&&!Ep.includes(e.thinkingFormat)?[...Ep,e.thinkingFormat]:Ep;return o.jsxs("section",{className:"jv-thinking",children:[o.jsx("h4",{children:x("thinking.title")}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("thinking.format")}),o.jsxs(gr,{value:e.thinkingFormat||"default",disabled:!u&&!e.thinkingFormat,onValueChange:f=>i({thinkingFormat:f==="default"?"":f}),children:[o.jsx(yr,{"aria-label":x("thinking.format"),children:o.jsx(vr,{})}),o.jsxs(xr,{className:"jv-select-menu",children:[o.jsx(sa,{value:"default",children:x("thinking.protocolDefault")}),d.map(f=>o.jsx(sa,{value:f,children:f},f))]})]}),!u&&o.jsx("small",{className:"jv-field-hint",children:x("thinking.onlyCompletions")})]}),o.jsx("div",{className:"jv-thinking-levels",role:"group","aria-label":x("thinking.levels"),children:T5.map(([f,m])=>{const v=_5(r,f);return o.jsxs("div",{className:"jv-thinking-level",children:[o.jsxs("span",{children:[x(m),o.jsx("code",{children:f})]}),o.jsxs(gr,{value:v,onValueChange:y=>c(f,y),children:[o.jsx(yr,{"aria-label":x("thinking.levelName",{level:x(m)}),children:o.jsx(vr,{})}),o.jsxs(xr,{className:"jv-select-menu",children:[!A5(f)&&o.jsx(sa,{value:"default",children:x("thinking.supportedDefault")}),o.jsx(sa,{value:"unsupported",children:x("thinking.unsupported")}),o.jsx(sa,{value:"custom",children:x("thinking.supportedCustom")})]})]}),v==="custom"?o.jsx(vt,{className:"jv-mono",required:!0,"aria-label":x("thinking.levelValue",{level:x(m)}),maxLength:80,value:r[f]??"",onChange:y=>c(f,"custom",y.target.value)}):o.jsx("span",{})]},f)})}),o.jsx("p",{className:"jv-field-hint",children:x("thinking.supported",{levels:GI(e).join(" · ")})})]})}const Tp=[{id:"openai-completions",label:"OpenAI · Chat Completions"},{id:"openai-responses",label:"OpenAI · Responses"},{id:"anthropic-messages",label:"Anthropic · Messages"},{id:"google-generative-ai",label:"Google · Gemini"}],XI=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function g0({value:e,onChange:a,allowDefault:i=!1}){const r=Tp.some(c=>c.id===e)||!e?Tp:[...Tp,{id:e,label:e}];return o.jsxs(gr,{value:e||"default",onValueChange:c=>a(c==="default"?"":c),children:[o.jsx(yr,{"aria-label":x("editor.protocol"),children:o.jsx(vr,{})}),o.jsxs(xr,{className:"jv-select-menu",children:[i&&o.jsx(sa,{value:"default",children:x("card.defaultProtocol")}),r.map(c=>o.jsx(sa,{value:c.id,children:c.label},c.id))]})]})}const KI=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),qb={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function QI({value:e,onChange:a}){const i=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[r,c]=w.useState(()=>i(e)),[u,d]=w.useState(""),f=w.useRef(null);return w.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(r||"{}"))===JSON.stringify(e))return}catch{}c(i(e)),d(""),(m=f.current)==null||m.setCustomValidity("")},[e]),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("card.compat")}),o.jsx($d,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,r.split(`
604
+ `).length)),placeholder:"{}",value:r,onChange:m=>{c(m.target.value);try{const v=JSON.parse(m.target.value||"{}");if(!v||typeof v!="object"||Array.isArray(v))throw new Error;a(v),d(""),m.currentTarget.setCustomValidity("")}catch{d(x("card.jsonObject")),m.currentTarget.setCustomValidity(x("card.jsonObject"))}}}),u&&o.jsx("small",{role:"alert",children:u})]})}function ZI({draft:e,protocol:a,onChange:i,onRemove:r,onAutoconfig:c}){const{model:u}=e,[d,f]=w.useState(!u.id),[m,v]=w.useState(!1),[y,p]=w.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),b=k=>i({...e,model:{...u,...k}}),j=(k,C)=>o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:k}),C]}),S=(k,C,E)=>{const M=y.map((_,z)=>z===k?{..._,[C]:E}:_);p(M);const T={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==M[k].name&&(T[y[k].name]=null);for(const _ of M)_.name&&(_.value||!_.saved)&&(T[_.name]=_.value);b({headerUpdates:T})};return o.jsxs("article",{className:`jv-model-card ${e.selected?"is-selected":""}`,children:[o.jsxs("div",{className:"jv-model-summary",children:[o.jsx("input",{type:"checkbox",checked:e.selected,"aria-label":x("card.use",{name:u.id||x("card.newModel")}),onChange:k=>i({...e,selected:k.target.checked})}),o.jsxs("button",{type:"button","aria-expanded":d,className:"jv-model-expand",onClick:()=>f(!d),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:u.name||u.id||x("card.newModel")}),o.jsx("span",{className:"jv-mono",children:u.id||x("card.enterId")})]}),o.jsxs("span",{className:"jv-chips",children:[u.contextWindow&&o.jsx("span",{className:"jv-chip",children:KI(u.contextWindow)}),u.input.includes("image")&&o.jsx("span",{className:"jv-chip",children:x("card.image")}),u.reasoning&&o.jsx("span",{className:"jv-chip",children:x("card.reasoning")}),e.auto&&qb[e.auto.status]&&o.jsx("span",{className:"jv-chip jv-chip-warn",children:x(qb[e.auto.status])})]}),o.jsx(Li,{className:"jv-expand-icon"})]}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-model-remove","aria-label":x("card.remove",{name:u.id||x("card.newModel")}),onClick:r,children:o.jsx(Rd,{})})]}),d&&o.jsxs("div",{className:"jv-model-fields",children:[o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.modelId"),o.jsx(vt,{className:"jv-mono",required:!0,value:u.id,onChange:k=>b({id:k.target.value}),placeholder:"model-id"})),j(x("card.modelName"),o.jsx(vt,{value:u.name,onChange:k=>b({name:k.target.value}),placeholder:x("card.optional")}))]}),o.jsx($I,{state:e.auto,modelId:u.id,onRun:c}),o.jsxs("section",{children:[o.jsx("h4",{children:x("card.capabilities")}),o.jsxs("div",{className:"flex flex-wrap gap-5",children:[o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.reasoning,onChange:k=>b({reasoning:k.target.checked})}),x("card.reasoningThinking")]}),o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.input.includes("image"),onChange:k=>b({input:k.target.checked?["text","image"]:["text"]})}),x("card.imageInput")]})]})]}),u.reasoning&&o.jsx(YI,{model:u,api:u.api||a,onChange:b}),o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h4",{children:x("card.specs")}),o.jsx(Ae,{type:"button",variant:"link",size:"sm",onClick:()=>v(!m),children:x(m?"card.hidePrices":"card.editPrices")})]}),o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.context"),o.jsx(vt,{type:"number",min:1,value:u.contextWindow??"",placeholder:x("card.notProvided"),onChange:k=>b({contextWindow:k.target.value?Number(k.target.value):null})})),j(x("card.maxOutput"),o.jsx(vt,{type:"number",min:1,value:u.maxTokens??"",placeholder:x("card.notProvided"),onChange:k=>b({maxTokens:k.target.value?Number(k.target.value):null})}))]}),o.jsx("h4",{className:"jv-cost-title",children:x("card.costTitle")}),o.jsx("div",{className:"jv-costs",children:[["input","card.costInput"],["output","card.costOutput"],["cacheRead","card.costCacheRead"],["cacheWrite","card.costCacheWrite"]].map(([k,C])=>{var E,M;return o.jsxs("div",{children:[o.jsx(N5,{children:x(C)}),m?o.jsx(vt,{type:"number",step:"any",min:0,value:((E=u.cost)==null?void 0:E[k])??"",onChange:T=>b({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(T.target.value)}})}):o.jsx("span",{children:((M=u.cost)==null?void 0:M[k])??x("card.notProvided")})]},k)})})]}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[x("card.advanced"),o.jsx(Li,{className:"size-4"})]}),o.jsxs("div",{className:"jv-advanced-fields",children:[o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.apiOverride")}),o.jsx(g0,{allowDefault:!0,value:u.api??"",onChange:k=>b({api:k})})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.headers")}),y.map((k,C)=>o.jsxs("div",{className:"jv-header-row",children:[o.jsx(vt,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:k.saved,value:k.name,onChange:E=>S(C,"name",E.target.value)}),o.jsx(vt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?x("card.headerSaved"):"value",value:k.value,onChange:E=>S(C,"value",E.target.value)}),o.jsx(Ae,{type:"button",size:"icon-sm",variant:"ghost","aria-label":x("card.removeHeader"),onClick:()=>{p(y.filter((E,M)=>M!==C)),k.name&&b({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:o.jsx(Rd,{})})]},C)),o.jsxs(Ae,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>p([...y,{name:"",value:"",saved:!1}]),children:[o.jsx(sl,{}),x("card.addHeader")]})]}),o.jsx(QI,{value:u.compat,onChange:k=>b({compat:k})})]})]})]})]})}let JI=0;const Ap=(e,a,i=!1)=>({key:`draft-${++JI}`,model:e,selected:a,...i?{originalId:e.id}:{}});function WI({connection:e,preset:a,defaultName:i,saved:r=!1,onBack:c,onSaved:u,onConnected:d,onChanged:f}){const m=e?e.kind==="custom":(a==null?void 0:a.id)==="custom",v=(e==null?void 0:e.authType)??a.authType,[y,p]=w.useState(e?m?e.providerName:e.displayName:m?"":i),[b,j]=w.useState((e==null?void 0:e.baseUrl)??""),[S,k]=w.useState((e==null?void 0:e.api)??a.api),[C,E]=w.useState(""),[M,T]=w.useState(()=>((e==null?void 0:e.models)??[]).map(ce=>Ap(ce,!0,!0))),[_,z]=w.useState([]),[A,P]=w.useState(""),[H,U]=w.useState(!1),[O,G]=w.useState(!1),[q,Q]=w.useState(""),[V,Y]=w.useState(r?x("editor.saved"):""),K=w.useRef(e==null?void 0:e.id);function D(ce){T(xe=>{const Ce=new Set(xe.map(pe=>pe.model.id));return[...xe,...ce.filter(pe=>!Ce.has(pe.id)).map(pe=>Ap(pe,!1))]})}w.useEffect(()=>{if(m)return;let ce=!0;return G(!0),(e?he.modelCatalog(e.id):he.providerModels(a.id)).then(Ce=>{ce&&D(Ce.models)}).catch(Ce=>{ce&&Q(it(Ce,"editor.fetchFailed"))}).finally(()=>{ce&&G(!1)}),()=>{ce=!1}},[e==null?void 0:e.id,a==null?void 0:a.id,m]);async function $(){G(!0),Q(""),Y("");try{const ce=await he.discoverModels({connectionId:K.current,baseUrl:b,api:S,...C.trim()?{apiKey:C}:{}});D(ce.models),Y(ce.models.length?x("editor.fetched",{count:ce.models.length}):x("editor.noneReturned"))}catch(ce){Q(it(ce,"editor.fetchFailed"))}finally{G(!1)}}async function ne(ce,xe){const Ce=M.filter(W=>ce.includes(W.key)&&W.model.id.trim());if(!Ce.length)return;Q(""),Y(""),T(W=>W.map(je=>Ce.some(Re=>Re.key===je.key)?{...je,auto:{status:"pending"}}:je));const pe={matched:0,choose:0,none:0,error:0};for(const W of Ce){const je=await FI(W.model,S,xe);pe[je.status]++,T(Re=>Re.map(Oe=>Oe.key===W.key?VI(Oe,je):Oe))}Ce.length>1&&Y(x("editor.autoSummary",{parts:[x("editor.autoMatched",{count:pe.matched}),pe.choose&&x("editor.autoChoose",{count:pe.choose}),pe.none&&x("editor.autoNone",{count:pe.none}),pe.error&&x("editor.autoFailed",{count:pe.error})].filter(Boolean).join(x("common.listSeparator"))}))}async function R(){if(!K.current){const ce=await he.createModelConnection({providerName:a.id,displayName:y,kind:"builtin",authType:v,baseUrl:b,api:S});K.current=ce.id}return await d(K.current),K.current}async function le(ce){ce.preventDefault(),U(!0),Q(""),Y("");try{let xe;K.current?(xe=await he.updateModelConnection(K.current,{displayName:y,...m?{providerName:y}:{},baseUrl:b,api:S}),m&&C.trim()&&await he.saveModelCredential(xe.id,C)):(xe=await he.createModelConnection({providerName:m?y:a.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:b,api:S,...m&&C.trim()?{apiKey:C}:{}}),K.current=xe.id);for(const Ce of M)Ce.selected&&await he.saveConnectionModel(xe.id,Ce.model,Ce.originalId);for(const Ce of new Set([..._,...M.filter(pe=>pe.originalId&&!pe.selected).map(pe=>pe.originalId)]))await he.deleteConnectionModel(xe.id,Ce);E(""),await u(xe.id),Y(x("editor.saved"))}catch(xe){Q(it(xe,"editor.saveFailed"))}finally{U(!1)}}async function ie(){if(!(!e||!confirm(x("editor.confirmDelete",{name:e.displayName})))){U(!0),Q("");try{await he.deleteModelConnection(e.id),await f(),c()}catch(ce){Q(it(ce,"editor.deleteFailed"))}finally{U(!1)}}}const B=M.filter(ce=>`${ce.model.id} ${ce.model.name}`.toLowerCase().includes(A.toLowerCase())),F=M.filter(ce=>ce.selected).length,se=m?(e==null?void 0:e.displayName)??x("group.custom"):(e==null?void 0:e.displayName)??a.name,ye=e?S5(e):null,we=M.some(ce=>{var xe;return((xe=ce.auto)==null?void 0:xe.status)==="pending"});return o.jsxs("form",{className:"jv-editor",onChange:()=>Y(""),onSubmit:ce=>void le(ce),children:[o.jsxs("header",{className:"jv-editor-header",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:H,onClick:c,"aria-label":x("editor.back"),children:o.jsx(Xd,{})}),o.jsx(Eg,{name:se,provider:e?e.kind==="builtin"?e.providerName:void 0:a==null?void 0:a.id}),o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:se}),o.jsx("span",{children:m?"OpenAI / Anthropic compatible":x(v==="oauth"?"group.subscription":"group.apiKey")})]}),ye&&o.jsx("span",{className:"jv-status","data-ok":ye.ok||void 0,children:ye.label}),e&&o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:H,onClick:()=>void ie(),"aria-label":x("editor.delete"),children:o.jsx(Rd,{})})]}),o.jsxs("div",{className:"jv-editor-scroll",children:[o.jsxs("section",{className:"jv-section","aria-label":x("editor.connection"),children:[o.jsx("h3",{className:"jv-section-title",children:x("editor.connection")}),o.jsx("div",{className:"jv-panel",children:m?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-field-grid",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.providerName")}),o.jsx(vt,{className:"jv-mono",required:!0,maxLength:80,"aria-label":x("editor.providerName"),placeholder:"my-provider",value:y,onChange:ce=>p(ce.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("editor.protocol")}),o.jsx(g0,{value:S,onChange:k})]})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.url")}),o.jsx(vt,{required:!0,type:"url","aria-label":x("editor.url"),value:b,placeholder:"https://api.example.com/v1",onChange:ce=>j(ce.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.key")}),o.jsx(vt,{type:"password",autoComplete:"new-password","aria-label":x("editor.key"),placeholder:x(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:C,onChange:ce=>E(ce.target.value)})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.name")}),o.jsx(vt,{required:!0,maxLength:100,"aria-label":x("editor.name"),value:y,onChange:ce=>p(ce.target.value)})]}),o.jsx(qI,{connection:e,providerName:(e==null?void 0:e.providerName)??a.id,authType:v,ensureConnection:R,onChanged:f}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[o.jsx(Li,{}),x("editor.settings")]}),o.jsxs("div",{className:"jv-advanced-fields",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.url")}),o.jsx(vt,{className:"jv-mono",value:b,placeholder:x("editor.defaultUrl"),onChange:ce=>j(ce.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:"API Protocol"}),o.jsx(g0,{value:S,onChange:k})]})]})]})]})})]}),o.jsxs("section",{className:"jv-section","aria-label":x("editor.models"),children:[o.jsxs("div",{className:"jv-section-head",children:[o.jsxs("h3",{className:"jv-section-title",children:[x("settings.models")," ",o.jsx("span",{children:x("editor.selected",{selected:F,total:M.length})})]}),o.jsxs("div",{className:"jv-section-actions",children:[m&&o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:H||O||!b.trim()||!(C.trim()||e!=null&&e.configured),onClick:()=>void $(),children:[o.jsx(j0,{}),x(O?"editor.fetching":"editor.fetch")]}),F>0&&o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",disabled:H||we,onClick:()=>void ne(M.filter(ce=>ce.selected).map(ce=>ce.key)),children:[o.jsx(j4,{}),x("editor.autoSelected")]}),o.jsxs(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>T([...M,Ap(XI(),!0)]),children:[o.jsx(sl,{}),x("editor.addManually")]})]})]}),M.length>6&&o.jsxs("div",{className:"jv-models-filter",children:[o.jsxs("label",{className:"jv-search",children:[o.jsx(Mc,{}),o.jsx("input",{"aria-label":x("editor.filter"),placeholder:x("editor.filterPlaceholder"),value:A,onChange:ce=>P(ce.target.value)})]}),o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(ce=>ce.map(xe=>B.includes(xe)?{...xe,selected:!0}:xe)),children:x("editor.selectVisible")})]}),O&&!m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("editor.loadingCatalog")}),o.jsx("div",{className:"jv-model-cards",children:B.map(ce=>o.jsx(ZI,{draft:ce,protocol:S,onAutoconfig:xe=>void ne([ce.key],xe),onChange:xe=>T(Ce=>Ce.map(pe=>pe.key===ce.key?xe:pe)),onRemove:()=>{ce.originalId&&z(xe=>[...xe,ce.originalId]),T(xe=>xe.filter(Ce=>Ce.key!==ce.key))}},ce.key))}),!O&&!M.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("editor.empty")}),o.jsx("span",{children:x(m?"editor.emptyCustom":"editor.emptyBuiltin")})]})]})]}),o.jsxs("footer",{className:"jv-editor-footer",children:[o.jsx("div",{"aria-live":"polite",children:q?o.jsx("p",{role:"alert",children:q}):V?o.jsx("p",{role:"status",children:V}):null}),o.jsx(Ae,{type:"submit",className:"jv-primary",disabled:H||O||we,children:x(H?"editor.saving":"editor.save")})]})]})}function eP({connections:e,onChanged:a}){const[i,r]=w.useState("list"),[c,u]=w.useState(),[d,f]=w.useState(),[m,v]=w.useState(0),y=()=>{r("list"),f(void 0),u(void 0),v(0)},p=j=>C5({authType:j.authType,custom:j.kind==="custom"});let b=(c==null?void 0:c.name)??"";if(c){let j=2;for(;e.some(S=>S.displayName===b);)b=`${c.name} ${j++}`}return i==="choose"?o.jsx(PI,{onBack:y,onSelect:j=>{u(j),f(void 0),r("editor")}}):i==="editor"?o.jsx(WI,{connection:e.find(j=>j.id===d),preset:c,defaultName:b,saved:m>0,onBack:y,onChanged:a,onConnected:async j=>{await a(),f(j),u(void 0)},onSaved:async j=>{await a(),f(j),u(void 0),v(S=>S+1)}},m):o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx("h2",{children:x("settings.models")}),o.jsxs(Ae,{className:"jv-primary",onClick:()=>r("choose"),children:[o.jsx(sl,{}),x("models.add")]})]}),!e.length&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("models.empty")})}),k5.filter(j=>e.some(S=>p(S)===j.id)).map(({id:j,label:S})=>o.jsxs("section",{className:"jv-section","aria-label":x(S),children:[o.jsx("h3",{className:"jv-section-title",children:x(S)}),o.jsx("div",{className:"jv-list",children:e.filter(k=>p(k)===j).map(k=>{const C=S5(k);return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(k.id),u(void 0),r("editor")},children:[o.jsx(Eg,{name:k.displayName,provider:k.kind==="builtin"?k.providerName:void 0}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:k.displayName}),o.jsx("span",{children:k.models.length?x("models.count",{count:k.models.length}):x("models.none")})]}),o.jsx("span",{className:"jv-status","data-ok":C.ok||void 0,children:C.label}),o.jsx(al,{className:"jv-row-chevron"})]},k.id)})})]},j))]})}function tP(){var b;const[e,a]=w.useState(null),[i,r]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(!1),[m,v]=w.useState(!1);w.useEffect(()=>{he.connection().then(a).catch(()=>v(!0))},[]);const y=j=>o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("h2",{children:x("settings.network")})}),o.jsxs("section",{className:"jv-section","aria-labelledby":"network-lan",children:[o.jsx("h3",{id:"network-lan",className:"jv-section-title",children:x("connection.lan")}),j]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:x("common.failed")})]});if(!e)return y(null);if(!e.https)return y(o.jsx("div",{className:"jv-list",children:o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-local",children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.localOnly")}),o.jsx("span",{children:b0("connection.localOnlyHint",{flag:o.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const p=async()=>{f(!0),v(!1);try{a(await he.setConnection(!e.allowHttp))}catch{v(!0)}finally{f(!1)}};return y(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"jv-list",role:"group","aria-label":x("connection.addresses"),children:e.addresses.map(j=>o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("code",{children:j})}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(i===j?"ui.copied":"connection.copy"),onClick:()=>void Hc(j).then(S=>r(S?j:null)),children:i===j?o.jsx(Qn,{}):o.jsx(Kd,{})})]},j))}),o.jsxs("div",{className:"jv-list jv-conn-cert",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-root",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("connection.root")})}),o.jsx(Ae,{asChild:!0,variant:"outline",size:"sm",children:o.jsxs("a",{href:"/api/connection/root.crt",children:[o.jsx(j0,{}),x("connection.download")]})})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-print",children:[o.jsx("span",{children:x("connection.fingerprint")}),o.jsx("code",{children:(b=e.fingerprint)==null?void 0:b.replaceAll(":",":​")}),e.fingerprintSha1&&o.jsxs(o.Fragment,{children:[o.jsx("span",{children:x("connection.fingerprintSha1")}),o.jsx("code",{children:e.fingerprintSha1.replaceAll(":",":​")})]})]}),o.jsxs("button",{type:"button",className:"jv-list-row jv-conn-disclosure","aria-expanded":c,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("connection.howTo")})}),o.jsx(Li,{"aria-hidden":"true"})]}),c&&o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-steps",children:o.jsxs("ul",{children:[o.jsx("li",{children:x("connection.howMac")}),o.jsx("li",{children:x("connection.howWindows")}),o.jsx("li",{children:x("connection.howIos")}),o.jsx("li",{children:x("connection.howAndroid")}),o.jsx("li",{children:x("connection.howRestart")})]})})]}),o.jsx("div",{className:"jv-list",children:o.jsxs("button",{type:"button",role:"switch","aria-checked":e.allowHttp,disabled:d,className:"jv-list-row jv-choice-row jv-conn-http",onClick:()=>void p(),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.allowHttp")}),o.jsx("span",{children:x("connection.allowHttpHint")})]}),o.jsx("span",{className:"jv-conn-switch","aria-hidden":"true"})]})})]}))}function yf({value:e,visible:a,onChange:i,onVisible:r,placeholder:c,required:u,warnShort:d=!0}){return o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"jv-secret-input",children:[o.jsx(vt,{type:a?"text":"password",autoComplete:"new-password",spellCheck:!1,required:u,className:"jv-mono",placeholder:c,value:e,onChange:f=>i(f.target.value)}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(a?"secrets.hideValue":"secrets.showValue"),onClick:()=>r(!a),children:a?o.jsx(Qd,{}):o.jsx(Zd,{})})]}),d&&e.length>0&&e.length<8&&o.jsx("span",{className:"jv-field-hint jv-secret-short",children:x("secrets.shortValue")})]})}function nP({secret:e,bots:a,onChanged:i}){return o.jsx(M5,{grantedIds:e.grants.map(r=>r.botId),onceIds:new Set(e.grants.filter(r=>r.scope==="once").map(r=>r.botId)),bots:a,onGrant:async(r,c)=>{let u=e;for(const d of r)u=await he.grantSecret(e.id,d,c);i(u)}})}function M5({grantedIds:e,onceIds:a,bots:i,onGrant:r}){const[c,u]=w.useState(!1),[d,f]=w.useState(""),[m,v]=w.useState([]),[y,p]=w.useState(!1),[b,j]=w.useState(null),S=e.map(A=>i.find(P=>P.id===A)).filter(A=>!!A),k=a??new Set,C=i.filter(A=>!e.includes(A.id)),E=C.filter(A=>A.name.toLowerCase().includes(d.trim().toLowerCase())),M=()=>{u(!1),f(""),v([])},T=A=>v(P=>P.includes(A)?P.filter(H=>H!==A):[...P,A]),_=async A=>{p(!0),j(null);try{await A()}catch(P){j(it(P))}finally{p(!1)}},z=()=>_(async()=>{await r(m,!0),M()});return o.jsxs("section",{className:"jv-secret-grants","aria-label":x("secrets.grants"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsxs("h4",{className:"jv-secret-heading",children:[x("secrets.grants"),S.length>0&&o.jsxs("span",{children:[" · ",S.length]})]}),!c&&o.jsxs(Ae,{type:"button",variant:"outline",size:"sm",disabled:y,onClick:()=>u(!0),children:[o.jsx(sl,{}),x("secrets.addBots")]})]}),S.length>0?o.jsx("ul",{className:"jv-secret-granted",children:S.map(A=>o.jsxs("li",{children:[o.jsx(oo,{color:A.color,mood:A.mood,size:24,crown:A.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:A.name}),k.has(A.id)&&o.jsx("span",{className:"jv-secret-once",children:x("secrets.onceTag")}),o.jsx(Ae,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:y,"aria-label":x("secrets.revoke",{name:A.name}),onClick:()=>void _(()=>r([A.id],!1)),children:o.jsx(ds,{})})]},A.id))}):!c&&o.jsx("p",{className:"jv-hint",children:x("secrets.noGrants")}),c&&o.jsxs("div",{className:"jv-secret-picker",children:[o.jsx(vt,{type:"search",autoFocus:!0,value:d,placeholder:x("secrets.searchBots"),"aria-label":x("secrets.searchBots"),onChange:A=>f(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),E.length===1&&T(E[0].id))}}),o.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":x("secrets.addBots"),children:[E.map(A=>o.jsxs("button",{type:"button",role:"option","aria-selected":m.includes(A.id),className:"jv-secret-option",onClick:()=>T(A.id),children:[o.jsx(oo,{color:A.color,mood:A.mood,size:24,crown:A.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:A.name}),m.includes(A.id)&&o.jsx(Qn,{"aria-hidden":"true"})]},A.id)),E.length===0&&o.jsx("p",{className:"jv-hint",children:x(i.length?C.length?"secrets.noMatch":"secrets.allGranted":"secrets.noBots")})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:M,children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",size:"sm",disabled:y||!m.length,onClick:()=>void z(),children:m.length?x("dialogs.addCount",{count:m.length}):x("common.add")})]})]}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b})]})}const Fb=e=>ua(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function aP({secret:e,bots:a,open:i,onToggle:r,onChanged:c,onDeleted:u}){const[d,f]=w.useState(null),[m,v]=w.useState(e.description),[y,p]=w.useState(""),[b,j]=w.useState(!1),[S,k]=w.useState(null),[C,E]=w.useState(!1),[M,T]=w.useState(null),_=`secret-${e.id}`;w.useEffect(()=>{i&&he.secretUses(e.id).then(O=>f(O.uses)).catch(()=>f([]))},[i,e.id,e.uses]);const z=async(O,G)=>{k(O),T(null);try{await G()}catch(q){T(it(q))}finally{k(null)}},A=O=>{O.preventDefault(),z("save",async()=>{c(await he.updateSecret(e.id,{description:m.trim(),...y?{value:y}:{}})),p(""),j(!1)})},P=new Set(e.grants.map(O=>O.botId)),H=O=>{var G;return((G=a.find(q=>q.id===O))==null?void 0:G.name)??x("secrets.deletedBot")},U=m.trim()!==e.description||!!y;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":i,"aria-controls":_,onClick:r,children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{className:"jv-mono",children:e.name}),o.jsx("span",{children:e.description||x("secrets.noDescription")})]}),e.readable?o.jsx("span",{className:"jv-row-meta",children:P.size?x("secrets.grantCount",{count:P.size}):x("secrets.notGranted")}):o.jsx("span",{className:"jv-status","data-busy":"",children:x("secrets.unreadable")}),o.jsx(Li,{className:"jv-row-chevron","aria-hidden":"true"})]}),i&&o.jsxs("div",{id:_,className:"jv-list-row jv-static-row jv-secret-details",children:[o.jsxs("p",{className:"jv-secret-meta",children:[x("secrets.fingerprint")," ",o.jsx("code",{children:e.fingerprint})," · ",x("secrets.updated",{time:Fb(e.updatedAt)})," · ",e.uses?x("secrets.usedCount",{count:e.uses}):x("secrets.neverUsed")]}),!e.readable&&o.jsx("p",{className:"jv-note-error",children:x("secrets.unreadableHint")}),o.jsx(nP,{secret:e,bots:a,onChanged:c}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:A,"aria-label":x("secrets.edit"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(vt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:m,onChange:O=>v(O.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.newValue")}),o.jsx(yf,{value:y,visible:b,onChange:p,onVisible:j,placeholder:x("secrets.newValuePlaceholder")})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Ae,{type:"submit",variant:"outline",size:"sm",disabled:!!S||!U,children:x("common.save")})})]}),o.jsx("h4",{className:"jv-secret-heading",children:x("secrets.uses")}),d&&d.length?o.jsx("ul",{className:"jv-secret-uses",children:d.map(O=>o.jsxs("li",{children:[o.jsxs("span",{children:[H(O.botId)," · ",Fb(O.at)," · ",x(O.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),O.detail&&o.jsx("code",{children:O.detail})]},O.id))}):o.jsx("p",{className:"jv-hint",children:x("secrets.noUses")}),C?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":x("secrets.deleteTitle",{name:e.name}),children:[o.jsx("strong",{children:x("secrets.deleteTitle",{name:e.name})}),o.jsx("p",{children:x("secrets.deleteBody")}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>E(!1),children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",size:"sm",disabled:!!S,onClick:()=>void z("delete",async()=>{await he.deleteSecret(e.id),u()}),children:x("secrets.deleteConfirm")})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",disabled:!!S,onClick:()=>E(!0),children:x("secrets.delete")})}),M&&o.jsx("p",{className:"jv-note-error",role:"alert",children:M})]})]})}const Vb=(e,a)=>e.name.localeCompare(a.name);function iP(){const[e,a]=w.useState(null),[i,r]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState(!1),[m,v]=w.useState(null),[y,p]=w.useState(null);w.useEffect(()=>{he.secrets().then(j=>{a([...j.secrets].sort(Vb)),r(j.keyLocation)}).catch(j=>p(it(j))),he.bots().then(j=>u(j.bots)).catch(()=>u([]))},[]);const b=j=>a(S=>S&&S.map(k=>k.id===j.id?j:k));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx("h2",{children:x("settings.secrets")}),!d&&o.jsxs(Ae,{className:"jv-primary",onClick:()=>f(!0),children:[o.jsx(sl,{}),x("secrets.add")]})]}),d&&o.jsx(rP,{onCancel:()=>f(!1),onSaved:j=>{f(!1),a(S=>[...S??[],j].sort(Vb)),v(j.id)}}),e&&!e.length&&!d&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("secrets.empty")})}),e&&e.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.secrets"),children:o.jsx("div",{className:"jv-list",children:e.map(j=>o.jsx(aP,{secret:j,bots:c,open:m===j.id,onToggle:()=>v(m===j.id?null:j.id),onChanged:b,onDeleted:()=>{v(null),a(S=>S&&S.filter(k=>k.id!==j.id))}},j.id))})}),i&&o.jsxs("section",{className:"jv-section","aria-labelledby":"secrets-key",children:[o.jsx("h3",{id:"secrets-key",className:"jv-section-title",children:x("secrets.masterKey")}),o.jsx("div",{className:"jv-list",children:o.jsx("div",{className:"jv-list-row jv-static-row jv-secret-key",children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("secrets.keyFile")}),o.jsx("code",{children:i}),o.jsx("span",{children:x("secrets.keyHint")})]})})})]}),y&&o.jsx("p",{className:"jv-note-error",role:"alert",children:y})]})}function rP({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!1),[y,p]=w.useState(!1),[b,j]=w.useState(null),S=async k=>{k.preventDefault(),p(!0),j(null);try{a(await he.createSecret({name:i.trim(),description:c.trim(),value:d}))}catch(C){j(it(C))}finally{p(!1)}};return o.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:k=>void S(k),"aria-label":x("secrets.add"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.name")}),o.jsx(vt,{className:"jv-mono",required:!0,autoFocus:!0,maxLength:64,placeholder:"GITHUB_TOKEN",value:i,onChange:k=>r(k.target.value.toUpperCase())})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(vt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:c,onChange:k=>u(k.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.value")}),o.jsx(yf,{value:d,visible:m,onChange:f,onVisible:v,required:!0})]}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",onClick:e,children:x("common.cancel")}),o.jsx(Ae,{type:"submit",className:"jv-primary",disabled:y||!i.trim()||!d,children:x("common.save")})]})]})}function lP({machine:e,bots:a,open:i,onToggle:r,onChanged:c,onDeleted:u}){const[d,f]=w.useState(e.name),[m,v]=w.useState(e.directory),[y,p]=w.useState(null),[b,j]=w.useState(null),[S,k]=w.useState(null),[C,E]=w.useState(null),[M,T]=w.useState(""),[_,z]=w.useState(!1),[A,P]=w.useState(null),H=`machine-${e.id}`,U=`${e.user}@${e.host}${e.port===22?"":`:${e.port}`}`,O=async(V,Y)=>{j(V),E(null);try{await Y()}catch(K){E(it(K))}finally{j(null)}},G=V=>{V.preventDefault(),O("save",async()=>{const Y=await he.updateMachine(e.id,{name:d.trim(),directory:m.trim()});c(Y),f(Y.name),v(Y.directory)})},q=V=>void O("delete",async()=>{try{await he.deleteMachine(e.id,V),u()}catch(Y){if(!V&&Y instanceof hr&&Y.code!=="machine_missing"){k("force"),E(it(Y));return}throw Y}}),Q=d.trim()!==e.name||m.trim()!==e.directory;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":i,"aria-controls":H,onClick:r,children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:e.name}),o.jsx("span",{className:"jv-mono",children:U})]}),o.jsx("span",{className:"jv-row-meta",children:e.botIds.length?x("secrets.grantCount",{count:e.botIds.length}):x("secrets.notGranted")}),o.jsx(Li,{className:"jv-row-chevron","aria-hidden":"true"})]}),i&&o.jsxs("div",{id:H,className:"jv-list-row jv-static-row jv-secret-details",children:[o.jsx(M5,{grantedIds:e.botIds,bots:a,onGrant:async(V,Y)=>{let K=e;for(const D of V)K=await he.grantMachine(e.id,D,Y);c(K)}}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:G,"aria-label":e.name,children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(vt,{required:!0,maxLength:40,value:d,onChange:V=>f(V.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.directory")}),o.jsx(vt,{className:"jv-mono",required:!0,maxLength:1e3,spellCheck:!1,value:m,onChange:V=>v(V.target.value)})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Ae,{type:"submit",variant:"outline",size:"sm",disabled:!!b||!Q||!d.trim(),children:x("common.save")})})]}),o.jsxs("section",{className:"jv-secret-grants","aria-label":x("machines.fingerprint"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsx("h4",{className:"jv-secret-heading",children:x("machines.fingerprint")}),y!=null&&y.changed?o.jsx(Ae,{type:"button",variant:"outline",size:"sm",disabled:!!b,onClick:()=>void O("trust",async()=>{c(await he.trustMachine(e.id,y.hostKeys.fingerprints)),p(null)}),children:x("machines.trust")}):o.jsx(Ae,{type:"button",variant:"outline",size:"sm",disabled:!!b,onClick:()=>void O("check",async()=>{const V=await he.checkMachine(e.id);p(V),c(V.machine)}),children:x(b==="check"?"machines.checking":"machines.check")})]}),o.jsx("div",{className:"jv-machine-prints",children:(y!=null&&y.changed?y.hostKeys.fingerprints:e.fingerprints).map(V=>o.jsx("code",{"data-new":(y==null?void 0:y.changed)||void 0,children:V},V))}),y&&o.jsx("p",{className:"jv-hint","data-warn":y.changed||void 0,children:x(y.changed?"machines.changed":"machines.unchanged")})]}),o.jsxs("section",{className:"jv-secret-grants","aria-label":x("machines.login"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsx("h4",{className:"jv-secret-heading",children:x("machines.login")}),o.jsx("span",{className:"jv-row-meta",children:x(e.login==="password"?"machines.loginPassword":"machines.loginKey")})]}),e.publicKey&&o.jsx(Sg,{publicKey:e.publicKey}),e.login==="password"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-hint",children:x("machines.passwordLogin")}),o.jsxs("form",{className:"jv-machine-password",autoComplete:"off","aria-label":x("machines.updatePassword"),onSubmit:V=>{V.preventDefault(),O("password",async()=>{c(await he.setMachinePassword(e.id,M)),T(""),P(x("machines.passwordUpdated"))})},children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.newPassword")}),o.jsx(yf,{value:M,visible:_,onChange:T,onVisible:z,required:!0,warnShort:!1})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"outline",size:"sm",disabled:!!b,onClick:()=>void O("key",async()=>{const V=await he.checkMachine(e.id);p(V),c(V.machine),P(x(V.machine.login==="key"?"machines.usingKey":"machines.stillPassword"))}),children:x("machines.useKey")}),o.jsx(Ae,{type:"submit",variant:"outline",size:"sm",disabled:!!b||!M,children:x("machines.updatePassword")})]})]})]}),A&&o.jsx("p",{className:"jv-hint",children:A})]}),S?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":x(S==="force"?"machines.forceTitle":"machines.deleteTitle",{name:e.name}),children:[o.jsx("strong",{children:x(S==="force"?"machines.forceTitle":"machines.deleteTitle",{name:e.name})}),o.jsx("p",{children:S==="force"?x("machines.forceBody",{comment:`jarvy-${e.id}`}):x("machines.deleteBody")}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",onClick:()=>{k(null),E(null)},children:x("common.cancel")}),o.jsx(Ae,{type:"button",className:"jv-primary",size:"sm",disabled:!!b,onClick:()=>q(S==="force"),children:x(S==="force"?"machines.forceConfirm":"machines.deleteConfirm")})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Ae,{type:"button",variant:"ghost",size:"sm",disabled:!!b,onClick:()=>k("delete"),children:x("machines.delete")})}),C&&o.jsx("p",{className:"jv-note-error",role:"alert",children:C})]})]})}function oP(){const[e,a]=w.useState(null),[i,r]=w.useState([]),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,v]=w.useState(null);w.useEffect(()=>{he.machines().then(p=>a(p.machines)).catch(p=>v(it(p))),he.bots().then(p=>r(p.bots)).catch(()=>r([]))},[]);const y=p=>a(b=>b&&b.map(j=>j.id===p.id?p:j));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx("h2",{children:x("settings.machines")}),!c&&o.jsxs(Ae,{className:"jv-primary",onClick:()=>u(!0),children:[o.jsx(sl,{}),x("machines.add")]})]}),c&&o.jsx(sP,{onCancel:()=>u(!1),onSaved:p=>{u(!1),a(b=>[...b??[],p]),f(p.id)}}),e&&!e.length&&!c&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("machines.empty")})}),e&&e.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.machines"),children:o.jsx("div",{className:"jv-list",children:e.map(p=>o.jsx(lP,{machine:p,bots:i,open:d===p.id,onToggle:()=>f(d===p.id?null:p.id),onChanged:y,onDeleted:()=>{f(null),a(b=>b&&b.filter(j=>j.id!==p.id))}},p.id))})}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function sP({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[c,u]=w.useState("22"),[d,f]=w.useState(""),[m,v]=w.useState(""),[y,p]=w.useState(""),[b,j]=w.useState(null),[S,k]=w.useState(""),[C,E]=w.useState(!1),[M,T]=w.useState("password"),[_,z]=w.useState(!1),[A,P]=w.useState(null),H=US(!!b&&M==="key"),U={host:i.trim(),port:Number(c)||22,user:d.trim()},O=async Q=>{z(!0),P(null);try{await Q()}catch(V){V instanceof hr&&V.code==="ssh_key_expired"&&H.renew(),P(it(V))}finally{z(!1)}},G=Q=>{Q.preventDefault(),O(b?async()=>a(await he.addMachine({...U,name:m.trim(),directory:y.trim(),hostKeys:b,...M==="key"?{keyId:H.key.keyId}:{password:S}})):async()=>j(await he.scanMachine(U)))},q=U.user&&U.host?`${U.user}@${U.host}`:"";return o.jsxs("form",{className:"jv-panel jv-machine-form",autoComplete:"off",onSubmit:G,"aria-label":x("machines.add"),"aria-busy":_||void 0,children:[b?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"jv-machine-where",children:[m.trim()&&o.jsx("strong",{children:m.trim()}),o.jsxs("code",{children:[U.user,"@",U.host,U.port===22?"":`:${U.port}`]})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:b.fingerprints.map(Q=>o.jsx("code",{children:Q},Q))}),o.jsx("span",{className:"jv-field-hint",children:x("machines.fingerprintHint")})]}),o.jsx("div",{className:"jv-env-seg jv-machine-login",role:"radiogroup","aria-label":x("machines.login"),children:["password","key"].map(Q=>o.jsx("button",{type:"button",role:"radio","aria-checked":M===Q,disabled:_,onClick:()=>{T(Q),P(null)},children:x(Q==="password"?"machines.byPassword":"machines.byKey")},Q))}),M==="password"?o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.password")}),o.jsx(yf,{value:S,visible:C,onChange:k,onVisible:E,required:!0,warnShort:!1}),o.jsx("span",{className:"jv-field-hint",children:x("machines.passwordHint")})]}):o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("machines.publicKey")}),H.key?o.jsx(Sg,{publicKey:H.key.publicKey}):H.error?o.jsx("p",{className:"jv-note-error",role:"alert",children:H.error}):o.jsx("p",{className:"jv-hint",children:"…"}),o.jsx("span",{className:"jv-field-hint",children:x("machines.keyHint",{user:U.user})})]})]}):o.jsxs("div",{className:"jv-machine-fields",children:[o.jsxs("label",{className:"jv-field jv-machine-host",children:[o.jsx("span",{children:x("machines.host")}),o.jsx(vt,{required:!0,autoFocus:!0,maxLength:253,spellCheck:!1,placeholder:x("machines.hostPlaceholder"),value:i,onChange:Q=>r(Q.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-port",children:[o.jsx("span",{children:x("machines.port")}),o.jsx(vt,{required:!0,inputMode:"numeric",maxLength:5,value:c,onChange:Q=>u(Q.target.value.replace(/\D/g,""))})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.user")}),o.jsx(vt,{required:!0,maxLength:64,spellCheck:!1,autoCapitalize:"off",value:d,onChange:Q=>f(Q.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(vt,{maxLength:40,placeholder:q,value:m,onChange:Q=>v(Q.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-wide",children:[o.jsx("span",{children:x("machines.directory")}),o.jsx(vt,{className:"jv-mono",maxLength:1e3,spellCheck:!1,placeholder:x("machines.directoryPlaceholder"),value:y,onChange:Q=>p(Q.target.value)})]})]}),A&&o.jsx("p",{className:"jv-note-error",role:"alert",children:A}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ae,{type:"button",variant:"ghost",disabled:_,onClick:()=>{b?(j(null),k(""),P(null)):e()},children:x(b?"machines.back":"common.cancel")}),o.jsx(Ae,{type:"submit",className:"jv-primary",disabled:_||!U.host||!U.user||!!b&&(M==="key"?!H.key:!S),children:x(b?M==="key"?_?"machines.verifying":"machines.verify":_?"machines.connecting":"machines.connect":_?"machines.scanning":"machines.next")})]})]})}const cP=[{id:"general",label:"settings.general",icon:VC},{id:"models",label:"settings.models",icon:fC},{id:"machines",label:"settings.machines",icon:m4},{id:"secrets",label:"settings.secrets",icon:Pj},{id:"network",label:"settings.network",icon:wC},{id:"about",label:"settings.about",icon:w0}];function uP({connections:e,onChanged:a,onClose:i,initialTab:r="general"}){const[c,u]=w.useState(r);return o.jsx(NS,{open:!0,onOpenChange:d=>{d||i()},children:o.jsxs(ES,{className:"jv-settings-shell","aria-describedby":void 0,children:[o.jsxs("nav",{className:"jv-settings-nav","aria-label":x("settings.sections"),children:[o.jsx(gf,{className:"jv-settings-title",children:x("settings.title")}),cP.map(d=>o.jsxs("button",{type:"button",className:"jv-nav-item","aria-current":c===d.id?"page":void 0,onClick:()=>u(d.id),children:[o.jsx(d.icon,{}),x(d.label)]},d.id))]}),o.jsx("main",{className:"jv-settings-content",children:c==="general"?o.jsx(lI,{}):c==="models"?o.jsx(eP,{connections:e,onChanged:a}):c==="machines"?o.jsx(oP,{}):c==="secrets"?o.jsx(iP,{}):c==="network"?o.jsx(tP,{}):o.jsx(rI,{})})]})})}const $b="Jarvy";let Gb=null,Ri=null,Gl=null;function dP(){return document.querySelector('link[rel="icon"][type="image/png"]')}function fP(e){if(!(Ri!=null&&Ri.complete)||!Ri.naturalWidth)return null;const a=64,i=document.createElement("canvas");i.width=i.height=a;const r=i.getContext("2d");if(!r)return null;r.drawImage(Ri,0,0,a,a);const c=e>9?"9+":String(e),u=c.length>1?21:18;return r.fillStyle="#e5484d",r.beginPath(),r.arc(a-u,u,u,0,Math.PI*2),r.fill(),r.fillStyle="#fff",r.font=`bold ${c.length>1?26:30}px system-ui, sans-serif`,r.textAlign="center",r.textBaseline="middle",r.fillText(c,a-u,u+2),i.toDataURL("image/png")}function Yb(e){document.title=e>0?`(${e>99?"99+":e}) ${$b}`:$b;const a=dP();if(!a)return;if(Gb??(Gb=a.href),Gl??(Gl=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){a.href=Gb,Gl&&!Gl.isConnected&&document.head.prepend(Gl);return}const i=fP(e);i&&(a.href=i,Gl==null||Gl.remove())}function hP(e){w.useEffect(()=>{Ri||(Ri=new Image,Ri.src="/favicon.svg"),Ri.complete?Yb(e):Ri.onload=()=>Yb(e)},[e])}const Sd=50;function mP({chatId:e,ready:a,scroller:i,me:r,onError:c}){const[u,d]=w.useState([]),[f,m]=w.useState(!1),[v,y]=w.useState(!1),[p,b]=w.useState(!1),j=w.useRef(u),S=w.useRef(e),k=w.useRef(0),C=w.useRef(!1),E=w.useRef(!1);j.current=u,S.current=e,E.current=v;const M=w.useRef(null),T=w.useRef(!1),_=w.useRef(void 0),z=w.useRef(!0),A=w.useRef(!1),P=w.useRef(null),[H,U]=w.useState(!1),O=w.useRef(0);w.useEffect(()=>{if(d([]),y(!1),A.current=!1,z.current=!0,!a||!e)return;let D=!0;const $=++k.current;return m(!0),U(!1),O.current=0,he.latestMessages(e,Sd).then(ne=>{!D||$!==k.current||(T.current=!0,d(ne.messages),y(ne.hasOlder),m(!1))}).catch(ne=>{D&&(m(!1),c(ne))}),()=>{D=!1}},[e,a]);async function G(D){const $=j.current[0],ne=++k.current;if(!$||$.chatId!==D){const ie=await he.latestMessages(D,Sd);S.current===D&&ne===k.current&&(d(ie.messages),y(ie.hasOlder),m(!1));return}const R=$.sequence-1,le=await he.messages(D,R);S.current!==D||ne!==k.current||(d(ie=>[...ie.filter(B=>B.chatId===D&&B.sequence<=R),...le.messages]),m(!1))}async function q(){const D=j.current[0],$=i.current;if(!(!D||!E.current||C.current)){C.current=!0,b(!0);try{const ne=await he.olderMessages(D.chatId,D.sequence,Sd);if(S.current!==D.chatId)return;M.current=$?$.scrollHeight-$.scrollTop:null,d(R=>{var le;return((le=R[0])==null?void 0:le.id)===D.id?[...ne.messages,...R]:R}),y(ne.hasOlder)}catch(ne){c(ne)}finally{C.current=!1,b(!1)}}}w.useEffect(()=>{const D=i.current;if(!D)return;const $=new ResizeObserver(()=>{!A.current||!z.current||D.scrollHeight-D.scrollTop-D.clientHeight<8||D.scrollTo({top:D.scrollHeight,behavior:"instant"})}),ne=()=>{$.disconnect(),$.observe(D);for(const ie of D.children)$.observe(ie)};ne();const R=new MutationObserver(ne);R.observe(D,{childList:!0});const le=()=>{var ie;if(!A.current){z.current=!0,U(!1);return}z.current=D.scrollHeight-D.scrollTop-D.clientHeight<160,U(!z.current),z.current&&(O.current=((ie=j.current.at(-1))==null?void 0:ie.sequence)??0)};return le(),D.addEventListener("scroll",le,{passive:!0}),()=>{$.disconnect(),R.disconnect(),D.removeEventListener("scroll",le)}},[i.current,e]),w.useLayoutEffect(()=>{const D=i.current,$=u.at(-1);if(D){if(M.current!==null)D.scrollTo({top:D.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if(T.current&&u.length){const ne=()=>D.scrollTo({top:D.scrollHeight,behavior:"instant"});ne(),requestAnimationFrame(ne),T.current=!1,A.current=!0,z.current=!0}else $&&$.id!==_.current&&(z.current||$.senderId===r)&&D.scrollTo({top:D.scrollHeight,behavior:"smooth"});_.current=$==null?void 0:$.id,z.current&&(O.current=($==null?void 0:$.sequence)??0)}},[u]),w.useEffect(()=>{const D=i.current,$=P.current;if(!D||!$||!v||!A.current)return;const ne=new IntersectionObserver(R=>{var le;(le=R[0])!=null&&le.isIntersecting&&A.current&&q()},{root:D,rootMargin:"400px 0px 0px 0px"});return ne.observe($),()=>ne.disconnect()},[v,u,e,f]);async function Q(D,$){if(j.current.some(B=>B.id===D)){V(D,$);return}const R=S.current,le=await he.message(D);if(le.chatId!==R)return le.chatId;const ie=await he.olderMessages(le.chatId,le.sequence+1,Sd);S.current===le.chatId&&(T.current=!0,d([...ie.messages,le]),y(ie.hasOlder),requestAnimationFrame(()=>V(D,$)))}function V(D,$){var R;const ne=(R=i.current)==null?void 0:R.querySelector(`[data-message="${D}"]`);ne&&YS(ne,$)}const Y=H?u.filter(D=>D.sequence>O.current&&D.senderId!==r).length:0;return{messages:u,setMessages:d,loading:f,hasOlder:v,loadingOlder:p,refresh:G,top:P,away:H,unseen:Y,toLatest:()=>{const D=i.current;D==null||D.scrollTo({top:D.scrollHeight,behavior:"smooth"})},toMessage:Q,cancel:()=>{k.current++}}}function pP({ready:e,selected:a,messages:i,chats:r,chatList:c,setChats:u,onError:d}){const f=r.find(m=>m.id===a);w.useEffect(()=>{const m=a,v=i.at(-1);if(!e||!m||!v||v.chatId!==m)return;const y=()=>{const p=c.current.find(b=>b.id===m);document.visibilityState!=="visible"||((p==null?void 0:p.readSequence)??0)>=v.sequence&&!(p!=null&&p.hint)&&!(p!=null&&p.alerts)||(u(b=>b.map(j=>j.id===m?{...j,readSequence:Math.max(j.readSequence,v.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:j)),he.markRead(m,v.sequence).catch(d))};return y(),document.addEventListener("visibilitychange",y),()=>document.removeEventListener("visibilitychange",y)},[i,a,e,f==null?void 0:f.readSequence,f==null?void 0:f.alerts,f==null?void 0:f.hint])}function gP({onLogin:e}){const[a,i]=w.useState(""),[r,c]=w.useState(""),[u,d]=w.useState(!1),[f,m]=w.useState(!1),[v,y]=w.useState(null),[p,b]=w.useState(document.documentElement.classList.contains("dark"));async function j(S){if(S.preventDefault(),!f){m(!0),y(null);try{const k=await he.login(a.trim(),r);c(""),e(k.username)}catch(k){y(k instanceof hr&&k.status===401?"login.wrong":k instanceof hr&&k.status===429?"login.tooMany":"login.offline")}finally{m(!1)}}}return o.jsxs("div",{className:"jv-login",children:[o.jsxs("div",{className:"jv-login-corner",children:[o.jsx("div",{className:"jv-login-locales",role:"group","aria-label":x("general.language"),children:Qb.map(S=>o.jsx("button",{type:"button",lang:S,"aria-pressed":eo()===S,title:Mp(S,"name"),onClick:()=>Wb(S),children:Mp(S,"short")},S))}),o.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Fd(p?"light":"dark"),b(!p)},"aria-label":x(p?"login.themeLight":"login.themeDark"),children:o.jsx(Be,{name:p?"sun":"moon"})})]}),o.jsx("main",{className:"jv-login-stage",children:o.jsxs("div",{className:"jv-login-wrap",children:[o.jsxs("header",{className:"jv-login-brand",children:[o.jsx("img",{className:"jv-login-logo",src:"/icon.svg",alt:"",width:64,height:64}),o.jsx("h1",{children:"Jarvy"}),o.jsx("p",{children:x("login.subtitle")})]}),o.jsxs("form",{className:"jv-login-form",onSubmit:S=>void j(S),"aria-label":x("login.form"),"aria-busy":f,children:[o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-username",children:x("login.username")}),o.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:a,onChange:S=>i(S.target.value)})]}),o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-password",children:x("login.password")}),o.jsxs("div",{className:"jv-login-password",children:[o.jsx("input",{id:"login-password",type:u?"text":"password",autoComplete:"current-password",required:!0,disabled:f,value:r,onChange:S=>c(S.target.value)}),o.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":x(u?"login.hidePassword":"login.showPassword"),onClick:()=>d(!u),children:o.jsx(Be,{name:u?"eye-slash":"eye"})})]})]}),v&&o.jsx("p",{className:"jv-login-error",role:"alert",children:x(v)}),o.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:x(f?"login.submitting":"login.submit")})]})]})})]})}function vP({selected:e,chats:a,transcript:i,openChat:r,setPane:c,paneRef:u,blocked:d}){const[f,m]=w.useState(null),[v,y]=w.useState(0);w.useEffect(()=>{var j;!f||e!==f.chatId||i.loading||((j=i.messages[0])==null?void 0:j.chatId)!==f.chatId||(i.toMessage(f.id,f.passage),m(null))},[f,e,i.loading,i.messages]);function p(j,S,k){var E;if(j.type==="thread"){const M=a.find(T=>T.id===j.parentId);M&&r(M),c({kind:"thread",id:j.id,parentId:j.parentId,mode:"pane",focus:{id:S,passage:k}});return}((E=u.current)==null?void 0:E.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&c(null);const C=j.id===e;r(j),C?i.toMessage(S,k):m({chatId:j.id,id:S,passage:k})}function b(j){c({kind:"search",chat:j}),y(S=>S+1)}return w.useEffect(()=>{const j=S=>{var C,E;if(d||S.defaultPrevented||!(S.ctrlKey||S.metaKey)||S.key.toLowerCase()!=="f")return;const k=a.find(M=>M.id===e);k&&(((C=u.current)==null?void 0:C.kind)==="search"&&((E=document.activeElement)!=null&&E.closest(".jv-search-pane"))||(S.preventDefault(),b(k)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[d,a,e]),{openMessage:p,search:b,focusKey:v}}const yP=null;function Xb(){var Xi,Ki,ea,gi,ue,be;const[e,a]=w.useState("loading"),[i,r]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState({}),m=w.useRef(new Map),[v,y]=w.useState([]),[p,b]=w.useState([]),[j,S]=w.useState([]),[k,C]=w.useState(null),[E,M]=w.useState({}),[T,_]=w.useState(null),[z,A]=w.useState(null),[P,H]=w.useState(null),[U,O]=w.useState([]),[G,q]=w.useState(null),[Q,V]=w.useState(!1),[Y,K]=w.useState(!1),[D,$]=w.useState(!1),[ne,R]=w.useState(""),[le,ie]=w.useState(!1),[B,F]=w.useState(null),[se,ye]=w.useState(!1),[we,ce]=w.useState(420),[xe,Ce]=w.useState(0),[pe,W]=w.useState([]),[je,Re]=w.useState(""),Oe=w.useRef(null),Fe=w.useRef(null),Je=w.useRef(null),[We,Ct]=w.useState(null),[rn,xn]=w.useState(null),[Pn,fa]=w.useState(null),ln=w.useRef(T);ln.current=T;const Ga=w.useRef(0),fe=w.useRef(v);fe.current=v;const Ne=w.useRef(B);Ne.current=B;const qe=w.useMemo(()=>new tB(nB(i)),[i]);w.useEffect(()=>{const I=()=>qe.save();return window.addEventListener("pagehide",I),()=>window.removeEventListener("pagehide",I)},[qe]);const Ge=((Xi=j.find(I=>I.kind==="user"&&I.name===i))==null?void 0:Xi.id)??"",nt=mP({chatId:T,ready:e==="ready",scroller:Oe,me:Ge,onError:Xe}),{messages:Ut,setMessages:dn}=nt,qt=vP({selected:T,chats:v,transcript:nt,openChat:ha,setPane:F,paneRef:Ne,blocked:!!P||!!G}),Rn=((Ki=v.find(I=>I.id===T))==null?void 0:Ki.botId)??z??((ea=c[0])==null?void 0:ea.id);async function Hn(I){const ae=(m.current.get(I)??0)+1;m.current.set(I,ae);const me=await he.botStatus(I);m.current.get(I)===ae&&f(Te=>({...Te,[I]:me}))}w.useEffect(()=>{e==="ready"&&Rn&&Hn(Rn).catch(Xe)},[e,Rn]);const zt=((gi=v.find(I=>I.id===T&&I.type==="channel"))==null?void 0:gi.memberIds.filter(I=>c.some(ae=>ae.id===I)).join(","))??"";w.useEffect(()=>{if(e==="ready"&&zt)for(const I of zt.split(","))Hn(I).catch(Xe)},[e,zt]);async function Dn(I){var Pe,ut;const[ae,me,Te,Ee,He,Ie]=await Promise.all([he.bots(),he.chats(),he.modelConnections(),he.sections(),he.members(),he.followedThreads()]);r(I),u(ae.bots),y(me.chats),O(Te.connections),b(Ee.sections),S(He.members),W(Ie.threads);const ze=me.chats.find(Ve=>Ve.type!=="thread");_((ze==null?void 0:ze.id)??null),ze&&M({[ze.id]:ze.readSequence}),A(((Pe=me.chats[0])==null?void 0:Pe.botId)??((ut=ae.bots[0])==null?void 0:ut.id)??null),a("ready")}w.useEffect(()=>{Fd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),he.me().then(I=>Dn(I.username)).catch(()=>a("login"))},[]),w.useEffect(()=>{if(e!=="ready")return;let I=!0;const ae=new EventSource("/api/events"),me=async Ee=>{he.followedThreads().then(Ie=>{I&&W(Ie.threads)}).catch(()=>{}),Ce(Ie=>Ie+1),await Yt();const He=ln.current;I&&He&&(!Ee||Ee===He)&&await ml(He)},Te=()=>void he.sections().then(Ee=>{I&&b(Ee.sections)}).catch(Ee=>{I&&Xe(Ee)});return ae.addEventListener("ready",()=>{var He;me().catch(Ie=>{I&&Xe(Ie)}),Te();const Ee=(He=fe.current.find(Ie=>Ie.id===ln.current))==null?void 0:He.botId;Ee&&Hn(Ee).catch(Ie=>{I&&Xe(Ie)}),he.bots().then(Ie=>{I&&u(Ie.bots)}).catch(Ie=>{I&&Xe(Ie)})}),ae.addEventListener("sections",Te),ae.addEventListener("bots",()=>{he.bots().then(Ee=>{I&&u(Ee.bots)}).catch(Ee=>{I&&Xe(Ee)}),me().catch(Ee=>{I&&Xe(Ee)})}),ae.addEventListener("inbox",()=>void me().catch(Ee=>{I&&Xe(Ee)})),ae.addEventListener("chat",Ee=>{const He=JSON.parse(Ee.data);typeof He.chatId=="string"&&me(He.chatId).catch(Ie=>{I&&Xe(Ie)})}),ae.addEventListener("bot",Ee=>{var ze;const He=JSON.parse(Ee.data),Ie=He.status;m.current.set(He.botId,(m.current.get(He.botId)??0)+1),f(Pe=>({...Pe,[He.botId]:Ie})),Ie.error&&((ze=fe.current.find(Pe=>Pe.id===ln.current))==null?void 0:ze.botId)===Ie.botId&&Re(Pz(Ie)),(Ie.status==="idle"||Ie.status==="stop")&&he.bots().then(Pe=>{I&&u(Pe.bots)}).catch(Pe=>{I&&Xe(Pe)})}),ae.onerror=()=>{he.me().catch(Ee=>{I&&Ee instanceof hr&&Ee.status===401&&a("login")})},()=>{I=!1,ae.close(),nt.cancel(),Ga.current++}},[e]),pP({ready:e==="ready",selected:T,messages:Ut,chats:v,chatList:fe,setChats:y,onError:Xe}),hP(e==="ready"?v.reduce((I,ae)=>I+ae.alerts,0):0),w.useEffect(()=>{if(!je)return;const I=setTimeout(()=>Re(""),4800);return()=>clearTimeout(I)},[je]),w.useEffect(()=>{const I=ae=>{ae.defaultPrevented||P||G||(ae.key==="Escape"&&(V(!1),K(!1),$(!1)),(ae.ctrlKey||ae.metaKey)&&ae.key.toLowerCase()==="k"&&(ae.preventDefault(),$(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-search"))==null?void 0:me.focus()})))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[P,G]),w.useEffect(()=>{const I=window.matchMedia("(max-width: 620px)"),ae=()=>{I.matches||$(!1)};return I.addEventListener("change",ae),()=>I.removeEventListener("change",ae)},[]);function Xe(I){if(I instanceof hr&&I.status===401){a("login");return}Re(it(I,"common.failed"))}async function Yt(){const I=++Ga.current,ae=await he.chats();return I===Ga.current&&y(ae.chats),ae.chats}async function ml(I){await nt.refresh(I)}async function ui(){const[I,ae]=await Promise.all([he.modelConnections(),he.bots()]);O(I.connections),u(ae.bots)}const di=()=>void he.members().then(I=>S(I.members)).catch(Xe);function bn(I){u(ae=>ae.map(me=>me.id===I.id?I:me)),di()}function ha(I){var me;const ae=ZL(I);ae?F({kind:"thread",id:ae,parentId:I.id,mode:"pane",summary:((me=I.hint)==null?void 0:me.kind)==="note"}):I.id!==ln.current&&F(null),ye(!1),M(Te=>({...Te,[I.id]:I.readSequence})),_(I.id),I.botId&&A(I.botId),$(!1),V(!1),K(!1)}const pl=I=>F((B==null?void 0:B.kind)==="info"&&B.page===I?null:{kind:"info",page:I});function ma(I){y(ae=>ae.some(me=>me.id===I.id)?ae.map(me=>me.id===I.id?I:me):[I,...ae])}async function fo(I){if(!le){ie(!0);try{const ae=await he.createChat(I);ma(ae),ha(ae),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-composer"))==null?void 0:me.focus()})}catch(ae){Xe(ae)}finally{ie(!1)}}}async function Ya(){if(!le){ie(!0);try{const I=await he.createBot(wL(oi(j).map(me=>me.name))),ae=await he.createChat(I.id);u(me=>[...me,I]),ma(ae),di(),ha(ae)}catch(I){Xe(I)}finally{ie(!1)}}}async function fn(I){try{await he.deleteChat(I.id),await Yt(),ln.current===I.id&&_(null),Re(x("app.channelDeleted"))}catch(ae){Xe(ae)}}async function It(I,ae){try{ma(await he.pin(I.id,ae))}catch(me){Xe(me)}}async function $t(I,ae){try{ma(await he.mute(I.id,ae))}catch(me){Xe(me)}}async function fi(I,ae){try{await he.deleteBot(I.id,ae);const me=new Set(v.filter(Te=>Te.type==="dm"&&Te.botId===I.id).map(Te=>Te.id));y(Te=>Te.filter(Ee=>!me.has(Ee.id)).map(Ee=>Ee.memberIds.includes(I.id)?{...Ee,memberIds:Ee.memberIds.filter(He=>He!==I.id)}:Ee)),u(Te=>Te.filter(Ee=>Ee.id!==I.id)),di(),ln.current&&me.has(ln.current)&&_(null),P===I.id&&H(null),Re(x("app.botDeleted",{name:I.name}))}catch(me){Xe(me)}}async function hi(I,ae,me,Te,Ee){const He=T;await he.send(He,I,ae,me,!1,Te,Ee);const Ie=fe.current.find(Pe=>Pe.id===He),ze=(Ie==null?void 0:Ie.type)==="channel"?[...new Set(kg(I,oi(j)).filter(Pe=>!Ie.memberIds.includes(Pe.member.id)).map(Pe=>Pe.member.name))]:[];ze.length&&Re(x("app.notInChannel",{names:ze.join(x("common.listSeparator")),count:ze.length})),Promise.all([ml(He),Yt()]).catch(Xe)}function Xa(I,ae){he.addMember(I,ae.id).then(me=>{ma(me),Re(x("app.memberAdded",{name:ae.name,channel:me.title}))}).catch(Xe)}async function Ka(I){try{const ae=await he.openThread(I.id);F({kind:"thread",id:ae.id,parentId:I.chatId,mode:"pane"})}catch(ae){Xe(ae)}}function Ra(I,ae){const me=v.find(Te=>Te.id===I.parentId);me&&ha(me),F(ae?{kind:"thread",id:I.id,parentId:I.parentId,mode:"pane"}:null)}function Zn(I){H(null);const ae=v.find(me=>me.id===(I.type==="thread"?I.parentId:I.id));ae&&ha(ae),I.type==="thread"&&F({kind:"thread",id:I.id,parentId:I.parentId,mode:"pane"})}async function Qa(I,ae,me){try{const Te=await he.react(I.id,ae,me);dn(Ee=>Ee.map(He=>He.id===Te.id?{...He,reactions:Te.reactions}:He))}catch(Te){Xe(Te)}}async function pa(I,ae){try{const me=await he.fold(I.id,ae);dn(Te=>Te.map(Ee=>Ee.id===me.id?{...Ee,folded:me.folded}:Ee))}catch(me){Xe(me)}}function ga(I){h5(qe,I,j)}const mi=(I,ae)=>I?void nt.toMessage(I,ae).then(async me=>{me&&qt.openMessage(await he.chat(me),I,ae)}).catch(()=>Re(x("app.sourceGone"))):Re(x("app.sourceGone"));function gl(I){W(ae=>ae.map(me=>me.id===I.id?{...me,...I}:me)),he.followedThreads().then(ae=>W(ae.threads)).catch(()=>{})}function va(I){I.preventDefault();const ae=Te=>ce(Math.min(Math.max(340,window.innerWidth-Te.clientX),Math.round(window.innerWidth*.6))),me=()=>{window.removeEventListener("pointermove",ae),window.removeEventListener("pointerup",me),document.body.style.cursor=""};window.addEventListener("pointermove",ae),window.addEventListener("pointerup",me),document.body.style.cursor="col-resize"}async function Cr(){try{await qe.clear(I=>he.removeAttachment(I)),await he.logout(),a("login"),V(!1),q(null),m.current.clear(),f({}),F(null),W([]),r(""),_(null),y([]),u([]),O([]),dn([])}catch(I){Xe(I)}}const Za=e==="ready"&&v.some(I=>I.id===T);w.useEffect(()=>{const I=Oe.current;if(!I)return;let ae=0,me=I.clientHeight;const Te=()=>{ae=I.scrollHeight-I.scrollTop-I.clientHeight},Ee=new ResizeObserver(()=>{I.clientHeight!==me&&(me=I.clientHeight,I.scrollTo({top:I.scrollHeight-I.clientHeight-ae,behavior:"instant"}))}),He=new MutationObserver(Te);return Te(),I.addEventListener("scroll",Te,{passive:!0}),Ee.observe(I),He.observe(I,{childList:!0,subtree:!0,characterData:!0}),()=>{Ee.disconnect(),He.disconnect(),I.removeEventListener("scroll",Te)}},[Za]);const Ja=v.find(I=>I.id===T),Un=(Ja==null?void 0:Ja.type)==="channel",Vi=$B(e==="ready"?(ue=v.find(I=>I.id===T&&I.type==="dm"))==null?void 0:ue.botId:void 0,xe);if(e==="loading")return o.jsx("div",{className:"jarvy-loading",children:x("app.connecting")});if(e==="login")return o.jsx(gP,{onLogin:I=>void Dn(I).catch(Xe)});const Xt=v.find(I=>I.id===T),on=c.find(I=>I.id===((Xt==null?void 0:Xt.botId)??z))??c[0],Jn=!!(on!=null&&on.connectionId),Wn=Un||Jn,$i=(on==null?void 0:on.name)??"Jarvy",xt=on?d[on.id]:void 0,Dt=xt!=null&&xt.error?x("activity.error"):(xt==null?void 0:xt.status)==="running"?FS(xt.activity):"",sn=(be=[...Ut].reverse().find(I=>{var ae;return((ae=I.question)==null?void 0:ae.state)==="pending"}))==null?void 0:be.id,jn=(B==null?void 0:B.kind)==="thread"?B:null,Gi=(jn==null?void 0:jn.mode)==="full",Nr=Un?Ja:void 0,Er=c.find(I=>I.id===P),pi=new Set(Object.values(d).filter(I=>I.status==="running"&&I.activity!=="asking").map(I=>I.botId)),Yi=new Set(Object.values(d).filter(I=>I.activity==="asking").map(I=>I.botId));return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ui-app","data-nav":D?"":void 0,"data-pane":B&&!Gi?"":void 0,style:{"--ui-pane":`${we}px`},children:[o.jsx(WL,{username:i,chats:v,sections:p,bots:c,members:j,followed:pe,followedOpen:se&&!Gi,working:pi,asking:Yi,selected:se?null:T,filter:ne,creating:le,createMenu:Y,accountMenu:Q,onFilterChange:R,onOpenFollowed:()=>{ye(!0),F(null),$(!1)},onOpenChat:ha,onOpenBot:I=>void fo(I.id),onOpenMenu:(I,ae)=>xn({target:I,at:ae}),onEditSection:I=>C({kind:"section",section:I}),onCreate:I=>{if(I==="bot")return void Ya();C({kind:I}),K(!1)},onFind:qt.openMessage,onOpenFound:Zn,onError:Xe,onToggleCreate:I=>{K(I),V(!1)},onToggleAccount:I=>{V(I),K(!1)},onSettings:()=>{V(!1),q("general")},onToggleTheme:()=>{Fd(document.documentElement.classList.contains("dark")?"light":"dark"),V(!1)},onLogOut:()=>void Cr()}),o.jsx(FB,{chat:Xt,inChannel:Un,bots:c,members:j,meId:Ge,drafts:qe,composeReady:Wn,botName:$i,activeBot:on,status:xt,connections:U,activity:Dt,history:nt,divider:E[(Xt==null?void 0:Xt.id)??""]??(Xt==null?void 0:Xt.readSequence)??0,activeQuestion:sn,pane:B,onPane:F,onToggleInfo:pl,find:qt,onNav:()=>$(!0),onBot:I=>H(I),hasBotDirects:Vi.length>0,onInvite:Xa,onQuote:ga,onReply:I=>void Ka(I),onReact:(I,ae,me)=>void Qa(I,ae,me),onFold:(I,ae)=>void pa(I,ae),onJump:mi,onSettled:I=>dn(ae=>ae.map(me=>me.id===I.id?I:me)),onPreview:(I,ae)=>Ct({files:I,index:ae}),onSend:hi,notice:Re,onSaveNote:async I=>{try{ma(await he.setNote(Xt.id,I))}catch(ae){throw Xe(ae),ae}},createBot:()=>void Ya(),creating:le,updateBot:bn,onManageModels:()=>q("models"),error:Xe,chatArea:Fe,transcript:Oe,composeWrap:Je,hidden:Gi||se,onOpenThread:I=>F({kind:"thread",id:I,parentId:Xt.id,mode:"pane"})}),o.jsx(tI,{pane:B,followedView:se,followed:pe,chats:v,sections:p,members:j,bots:c,statuses:d,meId:Ge,drafts:qe,tick:xe,paneChannel:Nr,activeBot:on,botDirects:Vi,find:qt,onPane:F,onNav:()=>$(!0),onBackToChannel:Ra,onAddMembers:I=>C({kind:"members",chat:I}),onOpenBot:H,onPin:I=>void It(I,!I.pinned),onMute:I=>void $t(I,!I.muted),onDeleteChannel:I=>fa({kind:"chat",chat:I}),onChannelSaved:ma,onThreadChanged:gl,onInvite:Xa,onPreview:(I,ae)=>Ct({files:I,index:ae}),onNotice:Re,onError:Xe,paneWidth:we,onResize:va})]}),D&&o.jsx("div",{className:"ui-nav-scrim",onClick:()=>$(!1),role:"presentation"}),G&&o.jsx(uP,{connections:U,initialTab:G,onChanged:ui,onClose:()=>q(null)}),o.jsx(UL,{dialog:k,entryMenu:rn,confirm:Pn,preview:We,infoBot:Er,bots:c,statuses:d,chats:v,sections:p,members:j,connections:U,meId:Ge,onDialog:C,onEntryMenu:xn,onConfirm:fa,onPreview:Ct,onInfoBot:H,onSettings:()=>q("models"),onChannelInfo:I=>{ha(I),F({kind:"info",page:"main"})},onOpenChatId:I=>{_(I),$(!1)},chatSaved:ma,openChat:ha,onSectionSaved:I=>{b(ae=>ae.some(me=>me.id===I.id)?ae.map(me=>me.id===I.id?I:me):[...ae,I]),C(null)},onSectionDeleted:I=>{C(null),b(ae=>ae.filter(me=>me.id!==I)),Yt().catch(Xe)},updateBot:bn,openAnywhere:Zn,removeChannel:fn,deleteBot:fi,pinChat:It,muteChat:$t}),je&&o.jsx("div",{className:"ui-toast",role:"status",children:je}),yP]})}function xP(){const e=`https://${location.host}${location.pathname}${location.search}`;return o.jsxs("div",{className:"jv-insecure",role:"status",children:[o.jsx(qC,{"aria-hidden":"true"}),o.jsx("span",{children:x("connection.insecure")}),o.jsx("a",{href:e,children:x("connection.useHttps")})]})}function bP(){return ej(),window.isSecureContext?o.jsx(Xb,{}):o.jsxs("div",{className:"jv-insecure-shell",children:[o.jsx(xP,{}),o.jsx(Xb,{})]})}x8.createRoot(document.getElementById("root")).render(o.jsx(w.StrictMode,{children:o.jsx(bP,{})}));