@goodfish/jarvy 0.8.0 → 0.10.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.
- package/CHANGELOG.md +60 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/server/cli.js +3974 -3091
- package/dist/web/assets/index-4qw6VTNA.js +603 -0
- package/dist/web/assets/index-BoYSS3TL.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/skills/dev-team/SKILL.md +1 -1
- package/dist/web/assets/index-Cl_aFSP0.js +0 -594
- package/dist/web/assets/index-CxbCVrx3.css +0 -1
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
var pC=Object.defineProperty;var Sy=e=>{throw TypeError(e)};var gC=(e,a,i)=>a in e?pC(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i;var fc=(e,a,i)=>gC(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 vC(e,a){for(var i=0;i<a.length;i++){const r=a[i];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const u of s)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(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(s){if(s.ep)return;s.ep=!0;const u=i(s);fetch(s.href,u)}})();function g0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lm={exports:{}},hc={};/**
|
|
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 yC(){if(Ny)return hc;Ny=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:r,key:d,ref:s!==void 0?s:null,props:u}}return hc.Fragment=a,hc.jsx=i,hc.jsxs=i,hc}var Ey;function xC(){return Ey||(Ey=1,Lm.exports=yC()),Lm.exports}var o=xC(),Bm={exports:{}},Ze={};/**
|
|
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 bC(){if(Ty)return Ze;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"),s=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"),g=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),j=Symbol.iterator;function w(q){return q===null||typeof q!="object"?null:(q=j&&q[j]||q["@@iterator"],typeof q=="function"?q:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,T={};function M(q,ue,xe){this.props=q,this.context=ue,this.refs=T,this.updater=xe||k}M.prototype.isReactComponent={},M.prototype.setState=function(q,ue){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,ue,"setState")},M.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function E(){}E.prototype=M.prototype;function R(q,ue,xe){this.props=q,this.context=ue,this.refs=T,this.updater=xe||k}var D=R.prototype=new E;D.constructor=R,C(D,M.prototype),D.isPureReactComponent=!0;var A=Array.isArray;function H(){}var U={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function z(q,ue,xe){var be=xe.ref;return{$$typeof:e,type:q,key:ue,ref:be!==void 0?be:null,props:xe}}function V(q,ue){return z(q.type,ue,q.props)}function F(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function J(q){var ue={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(xe){return ue[xe]})}var G=/\/+/g;function $(q,ue){return typeof q=="object"&&q!==null&&q.key!=null?J(""+q.key):ue.toString(36)}function K(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(H,H):(q.status="pending",q.then(function(ue){q.status==="pending"&&(q.status="fulfilled",q.value=ue)},function(ue){q.status==="pending"&&(q.status="rejected",q.reason=ue)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function I(q,ue,xe,be,je){var Ae=typeof q;(Ae==="undefined"||Ae==="boolean")&&(q=null);var Re=!1;if(q===null)Re=!0;else switch(Ae){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(q.$$typeof){case e:case a:Re=!0;break;case y:return Re=q._init,I(Re(q._payload),ue,xe,be,je)}}if(Re)return je=je(q),Re=be===""?"."+$(q,0):be,A(je)?(xe="",Re!=null&&(xe=Re.replace(G,"$&/")+"/"),I(je,ue,xe,"",function(he){return he})):je!=null&&(F(je)&&(je=V(je,xe+(je.key==null||q&&q.key===je.key?"":(""+je.key).replace(G,"$&/")+"/")+Re)),ue.push(je)),1;Re=0;var ye=be===""?".":be+":";if(A(q))for(var Q=0;Q<q.length;Q++)be=q[Q],Ae=ye+$(be,Q),Re+=I(be,ue,xe,Ae,je);else if(Q=w(q),typeof Q=="function")for(q=Q.call(q),Q=0;!(be=q.next()).done;)be=be.value,Ae=ye+$(be,Q++),Re+=I(be,ue,xe,Ae,je);else if(Ae==="object"){if(typeof q.then=="function")return I(K(q),ue,xe,be,je);throw ue=String(q),Error("Objects are not valid as a React child (found: "+(ue==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":ue)+"). If you meant to render a collection of children, use an array instead.")}return Re}function P(q,ue,xe){if(q==null)return q;var be=[],je=0;return I(q,be,"","",function(Ae){return ue.call(xe,Ae,je++)}),be}function W(q){if(q._status===-1){var ue=q._result,xe=ue();xe.then(function(be){(q._status===0||q._status===-1)&&(q._status=1,q._result=be,xe.status===void 0&&(xe.status="fulfilled",xe.value=be))},function(be){(q._status===0||q._status===-1)&&(q._status=2,q._result=be,xe.status===void 0&&(xe.status="rejected",xe.reason=be))}),q._status===-1&&(q._status=0,q._result=xe)}if(q._status===1)return q._result.default;throw q._result}var _=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ue=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(ue))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)};function ae(q){var ue=U.T,xe={};xe.types=ue!==null?ue.types:null,U.T=xe;try{var be=q(),je=U.S;je!==null&&je(xe,be),typeof be=="object"&&be!==null&&typeof be.then=="function"&&be.then(H,_)}catch(Ae){_(Ae)}finally{ue!==null&&xe.types!==null&&(ue.types=xe.types),U.T=ue}}function ie(q){var ue=U.T;if(ue!==null){var xe=ue.types;xe===null?ue.types=[q]:xe.indexOf(q)===-1&&xe.push(q)}else ae(ie.bind(null,q))}var L={map:P,forEach:function(q,ue,xe){P(q,function(){ue.apply(this,arguments)},xe)},count:function(q){var ue=0;return P(q,function(){ue++}),ue},toArray:function(q){return P(q,function(ue){return ue})||[]},only:function(q){if(!F(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return Ze.Activity=g,Ze.Children=L,Ze.Component=M,Ze.Fragment=i,Ze.Profiler=s,Ze.PureComponent=R,Ze.StrictMode=r,Ze.Suspense=m,Ze.ViewTransition=b,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(q){return U.H.useMemoCache(q)}},Ze.addTransitionType=ie,Ze.cache=function(q){return function(){return q.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(q,ue,xe){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var be=C({},q.props),je=q.key;if(ue!=null)for(Ae in ue.key!==void 0&&(je=""+ue.key),ue)!Y.call(ue,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&ue.ref===void 0||(be[Ae]=ue[Ae]);var Ae=arguments.length-2;if(Ae===1)be.children=xe;else if(1<Ae){for(var Re=Array(Ae),ye=0;ye<Ae;ye++)Re[ye]=arguments[ye+2];be.children=Re}return z(q.type,je,be)},Ze.createContext=function(q){return q={$$typeof:d,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:u,_context:q},q},Ze.createElement=function(q,ue,xe){var be,je={},Ae=null;if(ue!=null)for(be in ue.key!==void 0&&(Ae=""+ue.key),ue)Y.call(ue,be)&&be!=="key"&&be!=="__self"&&be!=="__source"&&(je[be]=ue[be]);var Re=arguments.length-2;if(Re===1)je.children=xe;else if(1<Re){for(var ye=Array(Re),Q=0;Q<Re;Q++)ye[Q]=arguments[Q+2];je.children=ye}if(q&&q.defaultProps)for(be in Re=q.defaultProps,Re)je[be]===void 0&&(je[be]=Re[be]);return z(q,Ae,je)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(q){return{$$typeof:f,render:q}},Ze.isValidElement=F,Ze.lazy=function(q){return{$$typeof:y,_payload:{_status:-1,_result:q},_init:W}},Ze.memo=function(q,ue){return{$$typeof:v,type:q,compare:ue===void 0?null:ue}},Ze.startTransition=ae,Ze.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ze.use=function(q){return U.H.use(q)},Ze.useActionState=function(q,ue,xe){return U.H.useActionState(q,ue,xe)},Ze.useCallback=function(q,ue){return U.H.useCallback(q,ue)},Ze.useContext=function(q){return U.H.useContext(q)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(q,ue){return U.H.useDeferredValue(q,ue)},Ze.useEffect=function(q,ue){return U.H.useEffect(q,ue)},Ze.useEffectEvent=function(q){return U.H.useEffectEvent(q)},Ze.useId=function(){return U.H.useId()},Ze.useImperativeHandle=function(q,ue,xe){return U.H.useImperativeHandle(q,ue,xe)},Ze.useInsertionEffect=function(q,ue){return U.H.useInsertionEffect(q,ue)},Ze.useLayoutEffect=function(q,ue){return U.H.useLayoutEffect(q,ue)},Ze.useMemo=function(q,ue){return U.H.useMemo(q,ue)},Ze.useOptimistic=function(q,ue){return U.H.useOptimistic(q,ue)},Ze.useReducer=function(q,ue,xe){return U.H.useReducer(q,ue,xe)},Ze.useRef=function(q){return U.H.useRef(q)},Ze.useState=function(q){return U.H.useState(q)},Ze.useSyncExternalStore=function(q,ue,xe){return U.H.useSyncExternalStore(q,ue,xe)},Ze.useTransition=function(){return U.H.useTransition()},Ze.version="19.3.0",Ze}var Ay;function v0(){return Ay||(Ay=1,Bm.exports=bC()),Bm.exports}var S=v0();const jC=g0(S),Mc=vC({__proto__:null,default:jC},[S]);var Im={exports:{}},mc={},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 wC(){return _y||(_y=1,(function(e){function a(K,I){var P=K.length;K.push(I);e:for(;0<P;){var W=P-1>>>1,_=K[W];if(0<s(_,I))K[W]=I,K[P]=_,P=W;else break e}}function i(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var I=K[0],P=K.pop();if(P!==I){K[0]=P;e:for(var W=0,_=K.length,ae=_>>>1;W<ae;){var ie=2*(W+1)-1,L=K[ie],q=ie+1,ue=K[q];if(0>s(L,P))q<_&&0>s(ue,L)?(K[W]=ue,K[q]=P,W=q):(K[W]=L,K[ie]=P,W=ie);else if(q<_&&0>s(ue,P))K[W]=ue,K[q]=P,W=q;else break e}}return I}function s(K,I){var P=K.sortIndex-I.sortIndex;return P!==0?P:K.id-I.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,g=null,b=3,j=!1,w=!1,k=!1,C=!1,T=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function R(K){for(var I=i(v);I!==null;){if(I.callback===null)r(v);else if(I.startTime<=K)r(v),I.sortIndex=I.expirationTime,a(m,I);else break;I=i(v)}}function D(K){if(k=!1,R(K),!w)if(i(m)!==null)w=!0,A||(A=!0,F());else{var I=i(v);I!==null&&$(D,I.startTime-K)}}var A=!1,H=-1,U=5,Y=-1;function z(){return C?!0:!(e.unstable_now()-Y<U)}function V(){if(C=!1,A){var K=e.unstable_now();Y=K;var I=!0;try{e:{w=!1,k&&(k=!1,M(H),H=-1),j=!0;var P=b;try{t:{for(R(K),g=i(m);g!==null&&!(g.expirationTime>K&&z());){var W=g.callback;if(typeof W=="function"){g.callback=null,b=g.priorityLevel;var _=W(g.expirationTime<=K);if(K=e.unstable_now(),typeof _=="function"){g.callback=_,R(K),I=!0;break t}g===i(m)&&r(m),R(K)}else r(m);g=i(m)}if(g!==null)I=!0;else{var ae=i(v);ae!==null&&$(D,ae.startTime-K),I=!1}}break e}finally{g=null,b=P,j=!1}I=void 0}}finally{I?F():A=!1}}}var F;if(typeof E=="function")F=function(){E(V)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,G=J.port2;J.port1.onmessage=V,F=function(){G.postMessage(null)}}else F=function(){T(V,0)};function $(K,I){H=T(function(){K(e.unstable_now())},I)}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"):U=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 I=3;break;default:I=b}var P=b;b=I;try{return K()}finally{b=P}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(K,I){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var P=b;b=K;try{return I()}finally{b=P}},e.unstable_scheduleCallback=function(K,I,P){var W=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?W+P:W):P=W,K){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=P+_,K={id:y++,callback:I,priorityLevel:K,startTime:P,expirationTime:_,sortIndex:-1},P>W?(K.sortIndex=P,a(v,K),i(m)===null&&K===i(v)&&(k?(M(H),H=-1):k=!0,$(D,P-W))):(K.sortIndex=_,a(m,K),w||j||(w=!0,A||(A=!0,F()))),K},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(K){var I=b;return function(){var P=b;b=I;try{return K.apply(this,arguments)}finally{b=P}}}})(Hm)),Hm}var My;function SC(){return My||(My=1,Pm.exports=wC()),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 kC(){if(Ry)return An;Ry=1;var e=v0();function a(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+g+" 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},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(y,g,b){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:j==null?null:j===d?d:""+j,children:y,containerInfo:g,implementation:b}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}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,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return f(y,g,null,b)},An.flushSync=function(y){var g=m.T,b=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=g,r.p=b,r.d.f()}},An.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(y,g))},An.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},An.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var b=g.as,j=v(b,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:j,integrity:w,fetchPriority:k}):b==="script"&&r.d.X(y,{crossOrigin:j,integrity:w,fetchPriority:k,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},An.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=v(g.as,g.crossOrigin);r.d.M(y,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&r.d.M(y)},An.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,j=v(b,g.crossOrigin);r.d.L(y,b,{crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},An.preloadModule=function(y,g){if(typeof y=="string")if(g){var b=v(g.as,g.crossOrigin);r.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else r.d.m(y)},An.requestFormReset=function(y){r.d.r(y)},An.unstable_batchedUpdates=function(y,g){return y(g)},An.useFormState=function(y,g,b){return m.H.useFormState(y,g,b)},An.useFormStatus=function(){return m.H.useHostTransitionStatus()},An.version="19.3.0",An}var Dy;function Zb(){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=kC(),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 CC(){if(Oy)return mc;Oy=1;var e=SC(),a=v0(),i=Zb();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 s(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,c=n;;){var h=l.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===l)return m(h),t;if(p===c)return m(h),n;p=p.sibling}throw Error(r(188))}if(l.return!==c.return)l=h,c=p;else{for(var N=!1,O=h.child;O;){if(O===l){N=!0,l=h,c=p;break}if(O===c){N=!0,c=h,l=p;break}O=O.sibling}if(!N){for(O=p.child;O;){if(O===l){N=!0,l=p,c=h;break}if(O===c){N=!0,c=p,l=h;break}O=O.sibling}if(!N)throw Error(r(189))}}if(l.alternate!==c)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 g(t,n,l,c,h,p){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,c,h,p)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&g(t.child,n,l,c,h,p))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 w(t){var n=[null,null],l=b(t);return l===null||k(n,t,l.child,{foundSelf:!1}),n}function k(t,n,l,c){for(;l!==null;){if(l===n)c.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(c.foundSelf)return t[1]=l,!0;t[0]=l}else if((l.tag!==22||l.memoizedState===null)&&k(t,n,l.child,c))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 T=null,M=null;function E(t,n,l){return t===l?!0:t===n?(T=t,!0):!1}function R(t,n,l){return t===l?(M=t,!1):t===n?(M!==null&&(T=t),!0):!1}function D(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 c=0,h=t;h;h=l(h))c++;h=0;for(var p=n;p;p=l(p))h++;for(;0<c-h;)t=l(t),c--;for(;0<h-c;)n=l(n),h--;for(;c--;){if(t===n||n!==null&&t===n.alternate)return t;t=l(t),n=l(n)}return null}var H=Object.assign,U=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),$=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ie=Symbol.for("react.legacy_hidden"),L=Symbol.for("react.memo_cache_sentinel"),q=Symbol.for("react.view_transition"),ue=Symbol.for("react.recoverable"),xe=Symbol.iterator;function be(t){return t===null||typeof t!="object"?null:(t=xe&&t[xe]||t["@@iterator"],typeof t=="function"?t:null)}var je=Symbol.for("react.client.reference");function Ae(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===je?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case V:return"Fragment";case J:return"Profiler";case F:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case ae:return"Activity";case q:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case $:return t.displayName||"Context";case G: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 W:return n=t.displayName||null,n!==null?n:Ae(t.type)||"Memo";case _:n=t._payload,t=t._init;try{return Ae(t(n))}catch{}}return null}var Re=Array.isArray,ye=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ke=[],Ee=-1;function Ie(t){return{current:t}}function Ye(t){0>Ee||(t.current=ke[Ee],ke[Ee]=null,Ee--)}function Ke(t,n){Ee++,ke[Ee]=t.current,t.current=n}var gt=Ie(null),rn=Ie(null),xn=Ie(null),Hn=Ie(null);function fa(t,n){switch(Ke(xn,n),Ke(rn,t),Ke(gt,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}}Ye(gt),Ke(gt,t)}function ln(){Ye(gt),Ye(rn),Ye(xn)}function Ya(t){var n=t.memoizedState;n!==null&&(Qo._currentValue=n.memoizedState,Ke(Hn,t)),n=gt.current;var l=D2(n,t.type);n!==l&&(Ke(rn,t),Ke(gt,l))}function de(t){rn.current===t&&(Ye(gt),Ye(rn)),Hn.current===t&&(Ye(Hn),Qo._currentValue=he)}var Ce,Fe;function Ge(t){if(Ce===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Ce=n&&n[1]||"",Fe=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ce+t+Fe}var nt=!1;function Ht(t,n){if(!t||nt)return"";nt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(n){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(_e){var ee=_e}Reflect.construct(t,[],ge)}else{try{ge.call()}catch(_e){ee=_e}ge=!1;try{var oe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ge=!0,new t}finally{ge&&(oe!==void 0?Object.defineProperty(t.prototype,"props",oe):delete t.prototype.props)}}}else{try{throw Error()}catch(_e){ee=_e}(ge=t())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(_e){if(_e&&ee&&typeof _e.stack=="string")return[_e.stack,ee.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),N=p[0],O=p[1];if(N&&O){var X=N.split(`
|
|
44
|
+
`),ne=O.split(`
|
|
45
|
+
`);for(h=c=0;c<X.length&&!X[c].includes("DetermineComponentFrameRoot");)c++;for(;h<ne.length&&!ne[h].includes("DetermineComponentFrameRoot");)h++;if(c===X.length||h===ne.length)for(c=X.length-1,h=ne.length-1;1<=c&&0<=h&&X[c]!==ne[h];)h--;for(;1<=c&&0<=h;c--,h--)if(X[c]!==ne[h]){if(c!==1||h!==1)do if(c--,h--,0>h||X[c]!==ne[h]){var ce=`
|
|
46
|
+
`+X[c].replace(" at new "," at ");return t.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",t.displayName)),ce}while(1<=c&&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 Ht(t.type,!1);case 11:return Ht(t.type.render,!1);case 1:return Ht(t.type,!0);case 31:return Ge("Activity");case 30:return Ge("ViewTransition");default:return""}}function Ut(t){try{var n="",l=null;do n+=dn(t,l),l=t,t=t.return;while(t);return n}catch(c){return`
|
|
47
|
+
Error generating stack: `+c.message+`
|
|
48
|
+
`+c.stack}}var Rn=Object.prototype.hasOwnProperty,Un=e.unstable_scheduleCallback,Ot=e.unstable_cancelCallback,Dn=e.unstable_shouldYield,Qe=e.unstable_requestPaint,Yt=e.unstable_now,pl=e.unstable_getCurrentPriorityLevel,di=e.unstable_ImmediatePriority,fi=e.unstable_UserBlockingPriority,bn=e.unstable_NormalPriority,ha=e.unstable_LowPriority,gl=e.unstable_IdlePriority,ma=e.log,ho=e.unstable_setDisableYieldValue,Xa=null,fn=null;function Bt(t){if(typeof ma=="function"&&ho(t),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(Xa,t)}catch{}}var Vt=Math.clz32?Math.clz32:Ka,hi=Math.log,mi=Math.LN2;function Ka(t){return t>>>=0,t===0?32:31-(hi(t)/mi|0)|0}var Qa=256,Da=262144,Zn=4194304;function Za(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 c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var O=c&134217727;return O!==0?(c=O&~p,c!==0?h=Za(c):(N&=O,N!==0?h=Za(N):l||(l=O&~t,l!==0&&(h=Za(l))))):(O=c&~p,O!==0?h=Za(O):N!==0?h=Za(N):l||(l=c&~t,l!==0&&(h=Za(l)))),h===0?0:n!==0&&n!==h&&(n&p)===0&&(p=h&-h,l=n&-n,p>=l||p===32&&(l&4194048)!==0)?n:h}function ga(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function pi(t,n){(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var c=31-Vt(l),h=1<<c;n|=t[c],l&=~h}return n}function vl(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 Nr(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Ja(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Wa(t,n,l,c,h,p){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 O=t.entanglements,X=t.expirationTimes,ne=t.hiddenUpdates;for(l=N&~l;0<l;){var ce=31-Vt(l),ge=1<<ce;O[ce]=0,X[ce]=-1;var ee=ne[ce];if(ee!==null)for(ne[ce]=null,ce=0;ce<ee.length;ce++){var oe=ee[ce];oe!==null&&(oe.lane&=-536870913)}l&=~ge}c!==0&&qn(t,c,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(N&~n))}function qn(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var c=31-Vt(n);t.entangledLanes|=n,t.entanglements[c]=t.entanglements[c]|1073741824|l&261930}function Vi(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var c=31-Vt(l),h=1<<c;h&n|t[c]&n&&(t[c]|=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=Q.p;return t!==0?t:(t=window.event,t===void 0?32:gy(t.type))}function $i(t,n){var l=Q.p;try{return Q.p=t,n()}finally{Q.p=l}}var xt=Math.random().toString(36).slice(2),Rt="__reactFiber$"+xt,sn="__reactProps$"+xt,jn="__reactContainer$"+xt,Gi="__reactEvents$"+xt,Er="__reactListeners$"+xt,Tr="__reactHandles$"+xt,gi="__reactResources$"+xt,Yi="__reactMarker$"+xt,Xi="__reactLoad$"+xt;function Ki(t){delete t[Rt],delete t[sn],delete t[Er],delete t[Tr]}function ea(t){var n;if(n=t[Rt])return n;for(var l=t.parentNode;l;){if(n=l[jn]||l[Rt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=Q2(t);t!==null;){if(l=t[Rt])return l;t=Q2(t)}return n}t=l,l=t.parentNode}return null}function vi(t){if(t=t[Rt]||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 se(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function ve(t){var n=t[gi];return n||(n=t[gi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function B(t){t[Yi]=!0}function re(t){t[Xi]=void 0}var me=new Set,Te={};function Ne(t,n){Ue(t,n),Ue(t+"Capture",n)}function Ue(t,n){for(Te[t]=n,t=0;t<n.length;t++)me.add(n[t])}var Pe=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={},He={};function ct(t){return Rn.call(He,t)?!0:Rn.call(ze,t)?!1:Pe.test(t)?He[t]=!0:(ze[t]=!0,!1)}var Ve=!1;function cn(){var t=Ve;return Ve=!1,t}function It(t,n,l){if(ct(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var c=n.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="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,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,c)}}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 mo(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function js(t,n,l){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,p=c.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(N){l=""+N,p.call(this,N)}}),Object.defineProperty(t,n,{enumerable:c.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=mo(t)?"checked":"value";t._valueTracker=js(t,n,""+t[n])}}function po(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),c="";return t&&(c=mo(t)?t.checked?"true":"false":t.value),t=c,t!==l?(n.setValue(t),!0):!1}var Vc=/[\n"\\]/g;function Dt(t){return t.replace(Vc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function On(t,n,l,c,h,p,N,O){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?go(t,Qt(t.value)):go(t,Qt(n)):l!=null?go(t,Qt(l)):c!=null&&t.removeAttribute("value"),h==null&&p!=null&&(t.defaultChecked=!!p),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?t.name=""+Qt(O):t.removeAttribute("name")}function Ar(t,n,l,c,h,p,N,O){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),n!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){Qi(t);return}l=l!=null?""+Qt(l):"",n=n!=null?""+Qt(n):l,O||n===t.value||(t.value=n),t.defaultValue=n}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=O?t.checked:!!c,t.defaultChecked=!!c,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Qi(t)}function go(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function ta(t,n,l,c){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&&c&&(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,c&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function vo(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,c){if(n==null){if(c!=null){if(l!=null)throw Error(r(92));if(Re(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),n=l}l=Qt(n),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c),Qi(t)}function Fn(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var _r=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 ws(t,n,l){var c=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":c?t.setProperty(n,l):typeof l!="number"||l===0||_r.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 c in l)!l.hasOwnProperty(c)||n!=null&&n.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="",Ve=!0);for(var h in n)c=n[h],n.hasOwnProperty(h)&&l[h]!==c&&(ws(t,h,c),Ve=!0)}else for(var p in n)n.hasOwnProperty(p)&&ws(t,p,n[p])}function yl(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 Ss=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"]]),ks=/^[\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 ks.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Vn(){}var xl=null;function bl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ft=null,hn=null;function Oa(t){var n=vi(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="'+Dt(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var c=l[n];if(c!==t&&c.form===t.form){var h=c[sn]||null;if(!h)throw Error(r(90));On(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)c=l[n],c.form===t.form&&po(c)}break e;case"textarea":vo(t,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&ta(t,!!l.multiple,n,!1)}}}var ja=!1;function jl(t,n,l){if(ja)return t(n,l);ja=!0;try{var c=t(n);return c}finally{if(ja=!1,(ft!==null||hn!==null)&&(Vu(),ft&&(n=ft,t=hn,hn=ft=null,Oa(n),t)))for(n=0;n<t.length;n++)Oa(t[n])}}function Zi(t,n){var l=t.stateNode;if(l===null)return null;var c=l[sn]||null;if(c===null)return null;l=c[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":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;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"),wl=!1;if(Sn)try{var Cs={};Object.defineProperty(Cs,"passive",{get:function(){wl=!0}}),window.addEventListener("test",Cs,Cs),window.removeEventListener("test",Cs,Cs)}catch{wl=!1}var Mr=null,xf=null,$c=null;function Tg(){if($c)return $c;var t,n=xf,l=n.length,c,h="value"in Mr?Mr.value:Mr.textContent,p=h.length;for(t=0;t<l&&n[t]===h[t];t++);var N=l-t;for(c=1;c<=N&&n[l-c]===h[p-c];c++);return $c=h.slice(t,1<c?1-c:void 0)}function Gc(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 Yc(){return!0}function Ag(){return!1}function $n(t){function n(l,c,h,p,N){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=p,this.target=N,this.currentTarget=null;for(var O in t)t.hasOwnProperty(O)&&(l=t[O],this[O]=l?l(p):p[O]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Yc:Ag,this.isPropagationStopped=Ag,this}return H(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=Yc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Yc)},persist:function(){},isPersistent:Yc}),n}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xc=$n(Rr),Ns=H({},Rr,{view:0,detail:0}),H5=$n(Ns),bf,jf,Es,Kc=H({},Ns,{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!==Es&&(Es&&t.type==="mousemove"?(bf=t.screenX-Es.screenX,jf=t.screenY-Es.screenY):jf=bf=0,Es=t),bf)},movementY:function(t){return"movementY"in t?t.movementY:jf}}),_g=$n(Kc),U5=H({},Kc,{dataTransfer:0}),q5=$n(U5),F5=H({},Ns,{relatedTarget:0}),wf=$n(F5),V5=H({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),$5=$n(V5),G5=H({},Rr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Y5=$n(G5),X5=H({},Rr,{data:0}),Mg=$n(X5),K5={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"},Z5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J5(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Z5[t])?!!n[t]:!1}function Sf(){return J5}var W5=H({},Ns,{key:function(t){if(t.key){var n=K5[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Gc(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"?Gc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Gc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),e6=$n(W5),t6=H({},Kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rg=$n(t6),n6=H({},Rr,{submitter:0}),a6=$n(n6),i6=H({},Ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sf}),r6=$n(i6),l6=H({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),o6=$n(l6),s6=H({},Kc,{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}),c6=$n(s6),u6=H({},Rr,{newState:0,oldState:0,source:0}),d6=$n(u6),f6=[9,13,27,32],kf=Sn&&"CompositionEvent"in window,Ts=null;Sn&&"documentMode"in document&&(Ts=document.documentMode);var h6=Sn&&"TextEvent"in window&&!Ts,Dg=Sn&&(!kf||Ts&&8<Ts&&11>=Ts),Og=" ",zg=!1;function Lg(t,n){switch(t){case"keyup":return f6.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 yo=!1;function m6(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 p6(t,n){if(yo)return t==="compositionend"||!kf&&Lg(t,n)?(t=Tg(),$c=xf=Mr=null,yo=!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 g6={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"?!!g6[t.type]:n==="textarea"}function Pg(t,n,l,c){ft?hn?hn.push(c):hn=[c]:ft=c,n=Qu(n,"onChange"),0<n.length&&(l=new Xc("onChange","change",null,l,c),t.push({event:l,listeners:n}))}var As=null,_s=null;function v6(t){N2(t,0)}function Qc(t){var n=se(t);if(po(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(){As&&(As.detachEvent("onpropertychange",Vg),_s=As=null)}function Vg(t){if(t.propertyName==="value"&&Qc(_s)){var n=[];Pg(n,_s,t,bl(t)),jl(v6,n)}}function y6(t,n,l){t==="focusin"?(Fg(),As=n,_s=l,As.attachEvent("onpropertychange",Vg)):t==="focusout"&&Fg()}function x6(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qc(_s)}function b6(t,n){if(t==="click")return Qc(n)}function j6(t,n){if(t==="input"||t==="change")return Qc(n)}function w6(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var wa=typeof Object.is=="function"?Object.is:w6;function Ms(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),c=Object.keys(n);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];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 c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=n&&c>=n)return{node:l,offset:n-t};t=c}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 S6=Sn&&"documentMode"in document&&11>=document.documentMode,xo=null,Af=null,Rs=null,_f=!1;function Kg(t,n,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_f||xo==null||xo!==Ef(c)||(c=xo,"selectionStart"in c&&Tf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Rs&&Ms(Rs,c)||(Rs=c,c=Qu(Af,"onSelect"),0<c.length&&(n=new Xc("onSelect","select",null,n,l),t.push({event:n,listeners:c}),n.target=xo)))}function Sl(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var bo={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionrun:Sl("Transition","TransitionRun"),transitionstart:Sl("Transition","TransitionStart"),transitioncancel:Sl("Transition","TransitionCancel"),transitionend:Sl("Transition","TransitionEnd")},Mf={},Qg={};Sn&&(Qg=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function kl(t){if(Mf[t])return Mf[t];if(!bo[t])return t;var n=bo[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in Qg)return Mf[t]=n[l];return t}var Zg=kl("animationend"),Jg=kl("animationiteration"),Wg=kl("animationstart"),k6=kl("transitionrun"),C6=kl("transitionstart"),N6=kl("transitioncancel"),e1=kl("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 ei(t,n){t1.set(t,n),Ne(n,[t])}var E6=0;function Ji(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=ii.identifierPrefix;var l=E6++;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=Ho;if(l!==null)for(var c=0;c<l.length;c++){var h=t[l[c]];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 Zc=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)},za=[],jo=0,Df=0;function Jc(){for(var t=jo,n=Df=jo=0;n<t;){var l=za[n];za[n++]=null;var c=za[n];za[n++]=null;var h=za[n];za[n++]=null;var p=za[n];if(za[n++]=null,c!==null&&h!==null){var N=c.pending;N===null?h.next=h:(h.next=N.next,N.next=h),c.pending=h}p!==0&&a1(l,h,p)}}function Wc(t,n,l,c){za[jo++]=t,za[jo++]=n,za[jo++]=l,za[jo++]=c,Df|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Of(t,n,l,c){return Wc(t,n,l,c),eu(t)}function Cl(t,n){return Wc(t,null,null,n),eu(t)}function a1(t,n,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,p=t.return;p!==null;)p.childLanes|=l,c=p.alternate,c!==null&&(c.childLanes|=l),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(h=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,h&&n!==null&&(h=31-Vt(l),t=p.hiddenUpdates,c=t[h],c===null?t[h]=[n]:c.push(n),n.lane=l|536870912),p):null}function eu(t){if(50<ec)throw ec=0,Fu=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var wo={};function T6(t,n,l,c){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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(t,n,l,c){return new T6(t,n,l,c)}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 tu(t,n,l,c,h,p){var N=0;if(c=t,typeof c=="function")zf(c)&&(N=1);else if(typeof c=="string")N=nC(t,l,gt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(c){case ae:return t=na(31,l,n,h),t.elementType=ae,t.lanes=p,t;case V:return Nl(l.children,h,p,n);case F:N=8,h|=24;break;case J:return t=na(12,l,n,h|2),t.elementType=J,t.lanes=p,t;case I:return t=na(13,l,n,h),t.elementType=I,t.lanes=p,t;case P:return t=na(19,l,n,h),t.elementType=P,t.lanes=p,t;case ie:case q:return t=h|32,t=na(30,l,n,t),t.elementType=q,t.lanes=p,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case $:N=10;break e;case G:N=9;break e;case K:N=11;break e;case W:N=14;break e;case _:N=16,c=null;break e}N=29,l=Error(r(130,t===null?"null":typeof t,"")),c=null}return n=na(N,l,n,h),n.elementType=t,n.type=c,n.lanes=p,n}function Nl(t,n,l,c){return t=na(7,t,c,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 La(t,n){if(typeof t=="object"&&t!==null){var l=l1.get(t);return l!==void 0?l:(n={value:t,source:n,stack:Ut(n)},l1.set(t,n),n)}return{value:t,source:n,stack:Ut(n)}}var So=[],ko=0,nu=null,Ds=0,Ba=[],Ia=0,Dr=null,yi=1,xi="";function tr(t,n){So[ko++]=Ds,So[ko++]=nu,nu=t,Ds=n}function o1(t,n,l){Ba[Ia++]=yi,Ba[Ia++]=xi,Ba[Ia++]=Dr,Dr=t;var c=yi;t=xi;var h=32-Vt(c)-1;c&=~(1<<h),l+=1;var p=32-Vt(n)+h;if(30<p){var N=h-h%5;p=(c&(1<<N)-1).toString(32),c>>=N,h-=N,yi=1<<32-Vt(n)+h|l<<h|c,xi=p+t}else yi=1<<p|l<<h|c,xi=t}function au(t){t.return!==null&&(tr(t,1),o1(t,1,0))}function If(t){for(;t===nu;)nu=So[--ko],So[ko]=null,Ds=So[--ko],So[ko]=null;for(;t===Dr;)Dr=Ba[--Ia],Ba[Ia]=null,xi=Ba[--Ia],Ba[Ia]=null,yi=Ba[--Ia],Ba[Ia]=null}function s1(t,n){Ba[Ia++]=yi,Ba[Ia++]=xi,Ba[Ia++]=Dr,yi=n.id,xi=n.overflow,Dr=t}var mn=null,_t=null,at=!1,Or=null,Pa=!1,Pf=Error(r(519));function zr(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(La(n,t)),Pf}function c1(t){var n=t.stateNode,l=t.type,c=t.memoizedProps;switch(n[Rt]=t,n[sn]=c,l){case"dialog":rt("cancel",n),rt("close",n);break;case"iframe":case"object":case"embed":rt("load",n);break;case"video":case"audio":for(l=0;l<nc.length;l++)rt(nc[l],n);break;case"source":rt("error",n);break;case"img":case"image":case"link":rt("error",n),rt("load",n);break;case"details":rt("toggle",n);break;case"input":rt("invalid",n),Ar(n,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":rt("invalid",n);break;case"textarea":rt("invalid",n),xa(n,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||c.suppressHydrationWarning===!0||_2(n.textContent,l)?(c.popover!=null&&(rt("beforetoggle",n),rt("toggle",n)),c.onScroll!=null&&rt("scroll",n),c.onScrollEnd!=null&&rt("scrollend",n),c.onClick!=null&&(n.onclick=Vn),n=!0):n=!1,n||zr(t,!0)}function iu(t){for(mn=t.return;mn;)switch(mn.tag){case 5:case 31:case 13:Pa=!1;return;case 27:case 3:Pa=!0;return;default:mn=mn.return}}function Co(t){if(t!==mn)return!1;if(!at)return iu(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&&_t&&zr(t),iu(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));_t=K2(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));_t=K2(t)}else n===27?(n=_t,Zr(t.type)?(t=km,km=null,_t=t):_t=n):_t=mn?Ua(t.stateNode.nextSibling):null;return!0}function El(){_t=mn=null,at=!1}function Hf(){var t=Or;return t!==null&&(ra===null?ra=t:ra.push.apply(ra,t),Or=null),t}function Os(t){Or===null?Or=[t]:Or.push(t)}var Uf=Ie(null),Tl=null,nr=null;function Lr(t,n,l){Ke(Uf,n._currentValue),n._currentValue=l}function ar(t){t._currentValue=Uf.current,Ye(Uf)}function ru(t,n,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,c!==null&&(c.childLanes|=n)):c!==null&&(c.childLanes&n)!==n&&(c.childLanes|=n),t===l)break;t=t.return}}function qf(t,n,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var p=h.dependencies;if(p!==null){var N=h.child;p=p.firstContext;e:for(;p!==null;){var O=p;p=h;for(var X=0;X<n.length;X++)if(O.context===n[X]){p.lanes|=l,O=p.alternate,O!==null&&(O.lanes|=l),ru(p.return,l,t),c||(N=null);break e}p=O.next}}else if(h.tag===18){if(N=h.return,N===null)throw Error(r(341));N.lanes|=l,p=N.alternate,p!==null&&(p.lanes|=l),ru(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),ru(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 Al(t,n,l,c){t=null;for(var h=n,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!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 O=h.type;wa(h.pendingProps.value,N.value)||(t!==null?t.push(O):t=[O])}}else if(h===Hn.current){if(N=h.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Qo):t=[Qo])}h=h.return}return t!==null&&qf(n,t,l,c),n.flags|=262144,t!==null}function lu(t){for(t=t.firstContext;t!==null;){if(!wa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function _l(t){Tl=t,nr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kn(t){return u1(Tl,t)}function ou(t,n){return Tl===null&&_l(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 A6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},_6=e.unstable_scheduleCallback,M6=e.unstable_NormalPriority,Zt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new A6,data:new Map,refCount:0}}function zs(t){t.refCount--,t.refCount===0&&_6(M6,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 c=n[t];l.indexOf(c)===-1&&l.push(c)}}}var Ls=null;function R6(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var Bs=null,Vf=0,Ml=0,No=null;function D6(t,n){if(Bs===null){var l=Bs=[];Vf=0,Ml=lm(),No={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Vf++,n.then(f1,f1),n}function f1(){if(--Vf===0&&(Ls=null,Bs!==null)){No!==null&&(No.status="fulfilled");var t=Bs;Bs=null,Ml=0,No=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function O6(t,n){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var h1=ye.S;ye.S=function(t,n){if(r2=Yt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&D6(t,n),Ls!==null)for(var l=Vo;l!==null;)d1(l,Ls),l=l.next;if(l=t.types,l!==null){for(var c=Vo;c!==null;)d1(c,l),c=c.next;if(Ml!==0){c=Ls,c===null&&(c=Ls=[]);for(var h=0;h<l.length;h++){var p=l[h];c.indexOf(p)===-1&&c.push(p)}}}h1!==null&&h1(t,n)};var Rl=Ie(null);function $f(){var t=Rl.current;return t!==null?t:Et.pooledCache}function su(t,n){n===null?Ke(Rl,Rl.current):Ke(Rl,n.pool)}function m1(){var t=$f();return t===null?null:{parent:Zt._currentValue,pool:t}}var Eo=Error(r(460)),Gf=Error(r(474)),cu=Error(r(542)),uu={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(Vn,Vn),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(Vn,Vn);else{if(t=Et,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(c){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=c}},function(c){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=c}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,y1(t),t}throw Ol=n,Eo}}function Dl(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ol=l,Eo):l}}var Ol=null;function v1(){if(Ol===null)throw Error(r(459));var t=Ol;return Ol=null,t}function y1(t){if(t===Eo||t===cu)throw Error(r(483))}var To=null,Is=0;function du(t){var n=Is;return Is+=1,To===null&&(To=[]),g1(To,t,n)}function Br(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function fu(t,n){throw n.$$typeof===U?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(te,Z){if(t){var le=te.deletions;le===null?(te.deletions=[Z],te.flags|=16):le.push(Z)}}function l(te,Z){if(!t)return null;for(;Z!==null;)n(te,Z),Z=Z.sibling;return null}function c(te){for(var Z=new Map;te!==null;)te.key===null?Z.set(te.index,te):Z.set(te.key,te),te=te.sibling;return Z}function h(te,Z){return te=er(te,Z),te.index=0,te.sibling=null,te}function p(te,Z,le){return te.index=le,t?(le=te.alternate,le!==null?(le=le.index,le<Z?(te.flags|=2,Z):le):(te.flags|=134217730,Z)):(te.flags|=1048576,Z)}function N(te){return t&&te.alternate===null&&(te.flags|=134217730),te}function O(te,Z,le,pe){return Z===null||Z.tag!==6?(Z=Lf(le,te.mode,pe),Z.return=te,Z):(Z=h(Z,le),Z.return=te,Z)}function X(te,Z,le,pe){var Oe=le.type;return Oe===V?(te=ce(te,Z,le.props.children,pe,le.key),Br(te,le),te):Z!==null&&(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===_&&Dl(Oe)===Z.type)?(Z=h(Z,le.props),Br(Z,le),Z.return=te,Z):(Z=tu(le.type,le.key,le.props,null,te.mode,pe),Br(Z,le),Z.return=te,Z)}function ne(te,Z,le,pe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==le.containerInfo||Z.stateNode.implementation!==le.implementation?(Z=Bf(le,te.mode,pe),Z.return=te,Z):(Z=h(Z,le.children||[]),Z.return=te,Z)}function ce(te,Z,le,pe,Oe){return Z===null||Z.tag!==7?(Z=Nl(le,te.mode,pe,Oe),Z.return=te,Z):(Z=h(Z,le),Z.return=te,Z)}function ge(te,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Lf(""+Z,te.mode,le),Z.return=te,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case Y:return le=tu(Z.type,Z.key,Z.props,null,te.mode,le),Br(le,Z),le.return=te,le;case z:return Z=Bf(Z,te.mode,le),Z.return=te,Z;case _:return Z=Dl(Z),ge(te,Z,le)}if(Re(Z)||be(Z))return Z=Nl(Z,te.mode,le,null),Z.return=te,Z;if(typeof Z.then=="function")return ge(te,du(Z),le);if(Z.$$typeof===$)return ge(te,ou(te,Z),le);fu(te,Z)}return null}function ee(te,Z,le,pe){var Oe=Z!==null?Z.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Oe!==null?null:O(te,Z,""+le,pe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case Y:return le.key===Oe?X(te,Z,le,pe):null;case z:return le.key===Oe?ne(te,Z,le,pe):null;case _:return le=Dl(le),ee(te,Z,le,pe)}if(Re(le)||be(le))return Oe!==null?null:ce(te,Z,le,pe,null);if(typeof le.then=="function")return ee(te,Z,du(le),pe);if(le.$$typeof===$)return ee(te,Z,ou(te,le),pe);fu(te,le)}return null}function oe(te,Z,le,pe,Oe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return te=te.get(le)||null,O(Z,te,""+pe,Oe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case Y:return te=te.get(pe.key===null?le:pe.key)||null,X(Z,te,pe,Oe);case z:return te=te.get(pe.key===null?le:pe.key)||null,ne(Z,te,pe,Oe);case _:return pe=Dl(pe),oe(te,Z,le,pe,Oe)}if(Re(pe)||be(pe))return te=te.get(le)||null,ce(Z,te,pe,Oe,null);if(typeof pe.then=="function")return oe(te,Z,le,du(pe),Oe);if(pe.$$typeof===$)return oe(te,Z,le,ou(Z,pe),Oe);fu(Z,pe)}return null}function _e(te,Z,le,pe){for(var Oe=null,dt=null,qe=Z,Xe=Z=0,en=null;qe!==null&&Xe<le.length;Xe++){qe.index>Xe?(en=qe,qe=null):en=qe.sibling;var ht=ee(te,qe,le[Xe],pe);if(ht===null){qe===null&&(qe=en);break}t&&qe&&ht.alternate===null&&n(te,qe),Z=p(ht,Z,Xe),dt===null?Oe=ht:dt.sibling=ht,dt=ht,qe=en}if(Xe===le.length)return l(te,qe),at&&tr(te,Xe),Oe;if(qe===null){for(;Xe<le.length;Xe++)qe=ge(te,le[Xe],pe),qe!==null&&(Z=p(qe,Z,Xe),dt===null?Oe=qe:dt.sibling=qe,dt=qe);return at&&tr(te,Xe),Oe}for(qe=c(qe);Xe<le.length;Xe++)en=oe(qe,te,Xe,le[Xe],pe),en!==null&&(t&&(ht=en.alternate,ht!==null&&qe.delete(ht.key===null?Xe:ht.key)),Z=p(en,Z,Xe),dt===null?Oe=en:dt.sibling=en,dt=en);return t&&qe.forEach(function(nl){return n(te,nl)}),at&&tr(te,Xe),Oe}function Le(te,Z,le,pe){if(le==null)throw Error(r(151));for(var Oe=null,dt=null,qe=Z,Xe=Z=0,en=null,ht=le.next();qe!==null&&!ht.done;Xe++,ht=le.next()){qe.index>Xe?(en=qe,qe=null):en=qe.sibling;var nl=ee(te,qe,ht.value,pe);if(nl===null){qe===null&&(qe=en);break}t&&qe&&nl.alternate===null&&n(te,qe),Z=p(nl,Z,Xe),dt===null?Oe=nl:dt.sibling=nl,dt=nl,qe=en}if(ht.done)return l(te,qe),at&&tr(te,Xe),Oe;if(qe===null){for(;!ht.done;Xe++,ht=le.next())ht=ge(te,ht.value,pe),ht!==null&&(Z=p(ht,Z,Xe),dt===null?Oe=ht:dt.sibling=ht,dt=ht);return at&&tr(te,Xe),Oe}for(qe=c(qe);!ht.done;Xe++,ht=le.next())ht=oe(qe,te,Xe,ht.value,pe),ht!==null&&(t&&(en=ht.alternate,en!==null&&qe.delete(en.key===null?Xe:en.key)),Z=p(ht,Z,Xe),dt===null?Oe=ht:dt.sibling=ht,dt=ht);return t&&qe.forEach(function(mC){return n(te,mC)}),at&&tr(te,Xe),Oe}function tt(te,Z,le,pe){if(typeof le=="object"&&le!==null&&le.type===V&&le.key===null&&le.props.ref===void 0&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case Y:e:{for(var Oe=le.key;Z!==null;){if(Z.key===Oe){if(Oe=le.type,Oe===V){if(Z.tag===7){l(te,Z.sibling),pe=h(Z,le.props.children),Br(pe,le),pe.return=te,te=pe;break e}}else if(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===_&&Dl(Oe)===Z.type){l(te,Z.sibling),pe=h(Z,le.props),Br(pe,le),pe.return=te,te=pe;break e}l(te,Z);break}else n(te,Z);Z=Z.sibling}le.type===V?(pe=Nl(le.props.children,te.mode,pe,le.key),Br(pe,le),pe.return=te,te=pe):(pe=tu(le.type,le.key,le.props,null,te.mode,pe),Br(pe,le),pe.return=te,te=pe)}return N(te);case z:e:{for(Oe=le.key;Z!==null;){if(Z.key===Oe)if(Z.tag===4&&Z.stateNode.containerInfo===le.containerInfo&&Z.stateNode.implementation===le.implementation){l(te,Z.sibling),pe=h(Z,le.children||[]),pe.return=te,te=pe;break e}else{l(te,Z);break}else n(te,Z);Z=Z.sibling}pe=Bf(le,te.mode,pe),pe.return=te,te=pe}return N(te);case _:return le=Dl(le),tt(te,Z,le,pe)}if(Re(le))return _e(te,Z,le,pe);if(be(le)){if(Oe=be(le),typeof Oe!="function")throw Error(r(150));return le=Oe.call(le),Le(te,Z,le,pe)}if(typeof le.then=="function")return tt(te,Z,du(le),pe);if(le.$$typeof===$)return tt(te,Z,ou(te,le),pe);fu(te,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,Z!==null&&Z.tag===6?(l(te,Z.sibling),pe=h(Z,le),pe.return=te,te=pe):(l(te,Z),pe=Lf(le,te.mode,pe),pe.return=te,te=pe),N(te)):l(te,Z)}return function(te,Z,le,pe){try{Is=0;var Oe=tt(te,Z,le,pe);return To=null,Oe}catch(qe){if(qe===Eo||qe===cu)throw qe;var dt=na(29,qe,null,te.mode);return dt.lanes=pe,dt.return=te,dt}finally{}}}var zl=x1(!0),b1=x1(!1),Ir=!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 Pr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Hr(t,n,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(yt&2)!==0){var h=c.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),c.pending=n,n=eu(t),a1(t,null,l),n}return Wc(t,c,n,l),eu(t)}function Ps(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var c=n.lanes;c&=t.pendingLanes,l|=c,n.lanes=l,Vi(t,l)}}function Kf(t,n){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?h=p=N:p=p.next=N,l=l.next}while(l!==null);p===null?h=p=n:p=p.next=n}else h=p=n;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Qf=!1;function Hs(){if(Qf){var t=No;if(t!==null)throw t}}function Us(t,n,l,c){Qf=!1;var h=t.updateQueue;Ir=!1;var p=h.firstBaseUpdate,N=h.lastBaseUpdate,O=h.shared.pending;if(O!==null){h.shared.pending=null;var X=O,ne=X.next;X.next=null,N===null?p=ne:N.next=ne,N=X;var ce=t.alternate;ce!==null&&(ce=ce.updateQueue,O=ce.lastBaseUpdate,O!==N&&(O===null?ce.firstBaseUpdate=ne:O.next=ne,ce.lastBaseUpdate=X))}if(p!==null){var ge=h.baseState;N=0,ce=ne=X=null,O=p;do{var ee=O.lane&-536870913,oe=ee!==O.lane;if(oe?(ut&ee)===ee:(c&ee)===ee){ee!==0&&ee===Ml&&(Qf=!0),ce!==null&&(ce=ce.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var _e=t,Le=O;ee=n;var tt=l;switch(Le.tag){case 1:if(_e=Le.payload,typeof _e=="function"){ge=_e.call(tt,ge,ee);break e}ge=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Le.payload,ee=typeof _e=="function"?_e.call(tt,ge,ee):_e,ee==null)break e;ge=H({},ge,ee);break e;case 2:Ir=!0}}ee=O.callback,ee!==null&&(t.flags|=64,oe&&(t.flags|=8192),oe=h.callbacks,oe===null?h.callbacks=[ee]:oe.push(ee))}else oe={lane:ee,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ce===null?(ne=ce=oe,X=ge):ce=ce.next=oe,N|=ee;if(O=O.next,O===null){if(O=h.shared.pending,O===null)break;oe=O,O=oe.next,oe.next=null,h.lastBaseUpdate=oe,h.shared.pending=null}}while(!0);ce===null&&(X=ge),h.baseState=X,h.firstBaseUpdate=ne,h.lastBaseUpdate=ce,p===null&&(h.shared.lanes=0),Yr|=N,t.lanes=N,t.memoizedState=ge}}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 Ur=Ie(null),hu=Ie(0);function S1(t,n){t=sr,Ke(hu,t),Ke(Ur,n),sr=t|n.baseLanes}function Zf(){Ke(hu,sr),Ke(Ur,Ur.current)}function Jf(){sr=hu.current,Ye(Ur),Ye(hu)}var Cn=Ie(null),zn=null;function qr(t){var n=t.alternate;Ke(Nn,Nn.current&1),Ke(Cn,t),zn===null&&(n===null||Ur.current!==null||n.memoizedState!==null)&&(zn=t)}function Wf(t){Ke(Nn,Nn.current),Ke(Cn,t),zn===null&&(zn=t)}function k1(t){t.tag===22?(Ke(Nn,Nn.current),Ke(Cn,t),zn===null&&(zn=t)):Fr()}function Fr(){Ke(Nn,Nn.current),Ke(Cn,Cn.current)}function Sa(t){Ye(Cn),zn===t&&(zn=null),Ye(Nn)}var Nn=Ie(0);function qs(t,n){Ke(Cn,Cn.current),Ke(Nn,n)}function eh(t){Ye(Nn),Ye(Cn),zn===t&&(zn=null)}function mu(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,Ct=null,Jt=null,pu=!1,Ao=!1,Ll=!1,gu=0,Fs=0,_o=null,z6=0;function qt(){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,c,h,p){return ir=p,et=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ye.H=t===null||t.memoizedState===null?ov:sv,Ll=!1,p=l(c,h),Ll=!1,Ao&&(p=N1(n,l,c,h)),C1(t),p}function C1(t){ye.H=Su;var n=Ct!==null&&Ct.next!==null;if(ir=0,Jt=Ct=et=null,pu=!1,Fs=0,_o=null,n)throw Error(r(300));t===null||Wt||(t=t.dependencies,t!==null&&lu(t)&&(Wt=!0))}function N1(t,n,l,c){et=t;var h=0;do{if(Ao&&(_o=null),Fs=0,Ao=!1,25<=h)throw Error(r(301));if(h+=1,Jt=Ct=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}ye.H=F6,p=n(l,c)}while(Ao);return p}function L6(){var t=ye.H,n=t.useState()[0];return n=typeof n.then=="function"?Vs(n):n,t=t.useState()[0],(Ct!==null?Ct.memoizedState:null)!==t&&(et.flags|=1024),n}function ah(){var t=gu!==0;return gu=0,t}function ih(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function rh(t){if(pu){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}pu=!1}ir=0,Jt=Ct=et=null,Ao=!1,Fs=gu=0,_o=null}function Gn(){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 $t(){if(Ct===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=Ct.next;var n=Jt===null?et.memoizedState:Jt.next;if(n!==null)Jt=n,Ct=t;else{if(t===null)throw et.alternate===null?Error(r(467)):Error(r(310));Ct=t,t={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Jt===null?et.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function vu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vs(t){var n=Fs;return Fs+=1,_o===null&&(_o=[]),t=g1(_o,t,n),n=et,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,ye.H=n===null||n.memoizedState===null?ov:sv),t}function yu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Vs(t);if(t.$$typeof===ue)return;if(t.$$typeof===$)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 c=et.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(n={data:c.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=vu(),et.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),c=0;c<t;c++)l[c]=L;return n.index++,l}function rr(t,n){return typeof n=="function"?n(t):n}function xu(t){var n=$t();return oh(n,Ct,t)}function oh(t,n,l){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var h=t.baseQueue,p=c.pending;if(p!==null){if(h!==null){var N=h.next;h.next=p.next,p.next=N}n.baseQueue=h=p,c.pending=null}if(p=t.baseState,h===null)t.memoizedState=p;else{n=h.next;var O=N=null,X=null,ne=n,ce=!1;do{var ge=ne.lane&-536870913;if(ge!==ne.lane?(ut&ge)===ge:(ir&ge)===ge){var ee=ne.revertLane;if(ee===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),ge===Ml&&(ce=!0);else if((ir&ee)===ee){ne=ne.next,ee===Ml&&(ce=!0);continue}else ge={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},X===null?(O=X=ge,N=p):X=X.next=ge,et.lanes|=ee,Yr|=ee;ge=ne.action,Ll&&l(p,ge),p=ne.hasEagerState?ne.eagerState:l(p,ge)}else ee={lane:ge,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},X===null?(O=X=ee,N=p):X=X.next=ee,et.lanes|=ge,Yr|=ge;ne=ne.next}while(ne!==null&&ne!==n);if(X===null?N=p:X.next=O,!wa(p,t.memoizedState)&&(Wt=!0,ce&&(l=No,l!==null)))throw l;t.memoizedState=p,t.baseState=N,t.baseQueue=X,c.lastRenderedState=p}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function sh(t){var n=$t(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,p=n.memoizedState;if(h!==null){l.pending=null;var N=h=h.next;do p=t(p,N.action),N=N.next;while(N!==h);wa(p,n.memoizedState)||(Wt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),l.lastRenderedState=p}return[p,c]}function E1(t,n,l){var c=et,h=$t(),p=at;if(p){if(l===void 0)throw Error(r(407));l=l()}else l=n();var N=!wa((Ct||h).memoizedState,l);if(N&&(h.memoizedState=l,Wt=!0),h=h.queue,dh(_1.bind(null,c,h,t),[t]),t=h.getSnapshot!==n||N||Jt!==null&&(Jt.memoizedState.tag&1)!==0,Mo(t?9:8,{destroy:void 0},A1.bind(null,c,h,l,n),null),t){if(c.flags|=2048,Et===null)throw Error(r(349));p||(ir&127)!==0||T1(c,n,l)}return l}function T1(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=et.updateQueue,n===null?(n=vu(),et.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function A1(t,n,l,c){n.value=l,n.getSnapshot=c,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=Cl(t,2);n!==null&&la(n,t,2)}function ch(t){var n=Gn();if(typeof t=="function"){var l=t;if(t=l(),Ll){Bt(!0);try{l()}finally{Bt(!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,c){return t.baseState=l,oh(t,Ct,typeof c=="function"?c:rr)}function B6(t,n,l,c,h){if(wu(t))throw Error(r(485));if(t=n.action,t!==null){var p={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){p.listeners.push(N)}};ye.T!==null?l(!0):p.isTransition=!1,c(p),l=n.pending,l===null?(p.next=n.pending=p,O1(n,p)):(p.next=l.next,n.pending=l.next=p)}}function O1(t,n){var l=n.action,c=n.payload,h=t.state;if(n.isTransition){var p=ye.T,N={};N.types=p!==null?p.types:null,ye.T=N;try{var O=l(h,c),X=ye.S;X!==null&&X(N,O),z1(t,n,O)}catch(ne){uh(t,n,ne)}finally{p!==null&&N.types!==null&&(p.types=N.types),ye.T=p}}else try{p=l(h,c),z1(t,n,p)}catch(ne){uh(t,n,ne)}}function z1(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){L1(t,n,c)},function(c){return uh(t,n,c)}):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 c=t.pending;if(t.pending=null,c!==null){c=c.next;do n.status="rejected",n.reason=l,B1(n),n=n.next;while(n!==c)}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=Et.formState;if(l!==null){e:{var c=et;if(at){if(_t){t:{for(var h=_t,p=Pa;h.nodeType!==8;){if(!p){h=null;break t}if(h=Ua(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){_t=Ua(h.nextSibling),c=h.data==="F!";break e}}zr(c)}c=!1}c&&(n=l[0])}}return l=Gn(),l.memoizedState=l.baseState=n,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:I1,lastRenderedState:n},l.queue=c,l=iv.bind(null,et,c),c.dispatch=l,c=ch(!1),p=gh.bind(null,et,!1,c.queue),c=Gn(),h={state:n,dispatch:null,action:t,pending:null},c.queue=h,l=B6.bind(null,et,h,p,l),h.dispatch=l,c.memoizedState=t,[n,l,!1]}function H1(t){var n=$t();return U1(n,Ct,t)}function U1(t,n,l){if(n=oh(t,n,I1)[0],t=xu(rr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var c=Vs(n)}catch(N){throw N===Eo?cu:N}else c=n;n=$t();var h=n.queue,p=h.dispatch;return l!==n.memoizedState&&(et.flags|=2048,Mo(9,{destroy:void 0},I6.bind(null,h,l),null)),[c,p,t]}function I6(t,n){t.action=n}function q1(t){var n=$t(),l=Ct;if(l!==null)return U1(n,l,t);$t(),n=n.memoizedState,l=$t();var c=l.queue.dispatch;return l.memoizedState=t,[n,c,!1]}function Mo(t,n,l,c){return t={tag:t,create:l,deps:c,inst:n,next:null},n=et.updateQueue,n===null&&(n=vu(),et.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,n.lastEffect=t),t}function F1(){return $t().memoizedState}function bu(t,n,l,c){var h=Gn();et.flags|=t,h.memoizedState=Mo(1|n,{destroy:void 0},l,c===void 0?null:c)}function ju(t,n,l,c){var h=$t();c=c===void 0?null:c;var p=h.memoizedState.inst;Ct!==null&&c!==null&&th(c,Ct.memoizedState.deps)?h.memoizedState=Mo(n,p,l,c):(et.flags|=t,h.memoizedState=Mo(1|n,p,l,c))}function V1(t,n){bu(8390656,8,t,n)}function dh(t,n){ju(2048,8,t,n)}function P6(t){et.flags|=4;var n=et.updateQueue;if(n===null)n=vu(),et.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function $1(t){var n=$t().memoizedState;return P6({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 ju(4,2,t,n)}function Y1(t,n){return ju(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,ju(4,4,X1.bind(null,n,t),l)}function fh(){}function Q1(t,n){var l=$t();n=n===void 0?null:n;var c=l.memoizedState;return n!==null&&th(n,c[1])?c[0]:(l.memoizedState=[t,n],t)}function Z1(t,n){var l=$t();n=n===void 0?null:n;var c=l.memoizedState;if(n!==null&&th(n,c[1]))return c[0];if(c=t(),Ll){Bt(!0);try{t()}finally{Bt(!1)}}return l.memoizedState=[c,n],c}function hh(t,n,l){return l===void 0||(ir&1073741824)!==0&&(ut&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=o2(),et.lanes|=t,Yr|=t,l)}function J1(t,n,l,c){return wa(l,n)?l:Ur.current!==null?(t=hh(t,l,c),wa(t,n)||(Wt=!0),t):(ir&106)===0||(ir&1073741824)!==0&&(ut&261930)===0?(Wt=!0,t.memoizedState=l):(t=o2(),et.lanes|=t,Yr|=t,n)}function W1(t,n,l,c,h){var p=Q.p;Q.p=p!==0&&8>p?p:8;var N=ye.T,O={};O.types=N!==null?N.types:null,ye.T=O,gh(t,!1,n,l);try{var X=h(),ne=ye.S;if(ne!==null&&ne(O,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ce=O6(X,c);$s(t,n,ce,Ea(t))}else $s(t,n,c,Ea(t))}catch(ge){$s(t,n,{then:function(){},status:"rejected",reason:ge},Ea())}finally{Q.p=p,N!==null&&O.types!==null&&(N.types=O.types),ye.T=N}}function H6(){}function mh(t,n,l,c){if(t.tag!==5)throw Error(r(476));var h=ev(t).queue;W1(t,h,n,he,l===null?H6:function(){return tv(t),l(c)})}function ev(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rr,lastRenderedState:he},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),$s(t,n.next.queue,{},Ea())}function ph(){return kn(Qo)}function nv(){return $t().memoizedState}function av(){return $t().memoizedState}function U6(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=Ea();t=Pr(l);var c=Hr(n,t,l);c!==null&&(la(c,n,l),Ps(c,n,l)),n={cache:Ff()},t.payload=n;return}n=n.return}}function q6(t,n,l){var c=Ea();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wu(t)?rv(n,l):(l=Of(t,n,l,c),l!==null&&(la(l,t,c),lv(l,n,c)))}function iv(t,n,l){var c=Ea();$s(t,n,l,c)}function $s(t,n,l,c){var h={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wu(t))rv(n,h);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var N=n.lastRenderedState,O=p(N,l);if(h.hasEagerState=!0,h.eagerState=O,wa(O,N))return Wc(t,n,h,0),Et===null&&Jc(),!1}catch{}finally{}if(l=Of(t,n,h,c),l!==null)return la(l,t,c),lv(l,n,c),!0}return!1}function gh(t,n,l,c){if(c={lane:2,revertLane:lm(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},wu(t)){if(n)throw Error(r(479))}else n=Of(t,l,c,2),n!==null&&la(n,t,2)}function wu(t){var n=t.alternate;return t===et||n!==null&&n===et}function rv(t,n){Ao=pu=!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 c=n.lanes;c&=t.pendingLanes,l|=c,n.lanes=l,Vi(t,l)}}var Su={readContext:kn,use:yu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt,useEffectEvent:qt},ov={readContext:kn,use:yu,useCallback:function(t,n){return Gn().memoizedState=[t,n===void 0?null:n],t},useContext:kn,useEffect:V1,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,bu(4194308,4,X1.bind(null,n,t),l)},useLayoutEffect:function(t,n){return bu(4194308,4,t,n)},useInsertionEffect:function(t,n){bu(4,2,t,n)},useMemo:function(t,n){var l=Gn();n=n===void 0?null:n;var c=t();if(Ll){Bt(!0);try{t()}finally{Bt(!1)}}return l.memoizedState=[c,n],c},useReducer:function(t,n,l){var c=Gn();if(l!==void 0){var h=l(n);if(Ll){Bt(!0);try{l(n)}finally{Bt(!1)}}}else h=n;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=q6.bind(null,et,t),[c.memoizedState,t]},useRef:function(t){var n=Gn();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=Gn();return hh(l,t,n)},useTransition:function(){var t=ch(!1);return t=W1.bind(null,et,t.queue,!0,!1),Gn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var c=et,h=Gn();if(at){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Et===null)throw Error(r(349));(ut&127)!==0||T1(c,n,l)}h.memoizedState=l;var p={value:l,getSnapshot:n};return h.queue=p,V1(_1.bind(null,c,p,t),[t]),c.flags|=2048,Mo(9,{destroy:void 0},A1.bind(null,c,p,l,n),null),l},useId:function(){var t=Gn(),n=Et.identifierPrefix;if(at){var l=xi,c=yi;l=(c&~(1<<32-Vt(c)-1)).toString(32)+l,n="_"+n+"R_"+l,l=gu++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=z6++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:ph,useFormState:P1,useActionState:P1,useOptimistic:function(t){var n=Gn();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 Gn().memoizedState=U6.bind(null,et)},useEffectEvent:function(t){var n=Gn(),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:yu,useCallback:Q1,useContext:kn,useEffect:dh,useImperativeHandle:K1,useInsertionEffect:G1,useLayoutEffect:Y1,useMemo:Z1,useReducer:xu,useRef:F1,useState:function(){return xu(rr)},useDebugValue:fh,useDeferredValue:function(t,n){var l=$t();return J1(l,Ct.memoizedState,t,n)},useTransition:function(){var t=xu(rr)[0],n=$t().memoizedState;return[typeof t=="boolean"?t:Vs(t),n]},useSyncExternalStore:E1,useId:nv,useHostTransitionStatus:ph,useFormState:H1,useActionState:H1,useOptimistic:function(t,n){var l=$t();return D1(l,Ct,t,n)},useMemoCache:lh,useCacheRefresh:av,useEffectEvent:$1},F6={readContext:kn,use:yu,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=$t();return Ct===null?hh(l,t,n):J1(l,Ct.memoizedState,t,n)},useTransition:function(){var t=sh(rr)[0],n=$t().memoizedState;return[typeof t=="boolean"?t:Vs(t),n]},useSyncExternalStore:E1,useId:nv,useHostTransitionStatus:ph,useFormState:q1,useActionState:q1,useOptimistic:function(t,n){var l=$t();return Ct!==null?D1(l,Ct,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:lh,useCacheRefresh:av,useEffectEvent:$1};function vh(t,n,l,c){n=t.memoizedState,l=l(c,n),l=l==null?n:H({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var yh={enqueueSetState:function(t,n,l){t=t._reactInternals;var c=Ea(),h=Pr(c);h.payload=n,l!=null&&(h.callback=l),n=Hr(t,h,c),n!==null&&(la(n,t,c),Ps(n,t,c))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var c=Ea(),h=Pr(c);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Hr(t,h,c),n!==null&&(la(n,t,c),Ps(n,t,c))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=Ea(),c=Pr(l);c.tag=2,n!=null&&(c.callback=n),n=Hr(t,c,l),n!==null&&(la(n,t,l),Ps(n,t,l))}};function cv(t,n,l,c,h,p,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,p,N):n.prototype&&n.prototype.isPureReactComponent?!Ms(l,c)||!Ms(h,p):!0}function uv(t,n,l,c){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,c),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,c),n.state!==t&&yh.enqueueReplaceState(n,n.state,null)}function Bl(t,n){var l=n;if("ref"in n){l={};for(var c in n)c!=="ref"&&(l[c]=n[c])}if(t=t.defaultProps){l===n&&(l=H({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function dv(t){Zc(t)}function fv(t){console.error(t)}function hv(t){Zc(t)}function ku(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(c){setTimeout(function(){throw c})}}function mv(t,n,l){try{var c=t.onCaughtError;c(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=Pr(l),l.tag=3,l.payload={element:null},l.callback=function(){ku(t,n)},l}function pv(t){return t=Pr(t),t.tag=3,t}function gv(t,n,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var p=c.value;t.payload=function(){return h(p)},t.callback=function(){mv(n,l,c)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){mv(n,l,c),typeof h!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var O=c.stack;this.componentDidCatch(c.value,{componentStack:O!==null?O:""})})}function V6(t,n,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(n=l.alternate,n!==null&&Al(n,l,h,!0),l=Cn.current,l!==null){switch(l.tag){case 31:case 13:case 19:return zn===null?$u():l.alternate===null&&Ft===0&&(Ft=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===uu?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([c]):n.add(c),am(t,c,h)),!1;case 22:return l.flags|=65536,c===uu?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([c]):l.add(c)),am(t,c,h)),!1}throw Error(r(435,l.tag))}return am(t,c,h),$u(),!1}if(at)return n=Cn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,c!==Pf&&(t=Error(r(422),{cause:c}),Os(La(t,l)))):(c!==Pf&&(n=Error(r(423),{cause:c}),Os(La(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=La(c,l),h=xh(t.stateNode,c,h),Kf(t,h),Ft!==4&&(Ft=2)),!1;var p=Error(r(520),{cause:c});if(p=La(p,l),Ws===null?Ws=[p]:Ws.push(p),Ft!==4&&(Ft=2),n===null)return!0;c=La(c,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=xh(l.stateNode,c,t),Kf(l,t),!1;case 1:if(n=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Xr===null||!Xr.has(p))))return l.flags|=65536,h&=-h,l.lanes|=h,h=pv(h),gv(h,t,l,c),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,c){n.child=t===null?b1(n,null,l,c):zl(n,t.child,l,c)}function vv(t,n,l,c,h){l=l.render;var p=n.ref;if("ref"in c){var N={};for(var O in c)O!=="ref"&&(N[O]=c[O])}else N=c;return _l(n),c=nh(t,n,l,N,p,h),O=ah(),t!==null&&!Wt?(ih(t,n,h),lr(t,n,h)):(at&&O&&au(n),n.flags|=1,un(t,n,c,h),n.child)}function yv(t,n,l,c,h){if(t===null){var p=l.type;return typeof p=="function"&&!zf(p)&&p.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=p,xv(t,n,p,c,h)):(t=tu(l.type,null,c,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(p=t.child,!Th(t,h)){var N=p.memoizedProps;if(l=l.compare,l=l!==null?l:Ms,l(N,c)&&t.ref===n.ref)return lr(t,n,h)}return n.flags|=1,t=er(p,c),t.ref=n.ref,t.return=n,n.child=t}function xv(t,n,l,c,h){if(t!==null){var p=t.memoizedProps;if(Ms(p,c)&&t.ref===n.ref)if(Wt=!1,n.pendingProps=c=p,Th(t,h))(t.flags&131072)!==0&&(Wt=!0);else return n.lanes=t.lanes,lr(t,n,h)}return jh(t,n,l,c,h)}function bv(t,n,l,c){var h=c.children,p=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,t!==null){for(c=n.child=t.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~p}else c=0,n.child=null;return jv(t,n,p,l,c)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&su(n,p!==null?p.cachePool:null),p!==null?S1(n,p):Zf(),k1(n);else return c=n.lanes=536870912,jv(t,n,p!==null?p.baseLanes|l:l,l,c)}else p!==null?(su(n,p.cachePool),S1(n,p),Fr(),n.memoizedState=null):(t!==null&&su(n,null),Zf(),Fr());return un(t,n,h,l),n.child}function Gs(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,c,h){var p=$f();return p=p===null?null:{parent:Zt._currentValue,pool:p},n.memoizedState={baseLanes:l,cachePool:p},t!==null&&su(n,null),Zf(),k1(n),t!==null&&Al(t,n,c,!0),n.childLanes=h,null}function Cu(t,n){return n=Nu({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 zl(n,t.child,null,l),t=Cu(n,n.pendingProps),t.flags|=2,Sa(n),n.memoizedState=null,t}function $6(t,n,l){var c=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(at){if(c.mode==="hidden")return t=Cu(n,c),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Gs(null,t);if(Wf(n),(t=_t)?(t=X2(t,Pa),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Dr!==null?{id:yi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},l=r1(t),l.return=n,n.child=l,mn=n,_t=null)):t=null,t===null)throw zr(n);return n.lanes=536870912,null}return Cu(n,c)}var p=t.memoizedState;if(p!==null){var N=p.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||Al(t,n,l,!1),h=(l&t.childLanes)!==0,Wt||h){if(Ur.current===null){if(c=Et,c!==null&&(N=Xt(c,l),N!==0&&N!==p.retryLane))throw p.retryLane=N,Cl(t,N),la(c,t,N),bh;$u()}n=wv(t,n,l)}else t=p.treeContext,_t=Ua(N.nextSibling),mn=n,at=!0,Or=null,Pa=!1,t!==null&&s1(n,t),n=Cu(n,c),n.flags|=134221824;return n}return t=er(t.child,{mode:c.mode,children:c.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Ro(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,c,h){return _l(n),l=nh(t,n,l,c,void 0,h),c=ah(),t!==null&&!Wt?(ih(t,n,h),lr(t,n,h)):(at&&c&&au(n),n.flags|=1,un(t,n,l,h),n.child)}function Sv(t,n,l,c,h,p){return _l(n),n.updateQueue=null,l=N1(n,c,l,h),C1(t),c=ah(),t!==null&&!Wt?(ih(t,n,p),lr(t,n,p)):(at&&c&&au(n),n.flags|=1,un(t,n,l,p),n.child)}function kv(t,n,l,c,h){if(_l(n),n.stateNode===null){var p=wo,N=l.contextType;typeof N=="object"&&N!==null&&(p=kn(N)),p=new l(c,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=yh,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=c,p.state=n.memoizedState,p.refs={},Yf(n),N=l.contextType,p.context=typeof N=="object"&&N!==null?kn(N):wo,p.state=n.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(vh(n,l,N,c),p.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(N=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),N!==p.state&&yh.enqueueReplaceState(p,p.state,null),Us(n,c,p,h),Hs(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),c=!0}else if(t===null){p=n.stateNode;var O=n.memoizedProps,X=Bl(l,O);p.props=X;var ne=p.context,ce=l.contextType;N=wo,typeof ce=="object"&&ce!==null&&(N=kn(ce));var ge=l.getDerivedStateFromProps;ce=typeof ge=="function"||typeof p.getSnapshotBeforeUpdate=="function",O=n.pendingProps!==O,ce||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(O||ne!==N)&&uv(n,p,c,N),Ir=!1;var ee=n.memoizedState;p.state=ee,Us(n,c,p,h),Hs(),ne=n.memoizedState,O||ee!==ne||Ir?(typeof ge=="function"&&(vh(n,l,ge,c),ne=n.memoizedState),(X=Ir||cv(n,l,X,c,ee,ne,N))?(ce||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=ne),p.props=c,p.state=ne,p.context=N,c=X):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{p=n.stateNode,Xf(t,n),N=n.memoizedProps,ce=Bl(l,N),p.props=ce,ge=n.pendingProps,ee=p.context,ne=l.contextType,X=wo,typeof ne=="object"&&ne!==null&&(X=kn(ne)),O=l.getDerivedStateFromProps,(ne=typeof O=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(N!==ge||ee!==X)&&uv(n,p,c,X),Ir=!1,ee=n.memoizedState,p.state=ee,Us(n,c,p,h),Hs();var oe=n.memoizedState;N!==ge||ee!==oe||Ir||t!==null&&t.dependencies!==null&&lu(t.dependencies)?(typeof O=="function"&&(vh(n,l,O,c),oe=n.memoizedState),(ce=Ir||cv(n,l,ce,c,ee,oe,X)||t!==null&&t.dependencies!==null&&lu(t.dependencies))?(ne||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,oe,X),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,oe,X)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||N===t.memoizedProps&&ee===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&ee===t.memoizedState||(n.flags|=1024),n.memoizedProps=c,n.memoizedState=oe),p.props=c,p.state=oe,p.context=X,c=ce):(typeof p.componentDidUpdate!="function"||N===t.memoizedProps&&ee===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&ee===t.memoizedState||(n.flags|=1024),c=!1)}return p=c,Ro(t,n),c=(n.flags&128)!==0,p||c?(p=n.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,t!==null&&c?(n.child=zl(n,t.child,null,h),n.child=zl(n,null,l,h)):un(t,n,l,h),n.memoizedState=p.state,t=n.child):t=lr(t,n,h),t}function Cv(t,n,l,c){return El(),n.flags|=256,un(t,n,l,c),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 c=n.pendingProps,h=!1,p=(n.flags&128)!==0,N;if((N=p)||(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?qr(n):Fr(),(t=_t)?(t=X2(t,Pa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Dr!==null?{id:yi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},l=r1(t),l.return=n,n.child=l,mn=n,_t=null)):t=null,t===null)throw zr(n);return Sm(t)?n.lanes=32:n.lanes=536870912,null}return p=c.children,c=c.fallback,h?(Fr(),h=n.mode,p=Nu({mode:"hidden",children:p},h),c=Nl(c,h,l,null),p.return=n,c.return=n,p.sibling=c,n.child=p,c=n.child,c.memoizedState=Sh(l),c.childLanes=kh(t,N,l),n.memoizedState=wh,Gs(null,c)):(qr(n),Ch(n,p))}var O=t.memoizedState;if(O!==null){var X=O.dehydrated;if(X!==null)return G6(t,n,p,N,c,X,O,l)}return h?(Fr(),h=c.fallback,p=n.mode,O=t.child,X=O.sibling,c=er(O,{mode:"hidden",children:c.children}),c.subtreeFlags=O.subtreeFlags&1206910976,X!==null?h=er(X,h):(h=Nl(h,p,l,null),h.flags|=2),h.return=n,c.return=n,c.sibling=h,n.child=c,Gs(null,c),c=n.child,h=t.child.memoizedState,h===null?h=Sh(l):(p=h.cachePool,p!==null?(O=Zt._currentValue,p=p.parent!==O?{parent:O,pool:O}:p):p=m1(),h={baseLanes:h.baseLanes|l,cachePool:p}),c.memoizedState=h,c.childLanes=kh(t,N,l),n.memoizedState=wh,Gs(t.child,c)):(qr(n),l=t.child,t=l.sibling,l=er(l,{mode:"visible",children:c.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=Nu({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Nu(t,n){return t=na(22,t,null,n),t.lanes=0,t}function Eu(t,n,l){return zl(n,t.child,null,l),t=Ch(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function G6(t,n,l,c,h,p,N,O){if(l)return n.flags&256?(qr(n),n.flags&=-257,Eu(t,n,O)):n.memoizedState!==null?(Fr(),n.child=t.child,n.flags|=128,null):(Fr(),p=h.fallback,N=n.mode,h=Nu({mode:"visible",children:h.children},N),p=Nl(p,N,O,null),p.flags|=2,h.return=n,p.return=n,h.sibling=p,n.child=h,zl(n,t.child,null,O),h=n.child,h.memoizedState=Sh(O),h.childLanes=kh(t,c,O),n.memoizedState=wh,Gs(null,h));if(qr(n),Sm(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var X=c.dgst;return c=X,c!==""&&(h=Error(r(419)),h.stack="",h.digest=c,Os({value:h,source:null,stack:null})),Eu(t,n,O)}if(Wt||Al(t,n,O,!1),c=(O&t.childLanes)!==0,Wt||c){if(Ur.current!==null)return Eu(t,n,O);if(c=Et,c!==null&&(h=Xt(c,O),h!==0&&h!==N.retryLane))throw N.retryLane=h,Cl(t,h),la(c,t,h),bh;return wm(p)||$u(),Eu(t,n,O)}return wm(p)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,_t=Ua(p.nextSibling),mn=n,at=!0,Or=null,Pa=!1,t!==null&&s1(n,t),n=Ch(n,h.children),n.flags|=134221824,n)}function Ev(t,n,l){t.lanes|=n;var c=t.alternate;c!==null&&(c.lanes|=n),ru(t.return,n,l)}function Tv(t){for(var n=null;t!==null;){var l=t.alternate;l!==null&&mu(l)===null&&(n=t),t=t.sibling}return n}function Tu(t,n,l,c,h,p){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h,treeForkCount:p}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=c,N.tail=l,N.tailMode=h,N.treeForkCount=p)}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 c=n.pendingProps,h=c.revealOrder,p=c.tail;c=c.children;var N=Nn.current;if(n.flags&128)return qs(n,N),null;var O=(N&2)!==0;if(O?(N=N&1|2,n.flags|=128):N&=1,qs(n,N),h==="backwards"&&t!==null?(Nh(t),un(t,n,c,l),Nh(t)):un(t,n,c,l),c=at?Ds:0,!O&&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)),Tu(n,!0,h,null,p,c);break;case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&mu(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Tu(n,!0,l,null,p,c);break;case"together":Tu(n,!1,null,null,void 0,c);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),Tu(n,!1,h,l,p,c)}return n.child}function Av(t,n,l){var c=n.pendingProps;return Lr(n,n.type,c.value),un(t,n,c.children,l),n.child}function lr(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Yr|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(Al(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&&lu(t)))}function Y6(t,n,l){switch(n.tag){case 3:fa(n,n.stateNode.containerInfo),Lr(n,Zt,t.memoizedState.cache),El();break;case 27:case 5:Ya(n);break;case 4:fa(n,n.stateNode.containerInfo);break;case 10:Lr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Wf(n),null;break;case 13:var c=n.memoizedState;if(c!==null){if(c.dehydrated!==null)return qr(n),n.flags|=128,null;c=Al(t,n,l,!1);var h=n.child.childLanes;return c||(l&h)!==0?Nv(t,n,l):(qr(n),t=lr(t,n,l),t!==null?t.sibling:null)}qr(n);break;case 19:if(n.flags&128)return Eh(t,n,l);if(h=(t.flags&128)!==0,c=(l&n.childLanes)!==0,c||(Al(t,n,l,!1),c=(l&n.childLanes)!==0),h){if(c)return Eh(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),qs(n,Nn.current),c)break;return null;case 22:return n.lanes=0,bv(t,n,l,n.pendingProps);case 24:Lr(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,Y6(t,n,l);Wt=(t.flags&131072)!==0}else Wt=!1,at&&(n.flags&1048576)!==0&&o1(n,Ds,n.index);switch(n.lanes=0,n.tag){case 16:e:{var c=n.pendingProps;if(t=Dl(n.elementType),n.type=t,typeof t=="function")zf(t)?(c=Bl(t,c),n.tag=1,n=kv(null,n,t,c,l)):(n.tag=0,n=jh(null,n,t,c,l));else{if(t!=null){var h=t.$$typeof;if(h===K){n.tag=11,n=vv(null,n,t,c,l);break e}else if(h===W){n.tag=14,n=yv(null,n,t,c,l);break e}else if(h===$){n.tag=10,n.type=t,n=Av(null,n,l);break e}}throw n=Ae(t)||t,Error(r(306,n,""))}}return n;case 0:return jh(t,n,n.type,n.pendingProps,l);case 1:return c=n.type,h=Bl(c,n.pendingProps),kv(t,n,c,h,l);case 3:e:{if(fa(n,n.stateNode.containerInfo),t===null)throw Error(r(387));c=n.pendingProps;var p=n.memoizedState;h=p.element,Xf(t,n),Us(n,c,null,l);var N=n.memoizedState;if(c=N.cache,Lr(n,Zt,c),c!==p.cache&&qf(n,[Zt],l,!0),Hs(),c=N.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=Cv(t,n,c,l);break e}else if(c!==h){h=La(Error(r(424)),n),Os(h),n=Cv(t,n,c,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(_t=Ua(t.firstChild),mn=n,at=!0,Or=null,Pa=!0,l=b1(n,null,c,l),n.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(El(),c===h){n=lr(t,n,l);break e}un(t,n,c,l)}n=n.child}return n;case 26:return Ro(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 Ya(n),t===null&&at&&(c=n.stateNode=Z2(n.type,n.pendingProps,xn.current),mn=n,Pa=!0,h=_t,Zr(n.type)?(km=h,_t=Ua(c.firstChild)):_t=h),un(t,n,n.pendingProps.children,l),Ro(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&at&&((h=c=_t)&&(c=Uk(c,n.type,n.pendingProps,Pa),c!==null?(n.stateNode=c,mn=n,_t=Ua(c.firstChild),Pa=!1,h=!0):h=!1),h||zr(n)),Ya(n),h=n.type,p=n.pendingProps,N=t!==null?t.memoizedProps:null,c=p.children,pm(h,p)?c=null:N!==null&&pm(h,N)&&(n.flags|=32),n.memoizedState!==null&&(h=nh(t,n,L6,null,null,l),Qo._currentValue=h),Ro(t,n),un(t,n,c,l),n.child;case 6:return t===null&&at&&((t=l=_t)&&(l=qk(l,n.pendingProps,Pa),l!==null?(n.stateNode=l,mn=n,_t=null,t=!0):t=!1),t||zr(n)),null;case 13:return Nv(t,n,l);case 4:return fa(n,n.stateNode.containerInfo),c=n.pendingProps,t===null?n.child=zl(n,null,c,l):un(t,n,c,l),n.child;case 11:return vv(t,n,n.type,n.pendingProps,l);case 7:return c=n.pendingProps,Ro(t,n),un(t,n,c,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,c=n.pendingProps.children,_l(n),h=kn(h),c=c(h),n.flags|=1,un(t,n,c,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 $6(t,n,l);case 22:return bv(t,n,l,n.pendingProps);case 24:return _l(n),c=kn(Zt),t===null?(h=$f(),h===null&&(h=Et,p=Ff(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=l),h=p),n.memoizedState={parent:c,cache:h},Yf(n),Lr(n,Zt,h)):((t.lanes&l)!==0&&(Xf(t,n),Us(n,null,null,l),Hs()),h=t.memoizedState,p=n.memoizedState,h.parent!==c?(h={parent:c,cache:c},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Lr(n,Zt,c)):(c=p.cache,Lr(n,Zt,c),c!==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}),c=n.pendingProps,c.name!=null&&c.name!=="auto"?n.flags|=t===null?18882560:18874368:at&&au(n),t!==null&&t.memoizedProps.name!==c.name?n.flags|=4194816:Ro(t,n),un(t,n,c.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,c,h){var p;if((p=(t.mode&32)!==0)&&(p=l===null?ry(n,c):ry(n,c)&&(c.src!==l.src||c.srcSet!==l.srcSet)),p){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(d2())t.flags|=8192;else throw Ol=uu,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 Ol=uu,Gf}function Au(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?va():536870912,t.lanes|=n,Bo|=n)}function Ys(t,n){if(!at)switch(t.tailMode){case"visible":break;case"collapsed":for(var l=t.tail,c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:c.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 Mt(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&1206910976,c|=h.flags&1206910976,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,n}function X6(t,n,l){var c=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 Mt(n),null;case 1:return Mt(n),null;case 3:return l=n.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),n.memoizedState.cache!==c&&(n.flags|=2048),ar(Zt),ln(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Co(n)?or(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Hf())),Mt(n),null;case 26:var h=n.type,p=n.memoizedState;return t===null?(or(n),p!==null?(Mt(n),Mv(n,p)):(Mt(n),Ah(n,h,null,c,l))):p?p!==t.memoizedState?(or(n),Mt(n),Mv(n,p)):(Mt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==c&&or(n),Mt(n),Ah(n,h,t,c,l)),null;case 27:if(de(n),l=xn.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==c&&or(n);else{if(!c){if(n.stateNode===null)throw Error(r(166));return Mt(n),n.subtreeFlags&=-33554433,null}t=gt.current,Co(n)?c1(n):(t=Z2(h,c,l),n.stateNode=t,or(n))}return Mt(n),n.subtreeFlags&=-33554433,null;case 5:if(de(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==c&&or(n);else{if(!c){if(n.stateNode===null)throw Error(r(166));return Mt(n),n.subtreeFlags&=-33554433,null}if(p=gt.current,Co(n))c1(n);else{var N=ic(xn.current);switch(p){case 1:p=N.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=N.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=N.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?N.createElement("select",{is:c.is}):N.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?N.createElement(h,{is:c.is}):N.createElement(h)}}p[Rt]=n,p[sn]=c;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)p.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=p;e:switch(Tn(p,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&or(n)}}return Mt(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!==c&&or(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(t=xn.current,Co(n)){if(t=n.stateNode,l=n.memoizedProps,c=null,h=mn,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[Rt]=n,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||_2(t.nodeValue,l)),t||zr(n,!0)}else t=ic(t).createTextNode(c),t[Rt]=n,n.stateNode=t}return Mt(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(c=Co(n),l!==null){if(t===null){if(!c)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Rt]=n}else El(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Mt(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 Mt(n),null;case 13:if(c=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Co(n),c!==null&&c.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[Rt]=n}else El(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Mt(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=c!==null,t=t!==null&&t.memoizedState!==null,l&&(c=n.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==h&&(c.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Au(n,n.updateQueue),Mt(n),null);case 4:return ln(),t===null&&um(n.stateNode.containerInfo),n.flags|=67108864,Mt(n),null;case 10:return ar(n.type),Mt(n),null;case 19:if(eh(n),c=n.memoizedState,c===null)return Mt(n),null;if(h=(n.flags&128)!==0,p=c.rendering,p===null)if(h)Ys(c,!1);else{if(Ft!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(p=mu(t),p!==null){for(n.flags|=128,Ys(c,!1),t=p.updateQueue,n.updateQueue=t,Au(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)i1(l,t),l=l.sibling;return qs(n,Nn.current&1|2),at&&tr(n,c.treeForkCount),n.child}t=t.sibling}c.tail!==null&&Yt()>Uu&&(n.flags|=128,h=!0,Ys(c,!1),n.lanes=4194304)}else{if(!h)if(t=mu(p),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Au(n,t),Ys(c,!0),c.tail===null&&c.tailMode!=="collapsed"&&c.tailMode!=="visible"&&!p.alternate&&!at)return Mt(n),null}else 2*Yt()-c.renderingStartTime>Uu&&l!==536870912&&(n.flags|=128,h=!0,Ys(c,!1),n.lanes=4194304);c.isBackwards?(p.sibling=n.child,n.child=p):(t=c.last,t!==null?t.sibling=p:n.child=p,c.last=p)}if(c.tail!==null){t=c.tail;e:{for(l=t;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Yt(),t.sibling=null,p=Nn.current,p=h?p&1|2:p&1,c.tailMode==="visible"||c.tailMode==="collapsed"||!l||at?qs(n,p):(l=p,Ke(Cn,n),Ke(Nn,l),zn===null&&(zn=n)),at&&tr(n,c.treeForkCount),t}return Mt(n),null;case 22:case 23:return Sa(n),Jf(),c=n.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(n.flags|=8192):c&&(n.flags|=8192),c?(l&536870912)!==0&&(n.flags&128)===0&&(Mt(n),n.subtreeFlags&6&&(n.flags|=8192)):Mt(n),l=n.updateQueue,l!==null&&Au(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==l&&(n.flags|=2048),t!==null&&Ye(Rl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ar(Zt),Mt(n),null;case 25:return null;case 30:return n.flags|=33554432,Mt(n),null}throw Error(r(156,n.tag))}function K6(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 de(n),null;case 31:if(n.memoizedState!==null){if(Sa(n),n.alternate===null)throw Error(r(340));El()}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));El()}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&&Ye(Rl),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:de(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&&Ye(Rl);break;case 24:ar(Zt)}}function Xs(t,n){try{var l=n.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var p=l.create,N=l.inst;c=p(),N.destroy=c}l=l.next}while(l!==h)}}catch(O){wt(n,n.return,O)}}function Vr(t,n,l){try{var c=n.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&t)===t){var N=c.inst,O=N.destroy;if(O!==void 0){N.destroy=void 0,h=n;var X=l,ne=O;try{ne()}catch(ce){wt(h,X,ce)}}}c=c.next}while(c!==p)}}catch(ce){wt(n,n.return,ce)}}function Dv(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{w1(n,l)}catch(c){wt(t,t.return,c)}}}function Ov(t,n,l){l.props=Bl(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){wt(t,n,c)}}function bi(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:var h=t.stateNode,p=Ji(t.memoizedProps,h);(h.ref===null||h.ref.name!==p)&&(h.ref=U2(p)),c=h.ref;break;case 7:if(t.stateNode===null){var N=new Ta(t);g(t.child,!1,Pk,N,void 0,void 0),t.stateNode=N}c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(O){wt(t,n,O)}}function En(t,n){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}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 _u(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 Ks(t){for(var n=t.return;n!==null&&(Mh(n)&&Hk(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,c=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){wt(t,t.return,h)}}function Dh(t,n,l){try{var c=t.stateNode;jk(c,t.type,l,n),c[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&&Zr(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&&Zr(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,c){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=Vn)),_u(t,c),Ve=!0;else if(h!==4&&(h===27&&(_u(t,c),c=null,Zr(t.type)&&(l=t.stateNode,n=null)),t=t.child,t!==null))for(zh(t,n,l,c),t=t.sibling;t!==null;)zh(t,n,l,c),t=t.sibling}function Mu(t,n,l,c){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?l.insertBefore(h,n):l.appendChild(h),_u(t,c),Ve=!0;else if(h!==4&&(h===27&&(_u(t,c),c=null,Zr(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Mu(t,n,l,c),t=t.sibling;t!==null;)Mu(t,n,l,c),t=t.sibling}function Bv(t){var n=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Tn(n,c,l),n[Rt]=t,n[sn]=l}catch(p){wt(t,t.return,p)}}var Ru=!1,ka=null;function Iv(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Ru=!0)}var ji=null;function Pv(){var t=ji;return ji=null,t}var aa=0;function Do(t,n,l,c,h){return aa=0,Hv(t.child,n,l,c,h)}function Hv(t,n,l,c,h){for(var p=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(c!==null){var O=ym(N);c.push(O),O.view&&(p=!0)}else p||ym(N).view&&(p=!0);Ru=!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,c,h)&&(p=!0));t=t.sibling}return p}function wi(t,n){for(;t!==null;)t.tag===5?H2(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||wi(t.child,n)),t=t.sibling}function Du(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Du(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"&&(Do(t,l,n,null,!1)||wi(t.child,!1))}t=t.sibling}}function Lh(t,n){if(t.tag===30){var l=t.stateNode,c=t.memoizedProps,h=Ji(c,l),p=Wi(c.default,l.paired?c.share:c.enter);p!=="none"?Do(t,h,p,null,!1)?(Du(t),l.paired||n||Uo(t,c.onEnter)):wi(t.child,!1):Du(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Lh(t,n),t=t.sibling;else Du(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,c=l.name;if(c!=null&&c!=="auto"){var h=n.get(c);if(h!==void 0){var p=Wi(l.default,l.share);if(p!=="none"&&(Do(t,c,p,null,!1)?(p=t.stateNode,h.paired=p,p.paired=h,Uo(t,l.onShare)):wi(t.child,!1)),n.delete(c),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),c=ka!==null?ka.get(l):void 0,h=Wi(n.default,c!==void 0?n.share:n.exit);h!=="none"&&(Do(t,l,h,null,!1)?c!==void 0?(h=t.stateNode,c.paired=h,h.paired=c,ka.delete(l),Uo(t,n.onShare)):Uo(t,n.onExit):wi(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"&&Do(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,wi(t.child,!1))}Ph(t)}t=t.sibling}}function Ou(t){if(t.tag===30)t.stateNode.paired=null,wi(t.child,!1),Ph(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ou(t),t=t.sibling;else Ph(t)}function qv(t){for(t=t.child;t!==null;)t.tag===30?wi(t.child,!1):(t.subtreeFlags&33554432)!==0&&qv(t),t=t.sibling}function Hh(t,n,l,c,h,p,N){for(var O=!1;n!==null;){if(n.tag===5){var X=n.stateNode;if(p!==null&&aa<p.length){var ne=p[aa],ce=ym(X);(ne.view||ce.view)&&(O=!0);var ge;if(ge=(t.flags&4)===0)if(ce.clip)ge=!0;else{ge=ne.rect;var ee=ce.rect;ge=ge.y!==ee.y||ge.x!==ee.x||ge.height!==ee.height||ge.width!==ee.width}ge&&(t.flags|=4),ce.abs?ce=!ne.abs:(ne=ne.rect,ce=ce.rect,ce=ne.height!==ce.height||ne.width!==ce.width),ce&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&P2(X,aa===0?l:l+"_"+aa,h),O&&(t.flags&4)!==0||(ji===null&&(ji=[]),ji.push(X,aa===0?c:c+"_"+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,c,h,p,N)&&(O=!0));n=n.sibling}return O}function Fv(t,n){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,c=t.stateNode,h=Ji(l,c),p=Wi(l.default,l.update),N;N=t.memoizedState,t.memoizedState=null,c=t;var O=t.child;aa=0,h=Hh(c,O,h,h,p,N,!1),(t.flags&4)!==0&&h&&Uo(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Fv(t);t=t.sibling}}var pn=!1,bt=!1,Si=!1,Uh=!1,Vv=typeof WeakSet=="function"?WeakSet:Set,gn=null,ki=!1,Qs=!1,zu=!1,qh=!1;function Q6(t,n,l){if(t=t.containerInfo,hm=Zo,t=Xg(t),Tf(t)){if("selectionStart"in t)var c={start:t.selectionStart,end:t.selectionEnd};else e:{c=(c=t.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var p=h.anchorOffset,N=h.focusNode;h=h.focusOffset;try{c.nodeType,N.nodeType}catch{c=null;break e}var O=0,X=-1,ne=-1,ce=0,ge=0,ee=t,oe=null;t:for(;;){for(var _e;ee!==c||p!==0&&ee.nodeType!==3||(X=O+p),ee!==N||h!==0&&ee.nodeType!==3||(ne=O+h),ee.nodeType===3&&(O+=ee.nodeValue.length),(_e=ee.firstChild)!==null;)oe=ee,ee=_e;for(;;){if(ee===t)break t;if(oe===c&&++ce===p&&(X=O),oe===N&&++ge===h&&(ne=O),(_e=ee.nextSibling)!==null)break;ee=oe,oe=ee.parentNode}ee=_e}c=X===-1||ne===-1?null:{start:X,end:ne}}else c=null}c=c||{start:0,end:0}}else c=null;for(mm={focusedElem:t,selectionRange:c},Zo=!1,l=(l&335544064)===l,gn=n,n=l?9270:1024;gn!==null;){if(t=gn,l&&(c=t.deletions,c!==null))for(p=0;p<c.length;p++)l&&Ih(c[p]);if(t.alternate===null&&(t.flags&2)!==0)l&&Iv(t),Lu(l);else{if(t.tag===22){if(c=t.alternate,t.memoizedState!==null){c!==null&&c.memoizedState===null&&l&&Ih(c),Lu(l);continue}else if(c!==null&&c.memoizedState!==null){l&&Iv(t),Lu(l);continue}}c=t.child,(t.subtreeFlags&n)!==0&&c!==null?(c.return=t,gn=c):(l&&Uv(t),Lu(l))}}ka=null}function Lu(t){for(;gn!==null;){var n=gn,l=t,c=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&c!==null){l=void 0,h=c.memoizedProps,c=c.memoizedState;var p=n.stateNode;try{var N=Bl(n.type,h);l=p.getSnapshotBeforeUpdate(N,c),p.__reactInternalSnapshotBeforeUpdate=l}catch(O){wt(n,n.return,O)}}break;case 3:if((h&1024)!==0){if(c=n.stateNode.containerInfo,l=c.nodeType,l===9)jm(c);else if(l===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":jm(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&c!==null&&(l=Ji(c.memoizedProps,c.stateNode),h=n.memoizedProps,h=Wi(h.default,h.update),h!=="none"&&Do(c,l,h,c.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(r(163))}if(c=n.sibling,c!==null){c.return=n.return,gn=c;break}gn=n.return}}function $v(t,n,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Ci(t,l),c&4&&Xs(5,l);break;case 1:if(Ci(t,l),c&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(N){wt(l,l.return,N)}else{var h=Bl(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){wt(l,l.return,N)}}c&64&&Dv(l),c&512&&bi(l,l.return);break;case 3:if(Ci(t,l),c&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&&c&4&&Bv(l);case 26:case 5:Ci(t,l),n===null&&c&4&&Rh(l),c&512&&bi(l,l.return);break;case 12:Ci(t,l);break;case 31:Ci(t,l),c&4&&Kv(t,l);break;case 13:Ci(t,l),c&4&&Qv(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=sk.bind(null,l),Fk(t,l))));break;case 22:if(c=l.memoizedState!==null||pn,!c){var p=n!==null&&n.memoizedState!==null||bt;n=pn,h=bt,pn=c,(bt=p)&&!h?(c=2,(l.subtreeFlags&8772)!==0&&(c|=1),ai(t,l,c)):Ci(t,l),pn=n,bt=h}break;case 30:Ci(t,l),c&512&&bi(l,l.return);break;case 7:c&512&&bi(l,l.return);default:Ci(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 c=l.style;typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"}else{var h=t.stateNode,p=t.memoizedProps.style,N=p!=null&&p.hasOwnProperty("display")?p.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 O=t.stateNode;n?I2(O,!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,c=n;switch(l.tag){case 4:Gv(l,c);break e;case 22:l.memoizedState===null&&Vh(l,c);break e;default:Vh(l,c)}}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 zt=null,ia=!1;function ti(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(Xa,l)}catch{}switch(l.tag){case 26:bt||En(l,n),ti(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),Ks(l);var c=zt,h=ia;Zr(l.type)&&(zt=l.stateNode,ia=!1),ti(t,n,l),J2(l.stateNode,l.type,l.memoizedProps),zt=c,ia=h;break;case 5:bt||En(l,n),Ks(l);case 6:if(l.tag===6&&Ks(l),c=zt,h=ia,zt=null,ti(t,n,l),zt=c,ia=h,zt!==null)if(ia)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(l.stateNode),Ve=!0}catch(p){wt(l,n,p)}else try{zt.removeChild(l.stateNode),Ve=!0}catch(p){wt(l,n,p)}break;case 18:zt!==null&&(ia?(t=zt,B2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Jo(t)):B2(zt,l.stateNode));break;case 4:c=zt,h=ia,zt=l.stateNode.containerInfo,ia=!0,ti(t,n,l),zt=c,ia=h;break;case 0:case 11:case 14:case 15:Vr(2,l,n),bt||Vr(4,l,n),ti(t,n,l);break;case 1:bt||(En(l,n),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Ov(l,n,c)),ti(t,n,l);break;case 21:ti(t,n,l);break;case 22:bt=(c=bt)||l.memoizedState!==null,ti(t,n,l),bt=c;break;case 30:En(l,n),ti(t,n,l);break;case 7:bt||En(l,n),ti(t,n,l);break;default:ti(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{Jo(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{Jo(t)}catch(l){wt(n,n.return,l)}}function Z6(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 Bu(t,n){var l=Z6(t);n.forEach(function(c){if(!l.has(c)){l.add(c);var h=ck.bind(null,t,c);c.then(h,h)}})}function Yn(t,n,l){var c=n.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],N=t,O=n,X=O;e:for(;X!==null;){switch(X.tag){case 27:if(Zr(X.type)){zt=X.stateNode,ia=!1;break e}break;case 5:zt=X.stateNode,ia=!1;break e;case 3:case 4:zt=X.stateNode.containerInfo,ia=!0;break e}X=X.return}if(zt===null)throw Error(r(160));Xv(N,O,p),zt=null,ia=!1,N=p.alternate,N!==null&&(N.return=null),p.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Zv(n,t,l),n=n.sibling}var ni=null;function Zv(t,n,l){var c=t.alternate,h=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(h&4&&(c=t.updateQueue,c=c!==null?c.events:null,c!==null))for(var p=0;p<c.length;p++){var N=c[p];N.ref.impl=N.nextImpl}Yn(n,t,l),Xn(t),h&4&&(Vr(3,t,t.return),Xs(3,t),Vr(5,t,t.return));break;case 1:Yn(n,t,l),Xn(t),h&512&&(bt||c===null||En(c,c.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(p=ni,Yn(n,t,l),Xn(t),h&512&&(bt||c===null||En(c,c.return)),h&4)if(h=c!==null?c.memoizedState:null,l=t.memoizedState,c===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=p.ownerDocument||p;t:switch(n){case"title":c=h.getElementsByTagName("title")[0],(!c||c[Yi]||c[Rt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=h.createElement(n),h.head.insertBefore(c,h.querySelector("head > title"))),Tn(c,n,l),c[Rt]=t,B(c),n=c;break e;case"link":if(p=iy("link","href",h).get(n+(l.href||""))){for(N=0;N<p.length;N++)if(c=p[N],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){p.splice(N,1);break t}}c=h.createElement(n),Tn(c,n,l),h.head.appendChild(c);break;case"meta":if(p=iy("meta","content",h).get(n+(l.content||""))){for(N=0;N<p.length;N++)if(c=p[N],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){p.splice(N,1);break t}}c=h.createElement(n),Tn(c,n,l),h.head.appendChild(c);break;default:throw Error(r(468,n))}c[Rt]=t,B(c),n=c}t.stateNode=n}else pn||Tm(p,t.type,t.stateNode);else t.stateNode=ay(p,l,t.memoizedProps);else h!==l?(h===null?(n=c.stateNode,n===null||bt||n.parentNode.removeChild(n)):h.count--,l===null?pn||Tm(p,t.type,t.stateNode):ay(p,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Dh(t,t.memoizedProps,c.memoizedProps);break;case 27:Yn(n,t,l),Xn(t),h&512&&(bt||c===null||En(c,c.return)),c!==null&&h&4&&Dh(t,t.memoizedProps,c.memoizedProps);break;case 5:if(p=Si,Si=!1,Yn(n,t,l),Si=p,Xn(t),h&512&&(bt||c===null||En(c,c.return)),t.flags&32){n=t.stateNode;try{Fn(n,""),Ve=!0}catch(ce){wt(t,t.return,ce)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,Dh(t,n,c!==null?c.memoizedProps:n)),h&1024&&(Uh=!0);break;case 6:if(Yn(n,t,l),Xn(t),h&4){if(t.stateNode===null)throw Error(r(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n,Ve=!0}catch(ce){wt(t,t.return,ce)}}break;case 3:if(Ve=!1,Ju=null,p=ni,ni=rc(n.containerInfo),Yn(n,t,l),ni=p,Xn(t),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Jo(n.containerInfo)}catch(ce){wt(t,t.return,ce)}Uh&&(Uh=!1,Jv(t)),Ve=!1;break;case 4:h=Si,Si=pn,c=cn(),p=ni,ni=rc(t.stateNode.containerInfo),Yn(n,t,l),Xn(t),ni=p,Ve&&Qs&&(zu=!0),Ve=c,Si=h;break;case 12:Yn(n,t,l),Xn(t);break;case 31:Yn(n,t,l),Xn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Bu(t,n)));break;case 13:Yn(n,t,l),Xn(t),t.child.flags&8192&&t.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Hu=Yt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Bu(t,n)));break;case 22:p=t.memoizedState!==null,N=c!==null&&c.memoizedState!==null;var O=pn,X=bt,ne=Si;pn=O||p,Si=ne||p,bt=X||N,Yn(n,t,l),bt=X,Si=ne,pn=O,Xn(t),h&8192&&(n=t.stateNode,n._visibility=p?n._visibility&-2:n._visibility|1,!p||c===null||N||pn||bt||(n=N||bt,l=pn,c=bt,pn=p||pn,bt=n,$r(t,2),pn=l,bt=c),!p&&Si||Fh(t,p)),h&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Bu(t,l))));break;case 19:Yn(n,t,l),Xn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Bu(t,n)));break;case 30:h&512&&(bt||c===null||En(c,c.return)),h=cn(),p=Qs,N=(l&335544064)===l,O=t.memoizedProps,Qs=N&&Wi(O.default,O.update)!=="none",Yn(n,t,l),Xn(t),N&&c!==null&&Ve&&(t.flags|=4),Qs=p,Ve=h;break;case 21:break;case 7:h&512&&(bt||c===null||En(c,c.return)),c&&c.stateNode!==null&&(c.stateNode._fragmentFiber=t);default:Yn(n,t,l),Xn(t)}}function Xn(t){var n=t.flags;if(n&2){try{for(var l,c=t.return;c!==null;){if(Lv(c)){l=c;break}c=c.return}c=null;for(var h=t.return;h!==null;){if(Mh(h)){var p=h.stateNode;c===null?c=[p]:c.push(p)}if(_h(h))break;h=h.return}var N=c;if(l==null)throw Error(r(160));switch(l.tag){case 27:var O=l.stateNode,X=Oh(t);Mu(t,X,O,N);break;case 5:var ne=l.stateNode;l.flags&32&&(Fn(ne,""),l.flags&=-33);var ce=Oh(t);Mu(t,ce,ne,N);break;case 3:case 4:var ge=l.stateNode.containerInfo,ee=Oh(t);zh(t,ee,ge,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,Zo=!0,n.reset(),Zo=!1),t=t.sibling}}function Oo(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=ki=!1,Pv(),Oo(n,t),!ki&&!zu){if(t=ji,t!==null)for(var c=0;c<t.length;c+=3){l=t[c];var h=t[c+1];H2(l,t[c+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}ji=null;break;case 5:Oo(n,t);break;case 4:c=ki,ki=!1,Oo(n,t),ki&&(zu=!0),ki=c;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Lh(t,!1):Oo(n,t));break;case 30:c=ki,h=Pv(),ki=!1,Oo(n,t),ki&&(t.flags|=4);var p=t.memoizedProps,N=t.stateNode;n=Ji(p,N),N=Ji(l.memoizedProps,N);var O=Wi(p.default,p.update);O==="none"?n=!1:(p=l.memoizedState,l.memoizedState=null,l=t.child,aa=0,n=Hh(t,l,n,N,O,p,!0),aa!==(p===null?0:p.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Uo(t,t.memoizedProps.onUpdate),ji=h):h!==null&&(h.push.apply(h,ji),ji=h),ki=(t.flags&32)!==0?!0:c;break;default:Oo(n,t)}}function Ci(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)$v(t,n.alternate,n),n=n.sibling}function $r(t,n){for(t=t.child;t!==null;){var l=t,c=n;switch(l.tag){case 0:case 11:case 14:case 15:Vr(4,l,l.return),$r(l,c);break;case 1:En(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&Ov(l,l.return,h),$r(l,c);break;case 27:(c&2)!==0&&J2(l.stateNode,l.type,l.memoizedProps);case 5:En(l,l.return),l.tag!==5&&l.tag!==27||Ks(l),$r(l,c);break;case 6:Ks(l);break;case 26:En(l,l.return),h=l.stateNode,l.memoizedState!==null||h===null||bt||h.parentNode.removeChild(h),$r(l,c);break;case 22:l.memoizedState===null&&$r(l,c);break;case 30:En(l,l.return),$r(l,c);break;case 7:En(l,l.return);default:$r(l,c)}t=t.sibling}}function ai(t,n,l){for(l=(n.subtreeFlags&8772)!==0?l:l&-2,n=n.child;n!==null;){var c=n.alternate,h=t,p=n,N=p.flags,O=(l&1)!==0;switch(p.tag){case 0:case 11:case 15:ai(h,p,l),Xs(4,p);break;case 1:if(ai(h,p,l),c=p,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(ce){wt(c,c.return,ce)}if(c=p,h=c.updateQueue,h!==null){var X=c.stateNode;try{var ne=h.shared.hiddenCallbacks;if(ne!==null)for(h.shared.hiddenCallbacks=null,h=0;h<ne.length;h++)j1(ne[h],X)}catch(ce){wt(c,c.return,ce)}}O&&N&64&&Dv(p),bi(p,p.return);break;case 27:(l&2)!==0&&Bv(p);case 5:p.tag!==5&&p.tag!==27||zv(p),ai(h,p,l),O&&c===null&&N&4&&Rh(p),bi(p,p.return);break;case 6:zv(p);break;case 26:X=p.stateNode,p.memoizedState!==null||X===null||pn||Tm(rc(X.ownerDocument),p.type,X),ai(h,p,l),O&&c===null&&N&4&&Rh(p),bi(p,p.return);break;case 12:ai(h,p,l);break;case 31:ai(h,p,l),O&&N&4&&Kv(h,p);break;case 13:ai(h,p,l),O&&N&4&&Qv(h,p);break;case 22:p.memoizedState===null&&ai(h,p,l),bi(p,p.return);break;case 30:ai(h,p,l),bi(p,p.return);break;case 7:bi(p,p.return);default:ai(h,p,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&&zs(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&&zs(t))}function Ha(t,n,l,c){var h=(l&335544064)===l;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)e2(t,n,l,c),n=n.sibling;else h&&qv(n)}function e2(t,n,l,c){var h=(l&335544064)===l;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Ou(n);var p=n.flags;switch(n.tag){case 0:case 11:case 15:Ha(t,n,l,c),p&2048&&Xs(9,n);break;case 1:Ha(t,n,l,c);break;case 3:Ha(t,n,l,c),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="")),p&2048&&(p=null,n.alternate!==null&&(p=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==p&&(n.refCount++,p!=null&&zs(p)));break;case 12:if(p&2048){Ha(t,n,l,c),p=n.stateNode;try{var N=n.memoizedProps,O=N.id,X=N.onPostCommit;typeof X=="function"&&X(O,n.alternate===null?"mount":"update",p.passiveEffectDuration,-0)}catch(ne){wt(n,n.return,ne)}}else Ha(t,n,l,c);break;case 31:Ha(t,n,l,c);break;case 13:Ha(t,n,l,c);break;case 23:break;case 22:N=n.stateNode,O=n.alternate,n.memoizedState!==null?(h&&O!==null&&O.memoizedState===null&&Ou(O),N._visibility&2?Ha(t,n,l,c):Zs(t,n)):(h&&O!==null&&O.memoizedState!==null&&Ou(n),N._visibility&2?Ha(t,n,l,c):(N._visibility|=2,zo(t,n,l,c,(n.subtreeFlags&10256)!==0||!1))),p&2048&&$h(O,n);break;case 24:Ha(t,n,l,c),p&2048&&Gh(n.alternate,n);break;case 30:h&&(p=n.alternate,p!==null&&(wi(p.child,!0),wi(n.child,!0))),Ha(t,n,l,c);break;default:Ha(t,n,l,c)}}function zo(t,n,l,c,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=t,N=n,O=l,X=c,ne=N.flags;switch(N.tag){case 0:case 11:case 15:zo(p,N,O,X,h),Xs(8,N);break;case 23:break;case 22:var ce=N.stateNode;N.memoizedState!==null?ce._visibility&2?zo(p,N,O,X,h):Zs(p,N):(ce._visibility|=2,zo(p,N,O,X,h)),h&&ne&2048&&$h(N.alternate,N);break;case 24:zo(p,N,O,X,h),h&&ne&2048&&Gh(N.alternate,N);break;default:zo(p,N,O,X,h)}n=n.sibling}}function Zs(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,c=n,h=c.flags;switch(c.tag){case 22:Zs(l,c),h&2048&&$h(c.alternate,c);break;case 24:Zs(l,c),h&2048&&Gh(c.alternate,c);break;default:Zs(l,c)}n=n.sibling}}var Il=8192;function Pl(t,n,l){if(t.subtreeFlags&Il)for(t=t.child;t!==null;)t2(t,n,l),t=t.sibling}function t2(t,n,l){switch(t.tag){case 26:Pl(t,n,l),t.flags&Il&&(t.memoizedState!==null?aC(l,ni,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&sy(l,t)));break;case 5:Pl(t,n,l),t.flags&Il&&(t=t.stateNode,(n&335544128)===n&&sy(l,t));break;case 3:case 4:var c=ni;ni=rc(t.stateNode.containerInfo),Pl(t,n,l),ni=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Il,Il=16777216,Pl(t,n,l),Il=c):Pl(t,n,l));break;case 30:if((t.flags&Il)!==0&&(c=t.memoizedProps.name,c!=null&&c!=="auto")){var h=t.stateNode;h.paired=null,ka===null&&(ka=new Map),ka.set(c,h)}Pl(t,n,l);break;default:Pl(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 Js(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var c=n[l];gn=c,i2(c,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:Js(t),t.flags&2048&&Vr(9,t,t.return);break;case 3:Js(t);break;case 12:Js(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Iu(t)):Js(t);break;default:Js(t)}}function Iu(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var c=n[l];gn=c,i2(c,t)}n2(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Vr(8,n,n.return),Iu(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Iu(n));break;default:Iu(n)}t=t.sibling}}function i2(t,n){for(;gn!==null;){var l=gn;switch(l.tag){case 0:case 11:case 15:Vr(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:zs(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,gn=c;else e:for(l=t;gn!==null;){c=gn;var h=c.sibling,p=c.return;if(Yv(c),c===l){gn=null;break e}if(h!==null){h.return=p,gn=h;break e}gn=p}}}var J6={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}},W6=typeof WeakMap=="function"?WeakMap:Map,yt=0,Et=null,it=null,ut=0,jt=0,Ca=null,Gr=!1,Lo=!1,Yh=!1,sr=0,Ft=0,Yr=0,Hl=0,Pu=0,Na=0,Bo=0,Ws=null,ra=null,Xh=!1,Hu=0,r2=0,Uu=1/0,qu=null,Xr=null,Pt=0,ii=null,Ul=null,Ni=0,Kh=0,Qh=null,l2=null,Io=null,Po=null,Ho=null,ec=0,Fu=null;function Ea(){return(yt&2)!==0&&ut!==0?ut&-ut:ye.T!==null?lm():Wn()}function o2(){if(Na===0)if((ut&536870912)===0||at){var t=Da;Da<<=1,(Da&3932160)===0&&(Da=262144),Na=t}else Na=536870912;return t=Cn.current,t!==null&&(t.flags|=32),Na}function Uo(t,n){if(n!=null){var l=t.stateNode,c=l.ref;c===null&&(c=l.ref=U2(Ji(t.memoizedProps,l))),Po===null&&(Po=[]),Po.push(n.bind(null,c))}}function la(t,n,l){(t===Et&&(jt===2||jt===9)||t.cancelPendingCommit!==null)&&(qo(t,0),Kr(t,ut,Na,!1)),Ja(t,l),((yt&2)===0||t!==Et)&&(t===Et&&((yt&2)===0&&(Hl|=l),Ft===4&&Kr(t,ut,Na,!1)),Ei(t))}function s2(t,n,l){if((yt&6)!==0)throw Error(r(327));var c=!l&&(n&127)===0&&(n&t.expiredLanes)===0||ga(t,n),h=c?nk(t,n):Jh(t,n,!0),p=c;do{if(h===0){Lo&&!c&&Kr(t,n,0,!1);break}else{if(l=t.current.alternate,p&&!ek(l)){h=Jh(t,n,!1),p=!1;continue}if(h===2){if(p=n,t.errorRecoveryDisabledLanes&p)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var O=t;h=Ws;var X=O.current.memoizedState.isDehydrated;if(X&&(qo(O,N).flags|=256),N=Jh(O,N,!1),N!==2&&N!==6){if(Yh&&!X){O.errorRecoveryDisabledLanes|=p,Hl|=p,h=4;break e}p=ra,ra=h,p!==null&&(ra===null?ra=p:ra.push.apply(ra,p))}h=N}if(p=!1,h!==2)continue}}if(h===1){qo(t,0),Kr(t,n,0,!0);break}e:{switch(c=t,p=h,p){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Kr(c,n,Na,!Gr);break e;case 2:ra=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(h=Hu+300-Yt(),10<h)){if(Kr(c,n,Na,!Gr),pa(c,0,!0)!==0)break e;Ni=n,c.timeoutHandle=vm(c2.bind(null,c,l,ra,qu,Xh,n,Na,Hl,Bo,Gr,p,"Throttled",-0,0),h);break e}c2(c,l,ra,qu,Xh,n,Na,Hl,Bo,Gr,p,null,-0,0)}}break}while(!0);Ei(t)}function c2(t,n,l,c,h,p,N,O,X,ne,ce,ge,ee,oe){t.timeoutHandle=-1;var _e=n.subtreeFlags,Le=(p&335544064)===p;if(ge=null,(Le||_e&8192||(_e&16785408)===16785408)&&(ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},ka=null,t2(n,p,ge),Le&&(_e=ge,Le=t.containerInfo,Le=(Le.nodeType===9?Le:Le.ownerDocument).__reactViewTransition,Le!=null&&(_e.count++,_e.waitingForViewTransition=!0,_e=sc.bind(_e),Le.finished.then(_e,_e))),_e=(p&62914560)===p?Hu-Yt():(p&4194048)===p?r2-Yt():0,_e=iC(ge,_e),_e!==null)){Ni=p,t.cancelPendingCommit=_e(v2.bind(null,t,n,p,l,c,h,N,O,X,ne,ce,ge,null,ee,oe)),Kr(t,p,N,!ne);return}v2(t,n,p,l,c,h,N,O,X,ne,ce,ge)}function ek(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 c=0;c<l.length;c++){var h=l[c],p=h.getSnapshot;h=h.value;try{if(!wa(p(),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 Kr(t,n,l,c){n=pi(t,n),n&=~Pu,n&=~Hl,t.suspendedLanes|=n,t.pingedLanes&=~n,c&&(t.warmLanes|=n),c=t.expirationTimes;for(var h=n;0<h;){var p=31-Vt(h),N=1<<p;c[p]=-1,h&=~N}l!==0&&qn(t,l,n)}function Vu(){return(yt&6)===0?(tc(0),!1):!0}function Zh(){if(it!==null){if(jt===0)var t=it.return;else t=it,nr=Tl=null,rh(t),To=null,Is=0,t=it;for(;t!==null;)Rv(t.alternate,t),t=t.return;it=null}}function qo(t,n){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,kk(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Ni=0,Zh(),Et=t,it=l=er(t.current,null),ut=n,jt=0,Ca=null,Gr=!1,Lo=ga(t,n),Yh=!1,Bo=Na=Pu=Hl=Yr=Ft=0,ra=Ws=null,Xh=!1,sr=pi(t,n),Jc(),l}function u2(t,n){et=null,ye.H=Su,n===Eo||n===cu?(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,it===null&&(Ft=1,ku(t,La(n,t.current)))}function d2(){var t=Cn.current;return t===null?!0:(ut&4194048)===ut?zn===null:(ut&62914560)===ut||(ut&536870912)!==0?t===zn:!1}function f2(){var t=ye.H;return ye.H=Su,t===null?Su:t}function h2(){var t=ye.A;return ye.A=J6,t}function $u(){Ft=4,Gr||(ut&4194048)!==ut&&Cn.current!==null||(Lo=!0),(Yr&134217727)===0&&(Hl&134217727)===0||Et===null||Kr(Et,ut,Na,!1)}function Jh(t,n,l){var c=yt;yt|=2;var h=f2(),p=h2();(Et!==t||ut!==n)&&(qu=null,qo(t,n)),n=!1;var N=Ft;e:do try{if(jt!==0&&it!==null){var O=it,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 ne=jt;if(jt=0,Ca=null,Fo(t,O,X,ne),l&&Lo){N=0;break e}break;default:ne=jt,jt=0,Ca=null,Fo(t,O,X,ne)}}tk(),N=Ft;break}catch(ce){u2(t,ce)}while(!0);return n&&t.shellSuspendCounter++,nr=Tl=null,yt=c,ye.H=h,ye.A=p,it===null&&(Et=null,ut=0,Jc()),N}function tk(){for(;it!==null;)m2(it)}function nk(t,n){var l=yt;yt|=2;var c=f2(),h=h2();Et!==t||ut!==n?(qu=null,Uu=Yt()+500,qo(t,n)):Lo=ga(t,n);e:do try{if(jt!==0&&it!==null){n=it;var p=Ca;t:switch(jt){case 1:jt=0,Ca=null,Fo(t,n,p,1);break;case 2:case 9:if(p1(p)){jt=0,Ca=null,p2(n);break}n=function(){jt!==2&&jt!==9||Et!==t||(jt=7),Ei(t)},p.then(n,n);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:p1(p)?(jt=0,Ca=null,p2(n)):(jt=0,Ca=null,Fo(t,n,p,7));break;case 5:var N=null;switch(it.tag){case 26:N=it.memoizedState;case 5:case 27:var O=it;if(N?ly(N):O.stateNode.complete){jt=0,Ca=null;var X=O.sibling;if(X!==null)it=X;else{var ne=O.return;ne!==null?(it=ne,Gu(ne)):it=null}break t}}jt=0,Ca=null,Fo(t,n,p,5);break;case 6:jt=0,Ca=null,Fo(t,n,p,6);break;case 8:Zh(),Ft=6;break e;default:throw Error(r(462))}}ak();break}catch(ce){u2(t,ce)}while(!0);return nr=Tl=null,ye.H=c,ye.A=h,yt=l,it!==null?0:(Et=null,ut=0,Jc(),Ft)}function ak(){for(;it!==null&&!Dn();)m2(it)}function m2(t){var n=_v(t.alternate,t,sr);t.memoizedProps=t.pendingProps,n===null?Gu(t):it=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,ut);break;case 11:n=Sv(l,n,n.pendingProps,n.type.render,n.ref,ut);break;case 5:rh(n);var c=n;c===mn&&(at?(iu(c),c.tag===5&&c.stateNode!=null&&(_t=c.stateNode)):(iu(c),at=!0));default:Rv(l,n),n=it=i1(n,sr),n=_v(l,n,sr)}t.memoizedProps=t.pendingProps,n===null?Gu(t):it=n}function Fo(t,n,l,c){nr=Tl=null,rh(n),To=null,Is=0;var h=n.return;try{if(V6(t,h,n,l,ut)){Ft=1,ku(t,La(l,t.current)),it=null;return}}catch(p){if(h!==null)throw it=h,p;Ft=1,ku(t,La(l,t.current)),it=null;return}n.flags&32768?(at||c===1?t=!0:Lo||(ut&536870912)!==0?t=!1:(Gr=t=!0,(c===2||c===9||c===3||c===6)&&(c=Cn.current,c!==null&&c.tag===13&&(c.flags|=16384))),g2(n,t)):Gu(n)}function Gu(t){var n=t;do{if((n.flags&32768)!==0){g2(n,Gr);return}t=n.return;var l=X6(n.alternate,n,sr);if(l!==null){it=l;return}if(n=n.sibling,n!==null){it=n;return}it=n=t}while(n!==null);Ft===0&&(Ft=5)}function g2(t,n){do{var l=K6(t.alternate,t);if(l!==null){l.flags&=32767,it=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){it=t;return}it=t=l}while(t!==null);Ft=6,it=null}function v2(t,n,l,c,h,p,N,O,X,ne,ce,ge){t.cancelPendingCommit=null;do Yu();while(Pt!==0);if((yt&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));t===Et&&(it=Et=null,ut=0),Ul=n,ii=t,Ni=l,Qh=h,l2=c,ik(t,n,l,N,O,X,ge)}}function ik(t,n,l,c,h,p,N){var O=n.lanes|n.childLanes;if(Kh=O,O|=Df,Wa(t,l,O,c,h,p),Po=null,(l&335544064)===l?(Ho=R6(t),c=10262):(Ho=null,c=10256),(n.subtreeFlags&c)!==0||(n.flags&c)!==0?(t.callbackNode=null,t.callbackPriority=0,uk(bn,function(){return nm(),null})):(t.callbackNode=null,t.callbackPriority=0),Ru=!1,c=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||c){c=ye.T,ye.T=null,h=Q.p,Q.p=2,p=yt,yt|=4;try{Q6(t,n,l)}finally{yt=p,Q.p=h,ye.T=c}}Pt=1,Ru?Io=_k(N,t.containerInfo,Ho,Wh,em,lk,tm,nm,rk):(Wh(),em(),tm())}function rk(t){if(Pt!==0){var n=ii.onRecoverableError;n(t,{componentStack:null})}}function lk(){Pt===3&&(Pt=0,Wv(Ul,ii),Pt=4)}function Wh(){if(Pt===1){Pt=0;var t=ii,n=Ul,l=Ni,c=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||c){c=ye.T,ye.T=null;var h=Q.p;Q.p=2;var p=yt;yt|=4;try{Qs=zu=!1,Zv(n,t,l),l=mm;var N=Xg(t.containerInfo),O=l.focusedElem,X=l.selectionRange;if(N!==O&&O&&O.ownerDocument&&Yg(O.ownerDocument.documentElement,O)){if(X!==null&&Tf(O)){var ne=X.start,ce=X.end;if(ce===void 0&&(ce=ne),"selectionStart"in O)O.selectionStart=ne,O.selectionEnd=Math.min(ce,O.value.length);else{var ge=O.ownerDocument||document,ee=ge&&ge.defaultView||window;if(ee.getSelection){var oe=ee.getSelection(),_e=O.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 te=Gg(O,Le),Z=Gg(O,tt);if(te&&Z&&(oe.rangeCount!==1||oe.anchorNode!==te.node||oe.anchorOffset!==te.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var le=ge.createRange();le.setStart(te.node,te.offset),oe.removeAllRanges(),Le>tt?(oe.addRange(le),oe.extend(Z.node,Z.offset)):(le.setEnd(Z.node,Z.offset),oe.addRange(le))}}}}for(ge=[],oe=O;oe=oe.parentNode;)oe.nodeType===1&&ge.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ge.length;O++){var pe=ge[O];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Zo=!!hm,mm=hm=null}finally{yt=p,Q.p=h,ye.T=c}}t.current=n,Pt=2}}function em(){if(Pt===2){Pt=0;var t=ii,n=Ul,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=ye.T,ye.T=null;var c=Q.p;Q.p=2;var h=yt;yt|=4;try{$v(t,n.alternate,n)}finally{yt=h,Q.p=c,ye.T=l}}Pt=3}}function tm(){if(Pt===4||Pt===3){Pt=0;var t=Io;Io=null,Qe();var n=ii,l=Ul,c=Ni,h=l2,p=(c&335544064)===c?10262:10256;if((l.subtreeFlags&p)!==0||(l.flags&p)!==0?Pt=5:(Pt=0,Ul=ii=null,y2(n,n.pendingLanes)),p=n.pendingLanes,p===0&&(Xr=null),Jn(c),l=l.stateNode,fn&&typeof fn.onCommitFiberRoot=="function")try{fn.onCommitFiberRoot(Xa,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=ye.T,p=Q.p,Q.p=2,ye.T=null;try{for(var N=n.onRecoverableError,O=0;O<h.length;O++){var X=h[O];N(X.value,{componentStack:X.stack})}}finally{ye.T=l,Q.p=p}}if(h=Po,N=Ho,Ho=null,h!==null&&(Po=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);(Ni&3)!==0&&Yu(),Ei(n),p=n.pendingLanes,(c&261930)!==0&&(p&42)!==0?n===Fu?ec++:(ec=0,Fu=n):(ec=0,Fu=null),tc(0)}}function y2(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,zs(n)))}function Yu(){return Io!==null&&(Io.skipTransition(),Io=null),Wh(),em(),tm(),nm()}function nm(){if(Pt!==5)return!1;var t=ii,n=Kh;Kh=0;var l=Jn(Ni),c=ye.T,h=Q.p;try{Q.p=32>l?32:l,ye.T=null,l=Qh,Qh=null;var p=ii,N=Ni;if(Pt=0,Ul=ii=null,Ni=0,(yt&6)!==0)throw Error(r(331));var O=yt;if(yt|=4,a2(p.current),e2(p,p.current,N,l),yt=O,tc(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(Xa,p)}catch{}return!0}finally{Q.p=h,ye.T=c,y2(t,n)}}function x2(t,n,l){n=La(l,n),n=xh(t.stateNode,n,2),t=Hr(t,n,2),t!==null&&(Ja(t,2),Ei(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 c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Xr===null||!Xr.has(c))){t=La(l,t),l=pv(2),c=Hr(n,l,2),c!==null&&(gv(l,c,n,t),Ja(c,2),Ei(c));break}}n=n.return}}function am(t,n,l){var c=t.pingCache;if(c===null){c=t.pingCache=new W6;var h=new Set;c.set(n,h)}else h=c.get(n),h===void 0&&(h=new Set,c.set(n,h));h.has(l)||(Yh=!0,h.add(l),t=ok.bind(null,t,n,l),n.then(t,t))}function ok(t,n,l){var c=t.pingCache;c!==null&&c.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Et===t&&(ut&l)===l&&((Ft===4||Ft===3&&(ut&62914560)===ut&&300>Yt()-Hu)&&(yt&2)===0?qo(t,0):Pu|=l,Bo===ut&&(Bo=0)),Ei(t)}function b2(t,n){n===0&&(n=va()),t=Cl(t,n),t!==null&&(Ja(t,n),Ei(t))}function sk(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),b2(t,l)}function ck(t,n){var l=0;switch(t.tag){case 31:case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(n),b2(t,l)}function uk(t,n){return Un(t,n)}var Vo=null,$o=null,im=!1,Xu=!1,rm=!1,Qr=0;function Ei(t){t!==$o&&t.next===null&&($o===null?Vo=$o=t:$o=$o.next=t),Xu=!0,im||(im=!0,fk())}function tc(t,n){if(!rm&&Xu){rm=!0;do for(var l=!1,c=Vo;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var p=0;else{var N=c.suspendedLanes,O=c.pingedLanes;p=(1<<31-Vt(42|t)+1)-1,p&=h&~(N&~O),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,k2(c,p))}else p=ut,p=pa(c,c===Et?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||ga(c,p)||(l=!0,k2(c,p));c=c.next}while(l);rm=!1}}function dk(){j2()}function j2(){Xu=im=!1;var t=0;Qr!==0&&Sk()&&(t=Qr);for(var n=Yt(),l=null,c=Vo;c!==null;){var h=c.next,p=w2(c,n);p===0?(c.next=null,l===null?Vo=h:l.next=h,h===null&&($o=l)):(l=c,(t!==0||(p&3)!==0)&&(Xu=!0)),c=h}Pt!==0&&Pt!==5||tc(t),Qr!==0&&(Qr=0)}function w2(t,n){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var N=31-Vt(p),O=1<<N,X=h[N];X===-1?((O&l)===0||(O&c)!==0)&&(h[N]=vl(O,n)):X<=n&&(t.expiredLanes|=O),p&=~O}if(n=Et,l=ut,l=pa(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===n&&(jt===2||jt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ot(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||ga(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(c!==null&&Ot(c),Jn(l)){case 2:case 8:l=fi;break;case 32:l=bn;break;case 268435456:l=gl;break;default:l=bn}return c=S2.bind(null,t),l=Un(l,c),t.callbackPriority=n,t.callbackNode=l,n}return c!==null&&c!==null&&Ot(c),t.callbackPriority=2,t.callbackNode=null,2}function S2(t,n){if(Pt!==0&&Pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Yu()&&t.callbackNode!==l)return null;var c=ut;return c=pa(t,t===Et?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(s2(t,c,n),w2(t,Yt()),t.callbackNode!=null&&t.callbackNode===l?S2.bind(null,t):null)}function k2(t,n){if(Yu())return null;s2(t,n,!0)}function fk(){Ck(function(){(yt&6)!==0?Un(di,dk):j2()})}function lm(){if(Qr===0){var t=Ml;t===0&&(t=Qa,Qa<<=1,(Qa&261888)===0&&(Qa=256)),Qr=t}return Qr}function C2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wn(t)}function hk(t,n,l,c,h){if(n==="submit"&&l&&l.stateNode===h){var p=C2((h[sn]||null).action),N=c.submitter;N&&(n=(n=N[sn]||null)?C2(n.formAction):N.getAttribute("formAction"),n!==null&&(p=n,N=null));var O=new Xc("action","action",null,c,h);t.push({event:O,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qr!==0){var X=new FormData(h,N);mh(l,{pending:!0,data:X,method:h.method,action:p},null,X)}}else typeof p=="function"&&(O.preventDefault(),X=new FormData(h,N),mh(l,{pending:!0,data:X,method:h.method,action:p},p,X))},currentTarget:h}]})}}for(var om=0;om<Rf.length;om++){var sm=Rf[om],mk=sm.toLowerCase(),pk=sm[0].toUpperCase()+sm.slice(1);ei(mk,"on"+pk)}ei(Zg,"onAnimationEnd"),ei(Jg,"onAnimationIteration"),ei(Wg,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(k6,"onTransitionRun"),ei(C6,"onTransitionStart"),ei(N6,"onTransitionCancel"),ei(e1,"onTransitionEnd"),Ue("onMouseEnter",["mouseout","mouseover"]),Ue("onMouseLeave",["mouseout","mouseover"]),Ue("onPointerEnter",["pointerout","pointerover"]),Ue("onPointerLeave",["pointerout","pointerover"]),Ne("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ne("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ne("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ne("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ne("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ne("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nc="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(" "),gk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nc));function N2(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var p=void 0;if(n)for(var N=c.length-1;0<=N;N--){var O=c[N],X=O.instance,ne=O.currentTarget;if(O=O.listener,X!==p&&h.isPropagationStopped())break e;p=O,h.currentTarget=ne;try{p(h)}catch(ce){Zc(ce)}h.currentTarget=null,p=X}else for(N=0;N<c.length;N++){if(O=c[N],X=O.instance,ne=O.currentTarget,O=O.listener,X!==p&&h.isPropagationStopped())break e;p=O,h.currentTarget=ne;try{p(h)}catch(ce){Zc(ce)}h.currentTarget=null,p=X}}}}function rt(t,n){var l=n[Gi];l===void 0&&(l=n[Gi]=new Set);var c=t+"__bubble";l.has(c)||(E2(n,t,2,!1),l.add(c))}function cm(t,n,l){var c=0;n&&(c|=4),E2(l,t,c,n)}var Ku="_reactListening"+Math.random().toString(36).slice(2);function um(t){if(!t[Ku]){t[Ku]=!0,me.forEach(function(l){l!=="selectionchange"&&(gk.has(l)||cm(l,!1,t),cm(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Ku]||(n[Ku]=!0,cm("selectionchange",!1,n))}}function E2(t,n,l,c){switch(gy(n)){case 2:var h=sC;break;case 8:h=cC;break;default:h=_m}l=h.bind(null,n,l,t),h=void 0,!wl||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),c?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,c,h){var p=c;if((n&1)===0&&(n&2)===0&&c!==null)e:for(;;){if(c===null)return;var N=c.tag;if(N===3||N===4){var O=c.stateNode.containerInfo;if(O===h)break;if(N===4)for(N=c.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===h)return;N=N.return}for(;O!==null;){if(N=ea(O),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){c=p=N;continue e}O=O.parentNode}}c=c.return}jl(function(){var ne=p,ce=bl(l),ge=[];e:{var ee=t1.get(t);if(ee!==void 0){var oe=Xc,_e=t;switch(t){case"keypress":if(Gc(l)===0)break e;case"keydown":case"keyup":oe=e6;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=q5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=r6;break;case Zg:case Jg:case Wg:oe=$5;break;case e1:oe=o6;break;case"scroll":case"scrollend":oe=H5;break;case"wheel":oe=c6;break;case"copy":case"cut":case"paste":oe=Y5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Rg;break;case"submit":oe=a6;break;case"toggle":case"beforetoggle":oe=d6}var Le=(n&4)!==0,tt=!Le&&(t==="scroll"||t==="scrollend"),te=Le?ee!==null?ee+"Capture":null:ee;Le=[];for(var Z=ne,le;Z!==null;){var pe=Z;if(le=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||le===null||te===null||(pe=Zi(Z,te),pe!=null&&Le.push(ac(Z,pe,le))),tt)break;Z=Z.return}0<Le.length&&(ee=new oe(ee,_e,null,l,ce),ge.push({event:ee,listeners:Le}))}}if((n&7)===0){e:{if(oe=t==="mouseover"||t==="pointerover",ee=t==="mouseout"||t==="pointerout",oe&&l!==xl&&(_e=l.relatedTarget||l.fromElement)&&(ea(_e)||_e[jn]))break e;(ee||oe)&&(_e=ce.window===ce?ce:(oe=ce.ownerDocument)?oe.defaultView||oe.parentWindow:window,ee?(oe=l.relatedTarget||l.toElement,ee=ne,oe=oe?ea(oe):null,oe!==null&&(tt=u(oe),Le=oe.tag,oe!==tt||Le!==5&&Le!==27&&Le!==6)&&(oe=null)):(ee=null,oe=ne),ee!==oe&&(Le=_g,pe="onMouseLeave",te="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(Le=Rg,pe="onPointerLeave",te="onPointerEnter",Z="pointer"),tt=ee==null?_e:se(ee),le=oe==null?_e:se(oe),_e=new Le(pe,Z+"leave",ee,l,ce),_e.target=tt,_e.relatedTarget=le,pe=null,ea(ce)===ne&&(Le=new Le(te,Z+"enter",oe,l,ce),Le.target=le,Le.relatedTarget=tt,pe=Le),tt=pe,Le=ee&&oe?A(ee,oe,vk):null,ee!==null&&T2(ge,_e,ee,Le,!1),oe!==null&&tt!==null&&T2(ge,tt,oe,Le,!0)))}e:{if(ee=ne?se(ne):window,oe=ee.nodeName&&ee.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ee.type==="file")var Oe=Hg;else if(Ig(ee))if(Ug)Oe=j6;else{Oe=x6;var dt=y6}else oe=ee.nodeName,!oe||oe.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?ne&&yl(ne.elementType)&&(Oe=Hg):Oe=b6;if(Oe&&(Oe=Oe(t,ne))){Pg(ge,Oe,l,ce);break e}dt&&dt(t,ee,ne)}switch(dt=ne?se(ne):window,t){case"focusin":(Ig(dt)||dt.contentEditable==="true")&&(xo=dt,Af=ne,Rs=null);break;case"focusout":Rs=Af=xo=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,Kg(ge,l,ce);break;case"selectionchange":if(S6)break;case"keydown":case"keyup":Kg(ge,l,ce)}var qe;if(kf)e:{switch(t){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else yo?Lg(t,l)&&(Xe="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Xe="onCompositionStart");Xe&&(Dg&&l.locale!=="ko"&&(yo||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&yo&&(qe=Tg()):(Mr=ce,xf="value"in Mr?Mr.value:Mr.textContent,yo=!0)),dt=Qu(ne,Xe),0<dt.length&&(Xe=new Mg(Xe,t,null,l,ce),ge.push({event:Xe,listeners:dt}),qe?Xe.data=qe:(qe=Bg(l),qe!==null&&(Xe.data=qe)))),(qe=h6?m6(t,l):p6(t,l))&&(Xe=Qu(ne,"onBeforeInput"),0<Xe.length&&(dt=new Mg("onBeforeInput","beforeinput",null,l,ce),ge.push({event:dt,listeners:Xe}),dt.data=qe)),hk(ge,t,ne,l,ce)}N2(ge,n)})}function ac(t,n,l){return{instance:t,listener:n,currentTarget:l}}function Qu(t,n){for(var l=n+"Capture",c=[];t!==null;){var h=t,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=Zi(t,l),h!=null&&c.unshift(ac(t,h,p)),h=Zi(t,n),h!=null&&c.push(ac(t,h,p))),t.tag===3)return c;t=t.return}return[]}function vk(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,c,h){for(var p=n._reactName,N=[];l!==null&&l!==c;){var O=l,X=O.alternate,ne=O.stateNode;if(O=O.tag,X!==null&&X===c)break;O!==5&&O!==26&&O!==27||ne===null||(X=ne,h?(ne=Zi(l,p),ne!=null&&N.unshift(ac(l,ne,X))):h||(ne=Zi(l,p),ne!=null&&N.push(ac(l,ne,X)))),l=l.return}N.length!==0&&t.push({event:n,listeners:N})}var yk=/\r\n?/g,xk=/\u0000|\uFFFD/g;function A2(t){return(typeof t=="string"?t:""+t).replace(yk,`
|
|
49
|
+
`).replace(xk,"")}function _2(t,n){return n=A2(n),A2(t)===n}function St(t,n,l,c,h,p){switch(l){case"children":if(typeof c=="string")n==="body"||n==="textarea"&&c===""||Fn(t,c);else if(typeof c=="number"||typeof c=="bigint")n!=="body"&&Fn(t,""+c);else return;break;case"className":ya(t,"class",c);break;case"tabIndex":ya(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ya(t,l,c);break;case"style":ba(t,c,p);return;case"data":if(n!=="object"){ya(t,"data",c);break}case"src":case"href":if(c===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=wn(c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="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 p=="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(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=wn(c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=Vn);return;case"onScroll":c!=null&&rt("scroll",t);return;case"onScrollEnd":c!=null&&rt("scrollend",t);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));(p!=null?p.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=wn(c),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":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":rt("beforetoggle",t),rt("toggle",t),It(t,"popover",c);break;case"xlinkActuate":Kt(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Kt(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Kt(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Kt(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Kt(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Kt(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":It(t,"is",c);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Ss.get(l)||l,It(t,l,c);else return}Ve=!0}function fm(t,n,l,c,h,p){switch(l){case"style":ba(t,c,p);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));(p!=null?p.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof c=="string")Fn(t,c);else if(typeof c=="number"||typeof c=="bigint")Fn(t,""+c);else return;break;case"onScroll":c!=null&&rt("scroll",t);return;case"onScrollEnd":c!=null&&rt("scrollend",t);return;case"onClick":c!=null&&(t.onclick=Vn);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"),p=l.slice(2,h?l.length-7:void 0),n=t[sn]||null,n=n!=null?n[l]:null,typeof n=="function"&&t.removeEventListener(p,n,h),typeof c=="function")){typeof n!="function"&&n!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(p,c,h);break e}Ve=!0,l in t?t[l]=c:c===!0?t.setAttribute(l,""):It(t,l,c)}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":rt("error",t),rt("load",t);var c=!1,h=!1,p;for(p in l)if(l.hasOwnProperty(p)){var N=l[p];if(N!=null)switch(p){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:St(t,n,p,N,l,null)}}h&&St(t,n,"srcSet",l.srcSet,l,null),c&&St(t,n,"src",l.src,l,null);return;case"input":rt("invalid",t);var O=p=N=h=null,X=null,ne=null;for(c in l)if(l.hasOwnProperty(c)){var ce=l[c];if(ce!=null)switch(c){case"name":h=ce;break;case"type":N=ce;break;case"checked":X=ce;break;case"defaultChecked":ne=ce;break;case"value":p=ce;break;case"defaultValue":O=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,n));break;default:St(t,n,c,ce,l,null)}}Ar(t,p,O,X,ne,N,h,!1);return;case"select":rt("invalid",t),c=N=p=null;for(h in l)if(l.hasOwnProperty(h)&&(O=l[h],O!=null))switch(h){case"value":p=O;break;case"defaultValue":N=O;break;case"multiple":c=O;default:St(t,n,h,O,l,null)}n=p,l=N,t.multiple=!!c,n!=null?ta(t,!!c,n,!1):l!=null&&ta(t,!!c,l,!0);return;case"textarea":rt("invalid",t),p=h=c=null;for(N in l)if(l.hasOwnProperty(N)&&(O=l[N],O!=null))switch(N){case"value":c=O;break;case"defaultValue":h=O;break;case"children":p=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:St(t,n,N,O,l,null)}xa(t,c,h,p);return;case"option":for(X in l)if(l.hasOwnProperty(X)&&(c=l[X],c!=null))switch(X){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:St(t,n,X,c,l,null)}return;case"dialog":rt("beforetoggle",t),rt("toggle",t),rt("cancel",t),rt("close",t);break;case"iframe":case"object":rt("load",t);break;case"video":case"audio":for(c=0;c<nc.length;c++)rt(nc[c],t);break;case"image":rt("error",t),rt("load",t);break;case"details":rt("toggle",t);break;case"embed":case"source":case"link":rt("error",t),rt("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(ne in l)if(l.hasOwnProperty(ne)&&(c=l[ne],c!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:St(t,n,ne,c,l,null)}return;default:if(yl(n)){for(ce in l)l.hasOwnProperty(ce)&&(c=l[ce],c!==void 0&&fm(t,n,ce,c,l,void 0));return}}for(O in l)l.hasOwnProperty(O)&&(c=l[O],c!=null&&St(t,n,O,c,l,null))}var bk={};function jk(t,n,l,c){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,N=null,O=null,X=null,ne=null,ce=null;for(oe in l){var ge=l[oe];if(l.hasOwnProperty(oe)&&ge!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=ge;default:c.hasOwnProperty(oe)||St(t,n,oe,null,c,ge)}}for(var ee in c){var oe=c[ee];if(ge=l[ee],c.hasOwnProperty(ee)&&(oe!=null||ge!=null))switch(ee){case"type":oe!==ge&&(Ve=!0),p=oe;break;case"name":oe!==ge&&(Ve=!0),h=oe;break;case"checked":oe!==ge&&(Ve=!0),ne=oe;break;case"defaultChecked":oe!==ge&&(Ve=!0),ce=oe;break;case"value":oe!==ge&&(Ve=!0),N=oe;break;case"defaultValue":oe!==ge&&(Ve=!0),O=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,n));break;default:oe!==ge&&St(t,n,ee,oe,c,ge)}}On(t,N,O,X,ne,ce,p,h);return;case"select":oe=N=O=ee=null;for(p in l)if(X=l[p],l.hasOwnProperty(p)&&X!=null)switch(p){case"value":break;case"multiple":oe=X;default:c.hasOwnProperty(p)||St(t,n,p,null,c,X)}for(h in c)if(p=c[h],X=l[h],c.hasOwnProperty(h)&&(p!=null||X!=null))switch(h){case"value":p!==X&&(Ve=!0),ee=p;break;case"defaultValue":p!==X&&(Ve=!0),O=p;break;case"multiple":p!==X&&(Ve=!0),N=p;default:p!==X&&St(t,n,h,p,c,X)}n=O,l=N,c=oe,ee!=null?ta(t,!!l,ee,!1):!!c!=!!l&&(n!=null?ta(t,!!l,n,!0):ta(t,!!l,l?[]:"",!1));return;case"textarea":oe=ee=null;for(O in l)if(h=l[O],l.hasOwnProperty(O)&&h!=null&&!c.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:St(t,n,O,null,c,h)}for(N in c)if(h=c[N],p=l[N],c.hasOwnProperty(N)&&(h!=null||p!=null))switch(N){case"value":h!==p&&(Ve=!0),ee=h;break;case"defaultValue":h!==p&&(Ve=!0),oe=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==p&&St(t,n,N,h,c,p)}vo(t,ee,oe);return;case"option":for(var _e in l)if(ee=l[_e],l.hasOwnProperty(_e)&&ee!=null&&!c.hasOwnProperty(_e))switch(_e){case"selected":t.selected=!1;break;default:St(t,n,_e,null,c,ee)}for(X in c)if(ee=c[X],oe=l[X],c.hasOwnProperty(X)&&ee!==oe&&(ee!=null||oe!=null))switch(X){case"selected":ee!==oe&&(Ve=!0),t.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:St(t,n,X,ee,c,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)ee=l[Le],l.hasOwnProperty(Le)&&ee!=null&&!c.hasOwnProperty(Le)&&St(t,n,Le,null,c,ee);for(ne in c)if(ee=c[ne],oe=l[ne],c.hasOwnProperty(ne)&&ee!==oe&&(ee!=null||oe!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,n));break;default:St(t,n,ne,ee,c,oe)}return;default:if(yl(n)){for(var tt in l)ee=l[tt],l.hasOwnProperty(tt)&&ee!==void 0&&!c.hasOwnProperty(tt)&&fm(t,n,tt,void 0,c,ee);for(ce in c)ee=c[ce],oe=l[ce],!c.hasOwnProperty(ce)||ee===oe||ee===void 0&&oe===void 0||fm(t,n,ce,ee,c,oe);return}}for(var te in l)ee=l[te],l.hasOwnProperty(te)&&ee!=null&&!c.hasOwnProperty(te)&&St(t,n,te,null,c,ee);for(ge in c)ee=c[ge],oe=l[ge],!c.hasOwnProperty(ge)||ee===oe||ee==null&&oe==null||St(t,n,ge,ee,c,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 wk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var h=l[c],p=h.transferSize,N=h.initiatorType,O=h.duration;if(p&&O&&M2(N)){for(N=0,O=h.responseEnd,c+=1;c<l.length;c++){var X=l[c],ne=X.startTime;if(ne>O)break;var ce=X.transferSize,ge=X.initiatorType;ce&&M2(ge)&&(X=X.responseEnd,N+=ce*(X<O?1:(O-ne)/(X-ne)))}if(--c,n+=8*(p+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 ic(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,c){return l=ic(l).createElement(t),l[Rt]=c,l[sn]=n,Tn(l,t,n),B(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 Sk(){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,kk=typeof clearTimeout=="function"?clearTimeout:void 0,z2=typeof Promise=="function"?Promise:void 0,L2=typeof requestAnimationFrame=="function"?requestAnimationFrame:vm,Ck=typeof queueMicrotask=="function"?queueMicrotask:typeof z2<"u"?function(t){return z2.resolve(null).then(t).catch(Nk)}:vm;function Nk(t){setTimeout(function(){throw t})}function Zr(t){return t==="head"}function B2(t,n){var l=n,c=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(c===0){t.removeChild(h),Jo(n);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Cm(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Cm(l);for(var p=l.firstChild;p;){var N=p.nextSibling,O=p.nodeName;p[Yi]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=N}}else l==="body"&&Cm(t.ownerDocument.body);l=h}while(l);Jo(n)}function I2(t,n){var l=t;t=0;do{var c=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||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=c}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 c=1;else for(var h=c=0;h<n.length;h++){var p=n[h];0<p.width&&0<p.height&&c++}c===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 Ek(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 Ek(n,l,t)}function Tk(t){return t.documentElement.clientHeight}function Ak(t){this.addEventListener("load",t),this.addEventListener("error",t)}function _k(t,n,l,c,h,p,N,O,X){var ne=n.nodeType===9?n:n.ownerDocument;try{var ce=ne.startViewTransition({update:function(){var ee=ne.defaultView,oe=ee.navigation&&ee.navigation.transition,_e=ne.fonts.status;c();var Le=[];if(_e==="loaded"&&(Tk(ne),ne.fonts.status==="loading"&&Le.push(ne.fonts.ready)),_e=Le.length,t!==null)for(var tt=t.suspenseyImages,te=0,Z=0;Z<tt.length;Z++){var le=tt[Z];if(!le.complete){var pe=le.getBoundingClientRect();if(0<pe.bottom&&0<pe.right&&pe.top<ee.innerHeight&&pe.left<ee.innerWidth){if(te+=oy(le),te>Wu){Le.length=_e;break}le=new Promise(Ak.bind(le)),Le.push(le)}}}if(0<Le.length)return ee=Promise.race([Promise.all(Le),new Promise(function(Oe){return setTimeout(Oe,500)})]).then(h,h),(oe?Promise.allSettled([oe.finished,ee]):ee).then(p,p);if(h(),oe)return oe.finished.then(p,p);p()},types:l});ne.__reactViewTransition=ce;var ge=[];return ce.ready.then(function(){for(var ee=ne.documentElement.getAnimations({subtree:!0}),oe=0;oe<ee.length;oe++){var _e=ee[oe],Le=_e.effect,tt=Le.pseudoElement;if(tt!=null&&tt.startsWith("::view-transition")){ge.push(_e),_e=Le.getKeyframes();for(var te=tt=void 0,Z=!0,le=0;le<_e.length;le++){var pe=_e[le],Oe=pe.width;if(tt===void 0)tt=Oe;else if(tt!==Oe){Z=!1;break}if(Oe=pe.height,te===void 0)te=Oe;else if(te!==Oe){Z=!1;break}delete pe.width,delete pe.height,pe.transform==="none"&&delete pe.transform}Z&&tt!==void 0&&te!==void 0&&(Le.setKeyframes(_e),Z=getComputedStyle(Le.target,Le.pseudoElement),Z.width!==tt||Z.height!==te)&&(Z=_e[0],Z.width=tt,Z.height=te,Z=_e[_e.length-1],Z.width=tt,Z.height=te,Le.setKeyframes(_e))}}N()},function(ee){ne.__reactViewTransition===ce&&(ne.__reactViewTransition=null);try{if(typeof ee=="object"&&ee!==null)switch(ee.name){case"InvalidStateError":(ee.message==="View transition was skipped because document visibility state is hidden."||ee.message==="Skipping view transition because document visibility state has become hidden."||ee.message==="Skipping view transition because viewport size changed."||ee.message==="Transition was aborted because of invalid state")&&(ee=null)}ee!==null&&X(ee)}finally{c(),h(),N()}}),ce.finished.finally(function(){for(var ee=0;ee<ge.length;ee++)ge[ee].cancel();ne.__reactViewTransition===ce&&(ne.__reactViewTransition=null),O()}),ce}catch{return c(),h(),N(),null}}function ql(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}ql.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:H({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},ql.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,l=t.getAnimations({subtree:!0}),c=[],h=0;h<l.length;h++){var p=l[h].effect;p!==null&&p.target===t&&p.pseudoElement===n&&c.push(l[h])}return c},ql.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function U2(t){return{name:t,group:new ql("group",t),imagePair:new ql("image-pair",t),old:new ql("old",t),new:new ql("new",t)}}function Ta(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ta.prototype.addEventListener=function(t,n,l){var c=null,h=null;if(!(l!=null&&typeof l!="boolean"&&(c=l.signal||null,c!==null&&c.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var p=this._eventListeners;if(F2(p,t,n,l)===-1){var N=this,O=n;l!=null&&typeof l!="boolean"&&l.once===!0&&(O=function(X){N.removeEventListener(t,n,l),typeof n=="function"?n.call(this,X):n.handleEvent(X)}),c!==null&&(h=N.removeEventListener.bind(N,t,n,l),c.addEventListener("abort",h,{once:!0}),h=c.removeEventListener.bind(c,"abort",h)),c=Go(l),p.push({type:t,listener:n,optionsOrUseCapture:l,attachedListener:O,cleanup:h}),g(this._fragmentFiber.child,!1,Mk,t,O,c)}this._eventListeners=p}};function Mk(t,n,l,c){return C(t).addEventListener(n,l,c),!1}Ta.prototype.removeEventListener=function(t,n,l){var c=this._eventListeners;if(c!==null&&(n=F2(c,t,n,l),n!==-1)){var h=c[n];l=h.attachedListener;var p=h.cleanup;h=Go(h.optionsOrUseCapture),g(this._fragmentFiber.child,!1,Rk,t,l,h),c.splice(n,1),p!==null&&p()}};function Rk(t,n,l,c){return C(t).removeEventListener(n,l,c),!1}function Go(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,c){if(t.length===0)return-1;c=q2(c);for(var h=0;h<t.length;h++){var p=t[h];if(p.type===n&&p.listener===l&&q2(p.optionsOrUseCapture)===c)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 c=n.nodeType===9?n.createComment(""):document.createTextNode("");if(l)for(var h=0;h<l.length;h++){var p=l[h];c.addEventListener(p.type,p.attachedListener,Go(p.optionsOrUseCapture))}if(n.appendChild(c),t=c.dispatchEvent(t),l)for(h=0;h<l.length;h++)p=l[h],c.removeEventListener(p.type,p.attachedListener,Go(p.optionsOrUseCapture));return n.removeChild(c),t}return n.dispatchEvent(t)},Ta.prototype.focus=function(t){g(this._fragmentFiber.child,!0,V2,t,void 0,void 0)};function V2(t,n){return t.tag===6?!1:(t=C(t),Vk(t,n))}Ta.prototype.focusLast=function(t){var n=[];g(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=ic(t).activeElement,t!==null&&g(this._fragmentFiber.child,!1,Dk,t,void 0,void 0))};function Dk(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),g(this._fragmentFiber.child,!1,Ok,t,void 0,void 0)};function Ok(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),g(this._fragmentFiber.child,!1,zk,t,void 0,void 0);for(var l=n=0;l<ri.length;l++){var c=ri[l];c.fragmentInstance===this&&c.observer===t?t.unobserve(c.instance):ri[n++]=c}ri.length=n}};function zk(t,n){return t.tag===6||(t=C(t),n.unobserve(t)),!1}var ri=[],bm=!1;function Lk(t,n,l){ri.push({fragmentInstance:t,observer:n,instance:l}),bm||(bm=!0,$k(function(){bm=!1;var c=ri;ri=[];for(var h=0;h<c.length;h++){var p=c[h];p.observer.unobserve(p.instance)}}))}Ta.prototype.getClientRects=function(){var t=[];return g(this._fragmentFiber.child,!1,Bk,t,void 0,void 0),t};function Bk(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=[];g(this._fragmentFiber.child,!1,xm,l,void 0,void 0);var c=C(n);if(l.length===0){if(l=c,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=c=l.compareDocumentPosition(t);return l===t?h=Node.DOCUMENT_POSITION_CONTAINS:c&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=w(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 p=j(this._fragmentFiber)?n.parentElement:c;if(p==null)return Node.DOCUMENT_POSITION_DISCONNECTED;c=p.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,p=p.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),O=h.compareDocumentPosition(t),X=N&Node.DOCUMENT_POSITION_CONTAINED_BY||O&Node.DOCUMENT_POSITION_CONTAINED_BY;return O=c&&p&&N&Node.DOCUMENT_POSITION_FOLLOWING&&O&Node.DOCUMENT_POSITION_PRECEDING,n=c&&n===t||p&&h===t||X||O?Node.DOCUMENT_POSITION_CONTAINED_BY:!c&&n===t||!p&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Ik(n,this._fragmentFiber,l[0],l[l.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Ik(t,n,l,c,h){var p=ea(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!p)e:{for(;p!==null;){if(p.tag===7&&(p===n||p.alternate===n)){l=!0;break e}p=p.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(p===null)return p=h.ownerDocument,h===p||h===p.documentElement||h===p.body;e:{for(p=n,n=b(n);p!==null;){if(!(p.tag!==5&&p.tag!==3&&p.tag!==27||p!==n&&p.alternate!==n)){p=!0;break e}p=p.return}p=!1}return p}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!p)&&!(n=p===l)&&(n=A(l,p,D),n===null?n=!1:(g(n,!0,E,p,l),p=T,T=null,n=p!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!p)&&!(n=p===c)&&(n=A(c,p,D),n===null?n=!1:(g(n,!0,R,p,c),p=T,M=T=null,n=p!==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=[];g(this._fragmentFiber.child,!1,xm,n,void 0,void 0);var l=t!==!1;if(n.length===0){var c=w(this._fragmentFiber);if(c=l?c[1]||c[0]||b(this._fragmentFiber):c[0]||c[1],c===null)return;if(c.tag===6){t=C(c),$2(t,l);return}if(c=C(c),c.nodeType!==9){if(c.nodeType===11){l="host"in c?c.host:null,l!==null&&l.scrollIntoView(t);return}c.scrollIntoView(t)}}for(c=l?n.length-1:0;c!==(l?-1:n.length);){var h=n[c];h.tag===6?(h=C(h),$2(h,l)):C(h).scrollIntoView(t),c+=l?-1:1}};function Pk(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 c=0;c<l.length;c++){var h=l[c];t.addEventListener(h.type,h.attachedListener,Go(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(p){for(var N=0,O=0;O<ri.length;O++){var X=ri[O];(X.fragmentInstance!==n||X.observer!==p||X.instance!==t)&&(ri[N++]=X)}ri.length=N,p.observe(t)}),G2(t,n))}function Hk(t,n){var l=n._eventListeners;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c];t.removeEventListener(h.type,h.attachedListener,Go(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(p){typeof p.rootMargin=="string"?Lk(n,p,t):p.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 Uk(t,n,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Yi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==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(p=t.getAttribute("src"),(p!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var p=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=Ua(t.nextSibling),t===null)break}return null}function qk(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ua(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=Ua(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 Fk(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var c=function(){n(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Ua(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 Ua(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 Vk(t,n){function l(){c=!0}if(t.ownerDocument.activeElement===t)return!0;var c=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return c}function $k(t){L2(function(){L2(function(n){return t(n)})})}function Z2(t,n,l){switch(n=ic(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 c in l){var h=l[c];l.hasOwnProperty(c)&&h!=null&&St(t,n,c,null,bk,h)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Vn&&(t.onclick=null),Ki(t)}function Cm(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ki(t)}var qa=new Map,W2=new Set;function rc(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=Q.d;Q.d={f:Gk,r:Yk,D:Xk,C:Kk,L:Qk,m:Zk,X:Wk,S:Jk,M:eC};function Gk(){var t=cr.f(),n=Vu();return t||n}function Yk(t){var n=vi(t);n!==null&&n.tag===5&&n.type==="form"?tv(n):cr.r(t)}var Yo=typeof document>"u"?null:document;function ey(t,n,l){var c=Yo;if(c&&typeof n=="string"&&n){var h=Dt(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},c.querySelector(h)===null&&(n=c.createElement("link"),Tn(n,"link",t),B(n),c.head.appendChild(n)))}}function Xk(t){cr.D(t),ey("dns-prefetch",t,null)}function Kk(t,n){cr.C(t,n),ey("preconnect",t,n)}function Qk(t,n,l){cr.L(t,n,l);var c=Yo;if(c&&t&&n){var h='link[rel="preload"][as="'+Dt(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Dt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Dt(l.imageSizes)+'"]')):h+='[href="'+Dt(t)+'"]';var p=h;switch(n){case"style":p=Xo(t);break;case"script":p=Ko(t)}if(!(qa.has(p)||(t=H({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),qa.set(p,t),c.querySelector(h)!==null||n==="style"&&c.querySelector(lc(p))||n==="script"&&c.querySelector(oc(p))))){var N=c.createElement("link");Tn(N,"link",t),n==="style"&&(N[Xi]=!0,N.onload=N.onerror=function(){re(N)}),B(N),c.head.appendChild(N)}}}function Zk(t,n){cr.m(t,n);var l=Yo;if(l&&t){var c=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Dt(c)+'"][href="'+Dt(t)+'"]',p=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Ko(t)}if(!qa.has(p)&&(t=H({rel:"modulepreload",href:t},n),qa.set(p,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(oc(p)))return}c=l.createElement("link"),Tn(c,"link",t),B(c),l.head.appendChild(c)}}}function Jk(t,n,l){cr.S(t,n,l);var c=Yo;if(c&&t){var h=ve(c).hoistableStyles,p=Xo(t);n=n||"default";var N=h.get(p);if(!N){var O={loading:0,preload:null};if(N=c.querySelector(lc(p)))O.loading=5;else{t=H({rel:"stylesheet",href:t,"data-precedence":n},l),(l=qa.get(p))&&Nm(t,l);var X=N=c.createElement("link");B(X),Tn(X,"link",t),X._p=new Promise(function(ne,ce){X.onload=ne,X.onerror=ce}),X.addEventListener("load",function(){O.loading|=1}),X.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Zu(N,n,c)}N={type:"stylesheet",instance:N,count:1,state:O},h.set(p,N)}}}function Wk(t,n){cr.X(t,n);var l=Yo;if(l&&t){var c=ve(l).hoistableScripts,h=Ko(t),p=c.get(h);p||(p=l.querySelector(oc(h)),p||(t=H({src:t,async:!0},n),(n=qa.get(h))&&Em(t,n),p=l.createElement("script"),B(p),Tn(p,"link",t),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function eC(t,n){cr.M(t,n);var l=Yo;if(l&&t){var c=ve(l).hoistableScripts,h=Ko(t),p=c.get(h);p||(p=l.querySelector(oc(h)),p||(t=H({src:t,async:!0,type:"module"},n),(n=qa.get(h))&&Em(t,n),p=l.createElement("script"),B(p),Tn(p,"link",t),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function ty(t,n,l,c){var h=(h=xn.current)?rc(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=Xo(l.href),n=ve(h).hoistableStyles,c=n.get(l),c||(c={type:"style",instance:null,count:0,state:null},n.set(l,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Xo(l.href);var p=ve(h).hoistableStyles,N=p.get(t);if(N||(h=h.ownerDocument||h,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,N),(p=h.querySelector(lc(t)))?p._p||(N.instance=p,N.state.loading=5):(p=qa.get(t),p||(p={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},qa.set(t,p)),tC(h,t,p,N.state))),n&&c===null)throw Error(r(528,""));return N}if(n&&c!==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=Ko(l),n=ve(h).hoistableScripts,c=n.get(l),c||(c={type:"script",instance:null,count:0,state:null},n.set(l,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Xo(t){return'href="'+Dt(t)+'"'}function lc(t){return'link[rel="stylesheet"]['+t+"]"}function ny(t){return H({},t,{"data-precedence":t.precedence,precedence:null})}function tC(t,n,l,c){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Xi]!==!0){c.loading=1;return}}else n=t.createElement("link"),n[Xi]=!0,n.onload=n.onerror=re.bind(null,n),Tn(n,"link",l),B(n),t.head.appendChild(n);c.preload=n,n.addEventListener("load",function(){return c.loading|=1}),n.addEventListener("error",function(){return c.loading|=2})}function Ko(t){return'[src="'+Dt(t)+'"]'}function oc(t){return"script[async]"+t}function ay(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var c=t.querySelector('style[data-href~="'+Dt(l.href)+'"]');if(c)return n.instance=c,B(c),c;var h=H({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),B(c),Tn(c,"style",h),Zu(c,l.precedence,t),n.instance=c;case"stylesheet":h=Xo(l.href);var p=t.querySelector(lc(h));if(p)return n.state.loading|=4,n.instance=p,B(p),p;c=ny(l),(h=qa.get(h))&&Nm(c,h),p=(t.ownerDocument||t).createElement("link"),B(p);var N=p;return N._p=new Promise(function(O,X){N.onload=O,N.onerror=X}),Tn(p,"link",c),n.state.loading|=4,Zu(p,l.precedence,t),n.instance=p;case"script":return p=Ko(l.src),(h=t.querySelector(oc(p)))?(n.instance=h,B(h),h):(c=l,(h=qa.get(p))&&(c=H({},l),Em(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),B(h),Tn(h,"link",c),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&&(c=n.instance,n.state.loading|=4,Zu(c,l.precedence,t));return n.instance}function Zu(t,n,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,p=h,N=0;N<c.length;N++){var O=c[N];if(O.dataset.precedence===n)p=O;else if(p!==h)break}p?p.parentNode.insertBefore(t,p.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 Ju=null;function iy(t,n,l){if(Ju===null){var c=new Map,h=Ju=new Map;h.set(l,c)}else h=Ju,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var p=l[h];if(!(p[Yi]||p[Rt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var N=p.getAttribute(n)||"";N=t+N;var O=c.get(N);O?O.push(p):c.set(N,[p])}}return c}function Tm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function nC(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=rC.bind(t),n.decode().then(t,t))}function aC(t,n,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Xo(c.href),p=n.querySelector(lc(h));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=sc.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=p,B(p);return}p=n.ownerDocument||n,c=ny(c),(h=qa.get(h))&&Nm(c,h),p=p.createElement("link"),B(p);var N=p;N._p=new Promise(function(O,X){N.onload=O,N.onerror=X}),Tn(p,"link",c),l.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=sc.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var Wu=0;function iC(t,n){return t.stylesheets&&t.count===0&&td(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var c=setTimeout(function(){if(t.stylesheets&&td(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+n);0<t.imgBytes&&Wu===0&&(Wu=62500*wk());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&td(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Wu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function cy(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)td(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function sc(){this.count--,cy(this)}function rC(){this.imgCount--,cy(this)}var ed=null;function td(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ed=new Map,n.forEach(lC,t),ed=null,sc.call(t))}function lC(t,n){if(!(n.state.loading&4)){var l=ed.get(t);if(l)var c=l.get(null);else{l=new Map,ed.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var N=h[p];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),c=N)}c&&l.set(null,c)}h=n.instance,N=h.getAttribute("data-precedence"),p=l.get(N)||c,p===c&&l.set(null,h),l.set(N,h),this.count++,c=sc.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),p?p.parentNode.insertBefore(h,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Qo={$$typeof:$,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function oC(t,n,l,c,h,p,N,O,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=Nr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nr(0),this.hiddenUpdates=Nr(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function uy(t,n,l,c,h,p,N,O,X,ne,ce,ge){return t=new oC(t,n,l,N,X,ne,ce,ge,O),n=1,p===!0&&(n|=24),p=na(3,null,null,n),t.current=p,p.stateNode=t,n=Ff(),n.refCount++,t.pooledCache=n,n.refCount++,p.memoizedState={element:c,isDehydrated:l,cache:n},Yf(p),t}function dy(t){return t?(t=wo,t):wo}function fy(t,n,l,c,h,p){h=dy(h),c.context===null?c.context=h:c.pendingContext=h,c=Pr(n),c.payload={element:l},p=p===void 0?null:p,p!==null&&(c.callback=p),l=Hr(t,c,n),l!==null&&(la(l,t,n),Ps(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=Cl(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=Cl(t,n);l!==null&&la(l,t,n),Am(t,n)}}var Zo=!0;function sC(t,n,l,c){var h=ye.T;ye.T=null;var p=Q.p;try{Q.p=2,_m(t,n,l,c)}finally{Q.p=p,ye.T=h}}function cC(t,n,l,c){var h=ye.T;ye.T=null;var p=Q.p;try{Q.p=8,_m(t,n,l,c)}finally{Q.p=p,ye.T=h}}function _m(t,n,l,c){if(Zo){var h=Mm(c);if(h===null)dm(t,n,c,nd,l),vy(t,c);else if(dC(h,t,n,l,c))c.stopPropagation();else if(vy(t,c),n&4&&-1<uC.indexOf(t)){for(;h!==null;){var p=vi(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var N=Za(p.pendingLanes);if(N!==0){var O=p;for(O.pendingLanes|=2,O.entangledLanes|=2;N;){var X=1<<31-Vt(N);O.entanglements[1]|=X,N&=~X}Ei(p),(yt&6)===0&&(Uu=Yt()+500,tc(0))}}break;case 31:case 13:O=Cl(p,2),O!==null&&la(O,p,2),Vu(),Am(p,2)}if(p=Mm(c),p===null&&dm(t,n,c,nd,l),p===h)break;h=p}h!==null&&c.stopPropagation()}else dm(t,n,c,null,l)}}function Mm(t){return t=bl(t),Rm(t)}var nd=null;function Rm(t){if(nd=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 nd=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(pl()){case di:return 2;case fi:return 8;case bn:case ha:return 32;case gl:return 268435456;default:return 32}default:return 32}}var Dm=!1,Jr=null,Wr=null,el=null,cc=new Map,uc=new Map,tl=[],uC="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":Jr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":el=null;break;case"pointerover":case"pointerout":cc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":uc.delete(n.pointerId)}}function dc(t,n,l,c,h,p){return t===null||t.nativeEvent!==p?(t={blockedOn:n,domEventName:l,eventSystemFlags:c,nativeEvent:p,targetContainers:[h]},n!==null&&(n=vi(n),n!==null&&my(n)),t):(t.eventSystemFlags|=c,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function dC(t,n,l,c,h){switch(n){case"focusin":return Jr=dc(Jr,t,n,l,c,h),!0;case"dragenter":return Wr=dc(Wr,t,n,l,c,h),!0;case"mouseover":return el=dc(el,t,n,l,c,h),!0;case"pointerover":var p=h.pointerId;return cc.set(p,dc(cc.get(p)||null,t,n,l,c,h)),!0;case"gotpointercapture":return p=h.pointerId,uc.set(p,dc(uc.get(p)||null,t,n,l,c,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 ad(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 c=new l.constructor(l.type,l);xl=c,l.target.dispatchEvent(c),xl=null}else return n=vi(l),n!==null&&my(n),t.blockedOn=l,!1;n.shift()}return!0}function xy(t,n,l){ad(t)&&l.delete(n)}function fC(){Dm=!1,Jr!==null&&ad(Jr)&&(Jr=null),Wr!==null&&ad(Wr)&&(Wr=null),el!==null&&ad(el)&&(el=null),cc.forEach(xy),uc.forEach(xy)}function id(t,n){t.blockedOn===n&&(t.blockedOn=null,Dm||(Dm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fC)))}var rd=null;function by(t){rd!==t&&(rd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){rd===t&&(rd=null);for(var n=0;n<t.length;n+=3){var l=t[n],c=t[n+1],h=t[n+2];if(typeof c!="function"){if(Rm(c||l)===null)continue;break}var p=vi(l);p!==null&&(t.splice(n,3),n-=3,mh(p,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Jo(t){function n(X){return id(X,t)}Jr!==null&&id(Jr,t),Wr!==null&&id(Wr,t),el!==null&&id(el,t),cc.forEach(n),uc.forEach(n);for(var l=0;l<tl.length;l++){var c=tl[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<tl.length&&(l=tl[0],l.blockedOn===null);)yy(l),l.blockedOn===null&&tl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],p=l[c+1],N=h[sn]||null;if(typeof p=="function")N||by(l);else if(N){var O=null;if(p&&p.hasAttribute("formAction")){if(h=p,N=p[sn]||null)O=N.formAction;else if(Rm(h)!==null)continue}else O=N.action;typeof O=="function"?l[c+1]=O:(l.splice(c,3),c-=3),by(l)}}}function jy(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(N){return h=N})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function Om(t){this._internalRoot=t}ld.prototype.render=Om.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,c=Ea();fy(l,c,t,n,null,null)},ld.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),Vu(),n[jn]=null}};function ld(t){this._internalRoot=t}ld.prototype.unstable_scheduleHydration=function(t){if(t){var n=Wn();t={blockedOn:null,target:t,priority:n};for(var l=0;l<tl.length&&n!==0&&n<tl[l].priority;l++);tl.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"));Q.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 hC={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{Xa=od.inject(hC),fn=od}catch{}}return mc.createRoot=function(t,n){if(!s(t))throw Error(r(299));var l=!1,c="",h=dv,p=fv,N=hv;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=uy(t,1,!1,null,null,l,c,null,h,p,N,jy),t[jn]=n.current,um(t),new Om(n)},mc.hydrateRoot=function(t,n,l){if(!s(t))throw Error(r(299));var c=!1,h="",p=dv,N=fv,O=hv,X=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(O=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),n=uy(t,1,!0,n,l??null,c,h,X,p,N,O,jy),n.context=dy(null),l=n.current,c=Ea(),c=on(c),h=Pr(c),h.callback=null,Hr(l,h,c),l=c,n.current.lanes=l,Ja(n,l),Ei(n),t[jn]=n.current,um(t),new ld(n)},mc.version="19.3.0",mc}var zy;function NC(){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=CC(),Im.exports}var EC=NC();const TC={"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.fileTooLarge":"Attachments can't be larger than {limit}.","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.resetCustom":"A custom provider has no default models to reset to.","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"},AC={"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.reset":"Reset models","editor.resetTitle":"Reset the models to the defaults?","editor.resetModels":{one:"{count} model will be restored to its defaults.",other:"{count} models will be restored to their defaults."},"editor.resetRemoves":{one:"{count} model not in the defaults will be removed: {names}.",other:"{count} models not in the defaults will be removed: {names}."},"editor.resetBots":{one:"{bots} uses a model that will be removed and will need to pick another.",other:"{bots} use models that will be removed and will need to pick others."},"editor.resetKeeps":"The API URL and protocol will be restored to the defaults. Sign-in details and the API key are kept. Unsaved changes will be discarded.","editor.resetConfirm":"Reset","editor.resetDone":"Models reset to the defaults","editor.resetFailed":"Couldn't reset","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"},_C={"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 {limit}.","composer.pasted":"pasted-image","composer.removeFile":"Remove attachment: {name}","composer.uploading":"Uploading: {name}","composer.cancelUpload":"Cancel upload: {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."},MC={"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"},RC={"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}"},DC={"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}"},OC={"environment.title":"Work environment","environment.own":"Docker sandbox","environment.container":"Container","environment.image":"Image","environment.mount":"Workspace mount","environment.external":"External environments","environment.accessFailed":"Couldn't change access","environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Failed to start","environment.state.unavailable":"Unavailable","environment.unavailable":"Docker not detected. Install and start Docker, then restart 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 will be closed. Installed software and workspace files are kept.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in the sandbox will be removed. Workspace files are kept.","environment.resetConfirm":"Reset"},zC={"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"},LC={"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:"Granted to {count} Bot",other:"Granted to {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."},BC={"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.description":"Description","machines.descriptionPlaceholder":"Purpose, installed software, things to note","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":"Using {name}","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}"},IC={"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."},PC={...TC,...AC,..._C,...MC,...RC,...DC,...OC,...zC,...LC,...BC,...IC},HC={"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.fileTooLarge":"附件不能超过 {limit}。","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.resetCustom":"自定义 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 信息"},UC={"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.reset":"重置模型","editor.resetTitle":"将模型重置为系统默认?","editor.resetModels":{one:"{count} 个模型将恢复为系统默认设置。",other:"{count} 个模型将恢复为系统默认设置。"},"editor.resetRemoves":{one:"{count} 个不在系统默认中的模型将被移除:{names}。",other:"{count} 个不在系统默认中的模型将被移除:{names}。"},"editor.resetBots":{one:"{bots} 正在使用将被移除的模型,重置后需要重新选择模型。",other:"{bots} 正在使用将被移除的模型,重置后需要重新选择模型。"},"editor.resetKeeps":"API URL 和协议将恢复默认,登录信息和 API Key 会保留。未保存的修改将被丢弃。","editor.resetConfirm":"重置","editor.resetDone":"已重置为系统默认","editor.resetFailed":"重置失败","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 列表"},qC={"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":"附件不能为空,也不能超过 {limit}。","composer.pasted":"粘贴图片","composer.removeFile":"移除附件:{name}","composer.uploading":"正在上传:{name}","composer.cancelUpload":"取消上传:{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":"下载后用播放器打开。"},FC={"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":"回复线程"},VC={"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}"},$C={"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}"},GC={"environment.title":"工作环境","environment.own":"Docker 沙箱","environment.container":"容器","environment.image":"镜像","environment.mount":"工作区挂载点","environment.external":"外部环境","environment.accessFailed":"无法更改访问权限","environment.state.preparing":"准备中","environment.state.running":"运行中","environment.state.stopped":"已停止","environment.state.failed":"启动失败","environment.state.unavailable":"不可用","environment.unavailable":"未检测到 Docker。安装并启动 Docker 后,请重启 Jarvy。","environment.start":"启动","environment.starting":"正在启动…","environment.stop":"停止","environment.stopping":"正在停止…","environment.stopTitle":"停止 {name} 的沙箱?","environment.stopBody":"沙箱中运行的程序将被关闭,已安装的软件和工作区文件会保留。","environment.stopConfirm":"停止","environment.reset":"重置…","environment.resetTitle":"重置 {name} 的沙箱?","environment.resetBody":"沙箱中安装的软件将被清除,工作区文件会保留。","environment.resetConfirm":"重置"},YC={"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"},XC={"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 无法解密,请在「设置 › 模型」中重新输入。"},KC={"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.description":"描述","machines.descriptionPlaceholder":"用途、已安装的软件、注意事项","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}","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}"},QC={"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":"给任务起个名字,写上要做什么。"},ZC={...HC,...UC,...qC,...FC,...VC,...$C,...GC,...YC,...XC,...KC,...QC},Jb=["en","zh"],Wb={en:PC,zh:ZC},Rc={en:"en",zh:"zh-CN"},ej="jarvy-locale";function JC(){var i;const e=localStorage.getItem(ej);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 zi=JC();document.documentElement.lang=Rc[zi];const Ap=new Set,to=()=>zi;function tj(e){if(e!==zi){zi=e,localStorage.setItem(ej,e),document.documentElement.lang=Rc[e];for(const a of Ap)a()}}function nj(){return S.useSyncExternalStore(e=>(Ap.add(e),()=>{Ap.delete(e)}),to)}const _p=(e,a)=>Wb[e][a==="name"?"locale.name":"locale.short"];function aj(e,a){const i=Wb[zi][e];return typeof i=="string"?i:new Intl.PluralRules(Rc[zi]).select(Number(a))==="one"?i.one:i.other}function x(e,a){const i=aj(e,a==null?void 0:a.count);return a?i.replace(/\{(\w+)\}/g,(r,s)=>s in a?String(a[s]):r):i}const ua=(e,a)=>new Date(e).toLocaleString(Rc[zi],a),no=e=>ua(e,{hour:zi==="zh"?"2-digit":"numeric",minute:"2-digit"}),y0=e=>{const a=new Date(e).getFullYear()===new Date().getFullYear();return ua(e,{year:a?void 0:"numeric",month:zi==="zh"?"numeric":"short",day:"numeric"})},Li=(e,a)=>new Intl.NumberFormat(Rc[zi],a).format(e);function x0(e,a){return aj(e,a.count).split(/\{(\w+)\}/).map((i,r)=>o.jsx(S.Fragment,{children:r%2?a[i]??`{${i}}`:i},r))}class hr extends Error{constructor(a,i,r,s){super(i),this.status=a,this.code=r,this.params=s}}async function we(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 ij(i.status,r);return r}const ij=(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 WC(e,a,i,r){return new Promise((s,u)=>{const d=new XMLHttpRequest;if(r!=null&&r.aborted){u(new DOMException("Upload cancelled","AbortError"));return}r==null||r.addEventListener("abort",()=>d.abort(),{once:!0}),d.onabort=()=>u(new DOMException("Upload cancelled","AbortError")),d.open("POST",`/api/chats/${e}/attachments`),d.setRequestHeader("Content-Type",a.type||"application/octet-stream"),d.setRequestHeader("X-File-Name",encodeURIComponent(a.name)),d.upload.onprogress=f=>{f.lengthComputable&&(i==null||i(f.loaded/f.total))},d.onerror=()=>u(new Error(x("api.offline"))),d.onload=()=>{let f={};try{f=JSON.parse(d.responseText)}catch{}d.status>=200&&d.status<300?s(f):u(ij(d.status,f))},d.send(a)})}async function e8(e,a=0){const i=[];let r=a;for(;;){const s=await we(`/chats/${e}/messages?after=${r}&limit=1000`);if(i.push(...s.messages),!s.hasMore)return{messages:i};if(s.nextSequence<=r)throw new Error(x("api.historyFailed"));r=s.nextSequence}}const We=e=>JSON.stringify(e),fe={me:()=>we("/me"),search:(e,a)=>we(`/search?q=${encodeURIComponent(e)}${a?`&in=${a}`:""}&limit=60`),login:(e,a)=>we("/login",{method:"POST",body:We({username:e,password:a})}),logout:()=>we("/logout",{method:"POST"}),bots:()=>we("/bots"),createBot:e=>we("/bots",{method:"POST",body:We({name:e})}),saveBot:(e,a)=>we(`/bots/${e}`,{method:"PUT",body:We(a)}),modelOptions:()=>we("/model-options"),selectBotModel:(e,a,i,r,s)=>we(`/bots/${e}/model`,{method:"PUT",body:We({connectionId:a,modelId:i,thinkingLevel:r,language:s})}),answerQuestion:(e,a,i)=>we(`/chats/${e}/questions/${a}`,{method:"POST",body:We(i)}),setBotColor:(e,a)=>we(`/bots/${e}/color`,{method:"PUT",body:We({color:a})}),chats:()=>we("/chats"),createChat:e=>we("/chats",{method:"POST",body:We({botId:e})}),deleteChat:e=>we(`/chats/${e}`,{method:"DELETE"}),members:()=>we("/members"),sections:()=>we("/sections"),createSection:e=>we("/sections",{method:"POST",body:We(e)}),updateSection:(e,a)=>we(`/sections/${e}`,{method:"PATCH",body:We(a)}),deleteSection:e=>we(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>we("/channels",{method:"POST",body:We(e)}),updateChannel:(e,a)=>we(`/chats/${e}`,{method:"PATCH",body:We(a)}),addMember:(e,a)=>we(`/chats/${e}/members`,{method:"POST",body:We({memberId:a})}),removeMember:(e,a)=>we(`/chats/${e}/members/${a}`,{method:"DELETE"}),setNote:(e,a)=>we(`/chats/${e}/note`,{method:"PUT",body:We({text:a})}),markRead:(e,a)=>we(`/chats/${e}/read`,{method:"POST",body:We({sequence:a})}),messages:e8,latestMessages:(e,a)=>we(`/chats/${e}/messages?tail=${a}`),olderMessages:(e,a,i)=>we(`/chats/${e}/messages?before=${a}&limit=${i}`),send:(e,a,i,r,s=!1,u,d=[])=>we(`/chats/${e}/messages`,{method:"POST",body:We({content:a,attachmentIds:i,clientMessageId:r,...s?{alsoToChannel:s}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),fold:(e,a)=>we(`/messages/${e}/fold`,{method:"PUT",body:We({folded:a})}),react:(e,a,i)=>we(`/messages/${e}/reaction`,{method:"PUT",body:We({emoji:a,on:i})}),pin:(e,a)=>we(`/chats/${e}/pin`,{method:"PUT",body:We({pinned:a})}),mute:(e,a)=>we(`/chats/${e}/mute`,{method:"PUT",body:We({muted:a})}),deleteBot:(e,a)=>we(`/bots/${e}${a?"?files=delete":""}`,{method:"DELETE"}),chat:e=>we(`/chats/${e}`),message:e=>we(`/messages/${e}`),openThread:e=>we(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>we(`/chats/${e}/threads`),followedThreads:()=>we("/threads"),updateThread:(e,a)=>we(`/chats/${e}`,{method:"PATCH",body:We(a)}),follow:(e,a)=>we(`/chats/${e}/follow`,{method:"PUT",body:We({following:a})}),botDirects:e=>we(`/members/${e}/dms`),tasks:e=>we(`/bots/${e}/tasks`),createTask:(e,a)=>we(`/bots/${e}/tasks`,{method:"POST",body:We(a)}),updateTask:(e,a,i)=>we(`/bots/${e}/tasks/${a}`,{method:"PUT",body:We(i)}),setTaskOn:(e,a,i)=>we(`/bots/${e}/tasks/${a}/${i?"resume":"pause"}`,{method:"POST"}),deleteTask:(e,a)=>we(`/bots/${e}/tasks/${a}`,{method:"DELETE"}),botSubscriptions:e=>we(`/members/${e}/subscriptions`),controlBot:(e,a)=>we(`/bots/${e}/${a}`,{method:"POST"}),grantBotMachine:(e,a,i)=>we(`/bots/${e}/environment`,{method:"PUT",body:We({machineId:a,granted:i})}),machines:()=>we("/environments"),scanMachine:e=>we("/environments/scan",{method:"POST",body:We(e)}),addMachine:e=>we("/environments",{method:"POST",body:We(e)}),prepareMachineKey:()=>we("/environments/keys",{method:"POST"}),setMachinePassword:(e,a)=>we(`/environments/${e}/password`,{method:"PUT",body:We({password:a})}),updateMachine:(e,a)=>we(`/environments/${e}`,{method:"PUT",body:We(a)}),checkMachine:e=>we(`/environments/${e}/check`,{method:"POST"}),trustMachine:(e,a)=>we(`/environments/${e}/trust`,{method:"POST",body:We({fingerprints:a})}),deleteMachine:(e,a=!1)=>we(`/environments/${e}${a?"?force=1":""}`,{method:"DELETE"}),grantMachine:(e,a,i)=>we(`/environments/${e}/grants/${a}`,{method:"PUT",body:We({granted:i})}),fulfilMachine:(e,a,i)=>we(`/environments/requests/${e}/${a}`,{method:"POST",body:We(i)}),computer:(e,a)=>we(`/bots/${e}/computer/${a}`,{method:"POST"}),connection:()=>we("/connection"),setConnection:e=>we("/connection",{method:"PUT",body:We({allowHttp:e})}),secrets:()=>we("/secrets"),createSecret:e=>we("/secrets",{method:"POST",body:We(e)}),updateSecret:(e,a)=>we(`/secrets/${e}`,{method:"PUT",body:We(a)}),deleteSecret:e=>we(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,a,i)=>we(`/secrets/${e}/grants/${a}`,{method:"PUT",body:We({granted:i})}),secretUses:e=>we(`/secrets/${e}/uses`),fulfilSecret:(e,a,i)=>we(`/secrets/requests/${e}/${a}`,{method:"POST",body:We(i)}),botStatus:e=>we(`/bots/${e}/status`),uploadAttachment:WC,removeAttachment:e=>we(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>we(`/model-connections/${e}/auth`),authStart:e=>we(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>we(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,a,i)=>we(`/model-connections/${e}/auth/input`,{method:"POST",body:We({promptId:a,value:i})}),authLogout:e=>we(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>we(`/model-connections/${e}/catalog`),modelResetPlan:e=>we(`/model-connections/${e}/reset`),resetModelConnection:e=>we(`/model-connections/${e}/reset`,{method:"POST"}),providerModels:e=>we(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>we("/model-providers"),autoconfigModel:e=>we("/model-autoconfig",{method:"POST",body:We(e)}),discoverModels:e=>we("/model-discovery",{method:"POST",body:We(e)}),modelConnections:()=>we("/model-connections"),createModelConnection:e=>we("/model-connections",{method:"POST",body:We(e)}),updateModelConnection:(e,a)=>we(`/model-connections/${e}`,{method:"PUT",body:We(a)}),deleteModelConnection:e=>we(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,a,i=!1)=>we(`/model-connections/${e}/credential`,{method:"PUT",body:We({apiKey:a,remove:i})}),saveConnectionModel:(e,a,i)=>we(`/model-connections/${e}/models`,{method:i?"PUT":"POST",body:We({model:a,originalId:i})}),deleteConnectionModel:(e,a)=>we(`/model-connections/${e}/models`,{method:"DELETE",body:We({modelId:a})})},Ly=4*1024**3,t8=["normal","happy","sad","angry","dizzy"];/**
|
|
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 n8=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 a8(e,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:n8(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 i8=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 r8=e=>{const a=i8(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 Mp=(...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 Fl={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 l8(e,a={}){var b,j;const i=a.attributeNames??{},r=w=>i[w]??w,s=e.size??e.width??Fl.width,u=e.size??e.height??Fl.height,d=((b=e.aliases)==null?void 0:b.filter(w=>typeof w=="string"&&w.trim()!=="").map(w=>`lucide-${w}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((j=a.className)==null?void 0:j.split(" ").filter(Boolean))??[],v=a.includeDefaultClasses===!1?Mp(...m):Mp("lucide",...f,...m),y=a.absoluteStrokeWidth?Number(a.strokeWidth??Fl["stroke-width"])*Number(e.size??e.width??Fl.width)/Number(a.size??a.width??Fl.width):a.strokeWidth??Fl["stroke-width"];return["svg",{...Object.entries(Fl).reduce((w,[k,C])=>(w[r(k)]=C,w),{}),..."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 ${s} ${u}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},e.node.map(w=>{const[k,C,T]=w,M=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...C}:C;return T?[k,M,T]:[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 o8(e,a={}){return l8(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 s8=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},c8=S.createContext({}),u8=()=>S.useContext(c8),d8=S.forwardRef(({color:e,size:a,width:i,height:r,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...g},b)=>{const{size:j=24,strokeWidth:w=2,absoluteStrokeWidth:k=!1,nonScalingStroke:C=!1,color:T="currentColor",className:M=""}=u8()??{},E=!!m||s8(g),[R,D,A=[]]=o8(y,{color:e??T,width:i??a??j,height:r??a??j,strokeWidth:s??w,absoluteStrokeWidth:u??k,nonScalingStroke:d??C,className:Mp(M,f),hasA11yProp:E,attributes:g});return S.createElement(R,{ref:b,...D},[...A.map(([H,U])=>S.createElement(H,U)),...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 De(e,a=[],i=[]){const r=typeof e=="string"?a8(e,a,i):e,s=S.forwardRef(({className:u,...d},f)=>S.createElement(d8,{ref:f,icon:r,className:u,...d}));return r.name&&(s.displayName=r8(r.name)),s}/**
|
|
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 rj={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"}]]};rj.node;const f8=De(rj);/**
|
|
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 lj={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"}]]};lj.node;const h8=De(lj);/**
|
|
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 oj={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"}]]};oj.node;const m8=De(oj);/**
|
|
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 sj={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};sj.node;const Qd=De(sj);/**
|
|
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 cj={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};cj.node;const Rp=De(cj);/**
|
|
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 uj={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};uj.node;const p8=De(uj);/**
|
|
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 dj={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"}]]};dj.node;const g8=De(dj);/**
|
|
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 fj={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"}]]};fj.node;const v8=De(fj);/**
|
|
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 hj={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"}]]};hj.node;const y8=De(hj);/**
|
|
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 mj={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"]};mj.node;const x8=De(mj);/**
|
|
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 pj={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};pj.node;const Ra=De(pj);/**
|
|
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 gj={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};gj.node;const ll=De(gj);/**
|
|
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 vj={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};vj.node;const yj=De(vj);/**
|
|
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 xj={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};xj.node;const il=De(xj);/**
|
|
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 bj={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"]};bj.node;const b8=De(bj);/**
|
|
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 jj={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"}]]};jj.node;const Zd=De(jj);/**
|
|
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 wj={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"}]]};wj.node;const j8=De(wj);/**
|
|
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 Sj={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"}]]};Sj.node;const b0=De(Sj);/**
|
|
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 kj={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"]};kj.node;const By=De(kj);/**
|
|
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 Cj={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"}]]};Cj.node;const w8=De(Cj);/**
|
|
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 Nj={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"}]]};Nj.node;const S8=De(Nj);/**
|
|
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 Ej={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"}]]};Ej.node;const j0=De(Ej);/**
|
|
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 Tj={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"}]]};Tj.node;const w0=De(Tj);/**
|
|
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 Aj={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"]};Aj.node;const k8=De(Aj);/**
|
|
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 _j={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"]};_j.node;const C8=De(_j);/**
|
|
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 Mj={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"]};Mj.node;const N8=De(Mj);/**
|
|
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 Rj={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"}]]};Rj.node;const E8=De(Rj);/**
|
|
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 Dj={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"}]]};Dj.node;const T8=De(Dj);/**
|
|
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 Oj={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"}]]};Oj.node;const A8=De(Oj);/**
|
|
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 zj={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"}]]};zj.node;const _8=De(zj);/**
|
|
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 Lj={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"}]]};Lj.node;const M8=De(Lj);/**
|
|
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 Bj={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"}]]};Bj.node;const R8=De(Bj);/**
|
|
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 Ij={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"}]]};Ij.node;const D8=De(Ij);/**
|
|
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 Pj={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"}]]};Pj.node;const S0=De(Pj);/**
|
|
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 Hj={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"}]]};Hj.node;const Uj=De(Hj);/**
|
|
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 qj={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"}]]};qj.node;const O8=De(qj);/**
|
|
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 Fj={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Fj.node;const Vj=De(Fj);/**
|
|
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 $j={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"}]]};$j.node;const z8=De($j);/**
|
|
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 Gj={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"}]]};Gj.node;const L8=De(Gj);/**
|
|
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 Yj={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"]};Yj.node;const Xj=De(Yj);/**
|
|
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 Kj={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"}]]};Kj.node;const B8=De(Kj);/**
|
|
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 Qj={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"}]]};Qj.node;const I8=De(Qj);/**
|
|
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 Zj={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"}]]};Zj.node;const P8=De(Zj);/**
|
|
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 Jj={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"}]]};Jj.node;const Wj=De(Jj);/**
|
|
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 e4={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"}]]};e4.node;const H8=De(e4);/**
|
|
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 t4={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};t4.node;const n4=De(t4);/**
|
|
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 a4={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"}]]};a4.node;const U8=De(a4);/**
|
|
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 i4={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"]};i4.node;const q8=De(i4);/**
|
|
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 r4={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"}]]};r4.node;const k0=De(r4);/**
|
|
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 l4={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"}]]};l4.node;const F8=De(l4);/**
|
|
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 o4={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"}]]};o4.node;const V8=De(o4);/**
|
|
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 s4={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"}]]};s4.node;const Dp=De(s4);/**
|
|
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 c4={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};c4.node;const br=De(c4);/**
|
|
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 u4={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"}]]};u4.node;const $8=De(u4);/**
|
|
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 d4={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"}]]};d4.node;const C0=De(d4);/**
|
|
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 f4={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"}]]};f4.node;const G8=De(f4);/**
|
|
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 h4={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"]};h4.node;const Y8=De(h4);/**
|
|
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 m4={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"}]]};m4.node;const p4=De(m4);/**
|
|
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 g4={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};g4.node;const Dc=De(g4);/**
|
|
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 v4={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"}]]};v4.node;const y4=De(v4);/**
|
|
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 x4={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"}]]};x4.node;const X8=De(x4);/**
|
|
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 b4={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"}]]};b4.node;const K8=De(b4);/**
|
|
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 j4={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"}]]};j4.node;const Q8=De(j4);/**
|
|
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 w4={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"}]]};w4.node;const Z8=De(w4);/**
|
|
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 S4={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"}]]};S4.node;const J8=De(S4);/**
|
|
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 k4={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"]};k4.node;const C4=De(k4);/**
|
|
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 N4={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"}]]};N4.node;const W8=De(N4);/**
|
|
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 E4={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"]};E4.node;const e7=De(E4);/**
|
|
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 T4={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"}]]};T4.node;const t7=De(T4);/**
|
|
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 A4={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"]};A4.node;const zd=De(A4);/**
|
|
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 _4={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"]};_4.node;const N0=De(_4);/**
|
|
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 M4={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"}]]};M4.node;const n7=De(M4);/**
|
|
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 R4={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"}]]};R4.node;const a7=De(R4);/**
|
|
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 D4={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"}]]};D4.node;const i7=De(D4);/**
|
|
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 O4={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"}]]};O4.node;const r7=De(O4);/**
|
|
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 z4={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};z4.node;const hs=De(z4),L4={list:(e,a)=>we(`/bots/${e}/activity${a===void 0?"":`?before=${encodeURIComponent(a)}`}`),message:(e,a)=>we(`/bots/${e}/activity/messages/${a}`)};function B4(e){var a,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(a=0;a<s;a++)e[a]&&(i=B4(e[a]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function l7(){for(var e,a,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(a=B4(e))&&(r&&(r+=" "),r+=a);return r}const Iy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Py=l7,E0=(e,a)=>i=>{var r;if((a==null?void 0:a.variants)==null)return Py(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:s,defaultVariants:u}=a,d=Object.keys(s).map(v=>{const y=i==null?void 0:i[v],g=u==null?void 0:u[v];if(y===null)return null;const b=Iy(y)||Iy(g);return s[v][b]}),f=i&&Object.entries(i).reduce((v,y)=>{let[g,b]=y;return b===void 0||(v[g]=b),v},{}),m=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((v,y)=>{let{class:g,className:b,...j}=y;return Object.entries(j).every(w=>{let[k,C]=w;return Array.isArray(C)?C.includes({...u,...f}[k]):{...u,...f}[k]===C})?[...v,g,b]:v},[]);return Py(e,d,m,i==null?void 0:i.class,i==null?void 0:i.className)},I4=48,Ui=(e,a=0)=>{const i=new Int32Array(e.length);for(let r=0;r<e.length;r++)i[r]=e.charCodeAt(r)-I4-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},ol=e=>{const a=new Int32Array(e.length);let i=0;for(let r=0;r<e.length;r++){const s=e.charCodeAt(r)-I4;i+=s>>>1^-(s&1),a[r]=i}return a},o7=384,s7=[],Xl=Jd(Ui("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),c7=Jd(Ui(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),u7="@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",d7=(()=>{const e=Xl.length-1,a=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,d=s+1;for(let f=Xl[s];f<Xl[s+1];f++)u+=a[d],d+=a[d];a[s]=u}const i=new Int32Array(Xl[e]);let r=0;for(let s=0;s<e;s++){let u=s+1;for(let d=Xl[s];d<Xl[s+1];d++)i[r++]=u,u+=a[u]}return i})(),f7=Ui("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),h7=Jd(Ui("123333359346463635126536711576")),m7=Ui("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),p7=Ui("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),g7=ol("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),v7=(()=>{const e=new Int32Array(319).fill(-1),a=ol("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=ol("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let r=0;r<a.length;r++)e[a[r]]=i[r];return e})(),y7="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}),Hy=ol("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),x7=ol("ɠ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"),b7=ol("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),P4=new Int32Array(995),H4=new Int32Array(995),U4=new Int32Array(995);let Op="";const zp=new Int32Array(1038);{const e=new Map;let a=0,i=0;for(let r=0;r<Hy.length;r++)for(const s of y7[b7[r]]){let u=e.get(s);u===void 0&&(u=a++,e.set(s,u),zp[u*2]=Op.length,zp[u*2+1]=s.length,Op+=s),P4[i]=Hy[r],H4[i]=x7[r],U4[i]=u,i++}}const j7=ol("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),w7=Jd(Ui("1::24444432:442:44:44>222222:44:4421322511111311111114")),S7=ol("24A;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"),k7=Ui("ij"),C7=Ui(""),N7=Ui("1"),E7="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var T7={GROUP_COUNT:o7,customValidatorNames:s7,edgeStart:Xl,labelStart:c7,labelText:u7,edgeTarget:d7,nodeGroup:f7,nodeVlist:v7,vlistPat:h7,vlistOps:m7,vlistRef:p7,vlistGroup:g7,litAnchor:P4,litGroup:H4,litPool:U4,poolOffsets:zp,poolText:Op,adjGid:j7,adjStart:w7,adjTgt:S7,patGid:k7,patTgt:C7,postfixLookupGroups:N7,orderSensitiveModifiers:E7};const A7="line"in new Error,Ti=-1,Vl=-1,Fm=(e,a,i)=>{let r=2166136261;for(let s=a;s<i;s++)r=Math.imul(r^e.charCodeAt(s),16777619);return r},Ed=(e,a,i)=>{const r=i-a;let s=Math.imul(r,2654435761)^e.charCodeAt(a);if(r>3){const u=r>>2,d=r>>1;s=Math.imul(s^e.charCodeAt(a+1)<<8^e.charCodeAt(a+2)<<16^e.charCodeAt(a+u),2246822507),s=Math.imul(s^e.charCodeAt(a+d)<<8^e.charCodeAt(a+d+u)<<16^e.charCodeAt(i-3),3266489909),s^=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--)s=Math.imul(s^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return s^s>>>15|0},_7=(e,a,i={})=>{const{GROUP_COUNT:r,edgeStart:s,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:g,vlistRef:b,vlistGroup:j,litAnchor:w,litGroup:k,litPool:C,poolOffsets:T,poolText:M,adjGid:E,adjStart:R,adjTgt:D,patGid:A,patTgt:H,postfixLookupGroups:U,customValidatorNames:Y,orderSensitiveModifiers:z}=e,V=new Int32Array(r).fill(-1);for(let se=0;se<E.length;se++)V[E[se]]=se;let F=0;for(let se=0;se+1<R.length;se++){const ve=R[se+1]-R[se];ve>F&&(F=ve)}let J=32;for(;J<2*(1+F+A.length);)J<<=1;const G=new Int32Array(b.length+1);for(let se=0;se<b.length;se++)G[se+1]=G[se]+y[b[se]+1]-y[b[se]];const $=new Uint8Array(r);for(let se=0;se<U.length;se++)$[U[se]]=1;const K=s.length-1,I=new Uint8Array(K);let P=0,W=!0;for(let se=0;se<w.length;se++){I[w[se]]=1;const ve=T[C[se]*2+1];ve>P&&(P=ve);const B=M.charCodeAt(T[C[se]*2]);(B===91||B===40)&&(W=!1)}let _=1;for(;_<w.length*2;)_<<=1;const ae=new Int32Array(_).fill(-1);for(let se=0;se<w.length;se++){const ve=T[C[se]*2];let B=(Fm(M,ve,ve+T[C[se]*2+1])^Math.imul(w[se],2654435761)|0)&_-1;for(;ae[B]!==-1;)B=B+1&_-1;ae[B]=se}const ie=(se,ve,B,re)=>{let me=(Fm(ve,B,re)^Math.imul(se,2654435761)|0)&_-1;const Te=re-B;for(;;){const Ne=ae[me];if(Ne===-1)return-1;if(w[Ne]===se&&T[C[Ne]*2+1]===Te){const Ue=T[C[Ne]*2];let Pe=!0;for(let ze=0;ze<Te;ze++)if(M.charCodeAt(Ue+ze)!==ve.charCodeAt(B+ze)){Pe=!1;break}if(Pe)return k[Ne]}me=me+1&_-1}},L=i.cacheSize??8192,q=i.prefix??e.prefix??"",ue=q===""?"":q+":",xe=ue.length,be=(Y??[]).map(se=>{throw new Error("cn: missing validator "+se)}),je=/\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$/,Ae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let Q=0,he=-1,ke=-1,Ee=-1,Ie=-1;const Ye=se=>se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95,Ke=se=>/\s/.test(String.fromCharCode(se)),gt=(se,ve,B)=>{if(Q=0,he=-1,B-ve<3)return;const re=se.charCodeAt(ve),me=se.charCodeAt(B-1);if(re===91&&me===93)Q=1;else if(re===40&&me===41)Q=2;else return;Ee=ve+1,Ie=B-1;let Te=ve+1;if(Ye(se.charCodeAt(Te))){for(Te++;Te<B-1;){const Ne=se.charCodeAt(Te);if(!Ye(Ne)&&Ne!==45)break;Te++}Te<B-2&&se.charCodeAt(Te)===58&&(he=ve+1,ke=Te,Ee=Te+1)}},rn=(se,ve,B,re)=>{if(B-ve!==re.length)return!1;for(let me=0;me<re.length;me++)if(se.charCodeAt(ve+me)!==re.charCodeAt(me))return!1;return!0},xn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Hn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fa=se=>!!se&&!Number.isNaN(Number(se)),ln=(se,ve,B)=>{if(B-ve<11||!rn(se,ve,ve+10,"@container"))return!1;if(se.charCodeAt(ve+10)===47)return B-ve>=12;const re=se.charCodeAt(ve+11);return re===115&&B-ve>=17&&rn(se,ve+10,ve+16,"-size/")||re===110&&B-ve>=19&&rn(se,ve+10,ve+18,"-normal/")},Ya=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],de="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(se=>se.split(" ")),Ce=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Fe=(se,ve,B,re)=>{if(se>=10){if(se>=25)return be[se-25](ve.slice(B,re));const me=se-10;if(Q!==Ya[me])return!1;if(he>=0){for(const Te of de[me])if(rn(ve,he,ke,Te))return!0;return!1}switch(Ce[me]){case 0:return!1;case 1:return!0;case 2:{const Te=ve.slice(Ee,Ie);return je.test(Te)&&!Ae.test(Te)}case 3:return fa(ve.slice(Ee,Ie));case 4:return ye.test(ve.slice(Ee,Ie));default:return Re.test(ve.slice(Ee,Ie))}}switch(se){case 0:return!0;case 1:return Q===0;case 2:return Q===1;case 3:return Q===2;case 4:return xn.test(ve.slice(B,re));case 5:return fa(ve.slice(B,re));case 6:{const me=ve.slice(B,re);return!!me&&Number.isInteger(Number(me))}case 7:return re>B&&ve.charCodeAt(re-1)===37&&fa(ve.slice(B,re-1));case 8:return Hn.test(ve.slice(B,re));default:return ln(ve,B,re)}},Ge=new Set(typeof z=="string"?z.split(" "):z),nt=(se,ve,B,re,me,Te)=>{const Ne=Fm(ve,B,re)^(me?2654435769:0)|0;let Ue=se.get(Ne);if(Ue!==void 0)e:for(let He=0;He<Ue.length;He++){const ct=Ue[He];if(!(ct.imp!==me||ct.k.length!==re-B)){for(let Ve=0;Ve<ct.k.length;Ve++)if(ct.k.charCodeAt(Ve)!==ve.charCodeAt(B+Ve))continue e;return ct.id}}else se.set(Ne,Ue=[]);const Pe=ve.slice(B,re),ze=Te(Pe);return Ue.push({k:Pe,imp:me,id:ze}),ze};let Ht=new Map,dn=new Map,Ut=2;const Rn=4096,Un=(se,ve)=>{const B=[];let re=0,me=0,Te=0;for(let ze=0;ze<se.length;ze++){const He=se.charCodeAt(ze);re===0&&me===0&&He===58?(B.push(se.slice(Te,ze)),Te=ze+1):He===91?re++:He===93?re--:He===40?me++:He===41&&me--}B.push(se.slice(Te));let Ne=B[0];if(B.length>1){const ze=[];let He=[];for(const ct of B)ct.charCodeAt(0)===91||Ge.has(ct)?(He.length&&(ze.push(...He.sort()),He=[]),ze.push(ct)):He.push(ct);He.length&&ze.push(...He.sort()),Ne=ze.join(":")}const Ue=ve?Ne+" !":Ne;let Pe=dn.get(Ue);return Pe===void 0&&dn.set(Ue,Pe=Ut++),Pe};let Ot=new Map,Dn=r;const Qe=r+4096,Yt=()=>Dn++,pl=2097152,di=8192,fi=new Int32Array(di),bn=new Array(di).fill(null),ha=new Int32Array(di),gl=new Int32Array(di),ma=new Uint8Array(di);let ho=0;const Xa=(se,ve,B,re,me,Te,Ne,Ue)=>{let Pe=se;if(bn[se]!==null)if(bn[se|1]===null)Pe=se|1;else if((ho++&3)===0)Pe=se|ho>>2&1;else return;bn[Pe]=ve.slice(B,re),fi[Pe]=me,ha[Pe]=Te,gl[Pe]=Ne,ma[Pe]=Ue},fn=()=>bn.fill(null);let Bt=256,Vt=[new Int32Array(Bt),new Int32Array(Bt),new Int32Array(Bt),new Int32Array(Bt)],[hi,mi,Ka,Qa]=Vt,Da=new Uint8Array(Bt),Zn=new Uint8Array(Bt);const Za=()=>{Bt*=2,Vt=Vt.map(ve=>{const B=new Int32Array(Bt);return B.set(ve),B}),[hi,mi,Ka,Qa]=Vt;const se=new Uint8Array(Bt);se.set(Da),Da=se,Zn=new Uint8Array(Bt)};let pa=64,ga=new Int32Array(pa),pi=new Int32Array(pa);const vl=new Int32Array(r);let va=2048,Nr=21,Ja=new Float64Array(va),Wa=new Int32Array(va),qn=0;const Vi=(se,ve)=>{if(se===0&&ve<r)return vl[ve]===qn?1:(vl[ve]=qn,0);const B=se*2097152+ve+1;let re=Math.imul(B,2654435761)>>>Nr;for(;Wa[re]===qn;){if(Ja[re]===B)return 1;re=re+1&va-1}return Ja[re]=B,Wa[re]=qn,0},Xt=(se,ve,B,re,me)=>{if(B-ve>=2&&se.charCodeAt(ve)===91&&se.charCodeAt(B-1)===93){let Te=-1;for(let Ne=ve+1;Ne<B-1;Ne++)if(se.charCodeAt(Ne)===58){Te=Ne;break}return Te===-1||Te===ve+1?Ti:nt(Ot,se,ve+1,Te,0,Yt)}if(re>=0&&m[re]>=0)return m[re];for(let Te=me-1;Te>=0;Te--){const Ne=pi[Te];if(Ne>B)continue;const Ue=ga[Te],Pe=B-Ne;if(I[Ue]===1&&Pe>0&&Pe<=P){const It=se.charCodeAt(Ne);if(W===!1||It!==91&&It!==40){const ya=ie(Ue,se,Ne,B);if(ya>=0)return ya}}const ze=v[Ue];if(ze<0)continue;const He=b[ze],ct=y[He],Ve=y[He+1];if(ct===Ve)continue;gt(se,Ne,B);const cn=G[ze]-ct;for(let It=ct;It<Ve;It++)if(Fe(g[It],se,Ne,B))return j[cn+It]}return Ti},on=se=>{const ve=se.length;let B=0,re=0,me=!1;(Ut>Rn||Ht.size>Rn)&&(Ht=new Map,dn=new Map,Ut=2,fn()),Dn>Qe&&(Ot=new Map,Dn=r,fn());let Te=0;for(;Te<ve;){let ze=se.charCodeAt(Te);if(ze===32||ze>=9&&ze<=13||ze>=160&&Ke(ze)){ze!==32&&(me=!0),Te++;continue}const He=Te;let ct=0;for(;Te<ve;){if(ze=se.charCodeAt(Te),ze<=32){if(ze===32)break;if(ze>=9&&ze<=13){me=!0;break}}else if(ze>=160&&Ke(ze)){me=!0;break}ct=Math.imul(ct^ze,16777619),Te++}const Ve=Te,cn=Ve-He;B===Bt&&Za();const It=B++;hi[It]=He,mi[It]=Ve,re+=cn,ct^=Math.imul(cn,2654435761);const ya=ct^ct>>>15|0,Kt=ya&8190;{let ft=-1;if(fi[Kt]===ya&&bn[Kt]!==null&&bn[Kt].length===cn?ft=Kt:fi[Kt|1]===ya&&bn[Kt|1]!==null&&bn[Kt|1].length===cn&&(ft=Kt|1),ft>=0){const hn=bn[ft];let Oa=!0;for(let ja=0;ja<cn;ja++)if(hn.charCodeAt(ja)!==se.charCodeAt(He+ja)){Oa=!1;break}if(Oa){Ka[It]=ha[ft],Qa[It]=gl[ft],Da[It]=ma[ft];continue}}}let Qt=He;if(xe!==0){if(Ve-He<=xe||!se.startsWith(ue,He)){Ka[It]=Ti,Xa(Kt,se,He,Ve,ya,Ti,0,0);continue}Qt=He+xe}let mo=0,js=0,Qi=-1,po=-1;for(let ft=Qt;ft<Ve;ft++){const hn=se.charCodeAt(ft);if(mo===0&&js===0){if(hn===58){Qi=ft;continue}if(hn===47){po=ft;continue}}hn===91?mo++:hn===93?mo--:hn===40?js++:hn===41&&js--}const Vc=Qi>=Qt?Qi+1:Qt;let Dt=Vc,On=Ve,Ar=!1,go=0;On>Dt&&se.charCodeAt(On-1)===33?(Ar=!0,On--):On>Dt&&se.charCodeAt(Dt)===33&&(Ar=!0,Dt++,go=1);let ta=-1;po>Vc&&(ta=po+go,ta>=On&&(ta=-1));let vo=Dt;On-Dt>1&&se.charCodeAt(Dt)===45&&(vo=Dt+1);let xa=0,Fn=0,_r=0,ws=-1,ba=0;(v[0]>=0||I[0]===1)&&(ga[0]=0,pi[0]=vo,ba=1);let yl=Vl,Ss=0;for(let ft=vo;ft<On;ft++)if(ft===ta&&(yl=Fn<_r?Vl:xa,Ss=ba),xa!==Vl){const hn=se.charCodeAt(ft);let Oa=-1;if(Fn<_r)d.charCodeAt(Fn)===hn?(Fn++,Fn===_r&&(Oa=xa=ws)):xa=Vl;else{const ja=s[xa],jl=s[xa+1];let Zi=Vl;for(let Sn=ja;Sn<jl;Sn++){const wl=u[Sn];if(d.charCodeAt(wl)===hn){u[Sn+1]-wl===1?Oa=Zi=f[Sn]:(Fn=wl+1,_r=u[Sn+1],ws=f[Sn],Zi=xa);break}}xa=Zi}if(Oa>=0&&(v[Oa]>=0||I[Oa]===1)&&ft+1<On&&se.charCodeAt(ft+1)===45){if(ba===pa){pa*=2;const ja=new Int32Array(pa);ja.set(ga),ga=ja;const jl=new Int32Array(pa);jl.set(pi),pi=jl}ga[ba]=Oa,pi[ba]=ft+2,ba++}}ta===On&&(yl=Fn<_r?Vl:xa,Ss=ba);const ks=Fn<_r?Vl:xa;let wn,Vn=!1;if(ta>=0)if(Vn=!0,wn=Xt(se,Dt,ta,yl,Ss),wn!==Ti&&wn<r&&$[wn]){const ft=Xt(se,Dt,On,ks,ba);ft!==Ti&&ft!==wn&&(wn=ft,Vn=!1)}else wn===Ti&&(wn=Xt(se,Dt,On,ks,ba),Vn=!1);else wn=Xt(se,Dt,On,ks,ba);let xl=0,bl=0;wn===Ti?Ka[It]=Ti:(bl=Vn?1:0,xl=Qt>=Qi?Ar?1:0:nt(Ht,se,Qt,Qi,Ar?1:0,ft=>Un(ft,Ar)),Ka[It]=wn,Da[It]=bl,Qa[It]=xl),Xa(Kt,se,He,Ve,ya,wn,xl,bl)}if(B===0)return"";if(B===1)return hi[0]===0&&mi[0]===ve?se:se.slice(hi[0],mi[0]);if(B*J>va){for(;B*J>va;)va<<=1,Nr--;Ja=new Float64Array(va),Wa=new Int32Array(va)}if(Ut>=pl||Dn>=pl)throw new Error("cn: too many distinct classes in one merge");qn=qn+1|0,qn===0&&(vl.fill(0),Wa.fill(0),qn=1);let Ne=!1;for(let ze=B-1;ze>=0;ze--){const He=Ka[ze];if(He===Ti){Zn[ze]=1;continue}const ct=Qa[ze];if(Vi(ct,He)===1){Zn[ze]=0,Ne=!0;continue}if(Zn[ze]=1,He<r){const Ve=V[He];if(Ve>=0)for(let cn=R[Ve];cn<R[Ve+1];cn++)Vi(ct,D[cn]);if(Da[ze]&1)for(let cn=0;cn<A.length;cn++)A[cn]===He&&Vi(ct,H[cn])}}if(!Ne&&!me&&ve===re+B-1)return se;let Ue="",Pe=0;for(;Pe<B;){if(!Zn[Pe]){Pe++;continue}const ze=hi[Pe];let He=mi[Pe],ct=Pe+1;for(;ct<B&&Zn[ct]&&hi[ct]===He+1&&se.charCodeAt(He)===32;)He=mi[ct],ct++;Ue.length>0&&(Ue+=" "),Ue+=se.slice(ze,He),Pe=ct}return Ue},Jn=16384,Wn=new Int32Array(Jn*2);let $i=0,xt=1,Rt=Object.create(null),sn=Object.create(null),jn=new Map,Gi=new Map,Er=0,Tr=0;const gi=()=>{$i^=Jn,xt=xt+1|0,Tr=0},Yi=se=>{let ve=Rt[se];if(ve!==void 0)return ve;const B=Ed(se,0,se.length),re=(B&16383)+$i,me=Wn[re]===(B^xt)||Wn[re^Jn]===(B^xt-1);return me&&(ve=sn[se],ve!==void 0)?(Rt[se]=ve,ve):(ve=on(se),me?(Rt[se]=ve,++Er>L&&(Er=0,sn=Rt,Rt=Object.create(null),gi())):(Wn[re]=B^xt,++Tr>Jn&&gi()),ve)},Xi=se=>{let ve=jn.get(se);if(ve!==void 0)return ve;const B=Ed(se,0,se.length),re=(B&16383)+$i,me=Wn[re]===(B^xt)||Wn[re^Jn]===(B^xt-1);return me&&(ve=Gi.get(se),ve!==void 0)?(jn.set(se,ve),ve):(ve=on(se),me?(jn.set(se,ve),++Er>L&&(Er=0,Gi=jn,jn=new Map,gi())):(Wn[re]=B^xt,++Tr>Jn&&gi()),ve)},Ki=se=>{const ve=Ed(se,0,se.length),B=(ve&16383)+$i;return Wn[B]===(ve^xt)||Wn[B^Jn]===(ve^xt-1)?!0:(Wn[B]=ve^xt,++Tr>Jn&&gi(),!1)},ea=L===0?on:A7?se=>{const ve=jn.get(se);return ve!==void 0?ve:Xi(se)}:Yi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ea(arguments[0]):ea(R7.apply(null,arguments))},mergeString:ea,seenBefore:L===0?()=>!1:Ki,mergeUncached:on}},Ld=(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 s=0;s<r.length;s++){const u=r[s];if(!u)continue;const d=typeof u=="string"?u:Ld(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},M7=(e,a)=>{let i="";for(let r=0;r<e.length;r++){const s=e[r];if(!s)continue;const u=typeof s=="string"?s:Ld(s,a);u&&(i&&(i+=" "),i+=u)}return i},R7=function(){return M7(arguments,!1)},D7=256,Uy=16,O7=1024,Vm=4096,z7=(e,a)=>{const i=a===void 0?()=>!0:a.seenBefore,r=a===void 0?e:a.mergeUncached;let s=new Map,u=new Map,d=0,f=null,m=null,v=[],y=[],g=0;const b=(T,M,E)=>{m===null&&(m=new Array(Vm).fill(""),v=new Array(Vm).fill(""),y=new Array(Vm).fill(""));const R=Ed(T,0,T.length)&4094;if(m[R]===T&&v[R]===M)return y[R];if(m[R|1]===T&&v[R|1]===M)return y[R|1];const D=e(E?M+" "+T:T),A=m[R]===""?R:R|(m[R|1]===""?1:g++&1);return m[A]=T,v[A]=M,y[A]=D,D},j=(T,M,E,R)=>{let D=0;if(M){if(M!==T.a0)return!1;D=1}if(E){if(E!==(D===0?T.a0:T.a1))return!1;D++}if(R){if(R!==(D===0?T.a0:D===1?T.a1:T.a2))return!1;D++}return D===T.t},w=(T,M)=>{const E=T.a;let R=0;for(let D=0;D<M.length;D++){const A=M[D];if(A){if(A!==E[R])return!1;R++}}return R===T.t},k=(T,M)=>{const E=T.length,R=f===null?null:f.n;if(!M){if(R!==null&&w(R,T))return f=R,R.r;if(f!==null&&f!==R&&w(f,T))return f.r}let D="",A=-1,H=0,U=!1;for(let V=0;V<E;V++){let F=T[V];if(F){if(typeof F!="string"){if(F=T[V]=Ld(F,!0),!F)continue;U=!0}A<0&&(D=F,A=V),H++}}if(H===0)return"";if(H===1)return e(D);if(U){if(R!==null&&w(R,T))return f=R,R.r;if(f!==null&&f!==R&&w(f,T))return f.r}let Y=s.get(D);Y===void 0&&(Y=u.get(D),Y!==void 0&&s.set(D,Y));let z=null;if(Y!==void 0){if(Y.skip>0){Y.skip--,f=null;let F=D;for(let J=A+1;J<E;J++){const G=T[J];G&&(F+=" "+G)}return b(F,"",!1)}const V=Y.e;e:for(let F=0;F<V.length;F++){const J=V[F];if(J.t!==H)continue;const G=J.a;let $=1;for(let K=A+1;K<E;K++){const I=T[K];if(I&&I!==G[$++])continue e}z=J;break}z!==null&&(Y.miss=0)}if(z===null){let V=D;const F=[D];for(let G=A+1;G<E;G++){const $=T[G];$&&(V+=" "+$,F.push($))}if(!i(V))return r(V);z={r:e(V),t:F.length,a0:F[0],a1:F[1],a2:F[2]??"",a:F,n:null},Y===void 0?s.set(D,Y={e:[],miss:0,skip:0,at:0}):++Y.miss>Uy&&(Y.miss=Uy,Y.skip=O7,Y.e.length=0,Y.at=0);const J=Y.e;J.length<D7?J.push(z):(J[Y.at]=z,Y.at=Y.at+1&255),++d>1e3&&(d=0,u=s,s=new Map)}return f!==null&&f!==z&&(f.n=z),f=z,z.r},C=T=>Array.isArray(T)?k(T.slice(),!1):e(Ld(T,!0));return function(T,M,E){const R=arguments.length;if((R|1)===3){const H=f;if(H!==null){const U=H.n;if(U!==null&&j(U,T,M,E))return f=U,U.r;if(H!==U&&j(H,T,M,E))return H.r}if(R===2&&typeof M=="string"&&M!==""){const U=s.get(T);if(U!==void 0&&U.skip>0)return U.skip--,f=null,b(M,T,!0)}return k([T,M,E],!0)}if(R===1)return typeof T=="string"?e(T):C(T);const D=f;if(D!==null){const H=D.n;if(H!==null){const U=H.a;let Y=0,z=!0;for(let V=0;V<R;V++){const F=arguments[V];if(F){if(F!==U[Y]){z=!1;break}Y++}}if(z&&Y===H.t)return f=H,H.r}if(D!==H){const U=D.a;let Y=0,z=!0;for(let V=0;V<R;V++){const F=arguments[V];if(F){if(F!==U[Y]){z=!1;break}Y++}}if(z&&Y===D.t)return D.r}}const A=[];for(let H=0;H<R;H++)A.push(arguments[H]);return k(A,!0)}},qy=_7(T7),an=z7(qy.mergeString,qy);var co=Zb(),L7=Object.defineProperty,T0=(e,a)=>L7(e,"name",{value:a,configurable:!0});function Lp(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}T0(Lp,"setRef");function q4(...e){return a=>{let i=!1;const r=e.map(s=>{const u=Lp(s,a);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let s=0;s<r.length;s++){const u=r[s];typeof u=="function"?u():Lp(e[s],null)}}}}T0(q4,"composeRefs");function kt(...e){return S.useCallback(q4(...e),e)}T0(kt,"useComposedRefs");var B7=Object.defineProperty,ci=(e,a)=>B7(e,"name",{value:a,configurable:!0});function Bi(e){const a=S.forwardRef((i,r)=>{let{children:s,...u}=i,d=null,f=!1;const m=[];Bp(s)&&typeof sd=="function"&&(s=sd(s._payload)),S.Children.forEach(s,b=>{var j;if(G4(b)){f=!0;const w=b;let k="child"in w.props?w.props.child:w.props.children;Bp(k)&&typeof sd=="function"&&(k=sd(k._payload)),d=H7(w,k),m.push((j=d==null?void 0:d.props)==null?void 0:j.children)}else m.push(b)}),d?d=S.cloneElement(d,void 0,m):!f&&S.Children.count(s)===1&&S.isValidElement(s)&&(d=s);const v=d?$4(d):void 0,y=kt(r,v);if(!d){if(s||s===0)throw new Error(f?F7(e):q7(e));return s}const g=V4(u,d.props??{});return d.type!==S.Fragment&&(g.ref=r?y:v),S.cloneElement(d,g)});return a.displayName=`${e}.Slot`,a}ci(Bi,"createSlot");var I7=Bi("Slot"),F4=Symbol.for("radix.slottable");function P7(e){const a=ci(i=>"child"in i?i.children(i.child):i.children,"Slottable");return a.displayName=`${e}.Slottable`,a.__radixId=F4,a}ci(P7,"createSlottable");var H7=ci((e,a)=>{if("child"in e.props){const i=e.props.child;return S.isValidElement(i)?S.cloneElement(i,void 0,e.props.children(i.props.children)):null}return S.isValidElement(a)?a:null},"getSlottableElementFromSlottable");function V4(e,a){const i={...a};for(const r in a){const s=e[r],u=a[r];/^on[A-Z]/.test(r)?s&&u?i[r]=(...f)=>{const m=u(...f);return s(...f),m}:s&&(i[r]=s):r==="style"?i[r]={...s,...u}:r==="className"&&(i[r]=[s,u].filter(Boolean).join(" "))}return{...e,...i}}ci(V4,"mergeProps");function $4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}ci($4,"getElementRef");function G4(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F4}ci(G4,"isSlottable");var U7=Symbol.for("react.lazy");function Bp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===U7&&"_payload"in e&&Y4(e._payload)}ci(Bp,"isLazyComponent");function Y4(e){return typeof e=="object"&&e!==null&&"then"in e}ci(Y4,"isPromiseLike");var q7=ci(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),F7=ci(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),sd=Mc[" use ".trim().toString()],V7=Object.defineProperty,$7=(e,a)=>V7(e,"name",{value:a,configurable:!0}),G7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lt=G7.reduce((e,a)=>{const i=Bi(`Primitive.${a}`),r=S.forwardRef((s,u)=>{const{asChild:d,...f}=s,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 X4(e,a){e&&co.flushSync(()=>e.dispatchEvent(a))}$7(X4,"dispatchDiscreteCustomEvent");var Y7=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"}),X7=Object.defineProperty,Va=(e,a)=>X7(e,"name",{value:a,configurable:!0});function K7(e,a){const i=S.createContext(a);i.displayName=e+"Context";const r=Va(u=>{const{children:d,...f}=u,m=S.useMemo(()=>f,Object.values(f));return o.jsx(i.Provider,{value:m,children:d})},"Provider");r.displayName=e+"Provider";function s(u,d={}){const{optional:f=!1}=d,m=S.useContext(i);if(m)return m;if(a!==void 0)return a;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Va(s,"useContext"),[r,s]}Va(K7,"createContext");function ul(e,a=[]){let i=[];function r(u,d){const f=S.createContext(d);f.displayName=u+"Context";const m=i.length;i=[...i,d];const v=Va(g=>{var T;const{scope:b,children:j,...w}=g,k=((T=b==null?void 0:b[e])==null?void 0:T[m])||f,C=S.useMemo(()=>w,Object.values(w));return o.jsx(k.Provider,{value:C,children:j})},"Provider");v.displayName=u+"Provider";function y(g,b,j={}){var T;const{optional:w=!1}=j,k=((T=b==null?void 0:b[e])==null?void 0:T[m])||f,C=S.useContext(k);if(C)return C;if(d!==void 0)return d;if(!w)throw new Error(`\`${g}\` must be used within \`${u}\``)}return Va(y,"useContext"),[v,y]}Va(r,"createContext");const s=Va(()=>{const u=i.map(d=>S.createContext(d));return Va(function(f){const m=(f==null?void 0:f[e])||u;return S.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return s.scopeName=e,[r,K4(s,...a)]}Va(ul,"createContextScope");function K4(...e){const a=e[0];if(e.length===1)return a;const i=Va(()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return Va(function(u){const d=r.reduce((f,{useScope:m,scopeName:v})=>{const g=m(u)[`__scope${v}`];return{...f,...g}},{});return S.useMemo(()=>({[`__scope${a.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return i.scopeName=a.scopeName,i}Va(K4,"composeContextScopes");var Q7=Object.defineProperty,yn=(e,a)=>Q7(e,"name",{value:a,configurable:!0});function Q4(e){const a=e+"CollectionProvider",[i,r]=ul(a),[s,u]=i(a,{collectionRef:{current:null},itemMap:new Map}),d=yn(k=>{const{scope:C,children:T}=k,M=S.useRef(null),E=S.useRef(new Map).current;return o.jsx(s,{scope:C,itemMap:E,collectionRef:M,children:T})},"CollectionProvider");d.displayName=a;const f=e+"CollectionSlot",m=Bi(f),v=S.forwardRef((k,C)=>{const{scope:T,children:M}=k,E=u(f,T),R=kt(C,E.collectionRef);return o.jsx(m,{ref:R,children:M})});v.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=Bi(y),j=S.forwardRef((k,C)=>{const{scope:T,children:M,...E}=k,R=S.useRef(null),D=kt(C,R),A=u(y,T);return S.useEffect(()=>(A.itemMap.set(R,{ref:R,...E}),()=>void A.itemMap.delete(R))),o.jsx(b,{[g]:"",ref:D,children:M})});j.displayName=y;function w(k){const C=u(e+"CollectionConsumer",k);return S.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const E=Array.from(M.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((A,H)=>E.indexOf(A.ref.current)-E.indexOf(H.ref.current))},[C.collectionRef,C.itemMap])}return yn(w,"useCollection"),[{Provider:d,Slot:v,ItemSlot:j},w,r]}yn(Q4,"createCollection");var Fy=new WeakMap,tn,_a,$m=(_a=class extends Map{constructor(i){super(i);Cy(this,tn);zm(this,tn,[...super.keys()]),Fy.set(this,!0)}set(i,r){return Fy.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,s){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,s),this;const y=this.size+(u?0:1);f<0&&m++;const g=[...Ln(this,tn)];let b,j=!1;for(let w=m;w<y;w++)if(m===w){let k=g[w];g[w]===r&&(k=g[w+1]),u&&this.delete(r),b=this.get(k),this.set(r,s)}else{!j&&g[w-1]===r&&(j=!0);const k=g[j?w:w-1],C=b;b=this.get(k),this.delete(k),this.set(k,C)}return this}with(i,r,s){const u=new _a(this);return u.insert(i,r,s),u}before(i){const r=Ln(this,tn).indexOf(i)-1;if(!(r<0))return this.entryAt(r)}setBefore(i,r,s){const u=Ln(this,tn).indexOf(i);return u===-1?this:this.insert(u,r,s)}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,s){const u=Ln(this,tn).indexOf(i);return u===-1?this:this.insert(u+1,r,s)}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=Td(Ln(this,tn),i);if(r!==void 0)return this.get(r)}entryAt(i){const r=Td(Ln(this,tn),i);if(r!==void 0)return[r,this.get(r)]}indexOf(i){return Ln(this,tn).indexOf(i)}keyAt(i){return Td(Ln(this,tn),i)}from(i,r){const s=this.indexOf(i);if(s===-1)return;let u=s+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(i,r){const s=this.indexOf(i);if(s===-1)return;let u=s+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(i,r){let s=0;for(const u of this){if(Reflect.apply(i,r,[u,s,this]))return u;s++}}findIndex(i,r){let s=0;for(const u of this){if(Reflect.apply(i,r,[u,s,this]))return s;s++}return-1}filter(i,r){const s=[];let u=0;for(const d of this)Reflect.apply(i,r,[d,u,this])&&s.push(d),u++;return new _a(s)}map(i,r){const s=[];let u=0;for(const d of this)s.push([d[0],Reflect.apply(i,r,[d,u,this])]),u++;return new _a(s)}reduce(...i){const[r,s]=i;let u=0,d=s??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,s]=i;let u=s??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 s=this.keyAt(r),u=this.get(s);i.set(s,u)}return i}toSpliced(...i){const r=[...this.entries()];return r.splice(...i),new _a(r)}slice(i,r){const s=new _a;let u=this.size-1;if(i===void 0)return s;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);s.set(f,m)}return s}every(i,r){let s=0;for(const u of this){if(!Reflect.apply(i,r,[u,s,this]))return!1;s++}return!0}some(i,r){let s=0;for(const u of this){if(Reflect.apply(i,r,[u,s,this]))return!0;s++}return!1}},tn=new WeakMap,yn(_a,"OrderedDict"),_a);function Td(e,a){if("at"in Array.prototype)return Array.prototype.at.call(e,a);const i=Z4(e,a);return i===-1?void 0:e[i]}yn(Td,"at");function Z4(e,a){const i=e.length,r=A0(a),s=r>=0?r:i+r;return s<0||s>=i?-1:s}yn(Z4,"toSafeIndex");function A0(e){return e!==e||e===0?0:Math.trunc(e)}yn(A0,"toSafeInteger");function Z7(e){const a=e+"CollectionProvider",[i,r]=ul(a),[s,u]=i(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new $m,setItemMap:yn(()=>{},"setItemMap")}),d=yn(({state:E,...R})=>E?o.jsx(m,{...R,state:E}):o.jsx(f,{...R}),"CollectionProvider");d.displayName=a;const f=yn(E=>{const R=C();return o.jsx(m,{...E,state:R})},"CollectionInit");f.displayName=a+"Init";const m=yn(E=>{const{scope:R,children:D,state:A}=E,H=S.useRef(null),[U,Y]=S.useState(null),z=kt(H,Y),[V,F]=A;return S.useEffect(()=>{if(!U)return;const J=ew(()=>{});return J.observe(U,{childList:!0,subtree:!0}),()=>{J.disconnect()}},[U]),o.jsx(s,{scope:R,itemMap:V,setItemMap:F,collectionRef:z,collectionRefObject:H,collectionElement:U,children:D})},"CollectionProviderImpl");m.displayName=a+"Impl";const v=e+"CollectionSlot",y=Bi(v),g=S.forwardRef((E,R)=>{const{scope:D,children:A}=E,H=u(v,D),U=kt(R,H.collectionRef);return o.jsx(y,{ref:U,children:A})});g.displayName=v;const b=e+"CollectionItemSlot",j="data-radix-collection-item",w=Bi(b),k=S.forwardRef((E,R)=>{const{scope:D,children:A,...H}=E,U=S.useRef(null),[Y,z]=S.useState(null),V=kt(R,U,z),F=u(b,D),{setItemMap:J}=F,G=S.useRef(H);J4(G.current,H)||(G.current=H);const $=G.current;return S.useEffect(()=>{const K=$;return J(I=>Y?I.has(Y)?I.set(Y,{...K,element:Y}).toSorted(Ip):(I.set(Y,{...K,element:Y}),I.toSorted(Ip)):I),()=>{J(I=>!Y||!I.has(Y)?I:(I.delete(Y),new $m(I)))}},[Y,$,J]),o.jsx(w,{[j]:"",ref:V,children:A})});k.displayName=b;function C(){return S.useState(new $m)}yn(C,"useInitCollection");function T(E){const{itemMap:R}=u(e+"CollectionConsumer",E);return R}return yn(T,"useCollection"),[{Provider:d,Slot:g,ItemSlot:k},{createCollectionScope:r,useCollection:T,useInitCollection:C}]}yn(Z7,"createCollection");function J4(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 s of i)if(!Object.prototype.hasOwnProperty.call(a,s)||e[s]!==a[s])return!1;return!0}yn(J4,"shallowEqual");function W4(e,a){return!!(a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}yn(W4,"isElementPreceding");function Ip(e,a){return!e[1].element||!a[1].element?0:W4(e[1].element,a[1].element)?-1:1}yn(Ip,"sortByDocumentPosition");function ew(e){return new MutationObserver(i=>{for(const r of i)if(r.type==="childList"){e();return}})}yn(ew,"getChildListObserver");var J7=Object.defineProperty,ms=(e,a)=>J7(e,"name",{value:a,configurable:!0}),tw=!!(typeof window<"u"&&window.document&&window.document.createElement);function pt(e,a,{checkForDefaultPrevented:i=!0}={}){return ms(function(s){if(e==null||e(s),i===!1||!s||!s.defaultPrevented)return a==null?void 0:a(s)},"handleEvent")}ms(pt,"composeEventHandlers");function W7(e){var a;if(!tw)throw new Error("Cannot access window outside of the DOM");return((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??window}ms(W7,"getOwnerWindow");function Pp(e){if(!tw)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}ms(Pp,"getOwnerDocument");function nw(e,a=!1){const{activeElement:i}=Pp(e);if(!(i!=null&&i.nodeName))return null;if(aw(i)&&i.contentDocument)return nw(i.contentDocument.body,a);if(a){const r=i.getAttribute("aria-activedescendant");if(r){const s=Pp(i).getElementById(r);if(s)return s}}return i}ms(nw,"getActiveElement");function aw(e){return e.tagName==="IFRAME"}ms(aw,"isFrame");var Mn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},e9=Object.defineProperty,t9=(e,a)=>e9(e,"name",{value:a,configurable:!0}),Vy=Mc[" useEffectEvent ".trim().toString()],$y=Mc[" useInsertionEffect ".trim().toString()];function iw(e){if(typeof Vy=="function")return Vy(e);const a=S.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof $y=="function"?$y(()=>{a.current=e}):Mn(()=>{a.current=e}),S.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}t9(iw,"useEffectEvent");var n9=Object.defineProperty,Oc=(e,a)=>n9(e,"name",{value:a,configurable:!0}),a9=Mc[" useInsertionEffect ".trim().toString()]||Mn;function Sc({prop:e,defaultProp:a,onChange:i=Oc(()=>{},"onChange"),caller:r}){const[s,u,d]=rw({defaultProp:a,onChange:i}),f=e!==void 0,m=f?e:s,v=S.useCallback(y=>{var g;if(f){const b=lw(y)?y(e):y;b!==e&&((g=d.current)==null||g.call(d,b))}else u(y)},[f,e,u,d]);return[m,v]}Oc(Sc,"useControllableState");function rw({defaultProp:e,onChange:a}){const[i,r]=S.useState(e),s=S.useRef(i),u=S.useRef(a);return a9(()=>{u.current=a},[a]),S.useEffect(()=>{var d;s.current!==i&&((d=u.current)==null||d.call(u,i),s.current=i)},[i,s]),[i,r,u]}Oc(rw,"useUncontrolledState");function lw(e){return typeof e=="function"}Oc(lw,"isFunction");var Gy=Symbol("RADIX:SYNC_STATE");function i9(e,a,i,r){const{prop:s,defaultProp:u,onChange:d,caller:f}=a,m=s!==void 0,v=iw(d),y=[{...i,state:u}];r&&y.push(r);const[g,b]=S.useReducer((C,T)=>{if(T.type===Gy)return{...C,state:T.state};const M=e(C,T);return m&&!Object.is(M.state,C.state)&&v(M.state),M},...y),j=g.state,w=S.useRef(j);S.useEffect(()=>{w.current!==j&&(w.current=j,m||v(j))},[j,w,m]);const k=S.useMemo(()=>s!==void 0?{...g,state:s}:g,[g,s]);return S.useEffect(()=>{m&&!Object.is(s,g.state)&&b({type:Gy,state:s})},[s,g.state,m]),[k,b]}Oc(i9,"useControllableStateReducer");var r9=Object.defineProperty,mr=(e,a)=>r9(e,"name",{value:a,configurable:!0});function ow(e,a){return S.useReducer((i,r)=>a[i][r]??i,e)}mr(ow,"useStateMachine");var qi=mr(e=>{const{present:a,children:i}=e,r=sw(a),s=typeof i=="function"?i({present:r.isPresent}):S.Children.only(i),u=cw(r.ref,uw(s));return typeof i=="function"||r.isPresent?S.cloneElement(s,{ref:u}):null},"Presence");function sw(e){const[a,i]=S.useState(),r=S.useRef(null),s=S.useRef(e),u=S.useRef("none"),d=S.useRef(void 0),f=e?"mounted":"unmounted",[m,v]=ow(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{m==="mounted"?(u.current=d.current??is(r.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=r.current,g=s.current;if(g!==e){const j=u.current,w=is(y);e?(d.current=w,v("MOUNT")):w==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(g&&j!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,v]),Mn(()=>{if(a){let y;const g=a.ownerDocument.defaultView??window,b=mr(w=>{const C=is(r.current).includes(CSS.escape(w.animationName));if(w.target===a&&C&&(v("ANIMATION_END"),!s.current)){const T=a.style.animationFillMode;a.style.animationFillMode="forwards",y=g.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=T)})}},"handleAnimationEnd"),j=mr(w=>{w.target===a&&(u.current=is(r.current))},"handleAnimationStart");return a.addEventListener("animationstart",j),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{g.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:S.useCallback(y=>{if(y){const g=getComputedStyle(y);r.current=g,d.current=is(g)}else r.current=null;i(y)},[])}}mr(sw,"usePresence");function Hp(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}mr(Hp,"setRef");function cw(...e){const a=S.useRef(e);return a.current=e,S.useCallback(i=>{const r=a.current;let s=!1;const u=r.map(d=>{const f=Hp(d,i);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():Hp(r[d],null)}}},[])}mr(cw,"useStableComposedRefs");function is(e){return(e==null?void 0:e.animationName)||"none"}mr(is,"getAnimationName");function uw(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}mr(uw,"getElementRef");var l9=Object.defineProperty,o9=(e,a)=>l9(e,"name",{value:a,configurable:!0}),s9=Mc[" useId ".trim().toString()]||(()=>{}),c9=0;function Jl(e){const[a,i]=S.useState(s9());return Mn(()=>{e||i(r=>r??String(c9++))},[e]),e||(a?`radix-${a}`:"")}o9(Jl,"useId");var u9=Object.defineProperty,d9=(e,a)=>u9(e,"name",{value:a,configurable:!0}),f9=S.createContext(void 0);function _0(e){const a=S.useContext(f9);return e||a||"ltr"}d9(_0,"useDirection");var h9=Object.defineProperty,m9=(e,a)=>h9(e,"name",{value:a,configurable:!0});function _n(e){const a=S.useRef(e);return S.useEffect(()=>{a.current=e}),S.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}m9(_n,"useCallbackRef");var p9=Object.defineProperty,vn=(e,a)=>p9(e,"name",{value:a,configurable:!0}),Up="dismissableLayer.update",g9="dismissableLayer.pointerDownOutside",v9="dismissableLayer.focusOutside",Yy,dw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),M0=S.forwardRef(vn(function(a,i){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,...y}=a,g=S.useContext(dw),[b,j]=S.useState(null),w=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=S.useState({}),C=kt(i,j),T=Array.from(g.layers),[M]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),E=M?T.indexOf(M):-1,R=b?T.indexOf(b):-1,D=g.layersWithOutsidePointerEventsDisabled.size>0,A=R>=E,H=S.useRef(!1),U=hw(F=>{d==null||d(F),m==null||m(F),F.defaultPrevented||v==null||v()},{ownerDocument:w,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:H,dismissableSurfaces:g.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(F=>{if(!(F instanceof Node))return!1;const J=[...g.branches].some(G=>G.contains(F));return A&&!J},[g.branches,A])}),Y=mw(F=>{if(s&&H.current)return;const J=F.target;[...g.branches].some($=>$.contains(J))||(f==null||f(F),m==null||m(F),F.defaultPrevented||v==null||v())},w),z=b?R===T.length-1:!1,V=_n(F=>{F.key==="Escape"&&(u==null||u(F),!F.defaultPrevented&&v&&(F.preventDefault(),v()))});return S.useEffect(()=>{if(z)return w.addEventListener("keydown",V,{capture:!0}),()=>w.removeEventListener("keydown",V,{capture:!0})},[w,z,V]),S.useEffect(()=>{if(b)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Yy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),qp(),()=>{r&&(g.layersWithOutsidePointerEventsDisabled.delete(b),g.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=Yy))}},[b,w,r,g]),S.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),qp())},[b,g]),S.useEffect(()=>{const F=vn(()=>k({}),"handleUpdate");return document.addEventListener(Up,F),()=>document.removeEventListener(Up,F)},[]),o.jsx(Lt.div,{...y,ref:C,style:{pointerEvents:D?A?"auto":"none":void 0,...a.style},onFocusCapture:pt(a.onFocusCapture,Y.onFocusCapture),onBlurCapture:pt(a.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:pt(a.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function fw(){const e=S.useContext(dw),[a,i]=S.useState(null);return S.useEffect(()=>{if(a)return e.dismissableSurfaces.add(a),()=>{e.dismissableSurfaces.delete(a)}},[a,e.dismissableSurfaces]),i}vn(fw,"useDismissableLayerSurface");var y9=vn(()=>!0,"IS_TRUE");function hw(e,a){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=y9}=a,f=_n(e),m=S.useRef(!1),v=S.useRef(!1),y=S.useRef(new Map),g=S.useRef(()=>{});return S.useEffect(()=>{function b(){v.current=!1,s.current=!1,y.current.clear()}vn(b,"resetOutsideInteraction");function j(){return Array.from(y.current.values()).some(Boolean)}vn(j,"isOutsideInteractionIntercepted");function w(E){if(!v.current)return;const R=E.target;R instanceof Node&&[...u].some(A=>A.contains(R))||y.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{v.current&&g.current()},0)}vn(w,"handleInteractionCapture");function k(E){v.current&&y.current.set(E.type,!1)}vn(k,"handleInteractionBubble");const C=vn(E=>{if(E.target&&!m.current){let R=function(){i.removeEventListener("click",g.current);const A=j();b(),A||R0(g9,f,D,{discrete:!0})};if(vn(R,"handleAndDispatchPointerDownOutsideEvent"),!d(E.target)){i.removeEventListener("click",g.current),b(),m.current=!1;return}const D={originalEvent:E};v.current=!0,s.current=r&&E.button===0,y.current.clear(),!r||E.button!==0?R():(i.removeEventListener("click",g.current),g.current=R,i.addEventListener("click",g.current,{once:!0}))}else i.removeEventListener("click",g.current),b();m.current=!1},"handlePointerDown"),T=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of T)i.addEventListener(E,w,!0),i.addEventListener(E,k);const M=window.setTimeout(()=>{i.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),i.removeEventListener("pointerdown",C),i.removeEventListener("click",g.current);for(const E of T)i.removeEventListener(E,w,!0),i.removeEventListener(E,k)}},[i,f,r,s,u,d]),{onPointerDownCapture:vn(()=>m.current=!0,"onPointerDownCapture")}}vn(hw,"usePointerDownOutside");function mw(e,a=globalThis==null?void 0:globalThis.document){const i=_n(e),r=S.useRef(!1);return S.useEffect(()=>{const s=vn(u=>{u.target&&!r.current&&R0(v9,i,{originalEvent:u},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,i]),{onFocusCapture:vn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:vn(()=>r.current=!1,"onBlurCapture")}}vn(mw,"useFocusOutside");function qp(){const e=new CustomEvent(Up);document.dispatchEvent(e)}vn(qp,"dispatchUpdate");function R0(e,a,i,{discrete:r}){const s=i.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});a&&s.addEventListener(e,a,{once:!0}),r?X4(s,u):s.dispatchEvent(u)}vn(R0,"handleAndDispatchCustomEvent");var x9=Object.defineProperty,Qn=(e,a)=>x9(e,"name",{value:a,configurable:!0}),Gm="focusScope.autoFocusOnMount",Ym="focusScope.autoFocusOnUnmount",Xy={bubbles:!1,cancelable:!0},D0=S.forwardRef(Qn(function(a,i){const{loop:r=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=a,[m,v]=S.useState(null),y=_n(u),g=_n(d),b=S.useRef(null),j=kt(i,v),w=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(s){let C=function(R){if(w.paused||!m)return;const D=R.target;m.contains(D)?b.current=D:ur(b.current,{select:!0})},T=function(R){if(w.paused||!m)return;const D=R.relatedTarget;D!==null&&(m.contains(D)||ur(b.current,{select:!0}))},M=function(R){if(document.activeElement===document.body)for(const A of R)A.removedNodes.length>0&&ur(m)};Qn(C,"handleFocusIn"),Qn(T,"handleFocusOut"),Qn(M,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",T);const E=new MutationObserver(M);return m&&E.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",T),E.disconnect()}}},[s,m,w.paused]),S.useEffect(()=>{if(m){Ky.add(w);const C=document.activeElement;if(!m.contains(C)){const M=new CustomEvent(Gm,Xy);m.addEventListener(Gm,y),m.dispatchEvent(M),M.defaultPrevented||(pw(bw(O0(m)),{select:!0}),document.activeElement===C&&ur(m))}return()=>{m.removeEventListener(Gm,y),setTimeout(()=>{const M=new CustomEvent(Ym,Xy);m.addEventListener(Ym,g),m.dispatchEvent(M),M.defaultPrevented||ur(C??document.body,{select:!0}),m.removeEventListener(Ym,g),Ky.remove(w)},0)}}},[m,y,g,w]);const k=S.useCallback(C=>{if(!r&&!s||w.paused)return;const T=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(T&&M){const E=C.currentTarget,[R,D]=gw(E);R&&D?!C.shiftKey&&M===D?(C.preventDefault(),r&&ur(R,{select:!0})):C.shiftKey&&M===R&&(C.preventDefault(),r&&ur(D,{select:!0})):M===E&&C.preventDefault()}},[r,s,w.paused]);return o.jsx(Lt.div,{tabIndex:-1,...f,ref:j,onKeyDown:k})},"FocusScope"));function pw(e,{select:a=!1}={}){const i=document.activeElement;for(const r of e)if(ur(r,{select:a}),document.activeElement!==i)return}Qn(pw,"focusFirst");function gw(e){const a=O0(e),i=Fp(a,e),r=Fp(a.reverse(),e);return[i,r]}Qn(gw,"getTabbableEdges");function O0(e){const a=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Qn(r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)a.push(i.currentNode);return a}Qn(O0,"getTabbableCandidates");function Fp(e,a){const i=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(i?!r.checkVisibility({checkVisibilityCSS:!0}):vw(r,{upTo:a})))return r}Qn(Fp,"findVisible");function vw(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}Qn(vw,"isHidden");function yw(e){return e instanceof HTMLInputElement&&"select"in e}Qn(yw,"isSelectableInput");function ur(e,{select:a=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&yw(e)&&a&&e.select()}}Qn(ur,"focus");var Ky=xw();function xw(){let e=[];return{add(a){const i=e[0];a!==i&&(i==null||i.pause()),e=Vp(e,a),e.unshift(a)},remove(a){var i;e=Vp(e,a),(i=e[0])==null||i.resume()}}}Qn(xw,"createFocusScopesStack");function Vp(e,a){const i=[...e],r=i.indexOf(a);return r!==-1&&i.splice(r,1),i}Qn(Vp,"arrayRemove");function bw(e){return e.filter(a=>a.tagName!=="A")}Qn(bw,"removeLinks");var b9=Object.defineProperty,j9=(e,a)=>b9(e,"name",{value:a,configurable:!0}),z0=S.forwardRef(j9(function(a,i){var m;const{container:r,...s}=a,[u,d]=S.useState(!1);Mn(()=>d(!0),[]);const f=r||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?co.createPortal(o.jsx(Lt.div,{...s,ref:i}),f):null},"Portal")),w9=Object.defineProperty,L0=(e,a)=>w9(e,"name",{value:a,configurable:!0}),cd=0,Ai=null;function S9(e){return zc(),e.children}L0(S9,"FocusGuards");function zc(){S.useEffect(()=>{Ai||(Ai={start:$p(),end:$p()});const{start:e,end:a}=Ai;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),cd++,()=>{cd===1&&(Ai==null||Ai.start.remove(),Ai==null||Ai.end.remove(),Ai=null),cd=Math.max(0,cd-1)}},[])}L0(zc,"useFocusGuards");function $p(){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($p,"createFocusGuard");var Ri=function(){return Ri=Object.assign||function(a){for(var i,r=1,s=arguments.length;r<s;r++){i=arguments[r];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(a[u]=i[u])}return a},Ri.apply(this,arguments)};function jw(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)a.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i}function k9(e,a,i){if(i||arguments.length===2)for(var r=0,s=a.length,u;r<s;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 Ad="right-scroll-bar-position",_d="width-before-scroll-bar",C9="with-scroll-bars-hidden",N9="--removed-body-scroll-bar-size";function Xm(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}function E9(e,a){var i=S.useState(function(){return{value:e,callback:a,facade:{get current(){return i.value},set current(r){var s=i.value;s!==r&&(i.value=r,i.callback(r,s))}}}})[0];return i.callback=a,i.facade}var T9=typeof window<"u"?S.useLayoutEffect:S.useEffect,Qy=new WeakMap;function A9(e,a){var i=E9(null,function(r){return e.forEach(function(s){return Xm(s,r)})});return T9(function(){var r=Qy.get(i);if(r){var s=new Set(r),u=new Set(e),d=i.current;s.forEach(function(f){u.has(f)||Xm(f,null)}),u.forEach(function(f){s.has(f)||Xm(f,d)})}Qy.set(i,e)},[e]),i}function _9(e){return e}function M9(e,a){a===void 0&&(a=_9);var i=[],r=!1,s={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 s}function R9(e){e===void 0&&(e={});var a=M9(null);return a.options=Ri({async:!0,ssr:!1},e),a}var ww=function(e){var a=e.sideCar,i=jw(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 S.createElement(r,Ri({},i))};ww.isSideCarExport=!0;function D9(e,a){return e.useMedium(a),ww}var Sw=R9(),Km=function(){},Wd=S.forwardRef(function(e,a){var i=S.useRef(null),r=S.useState({onScrollCapture:Km,onWheelCapture:Km,onTouchMoveCapture:Km}),s=r[0],u=r[1],d=e.forwardProps,f=e.children,m=e.className,v=e.removeScrollBar,y=e.enabled,g=e.shards,b=e.sideCar,j=e.noRelative,w=e.noIsolation,k=e.inert,C=e.allowPinchZoom,T=e.as,M=T===void 0?"div":T,E=e.gapMode,R=jw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,A=A9([i,a]),H=Ri(Ri({},R),s);return S.createElement(S.Fragment,null,y&&S.createElement(D,{sideCar:Sw,removeScrollBar:v,shards:g,noRelative:j,noIsolation:w,inert:k,setCallbacks:u,allowPinchZoom:!!C,lockRef:i,gapMode:E}),d?S.cloneElement(S.Children.only(f),Ri(Ri({},H),{ref:A})):S.createElement(M,Ri({},H,{className:m,ref:A}),f))});Wd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wd.classNames={fullWidth:_d,zeroRight:Ad};var O9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function z9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=O9();return a&&e.setAttribute("nonce",a),e}function L9(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function B9(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var I9=function(){var e=0,a=null;return{add:function(i){e==0&&(a=z9())&&(L9(a,i),B9(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},P9=function(){var e=I9();return function(a,i){S.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&i])}},kw=function(){var e=P9(),a=function(i){var r=i.styles,s=i.dynamic;return e(r,s),null};return a},H9={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},U9=function(e){var a=window.getComputedStyle(document.body),i=a[e==="padding"?"paddingLeft":"marginLeft"],r=a[e==="padding"?"paddingTop":"marginTop"],s=a[e==="padding"?"paddingRight":"marginRight"];return[Qm(i),Qm(r),Qm(s)]},q9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return H9;var a=U9(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])}},F9=kw(),os="data-scroll-locked",V9=function(e,a,i,r){var s=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),`
|
|
480
|
+
.`.concat(C9,` {
|
|
481
|
+
overflow: hidden `).concat(r,`;
|
|
482
|
+
padding-right: `).concat(f,"px ").concat(r,`;
|
|
483
|
+
}
|
|
484
|
+
body[`).concat(os,`] {
|
|
485
|
+
overflow: hidden `).concat(r,`;
|
|
486
|
+
overscroll-behavior: contain;
|
|
487
|
+
`).concat([a&&"position: relative ".concat(r,";"),i==="margin"&&`
|
|
488
|
+
padding-left: `.concat(s,`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(Ad,` {
|
|
498
|
+
right: `).concat(f,"px ").concat(r,`;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.`).concat(_d,` {
|
|
502
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.`).concat(Ad," .").concat(Ad,` {
|
|
506
|
+
right: 0 `).concat(r,`;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.`).concat(_d," .").concat(_d,` {
|
|
510
|
+
margin-right: 0 `).concat(r,`;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
body[`).concat(os,`] {
|
|
514
|
+
`).concat(N9,": ").concat(f,`px;
|
|
515
|
+
}
|
|
516
|
+
`)},Zy=function(){var e=parseInt(document.body.getAttribute(os)||"0",10);return isFinite(e)?e:0},$9=function(){S.useEffect(function(){return document.body.setAttribute(os,(Zy()+1).toString()),function(){var e=Zy()-1;e<=0?document.body.removeAttribute(os):document.body.setAttribute(os,e.toString())}},[])},G9=function(e){var a=e.noRelative,i=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;$9();var u=S.useMemo(function(){return q9(s)},[s]);return S.createElement(F9,{styles:V9(u,!a,s,i?"":"!important")})},Gp=!1;if(typeof window<"u")try{var ud=Object.defineProperty({},"passive",{get:function(){return Gp=!0,!0}});window.addEventListener("test",ud,ud),window.removeEventListener("test",ud,ud)}catch{Gp=!1}var Wo=Gp?{passive:!1}:!1,Y9=function(e){return e.tagName==="TEXTAREA"},Cw=function(e,a){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[a]!=="hidden"&&!(i.overflowY===i.overflowX&&!Y9(e)&&i[a]==="visible")},X9=function(e){return Cw(e,"overflowY")},K9=function(e){return Cw(e,"overflowX")},Jy=function(e,a){var i=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Nw(e,r);if(s){var u=Ew(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]},Z9=function(e){var a=e.scrollLeft,i=e.scrollWidth,r=e.clientWidth;return[a,i,r]},Nw=function(e,a){return e==="v"?X9(a):K9(a)},Ew=function(e,a){return e==="v"?Q9(a):Z9(a)},J9=function(e,a){return e==="h"&&a==="rtl"?-1:1},W9=function(e,a,i,r,s){var u=J9(e,window.getComputedStyle(a).direction),d=u*r,f=i.target,m=a.contains(f),v=!1,y=d>0,g=0,b=0;do{if(!f)break;var j=Ew(e,f),w=j[0],k=j[1],C=j[2],T=k-C-u*w;(w||T)&&Nw(e,f)&&(g+=T,b+=w);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(g)<1||!y&&Math.abs(b)<1)&&(v=!0),v},dd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wy=function(e){return[e.deltaX,e.deltaY]},ex=function(e){return e&&"current"in e?e.current:e},eN=function(e,a){return e[0]===a[0]&&e[1]===a[1]},tN=function(e){return`
|
|
517
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
518
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
519
|
+
`)},nN=0,es=[];function aN(e){var a=S.useRef([]),i=S.useRef([0,0]),r=S.useRef(),s=S.useState(nN++)[0],u=S.useState(kw)[0],d=S.useRef(e);S.useEffect(function(){d.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var k=k9([e.lockRef.current],(e.shards||[]).map(ex),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=S.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var T=dd(k),M=i.current,E="deltaX"in k?k.deltaX:M[0]-T[0],R="deltaY"in k?k.deltaY:M[1]-T[1],D,A=k.target,H=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in k&&H==="h"&&A.type==="range")return!1;var U=window.getSelection(),Y=U&&U.anchorNode,z=Y?Y===A||Y.contains(A):!1;if(z)return!1;var V=Jy(H,A);if(!V)return!0;if(V?D=H:(D=H==="v"?"h":"v",V=Jy(H,A)),!V)return!1;if(!r.current&&"changedTouches"in k&&(E||R)&&(r.current=D),!D)return!0;var F=r.current||D;return W9(F,C,k,F==="h"?E:R)},[]),m=S.useCallback(function(k){var C=k;if(!(!es.length||es[es.length-1]!==u)){var T="deltaY"in C?Wy(C):dd(C),M=a.current.filter(function(D){return D.name===C.type&&(D.target===C.target||C.target===D.shadowParent)&&eN(D.delta,T)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var E=(d.current.shards||[]).map(ex).filter(Boolean).filter(function(D){return D.contains(C.target)}),R=E.length>0?f(C,E[0]):!d.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),v=S.useCallback(function(k,C,T,M){var E={name:k,delta:C,target:T,should:M,shadowParent:iN(T)};a.current.push(E),setTimeout(function(){a.current=a.current.filter(function(R){return R!==E})},1)},[]),y=S.useCallback(function(k){i.current=dd(k),r.current=void 0},[]),g=S.useCallback(function(k){v(k.type,Wy(k),k.target,f(k,e.lockRef.current))},[]),b=S.useCallback(function(k){v(k.type,dd(k),k.target,f(k,e.lockRef.current))},[]);S.useEffect(function(){return es.push(u),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",m,Wo),document.addEventListener("touchmove",m,Wo),document.addEventListener("touchstart",y,Wo),function(){es=es.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,Wo),document.removeEventListener("touchmove",m,Wo),document.removeEventListener("touchstart",y,Wo)}},[]);var j=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(u,{styles:tN(s)}):null,j?S.createElement(G9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function iN(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const rN=D9(Sw,aN);var ef=S.forwardRef(function(e,a){return S.createElement(Wd,Ri({},e,{ref:a,sideCar:rN}))});ef.classNames=Wd.classNames;var lN=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},ts=new WeakMap,fd=new WeakMap,hd={},Zm=0,Tw=function(e){return e&&(e.host||Tw(e.parentNode))},oN=function(e,a){return a.map(function(i){if(e.contains(i))return i;var r=Tw(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})},sN=function(e,a,i,r){var s=oN(a,Array.isArray(e)?e:[e]);hd[i]||(hd[i]=new WeakMap);var u=hd[i],d=[],f=new Set,m=new Set(s),v=function(g){!g||f.has(g)||(f.add(g),v(g.parentNode))};s.forEach(v);var y=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(b){if(f.has(b))y(b);else try{var j=b.getAttribute(r),w=j!==null&&j!=="false",k=(ts.get(b)||0)+1,C=(u.get(b)||0)+1;ts.set(b,k),u.set(b,C),d.push(b),k===1&&w&&fd.set(b,!0),C===1&&b.setAttribute(i,"true"),w||b.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",b,T)}})};return y(a),f.clear(),Zm++,function(){d.forEach(function(g){var b=ts.get(g)-1,j=u.get(g)-1;ts.set(g,b),u.set(g,j),b||(fd.has(g)||g.removeAttribute(r),fd.delete(g)),j||g.removeAttribute(i)}),Zm--,Zm||(ts=new WeakMap,ts=new WeakMap,fd=new WeakMap,hd={})}},B0=function(e,a,i){i===void 0&&(i="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=lN(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),sN(r,s,i,"aria-hidden")):function(){return null}},cN=Object.defineProperty,ui=(e,a)=>cN(e,"name",{value:a,configurable:!0}),I0="Dialog",[Aw,TP]=ul(I0),[uN,jr]=Aw(I0),dN=ui(e=>{const{__scopeDialog:a,children:i,open:r,defaultOpen:s,onOpenChange:u,modal:d=!0}=e,f=S.useRef(null),m=S.useRef(null),[v,y]=Sc({prop:r,defaultProp:s??!1,onChange:u,caller:I0}),[g,b]=S.useState(0),[j,w]=S.useState(0);return o.jsx(uN,{scope:a,triggerRef:f,contentRef:m,contentId:Jl(),titleId:Jl(),descriptionId:Jl(),titlePresent:g>0,descriptionPresent:j>0,setTitleCount:b,setDescriptionCount:w,open:v,onOpenChange:y,onOpenToggle:S.useCallback(()=>y(k=>!k),[y]),modal:d,children:i})},"Dialog"),_w="DialogPortal",[fN,Mw]=Aw(_w,{forceMount:void 0}),hN=ui(e=>{const{__scopeDialog:a,forceMount:i,children:r,container:s}=e,u=jr(_w,a);return o.jsx(fN,{scope:a,forceMount:i,children:S.Children.map(r,d=>o.jsx(qi,{present:i||u.open,children:o.jsx(z0,{asChild:!0,container:s,children:d})}))})},"DialogPortal"),Yp="DialogOverlay",mN=S.forwardRef(ui(function(a,i){const r=Mw(Yp,a.__scopeDialog),{forceMount:s=r.forceMount,...u}=a,d=jr(Yp,a.__scopeDialog);return d.modal?o.jsx(qi,{present:s||d.open,children:o.jsx(gN,{...u,ref:i})}):null},"DialogOverlay")),pN=Bi("DialogOverlay.RemoveScroll"),gN=S.forwardRef(ui(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(Yp,r),d=fw(),f=kt(i,d);return o.jsx(ef,{as:pN,allowPinchZoom:!0,shards:[u.contentRef],children:o.jsx(Lt.div,{"data-state":P0(u.open),...s,ref:f,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),kc="DialogContent",vN=S.forwardRef(ui(function(a,i){const r=Mw(kc,a.__scopeDialog),{forceMount:s=r.forceMount,...u}=a,d=jr(kc,a.__scopeDialog);return o.jsx(qi,{present:s||d.open,children:d.modal?o.jsx(yN,{...u,ref:i}):o.jsx(xN,{...u,ref:i})})},"DialogContent")),yN=S.forwardRef(ui(function(a,i){const r=jr(kc,a.__scopeDialog),s=S.useRef(null),u=kt(i,r.contentRef,s);return S.useEffect(()=>{const d=s.current;if(d)return B0(d)},[]),o.jsx(Rw,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:pt(a.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:pt(a.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:pt(a.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),xN=S.forwardRef(ui(function(a,i){const r=jr(kc,a.__scopeDialog),s=S.useRef(!1),u=S.useRef(!1);return o.jsx(Rw,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(s.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(s.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")),Rw=S.forwardRef(ui(function(a,i){const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=a,m=jr(kc,r);return zc(),o.jsx(o.Fragment,{children:o.jsx(D0,{asChild:!0,loop:!0,trapped:s,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")),bN="DialogTitle",jN=S.forwardRef(ui(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(bN,r),{setTitleCount:d}=u;return Mn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),o.jsx(Lt.h2,{id:u.titleId,...s,ref:i})},"DialogTitle")),wN="DialogClose",SN=S.forwardRef(ui(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(wN,r);return o.jsx(Lt.button,{type:"button",...s,ref:i,onClick:pt(a.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function P0(e){return e?"open":"closed"}ui(P0,"getState");var kN=Object.defineProperty,CN=(e,a)=>kN(e,"name",{value:a,configurable:!0});function Dw(e){const[a,i]=S.useState(void 0);return Mn(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[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}CN(Dw,"useSize");const NN=["top","right","bottom","left"],sl=Math.min,dr=Math.max,Bd=Math.round,md=Math.floor,fr=e=>({x:e,y:e}),EN={left:"right",right:"left",bottom:"top",top:"bottom"};function Ow(e,a,i){return dr(e,sl(a,i))}function pr(e,a){return typeof e=="function"?e(a):e}function cl(e){return e.split("-")[0]}function ps(e){return e.split("-")[1]}function H0(e){return e==="x"?"y":"x"}function U0(e){return e==="y"?"height":"width"}function Oi(e){const a=e[0];return a==="t"||a==="b"?"y":"x"}function q0(e){return H0(Oi(e))}function TN(e,a,i){i===void 0&&(i=!1);const r=ps(e),s=q0(e),u=U0(s);let d=s==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(d=Id(d)),[d,Id(d)]}function AN(e){const a=Id(e);return[Xp(e),a,Xp(a)]}function Xp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tx=["left","right"],nx=["right","left"],_N=["top","bottom"],MN=["bottom","top"];function RN(e,a,i){switch(e){case"top":case"bottom":return i?a?nx:tx:a?tx:nx;case"left":case"right":return a?_N:MN;default:return[]}}function DN(e,a,i,r){const s=ps(e);let u=RN(cl(e),i==="start",r);return s&&(u=u.map(d=>d+"-"+s),a&&(u=u.concat(u.map(Xp)))),u}function Id(e){const a=cl(e);return EN[a]+e.slice(a.length)}function ON(e){var a,i,r,s;return{top:(a=e.top)!=null?a:0,right:(i=e.right)!=null?i:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function zw(e){return typeof e!="number"?ON(e):{top:e,right:e,bottom:e,left:e}}function Pd(e){const{x:a,y:i,width:r,height:s}=e;return{width:r,height:s,top:i,left:a,right:a+r,bottom:i+s,x:a,y:i}}function ax(e,a,i){let{reference:r,floating:s}=e;const u=Oi(a),d=q0(a),f=U0(d),m=cl(a),v=u==="y",y=r.x+r.width/2-s.width/2,g=r.y+r.height/2-s.height/2,b=r[f]/2-s[f]/2;let j;switch(m){case"top":j={x:y,y:r.y-s.height};break;case"bottom":j={x:y,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:g};break;case"left":j={x:r.x-s.width,y:g};break;default:j={x:r.x,y:r.y}}const w=ps(a);return w&&(j[d]+=b*(w==="end"?1:-1)*(i&&v?-1:1)),j}async function zN(e,a){var i;a===void 0&&(a={});const{x:r,y:s,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:j=0}=pr(a,e),w=zw(j),C=f[b?g==="floating"?"reference":"floating":g],T=Pd(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=g==="floating"?{x:r,y:s,width:d.floating.width,height:d.floating.height}:d.reference,E=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),R=await(u.isElement==null?void 0:u.isElement(E))&&await(u.getScale==null?void 0:u.getScale(E))||{x:1,y:1},D=Pd(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:E,strategy:m}):M);return{top:(T.top-D.top+w.top)/R.y,bottom:(D.bottom-T.bottom+w.bottom)/R.y,left:(T.left-D.left+w.left)/R.x,right:(D.right-T.right+w.right)/R.x}}const LN=50,BN=async(e,a,i)=>{const{placement:r="bottom",strategy:s="absolute",middleware:u=[],platform:d}=i,f=d.detectOverflow?d:{...d,detectOverflow:zN},m=await(d.isRTL==null?void 0:d.isRTL(a));let v=await d.getElementRects({reference:e,floating:a,strategy:s}),{x:y,y:g}=ax(v,r,m),b=r,j=0;const w={};for(let k=0;k<u.length;k++){const C=u[k];if(!C)continue;const{name:T,fn:M}=C,{x:E,y:R,data:D,reset:A}=await M({x:y,y:g,initialPlacement:r,placement:b,strategy:s,middlewareData:w,rects:v,platform:f,elements:{reference:e,floating:a}});y=E??y,g=R??g,w[T]={...w[T],...D},A&&j<LN&&(j++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(v=A.rects===!0?await d.getElementRects({reference:e,floating:a,strategy:s}):A.rects),{x:y,y:g}=ax(v,b,m)),k=-1)}return{x:y,y:g,placement:b,strategy:s,middlewareData:w}},IN=e=>({name:"arrow",options:e,async fn(a){const{x:i,y:r,placement:s,rects:u,platform:d,elements:f,middlewareData:m}=a,{element:v,padding:y=0}=pr(e,a)||{};if(v==null)return{};const g=zw(y),b={x:i,y:r},j=q0(s),w=U0(j),k=await d.getDimensions(v),C=j==="y",T=C?"top":"left",M=C?"bottom":"right",E=C?"clientHeight":"clientWidth",R=u.reference[w]+u.reference[j]-b[j]-u.floating[w],D=b[j]-u.reference[j],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let H=A?A[E]:0;(!H||!await(d.isElement==null?void 0:d.isElement(A)))&&(H=f.floating[E]||u.floating[w]);const U=R/2-D/2,Y=H/2-k[w]/2-1,z=sl(g[T],Y),V=sl(g[M],Y),F=H-k[w]-V,J=H/2-k[w]/2+U,G=Ow(z,J,F),$=!m.arrow&&ps(s)!=null&&J!==G&&u.reference[w]/2-(J<z?z:V)-k[w]/2<0,K=$?J<z?J-z:J-F:0;return{[j]:b[j]+K,data:{[j]:G,centerOffset:J-G-K,...$&&{alignmentOffset:K}},reset:$}}}),PN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var i,r;const{placement:s,middlewareData:u,rects:d,initialPlacement:f,platform:m,elements:v}=a,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:k=!0,...C}=pr(e,a);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const T=cl(s),M=Oi(f),E=cl(f)===f,R=await(m.isRTL==null?void 0:m.isRTL(v.floating)),D=b||(E||!k?[Id(f)]:AN(f)),A=w!=="none";!b&&A&&D.push(...DN(f,k,w,R));const H=[f,...D],U=await m.detectOverflow(a,C),Y=[];let z=((r=u.flip)==null?void 0:r.overflows)||[];if(y&&Y.push(U[T]),g){const G=TN(s,d,R);Y.push(U[G[0]],U[G[1]])}if(z=[...z,{placement:s,overflows:Y}],!Y.every(G=>G<=0)){var V,F;const G=(((V=u.flip)==null?void 0:V.index)||0)+1,$=H[G];if($&&(!(g==="alignment"?M!==Oi($):!1)||z.every(P=>Oi(P.placement)===M?P.overflows[0]>0:!0)))return{data:{index:G,overflows:z},reset:{placement:$}};let K=(F=z.filter(I=>I.overflows[0]<=0).sort((I,P)=>I.overflows[1]-P.overflows[1])[0])==null?void 0:F.placement;if(!K)switch(j){case"bestFit":{var J;const I=(J=z.filter(P=>{if(A){const W=Oi(P.placement);return W===M||W==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(W=>W>0).reduce((W,_)=>W+_,0)]).sort((P,W)=>P[1]-W[1])[0])==null?void 0:J[0];I&&(K=I);break}case"initialPlacement":K=f;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function ix(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function rx(e){return NN.some(a=>e[a]>=0)}const HN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){const{rects:i,platform:r}=a,{strategy:s="referenceHidden",...u}=pr(e,a);switch(s){case"referenceHidden":{const d=await r.detectOverflow(a,{...u,elementContext:"reference"}),f=ix(d,i.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:rx(f)}}}case"escaped":{const d=await r.detectOverflow(a,{...u,altBoundary:!0}),f=ix(d,i.floating);return{data:{escapedOffsets:f,escaped:rx(f)}}}default:return{}}}}},Lw=new Set(["left","top"]);async function UN(e,a){const{placement:i,platform:r,elements:s}=e,u=await(r.isRTL==null?void 0:r.isRTL(s.floating)),d=cl(i),f=ps(i),m=Oi(i)==="y",v=Lw.has(d)?-1:1,y=u&&m?-1:1,g=pr(a,e);let{mainAxis:b,crossAxis:j,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(j=f==="end"?w*-1:w),m?{x:j*y,y:b*v}:{x:b*v,y:j*y}}const qN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var i,r;const{x:s,y:u,placement:d,middlewareData:f}=a,m=await UN(a,e);return d===((i=f.offset)==null?void 0:i.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:s+m.x,y:u+m.y,data:{...m,placement:d}}}}},FN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){const{x:i,y:r,placement:s,platform:u}=a,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:E,y:R}=M;return{x:E,y:R}}},...v}=pr(e,a),y={x:i,y:r},g=await u.detectOverflow(a,v),b=Oi(s),j=H0(b);let w=y[j],k=y[b];const C=(M,E)=>Ow(E+g[M==="y"?"top":"left"],E,E-g[M==="y"?"bottom":"right"]);d&&(w=C(j,w)),f&&(k=C(b,k));const T=m.fn({...a,[j]:w,[b]:k});return{...T,data:{x:T.x-i,y:T.y-r,enabled:{[j]:d,[b]:f}}}}}},VN=function(e){return e===void 0&&(e={}),{options:e,fn(a){var i,r;const{x:s,y:u,placement:d,rects:f,middlewareData:m}=a,{offset:v=0,mainAxis:y=!0,crossAxis:g=!0}=pr(e,a),b={x:s,y:u},j=Oi(d),w=H0(j);let k=b[w],C=b[j];const T=pr(v,a),M=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(i=T.mainAxis)!=null?i:0,crossAxis:(r=T.crossAxis)!=null?r:0};if(y){const D=w==="y"?"height":"width",A=f.reference[w]-f.floating[D]+M.mainAxis,H=f.reference[w]+f.reference[D]-M.mainAxis;k<A?k=A:k>H&&(k=H)}if(g){var E,R;const D=w==="y"?"width":"height",A=Lw.has(cl(d)),H=f.reference[j]-f.floating[D]+(A&&((E=m.offset)==null?void 0:E[j])||0)+(A?0:M.crossAxis),U=f.reference[j]+f.reference[D]+(A?0:((R=m.offset)==null?void 0:R[j])||0)-(A?M.crossAxis:0);C<H?C=H:C>U&&(C=U)}return{[w]:k,[j]:C}}}},$N=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(a){const{placement:i,rects:r,platform:s,elements:u}=a,{apply:d=()=>{},...f}=pr(e,a),m=await s.detectOverflow(a,f),v=cl(i),y=ps(i),g=Oi(i)==="y",{width:b,height:j}=r.floating;let w,k;v==="top"||v==="bottom"?(w=v,k=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,w=y==="end"?"top":"bottom");const C=j-m.top-m.bottom,T=b-m.left-m.right,M=sl(j-m[w],C),E=sl(b-m[k],T),R=a.middlewareData.shift,D=!R;let A=M,H=E;R!=null&&R.enabled.x&&(H=T),R!=null&&R.enabled.y&&(A=C),D&&!y&&(g?H=b-2*dr(m.left,m.right):A=j-2*dr(m.top,m.bottom)),await d({...a,availableWidth:H,availableHeight:A});const U=await s.getDimensions(u.floating);return b!==U.width||j!==U.height?{reset:{rects:!0}}:{}}}};function tf(){return typeof window<"u"}function gs(e){return Bw(e)?(e.nodeName||"").toLowerCase():"#document"}function ca(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function wr(e){var a;return(a=(Bw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function Bw(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 dl(e){return tf()?e instanceof HTMLElement||e instanceof ca(e).HTMLElement:!1}function lx(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:s}=Pi(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&s!=="inline"&&s!=="contents"}function GN(e){return/^(table|td|th)$/.test(gs(e))}function af(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const YN=/transform|translate|scale|rotate|perspective|filter/,XN=/paint|layout|strict|content/,$l=e=>!!e&&e!=="none";let Jm;function F0(e){const a=Ii(e)?Pi(e):e;return $l(a.transform)||$l(a.translate)||$l(a.scale)||$l(a.rotate)||$l(a.perspective)||!V0()&&($l(a.backdropFilter)||$l(a.filter))||YN.test(a.willChange||"")||XN.test(a.contain||"")}function KN(e){let a=ao(e);for(;dl(a)&&!Cc(a);){if(F0(a))return a;if(af(a))return null;a=ao(a)}return null}function V0(){return Jm==null&&(Jm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jm}function Cc(e){return/^(html|body|#document)$/.test(gs(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 ao(e){if(gs(e)==="html")return e;const a=e.assignedSlot||e.parentNode||lx(e)&&e.host||wr(e);return lx(a)?a.host:a}function Iw(e){const a=ao(e);return Cc(a)?(e.ownerDocument||e).body:dl(a)&&nf(a)?a:Iw(a)}function Nc(e,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const s=Iw(e),u=s===((r=e.ownerDocument)==null?void 0:r.body),d=ca(s);if(u){const f=Kp(d);return a.concat(d,d.visualViewport||[],nf(s)?s:[],f&&i?Nc(f):[])}else return a.concat(s,Nc(s,[],i))}function Kp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pw(e){const a=Pi(e);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const s=dl(e),u=s?e.offsetWidth:i,d=s?e.offsetHeight:r,f=Bd(i)!==u||Bd(r)!==d;return f&&(i=u,r=d),{width:i,height:r,$:f}}function $0(e){return Ii(e)?e:e.contextElement}function ss(e){const a=$0(e);if(!dl(a))return fr(1);const i=a.getBoundingClientRect(),{width:r,height:s,$:u}=Pw(a);let d=(u?Bd(i.width):i.width)/r,f=(u?Bd(i.height):i.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const QN=fr(0);function Hw(e){const a=ca(e);return!V0()||!a.visualViewport?QN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function ZN(e,a,i){return a===void 0&&(a=!1),!!i&&a&&i===ca(e)}function io(e,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const s=e.getBoundingClientRect(),u=$0(e);let d=fr(1);a&&(r?Ii(r)&&(d=ss(r)):d=ss(e));const f=ZN(u,i,r)?Hw(u):fr(0);let m=(s.left+f.x)/d.x,v=(s.top+f.y)/d.y,y=s.width/d.x,g=s.height/d.y;if(u&&r){const b=ca(u),j=Ii(r)?ca(r):r;let w=b,k=Kp(w);for(;k&&j!==w;){const C=ss(k),T=k.getBoundingClientRect(),M=Pi(k),E=T.left+(k.clientLeft+parseFloat(M.paddingLeft))*C.x,R=T.top+(k.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,v*=C.y,y*=C.x,g*=C.y,m+=E,v+=R,w=ca(k),k=Kp(w)}}return Pd({width:y,height:g,x:m,y:v})}function lf(e,a){const i=rf(e).scrollLeft;return a?a.left+i:io(wr(e)).left+i}function Uw(e,a){const i=e.getBoundingClientRect(),r=i.left+a.scrollLeft-lf(e,i),s=i.top+a.scrollTop;return{x:r,y:s}}function JN(e){let{elements:a,rect:i,offsetParent:r,strategy:s}=e;const u=s==="fixed",d=wr(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),g=dl(r);if((g||!u)&&((gs(r)!=="body"||nf(d))&&(m=rf(r)),g)){const j=io(r);v=ss(r),y.x=j.x+r.clientLeft,y.y=j.y+r.clientTop}const b=d&&!g&&!u?Uw(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 WN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function eE(e){const a=rf(e),i=e.ownerDocument.body,r=dr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=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:s,x:u,y:d}}const tE=25;function nE(e,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",s=ca(e),u=wr(e),d=s.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,w=getComputedStyle(j),k=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,C=Math.abs(u.clientWidth-j.clientWidth-k),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?C/2:C;T<=tE&&(f-=T)}return{width:f,height:m,x:v,y}}function aE(e,a){const i=io(e,!0,a==="fixed"),r=i.top+e.clientTop,s=i.left+e.clientLeft,u=ss(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=s*u.x,v=r*u.y;return{width:d,height:f,x:m,y:v}}function ox(e,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=nE(e,i,a);else if(a==="document")r=eE(wr(e));else if(Ii(a))r=aE(a,i);else{const s=Hw(e);r={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Pd(r)}function iE(e,a){const i=a.get(e);if(i)return i;let r=Nc(e,[],!1).filter(f=>Ii(f)&&gs(f)!=="body"),s=null;const u=Pi(e).position==="fixed";let d=u?ao(e):e;for(;Ii(d)&&!Cc(d);){const f=Pi(d),m=F0(d),v=s?s.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&f.position==="static")?r=r.filter(g=>g!==d):s=f,d=ao(d)}return a.set(e,r),r}function rE(e){let{element:a,boundary:i,rootBoundary:r,strategy:s}=e;const d=[...i==="clippingAncestors"?af(a)?[]:iE(a,this._c):[].concat(i),r],f=ox(a,d[0],s);let m=f.top,v=f.right,y=f.bottom,g=f.left;for(let b=1;b<d.length;b++){const j=ox(a,d[b],s);m=dr(j.top,m),v=sl(j.right,v),y=sl(j.bottom,y),g=dr(j.left,g)}return{width:v-g,height:y-m,x:g,y:m}}function lE(e){const{width:a,height:i}=Pw(e);return{width:a,height:i}}function oE(e,a,i){const r=dl(a),s=wr(a),u=i==="fixed",d=io(e,!0,u,a);let f={scrollLeft:0,scrollTop:0};const m=fr(0);if((r||!u)&&((gs(a)!=="body"||nf(s))&&(f=rf(a)),r)){const b=io(a,!0,u,a);m.x=b.x+a.clientLeft,m.y=b.y+a.clientTop}!r&&s&&(m.x=lf(s));const v=s&&!r&&!u?Uw(s,f):fr(0),y=d.left+f.scrollLeft-m.x-v.x,g=d.top+f.scrollTop-m.y-v.y;return{x:y,y:g,width:d.width,height:d.height}}function Wm(e){return Pi(e).position==="static"}function sx(e,a){if(!dl(e)||Pi(e).position==="fixed")return null;if(a)return a(e);let i=e.offsetParent;return wr(e)===i&&(i=i.ownerDocument.body),i}function qw(e,a){const i=ca(e);if(af(e))return i;if(!dl(e)){let s=ao(e);for(;s&&!Cc(s);){if(Ii(s)&&!Wm(s))return s;s=ao(s)}return i}let r=sx(e,a);for(;r&&GN(r)&&Wm(r);)r=sx(r,a);return r&&Cc(r)&&Wm(r)&&!F0(r)?i:r||KN(e)||i}const sE=async function(e){const a=this.getOffsetParent||qw,i=this.getDimensions,r=await i(e.floating);return{reference:oE(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cE(e){return Pi(e).direction==="rtl"}const uE={convertOffsetParentRelativeRectToViewportRelativeRect:JN,getDocumentElement:wr,getClippingRect:rE,getOffsetParent:qw,getElementRects:sE,getClientRects:WN,getDimensions:lE,getScale:ss,isElement:Ii,isRTL:cE};function Fw(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function dE(e,a,i){let r=null,s;const u=wr(e);function d(){var y;clearTimeout(s),(y=r)==null||y.disconnect(),r=null}function f(y,g){y===void 0&&(y=!1),g===void 0&&(g=1),d();const b=e.getBoundingClientRect(),{left:j,top:w,width:k,height:C}=b;if(y||a(),!k||!C)return;const T=md(w),M=md(u.clientWidth-(j+k)),E=md(u.clientHeight-(w+C)),R=md(j),A={rootMargin:-T+"px "+-M+"px "+-E+"px "+-R+"px",threshold:dr(0,sl(1,g))||1};let H=!0;function U(Y){const z=Y[0].intersectionRatio;if(!Fw(b,e.getBoundingClientRect()))return f();if(z!==g){if(!H)return f();z?f(!1,z):s=setTimeout(()=>{f(!1,1e-7)},1e3)}H=!1}try{r=new IntersectionObserver(U,{...A,root:u.ownerDocument})}catch{r=new IntersectionObserver(U,A)}r.observe(e)}const m=ca(e),v=()=>f(i);return m.addEventListener("resize",v),f(!0),()=>{m.removeEventListener("resize",v),d()}}function fE(e,a,i,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,v=$0(e),y=s||u?[...v?Nc(v):[],...a?Nc(a):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",i),u&&T.addEventListener("resize",i)});const g=v&&f?dE(v,i,u):null;let b=-1,j=null;d&&(j=new ResizeObserver(T=>{let[M]=T;M&&M.target===v&&j&&a&&(j.unobserve(a),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var E;(E=j)==null||E.observe(a)})),i()}),v&&!m&&j.observe(v),a&&j.observe(a));let w,k=m?io(e):null;m&&C();function C(){const T=io(e);k&&!Fw(k,T)&&i(),k=T,w=requestAnimationFrame(C)}return i(),()=>{var T;y.forEach(M=>{s&&M.removeEventListener("scroll",i),u&&M.removeEventListener("resize",i)}),g==null||g(),(T=j)==null||T.disconnect(),j=null,m&&cancelAnimationFrame(w)}}const hE=qN,mE=FN,pE=PN,gE=$N,vE=HN,cx=IN,yE=VN,xE=(e,a,i)=>{const r=new Map,s=i??{},u={...uE,...s.platform,_c:r};return BN(e,a,{...s,platform:u})};var bE=typeof document<"u",jE=function(){},Md=bE?S.useLayoutEffect:jE;function Hd(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,s;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(!Hd(e[r],a[r]))return!1;return!0}if(s=Object.keys(e),i=s.length,i!==Object.keys(a).length)return!1;for(r=i;r--!==0;)if(!{}.hasOwnProperty.call(a,s[r]))return!1;for(r=i;r--!==0;){const u=s[r];if(!(u==="_owner"&&e.$$typeof)&&!Hd(e[u],a[u]))return!1}return!0}return e!==e&&a!==a}function Vw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ux(e,a){const i=Vw(e);return Math.round(a*i)/i}function ep(e){const a=S.useRef(e);return Md(()=>{a.current=e}),a}function wE(e){e===void 0&&(e={});const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:s,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:m,open:v}=e,[y,g]=S.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[b,j]=S.useState(r);Hd(b,r)||j(r);const[w,k]=S.useState(null),[C,T]=S.useState(null),M=S.useCallback(P=>{P!==A.current&&(A.current=P,k(P))},[]),E=S.useCallback(P=>{P!==H.current&&(H.current=P,T(P))},[]),R=u||w,D=d||C,A=S.useRef(null),H=S.useRef(null),U=S.useRef(y),Y=m!=null,z=ep(m),V=ep(s),F=ep(v),J=S.useCallback(()=>{if(!A.current||!H.current)return;const P={placement:a,strategy:i,middleware:b};V.current&&(P.platform=V.current),xE(A.current,H.current,P).then(W=>{const _={...W,isPositioned:F.current!==!1};G.current&&!Hd(U.current,_)&&(U.current=_,co.flushSync(()=>{g(_)}))})},[b,a,i,V,F]);Md(()=>{v===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,g(P=>({...P,isPositioned:!1})))},[v]);const G=S.useRef(!1);Md(()=>(G.current=!0,()=>{G.current=!1}),[]),Md(()=>{if(R&&(A.current=R),D&&(H.current=D),R&&D){if(z.current)return z.current(R,D,J);J()}},[R,D,J,z,Y]);const $=S.useMemo(()=>({reference:A,floating:H,setReference:M,setFloating:E}),[M,E]),K=S.useMemo(()=>({reference:R,floating:D}),[R,D]),I=S.useMemo(()=>{const P={position:i,left:0,top:0};if(!K.floating)return P;const W=ux(K.floating,y.x),_=ux(K.floating,y.y);return f?{...P,transform:"translate("+W+"px, "+_+"px)",...Vw(K.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:W,top:_}},[i,f,K.floating,y.x,y.y]);return S.useMemo(()=>({...y,update:J,refs:$,elements:K,floatingStyles:I}),[y,J,$,K,I])}const SE=e=>{function a(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){const{element:r,padding:s}=typeof e=="function"?e(i):e;return r&&a(r)?r.current!=null?cx({element:r.current,padding:s}).fn(i):{}:r?cx({element:r,padding:s}).fn(i):{}}}},kE=(e,a)=>{const i=hE(e);return{name:i.name,fn:i.fn,options:[e,a]}},CE=(e,a)=>{const i=mE(e);return{name:i.name,fn:i.fn,options:[e,a]}},NE=(e,a)=>({fn:yE(e).fn,options:[e,a]}),EE=(e,a)=>{const i=pE(e);return{name:i.name,fn:i.fn,options:[e,a]}},TE=(e,a)=>{const i=gE(e);return{name:i.name,fn:i.fn,options:[e,a]}},AE=(e,a)=>{const i=vE(e);return{name:i.name,fn:i.fn,options:[e,a]}},_E=(e,a)=>{const i=SE(e);return{name:i.name,fn:i.fn,options:[e,a]}};var ME=Object.defineProperty,rl=(e,a)=>ME(e,"name",{value:a,configurable:!0}),$w="Popper",[Gw,of]=ul($w),[RE,Yw]=Gw($w),DE=rl(e=>{const{__scopePopper:a,children:i}=e,[r,s]=S.useState(null),[u,d]=S.useState(void 0);return o.jsx(RE,{scope:a,anchor:r,onAnchorChange:s,placementState:u,setPlacementState:d,children:i})},"Popper"),OE="PopperAnchor",zE=S.forwardRef(rl(function(a,i){const{__scopePopper:r,virtualRef:s,...u}=a,d=Yw(OE,r),f=S.useRef(null),m=d.onAnchorChange,v=S.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=kt(i,v),g=S.useRef(null);S.useEffect(()=>{if(!s)return;const k=g.current;g.current=s.current,k!==g.current&&m(g.current)});const b=d.placementState&&sf(d.placementState),j=b==null?void 0:b[0],w=b==null?void 0:b[1];return s?null:o.jsx(Lt.div,{"data-radix-popper-side":j,"data-radix-popper-align":w,...u,ref:y})},"PopperAnchor")),Xw="PopperContent",[LE,AP]=Gw(Xw),BE=S.forwardRef(rl(function(a,i){var Ae,Re,ye,Q,he,ke,Ee;const{__scopePopper:r,side:s="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:j=!1,updatePositionStrategy:w="optimized",onPlaced:k,...C}=a,T=Yw(Xw,r),[M,E]=S.useState(null),R=kt(i,E),[D,A]=S.useState(null),H=Dw(D),U=(H==null?void 0:H.width)??0,Y=(H==null?void 0:H.height)??0,z=s+(d!=="center"?"-"+d:""),V=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},F=Array.isArray(y)?y:[y],J=F.length>0,G={padding:V,boundary:F.filter(Kw),altBoundary:J},{refs:$,floatingStyles:K,placement:I,isPositioned:P,middlewareData:W}=wE({strategy:"fixed",placement:z,whileElementsMounted:rl((...Ie)=>fE(...Ie,{animationFrame:w==="always"}),"whileElementsMounted"),elements:{reference:T.anchor},middleware:[kE({mainAxis:u+Y,alignmentAxis:f}),v&&CE({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?NE():void 0,...G}),v&&EE({...G}),TE({...G,apply:rl(({elements:Ie,rects:Ye,availableWidth:Ke,availableHeight:gt})=>{const{width:rn,height:xn}=Ye.reference,Hn=Ie.floating.style;Hn.setProperty("--radix-popper-available-width",`${Ke}px`),Hn.setProperty("--radix-popper-available-height",`${gt}px`),Hn.setProperty("--radix-popper-anchor-width",`${rn}px`),Hn.setProperty("--radix-popper-anchor-height",`${xn}px`)},"apply")}),D&&_E({element:D,padding:m}),IE({arrowWidth:U,arrowHeight:Y}),j&&AE({strategy:"referenceHidden",...G,boundary:J?G.boundary:void 0})]}),_=T.setPlacementState;Mn(()=>(_(I),()=>{_(void 0)}),[I,_]);const[ae,ie]=sf(I),L=_n(k);Mn(()=>{P&&(L==null||L())},[P,L]);const q=(Ae=W.arrow)==null?void 0:Ae.x,ue=(Re=W.arrow)==null?void 0:Re.y,xe=((ye=W.arrow)==null?void 0:ye.centerOffset)!==0,[be,je]=S.useState();return Mn(()=>{M&&je(window.getComputedStyle(M).zIndex)},[M]),o.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:P?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Q=W.transformOrigin)==null?void 0:Q.x,(he=W.transformOrigin)==null?void 0:he.y].join(" "),...((ke=W.hide)==null?void 0:ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:o.jsx(LE,{scope:r,placedSide:ae,placedAlign:ie,onArrowChange:A,arrowX:q,arrowY:ue,shouldHideArrow:xe,children:o.jsx(Lt.div,{"data-side":ae,"data-align":ie,...C,ref:R,style:{...C.style,animation:P?(Ee=C.style)==null?void 0:Ee.animation:"none"}})})})},"PopperContent"));function Kw(e){return e!==null}rl(Kw,"isNotNull");var IE=rl(e=>({name:"transformOrigin",options:e,fn(a){var C,T,M;const{placement:i,rects:r,middlewareData:s}=a,d=((C=s.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[v,y]=sf(i),g={start:"0%",center:"50%",end:"100%"}[y],b=(((T=s.arrow)==null?void 0:T.x)??0)+f/2,j=(((M=s.arrow)==null?void 0:M.y)??0)+m/2;let w="",k="";return v==="bottom"?(w=d?g:`${b}px`,k=`${-m}px`):v==="top"?(w=d?g:`${b}px`,k=`${r.floating.height+m}px`):v==="right"?(w=`${-m}px`,k=d?g:`${j}px`):v==="left"&&(w=`${r.floating.width+m}px`,k=d?g:`${j}px`),{data:{x:w,y:k}}}}),"transformOrigin");function sf(e){const[a,i="center"]=e.split("-");return[a,i]}rl(sf,"getSideAndAlignFromPlacement");var Qw=DE,Zw=zE,Jw=BE,PE=Object.defineProperty,HE=(e,a)=>PE(e,"name",{value:a,configurable:!0}),UE=S.forwardRef(HE(function(a,i){return o.jsx(Lt.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")),qE=UE,FE=Object.defineProperty,VE=(e,a)=>FE(e,"name",{value:a,configurable:!0});function Ww(e){const a=S.useRef({value:e,previous:e});return S.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}VE(Ww,"usePrevious");var $E=Object.defineProperty,GE=(e,a)=>$E(e,"name",{value:a,configurable:!0});function Ud(e,[a,i]){return Math.min(i,Math.max(a,e))}GE(Ud,"clamp");var YE=Object.defineProperty,fl=(e,a)=>YE(e,"name",{value:a,configurable:!0}),G0="Popover",[e3,_P]=ul(G0,[of]),Y0=of(),[XE,vs]=e3(G0),KE=fl(e=>{const{__scopePopover:a,children:i,open:r,defaultOpen:s,onOpenChange:u,modal:d=!1}=e,f=Y0(a),m=S.useRef(null),[v,y]=S.useState(!1),[g,b]=Sc({prop:r,defaultProp:s??!1,onChange:u,caller:G0});return o.jsx(Qw,{...f,children:o.jsx(XE,{scope:a,contentId:Jl(),triggerRef:m,open:g,onOpenChange:b,onOpenToggle:S.useCallback(()=>b(j=>!j),[b]),hasCustomAnchor:v,onCustomAnchorAdd:S.useCallback(()=>y(!0),[]),onCustomAnchorRemove:S.useCallback(()=>y(!1),[]),modal:d,children:i})})},"Popover"),QE="PopoverTrigger",ZE=S.forwardRef(fl(function(a,i){const{__scopePopover:r,...s}=a,u=vs(QE,r),d=Y0(r),f=kt(i,u.triggerRef),m=o.jsx(Lt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":X0(u.open),...s,ref:f,onClick:pt(a.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:o.jsx(Zw,{asChild:!0,...d,children:m})},"PopoverTrigger")),t3="PopoverPortal",[JE,WE]=e3(t3,{forceMount:void 0}),eT=fl(e=>{const{__scopePopover:a,forceMount:i,children:r,container:s}=e,u=vs(t3,a);return o.jsx(JE,{scope:a,forceMount:i,children:o.jsx(qi,{present:i||u.open,children:o.jsx(z0,{asChild:!0,container:s,children:r})})})},"PopoverPortal"),Ec="PopoverContent",tT=S.forwardRef(fl(function(a,i){const r=WE(Ec,a.__scopePopover),{forceMount:s=r.forceMount,...u}=a,d=vs(Ec,a.__scopePopover);return o.jsx(qi,{present:s||d.open,children:d.modal?o.jsx(aT,{...u,ref:i}):o.jsx(iT,{...u,ref:i})})},"PopoverContent")),nT=Bi("PopoverContent.RemoveScroll"),aT=S.forwardRef(fl(function(a,i){const r=vs(Ec,a.__scopePopover),s=S.useRef(null),u=kt(i,s),d=S.useRef(!1);return S.useEffect(()=>{const f=s.current;if(f)return B0(f)},[]),o.jsx(ef,{as:nT,allowPinchZoom:!0,children:o.jsx(n3,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(a.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:pt(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:pt(a.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),iT=S.forwardRef(fl(function(a,i){const r=vs(Ec,a.__scopePopover),s=S.useRef(!1),u=S.useRef(!1);return o.jsx(n3,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(s.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(s.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")),n3=S.forwardRef(fl(function(a,i){const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:g,...b}=a,j=vs(Ec,r),w=Y0(r);return zc(),o.jsx(D0,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(M0,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>j.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(Jw,{"data-state":X0(j.open),role:"dialog",id:j.contentId,...w,...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"}fl(X0,"getState");var a3=KE,i3=ZE,r3=eT,l3=tT,rT=Object.defineProperty,ot=(e,a)=>rT(e,"name",{value:a,configurable:!0});function o3(e,a){return S.useReducer((i,r)=>a[i][r]??i,e)}ot(o3,"useStateMachine");var s3="ScrollArea",[c3,MP]=ul(s3),[lT,Ga]=c3(s3),oT=S.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,type:s="hover",dir:u,scrollHideDelay:d=600,...f}=a,[m,v]=S.useState(null),[y,g]=S.useState(null),[b,j]=S.useState(null),[w,k]=S.useState(null),[C,T]=S.useState(null),[M,E]=S.useState(0),[R,D]=S.useState(0),[A,H]=S.useState(!1),[U,Y]=S.useState(!1),z=kt(i,v),V=_0(u);return o.jsx(lT,{scope:r,type:s,dir:V,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:g,content:b,onContentChange:j,scrollbarX:w,onScrollbarXChange:k,scrollbarXEnabled:A,onScrollbarXEnabledChange:H,scrollbarY:C,onScrollbarYChange:T,scrollbarYEnabled:U,onScrollbarYEnabledChange:Y,onCornerWidthChange:E,onCornerHeightChange:D,children:o.jsx(Lt.div,{dir:V,...f,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":R+"px",...a.style}})})},"ScrollArea")),sT="ScrollAreaViewport",cT=S.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,children:s,nonce:u,...d}=a,f=Ga(sT,r),m=S.useRef(null),v=kt(i,m,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(uT,{nonce:u}),o.jsx(Lt.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:s})})]})},"ScrollAreaViewport")),uT=S.memo(ot(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),Sr="ScrollAreaScrollbar",dT=S.forwardRef(ot(function(a,i){const{forceMount:r,...s}=a,u=Ga(Sr,a.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=a.orientation==="horizontal";return S.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?o.jsx(fT,{...s,ref:i,forceMount:r}):u.type==="scroll"?o.jsx(hT,{...s,ref:i,forceMount:r}):u.type==="auto"?o.jsx(u3,{...s,ref:i,forceMount:r}):u.type==="always"?o.jsx(K0,{...s,ref:i,"data-state":"visible"}):null},"ScrollAreaScrollbar")),fT=S.forwardRef(ot(function(a,i){const{forceMount:r,...s}=a,u=Ga(Sr,a.__scopeScrollArea),[d,f]=S.useState(!1);return S.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=ot(()=>{window.clearTimeout(v),f(!0)},"handlePointerEnter"),g=ot(()=>{v=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",g),()=>{window.clearTimeout(v),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),o.jsx(qi,{present:r||d,children:o.jsx(u3,{"data-state":d?"visible":"hidden",...s,ref:i})})},"ScrollAreaScrollbarHover")),hT=S.forwardRef(ot(function(a,i){const{forceMount:r,...s}=a,u=Ga(Sr,a.__scopeScrollArea),d=a.orientation==="horizontal",f=Bc(()=>v("SCROLL_END"),100),[m,v]=o3("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 S.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),S.useEffect(()=>{const y=u.viewport,g=d?"scrollLeft":"scrollTop";if(y){let b=y[g];const j=ot(()=>{const w=y[g];b!==w&&(v("SCROLL"),f()),b=w},"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",...s,ref:i,onPointerEnter:pt(a.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:pt(a.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),u3=S.forwardRef(ot(function(a,i){const r=Ga(Sr,a.__scopeScrollArea),{forceMount:s,...u}=a,[d,f]=S.useState(!1),m=a.orientation==="horizontal",v=Bc(()=>{if(r.viewport){const y=r.viewport.offsetWidth<r.viewport.scrollWidth,g=r.viewport.offsetHeight<r.viewport.scrollHeight;f(m?y:g)}},10);return ro(r.viewport,v),ro(r.content,v),o.jsx(qi,{present:s||d,children:o.jsx(K0,{"data-state":d?"visible":"hidden",...u,ref:i})})},"ScrollAreaScrollbarAuto")),K0=S.forwardRef(ot(function(a,i){const{orientation:r="vertical",...s}=a,u=Ga(Sr,a.__scopeScrollArea),d=S.useRef(null),f=S.useRef(0),[m,v]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=Q0(m.viewport,m.content),g={...s,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:ot(j=>d.current=j,"onThumbChange"),onThumbPointerUp:ot(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:ot(j=>f.current=j,"onThumbPointerDown")};function b(j,w){return m3(j,f.current,m,w)}return ot(b,"getScrollPosition"),r==="horizontal"?o.jsx(mT,{...g,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollLeft,w=Zp(j,m,u.dir);d.current.style.transform=`translate3d(${w}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(pT,{...g,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollTop,w=Zp(j,m);d.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollTop=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollTop=b(j))}}):null},"ScrollAreaScrollbarVisible")),mT=S.forwardRef(ot(function(a,i){const{sizes:r,onSizesChange:s,...u}=a,d=Ga(Sr,a.__scopeScrollArea),[f,m]=S.useState(),v=S.useRef(null),y=kt(i,v,d.onScrollbarXChange);return S.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(f3,{"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":Lc(r)+"px",...a.style},onThumbPointerDown:g=>a.onThumbPointerDown(g.x),onDragScroll:g=>a.onDragScroll(g.x),onWheelScroll:(g,b)=>{if(d.viewport){const j=d.viewport.scrollLeft+g.deltaX;a.onWheelScroll(j),J0(j,b)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&s({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:Tc(f.paddingLeft),paddingEnd:Tc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),pT=S.forwardRef(ot(function(a,i){const{sizes:r,onSizesChange:s,...u}=a,d=Ga(Sr,a.__scopeScrollArea),[f,m]=S.useState(),v=S.useRef(null),y=kt(i,v,d.onScrollbarYChange);return S.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(f3,{"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":Lc(r)+"px",...a.style},onThumbPointerDown:g=>a.onThumbPointerDown(g.y),onDragScroll:g=>a.onDragScroll(g.y),onWheelScroll:(g,b)=>{if(d.viewport){const j=d.viewport.scrollTop+g.deltaY;a.onWheelScroll(j),J0(j,b)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&s({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:Tc(f.paddingTop),paddingEnd:Tc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[gT,d3]=c3(Sr),f3=S.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,sizes:s,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:g,onResize:b,...j}=a,w=Ga(Sr,r),[k,C]=S.useState(null),T=kt(i,C),M=S.useRef(null),E=S.useRef(""),R=w.viewport,D=s.content-s.viewport,A=_n(g),H=_n(v),U=Bc(b,10);function Y(z){if(M.current){const V=z.clientX-M.current.left,F=z.clientY-M.current.top;y({x:V,y:F})}}return ot(Y,"handleDragScroll"),S.useEffect(()=>{const z=ot(V=>{const F=V.target;(k==null?void 0:k.contains(F))&&A(V,D)},"handleWheel");return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[R,k,D,A]),S.useEffect(H,[s,H]),ro(k,U),ro(w.content,U),o.jsx(gT,{scope:r,scrollbar:k,hasThumb:u,onThumbChange:_n(d),onThumbPointerUp:_n(f),onThumbPositionChange:H,onThumbPointerDown:_n(m),children:o.jsx(Lt.div,{...j,ref:T,style:{position:"absolute",...j.style},onPointerDown:pt(a.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),M.current=k.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),Y(z))}),onPointerMove:pt(a.onPointerMove,Y),onPointerUp:pt(a.onPointerUp,z=>{const V=z.target;V.hasPointerCapture(z.pointerId)&&V.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=E.current,w.viewport&&(w.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),Qp="ScrollAreaThumb",vT=S.forwardRef(ot(function(a,i){const{forceMount:r,...s}=a,u=d3(Qp,a.__scopeScrollArea);return o.jsx(qi,{present:r||u.hasThumb,children:o.jsx(yT,{ref:i,...s})})},"ScrollAreaThumb")),yT=S.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,style:s,...u}=a,d=Ga(Qp,r),f=d3(Qp,r),{onThumbPositionChange:m}=f,v=kt(i,f.onThumbChange),y=S.useRef(void 0),g=Bc(()=>{y.current&&(y.current(),y.current=void 0)},100);return S.useEffect(()=>{const b=d.viewport;if(b){const j=ot(()=>{if(g(),!y.current){const w=jT(b,m);y.current=w,m()}},"handleScroll");return m(),b.addEventListener("scroll",j),()=>b.removeEventListener("scroll",j)}},[d.viewport,g,m]),o.jsx(Lt.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)",...s},onPointerDownCapture:pt(a.onPointerDownCapture,b=>{const w=b.target.getBoundingClientRect(),k=b.clientX-w.left,C=b.clientY-w.top;f.onThumbPointerDown({x:k,y:C})}),onPointerUp:pt(a.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),h3="ScrollAreaCorner",xT=S.forwardRef(ot(function(a,i){const r=Ga(h3,a.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&s?o.jsx(bT,{...a,ref:i}):null},"ScrollAreaCorner")),bT=S.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,...s}=a,u=Ga(h3,r),[d,f]=S.useState(0),[m,v]=S.useState(0),y=!!(d&&m),{onCornerWidthChange:g,onCornerHeightChange:b}=u;return ro(u.scrollbarX,()=>{var w;const j=((w=u.scrollbarX)==null?void 0:w.offsetHeight)||0;u.onCornerHeightChange(j),v(j)}),ro(u.scrollbarY,()=>{var w;const j=((w=u.scrollbarY)==null?void 0:w.offsetWidth)||0;u.onCornerWidthChange(j),f(j)}),S.useEffect(()=>()=>{g(0),b(0)},[g,b]),y?o.jsx(Lt.div,{...s,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 Tc(e){return e?parseInt(e,10):0}ot(Tc,"toInt");function Q0(e,a){const i=e/a;return isNaN(i)?0:i}ot(Q0,"getThumbRatio");function Lc(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)}ot(Lc,"getThumbSize");function m3(e,a,i,r="ltr"){const s=Lc(i),u=s/2,d=a||u,f=s-d,m=i.scrollbar.paddingStart+d,v=i.scrollbar.size-i.scrollbar.paddingEnd-f,y=i.content-i.viewport,g=r==="ltr"?[0,y]:[y*-1,0];return Z0([m,v],g)(e)}ot(m3,"getScrollPositionFromPointer");function Zp(e,a,i="ltr"){const r=Lc(a),s=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,u=a.scrollbar.size-s,d=a.content-a.viewport,f=u-r,m=i==="ltr"?[0,d]:[d*-1,0],v=Ud(e,m);return Z0([0,d],[0,f])(v)}ot(Zp,"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])}}ot(Z0,"linearScale");function J0(e,a){return e>0&&e<a}ot(J0,"isScrollingWithinScrollbarBounds");var jT=ot((e,a=()=>{})=>{let i={left:e.scrollLeft,top:e.scrollTop},r=0;return ot((function s(){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(s)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function Bc(e,a){const i=_n(e),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(i,a)},[i,a])}ot(Bc,"useDebounceCallback");function ro(e,a){const i=_n(a);Mn(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(i)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,i])}ot(ro,"useResizeObserver");var wT=oT,ST=cT,kT=xT,CT=Object.defineProperty,Nt=(e,a)=>CT(e,"name",{value:a,configurable:!0}),NT=[" ","Enter","ArrowUp","ArrowDown"],ET=[" ","Enter"],cs="Select",[cf,W0,TT]=Q4(cs),[uo,RP]=ul(cs,[TT,of]),eg=of(),[AT,hl]=uo(cs),[_T,MT]=uo(cs);function p3(e){const{__scopeSelect:a,children:i,open:r,defaultOpen:s,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:v,name:y,autoComplete:g,disabled:b,required:j,form:w,internal_do_not_use_render:k}=e,C=eg(a),[T,M]=S.useState(null),[E,R]=S.useState(null),[D,A]=S.useState(!1),H=_0(v),[U,Y]=Sc({prop:r,defaultProp:s??!1,onChange:u,caller:cs}),[z,V]=Sc({prop:d,defaultProp:f,onChange:m,caller:cs}),F=S.useRef(null),J=S.useRef(z);S.useEffect(()=>{const ie=w?T==null?void 0:T.ownerDocument.getElementById(w):T==null?void 0:T.form;if(ie instanceof HTMLFormElement){const L=Nt(()=>V(J.current),"reset");return ie.addEventListener("reset",L),()=>ie.removeEventListener("reset",L)}},[w,T,V]);const G=T?!!w||!!T.closest("form"):!0,[$,K]=S.useState(new Set),I=Jl(),P=Array.from($).map(ie=>ie.props.value).join(";"),W=S.useCallback(ie=>{K(L=>new Set(L).add(ie))},[]),_=S.useCallback(ie=>{K(L=>{const q=new Set(L);return q.delete(ie),q})},[]),ae={required:j,trigger:T,onTriggerChange:M,valueNode:E,onValueNodeChange:R,valueNodeHasChildren:D,onValueNodeHasChildrenChange:A,contentId:I,value:z,onValueChange:V,open:U,onOpenChange:Y,dir:H,triggerPointerDownPosRef:F,disabled:b,name:y,autoComplete:g,form:w,nativeOptions:$,nativeSelectKey:P,isFormControl:G};return o.jsx(Qw,{...C,children:o.jsx(AT,{scope:a,...ae,children:o.jsx(cf.Provider,{scope:a,children:o.jsx(_T,{scope:a,onNativeOptionAdd:W,onNativeOptionRemove:_,children:y3(k)?k(ae):i})})})})}Nt(p3,"SelectProvider");var RT=Nt(e=>{const{__scopeSelect:a,children:i,...r}=e;return o.jsx(p3,{__scopeSelect:a,...r,internal_do_not_use_render:({isFormControl:s})=>o.jsxs(o.Fragment,{children:[i,s?o.jsx(aA,{__scopeSelect:a}):null]})})},"Select"),DT="SelectTrigger",OT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,disabled:s=!1,...u}=a,d=eg(r),f=hl(DT,r),m=f.disabled||s,v=kt(i,f.onTriggerChange),y=W0(r),g=S.useRef("touch"),[b,j,w]=tg(C=>{const T=y().filter(R=>!R.disabled),M=T.find(R=>R.value===f.value),E=ng(T,C,M);E!==void 0&&f.onValueChange(E.value)}),k=Nt(C=>{m||(f.onOpenChange(!0),w()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return o.jsx(Zw,{asChild:!0,...d,children:o.jsx(Lt.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":Ic(f.value)?"":void 0,...u,ref:v,onClick:pt(u.onClick,C=>{C.currentTarget.focus(),g.current!=="mouse"&&k(C)}),onPointerDown:pt(u.onPointerDown,C=>{g.current=C.pointerType;const T=C.target;T.hasPointerCapture(C.pointerId)&&T.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(k(C),C.preventDefault())}),onKeyDown:pt(u.onKeyDown,C=>{const T=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&j(C.key),!(T&&C.key===" ")&&NT.includes(C.key)&&(k(),C.preventDefault())})})})},"SelectTrigger")),zT="SelectValue",LT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,className:s,style:u,children:d,placeholder:f="",...m}=a,v=hl(zT,r),{onValueNodeHasChildrenChange:y}=v,g=d!==void 0,b=kt(i,v.onValueNodeChange);Mn(()=>{y(g)},[y,g]);const j=Ic(v.value);return o.jsx(Lt.span,{...m,asChild:j?!1:m.asChild,ref:b,style:{pointerEvents:"none"},children:o.jsx(S.Fragment,{children:j?f:d},j?"placeholder":"value")})},"SelectValue")),BT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,children:s,...u}=a;return o.jsx(Lt.span,{"aria-hidden":!0,...u,ref:i,children:s||"▼"})},"SelectIcon")),IT="SelectPortal",[PT,HT]=uo(IT,{forceMount:void 0}),UT=Nt(e=>{const{__scopeSelect:a,forceMount:i,...r}=e;return o.jsx(PT,{scope:e.__scopeSelect,forceMount:i,children:o.jsx(z0,{asChild:!0,...r})})},"SelectPortal"),lo="SelectContent",qT=S.forwardRef(Nt(function(a,i){const r=HT(lo,a.__scopeSelect),{forceMount:s=r.forceMount,...u}=a,d=hl(lo,a.__scopeSelect),[f,m]=S.useState();return Mn(()=>{m(new DocumentFragment)},[]),o.jsx(qi,{present:s||d.open,children:({present:v})=>v?o.jsx($T,{...u,ref:i}):o.jsx(FT,{...u,fragment:f})})},"SelectContent")),FT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,children:s,fragment:u}=a;return u?co.createPortal(o.jsx(g3,{scope:r,children:o.jsx(cf.Slot,{scope:r,children:o.jsx("div",{ref:i,children:s})})}),u):null},"SelectContentFragment")),li=10,[g3,uf]=uo(lo),VT=Bi("SelectContent.RemoveScroll"),$T=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r}=a,{position:s="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:b,collisionBoundary:j,collisionPadding:w,sticky:k,hideWhenDetached:C,avoidCollisions:T,...M}=a,E=hl(lo,r),[R,D]=S.useState(null),[A,H]=S.useState(null),U=kt(i,D),[Y,z]=S.useState(null),[V,F]=S.useState(null),J=W0(r),[G,$]=S.useState(!1),K=S.useRef(!1);S.useEffect(()=>{if(R)return B0(R)},[R]),zc();const I=S.useCallback(je=>{const[Ae,...Re]=J().map(he=>he.ref.current),[ye]=Re.slice(-1),Q=document.activeElement;for(const he of je)if(he===Q||(he==null||he.scrollIntoView({block:"nearest"}),he===Ae&&A&&(A.scrollTop=0),he===ye&&A&&(A.scrollTop=A.scrollHeight),he==null||he.focus(),document.activeElement!==Q))return},[J,A]),P=S.useCallback(()=>I([Y,R]),[I,Y,R]);S.useEffect(()=>{G&&P()},[G,P]);const{onOpenChange:W,triggerPointerDownPosRef:_}=E;S.useEffect(()=>{if(R){let je={x:0,y:0};const Ae=Nt(ye=>{var Q,he;je={x:Math.abs(Math.round(ye.pageX)-(((Q=_.current)==null?void 0:Q.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((he=_.current)==null?void 0:he.y)??0))}},"handlePointerMove"),Re=Nt(ye=>{je.x<=10&&je.y<=10?ye.preventDefault():ye.composedPath().includes(R)||W(!1),document.removeEventListener("pointermove",Ae),_.current=null},"handlePointerUp");return _.current!==null&&(document.addEventListener("pointermove",Ae),document.addEventListener("pointerup",Re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ae),document.removeEventListener("pointerup",Re,{capture:!0})}}},[R,W,_]),S.useEffect(()=>{const je=Nt(()=>W(!1),"close");return window.addEventListener("blur",je),window.addEventListener("resize",je),()=>{window.removeEventListener("blur",je),window.removeEventListener("resize",je)}},[W]);const[ae,ie]=tg(je=>{const Ae=J().filter(Q=>!Q.disabled),Re=Ae.find(Q=>Q.ref.current===document.activeElement),ye=ng(Ae,je,Re);ye&&setTimeout(()=>{var Q;return(Q=ye.ref.current)==null?void 0:Q.focus()})}),L=S.useCallback((je,Ae,Re)=>{const ye=!K.current&&!Re;(E.value!==void 0&&E.value===Ae||ye)&&(z(je),ye&&(K.current=!0))},[E.value]),q=S.useCallback(()=>R==null?void 0:R.focus(),[R]),ue=S.useCallback((je,Ae,Re)=>{const ye=!K.current&&!Re;(E.value!==void 0&&E.value===Ae||ye)&&F(je)},[E.value]),xe=s==="popper"?dx:GT,be=xe===dx?{side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:b,collisionBoundary:j,collisionPadding:w,sticky:k,hideWhenDetached:C,avoidCollisions:T}:{};return o.jsx(g3,{scope:r,content:R,viewport:A,onViewportChange:H,itemRefCallback:L,selectedItem:Y,onItemLeave:q,itemTextRefCallback:ue,focusSelectedItem:P,selectedItemText:V,position:s,isPositioned:G,searchRef:ae,children:o.jsx(ef,{as:VT,allowPinchZoom:!0,children:o.jsx(D0,{asChild:!0,trapped:E.open,onMountAutoFocus:je=>{je.preventDefault()},onUnmountAutoFocus:pt(u,je=>{var Ae;(Ae=E.trigger)==null||Ae.focus({preventScroll:!0}),je.preventDefault()}),children:o.jsx(M0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:je=>je.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:o.jsx(xe,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:je=>je.preventDefault(),...M,...be,onPlaced:()=>$(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:pt(M.onKeyDown,je=>{const Ae=je.ctrlKey||je.altKey||je.metaKey;if(je.key==="Tab"&&je.preventDefault(),!Ae&&je.key.length===1&&ie(je.key),["ArrowUp","ArrowDown","Home","End"].includes(je.key)){let ye=J().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(je.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(je.key)){const Q=je.target,he=ye.indexOf(Q);ye=ye.slice(he+1)}setTimeout(()=>I(ye)),je.preventDefault()}})})})})})})},"SelectContentImpl")),GT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,onPlaced:s,...u}=a,d=hl(lo,r),f=uf(lo,r),[m,v]=S.useState(null),[y,g]=S.useState(null),b=kt(i,g),j=W0(r),w=S.useRef(!1),k=S.useRef(!0),{viewport:C,selectedItem:T,selectedItemText:M,focusSelectedItem:E}=f,R=S.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&C&&T&&M){const U=d.trigger.getBoundingClientRect(),Y=y.getBoundingClientRect(),z=d.valueNode.getBoundingClientRect(),V=M.getBoundingClientRect();if(d.dir!=="rtl"){const Q=V.left-Y.left,he=z.left-Q,ke=U.left-he,Ee=U.width+ke,Ie=Math.max(Ee,Y.width),Ye=window.innerWidth-li,Ke=Ud(he,[li,Math.max(li,Ye-Ie)]);m.style.minWidth=Ee+"px",m.style.left=Ke+"px"}else{const Q=Y.right-V.right,he=window.innerWidth-z.right-Q,ke=window.innerWidth-U.right-he,Ee=U.width+ke,Ie=Math.max(Ee,Y.width),Ye=window.innerWidth-li,Ke=Ud(he,[li,Math.max(li,Ye-Ie)]);m.style.minWidth=Ee+"px",m.style.right=Ke+"px"}const F=j(),J=window.innerHeight-li*2,G=C.scrollHeight,$=window.getComputedStyle(y),K=parseInt($.borderTopWidth,10),I=parseInt($.paddingTop,10),P=parseInt($.borderBottomWidth,10),W=parseInt($.paddingBottom,10),_=K+I+G+W+P,ae=Math.min(T.offsetHeight*5,_),ie=window.getComputedStyle(C),L=parseInt(ie.paddingTop,10),q=parseInt(ie.paddingBottom,10),ue=U.top+U.height/2-li,xe=J-ue,be=T.offsetHeight/2,je=T.offsetTop+be,Ae=K+I+je,Re=_-Ae;if(Ae<=ue){const Q=F.length>0&&T===F[F.length-1].ref.current;m.style.bottom="0px";const he=y.clientHeight-C.offsetTop-C.offsetHeight,ke=Math.max(xe,be+(Q?q:0)+he+P),Ee=Ae+ke;m.style.height=Ee+"px"}else{const Q=F.length>0&&T===F[0].ref.current;m.style.top="0px";const ke=Math.max(ue,K+C.offsetTop+(Q?L:0)+be)+Re;m.style.height=ke+"px",C.scrollTop=Ae-ue+C.offsetTop}m.style.margin=`${li}px 0`,m.style.minHeight=ae+"px",m.style.maxHeight=J+"px",s==null||s(),requestAnimationFrame(()=>w.current=!0)}},[j,d.trigger,d.valueNode,m,y,C,T,M,d.dir,s]);Mn(()=>R(),[R]);const[D,A]=S.useState();Mn(()=>{y&&A(window.getComputedStyle(y).zIndex)},[y]);const H=S.useCallback(U=>{U&&k.current===!0&&(R(),E==null||E(),k.current=!1)},[R,E]);return o.jsx(YT,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:w,onScrollButtonChange:H,children:o.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:o.jsx(Lt.div,{...u,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),dx=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,align:s="start",collisionPadding:u=li,...d}=a,f=eg(r);return o.jsx(Jw,{...f,...d,ref:i,align:s,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")),[YT,XT]=uo(lo,{}),fx="SelectViewport",KT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,nonce:s,...u}=a,d=uf(fx,r),f=XT(fx,r),m=kt(i,d.onViewportChange),v=S.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:s}),o.jsx(cf.Slot,{scope:r,children:o.jsx(Lt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:pt(u.onScroll,y=>{const g=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:j}=f;if(j!=null&&j.current&&b){const w=Math.abs(v.current-g.scrollTop);if(w>0){const k=window.innerHeight-li*2,C=parseFloat(b.style.minHeight),T=parseFloat(b.style.height),M=Math.max(C,T);if(M<k){const E=M+w,R=Math.min(k,E),D=E-R;b.style.height=R+"px",b.style.bottom==="0px"&&(g.scrollTop=D>0?D:0,b.style.justifyContent="flex-end")}}}v.current=g.scrollTop})})})]})},"SelectViewport")),QT="SelectGroup",[DP,OP]=uo(QT),Jp="SelectItem",[ZT,v3]=uo(Jp),JT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,value:s,disabled:u=!1,textValue:d,...f}=a,m=hl(Jp,r),v=uf(Jp,r),y=m.value===s,[g,b]=S.useState(d??""),[j,w]=S.useState(!1),k=_n(R=>{var D;return(D=v.itemRefCallback)==null?void 0:D.call(v,R,s,u)}),C=kt(i,k),T=Jl(),M=S.useRef("touch"),E=Nt(()=>{u||(m.onValueChange(s),m.onOpenChange(!1))},"handleSelect");return o.jsx(ZT,{scope:r,value:s,disabled:u,textId:T,isSelected:y,onItemTextChange:S.useCallback(R=>{b(D=>D||((R==null?void 0:R.textContent)??"").trim())},[]),children:o.jsx(cf.ItemSlot,{scope:r,value:s,disabled:u,textValue:g,children:o.jsx(Lt.div,{role:"option","aria-labelledby":T,"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:pt(f.onFocus,()=>w(!0)),onBlur:pt(f.onBlur,()=>w(!1)),onClick:pt(f.onClick,()=>{M.current!=="mouse"&&E()}),onPointerUp:pt(f.onPointerUp,()=>{M.current==="mouse"&&E()}),onPointerDown:pt(f.onPointerDown,R=>{M.current=R.pointerType}),onPointerMove:pt(f.onPointerMove,R=>{var D;M.current=R.pointerType,u?(D=v.onItemLeave)==null||D.call(v):M.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pt(f.onPointerLeave,R=>{var D;R.currentTarget===document.activeElement&&((D=v.onItemLeave)==null||D.call(v))}),onKeyDown:pt(f.onKeyDown,R=>{var A;u||R.target!==R.currentTarget||((A=v.searchRef)==null?void 0:A.current)!==""&&R.key===" "||(ET.includes(R.key)&&E(),R.key===" "&&R.preventDefault())})})})})},"SelectItem")),pd="SelectItemText",WT=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,className:s,style:u,...d}=a,f=hl(pd,r),m=uf(pd,r),v=v3(pd,r),y=MT(pd,r),[g,b]=S.useState(null),j=_n(E=>{var R;return(R=m.itemTextRefCallback)==null?void 0:R.call(m,E,v.value,v.disabled)}),w=kt(i,b,v.onItemTextChange,j),k=g==null?void 0:g.textContent,C=S.useMemo(()=>o.jsx("option",{value:v.value,disabled:v.disabled,children:k},v.value),[v.disabled,v.value,k]),{onNativeOptionAdd:T,onNativeOptionRemove:M}=y;return Mn(()=>(T(C),()=>M(C)),[T,M,C]),o.jsxs(o.Fragment,{children:[o.jsx(Lt.span,{id:v.textId,...d,ref:w}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Ic(f.value)?co.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),eA="SelectItemIndicator",tA=S.forwardRef(Nt(function(a,i){const{__scopeSelect:r,...s}=a;return v3(eA,r).isSelected?o.jsx(Lt.span,{"aria-hidden":!0,...s,ref:i}):null},"SelectItemIndicator")),nA="SelectBubbleInput",aA=S.forwardRef(Nt(function({__scopeSelect:a,...i},r){const s=hl(nA,a),{value:u,onValueChange:d,required:f,disabled:m,name:v,autoComplete:y,form:g}=s,{nativeOptions:b,nativeSelectKey:j}=s,w=S.useRef(null),k=kt(r,w),C=u??"",T=Ww(C),M=Array.from(b).some(E=>(E.props.value??"")==="");return S.useEffect(()=>{const E=w.current;if(!E)return;const R=window.HTMLSelectElement.prototype,A=Object.getOwnPropertyDescriptor(R,"value").set;if(T!==C&&A){const H=new Event("change",{bubbles:!0});A.call(E,C),E.dispatchEvent(H)}},[T,C]),o.jsxs(Lt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:g,onChange:E=>d(E.target.value),...i,style:{...Y7,...i.style},ref:k,defaultValue:C,children:[Ic(u)&&!M?o.jsx("option",{value:""}):null,Array.from(b)]},j)},"SelectBubbleInput"));function y3(e){return typeof e=="function"}Nt(y3,"isFunction");function Ic(e){return e===""||e===void 0}Nt(Ic,"shouldShowPlaceholder");function tg(e){const a=_n(e),i=S.useRef(""),r=S.useRef(0),s=S.useCallback(d=>{const f=i.current+d;a(f),Nt((function m(v){i.current=v,window.clearTimeout(r.current),v!==""&&(r.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[a]),u=S.useCallback(()=>{i.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[i,s,u]}Nt(tg,"useTypeaheadSearch");function ng(e,a,i){const s=a.length>1&&Array.from(a).every(v=>v===a[0])?a[0]:a,u=i?e.indexOf(i):-1;let d=x3(e,Math.max(u,0));s.length===1&&(d=d.filter(v=>v!==i));const m=d.find(v=>v.textValue.toLowerCase().startsWith(s.toLowerCase()));return m!==i?m:void 0}Nt(ng,"findNextItem");function x3(e,a){return e.map((i,r)=>e[(a+r)%e.length])}Nt(x3,"wrapArray");const iA=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 Me({className:e,variant:a="default",size:i="default",asChild:r=!1,...s}){const u=r?I7:"button";return o.jsx(u,{"data-slot":"button","data-variant":a,"data-size":i,className:an(iA({variant:a,size:i,className:e})),...s})}const ag=e=>ua(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Ql({value:e}){return o.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function b3({blocks:e,links:a,onSelect:i}){return o.jsx(o.Fragment,{children:e.map((r,s)=>{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")})]},s);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")})]},s);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(Ql,{value:r.arguments}):o.jsxs(o.Fragment,{children:[o.jsx(b3,{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(Ql,{value:r.result.details})]})]})]},s)}})})}function rA({detail:e,onSelect:a}){const[i,r]=S.useState("content"),{record:s,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:["#",s.id," ",o.jsx("span",{children:s.role})]}),o.jsx("p",{children:ag(s.timestamp)})]}),o.jsxs("div",{role:"tablist","aria-label":x("history.view"),children:[o.jsx(Me,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="content",onClick:()=>r("content"),children:x("history.content")}),o.jsx(Me,{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(Ql,{value:s}):o.jsxs(o.Fragment,{children:[s.model&&o.jsxs("div",{className:"jv-history-model",children:[o.jsx("span",{children:x("usage.model")}),o.jsx("strong",{children:s.model.id}),o.jsx("small",{children:s.model.provider})]}),o.jsx(b3,{blocks:s.message.content,links:u,onSelect:a}),s.message.tools&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsxs("summary",{children:[x("history.tools")," · ",s.message.tools.length]}),o.jsx(Ql,{value:s.message.tools})]}),s.message.tools_removed!==void 0&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:x("history.toolsRemoved")}),o.jsx(Ql,{value:s.message.tools_removed})]}),s.message.stop_reason&&o.jsxs("p",{className:"jv-history-note",children:[x("history.stopReason")," · ",s.message.stop_reason]}),s.message.error&&o.jsx("pre",{className:"jv-history-failure",children:s.message.error}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Usage"}),o.jsx(Ql,{value:s.usage})]}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Extra"}),o.jsx(Ql,{value:s.extra})]})]})})]})}const hx={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},mx=e=>ua(e,{year:"numeric",month:"long",day:"numeric"}),lA=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(" "),oA=e=>ua(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function sA({items:e,onSelect:a}){return o.jsx("ol",{className:"jv-activity-timeline","aria-label":x("activity.timeline"),children:e.map((i,r)=>{const{record:s}=i,u=mx(s.timestamp);return o.jsxs(S.Fragment,{children:[(r===0||mx(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(s.timestamp).toISOString(),title:`${ag(s.timestamp)}.${String(s.timestamp%1e3).padStart(3,"0")}`,children:oA(s.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(P8,{}),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(Rp,{})]})]}):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:hx[i.record.role]?x(hx[i.record.role]):i.record.role}),o.jsxs("span",{children:["#",i.record.id]})]}),o.jsx("span",{className:"jv-activity-preview",children:lA(i.record)||x("activity.emptyMessage")})]})})]})]},`${i.kind}:${s.id}`)})})}const cA={read:(e,a)=>we(`/bots/${e}/history/${a}`)};function uA(e,a){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const dA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hA={};function px(e,a){return(hA.jsx?fA:dA).test(e)}const mA=/[ \t\n\f\r]/g;function pA(e){return typeof e=="object"?e.type==="text"?gx(e.value):!1:gx(e)}function gx(e){return e.replace(mA,"")===""}class Pc{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Pc.prototype.normal={};Pc.prototype.property={};Pc.prototype.space=void 0;function j3(e,a){const i={},r={};for(const s of e)Object.assign(i,s.property),Object.assign(r,s.normal);return new Pc(i,r,a)}function Wp(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 gA=0;const Je=fo(),nn=fo(),e0=fo(),Se=fo(),Tt=fo(),Wl=fo(),Aa=fo();function fo(){return 2**++gA}const t0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:nn,commaOrSpaceSeparated:Aa,commaSeparated:Wl,number:Se,overloadedBoolean:e0,spaceSeparated:Tt},Symbol.toStringTag,{value:"Module"})),tp=Object.keys(t0);class ig extends da{constructor(a,i,r,s){let u=-1;if(super(a,i),vx(this,"space",s),typeof r=="number")for(;++u<tp.length;){const d=tp[u];vx(this,tp[u],(r&t0[d])===t0[d])}}}ig.prototype.defined=!0;function vx(e,a,i){i&&(e[a]=i)}function ys(e){const a={},i={};for(const[r,s]of Object.entries(e.properties)){const u=new ig(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[Wp(r)]=r,i[Wp(u.attribute)]=r}return new Pc(a,i,e.space)}const w3=ys({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Tt,ariaCurrent:null,ariaDescribedBy:Tt,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Tt,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Tt,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tt,ariaLevel:Se,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Tt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Tt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:nn,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function S3(e,a){return a in e?e[a]:a}function k3(e,a){return S3(e,a.toLowerCase())}const vA=ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wl,acceptCharset:Tt,accessKey:Tt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alpha:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:Tt,autoFocus:Je,autoPlay:Je,blocking:Tt,capture:null,charSet:null,checked:Je,cite:null,className:Tt,closedBy:null,colorSpace:null,cols:Se,colSpan:Se,command:null,commandFor:null,content:null,contentEditable:nn,controls:Je,controlsList:Tt,coords:Se|Wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:e0,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:Tt,height:Se,hidden:e0,high:Se,href:null,hrefLang:null,htmlFor:Tt,httpEquiv:Tt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:Tt,itemRef:Tt,itemScope:Je,itemType:Tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,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:Je,optimum:Se,pattern:null,ping:Tt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:Tt,required:Je,reversed:Je,rows:Se,rowSpan:Se,sandbox:Tt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootCustomElementRegistry:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shadowRootSerializable:Je,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:nn,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Je,disablePictureInPicture:Je,disableRemotePlayback:Je,exportParts:Wl,part:Tt,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:k3}),yA=ys({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:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Tt,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:Wl,g2:Wl,glyphName:Wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:Aa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:Aa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Aa,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,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:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:S3}),C3=ys({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()}}),N3=ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:k3}),E3=ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,a){return"xml:"+a.slice(3).toLowerCase()}}),xA={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"},bA=/[A-Z]/g,yx=/-[a-z]/g,jA=/^data[-\w.:]+$/i;function wA(e,a){const i=Wp(a);let r=a,s=da;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&jA.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(yx,kA);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!yx.test(u)){let d=u.replace(bA,SA);d.charAt(0)!=="-"&&(d="-"+d),a="data"+d}}s=ig}return new s(r,a)}function SA(e){return"-"+e.toLowerCase()}function kA(e){return e.charAt(1).toUpperCase()}const CA=j3([w3,vA,C3,N3,E3],"html"),rg=j3([w3,yA,C3,N3,E3],"svg");function NA(e){return e.join(" ").trim()}var ns={},np,xx;function EA(){if(xx)return np;xx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
520
|
+
`,v="/",y="*",g="",b="comment",j="declaration";function w(C,T){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];T=T||{};var M=1,E=1;function R(G){var $=G.match(a);$&&(M+=$.length);var K=G.lastIndexOf(m);E=~K?G.length-K:E+G.length}function D(){var G={line:M,column:E};return function($){return $.position=new A(G),Y(),$}}function A(G){this.start=G,this.end={line:M,column:E},this.source=T.source}A.prototype.content=C;function H(G){var $=new Error(T.source+":"+M+":"+E+": "+G);if($.reason=G,$.filename=T.source,$.line=M,$.column=E,$.source=C,!T.silent)throw $}function U(G){var $=G.exec(C);if($){var K=$[0];return R(K),C=C.slice(K.length),$}}function Y(){U(i)}function z(G){var $;for(G=G||[];$=V();)$!==!1&&G.push($);return G}function V(){var G=D();if(!(v!=C.charAt(0)||y!=C.charAt(1))){for(var $=2;g!=C.charAt($)&&(y!=C.charAt($)||v!=C.charAt($+1));)++$;if($+=2,g===C.charAt($-1))return H("End of comment missing");var K=C.slice(2,$-2);return E+=2,R(K),C=C.slice($),E+=2,G({type:b,comment:K})}}function F(){var G=D(),$=U(r);if($){if(V(),!U(s))return H("property missing ':'");var K=U(u),I=G({type:j,property:k($[0].replace(e,g)),value:K?k(K[0].replace(e,g)):g});return U(d),I}}function J(){var G=[];z(G);for(var $;$=F();)$!==!1&&(G.push($),z(G));return G}return Y(),J()}function k(C){return C?C.replace(f,g):g}return np=w,np}var bx;function TA(){if(bx)return ns;bx=1;var e=ns&&ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=i;const a=e(EA());function i(r,s){let u=null;if(!r||typeof r!="string")return u;const d=(0,a.default)(r),f=typeof s=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;f?s(v,y,m):y&&(u=u||{},u[v]=y)}),u}return ns}var pc={},jx;function AA(){if(jx)return pc;jx=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(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(s,f):v=v.replace(r,f),v.replace(a,d))};return pc.camelCase=m,pc}var gc,wx;function _A(){if(wx)return gc;wx=1;var e=gc&&gc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},a=e(TA()),i=AA();function r(s,u){var d={};return!s||typeof s!="string"||(0,a.default)(s,function(f,m){f&&m&&(d[(0,i.camelCase)(f,u)]=m)}),d}return r.default=r,gc=r,gc}var MA=_A();const RA=g0(MA),T3=A3("end"),lg=A3("start");function A3(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 DA(e){const a=lg(e),i=T3(e);if(a&&i)return{start:a,end:i}}function xc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Sx(e.position):"start"in e||"end"in e?Sx(e):"line"in e||"column"in e?n0(e):""}function n0(e){return kx(e&&e.line)+":"+kx(e&&e.column)}function Sx(e){return n0(e&&e.start)+"-"+n0(e&&e.end)}function kx(e){return e&&typeof e=="number"?e:1}class Pn extends Error{constructor(a,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",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"?s=a:!u.cause&&a&&(d=!0,s=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=s,this.line=f?f.line:void 0,this.name=xc(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}}Pn.prototype.file="";Pn.prototype.name="";Pn.prototype.reason="";Pn.prototype.message="";Pn.prototype.stack="";Pn.prototype.column=void 0;Pn.prototype.line=void 0;Pn.prototype.ancestors=void 0;Pn.prototype.cause=void 0;Pn.prototype.fatal=void 0;Pn.prototype.place=void 0;Pn.prototype.ruleId=void 0;Pn.prototype.source=void 0;const og={}.hasOwnProperty,OA=new Map,zA=/[A-Z]/g,LA=new Set(["table","tbody","thead","tfoot","tr"]),BA=new Set(["td","th"]),_3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function IA(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=GA(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=$A(i,a.jsx,a.jsxs)}const s={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:CA,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=M3(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function M3(e,a,i){if(a.type==="element")return PA(e,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return HA(e,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return qA(e,a,i);if(a.type==="mdxjsEsm")return UA(e,a);if(a.type==="root")return FA(e,a,i);if(a.type==="text")return VA(e,a)}function PA(e,a,i){const r=e.schema;let s=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=rg,e.schema=s),e.ancestors.push(a);const u=D3(e,a.tagName,!1),d=YA(e,a);let f=cg(e,a);return LA.has(a.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!pA(m):!0})),R3(e,d,u,a),sg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function HA(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)}Ac(e,a.position)}function UA(e,a){if(a.data&&a.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(a.data.estree);Ac(e,a.position)}function qA(e,a,i){const r=e.schema;let s=r;a.name==="svg"&&r.space==="html"&&(s=rg,e.schema=s),e.ancestors.push(a);const u=a.name===null?e.Fragment:D3(e,a.name,!0),d=XA(e,a),f=cg(e,a);return R3(e,d,u,a),sg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function FA(e,a,i){const r={};return sg(r,cg(e,a)),e.create(a,e.Fragment,r,i)}function VA(e,a){return a.value}function R3(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 $A(e,a,i){return r;function r(s,u,d,f){const v=Array.isArray(d.children)?i:a;return f?v(u,d,f):v(u,d)}}function GA(e,a){return i;function i(r,s,u,d){const f=Array.isArray(u.children),m=lg(r);return a(s,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function YA(e,a){const i={};let r,s;for(s in a.properties)if(s!=="children"&&og.call(a.properties,s)){const u=KA(e,s,a.properties[s]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&BA.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 XA(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 Ac(e,a.position);else{const s=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 Ac(e,a.position);else u=r.value===null?!0:r.value;i[s]=u}return i}function cg(e,a){const i=[];let r=-1;const s=e.passKeys?new Map:OA;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=s.get(m)||0;d=m+"-"+v,s.set(m,v+1)}}const f=M3(e,u,d);f!==void 0&&i.push(f)}return i}function KA(e,a,i){const r=wA(e.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?uA(i):NA(i)),r.property==="style"){let s=typeof i=="object"?i:QA(e,String(i));return e.stylePropertyNameCase==="css"&&(s=ZA(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?xA[r.property]||r.property:r.attribute,i]}}function QA(e,a){try{return RA(a,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,s=new Pn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=_3+"#cannot-parse-style-attribute",s}}function D3(e,a,i){let r;if(!i)r={type:"Literal",value:a};else if(a.includes(".")){const s=a.split(".");let u=-1,d;for(;++u<s.length;){const f=px(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}r=d}else r=px(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const s=r.value;return og.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ac(e)}function Ac(e,a){const i=new Pn("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=_3+"#cannot-handle-mdx-estrees-without-createevaluater",i}function ZA(e){const a={};let i;for(i in e)og.call(e,i)&&(a[JA(i)]=e[i]);return a}function JA(e){let a=e.replace(zA,WA);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function WA(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"]},e_={};function ug(e,a){const i=e_,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return O3(e,r,s)}function O3(e,a,i){if(t_(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 Cx(e.children,a,i)}return Array.isArray(e)?Cx(e,a,i):""}function Cx(e,a,i){const r=[];let s=-1;for(;++s<e.length;)r[s]=O3(e[s],a,i);return r.join("")}function t_(e){return!!(e&&typeof e=="object")}const Nx=document.createElement("i");function dg(e){const a="&"+e+";";Nx.innerHTML=a;const i=Nx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===a?!1:i}function Ma(e,a,i,r){const s=e.length;let u=0,d;if(a<0?a=-a>s?0:s+a:a=a>s?s: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 Fa(e,a){return e.length>0?(Ma(e,e.length,0,a),e):a}const Ex={}.hasOwnProperty;function z3(e){const a={};let i=-1;for(;++i<e.length;)n_(a,e[i]);return a}function n_(e,a){let i;for(i in a){const s=(Ex.call(e,i)?e[i]:void 0)||(e[i]={}),u=a[i];let d;if(u)for(d in u){Ex.call(s,d)||(s[d]=[]);const f=u[d];a_(s[d],Array.isArray(f)?f:f?[f]:[])}}}function a_(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 L3(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 oi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kn=ml(/[A-Za-z]/),Bn=ml(/[\dA-Za-z]/),i_=ml(/[#-'*+\--9=?A-Z^-~]/);function qd(e){return e!==null&&(e<32||e===127)}const a0=ml(/\d/),r_=ml(/[\dA-Fa-f]/),l_=ml(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function At(e){return e!==null&&(e<0||e===32)}function lt(e){return e===-2||e===-1||e===32}const df=ml(new RegExp("\\p{P}|\\p{S}","u")),oo=ml(/\s/);function ml(e){return a;function a(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function xs(e){const a=[];let i=-1,r=0,s=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)))s=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),s=1):d="�"}else d=String.fromCharCode(u);d&&(a.push(e.slice(r,i),encodeURIComponent(d)),r=i+s+1,d=""),s&&(i+=s,s=0)}return a.join("")+e.slice(r)}function mt(e,a,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return lt(m)?(e.enter(i),f(m)):a(m)}function f(m){return lt(m)&&u++<s?(e.consume(m),f):(e.exit(i),a(m))}}const o_={tokenize:s_};function s_(e){const a=e.attempt(this.parser.constructs.contentInitial,r,s);let i;return a;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),mt(e,a,"linePrefix")}function s(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 c_={tokenize:u_},Tx={tokenize:d_};function u_(e){const a=this,i=[];let r=0,s,u,d;return f;function f(E){if(r<i.length){const R=i[r];return a.containerState=R[1],e.attempt(R[0].continuation,m,v)(E)}return v(E)}function m(E){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,s&&M();const R=a.events.length;let D=R,A;for(;D--;)if(a.events[D][0]==="exit"&&a.events[D][1].type==="chunkFlow"){A=a.events[D][1].end;break}T(r);let H=R;for(;H<a.events.length;)a.events[H][1].end={...A},H++;return Ma(a.events,D+1,0,a.events.slice(R)),a.events.length=H,v(E)}return f(E)}function v(E){if(r===i.length){if(!s)return b(E);if(s.currentConstruct&&s.currentConstruct.concrete)return w(E);a.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(Tx,y,g)(E)}function y(E){return s&&M(),T(r),b(E)}function g(E){return a.parser.lazy[a.now().line]=r!==i.length,d=a.now().offset,w(E)}function b(E){return a.containerState={},e.attempt(Tx,j,w)(E)}function j(E){return r++,i.push([a.currentConstruct,a.containerState]),b(E)}function w(E){if(E===null){s&&M(),T(0),e.consume(E);return}return s=s||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(E)}function k(E){if(E===null){C(e.exit("chunkFlow"),!0),T(0),e.consume(E);return}return $e(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,a.interrupt=void 0,f):(e.consume(E),k)}function C(E,R){const D=a.sliceStream(E);if(R&&D.push(null),E.previous=u,u&&(u.next=E),u=E,s.defineSkip(E.start),s.write(D),a.parser.lazy[E.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<d&&(!s.events[A][1].end||s.events[A][1].end.offset>d))return;const H=a.events.length;let U=H,Y,z;for(;U--;)if(a.events[U][0]==="exit"&&a.events[U][1].type==="chunkFlow"){if(Y){z=a.events[U][1].end;break}Y=!0}for(T(r),A=H;A<a.events.length;)a.events[A][1].end={...z},A++;Ma(a.events,U+1,0,a.events.slice(H)),a.events.length=A}}function T(E){let R=i.length;for(;R-- >E;){const D=i[R];a.containerState=D[1],D[0].exit.call(a,e)}i.length=E}function M(){s.write([null]),u=void 0,s=void 0,a.containerState._closeFlow=void 0}}function d_(e,a,i){return mt(e,e.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function us(e){if(e===null||At(e)||oo(e))return 1;if(df(e))return 2}function ff(e,a,i){const r=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!r.includes(u)&&(a=u(a,i),r.push(u))}return a}const i0={name:"attention",resolveAll:f_,tokenize:h_};function f_(e,a){let i=-1,r,s,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 g={...e[r][1].end},b={...e[i][1].start};Ax(g,-m),Ax(b,m),d={type:m>1?"strongSequence":"emphasisSequence",start:g,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}},s={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=Fa(v,[["enter",e[r][1],a],["exit",e[r][1],a]])),v=Fa(v,[["enter",s,a],["enter",d,a],["exit",d,a],["enter",u,a]]),v=Fa(v,ff(a.parser.constructs.insideSpan.null,e.slice(r+1,i),a)),v=Fa(v,[["exit",u,a],["enter",f,a],["exit",f,a],["exit",s,a]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,v=Fa(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 h_(e,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=us(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=us(m),g=!y||y===2&&s||i.includes(m),b=!s||s===2&&y||i.includes(r);return v._open=!!(u===42?g:g&&(s||!b)),v._close=!!(u===42?b:b&&(y||!g)),a(m)}}function Ax(e,a){e.column+=a,e.offset+=a,e._bufferIndex+=a}const m_={name:"autolink",tokenize:p_};function p_(e,a,i){let r=0;return s;function s(j){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(j){return Kn(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||qd(j)?i(j):(e.consume(j),m)}function v(j){return j===64?(e.consume(j),y):i_(j)?(e.consume(j),v):i(j)}function y(j){return Bn(j)?g(j):i(j)}function g(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 w=j===45?b:g;return e.consume(j),w}return i(j)}}const Hc={partial:!0,tokenize:g_};function g_(e,a,i){return r;function r(u){return lt(u)?mt(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||$e(u)?a(u):i(u)}}const B3={continuation:{tokenize:y_},exit:x_,name:"blockQuote",tokenize:v_};function v_(e,a,i){const r=this;return s;function s(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 lt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),a):(e.exit("blockQuotePrefix"),a(d))}}function y_(e,a,i){const r=this;return s;function s(d){return lt(d)?mt(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(B3,a,i)(d)}}function x_(e){e.exit("blockQuote")}const I3={name:"characterEscape",tokenize:b_};function b_(e,a,i){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return l_(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),a):i(u)}}const P3={name:"characterReference",tokenize:j_};function j_(e,a,i){const r=this;let s=0,u,d;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),v):(e.enter("characterReferenceValue"),u=31,d=Bn,y(g))}function v(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=r_,y):(e.enter("characterReferenceValue"),u=7,d=a0,y(g))}function y(g){if(g===59&&s){const b=e.exit("characterReferenceValue");return d===Bn&&!dg(r.sliceSerialize(b))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),a)}return d(g)&&s++<u?(e.consume(g),y):i(g)}}const _x={partial:!0,tokenize:S_},Mx={concrete:!0,name:"codeFenced",tokenize:w_};function w_(e,a,i){const r=this,s={partial:!0,tokenize:D};let u=0,d=0,f;return m;function m(A){return v(A)}function v(A){const H=r.events[r.events.length-1];return u=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[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"),lt(A)?mt(e,g,"whitespace")(A):g(A))}function g(A){return A===null||$e(A)?(e.exit("codeFencedFence"),r.interrupt?a(A):e.check(_x,k,R)(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"),g(A)):lt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mt(e,j,"whitespace")(A)):A===96&&A===f?i(A):(e.consume(A),b)}function j(A){return A===null||$e(A)?g(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(A))}function w(A){return A===null||$e(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(A)):A===96&&A===f?i(A):(e.consume(A),w)}function k(A){return e.attempt(s,R,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),T}function T(A){return u>0&<(A)?mt(e,M,"linePrefix",u+1)(A):M(A)}function M(A){return A===null||$e(A)?e.check(_x,k,R)(A):(e.enter("codeFlowValue"),E(A))}function E(A){return A===null||$e(A)?(e.exit("codeFlowValue"),M(A)):(e.consume(A),E)}function R(A){return e.exit("codeFenced"),a(A)}function D(A,H,U){let Y=0;return z;function z($){return A.enter("lineEnding"),A.consume($),A.exit("lineEnding"),V}function V($){return A.enter("codeFencedFence"),lt($)?mt(A,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):F($)}function F($){return $===f?(A.enter("codeFencedFenceSequence"),J($)):U($)}function J($){return $===f?(Y++,A.consume($),J):Y>=d?(A.exit("codeFencedFenceSequence"),lt($)?mt(A,G,"whitespace")($):G($)):U($)}function G($){return $===null||$e($)?(A.exit("codeFencedFence"),H($)):U($)}}}function S_(e,a,i){const r=this;return s;function s(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:C_},k_={partial:!0,tokenize:N_};function C_(e,a,i){const r=this;return s;function s(v){return e.enter("codeIndented"),mt(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(k_,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 N_(e,a,i){const r=this;return s;function s(d){return r.parser.lazy[r.now().line]?i(d):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):mt(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)?s(d):i(d)}}const E_={name:"codeText",previous:A_,resolve:T_,tokenize:__};function T_(e){let a=e.length-4,i=3,r,s;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;)s===void 0?r!==a&&e[r][1].type!=="lineEnding"&&(s=r):(r===a||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),a-=r-s-2,r=s+2),s=void 0);return e}function A_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function __(e,a,i){let r=0,s,u;return d;function d(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),r++,f):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(u=e.enter("codeTextSequence"),s=0,y(g)):$e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),v(g))}function v(g){return g===null||g===32||g===96||$e(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),v)}function y(g){return g===96?(e.consume(g),s++,y):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),a(g)):(u.type="codeTextData",v(g))}}class M_{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 s=i||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&vc(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),vc(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),vc(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);vc(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);vc(this.left,i.reverse())}}}function vc(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 H3(e){const a={};let i=-1,r,s,u,d,f,m,v;const y=new M_(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,R_(y,i)),i=a[i],v=!0);else if(r[1]._container){for(u=i,s=void 0;u--;)if(d=y.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),d[1].type="lineEnding",s=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;s&&(r[1].end={...y.get(s)[1].start},f=y.slice(s,i),f.unshift(r),y.splice(s,i-s+1,f))}}return Ma(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function R_(e,a){const i=e.get(a)[1],r=e.get(a)[2];let s=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,g,b=-1,j=i,w=0,k=0;const C=[k];for(;j;){for(;e.get(++s)[1]!==j;);u.push(s),j._tokenizer||(y=r.sliceStream(j),j.next||y.push(null),g&&d.defineSkip(j.start),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),g=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 T=f.slice(C[b],C[b+1]),M=u.pop();m.push([M,M+T.length-1]),e.splice(M,2,T)}for(m.reverse(),b=-1;++b<m.length;)v[w+m[b][0]]=w+m[b][1],w+=m[b][1]-m[b][0]-1;return v}const D_={resolve:z_,tokenize:L_},O_={partial:!0,tokenize:B_};function z_(e){return H3(e),e}function L_(e,a){let i;return r;function r(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):$e(f)?e.check(O_,d,u)(f):(e.consume(f),s)}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,s}}function B_(e,a,i){const r=this;return s;function s(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),mt(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 U3(e,a,i,r,s,u,d,f,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(T){return T===60?(e.enter(r),e.enter(s),e.enter(u),e.consume(T),e.exit(u),b):T===null||T===32||T===41||qd(T)?i(T):(e.enter(r),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(T))}function b(T){return T===62?(e.enter(u),e.consume(T),e.exit(u),e.exit(s),e.exit(r),a):(e.enter(f),e.enter("chunkString",{contentType:"string"}),j(T))}function j(T){return T===62?(e.exit("chunkString"),e.exit(f),b(T)):T===null||T===60||$e(T)?i(T):(e.consume(T),T===92?w:j)}function w(T){return T===60||T===62||T===92?(e.consume(T),j):j(T)}function k(T){return!y&&(T===null||T===41||At(T))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(r),a(T)):y<v&&T===40?(e.consume(T),y++,k):T===41?(e.consume(T),y--,k):T===null||T===32||T===40||qd(T)?i(T):(e.consume(T),T===92?C:k)}function C(T){return T===40||T===41||T===92?(e.consume(T),k):k(T)}}function q3(e,a,i,r,s,u){const d=this;let f=0,m;return v;function v(j){return e.enter(r),e.enter(s),e.consume(j),e.exit(s),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(s),e.consume(j),e.exit(s),e.exit(r),a):$e(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===null||j===91||j===93||$e(j)||f++>999?(e.exit("chunkString"),y(j)):(e.consume(j),m||(m=!lt(j)),j===92?b:g)}function b(j){return j===91||j===92||j===93?(e.consume(j),f++,g):g(j)}}function F3(e,a,i,r,s,u){let d;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),d=b===40?41:b,m):i(b)}function m(b){return b===d?(e.enter(s),e.consume(b),e.exit(s),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"),mt(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?g:y)}function g(b){return b===d||b===92?(e.consume(b),y):y(b)}}function bc(e,a){let i;return r;function r(s){return $e(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,r):lt(s)?mt(e,r,i?"linePrefix":"lineSuffix")(s):a(s)}}const I_={name:"definition",tokenize:H_},P_={partial:!0,tokenize:U_};function H_(e,a,i){const r=this;let s;return u;function u(j){return e.enter("definition"),d(j)}function d(j){return q3.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(j)}function f(j){return s=oi(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 At(j)?bc(e,v)(j):v(j)}function v(j){return U3(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(j)}function y(j){return e.attempt(P_,g,g)(j)}function g(j){return lt(j)?mt(e,b,"whitespace")(j):b(j)}function b(j){return j===null||$e(j)?(e.exit("definition"),r.parser.defined.push(s),a(j)):i(j)}}function U_(e,a,i){return r;function r(f){return At(f)?bc(e,s)(f):i(f)}function s(f){return F3(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return lt(f)?mt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||$e(f)?a(f):i(f)}}const q_={name:"hardBreakEscape",tokenize:F_};function F_(e,a,i){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return $e(u)?(e.exit("hardBreakEscape"),a(u)):i(u)}}const V_={name:"headingAtx",resolve:$_,tokenize:G_};function $_(e,a){let i=e.length-2,r=3,s,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&&(s={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",s,a],["enter",u,a],["exit",u,a],["exit",s,a]])),e}function G_(e,a,i){let r=0;return s;function s(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||At(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)):lt(y)?mt(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||At(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),v)}}const Y_=["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"],Rx=["pre","script","style","textarea"],X_={concrete:!0,name:"htmlFlow",resolveTo:Z_,tokenize:J_},K_={partial:!0,tokenize:eM},Q_={partial:!0,tokenize:W_};function Z_(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 J_(e,a,i){const r=this;let s,u,d,f,m;return v;function v(L){return y(L)}function y(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),g}function g(L){return L===33?(e.consume(L),b):L===47?(e.consume(L),u=!0,k):L===63?(e.consume(L),s=3,r.interrupt?a:_):Kn(L)?(e.consume(L),d=String.fromCharCode(L),C):i(L)}function b(L){return L===45?(e.consume(L),s=2,j):L===91?(e.consume(L),s=5,f=0,w):Kn(L)?(e.consume(L),s=4,r.interrupt?a:_):i(L)}function j(L){return L===45?(e.consume(L),r.interrupt?a:_):i(L)}function w(L){const q="CDATA[";return L===q.charCodeAt(f++)?(e.consume(L),f===q.length?r.interrupt?a:F:w):i(L)}function k(L){return Kn(L)?(e.consume(L),d=String.fromCharCode(L),C):i(L)}function C(L){if(L===null||L===47||L===62||At(L)){const q=L===47,ue=d.toLowerCase();return!q&&!u&&Rx.includes(ue)?(s=1,r.interrupt?a(L):F(L)):Y_.includes(d.toLowerCase())?(s=6,q?(e.consume(L),T):r.interrupt?a(L):F(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(L):u?M(L):E(L))}return L===45||Bn(L)?(e.consume(L),d+=String.fromCharCode(L),C):i(L)}function T(L){return L===62?(e.consume(L),r.interrupt?a:F):i(L)}function M(L){return lt(L)?(e.consume(L),M):z(L)}function E(L){return L===47?(e.consume(L),z):L===58||L===95||Kn(L)?(e.consume(L),R):lt(L)?(e.consume(L),E):z(L)}function R(L){return L===45||L===46||L===58||L===95||Bn(L)?(e.consume(L),R):D(L)}function D(L){return L===61?(e.consume(L),A):lt(L)?(e.consume(L),D):E(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(e.consume(L),m=L,H):lt(L)?(e.consume(L),A):U(L)}function H(L){return L===m?(e.consume(L),m=null,Y):L===null||$e(L)?i(L):(e.consume(L),H)}function U(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||At(L)?D(L):(e.consume(L),U)}function Y(L){return L===47||L===62||lt(L)?E(L):i(L)}function z(L){return L===62?(e.consume(L),V):i(L)}function V(L){return L===null||$e(L)?F(L):lt(L)?(e.consume(L),V):i(L)}function F(L){return L===45&&s===2?(e.consume(L),K):L===60&&s===1?(e.consume(L),I):L===62&&s===4?(e.consume(L),ae):L===63&&s===3?(e.consume(L),_):L===93&&s===5?(e.consume(L),W):$e(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(K_,ie,J)(L)):L===null||$e(L)?(e.exit("htmlFlowData"),J(L)):(e.consume(L),F)}function J(L){return e.check(Q_,G,ie)(L)}function G(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),$}function $(L){return L===null||$e(L)?J(L):(e.enter("htmlFlowData"),F(L))}function K(L){return L===45?(e.consume(L),_):F(L)}function I(L){return L===47?(e.consume(L),d="",P):F(L)}function P(L){if(L===62){const q=d.toLowerCase();return Rx.includes(q)?(e.consume(L),ae):F(L)}return Kn(L)&&d.length<8?(e.consume(L),d+=String.fromCharCode(L),P):F(L)}function W(L){return L===93?(e.consume(L),_):F(L)}function _(L){return L===62?(e.consume(L),ae):L===45&&s===2?(e.consume(L),_):F(L)}function ae(L){return L===null||$e(L)?(e.exit("htmlFlowData"),ie(L)):(e.consume(L),ae)}function ie(L){return e.exit("htmlFlow"),a(L)}}function W_(e,a,i){const r=this;return s;function s(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 eM(e,a,i){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hc,a,i)}}const tM={name:"htmlText",tokenize:nM};function nM(e,a,i){const r=this;let s,u,d;return f;function f(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),m}function m(_){return _===33?(e.consume(_),v):_===47?(e.consume(_),D):_===63?(e.consume(_),E):Kn(_)?(e.consume(_),U):i(_)}function v(_){return _===45?(e.consume(_),y):_===91?(e.consume(_),u=0,w):Kn(_)?(e.consume(_),M):i(_)}function y(_){return _===45?(e.consume(_),j):i(_)}function g(_){return _===null?i(_):_===45?(e.consume(_),b):$e(_)?(d=g,I(_)):(e.consume(_),g)}function b(_){return _===45?(e.consume(_),j):g(_)}function j(_){return _===62?K(_):_===45?b(_):g(_)}function w(_){const ae="CDATA[";return _===ae.charCodeAt(u++)?(e.consume(_),u===ae.length?k:w):i(_)}function k(_){return _===null?i(_):_===93?(e.consume(_),C):$e(_)?(d=k,I(_)):(e.consume(_),k)}function C(_){return _===93?(e.consume(_),T):k(_)}function T(_){return _===62?K(_):_===93?(e.consume(_),T):k(_)}function M(_){return _===null||_===62?K(_):$e(_)?(d=M,I(_)):(e.consume(_),M)}function E(_){return _===null?i(_):_===63?(e.consume(_),R):$e(_)?(d=E,I(_)):(e.consume(_),E)}function R(_){return _===62?K(_):E(_)}function D(_){return Kn(_)?(e.consume(_),A):i(_)}function A(_){return _===45||Bn(_)?(e.consume(_),A):H(_)}function H(_){return $e(_)?(d=H,I(_)):lt(_)?(e.consume(_),H):K(_)}function U(_){return _===45||Bn(_)?(e.consume(_),U):_===47||_===62||At(_)?Y(_):i(_)}function Y(_){return _===47?(e.consume(_),K):_===58||_===95||Kn(_)?(e.consume(_),z):$e(_)?(d=Y,I(_)):lt(_)?(e.consume(_),Y):K(_)}function z(_){return _===45||_===46||_===58||_===95||Bn(_)?(e.consume(_),z):V(_)}function V(_){return _===61?(e.consume(_),F):$e(_)?(d=V,I(_)):lt(_)?(e.consume(_),V):Y(_)}function F(_){return _===null||_===60||_===61||_===62||_===96?i(_):_===34||_===39?(e.consume(_),s=_,J):$e(_)?(d=F,I(_)):lt(_)?(e.consume(_),F):(e.consume(_),G)}function J(_){return _===s?(e.consume(_),s=void 0,$):_===null?i(_):$e(_)?(d=J,I(_)):(e.consume(_),J)}function G(_){return _===null||_===34||_===39||_===60||_===61||_===96?i(_):_===47||_===62||At(_)?Y(_):(e.consume(_),G)}function $(_){return _===47||_===62||At(_)?Y(_):i(_)}function K(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),a):i(_)}function I(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),P}function P(_){return lt(_)?mt(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):W(_)}function W(_){return e.enter("htmlTextData"),d(_)}}const fg={name:"labelEnd",resolveAll:lM,resolveTo:oM,tokenize:sM},aM={tokenize:cM},iM={tokenize:uM},rM={tokenize:dM};function lM(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 s=r.type==="labelImage"?4:2;r.type="data",a+=s}}return e.length!==i.length&&Ma(e,0,e.length,i),e}function oM(e,a){let i=e.length,r=0,s,u,d,f;for(;i--;)if(s=e[i][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(d){if(e[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=i,s.type!=="labelLink")){r=2;break}}else s.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=Fa(f,e.slice(u+1,u+r+3)),f=Fa(f,[["enter",y,a]]),f=Fa(f,ff(a.parser.constructs.insideSpan.null,e.slice(u+r+4,d-3),a)),f=Fa(f,[["exit",y,a],e[d-2],e[d-1],["exit",v,a]]),f=Fa(f,e.slice(d+1)),f=Fa(f,[["exit",m,a]]),Ma(e,u,e.length,f),e}function sM(e,a,i){const r=this;let s=r.events.length,u,d;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){u=r.events[s][1];break}return f;function f(b){return u?u._inactive?g(b):(d=r.parser.defined.includes(oi(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(aM,y,d?y:g)(b):b===91?e.attempt(iM,y,d?v:g)(b):d?y(b):g(b)}function v(b){return e.attempt(rM,y,g)(b)}function y(b){return a(b)}function g(b){return u._balanced=!0,i(b)}}function cM(e,a,i){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return At(g)?bc(e,u)(g):u(g)}function u(g){return g===41?y(g):U3(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function d(g){return At(g)?bc(e,m)(g):y(g)}function f(g){return i(g)}function m(g){return g===34||g===39||g===40?F3(e,v,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function v(g){return At(g)?bc(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),a):i(g)}}function uM(e,a,i){const r=this;return s;function s(f){return q3.call(r,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return r.parser.defined.includes(oi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(f):i(f)}function d(f){return i(f)}}function dM(e,a,i){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),a):i(u)}}const fM={name:"labelStartImage",resolveAll:fg.resolveAll,tokenize:hM};function hM(e,a,i){const r=this;return s;function s(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 mM={name:"labelStartLink",resolveAll:fg.resolveAll,tokenize:pM};function pM(e,a,i){const r=this;return s;function s(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:gM};function gM(e,a){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),mt(e,a,"linePrefix")}}const Rd={name:"thematicBreak",tokenize:vM};function vM(e,a,i){let r=0,s;return u;function u(v){return e.enter("thematicBreak"),d(v)}function d(v){return s=v,f(v)}function f(v){return v===s?(e.enter("thematicBreakSequence"),m(v)):r>=3&&(v===null||$e(v))?(e.exit("thematicBreak"),a(v)):i(v)}function m(v){return v===s?(e.consume(v),r++,m):(e.exit("thematicBreakSequence"),lt(v)?mt(e,f,"whitespace")(v):f(v))}}const oa={continuation:{tokenize:jM},exit:SM,name:"list",tokenize:bM},yM={partial:!0,tokenize:kM},xM={partial:!0,tokenize:wM};function bM(e,a,i){const r=this,s=r.events[r.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,d=0;return f;function f(j){const w=r.containerState.type||(j===42||j===43||j===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||j===r.containerState.marker:a0(j)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),j===42||j===45?e.check(Rd,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 a0(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(Hc,r.interrupt?i:y,e.attempt(yM,b,g))}function y(j){return r.containerState.initialBlankLine=!0,u++,b(j)}function g(j){return lt(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 jM(e,a,i){const r=this;return r.containerState._closeFlow=void 0,e.check(Hc,s,u);function s(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mt(e,a,"listItemIndent",r.containerState.size+1)(f)}function u(f){return r.containerState.furtherBlankLines||!lt(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(xM,a,d)(f))}function d(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,mt(e,e.attempt(oa,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function wM(e,a,i){const r=this;return mt(e,s,"listItemIndent",r.containerState.size+1);function s(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 SM(e){e.exit(this.containerState.type)}function kM(e,a,i){const r=this;return mt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const d=r.events[r.events.length-1];return!lt(u)&&d&&d[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const Dx={name:"setextUnderline",resolveTo:CM,tokenize:NM};function CM(e,a){let i=e.length,r,s,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(s=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[s][1].type="setextHeadingText",u?(e.splice(s,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 NM(e,a,i){const r=this;let s;return u;function u(v){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),s=v,d(v)):i(v)}function d(v){return e.enter("setextHeadingLineSequence"),f(v)}function f(v){return v===s?(e.consume(v),f):(e.exit("setextHeadingLineSequence"),lt(v)?mt(e,m,"lineSuffix")(v):m(v))}function m(v){return v===null||$e(v)?(e.exit("setextHeadingLine"),a(v)):i(v)}}const EM={tokenize:TM};function TM(e){const a=this,i=e.attempt(Hc,r,e.attempt(this.parser.constructs.flowInitial,s,mt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(D_,s)),"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 s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a.currentConstruct=void 0,i}}const AM={resolveAll:$3()},_M=V3("string"),MM=V3("text");function V3(e){return{resolveAll:$3(e==="text"?RM:void 0),tokenize:a};function a(i){const r=this,s=this.parser.constructs[e],u=i.attempt(s,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 g=s[y];let b=-1;if(g)for(;++b<g.length;){const j=g[b];if(!j.previous||j.previous.call(r,r.previous))return!0}return!1}}}function $3(e){return a;function a(i,r){let s=-1,u;for(;++s<=i.length;)u===void 0?i[s]&&i[s][1].type==="data"&&(u=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==u+2&&(i[u][1].end=i[s-1][1].end,i.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(i,r):i}}function RM(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],s=a.sliceStream(r);let u=s.length,d=-1,f=0,m;for(;u--;){const v=s[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 DM={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:B3},OM={91:I_},zM={[-2]:ip,[-1]:ip,32:ip},LM={35:V_,42:Rd,45:[Dx,Rd],60:X_,61:Dx,95:Rd,96:Mx,126:Mx},BM={38:P3,92:I3},IM={[-5]:rp,[-4]:rp,[-3]:rp,33:fM,38:P3,42:i0,60:[m_,tM],91:mM,92:[q_,I3],93:fg,95:i0,96:E_},PM={null:[i0,AM]},HM={null:[42,95]},UM={null:[]},qM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:HM,contentInitial:OM,disable:UM,document:DM,flow:LM,flowInitial:zM,insideSpan:PM,string:BM,text:IM},Symbol.toStringTag,{value:"Module"}));function FM(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 s={},u=[];let d=[],f=[];const m={attempt:H(D),check:H(A),consume:M,enter:E,exit:R,interrupt:H(A,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:b,sliceStream:j,write:g};let y=a.tokenize.call(v,m);return a.resolveAll&&u.push(a),v;function g(V){return d=Fa(d,V),C(),d[d.length-1]!==null?[]:(U(a,0),v.events=ff(u,v.events,v),v.events)}function b(V,F){return $M(j(V),F)}function j(V){return VM(d,V)}function w(){const{_bufferIndex:V,_index:F,line:J,column:G,offset:$}=r;return{_bufferIndex:V,_index:F,line:J,column:G,offset:$}}function k(V){s[V.line]=V.column,z()}function C(){let V;for(;r._index<d.length;){const F=d[r._index];if(typeof F=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<F.length;)T(F.charCodeAt(r._bufferIndex));else T(F)}}function T(V){y=y(V)}function M(V){$e(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,z()):V!==-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=V}function E(V,F){const J=F||{};return J.type=V,J.start=w(),v.events.push(["enter",J,v]),f.push(J),J}function R(V){const F=f.pop();return F.end=w(),v.events.push(["exit",F,v]),F}function D(V,F){U(V,F.from)}function A(V,F){F.restore()}function H(V,F){return J;function J(G,$,K){let I,P,W,_;return Array.isArray(G)?ie(G):"tokenize"in G?ie([G]):ae(G);function ae(xe){return be;function be(je){const Ae=je!==null&&xe[je],Re=je!==null&&xe.null,ye=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return ie(ye)(je)}}function ie(xe){return I=xe,P=0,xe.length===0?K:L(xe[P])}function L(xe){return be;function be(je){return _=Y(),W=xe,xe.partial||(v.currentConstruct=xe),xe.name&&v.parser.constructs.disable.null.includes(xe.name)?ue():xe.tokenize.call(F?Object.assign(Object.create(v),F):v,m,q,ue)(je)}}function q(xe){return V(W,_),$}function ue(xe){return _.restore(),++P<I.length?L(I[P]):K}}}function U(V,F){V.resolveAll&&!u.includes(V)&&u.push(V),V.resolve&&Ma(v.events,F,v.events.length-F,V.resolve(v.events.slice(F),v)),V.resolveTo&&(v.events=V.resolveTo(v.events,v))}function Y(){const V=w(),F=v.previous,J=v.currentConstruct,G=v.events.length,$=Array.from(f);return{from:G,restore:K};function K(){r=V,v.previous=F,v.currentConstruct=J,v.events.length=G,f=$,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function VM(e,a){const i=a.start._index,r=a.start._bufferIndex,s=a.end._index,u=a.end._bufferIndex;let d;if(i===s)d=[e[i].slice(r,u)];else{if(d=e.slice(i,s),r>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(r):d.shift()}u>0&&d.push(e[s].slice(0,u))}return d}function $M(e,a){let i=-1;const r=[];let s;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&&s)continue;d=" ";break}default:d=String.fromCharCode(u)}s=u===-2,r.push(d)}return r.join("")}function GM(e){const r={constructs:z3([qM,...(e||{}).extensions||[]]),content:s(o_),defined:[],document:s(c_),flow:s(EM),lazy:{},string:s(_M),text:s(MM)};return r;function s(u){return d;function d(f){return FM(r,u,f)}}}function YM(e){for(;!H3(e););return e}const Ox=/[\0\t\n\r]/g;function XM(){let e=1,a="",i=!0,r;return s;function s(u,d,f){const m=[];let v,y,g,b,j;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),g=0,a="",i&&(u.charCodeAt(0)===65279&&g++,i=void 0);g<u.length;){if(Ox.lastIndex=g,v=Ox.exec(u),b=v&&v.index!==void 0?v.index:u.length,j=u.charCodeAt(b),!v){a=u.slice(g);break}if(j===10&&g===b&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),g<b&&(m.push(u.slice(g,b)),e+=b-g),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}g=b+1}return f&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const KM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function QM(e){return e.replace(KM,ZM)}function ZM(e,a,i){if(a)return a;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),u=s===120||s===88;return L3(i.slice(u?2:1),u?16:10)}return dg(i)||e}const G3={}.hasOwnProperty;function JM(e,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),WM(i)(YM(GM(i).document().write(XM()(e,a,!0))))}function WM(e){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(gt),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:u(Ee),blockQuote:u(Re),characterEscape:Y,characterReference:Y,codeFenced:u(ye),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(ye,d),codeText:u(Q,d),codeTextData:Y,data:Y,codeFlowValue:Y,definition:u(he),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(ke),hardBreakEscape:u(Ie),hardBreakTrailing:u(Ie),htmlFlow:u(Ye,d),htmlFlowData:Y,htmlText:u(Ye,d),htmlTextData:Y,image:u(Ke),label:d,link:u(gt),listItem:u(xn),listItemValue:b,listOrdered:u(rn,g),listUnordered:u(rn),paragraph:u(Hn),reference:L,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Ee),strong:u(fa),thematicBreak:u(Ya)},exit:{atxHeading:m(),atxHeadingSequence:D,autolink:m(),autolinkEmail:Ae,autolinkProtocol:je,blockQuote:m(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:xe,characterReference:be,codeFenced:m(C),codeFencedFence:k,codeFencedFenceInfo:j,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:m(T),codeText:m($),codeTextData:z,data:z,definition:m(),definitionDestinationString:R,definitionLabelString:M,definitionTitleString:E,emphasis:m(),hardBreakEscape:m(F),hardBreakTrailing:m(F),htmlFlow:m(J),htmlFlowData:z,htmlText:m(G),htmlTextData:z,image:m(I),label:W,labelText:P,lineEnding:V,link:m(K),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:q,resourceDestinationString:_,resourceTitleString:ae,resource:ie,setextHeading:m(U),setextHeadingLineSequence:H,setextHeadingText:A,strong:m(),thematicBreak:m()}};Y3(a,(e||{}).mdastExtensions||[]);const i={};return r;function r(de){let Ce={type:"root",children:[]};const Fe={stack:[Ce],tokenStack:[],config:a,enter:f,exit:v,buffer:d,resume:y,data:i},Ge=[];let nt=-1;for(;++nt<de.length;)if(de[nt][1].type==="listOrdered"||de[nt][1].type==="listUnordered")if(de[nt][0]==="enter")Ge.push(nt);else{const Ht=Ge.pop();nt=s(de,Ht,nt)}for(nt=-1;++nt<de.length;){const Ht=a[de[nt][0]];G3.call(Ht,de[nt][1].type)&&Ht[de[nt][1].type].call(Object.assign({sliceSerialize:de[nt][2].sliceSerialize},Fe),de[nt][1])}if(Fe.tokenStack.length>0){const Ht=Fe.tokenStack[Fe.tokenStack.length-1];(Ht[1]||zx).call(Fe,void 0,Ht[0])}for(Ce.position={start:al(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:al(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<a.transforms.length;)Ce=a.transforms[nt](Ce)||Ce;return Ce}function s(de,Ce,Fe){let Ge=Ce-1,nt=-1,Ht=!1,dn,Ut,Rn,Un;for(;++Ge<=Fe;){const Ot=de[Ge];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?nt++:nt--,Un=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&(dn&&!Un&&!nt&&!Rn&&(Rn=Ge),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!nt&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||nt===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if(dn){let Dn=Ge;for(Ut=void 0;Dn--;){const Qe=de[Dn];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ut&&(de[Ut][1].type="lineEndingBlank",Ht=!0),Qe[1].type="lineEnding",Ut=Dn}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Rn&&(!Ut||Rn<Ut)&&(dn._spread=!0),dn.end=Object.assign({},Ut?de[Ut][1].start:Ot[1].end),de.splice(Ut||Ge,0,["exit",dn,Ot[2]]),Ge++,Fe++}if(Ot[1].type==="listItemPrefix"){const Dn={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};dn=Dn,de.splice(Ge,0,["enter",Dn,Ot[2]]),Ge++,Fe++,Rn=void 0,Un=!0}}}return de[Ce][1]._spread=Ht,Fe}function u(de,Ce){return Fe;function Fe(Ge){f.call(this,de(Ge),Ge),Ce&&Ce.call(this,Ge)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(de,Ce,Fe){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([Ce,Fe||void 0]),de.position={start:al(Ce.start),end:void 0}}function m(de){return Ce;function Ce(Fe){de&&de.call(this,Fe),v.call(this,Fe)}}function v(de,Ce){const Fe=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==de.type&&(Ce?Ce.call(this,de,Ge[0]):(Ge[1]||zx).call(this,de,Ge[0]));else throw new Error("Cannot close `"+de.type+"` ("+xc({start:de.start,end:de.end})+"): it’s not open");Fe.position.end=al(de.end)}function y(){return ug(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(de){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function j(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=de}function w(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=de}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de.replace(/(\r?\n|\r)$/g,"")}function M(de){const Ce=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Ce,Fe.identifier=oi(this.sliceSerialize(de)).toLowerCase()}function E(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=de}function R(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=de}function D(de){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Fe=this.sliceSerialize(de).length;Ce.depth=Fe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function H(de){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(de){const Fe=this.stack[this.stack.length-1].children;let Ge=Fe[Fe.length-1];(!Ge||Ge.type!=="text")&&(Ge=ln(),Ge.position={start:al(de.start),end:void 0},Fe.push(Ge)),this.stack.push(Ge)}function z(de){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(de),Ce.position.end=al(de.end)}function V(de){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=Ce.children[Ce.children.length-1];Fe.position.end=al(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(Ce.type)&&(Y.call(this,de),z.call(this,de))}function F(){this.data.atHardBreak=!0}function J(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function G(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function $(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=de}function K(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ce,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function I(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=Ce,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function P(de){const Ce=this.sliceSerialize(de),Fe=this.stack[this.stack.length-2];Fe.label=QM(Ce),Fe.identifier=oi(Ce).toLowerCase()}function W(){const de=this.stack[this.stack.length-1],Ce=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const Ge=de.children;Fe.children=Ge}else Fe.alt=Ce}function _(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=de}function ae(){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=de}function ie(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function q(de){const Ce=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Ce,Fe.identifier=oi(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function ue(de){this.data.characterReferenceType=de.type}function xe(de){const Ce=this.sliceSerialize(de),Fe=this.data.characterReferenceType;let Ge;Fe?(Ge=L3(Ce,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=dg(Ce);const nt=this.stack[this.stack.length-1];nt.value+=Ge}function be(de){const Ce=this.stack.pop();Ce.position.end=al(de.end)}function je(de){z.call(this,de);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(de)}function Ae(de){z.call(this,de);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(de)}function Re(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function he(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Ee(){return{type:"heading",depth:0,children:[]}}function Ie(){return{type:"break"}}function Ye(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function rn(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function xn(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function Hn(){return{type:"paragraph",children:[]}}function fa(){return{type:"strong",children:[]}}function ln(){return{type:"text",value:""}}function Ya(){return{type:"thematicBreak"}}}function al(e){return{line:e.line,column:e.column,offset:e.offset}}function Y3(e,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?Y3(e,r):eR(e,r)}}function eR(e,a){let i;for(i in a)if(G3.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 zx(e,a){throw e?new Error("Cannot close `"+e.type+"` ("+xc({start:e.start,end:e.end})+"): a different token (`"+a.type+"`, "+xc({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+xc({start:a.start,end:a.end})+") is still open")}function tR(e){const a=this;a.parser=i;function i(r){return JM(r,{...a.data("settings"),...e,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function nR(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 aR(e,a){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(a,i),[e.applyData(a,i),{type:"text",value:`
|
|
523
|
+
`}]}function iR(e,a){const i=a.value?a.value+`
|
|
524
|
+
`:"",r={},s=a.lang?a.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[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 rR(e,a){const i={type:"element",tagName:"del",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function lR(e,a){const i={type:"element",tagName:"em",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function oR(e,a){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),s=xs(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-"+s,id:i+"fnref-"+s+(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 sR(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 cR(e,a){if(e.options.allowDangerousHtml){const i={type:"raw",value:a.value};return e.patch(a,i),e.applyData(a,i)}}function X3(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 s=e.all(a),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const d=s[s.length-1];return d&&d.type==="text"?d.value+=r:s.push({type:"text",value:r}),s}function uR(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return X3(e,a);const s={src:xs(r.url||""),alt:a.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(a,u),e.applyData(a,u)}function dR(e,a){const i={src:xs(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 fR(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 hR(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return X3(e,a);const s={href:xs(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const u={type:"element",tagName:"a",properties:s,children:e.all(a)};return e.patch(a,u),e.applyData(a,u)}function mR(e,a){const i={href:xs(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 pR(e,a,i){const r=e.all(a),s=i?gR(i):K3(a),u={},d=[];if(typeof a.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.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];(s||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
|
|
525
|
+
`}),y.type==="element"&&y.tagName==="p"&&!s?d.push(...y.children):d.push(y)}const m=r[r.length-1];m&&(s||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 gR(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=K3(i[r])}return a}function K3(e){const a=e.spread;return a??e.children.length>1}function vR(e,a){const i={},r=e.all(a);let s=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++s<r.length;){const d=r[s];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 yR(e,a){const i={type:"element",tagName:"p",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function xR(e,a){const i={type:"root",children:e.wrap(e.all(a))};return e.patch(a,i),e.applyData(a,i)}function bR(e,a){const i={type:"element",tagName:"strong",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function jR(e,a){const i=e.all(a),r=i.shift(),s=[];if(r){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(a.children[0],d),s.push(d)}if(i.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=lg(a.children[1]),m=T3(a.children[a.children.length-1]);f&&m&&(d.position={start:f,end:m}),s.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(a,u),e.applyData(a,u)}function wR(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 g=a.children[m],b={},j=d?d[m]:void 0;j&&(b.align=j);let w={type:"element",tagName:u,properties:b,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),v.push(w)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(v,!0)};return e.patch(a,y),e.applyData(a,y)}function SR(e,a){const i={type:"element",tagName:"td",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}const Lx=9,Bx=32;function kR(e){const a=String(e),i=/\r?\n|\r/g;let r=i.exec(a),s=0;const u=[];for(;r;)u.push(Ix(a.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(a);return u.push(Ix(a.slice(s),s>0,!1)),u.join("")}function Ix(e,a,i){let r=0,s=e.length;if(a){let u=e.codePointAt(r);for(;u===Lx||u===Bx;)r++,u=e.codePointAt(r)}if(i){let u=e.codePointAt(s-1);for(;u===Lx||u===Bx;)s--,u=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function CR(e,a){const i={type:"text",value:kR(String(a.value))};return e.patch(a,i),e.applyData(a,i)}function NR(e,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(a,i),e.applyData(a,i)}const ER={blockquote:nR,break:aR,code:iR,delete:rR,emphasis:lR,footnoteReference:oR,heading:sR,html:cR,imageReference:uR,image:dR,inlineCode:fR,linkReference:hR,link:mR,listItem:pR,list:vR,paragraph:yR,root:xR,strong:bR,table:jR,tableCell:SR,tableRow:wR,text:CR,thematicBreak:NR,toml:gd,yaml:gd,definition:gd,footnoteDefinition:gd};function gd(){}const Q3=-1,hf=0,jc=1,Fd=2,hg=3,mg=4,pg=5,gg=6,Z3=7,J3=8,{defineProperty:TR}=Object,W3=typeof self=="object"?self:globalThis,Px=(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 W3[e](a)},AR=(e,a)=>{const i=(s,u)=>(e.set(u,s),s),r=s=>{if(e.has(s))return e.get(s);const[u,d]=a[s];switch(u){case hf:case Q3:return i(d,s);case jc:{const f=i([],s);for(const m of d)f.push(r(m));return f}case Fd:{const f=i({},s);for(const[m,v]of d){const y=r(m),g=r(v);y==="__proto__"?TR(f,y,{value:g,configurable:!0,enumerable:!0,writable:!0}):f[y]=g}return f}case hg:return i(new Date(d),s);case mg:{const{source:f,flags:m}=d;return i(new RegExp(f,m),s)}case pg:{const f=i(new Map,s);for(const[m,v]of d)f.set(r(m),r(v));return f}case gg:{const f=i(new Set,s);for(const m of d)f.add(r(m));return f}case Z3:{const{name:f,message:m}=d;return i(typeof W3[f]=="function"?Px(f,m):new Error(m),s)}case J3:return i(BigInt(d),s);case"BigInt":return i(Object(BigInt(d)),s);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(Px(u,d),s)};return r},Hx=e=>AR(new Map,e)(0),Kl="",{toString:_R}={},{keys:MR,is:RR}=Object,yc=e=>{const a=typeof e;if(a!=="object"||!e)return[hf,a];const i=_R.call(e).slice(8,-1);switch(i){case"Array":return[jc,Kl];case"Object":return[Fd,Kl];case"Date":return[hg,Kl];case"RegExp":return[mg,Kl];case"Map":return[pg,Kl];case"Set":return[gg,Kl];case"DataView":return[jc,i]}return i.includes("Array")?[jc,i]:e instanceof Error?[Z3,e.name||"Error"]:[Fd,i]},vd=([e,a])=>e===hf&&(a==="function"||a==="symbol"),DR=(e,a,i,r)=>{const s=(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]=yc(d);switch(f){case hf:{let y=d;switch(m){case"bigint":f=J3,y=d.toString();break;case"number":if(!d&&RR(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 s([Q3],d)}return s([f,y],d)}case jc:{if(m){let b=d;return m==="DataView"?b=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(b=new Uint8Array(d)),s([m,[...b]],d)}const y=[],g=s([f,y],d);for(const b of d)y.push(u(b));return g}case Fd:{if(m)switch(m){case"BigInt":return s([m,d.toString()],d);case"Boolean":case"Number":case"String":return s([m,d.valueOf()],d)}if(a&&"toJSON"in d)return u(d.toJSON());const y=[],g=s([f,y],d);for(const b of MR(d))(e||!vd(yc(d[b])))&&y.push([u(b),u(d[b])]);return g}case hg:return s([f,isNaN(d.getTime())?Kl:d.toISOString()],d);case mg:{const{source:y,flags:g}=d;return s([f,{source:y,flags:g}],d)}case pg:{const y=[],g=s([f,y],d);for(const[b,j]of d)(e||!(vd(yc(b))||vd(yc(j))))&&y.push([u(b),u(j)]);return g}case gg:{const y=[],g=s([f,y],d);for(const b of d)(e||!vd(yc(b)))&&y.push(u(b));return g}}const{message:v}=d;return s([f,{name:m,message:v}],d)};return u},Ux=(e,{json:a,lossy:i}={})=>{const r=[];return DR(!(a||i),!!a,new Map,r)(e),r},Vd=typeof structuredClone=="function"?(e,a)=>a&&("json"in a||"lossy"in a)?Hx(Ux(e,a)):structuredClone(e):(e,a)=>Hx(Ux(e,a));function OR(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 zR(e,a){return"Back to reference "+(e+1)+(a>1?"-"+a:"")}function LR(e){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||OR,r=e.options.footnoteBackLabel||zR,s=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),g=String(v.identifier).toUpperCase(),b=xs(g.toLowerCase());let j=0;const w=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++j<=k;){w.length>0&&w.push({type:"text",value:" "});let M=typeof i=="string"?i:i(m,j);typeof M=="string"&&(M={type:"text",value:M}),w.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(...w)}else y.push(...w);const T={type:"element",tagName:"li",properties:{id:a+"fn-"+b},children:e.wrap(y,!0)};e.patch(v,T),f.push(T)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Vd(d),id:"footnote-label"},children:[{type:"text",value:s}]},{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 HR;if(typeof e=="function")return pf(e);if(typeof e=="object")return Array.isArray(e)?BR(e):IR(e);if(typeof e=="string")return PR(e);throw new Error("Expected function, string, or object as test")});function BR(e){const a=[];let i=-1;for(;++i<e.length;)a[i]=mf(e[i]);return pf(r);function r(...s){let u=-1;for(;++u<a.length;)if(a[u].apply(this,s))return!0;return!1}}function IR(e){const a=e;return pf(i);function i(r){const s=r;let u;for(u in e)if(s[u]!==a[u])return!1;return!0}}function PR(e){return pf(a);function a(i){return i&&i.type===e}}function pf(e){return a;function a(i,r,s){return!!(UR(i)&&e.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function HR(){return!0}function UR(e){return e!==null&&typeof e=="object"&&"type"in e}const eS=[],qR=!0,r0=!1,FR="skip";function tS(e,a,i,r){let s;typeof a=="function"&&typeof i!="function"?(r=i,i=a):s=a;const u=mf(s),d=r?-1:1;f(e,void 0,[])();function f(m,v,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const j=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(m.type+(j?"<"+j+">":""))+")"})}return b;function b(){let j=eS,w,k,C;if((!a||u(m,v,y[y.length-1]||void 0))&&(j=VR(i(m,y)),j[0]===r0))return j;if("children"in m&&m.children){const T=m;if(T.children&&j[0]!==FR)for(k=(r?T.children.length:-1)+d,C=y.concat(T);k>-1&&k<T.children.length;){const M=T.children[k];if(w=f(M,k,C)(),w[0]===r0)return w;k=typeof w[1]=="number"?w[1]:k+d}}return j}}}function VR(e){return Array.isArray(e)?e:typeof e=="number"?[qR,e]:e==null?eS:[e]}function vg(e,a,i,r){let s,u,d;typeof a=="function"&&typeof i!="function"?(u=void 0,d=a,s=i):(u=a,d=i,s=r),tS(e,u,f,s);function f(m,v){const y=v[v.length-1],g=y?y.children.indexOf(m):void 0;return d(m,g,y)}}const l0={}.hasOwnProperty,$R={};function GR(e,a){const i=a||$R,r=new Map,s=new Map,u=new Map,d={...ER,...i.handlers},f={all:v,applyData:XR,definitionById:r,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:i,patch:YR,wrap:QR};return vg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:s,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),f;function m(y,g){const b=y.type,j=f.handlers[b];if(l0.call(f.handlers,b)&&j)return j(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:k,...C}=y,T=Vd(C);return T.children=f.all(y),T}return Vd(y)}return(f.options.unknownHandler||KR)(f,y,g)}function v(y){const g=[];if("children"in y){const b=y.children;let j=-1;for(;++j<b.length;){const w=f.one(b[j],y);if(w){if(j&&b[j-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=qx(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=qx(k.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function YR(e,a){e.position&&(a.position=DA(e))}function XR(e,a){let i=a;if(e&&e.data){const r=e.data.hName,s=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,Vd(u)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function KR(e,a){const i=a.data||{},r="value"in a&&!(l0.call(i,"hProperties")||l0.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 qx(e){let a=0,i=e.charCodeAt(a);for(;i===9||i===32;)a++,i=e.charCodeAt(a);return e.slice(a)}function Fx(e,a){const i=GR(e,a),r=i.one(e,void 0),s=LR(i),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
532
|
+
`},s),u}function ZR(e,a){return e&&"run"in e?async function(i,r){const s=Fx(i,{file:r,...a});await e.run(s,r)}:function(i,r){return Fx(i,{file:r,...e||a})}}function Vx(e){if(e)throw e}var lp,$x;function JR(){if($x)return lp;$x=1;var e=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=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"),g=v.constructor&&v.constructor.prototype&&e.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!g)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,g,b,j,w,k=arguments[0],C=1,T=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<T;++C)if(v=arguments[C],v!=null)for(y in v)g=f(k,y),b=f(v,y),k!==b&&(M&&b&&(u(b)||(j=s(b)))?(j?(j=!1,w=g&&s(g)?g:[]):w=g&&u(g)?g:{},d(k,{name:y,newValue:m(M,w,b)})):typeof b<"u"&&d(k,{name:y,newValue:b}));return k},lp}var WR=JR();const op=g0(WR);function o0(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 eD(){const e=[],a={run:i,use:r};return a;function i(...s){let u=-1;const d=s.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...s);function f(m,...v){const y=e[++u];let g=-1;if(m){d(m);return}for(;++g<s.length;)(v[g]===null||v[g]===void 0)&&(v[g]=s[g]);s=v,y?tD(y,f)(...v):d(null,...v)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),a}}function tD(e,a){let i;return r;function r(...d){const f=e.length>d.length;let m;f&&d.push(s);try{m=e.apply(this,d)}catch(v){const y=v;if(f&&i)throw y;return s(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,s):m instanceof Error?s(m):u(m))}function s(d,...f){i||(i=!0,a(d,...f))}function u(d){s(null,d)}}const _i={basename:nD,dirname:aD,extname:iD,join:rD,sep:"/"};function nD(e,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Uc(e);let i=0,r=-1,s=e.length,u;if(a===void 0||a.length===0||a.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){i=s+1;break}}else r<0&&(u=!0,r=s+1);return r<0?"":e.slice(i,r)}if(a===e)return"";let d=-1,f=a.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){i=s+1;break}}else d<0&&(u=!0,d=s+1),f>-1&&(e.codePointAt(s)===a.codePointAt(f--)?f<0&&(r=s):(f=-1,r=d));return i===r?r=d:r<0&&(r=e.length),e.slice(i,r)}function aD(e){if(Uc(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 iD(e){Uc(e);let a=e.length,i=-1,r=0,s=-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?s<0?s=a:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||i<0||u===0||u===1&&s===i-1&&s===r+1?"":e.slice(s,i)}function rD(...e){let a=-1,i;for(;++a<e.length;)Uc(e[a]),e[a]&&(i=i===void 0?e[a]:i+"/"+e[a]);return i===void 0?".":lD(i)}function lD(e){Uc(e);const a=e.codePointAt(0)===47;let i=oD(e,!a);return i.length===0&&!a&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),a?"/"+i:i}function oD(e,a){let i="",r=0,s=-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(!(s===d-1||u===1))if(s!==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("/")),s=d,u=0;continue}}else if(i.length>0){i="",r=0,s=d,u=0;continue}}a&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+e.slice(s+1,d):i=e.slice(s+1,d),r=d-s-1;s=d,u=0}else f===46&&u>-1?u++:u=-1}return i}function Uc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sD={cwd:cD};function cD(){return"/"}function s0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uD(e){if(typeof e=="string")e=new URL(e);else if(!s0(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 dD(e)}function dD(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(a)}const sp=["history","path","basename","stem","extname","dirname"];class nS{constructor(a){let i;a?s0(a)?i={path:a}:typeof a=="string"||fD(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":sD.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 s;for(s in i)sp.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?_i.basename(this.path):void 0}set basename(a){up(a,"basename"),cp(a,"basename"),this.path=_i.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?_i.dirname(this.path):void 0}set dirname(a){Gx(this.basename,"dirname"),this.path=_i.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?_i.extname(this.path):void 0}set extname(a){if(cp(a,"extname"),Gx(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=_i.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){s0(a)&&(a=uD(a)),up(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?_i.basename(this.path,this.extname):void 0}set stem(a){up(a,"stem"),cp(a,"stem"),this.path=_i.join(this.dirname||"",a+(this.extname||""))}fail(a,i,r){const s=this.message(a,i,r);throw s.fatal=!0,s}info(a,i,r){const s=this.message(a,i,r);return s.fatal=void 0,s}message(a,i,r){const s=new Pn(a,i,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}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(_i.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+_i.sep+"`")}function up(e,a){if(!e)throw new Error("`"+a+"` cannot be empty")}function Gx(e,a){if(!e)throw new Error("Setting `"+a+"` requires `path` to be set too")}function fD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hD=(function(e){const r=this.constructor.prototype,s=r[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),mD={}.hasOwnProperty;class yg extends hD{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=eD()}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):mD.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 s=i.call(a,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=yd(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?s(void 0,i):new Promise(s);function s(u,d){const f=yd(a),m=r.parse(f);r.run(m,f,function(y,g,b){if(y||!g||!b)return v(y);const j=g,w=r.stringify(j,b);vD(w)?b.value=w:b.result=w,v(y,b)});function v(y,g){y||!g?d(y):u?u(g):i(void 0,g)}}}processSync(a){let i=!1,r;return this.freeze(),dp("processSync",this.parser||this.Parser),fp("processSync",this.compiler||this.Compiler),this.process(a,s),Xx("processSync","process",i),r;function s(u,d){i=!0,Vx(u),r=d}}run(a,i,r){Yx(a),this.freeze();const s=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=yd(i);s.run(a,m,v);function v(y,g,b){const j=g||a;y?f(y):d?d(j):r(void 0,j,b)}}}runSync(a,i){let r=!1,s;return this.run(a,i,u),Xx("runSync","run",r),s;function u(d,f){Vx(d),s=f,r=!0}}stringify(a,i){this.freeze();const r=yd(i),s=this.compiler||this.Compiler;return fp("stringify",s),Yx(a),s(a,r)}use(a,...i){const r=this.attachers,s=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,...g]=v;m(y,g)}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&&(s.settings=op(!0,s.settings,v.settings))}function f(v){let y=-1;if(v!=null)if(Array.isArray(v))for(;++y<v.length;){const g=v[y];u(g)}else throw new TypeError("Expected a list of plugins, not `"+v+"`")}function m(v,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===v){b=g;break}if(b===-1)r.push([v,...y]);else if(y.length>0){let[j,...w]=y;const k=r[b][1];o0(k)&&o0(j)&&(j=op(!0,k,j)),r[b]=[v,j,...w]}}}}const pD=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 Yx(e){if(!o0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xx(e,a,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+a+"` instead")}function yd(e){return gD(e)?e:new nS(e)}function gD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vD(e){return typeof e=="string"||yD(e)}function yD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Kx=[],Qx={allowDangerousHtml:!0},bD=/^(https?|ircs?|mailto|xmpp)$/i,jD=[{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 wD(e){const a=SD(e),i=kD(e);return CD(a.runSync(a.parse(i),i),e)}function SD(e){const a=e.rehypePlugins||Kx,i=e.remarkPlugins||Kx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qx}:Qx;return pD().use(tR).use(i).use(ZR,r).use(a)}function kD(e){const a=e.children||"",i=new nS;return typeof a=="string"&&(i.value=a),i}function CD(e,a){const i=a.allowedElements,r=a.allowElement,s=a.components,u=a.disallowedElements,d=a.skipHtml,f=a.unwrapDisallowed,m=a.urlTransform||ND;for(const y of jD)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+xD+y.id,void 0);return vg(e,v),IA(e,{Fragment:o.Fragment,components:s,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function v(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return d?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let j;for(j in ap)if(Object.hasOwn(ap,j)&&Object.hasOwn(y.properties,j)){const w=y.properties[j],k=ap[j];(k===null||k.includes(y.tagName))&&(y.properties[j]=m(String(w||""),j,y))}}if(y.type==="element"){let j=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!j&&r&&typeof g=="number"&&(j=!r(y,g,b)),j&&b&&typeof g=="number")return f&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function ND(e){const a=e.indexOf(":"),i=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return a===-1||s!==-1&&a>s||i!==-1&&a>i||r!==-1&&a>r||bD.test(e.slice(0,a))?e:""}function ED(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function aS(e,a,i){const s=mf((i||{}).ignore||[]),u=TD(a);let d=-1;for(;++d<u.length;)tS(e,"text",f);function f(v,y){let g=-1,b;for(;++g<y.length;){const j=y[g],w=b?b.children:void 0;if(s(j,w?w.indexOf(j):void 0,b))return;b=j}if(b)return m(v,y)}function m(v,y){const g=y[y.length-1],b=u[d][0],j=u[d][1];let w=0;const C=g.children.indexOf(v);let T=!1,M=[];b.lastIndex=0;let E=b.exec(v.value);for(;E;){const R=E.index,D={index:E.index,input:E.input,stack:[...y,v]};let A=j(...E,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=R+1:(w!==R&&M.push({type:"text",value:v.value.slice(w,R)}),Array.isArray(A)?M.push(...A):A&&M.push(A),w=R+E[0].length,T=!0),!b.global)break;E=b.exec(v.value)}return T?(w<v.value.length&&M.push({type:"text",value:v.value.slice(w)}),g.children.splice(C,1,...M)):M=[v],C+M.length}}function TD(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 s=i[r];a.push([AD(s[0]),_D(s[1])])}return a}function AD(e){return typeof e=="string"?new RegExp(ED(e),"g"):e}function _D(e){return typeof e=="function"?e:function(){return e}}function MD(e){aS(e,[/\r?\n|\r/g,RD])}function RD(){return{type:"break"}}function DD(){return function(e){MD(e)}}const OD=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,zD=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function LD(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 iS(e,a){return{type:"link",url:e,children:[{type:"text",value:a}]}}function BD(e){const a=[];let i=0;for(const r of e.matchAll(zD))r.index>i&&a.push({type:"text",value:e.slice(i,r.index)}),a.push(iS(r[0],r[0])),i=r.index+r[0].length;return i<e.length&&a.push({type:"text",value:e.slice(i)}),a}function rS(e){const a=e.children;if(a)for(let i=0;i<a.length;i++){const r=a[i];if(r.type!=="link"){rS(r);continue}const s=LD(r),u=s===void 0?-1:s.search(OD);if(s===void 0||u<=0)continue;const d=s.slice(0,u),f=r.url.slice(0,r.url.length-s.length),m=BD(s.slice(u));a.splice(i,1,iS(f+d,d),...m),i+=m.length}}function ID(){return e=>rS(e)}function Zx(e,a){const i=String(e);if(typeof a!="string")throw new TypeError("Expected character");let r=0,s=i.indexOf(a);for(;s!==-1;)r++,s=i.indexOf(a,s+a.length);return r}const mp="phrasing",pp=["autolink","link","image","label"];function PD(){return{transforms:[GD],enter:{literalAutolink:UD,literalAutolinkEmail:gp,literalAutolinkHttp:gp,literalAutolinkWww:gp},exit:{literalAutolink:$D,literalAutolinkEmail:VD,literalAutolinkHttp:qD,literalAutolinkWww:FD}}}function HD(){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 UD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function gp(e){this.config.enter.autolinkProtocol.call(this,e)}function qD(e){this.config.exit.autolinkProtocol.call(this,e)}function FD(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 VD(e){this.config.exit.autolinkEmail.call(this,e)}function $D(e){this.exit(e)}function GD(e){aS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),XD]],{ignore:["link","linkReference"]})}function YD(e,a,i,r,s){let u="";if(!lS(s)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!KD(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 XD(e,a,i,r){return!lS(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function KD(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 s=Zx(e,"(");let u=Zx(e,")");for(;r!==-1&&s>u;)e+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),u++;return[e,i]}function lS(e,a){const i=e.input.charCodeAt(e.index-1);return(e.index===0||oo(i)||df(i))&&(!a||i!==47)}oS.peek=rO;function ZD(){this.buffer()}function JD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function WD(){this.buffer()}function eO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tO(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=oi(this.sliceSerialize(e)).toLowerCase(),i.label=a}function nO(e){this.exit(e)}function aO(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=oi(this.sliceSerialize(e)).toLowerCase(),i.label=a}function iO(e){this.exit(e)}function rO(){return"["}function oS(e,a,i,r){const s=i.createTracker(r);let u=s.move("[^");const d=i.enter("footnoteReference"),f=i.enter("reference");return u+=s.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),d(),u+=s.move("]"),u}function lO(){return{enter:{gfmFootnoteCallString:ZD,gfmFootnoteCall:JD,gfmFootnoteDefinitionLabelString:WD,gfmFootnoteDefinition:eO},exit:{gfmFootnoteCallString:tO,gfmFootnoteCall:nO,gfmFootnoteDefinitionLabelString:aO,gfmFootnoteDefinition:iO}}}function oO(e){let a=!1;return e&&e.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:oS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,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?sS:sO))),v(),m}}function sO(e,a,i){return a===0?e:sS(e,a,i)}function sS(e,a,i){return(i?"":" ")+e}const cO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];cS.peek=mO;function uO(){return{canContainEols:["delete"],enter:{strikethrough:fO},exit:{strikethrough:hO}}}function dO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cO}],handlers:{delete:cS}}}function fO(e){this.enter({type:"delete",children:[]},e)}function hO(e){this.exit(e)}function cS(e,a,i,r){const s=i.createTracker(r),u=i.enter("strikethrough");let d=s.move("~~");return d+=i.containerPhrasing(e,{...s.current(),before:d,after:"~"}),d+=s.move("~~"),u(),d}function mO(){return"~"}function pO(e){return e.length}function gO(e,a){const i=a||{},r=(i.align||[]).concat(),s=i.stringLength||pO,u=[],d=[],f=[],m=[];let v=0,y=-1;for(;++y<e.length;){const k=[],C=[];let T=-1;for(e[y].length>v&&(v=e[y].length);++T<e[y].length;){const M=vO(e[y][T]);if(i.alignDelimiters!==!1){const E=s(M);C[T]=E,(m[T]===void 0||E>m[T])&&(m[T]=E)}k.push(M)}d[y]=k,f[y]=C}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<v;)u[g]=Jx(r[g]);else{const k=Jx(r);for(;++g<v;)u[g]=k}g=-1;const b=[],j=[];for(;++g<v;){const k=u[g];let C="",T="";k===99?(C=":",T=":"):k===108?C=":":k===114&&(T=":");let M=i.alignDelimiters===!1?1:Math.max(1,m[g]-C.length-T.length);const E=C+"-".repeat(M)+T;i.alignDelimiters!==!1&&(M=C.length+M+T.length,M>m[g]&&(m[g]=M),j[g]=M),b[g]=E}d.splice(1,0,b),f.splice(1,0,j),y=-1;const w=[];for(;++y<d.length;){const k=d[y],C=f[y];g=-1;const T=[];for(;++g<v;){const M=k[g]||"";let E="",R="";if(i.alignDelimiters!==!1){const D=m[g]-(C[g]||0),A=u[g];A===114?E=" ".repeat(D):A===99?D%2?(E=" ".repeat(D/2+.5),R=" ".repeat(D/2-.5)):(E=" ".repeat(D/2),R=E):R=" ".repeat(D)}i.delimiterStart!==!1&&!g&&T.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&M==="")&&(i.delimiterStart!==!1||g)&&T.push(" "),i.alignDelimiters!==!1&&T.push(E),T.push(M),i.alignDelimiters!==!1&&T.push(R),i.padding!==!1&&T.push(" "),(i.delimiterEnd!==!1||g!==v-1)&&T.push("|")}w.push(i.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return w.join(`
|
|
534
|
+
`)}function vO(e){return e==null?"":String(e)}function Jx(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 yO(e,a,i,r){const s=i.enter("blockquote"),u=i.createTracker(r);u.move("> "),u.shift(2);const d=i.indentLines(i.containerFlow(e,u.current()),xO);return s(),d}function xO(e,a,i){return">"+(i?"":" ")+e}function bO(e,a){return Wx(e,a.inConstruct,!0)&&!Wx(e,a.notInConstruct,!1)}function Wx(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 eb(e,a,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
|
|
535
|
+
`&&bO(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
536
|
+
`}function jO(e,a){const i=String(e);let r=i.indexOf(a),s=r,u=0,d=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++u>d&&(d=u):u=1,s=r+a.length,r=i.indexOf(a,s);return d}function wO(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 SO(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 kO(e,a,i,r){const s=SO(i),u=e.value||"",d=s==="`"?"GraveAccent":"Tilde";if(wO(e,i)){const g=i.enter("codeIndented"),b=i.indentLines(u,CO);return g(),b}const f=i.createTracker(r),m=s.repeat(Math.max(jO(u,s)+1,3)),v=i.enter("codeFenced");let y=f.move(m);if(e.lang){const g=i.enter(`codeFencedLang${d}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
|
|
537
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
538
|
+
`),u&&(y+=f.move(u+`
|
|
539
|
+
`)),y+=f.move(m),v(),y}function CO(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 NO(e,a,i,r){const s=xg(i),u=s==='"'?"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(" "+s),v+=m.move(i.safe(e.title,{before:v,after:s,...m.current()})),v+=m.move(s),f()),d(),v}function EO(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 _c(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $d(e,a,i){const r=us(e),s=us(a);return r===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uS.peek=TO;function uS(e,a,i,r){const s=EO(i),u=i.enter("emphasis"),d=i.createTracker(r),f=d.move(s);let m=d.move(i.containerPhrasing(e,{after:s,before:f,...d.current()}));const v=m.charCodeAt(0),y=$d(r.before.charCodeAt(r.before.length-1),v,s);y.inside&&(m=_c(v)+m.slice(1));const g=m.charCodeAt(m.length-1),b=$d(r.after.charCodeAt(0),g,s);b.inside&&(m=m.slice(0,-1)+_c(g));const j=d.move(s);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function TO(e,a,i){return i.options.emphasis||"*"}function AO(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,r0}),!!((!e.depth||e.depth<3)&&ug(e)&&(a.options.setext||i))}function _O(e,a,i,r){const s=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(r);if(AO(e,i)){const y=i.enter("headingSetext"),g=i.enter("phrasing"),b=i.containerPhrasing(e,{...u.current(),before:`
|
|
541
|
+
`,after:`
|
|
542
|
+
`});return g(),y(),b+`
|
|
543
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
544
|
+
`))+1))}const d="#".repeat(s),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=_c(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,i.options.closeAtx&&(v+=" "+d),m(),f(),v}dS.peek=MO;function dS(e){return e.value||""}function MO(){return"<"}fS.peek=RO;function fS(e,a,i,r){const s=xg(i),u=s==='"'?"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(" "+s),v+=m.move(i.safe(e.title,{before:v,after:s,...m.current()})),v+=m.move(s),f()),v+=m.move(")"),d(),v}function RO(){return"!"}hS.peek=DO;function hS(e,a,i,r){const s=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 g=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),s==="full"||!v||v!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function DO(){return"!"}mS.peek=OO;function mS(e,a,i){let r=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";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 s+r+s}function OO(){return"`"}function pS(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))}gS.peek=zO;function gS(e,a,i,r){const s=xg(i),u=s==='"'?"Quote":"Apostrophe",d=i.createTracker(r);let f,m;if(pS(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let g=d.move("<");return g+=d.move(i.containerPhrasing(e,{before:g,after:">",...d.current()})),g+=d.move(">"),f(),i.stack=y,g}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(" "+s),v+=d.move(i.safe(e.title,{before:v,after:s,...d.current()})),v+=d.move(s),m()),v+=d.move(")"),f(),v}function zO(e,a,i){return pS(e,i)?"<":"["}vS.peek=LO;function vS(e,a,i,r){const s=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 g=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),s==="full"||!v||v!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function LO(){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 BO(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 IO(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 yS(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 PO(e,a,i,r){const s=i.enter("list"),u=i.bulletCurrent;let d=e.ordered?IO(i):bg(i);const f=e.ordered?d==="."?")":".":BO(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),yS(i)===d&&y){let g=-1;for(;++g<e.children.length;){const b=e.children[g];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,s(),v}function HO(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 UO(e,a,i,r){const s=HO(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;(s==="tab"||s==="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(g,b,j){return b?(j?"":" ".repeat(d))+g:(j?u:u+" ".repeat(d-u.length))+g}}function qO(e,a,i,r){const s=i.enter("paragraph"),u=i.enter("phrasing"),d=i.containerPhrasing(e,r);return u(),s(),d}const FO=mf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function VO(e,a,i,r){return(e.children.some(function(d){return FO(d)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function $O(e){const a=e.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}xS.peek=GO;function xS(e,a,i,r){const s=$O(i),u=i.enter("strong"),d=i.createTracker(r),f=d.move(s+s);let m=d.move(i.containerPhrasing(e,{after:s,before:f,...d.current()}));const v=m.charCodeAt(0),y=$d(r.before.charCodeAt(r.before.length-1),v,s);y.inside&&(m=_c(v)+m.slice(1));const g=m.charCodeAt(m.length-1),b=$d(r.after.charCodeAt(0),g,s);b.inside&&(m=m.slice(0,-1)+_c(g));const j=d.move(s+s);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function GO(e,a,i){return i.options.strong||"*"}function YO(e,a,i,r){return i.safe(e.value,r)}function XO(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 KO(e,a,i){const r=(yS(i)+(i.options.ruleSpaces?" ":"")).repeat(XO(i));return i.options.ruleSpaces?r.slice(0,-1):r}const bS={blockquote:yO,break:eb,code:kO,definition:NO,emphasis:uS,hardBreak:eb,heading:_O,html:dS,image:fS,imageReference:hS,inlineCode:mS,link:gS,linkReference:vS,list:PO,listItem:UO,paragraph:qO,root:VO,strong:xS,text:YO,thematicBreak:KO};function QO(){return{enter:{table:ZO,tableData:tb,tableHeader:tb,tableRow:WO},exit:{codeText:ez,table:JO,tableData:vp,tableHeader:vp,tableRow:vp}}}function ZO(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 JO(e){this.exit(e),this.data.inTable=void 0}function WO(e){this.enter({type:"tableRow",children:[]},e)}function vp(e){this.exit(e)}function tb(e){this.enter({type:"tableCell",children:[]},e)}function ez(e){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,tz));const i=this.stack[this.stack.length-1];i.type,i.value=a,this.exit(e)}function tz(e,a){return a==="|"?a:e}function nz(e){const a=e||{},i=a.tableCellPadding,r=a.tablePipeAlign,s=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,w,k,C){return v(y(j,k,C),j.align)}function f(j,w,k,C){const T=g(j,k,C),M=v([T]);return M.slice(0,M.indexOf(`
|
|
547
|
+
`))}function m(j,w,k,C){const T=k.enter("tableCell"),M=k.enter("phrasing"),E=k.containerPhrasing(j,{...C,before:u,after:u});return M(),T(),E}function v(j,w){return gO(j,{align:w,alignDelimiters:r,padding:i,stringLength:s})}function y(j,w,k){const C=j.children;let T=-1;const M=[],E=w.enter("table");for(;++T<C.length;)M[T]=g(C[T],w,k);return E(),M}function g(j,w,k){const C=j.children;let T=-1;const M=[],E=w.enter("tableRow");for(;++T<C.length;)M[T]=m(C[T],j,w,k);return E(),M}function b(j,w,k){let C=bS.inlineCode(j,w,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function az(){return{exit:{taskListCheckValueChecked:nb,taskListCheckValueUnchecked:nb,paragraph:rz}}}function iz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lz}}}function nb(e){const a=this.stack[this.stack.length-2];a.type,a.checked=e.type==="taskListCheckValueChecked"}function rz(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 s=a.children;let u=-1,d;for(;++u<s.length;){const f=s[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 lz(e,a,i,r){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=i.createTracker(r);u&&f.move(d);let m=bS.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 oz(){return[PD(),lO(),uO(),QO(),az()]}function sz(e){return{extensions:[HD(),oO(e),dO(),nz(e),iz()]}}const cz={tokenize:pz,partial:!0},jS={tokenize:gz,partial:!0},wS={tokenize:vz,partial:!0},SS={tokenize:yz,partial:!0},uz={tokenize:xz,partial:!0},kS={name:"wwwAutolink",tokenize:hz,previous:NS},CS={name:"protocolAutolink",tokenize:mz,previous:ES},kr={name:"emailAutolink",tokenize:fz,previous:TS},Fi={};function dz(){return{text:Fi}}let Gl=48;for(;Gl<123;)Fi[Gl]=kr,Gl++,Gl===58?Gl=65:Gl===91&&(Gl=97);Fi[43]=kr;Fi[45]=kr;Fi[46]=kr;Fi[95]=kr;Fi[72]=[kr,CS];Fi[104]=[kr,CS];Fi[87]=[kr,kS];Fi[119]=[kr,kS];function fz(e,a,i){const r=this;let s,u;return d;function d(g){return!c0(g)||!TS.call(r,r.previous)||jg(r.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return c0(g)?(e.consume(g),f):g===64?(e.consume(g),m):i(g)}function m(g){return g===46?e.check(uz,y,v)(g):g===45||g===95||Bn(g)?(u=!0,e.consume(g),m):y(g)}function v(g){return e.consume(g),s=!0,m}function y(g){return u&&s&&Kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),a(g)):i(g)}}function hz(e,a,i){const r=this;return s;function s(d){return d!==87&&d!==119||!NS.call(r,r.previous)||jg(r.events)?i(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cz,e.attempt(jS,e.attempt(wS,u),i),i)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),a(d)}}function mz(e,a,i){const r=this;let s="",u=!1;return d;function d(g){return(g===72||g===104)&&ES.call(r,r.previous)&&!jg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(Kn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(g),m}return i(g)}function m(g){return g===47?(e.consume(g),u?v:(u=!0,m)):i(g)}function v(g){return g===null||qd(g)||At(g)||oo(g)||df(g)?i(g):e.attempt(jS,e.attempt(wS,y),i)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),a(g)}}function pz(e,a,i){let r=0;return s;function s(d){return(d===87||d===119)&&r<3?(r++,e.consume(d),s):d===46&&r===3?(e.consume(d),u):i(d)}function u(d){return d===null?i(d):a(d)}}function gz(e,a,i){let r,s,u;return d;function d(v){return v===46||v===95?e.check(SS,m,f)(v):v===null||At(v)||oo(v)||v!==45&&df(v)?m(v):(u=!0,e.consume(v),d)}function f(v){return v===95?r=!0:(s=r,r=void 0),e.consume(v),d}function m(v){return s||r||!u?i(v):a(v)}}function vz(e,a){let i=0,r=0;return s;function s(d){return d===40?(i++,e.consume(d),s):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(SS,a,u)(d):d===null||At(d)||oo(d)?a(d):(e.consume(d),s)}function u(d){return d===41&&r++,e.consume(d),s}}function yz(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),s):f===60||f===null||At(f)||oo(f)?a(f):i(f)}function s(f){return f===null||f===40||f===91||At(f)||oo(f)?a(f):r(f)}function u(f){return Kn(f)?d(f):i(f)}function d(f){return f===59?(e.consume(f),r):Kn(f)?(e.consume(f),d):i(f)}}function xz(e,a,i){return r;function r(u){return e.consume(u),s}function s(u){return Bn(u)?i(u):a(u)}}function NS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||At(e)}function ES(e){return!Kn(e)}function TS(e){return!(e===47||c0(e))}function c0(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 bz={tokenize:Tz,partial:!0};function jz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Cz,continuation:{tokenize:Nz},exit:Ez}},text:{91:{name:"gfmFootnoteCall",tokenize:kz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wz,resolveTo:Sz}}}}function wz(e,a,i){const r=this;let s=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let d;for(;s--;){const m=r.events[s][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=oi(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 Sz(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.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",s,a],["exit",s,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 kz(e,a,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,d;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",v)}function v(g){if(u>999||g===93&&!d||g===null||g===91||At(g))return i(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(oi(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),a):i(g)}return At(g)||(d=!0),u++,e.consume(g),g===92?y:v}function y(g){return g===91||g===92||g===93?(e.consume(g),u++,v):v(g)}}function Cz(e,a,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(w)}function y(w){if(d>999||w===93&&!f||w===null||w===91||At(w))return i(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=oi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return At(w)||(f=!0),d++,e.consume(w),w===92?g:y}function g(w){return w===91||w===92||w===93?(e.consume(w),d++,y):y(w)}function b(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(u)||s.push(u),mt(e,j,"gfmFootnoteDefinitionWhitespace")):i(w)}function j(w){return a(w)}}function Nz(e,a,i){return e.check(Hc,a,e.attempt(bz,a,i))}function Ez(e){e.exit("gfmFootnoteDefinition")}function Tz(e,a,i){const r=this;return mt(e,s,"gfmFootnoteDefinitionIndent",5);function s(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 Az(e){let i=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:s};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(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)},g={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",g,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",g,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 g=0;return b;function b(w){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(w):(d.enter("strikethroughSequenceTemporary"),j(w))}function j(w){const k=us(v);if(w===126)return g>1?m(w):(d.consume(w),g++,j);if(g<2&&!i)return m(w);const C=d.exit("strikethroughSequenceTemporary"),T=us(w);return C._open=!T||T===2&&!!k,C._close=!k||k===2&&!!T,f(w)}}}class _z{constructor(){this.map=[],this.index=new Map}add(a,i,r){Mz(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 s=r.pop();for(;s;){for(const u of s)a.push(u);s=r.pop()}this.map.length=0,this.index.clear()}}function Mz(e,a,i,r){if(i===0&&r.length===0)return;const s=e.index.get(a);if(s){s[1]+=i,s[2].push(...r);return}const u=[a,i,r];e.map.push(u),e.index.set(a,u)}function Rz(e,a){let i=!1;const r=[];for(;a<e.length;){const s=e[a];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[a-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);a+=1}return r}function Dz(){return{flow:{null:{name:"table",tokenize:Oz,resolveAll:zz}}}}function Oz(e,a,i){const r=this;let s=0,u=0,d;return f;function f(z){let V=r.events.length-1;for(;V>-1;){const{type:G}=r.events[V][1];if(G==="lineEnding"||G==="linePrefix")V--;else break}const F=V>-1?r.events[V][1].type:null,J=F==="tableHead"||F==="tableRow"?A:m;return J===A&&r.parser.lazy[r.now().line]?i(z):J(z)}function m(z){return e.enter("tableHead"),e.enter("tableRow"),v(z)}function v(z){return z===124||(d=!0,u+=1),y(z)}function y(z){return z===null?i(z):$e(z)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),j):i(z):lt(z)?mt(e,y,"whitespace")(z):(u+=1,d&&(d=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||At(z)?(e.exit("data"),y(z)):(e.consume(z),z===92?b:g)}function b(z){return z===92||z===124?(e.consume(z),g):g(z)}function j(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(z):(e.enter("tableDelimiterRow"),d=!1,lt(z)?mt(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?C(z):z===124?(d=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),k):D(z)}function k(z){return lt(z)?mt(e,C,"whitespace")(z):C(z)}function C(z){return z===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):z===45?(u+=1,T(z)):z===null||$e(z)?R(z):D(z)}function T(z){return z===45?(e.enter("tableDelimiterFiller"),M(z)):D(z)}function M(z){return z===45?(e.consume(z),M):z===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(z))}function E(z){return lt(z)?mt(e,R,"whitespace")(z):R(z)}function R(z){return z===124?w(z):z===null||$e(z)?!d||s!==u?D(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),a(z)):D(z)}function D(z){return i(z)}function A(z){return e.enter("tableRow"),H(z)}function H(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),H):z===null||$e(z)?(e.exit("tableRow"),a(z)):lt(z)?mt(e,H,"whitespace")(z):(e.enter("data"),U(z))}function U(z){return z===null||z===124||At(z)?(e.exit("data"),H(z)):(e.consume(z),z===92?Y:U)}function Y(z){return z===92||z===124?(e.consume(z),U):U(z)}}function zz(e,a){let i=-1,r=!0,s=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,v,y,g;const b=new _z;for(;++i<e.length;){const j=e[i],w=j[1];j[0]==="enter"?w.type==="tableHead"?(f=!1,m!==0&&(ab(b,a,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(i,0,[["enter",v,a]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,g=void 0,u=[0,0,0,0],d=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},b.add(i,0,[["enter",y,a]])),s=w.type==="tableDelimiterRow"?2:y?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],g=xd(b,a,u,s,void 0,g),u=[0,0,0,0]),d[2]=i)):w.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(d[0]=d[1],g=xd(b,a,u,s,void 0,g)),u=d,d=[u[1],i,0,0])):w.type==="tableHead"?(f=!0,m=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(m=i,u[1]!==0?(d[0]=d[1],g=xd(b,a,u,s,i,g)):d[1]!==0&&(g=xd(b,a,d,s,i,g)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(d[3]=i)}for(m!==0&&ab(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=Rz(a.events,i))}return e}function xd(e,a,i,r,s,u){const d=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},rs(a.events,i[0])),e.add(i[0],0,[["exit",u,a]]));const m=rs(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=rs(a.events,i[2]),y=rs(a.events,i[3]),g={type:f,start:Object.assign({},v),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",g,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 w=i[2]+1,k=i[3]-i[2]-1;e.add(w,k,[])}}e.add(i[3]+1,0,[["exit",g,a]])}return s!==void 0&&(u.end=Object.assign({},rs(a.events,s)),e.add(s,0,[["exit",u,a]]),u=void 0),u}function ab(e,a,i,r,s){const u=[],d=rs(a.events,i);s&&(s.end=Object.assign({},d),u.push(["exit",s,a])),r.end=Object.assign({},d),u.push(["exit",r,a]),e.add(i+1,0,u)}function rs(e,a){const i=e[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const Lz={name:"tasklistCheck",tokenize:Iz};function Bz(){return{text:{91:Lz}}}function Iz(e,a,i){const r=this;return s;function s(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 At(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):lt(m)?e.check({tokenize:Pz},a,i)(m):i(m)}}function Pz(e,a,i){return mt(e,r,"whitespace");function r(s){return s===null?i(s):a(s)}}function Hz(e){return z3([dz(),jz(),Az(e),Dz(),Bz()])}const Uz={};function qz(e){const a=this,i=e||Uz,r=a.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),d=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Hz(i)),u.push(oz()),d.push(sz(i))}function Gd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const Fz={add:br,"chat-bubble":B8,window:f8,close:hs,"chevron-left":yj,"chevron-right":il,"chevron-down":ll,gear:X8,"person-add":a7,"arrow-bracket-to-left":z8,"arrow-up":p8,copy:Zd,check:Ra,"cloud-download":b0,bell:v8,"bell-slash":g8,image:D8,paperclip:k0,"smiley-plus":k8,info:S0,people:i7,pencil:V8,file:T8,"file-video":N8,"file-audio":C8,folder:_8,"layout-sidebar-left":q8,sun:t7,moon:U8,"arrows-expand":w8,"arrows-contract":Z8,"arrow-u-up-right":G8,"list-bullets":O8,eye:w0,"eye-slash":j0,pin:Dp,megaphone:L8,trash:zd,search:Dc,quote:$8,fold:A8,unfold:n7};function Be({name:e}){const a=Fz[e]??S0;return o.jsx(a,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function st({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 ds({title:e,onClose:a,children:i,className:r=""}){const s=S.useRef(null),u=S.useId();return S.useEffect(()=>{const d=s.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),co.createPortal(o.jsxs("dialog",{ref:s,className:`ui-small-dialog ${r}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),a()},children:[o.jsx(st,{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 qc(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 Vz({children:e}){const a=S.useRef(null),[i,r]=S.useState("idle");S.useEffect(()=>{if(i==="idle")return;const u=setTimeout(()=>r("idle"),1500);return()=>clearTimeout(u)},[i]);const s=async()=>{var u;return r(await qc((((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(st,{icon:i==="copied"?"check":"copy",label:x(i==="copied"?"ui.copied":i==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void s()})]})}const $z=[qz,ID,DD],Fc=S.memo(function({text:a,renderQuote:i}){return nj(),o.jsx(wD,{remarkPlugins:$z,skipHtml:!0,components:{a:({href:r,children:s})=>r==="#mention"||r==="#mention-me"?o.jsx("span",{className:"jv-mention","data-me":r==="#mention-me"||void 0,children:s}):i&&(r!=null&&r.startsWith("#quote-"))?i(Number(r.slice(7))):o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:s}),img:({alt:r})=>o.jsx("span",{children:x("ui.image",{alt:r||x("ui.imageHidden")})}),pre:({children:r})=>o.jsx(Vz,{children:r})},children:a})}),ib={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",file_too_large:"error.fileTooLarge",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",reset_custom:"error.resetCustom",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"},AS=(e,a)=>{const i=e&&Object.hasOwn(ib,e)?ib[e]:void 0;return i?x(i,a):null};function Gt(e,a="common.failed"){return e instanceof hr?AS(e.code,e.params)??(e.status<500?e.message:x(a)):e instanceof Error&&e.message?e.message:x(a)}const Gz=e=>AS(e.errorCode,e.errorParams)??e.error??"";function Yz({botId:e,selected:a,onSelect:i,onOpenChat:r}){const[s,u]=S.useState(null),[d,f]=S.useState(!0),[m,v]=S.useState(""),[y,g]=S.useState(0);if(S.useEffect(()=>{let w=!0;return f(!0),v(""),u(null),(a.kind==="history"?cA.read(e,a.id).then(C=>({kind:"history",data:C})):L4.message(e,a.id).then(C=>({kind:"chat",data:C}))).then(C=>{w&&u(C)}).catch(C=>{w&&v(Gt(C,"activity.detailFailed"))}).finally(()=>{w&&f(!1)}),()=>{w=!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(Me,{variant:"outline",size:"sm",onClick:()=>g(w=>w+1),children:x("common.retry")})]});if(!s)return null;if(s.kind==="history")return o.jsx(rA,{detail:s.data,onSelect:w=>i({kind:"history",id:w})},s.data.record.id);const{chat:b,message:j}=s.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(Me,{variant:"ghost",size:"sm",onClick:()=>r(b.id),children:[x("activity.openChat"),o.jsx(Rp,{})]})]}),o.jsxs("div",{className:"jv-activity-message-body",children:[j.content&&o.jsx(Fc,{text:j.content}),j.attachments.length>0&&o.jsx("div",{className:"jv-activity-message-files",children:j.attachments.map(w=>o.jsxs("a",{href:`/api/attachments/${w.id}`,download:w.name,children:[o.jsx(k0,{}),w.name]},w.id))}),j.source&&o.jsxs(Me,{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(Rp,{})]})]})]})}const _S=dN;function MS({className:e,children:a,showCloseButton:i=!0,...r}){return o.jsxs(hN,{children:[o.jsx(mN,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),o.jsxs(vN,{"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(SN,{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(hs,{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(jN,{"data-slot":"dialog-title",className:an("text-lg font-semibold",e),...a})}function Xz({botId:e,botName:a,onBack:i,onOpenChat:r}){const[s,u]=S.useState([void 0]),d=s.at(-1),[f,m]=S.useState({items:[],nextBefore:null}),[v,y]=S.useState(!0),[g,b]=S.useState(""),[j,w]=S.useState(0),[k,C]=S.useState(null),T=S.useRef(null),M=S.useRef(0),E=S.useRef(null);S.useEffect(()=>{let A=!0;return y(!0),b(""),m({items:[],nextBefore:null}),T.current&&(T.current.scrollTop=0),L4.list(e,d).then(H=>{A&&m(H)}).catch(H=>{A&&b(Gt(H,"activity.loadFailed"))}).finally(()=>{A&&y(!1)}),()=>{A=!1}},[e,d,j]);const R=A=>{var H;k||(M.current=((H=T.current)==null?void 0:H.scrollTop)??0,E.current=document.activeElement),C(A)},D=()=>{if(!k){i();return}C(null),requestAnimationFrame(()=>{var A;T.current&&(T.current.scrollTop=M.current),(A=E.current)==null||A.focus({preventScroll:!0})})};return o.jsxs(o.Fragment,{children:[o.jsxs(wg,{className:"jv-bot-info-navigation",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(k?"activity.backToTimeline":"usage.back"),onClick:D,children:o.jsx(Qd,{})}),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(Me,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),w(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:T,children:v?o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.loading")}):g?o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:g}),o.jsx(Me,{variant:"outline",size:"sm",onClick:()=>w(A=>A+1),children:x("common.retry")})]}):f.items.length?o.jsx(sA,{items:f.items,onSelect:R}):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(Me,{type:"button",variant:"ghost",size:"sm",disabled:v||s.length===1,onClick:()=>u(A=>A.slice(0,-1)),children:[o.jsx(yj,{}),x("activity.newer")]}),o.jsx("span",{children:x("activity.page",{page:s.length})}),o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:v||f.nextBefore===null,onClick:()=>u(A=>[...A,f.nextBefore]),children:[x("activity.older"),o.jsx(il,{})]})]})]}),k&&o.jsx("section",{className:"jv-activity-detail","aria-label":x(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:o.jsx(Yz,{botId:e,selected:k,onSelect:R,onOpenChat:r})})]})]})}const Kz={list:(e,a)=>we(`/bots/${e}/usage?since=${a}`)},Qz=["today","7d","30d","all"],Zz=e=>e==="today"?x("usage.today"):e==="all"?x("usage.all"):x("usage.days",{count:e==="7d"?7:30}),bd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function Jz(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 rb=e=>Li(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),lb=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function Wz({botId:e,botName:a,onBack:i}){const[r,s]=S.useState("today"),[u,d]=S.useState(null),[f,m]=S.useState(""),[v,y]=S.useState(0);S.useEffect(()=>{let w=!0;return d(null),m(""),Kz.list(e,Jz(r)).then(k=>{w&&d(k.models)}).catch(k=>{w&&m(Gt(k,"usage.loadFailed"))}),()=>{w=!1}},[e,r,v]);const g=(u==null?void 0:u.filter(w=>w.cost!==null))??[],b=u&&Object.fromEntries(bd.map(([w])=>[w,u.reduce((k,C)=>k+C[w],0)])),j=g.length?lb(g.reduce((w,k)=>w+k.cost,0)):x("usage.unpriced");return o.jsxs(o.Fragment,{children:[o.jsxs(wg,{className:"jv-bot-info-navigation",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x("usage.back"),onClick:i,children:o.jsx(Qd,{})}),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:Qz.map(w=>o.jsx("button",{type:"button",role:"tab","aria-selected":r===w,onClick:()=>s(w),children:Zz(w)},w))}),o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(w=>w+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(Me,{variant:"outline",size:"sm",onClick:()=>y(w=>w+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")}),bd.map(([w,k])=>o.jsx("th",{scope:"col",children:x(k)},w)),o.jsx("th",{scope:"col",children:x("usage.cost")})]})}),o.jsx("tbody",{children:u.map(w=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsxs("span",{className:"jv-usage-model",children:[o.jsx("strong",{children:w.model}),o.jsx("span",{children:w.provider})]})}),bd.map(([k,C])=>o.jsx("td",{"data-label":x(C),title:Li(w[k]),children:rb(w[k])},k)),o.jsx("td",{"data-label":x("usage.cost"),className:w.cost===null?"jv-usage-unpriced":void 0,title:w.cost===null?void 0:`$${w.cost.toFixed(4)}`,children:w.cost===null?x("usage.unpriced"):lb(w.cost)})]},`${w.provider}/${w.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")})}),bd.map(([w,k])=>o.jsx("td",{"data-label":x(k),title:Li(b[w]),children:rb(b[w])},w)),o.jsx("td",{"data-label":x("usage.cost"),className:g.length?void 0:"jv-usage-unpriced",children:j})]})})]}),g.length>0&&g.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 $a={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"}},RS=e=>{var a;return`#${(((a=$a[e])==null?void 0:a.hex)??$a.gray.hex).toString(16).padStart(6,"0")}`},eL="modulepreload",tL=function(e){return"/"+e},ob={},Yd=function(a,i,r){let s=Promise.resolve();if(i&&i.length>0){let d=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};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"));s=d(i.map(v=>{if(v=tL(v),v in ob)return;ob[v]=!0;const y=v.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":eL,y||(b.as="script"),b.crossOrigin="",b.href=v,m&&b.setAttribute("nonce",m),document.head.appendChild(b),y)return new Promise((j,w)=>{b.addEventListener("load",j),b.addEventListener("error",()=>w(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 s.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return a().catch(u)})};let sb;const yp=new Map;let cb=Promise.resolve();function nL(){return sb??(sb=Promise.all([Yd(()=>import("./three.module-BdMZo7zQ.js"),[]),Yd(()=>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:s,ground:u}=a.createStage(e),d=new a.CatFigure(e,$a.gray.hex);return r.add(d.root),a.frameCamera(s,1,3.3),{render(f,m,v,y,g){var b;return i.setSize(v,v,!1),d.setColor(((b=$a[f])==null?void 0:b.hex)??$a.gray.hex),d.setCrown(g),d.pose(m),u.visible=y,i.render(r,s),i.domElement.toDataURL("image/png")}}})),sb}function aL(e,a,i,r=!1){const s=Math.round(i*Math.min(3,Math.max(1,window.devicePixelRatio||1))),u=`${e}:${a}:${s}:${r}`;let d=yp.get(u);return d||(d=cb.then(()=>nL()).then(f=>f.render(e,a,s,i>=40,r)),cb=d.catch(()=>{}),yp.set(u,d),d.catch(()=>yp.delete(u))),d}function so({color:e,mood:a="normal",size:i=36,badge:r,crown:s=!1}){const[u,d]=S.useState();return S.useEffect(()=>{let f=!0;return d(void 0),aL(e,a,i,s).then(m=>{f&&d(m)}).catch(()=>{}),()=>{f=!1}},[e,a,i,s]),o.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${i}px`,"--jv-avatar-color":RS(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=RT,vr=LT;function yr({className:e,children:a,...i}){return o.jsxs(OT,{"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(BT,{asChild:!0,children:o.jsx(ll,{className:"size-4 opacity-50"})})]})}function xr({className:e,children:a,container:i,...r}){return o.jsx(UT,{container:i??void 0,children:o.jsx(qT,{"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(KT,{children:a})})})}function sa({className:e,children:a,...i}){return o.jsxs(JT,{"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(WT,{children:a}),o.jsx(tA,{"data-slot":"select-indicator",className:"absolute right-2",children:o.jsx(Ra,{className:"size-4"})})]})}function In(){const[e,a]=S.useState(null),[i,r]=S.useState(""),s=S.useCallback(async(u,d,f)=>{a(u),r("");try{return await d(),!0}catch(m){return r(Gt(m,f)),!1}finally{a(null)}},[]);return{busy:e!==null,doing:e,error:i,setError:r,run:s}}const ub={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},iL=(e,a)=>JSON.stringify([e,a]);function DS({bot:e,connections:a,onSaved:i,onManage:r}){const[s,u]=S.useState([]),[d,f]=S.useState(!0),[m,v]=S.useState(""),[y,g]=S.useState(0),{busy:b,error:j,run:w}=In(),[k,C]=S.useState(!1),[T,M]=S.useState(""),[E,R]=S.useState(-1),D=S.useRef(null),A=S.useRef(null),[H,U]=S.useState(null),Y=S.useId();S.useEffect(()=>{let ie=!0;return f(!0),v(""),fe.modelOptions().then(L=>{ie&&u(L.connections)}).catch(L=>{ie&&v(Gt(L,"botModel.loadFailed"))}).finally(()=>{ie&&f(!1)}),()=>{ie=!1}},[a,y]);const z=s.flatMap(ie=>ie.models.map(L=>({...L,connectionId:ie.id,connectionName:ie.name,key:iL(ie.id,L.id)}))).sort((ie,L)=>ie.name.localeCompare(L.name,void 0,{numeric:!0})),V=z.find(ie=>ie.connectionId===e.connectionId&&ie.id===e.modelId),F=a.find(ie=>ie.id===e.connectionId),J=F==null?void 0:F.models.find(ie=>ie.id===e.modelId),G=z.filter(ie=>`${ie.name} ${ie.id} ${ie.connectionName}`.toLocaleLowerCase().includes(T.trim().toLocaleLowerCase())),$=s.map(ie=>({...ie,models:G.filter(L=>L.connectionId===ie.id)})).filter(ie=>ie.models.length),K=$.flatMap(ie=>ie.models),I=z.length>8,P=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function W(ie){C(ie),M(""),R(-1)}async function _(ie,L,q){W(!1),await w("choose",async()=>i(await fe.selectBotModel(e.id,ie,L,q,to())),"botModel.switchFailed")}function ae(ie){var L;if(ie.key==="ArrowDown"||ie.key==="ArrowUp"){ie.preventDefault();const q=ie.key==="ArrowDown"?Math.min(E+1,K.length-1):Math.max(E-1,0);R(q),(L=document.getElementById(`${Y}-${q}`))==null||L.scrollIntoView({block:"nearest"})}else if(ie.key==="Enter"&&K[E]){ie.preventDefault();const q=K[E];_(q.connectionId,q.id,e.thinkingLevel)}}return o.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":b||d,ref:ie=>U((ie==null?void 0:ie.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(a3,{open:k,onOpenChange:W,children:[o.jsxs(i3,{className:"jv-model-trigger","aria-label":x("botModel.pick"),"aria-haspopup":"listbox",disabled:b||d||!!m,children:[o.jsx("span",{children:(V==null?void 0:V.name)??(J==null?void 0:J.name)??x(e.connectionId?"botModel.broken":"botModel.choose")}),b?o.jsx(Vj,{className:"animate-spin"}):o.jsx(ll,{})]}),o.jsx(r3,{container:H,children:o.jsxs(l3,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,collisionBoundary:H,onOpenAutoFocus:ie=>{var L;ie.preventDefault(),(L=I?D.current:A.current)==null||L.focus()},onKeyDown:ae,children:[I&&o.jsxs("div",{className:"jv-model-search",children:[o.jsx(Dc,{}),o.jsx("input",{ref:D,role:"combobox","aria-label":x("botModel.filter"),"aria-expanded":"true","aria-controls":Y,"aria-activedescendant":E>=0?`${Y}-${E}`:void 0,placeholder:x("botModel.filterPlaceholder"),value:T,onChange:ie=>{M(ie.target.value),R(-1)},autoComplete:"off",spellCheck:!1})]}),o.jsxs("div",{ref:A,id:Y,role:"listbox","aria-label":x("botModel.list"),tabIndex:-1,"aria-activedescendant":E>=0?`${Y}-${E}`:void 0,className:"jv-model-options",children:[$.map(ie=>o.jsxs("div",{role:"group","aria-label":ie.name,children:[o.jsx("div",{className:"jv-model-group-label",children:ie.name}),ie.models.map(L=>{const q=K.indexOf(L),ue=L.connectionId===e.connectionId&&L.id===e.modelId;return o.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${Y}-${q}`,"aria-selected":ue,"data-active":q===E||void 0,title:L.id,onClick:()=>void _(L.connectionId,L.id,e.thinkingLevel),children:[o.jsx("span",{className:"jv-option-check",children:ue&&o.jsx(Ra,{})}),o.jsx("span",{children:L.name})]},L.key)})]},ie.id)),!K.length&&o.jsx("p",{className:"jv-menu-empty",children:x(z.length?"botModel.noMatch":"botModel.none")})]}),o.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{W(!1),r()},children:x("botModel.manage")})]})})]}),(V||F)&&o.jsx("span",{className:"jv-field-note",children:(V==null?void 0:V.connectionName)??(F==null?void 0:F.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||!V||!!m,onValueChange:ie=>{e.connectionId&&_(e.connectionId,e.modelId,ie)},children:[o.jsx(yr,{className:"jv-thinking-trigger","aria-label":x("botModel.pickThinking"),children:o.jsx(vr,{children:P})}),o.jsx(xr,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(V==null?void 0:V.thinking.levels)??[]].map(ie=>{const L=V==null?void 0:V.thinkingLevelMap[ie],q=L&&L!==ie?L:ie;return o.jsx(sa,{value:ie,children:o.jsxs("span",{className:"jv-thinking-option",children:[o.jsxs("span",{children:[q,L&&L!==ie&&o.jsxs("small",{children:[" (",ie,")"]})]}),o.jsx("small",{children:ub[ie]&&x(ub[ie])})]})},ie)})})]})]})]}),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:()=>g(ie=>ie+1),children:x("common.retry")})]}),j&&o.jsx("p",{className:"jv-model-error",role:"alert",children:j})]})}const rL={preparing:"environment.state.preparing",running:"environment.state.running",stopped:"environment.state.stopped",failed:"environment.state.failed",unavailable:"environment.state.unavailable"};function lL({bot:e,onSaved:a,onAddMachine:i}){const{doing:r,error:s,run:u}=In(),[d,f]=S.useState(null),{computer:m,current:v,currentName:y,machines:g=[]}=e.environment,b=(C,T,M)=>u(C,async()=>a(await T()),M),j=C=>void b(C,()=>fe.computer(e.id,C),"common.failed"),w=m==null?void 0:m.state,k=w?rL[w]:null;return o.jsxs("section",{className:"jv-section","aria-label":x("environment.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("environment.title")}),m&&w&&k&&o.jsxs("div",{className:"jv-list jv-env-sandbox",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.own")}),v==="ssh"&&o.jsx("span",{className:"jv-env-away",children:x("environment.awayMachine",{name:y??""})})]}),o.jsx("span",{className:"jv-status","data-ok":w==="running"||void 0,"data-busy":w==="preparing"||void 0,children:x(k)})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[o.jsx("span",{children:x("environment.container")}),o.jsx("code",{children:m.container})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[o.jsx("span",{children:x("environment.image")}),o.jsx("code",{children:m.image})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[o.jsx("span",{children:x("environment.mount")}),o.jsx("code",{children:m.mount})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-details",children:[w==="unavailable"?o.jsx("p",{children:x("environment.unavailable")}):!d&&o.jsxs("div",{className:"jv-env-actions",children:[o.jsx(Me,{type:"button",variant:"outline",size:"sm",disabled:!!r||w==="preparing",onClick:()=>w==="running"?f("stop"):j("start"),children:x(r==="start"?"environment.starting":r==="stop"?"environment.stopping":w==="running"?"environment.stop":"environment.start")}),o.jsx(Me,{type:"button",variant:"ghost",size:"sm",disabled:!!r||w==="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(Me,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const C=d;f(null),j(C)},children:x(`environment.${d}Confirm`)})]})]})]})]}),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:[g.length===0&&o.jsxs("button",{type:"button",className:"jv-list-row jv-env-add",onClick:i,children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(br,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("machines.add")})})]}),g.map(C=>o.jsxs("button",{type:"button",role:"switch","aria-checked":C.granted,disabled:!!r,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void b("grant",()=>fe.grantBotMachine(e.id,C.id,!C.granted),"environment.accessFailed"),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:C.name})}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]},C.id))]}),s&&o.jsx("p",{className:"jv-note-error",role:"alert",children:s})]})}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 fs({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 db=(e,a)=>no(new Date(2e3,0,1,e,a)),OS=e=>ua(new Date(2023,0,1+e),{weekday:"long"}),zS=e=>`${y0(e)} ${no(e)}`;function oL(e){switch(e.kind){case"once":return x("tasks.schedule.once",{time:zS(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:db(e.hour,e.minute)});case"weekly":return x("tasks.schedule.weekly",{day:OS(e.weekday),time:db(e.hour,e.minute)})}}const ls=e=>String(e).padStart(2,"0"),fb=e=>{const a=new Date(e);return`${a.getFullYear()}-${ls(a.getMonth()+1)}-${ls(a.getDate())}T${ls(a.getHours())}:${ls(a.getMinutes())}`},sL=(e,a)=>`${ls(e)}:${ls(a)}`,cL=["once","every","daily","weekly"],LS=5;function uL(e){const a=Date.now()+36e5,i={at:fb(a-a%(300*1e3)),count:"30",unit:"minutes",time:"09:00",weekday:"1"};return e&&(e.kind==="once"&&(i.at=fb(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=sL(e.hour,e.minute)),e.kind==="weekly"&&(i.weekday=String(e.weekday))),i}function dL(e,a){const[i,r]=a.time.split(":").map(Number),s=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>=LS?{kind:e,minutes:u}:null}return s?e==="daily"?{kind:e,...s}:{kind:e,weekday:Number(a.weekday),...s}:null}function fL({task:e,busy:a,error:i,onSave:r,onDelete:s,onCancel:u}){const[d,f]=S.useState((e==null?void 0:e.name)??""),[m,v]=S.useState((e==null?void 0:e.instruction)??""),[y,g]=S.useState((e==null?void 0:e.schedule.kind)??"daily"),[b,j]=S.useState(()=>uL(e==null?void 0:e.schedule)),[w,k]=S.useState(!1),C=dL(y,b),T=E=>j(R=>({...R,...E}));function M(E){E.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:E=>f(E.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.instruction")}),o.jsx(fs,{required:!0,maxLength:8e3,rows:4,value:m,placeholder:x("tasks.instructionPlaceholder"),onChange:E=>v(E.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.when")}),o.jsx("div",{className:"jv-seg jv-task-kinds",role:"radiogroup","aria-label":x("tasks.when"),children:cL.map(E=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===E,onClick:()=>g(E),children:x(`tasks.kind.${E}`)},E))}),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:E=>T({at:E.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:LS,step:1,"aria-label":x("tasks.everyCount"),value:b.count,onChange:E=>T({count:E.target.value})}),o.jsxs(gr,{value:b.unit,onValueChange:E=>T({unit:E}),children:[o.jsx(yr,{"aria-label":x("tasks.everyCount"),children:o.jsx(vr,{})}),o.jsx(xr,{className:"jv-select-menu",children:["minutes","hours"].map(E=>o.jsx(sa,{value:E,children:x(`tasks.unit.${E}`)},E))})]})]}),y==="weekly"&&o.jsxs(gr,{value:b.weekday,onValueChange:E=>T({weekday:E}),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(E=>o.jsx(sa,{value:String(E),children:OS(E)},E))})]}),(y==="daily"||y==="weekly")&&o.jsx(vt,{type:"time","aria-label":x("tasks.time"),value:b.time,onChange:E=>T({time:E.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}),w&&s&&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(Me,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(!1),children:x("common.cancel")}),o.jsx(Me,{type:"button",variant:"ghost",className:"jv-task-delete",size:"sm",disabled:a,onClick:s,children:x("tasks.delete")})]})]}),o.jsxs("div",{className:"jv-form-footer",children:[o.jsx("div",{className:"jv-task-editor-actions",children:s&&o.jsx(Me,{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(Me,{type:"button",variant:"ghost",onClick:u,children:x("common.cancel")}),o.jsx(Me,{type:"submit",className:"jv-primary",disabled:a||!C||!d.trim()||!m.trim(),children:x("common.save")})]})]})]})}function hL({bot:e,runs:a}){const[i,r]=S.useState(null),[s,u]=S.useState(null),{busy:d,error:f,setError:m,run:v}=In(),y=In(),g=d||y.busy,b=y.error;S.useEffect(()=>{let D=!0;return fe.tasks(e.id).then(A=>{D&&r(A.tasks)}).catch(A=>{D&&m(Gt(A,"tasks.loadFailed"))}),()=>{D=!1}},[e.id,a]);const j=D=>r(A=>(A??[]).some(H=>H.id===D.id)?A.map(H=>H.id===D.id?D:H):[...A??[],D]);function w(D){m(""),y.setError(""),u(D)}async function k(D){await y.run("save",async()=>{j(s==="new"||!s?await fe.createTask(e.id,D):await fe.updateTask(e.id,s.id,D)),u(null)},"tasks.saveFailed")}const C=D=>v("change",D,"tasks.changeFailed"),T=D=>C(async()=>j(await fe.setTaskOn(e.id,D.id,D.state!=="active"))),M=D=>C(async()=>{await fe.deleteTask(e.id,D.id),r(A=>(A==null?void 0:A.filter(H=>H.id!==D.id))??null),u(null)}),E=D=>D.state==="active"?D.schedule.kind==="once"||!D.nextRunAt?"":x("tasks.next",{time:zS(D.nextRunAt)}):x(D.state==="done"?"tasks.done":"tasks.paused"),R=D=>[oL(D.schedule),E(D)].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")}),!s&&o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:g||i===null,onClick:()=>w("new"),children:[o.jsx(br,{}),x("tasks.add")]})]}),s?o.jsx(fL,{task:s==="new"?void 0:s,busy:g,error:b,onSave:D=>void k(D),onCancel:()=>u(null),...s==="new"?{}:{onDelete:()=>void M(s)}}):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(D=>o.jsxs("div",{className:"jv-task-row","data-state":D.state,children:[o.jsx("button",{type:"button",className:"jv-list-row jv-task-open","aria-label":D.name,onClick:()=>w(D),children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:D.name}),o.jsx("span",{children:R(D)})]})}),D.state!=="done"&&o.jsx("button",{type:"button",role:"switch","aria-checked":D.state==="active","aria-label":x("tasks.toggle",{name:D.name}),disabled:g,className:"jv-env-access jv-task-switch",onClick:()=>void T(D),children:o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})})]},D.id))}),f&&o.jsx("p",{className:"jv-note-error",role:"alert",children:f})]})}function mL(){const[e,a]=S.useState(!1),i=r=>s=>{s.pointerType==="mouse"&&a(r)};return o.jsxs(a3,{open:e,onOpenChange:a,children:[o.jsx(i3,{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(r3,{children:o.jsx(l3,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:r=>r.preventDefault(),children:x("bot.contextStale")})})]})}const pL={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function gL({bot:e,status:a,connections:i,chats:r,onSaved:s,onManageModels:u,onAddMachine:d,onClose:f,onOpenChat:m,onOpenSubscription:v}){const[y,g]=S.useState("info"),[b,j]=S.useState(e.name),[w,k]=S.useState(e.description),[C,T]=S.useState(e.systemPrompt),[M,E]=S.useState(!1),[R,D]=S.useState(null),[A,H]=S.useState(null),[U,Y]=S.useState(null),[z,V]=S.useState(""),[F,J]=S.useState(!1),[G,$]=S.useState(null);S.useEffect(()=>{let L=!0;return fe.botSubscriptions(e.id).then(q=>{L&&$(q.chats)}).catch(()=>{}),()=>{L=!1}},[e.id]),S.useEffect(()=>{if(!F)return;const L=setTimeout(()=>J(!1),1500);return()=>clearTimeout(L)},[F]);const K=b!==e.name||w!==e.description||C!==e.systemPrompt,I=(a==null?void 0:a.status)??"stop",P=a==null?void 0:a.context;async function W(L){Y(L),V("");try{await fe.controlBot(e.id,L)}catch(q){V(Gt(q,"common.failed"))}finally{Y(null)}}async function _(L){L.preventDefault(),E(!0),D(null);try{s(await fe.saveBot(e.id,{name:b,description:w,systemPrompt:C})),D({kind:"ok",text:x("bot.saved")})}catch(q){D({kind:"error",text:Gt(q,"common.saveFailed")})}finally{E(!1)}}async function ae(L){if(L!==e.color){E(!0),H(null);try{s(await fe.setBotColor(e.id,L))}catch(q){H({kind:"error",text:Gt(q,"bot.changeFailed")})}finally{E(!1)}}}const ie=L=>L&&o.jsx("p",{className:L.kind==="error"?"jv-note-error":"jv-note-ok",role:L.kind==="error"?"alert":"status",children:L.text});return o.jsx(_S,{open:!0,onOpenChange:L=>{L||f()},children:o.jsx(MS,{className:`jv-bot-info jv-ui ${y==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:y==="activity"?o.jsx(Xz,{botId:e.id,botName:e.name,onBack:()=>g("info"),onOpenChat:m}):y==="usage"?o.jsx(Wz,{botId:e.id,botName:e.name,onBack:()=>g("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(so,{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($a).map(L=>o.jsx("button",{type:"button",role:"radio","aria-checked":e.color===L,"aria-label":x($a[L].label),title:x($a[L].label),disabled:M,style:{background:RS(L)},onClick:()=>void ae(L)},L))}),ie(A)]})]}),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(L=>o.jsx("li",{children:x(L)},L))})]})]}),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(DS,{bot:e,connections:i,onSaved:s,onManage:u}),P&&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":P.stale&&P.tokens!==null||void 0,children:[P.stale&&P.tokens!==null&&o.jsx(mL,{}),P.tokens===null?x("bot.unknown"):x("bot.tokens",{used:Li(P.tokens),window:Li(P.contextWindow)})]})]}),P.tokens!==null&&o.jsx("div",{className:"jv-context-bar",children:o.jsx("span",{style:{width:`${Math.min(100,Math.max(1,P.tokens/P.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:L=>void _(L),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:b,onChange:L=>j(L.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("bot.description")}),o.jsx(fs,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:w,onChange:L=>k(L.target.value),placeholder:x("bot.descriptionPlaceholder")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:"Persona"}),o.jsx(fs,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:C,onChange:L=>T(L.target.value),placeholder:x("bot.personaPlaceholder")}),o.jsx("small",{className:"jv-hint",children:x("bot.personaHint")})]}),o.jsxs("div",{className:"jv-form-footer",children:[ie((R==null?void 0:R.kind)==="error"||!K?R:null)??(K?o.jsx("p",{className:"jv-hint",children:x("bot.unsaved")}):o.jsx("span",{})),o.jsx(Me,{type:"submit",className:"jv-primary",disabled:M||!K,children:x(M?"bot.saving":"common.save")})]})]})]}),o.jsx(lL,{bot:e,onSaved:s,onAddMachine:d}),o.jsx(hL,{bot:e,runs:`${I}:${(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":I!=="stop"||void 0,"data-busy":I==="running"||void 0,children:x(pL[I])}),I==="running"&&o.jsx(Me,{type:"button",variant:"ghost",size:"sm",disabled:!!U,onClick:()=>void W("abort"),children:x(U==="abort"?"bot.aborting":"bot.abort")}),o.jsx(Me,{type:"button",variant:"outline",size:"sm",disabled:!!U||!e.connectionId,onClick:()=>void W(I==="stop"?"start":"stop"),children:x(U==="start"?"bot.starting":U==="stop"?"bot.stopping":I==="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(Me,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(F?"ui.copied":"bot.copyWorkspace"),onClick:()=>void qc(e.workspacePath).then(L=>J(L)),children:F?o.jsx(Ra,{}):o.jsx(Zd,{})})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>g("activity"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(Y8,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("bot.activity")})}),o.jsx(il,{className:"jv-row-chevron"})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>g("usage"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(x8,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("usage.title")})}),o.jsx(il,{className:"jv-row-chevron"})]})]}),z&&o.jsx("p",{className:"jv-note-error",role:"alert",children:z})]}),G&&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:G.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")})})}):G.map(L=>{var q;return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>v(L),children:[o.jsx("span",{className:"jv-row-icon",children:L.type==="thread"?o.jsx(Wj,{}):o.jsx(R8,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:L.title}),o.jsx("span",{children:L.type==="thread"?x("bot.threadIn",{channel:((q=r.find(ue=>ue.id===L.parentId))==null?void 0:q.title)??""}):x("info.menu")})]}),o.jsx(il,{className:"jv-row-chevron"})]},L.id)})})]})]})]})})})}function BS({id:e,value:a,sections:i,onChange:r}){const[s,u]=S.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:s,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 vL=1024*1024,yL=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],Zl=e=>`/api/attachments/${e.id}`,IS=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function vf(e){const a=IS(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/")||yL.includes(a)?"text":"download"}const wc=e=>e==="image"||e==="svg",PS=e=>e==="video"||e==="audio",HS={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 US(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024**3?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024**3).toFixed(2)} GB`}async function qS(e,a){const i=await fetch(Zl(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 FS(e,a){return vf(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await qS(e,a))}`:Zl(e)}const hb=e=>`/api/attachments/${e.id}/run`;function xL(e){const a=new DOMParser().parseFromString(e,"text/html");let i=a.querySelectorAll("script").length;const r=new Set;return a.querySelectorAll("*").forEach(s=>{for(const u of[...s.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)&&s.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 bL(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 jL({file:e,onSize:a}){const[i,r]=S.useState(),[s,u]=S.useState(!1);return S.useEffect(()=>{const d=new AbortController;return u(!1),FS(e,d.signal).then(r).catch(()=>{d.signal.aborted||u(!0)}),()=>d.abort()},[e.id]),s?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 wL({file:e,onOpen:a}){const[i,r]=S.useState(),s=vf(e),u=wc(s),d=PS(s),f=IS(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(jL,{file:e,onSize:r})}):o.jsx("span",{className:"ui-file-icon","data-kind":d?s:void 0,children:o.jsx(Be,{name:d?`file-${s}`:"file"})}),o.jsxs("span",{className:"ui-file-copy",children:[o.jsx("strong",{title:e.name,children:e.name}),o.jsxs("small",{children:[d?`${x(HS[s])} · `:"",f?`${f} · `:"",US(e.size)]})]})]}),o.jsx("a",{className:"ui-iconbtn",href:Zl(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 VS({files:e,onOpen:a}){const i=e.some(r=>wc(vf(r)));return o.jsx("div",{className:`ui-message-files ${i?"ui-has-images":""}`,children:e.map((r,s)=>o.jsx(wL,{file:r,onOpen:()=>a(s)},r.id))})}function $S({icon:e,title:a,titleClass:i,purpose:r,label:s,busy:u,error:d,ready:f,decline:m,confirm:v,onDecline:y,onConfirm:g,children:b}){const j=w=>{w.preventDefault(),f&&g()};return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":s,"aria-busy":u||void 0,onSubmit:j,children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:e}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:i?`jv-question-title ${i}`:"jv-question-title",children:a}),o.jsx("p",{className:"jv-question-detail",children:r})]})]}),o.jsxs("div",{className:"jv-question-body",children:[b,d&&o.jsx("p",{className:"jv-question-error",role:"alert",children:d})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:u,onClick:y,children:m}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:u||!f,children:v})]})]})}function GS({state:e,text:a,purpose:i}){return o.jsxs("p",{className:"jv-question-done","data-state":e,title:`${a}
|
|
548
|
+
${i}`,children:[e==="answered"?o.jsx(Ra,{"aria-hidden":"true"}):o.jsx(n4,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:a}),o.jsx("span",{className:"jv-question-asked",children:i})]})}function YS({label:e,value:a,visible:i,disabled:r,autoFocus:s,placeholder:u,hint:d,short:f,onChange:m,onVisible:v}){return o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:e}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:i?"text":"password",autoComplete:"new-password",spellCheck:!1,autoFocus:s,placeholder:u,value:a,disabled:r,onChange:y=>m(y.target.value)}),o.jsx("button",{type:"button","aria-label":x(i?"secrets.hideValue":"secrets.showValue"),onClick:()=>v(!i),children:i?o.jsx(j0,{}):o.jsx(w0,{})})]}),o.jsx("small",{"data-short":f||void 0,children:d})]})}function SL({message:e,onSettled:a}){var M;const i=e.question,r=i.secret,[s,u]=S.useState(""),[d,f]=S.useState(!1),[m,v]=S.useState(!1),[y,g]=S.useState("always"),{busy:b,error:j,run:w}=In();if(i.state!=="pending"){const E=((M=i.answer)==null?void 0:M.selected[0])===1?"once":"always",R=i.state==="answered"?x(E==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:r.name}):x(i.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:r.name});return o.jsx(GS,{state:i.state,text:R,purpose:r.purpose})}const k=r.needsValue||m,C=s.length>0&&s.length<8,T=E=>{b||w("answer",async()=>a(await E()),"question.failed")};return o.jsxs($S,{icon:o.jsx(Uj,{"aria-hidden":"true"}),title:r.name,titleClass:"jv-secret-request-name",purpose:r.purpose,label:x("secretCard.title",{name:r.name}),busy:b,error:j,ready:!k||!!s,decline:x("secretCard.decline"),confirm:x(k?"secretCard.saveAllow":"secretCard.allow"),onDecline:()=>T(()=>fe.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>T(()=>fe.fulfilSecret(e.chatId,e.id,{scope:y,...k?{value:s}:{}})),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")}),k&&o.jsx(YS,{label:x("secretCard.value"),value:s,visible:d,disabled:b,autoFocus:!0,placeholder:x("secretCard.valuePlaceholder"),hint:x(C?"secrets.shortValue":"secretCard.valueHint"),short:C,onChange:u,onVisible:f}),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(E=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===E,disabled:b,onClick:()=>g(E),children:x(E==="always"?"secretCard.always":"secretCard.once")},E))}),o.jsx("small",{children:x(y==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]})]})}function Sg({publicKey:e}){const[a,i]=S.useState(!1);return S.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 qc(e).then(i),children:[a?o.jsx(Ra,{"aria-hidden":"true"}):o.jsx(Zd,{"aria-hidden":"true"}),o.jsx("span",{children:x(a?"machines.copied":"machines.copy")})]})]})}function XS(e){const[a,i]=S.useState(null),[r,s]=S.useState(null);return S.useEffect(()=>{if(!e||a)return;let u=!0;return fe.prepareMachineKey().then(d=>{u&&i(d)}).catch(d=>{u&&s(Gt(d))}),()=>{u=!1}},[e,a]),{key:a,error:r,renew:()=>{i(null),s(null)}}}function kL({message:e,onSettled:a}){const i=e.question,r=i.machine,[s,u]=S.useState(""),[d,f]=S.useState(!1),{busy:m,error:v,setError:y,run:g}=In(),[b,j]=S.useState("password"),w=XS(i.state==="pending"&&!r.existing&&b==="key"),k=`${r.user}@${r.host}${r.port===22?"":`:${r.port}`}`;if(i.state!=="pending"){const E=x(i.state==="answered"?r.existing?"machineCard.granted":"machineCard.added":i.state==="dismissed"?"machineCard.declined":"machineCard.ignored",{name:r.name});return o.jsx(GS,{state:i.state,text:E,purpose:r.purpose})}const C=E=>{m||g("answer",async()=>{try{a(await E())}catch(R){throw R instanceof hr&&R.code==="ssh_key_expired"&&w.renew(),R}},"question.failed")},T=!r.existing,M=!T||(b==="key"?!!w.key:!!s);return o.jsxs($S,{icon:o.jsx(y4,{"aria-hidden":"true"}),title:r.name,purpose:r.purpose,label:x("machineCard.title",{name:r.name}),busy:m,error:v,ready:M,decline:x("machineCard.decline"),confirm:x(T?b==="key"?m?"machines.verifying":"machines.verify":m?"machines.connecting":"machineCard.add":"machineCard.allow"),onDecline:()=>C(()=>fe.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>C(()=>fe.fulfilMachine(e.chatId,e.id,b==="key"&&w.key?{keyId:w.key.keyId}:{password:s})),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(E=>o.jsx("code",{children:E},E))}),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(E=>o.jsx("button",{type:"button",role:"radio","aria-checked":b===E,disabled:m,onClick:()=>{j(E),y("")},children:x(E==="password"?"machines.byPassword":"machines.byKey")},E))}),b==="password"?o.jsx(YS,{label:x("machines.password"),value:s,visible:d,disabled:m,hint:x("machines.passwordHint"),onChange:u,onVisible:f}):o.jsxs("div",{className:"jv-machine-card-field",children:[o.jsx("span",{children:x("machines.publicKey")}),w.key?o.jsx(Sg,{publicKey:w.key.publicKey}):w.error?o.jsx("p",{className:"jv-question-error",role:"alert",children:w.error}):o.jsx("small",{children:"…"}),o.jsx("small",{children:x("machines.keyHint",{user:r.user})})]})]})]})}const mb=e=>String.fromCharCode(65+e),pb=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function KS(e){const{message:a}=e,{secret:i,machine:r}=a.question;return i?o.jsx(SL,{message:{...a,question:{...a.question,secret:i}},onSettled:e.onSettled}):r?o.jsx(kL,{message:{...a,question:{...a.question,machine:r}},onSettled:e.onSettled}):o.jsx(CL,{...e})}function CL({message:e,keyboard:a,onSettled:i}){var T,M;const r=e.question,s=r.state==="pending",u=S.useId(),[d,f]=S.useState([]),[m,v]=S.useState(""),{busy:y,error:g,run:b}=In();async function j(E){y||!s||await b("settle",async()=>i(await fe.answerQuestion(e.chatId,e.id,E)),"question.failed")}const w=E=>{if(!r.multiple){j({action:"answer",selected:[E]});return}f(R=>R.includes(E)?R.filter(D=>D!==E):[...R,E])},k=()=>void j({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),C=()=>{m.trim()&&(r.multiple?k():j({action:"answer",selected:[],custom:m.trim()}))};if(S.useEffect(()=>{if(!a||!s)return;const E=R=>{if(R.defaultPrevented||R.metaKey||R.ctrlKey||R.altKey||R.key.length!==1||pb(R.target)||pb(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const D=R.key.toUpperCase().charCodeAt(0)-65;D<0||D>=r.options.length||(R.preventDefault(),w(D))};return document.addEventListener("keydown",E,!0),()=>document.removeEventListener("keydown",E,!0)}),!s){const E=r.state==="answered"?[...(((T=r.answer)==null?void 0:T.selected)??[]).map(R=>{var D;return((D=r.options[R])==null?void 0:D.label)??""}),...(M=r.answer)!=null&&M.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}
|
|
549
|
+
${E===null?x("question.dismissed"):x("question.chose",{answer:E})}`,children:[E===null?o.jsx(n4,{"aria-hidden":"true"}):o.jsx(Ra,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:E===null?x("question.dismissed"):x0("question.chose",{answer:o.jsx("strong",{children:E})})}),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(Xj,{"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 j({action:"dismiss"}),children:o.jsx(hs,{"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((E,R)=>{const D=d.includes(R);return o.jsxs("button",{type:"button",className:"jv-question-option","data-style":E.style,"data-on":D||void 0,"aria-pressed":r.multiple?D:void 0,"aria-keyshortcuts":a?mb(R).toLowerCase():void 0,disabled:y,onClick:()=>w(R),children:[o.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:D?o.jsx(Ra,{}):mb(R)}),o.jsxs("span",{className:"jv-question-copy",children:[o.jsx("strong",{children:E.label}),E.description&&o.jsx("small",{children:E.description})]})]},E.label)})}),g&&o.jsx("p",{className:"jv-question-error",role:"alert",children:g})]}),(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:E=>v(E.target.value),onKeyDown:E=>{E.key==="Enter"&&!E.nativeEvent.isComposing&&(E.preventDefault(),C())}}),r.multiple?o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:k,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:C,children:x("question.send")})]})]})}function Hi(e){return e?e.deleted?x("member.deleted",{name:e.name}):e.name:x("member.unknown")}const NL={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},QS=e=>x(NL[e??""]??"activity.running"),si=e=>e.filter(a=>!a.deleted);function EL(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(),s=[...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=s.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 TL(e,a,i){let r="",s=0;for(const u of kg(e,a))r+=e.slice(s,u.at)+`[${e.slice(u.at,u.at+u.length)}](${u.member.id===i?"#mention-me":"#mention"})`,s=u.at+u.length;return r+e.slice(s)}const ZS=/\[\[q(\d+)\]\]/g,u0=(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(ZS,(a,i)=>{const r=e.quotes[Number(i)-1];return r?x("quote.inline",{text:r.text}):a})}function bs(e){return Cg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||x("common.attachment")}function JS({message:e,members:a,me:i,onJump:r}){const s=TL(e.content,a.filter(d=>e.mentions.includes(d.id)),i).replace(ZS,(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:u0(f.text,80)})]})};return o.jsx(Fc,{text:s,renderQuote:u})}function WS(e,a){var g;const i=a.replace(/\s+/g,"");if(!i||typeof CSS>"u"||!("highlights"in CSS))return!1;const r=e.querySelector(".ui-bubble")??e,s=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),u=[];for(let b=s.nextNode();b;b=s.nextNode())if(!((g=b.parentElement)!=null&&g.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 e5(e,a){var i;(i=e.querySelector(".jv-long-toggle[aria-expanded='false']"))==null||i.click(),e.scrollIntoView({block:"center",behavior:"smooth"}),!(a&&WS(e,a))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function AL({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:u0(i.text)}),o.jsx("button",{type:"button","aria-label":x("quote.remove",{text:u0(i.text,20)}),onClick:()=>a(r),children:"×"})]},r))}):null}function t5({container:e,drafts:a,chatId:i,source:r,members:s,onNotice:u}){const d=(y,g)=>{const b=r(y);b&&!_L(a,i,b,s,g)&&u(x("quote.tooMany",{count:10}))},[f,m]=S.useState(null);if(S.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const g=T=>{var M;return(M=T instanceof Element?T:T==null?void 0:T.parentElement)==null?void 0:M.closest(".ui-bubble")},b=()=>{var A,H;const T=getSelection(),M=(T==null?void 0:T.toString())??"";if(!T||T.isCollapsed||!M.trim()){m(null);return}const E=g(T.anchorNode),R=E==null?void 0:E.closest("[data-message]");if(!E||!R||!y.contains(E)||g(T.focusNode)!==E||(H=(A=T.anchorNode)==null?void 0:A.parentElement)!=null&&H.closest(".jv-quote-tag, button")){m(null);return}const D=T.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(D.left+D.width/2,90),innerWidth-90),y:Math.max(D.top-8,48),messageId:R.getAttribute("data-message"),text:M.trim()})},j=()=>requestAnimationFrame(b),w=()=>m(null),k=T=>{T.key==="Escape"&&w()},C=()=>{var T;(T=getSelection())!=null&&T.isCollapsed&&w()};return y.addEventListener("mouseup",j),y.addEventListener("scroll",w,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",C),()=>{y.removeEventListener("mouseup",j),y.removeEventListener("scroll",w,!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:()=>{qc(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 _L(e,a,i,r,s){if(e.get(a).passages.length>=10)return!1;const u={messageId:i.id,name:Hi(r.find(d=>d.id===i.senderId)),text:s};return e.update(a,d=>({passages:[...d.passages,u]})),!0}const ML=["👍","👎","✅","❌","😄","😂","😵💫","🤔"],gb=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function n5({message:e,members:a,onJump:i}){if(!e.replyTo)return null;const r=a.find(s=>s.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:bs(e.replyTo)})]})}function a5({message:e,me:a,members:i,onReact:r,onError:s}){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){s(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 i5({message:e,me:a,onReply:i,onReact:r,onError:s}){const[u,d]=S.useState(!1),[f,m]=S.useState(!1),v=S.useRef(null);S.useEffect(()=>{if(!u)return;const b=j=>{var w;(w=v.current)!=null&&w.contains(j.target)||d(!1)};return document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)},[u]);const y=b=>{var w;const j=!((w=e.reactions.find(k=>k.emoji===b))!=null&&w.memberIds.includes(a));try{r(e,b,j)}catch(k){s(k)}d(!1)},g=()=>{var w,k,C;const b=(w=v.current)==null?void 0:w.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(st,{icon:"arrow-u-up-right",label:x("actions.reply"),onClick:()=>i(e)}),o.jsx(st,{icon:"smiley-plus",label:x("actions.react"),"aria-expanded":u,onClick:g}),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:ML.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:gb.filter((b,j)=>gb.indexOf(b)===j).map(b=>o.jsx("button",{type:"button",onClick:()=>y(b),children:b},b))})]})]})]})}const RL=12;function r5({children:e,whole:a=!1}){const i=S.useRef(null),[r,s]=S.useState(null),[u,d]=S.useState(a);S.useLayoutEffect(()=>{const m=i.current;if(!m)return;const v=()=>{const g=parseFloat(getComputedStyle(m).lineHeight)||24,b=Math.round(RL*g);s(m.scrollHeight>b+2*g?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 l5(){const[e,a]=S.useState(new Set);return{has:i=>e.has(i),add:i=>a(r=>new Set(r).add(i))}}function o5({message:e}){return o.jsxs("div",{className:"jv-folded",children:[o.jsx("span",{className:"jv-folded-text",children:bs(e)}),o.jsxs("span",{className:"jv-folded-tag",children:[o.jsx(Be,{name:"fold"}),x("fold.folded")]})]})}const DL=5*6e4,eo=e=>new Date(e).toDateString(),Ng=(e,a)=>a===void 0||eo(e)!==eo(a),s5=(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>=DL;function OL(e){const a=new Date,i=new Date(e),r=new Date(a.getFullYear(),a.getMonth(),a.getDate()-1);if(eo(e)===eo(a.getTime()))return x("chat.today");if(eo(e)===r.toDateString())return x("chat.yesterday");const s=to()==="zh"?"long":"short";return i.getFullYear()===a.getFullYear()?ua(e,{weekday:"short",month:s,day:"numeric"}):ua(e,{year:"numeric",month:s,day:"numeric"})}const zL=e=>ua(e,{year:"numeric",month:to()==="zh"?"long":"short",day:"numeric",hour:to()==="zh"?"2-digit":"numeric",minute:"2-digit"}),LL=e=>eo(e)===eo(Date.now())?no(e):`${y0(e)} ${no(e)}`;function c5({time:e}){return o.jsx("div",{className:"jv-day",role:"separator",children:o.jsx("span",{children:OL(e)})})}function d0({time:e,className:a}){return o.jsx("time",{className:a,dateTime:new Date(e).toISOString(),title:zL(e),children:no(e)})}const u5="jarvy-notice-closed",BL=()=>{try{return JSON.parse(localStorage.getItem(u5)??"[]")}catch{return[]}};function Cr({member:e,bots:a,size:i,working:r=!1}){const s=(e==null?void 0:e.kind)==="bot"?a.find(u=>u.id===e.id):void 0;return s?o.jsx(so,{color:s.color,mood:s.mood,size:i,badge:r?"working":void 0,crown:s.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 IL({chat:e,members:a,bots:i,infoOpen:r,membersOpen:s,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:v,onThreads:y,onSearch:g}){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(st,{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":s,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(Cr,{member:j,bots:i,size:22})},j.id))}),o.jsx("span",{className:"jv-members-count",children:b.length})]}),o.jsx(st,{icon:"search",label:x("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:g}),o.jsx(st,{icon:"chat-bubble",label:x("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function PL({chat:e,onSave:a}){var j;const[i,r]=S.useState(BL),[s,u]=S.useState(null),[d,f]=S.useState(!1);S.useEffect(()=>u(null),[e.id]);const m=!i.includes(e.id),v=e.note,y=()=>r(w=>{const k=m?[...w,e.id]:w.filter(C=>C!==e.id);return localStorage.setItem(u5,JSON.stringify(k)),k}),g=async()=>{if(s!=null&&s.trim()){f(!0);try{await a(s.trim()),u(null)}finally{f(!1)}}};if(s!==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:s,autoFocus:!0,"aria-label":x("notice.content"),onChange:w=>u(w.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||!s.trim(),onClick:()=>void g(),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(st,{icon:"pencil",label:x("notice.edit"),onClick:()=>u("")})]});const b=((j=v.text.split(`
|
|
550
|
+
`).find(w=>w.trim()&&!w.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(st,{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(Fc,{text:v.text})})]})}function Xd({messages:e,members:a,bots:i,me:r,divider:s,before:u,activeQuestion:d,onSettled:f,onPreview:m,onReply:v,onOpenThread:y,onQuote:g,onReact:b,onFold:j,onJump:w,onError:k}){var M;const C=(M=e.find(E=>E.sequence>s&&E.senderId!==r))==null?void 0:M.id,T=l5();return o.jsx(o.Fragment,{children:e.map((E,R)=>{const D=e[R-1],A=a.find(z=>z.id===E.senderId),H=(D==null?void 0:D.createdAt)??u,U=!s5(E,D,H)&&E.id!==C,Y=E.folded;return o.jsxs("div",{children:[Ng(E.createdAt,H)&&o.jsx(c5,{time:E.createdAt}),E.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":E.id,"data-folded":U||void 0,"data-mention":E.mentions.includes(r)||void 0,"data-shut":Y||void 0,children:[o.jsx("div",{className:"jv-row-gutter",children:U?o.jsx(d0,{time:E.createdAt,className:"jv-row-time"}):o.jsx(Cr,{member:A,bots:i,size:32})}),o.jsxs("div",{className:"jv-row-body",children:[!U&&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(d0,{time:E.createdAt})]}),Y?o.jsx(o5,{message:E}):o.jsxs(o.Fragment,{children:[E.echoOf&&o.jsx("button",{type:"button",className:"jv-echo",onClick:()=>y==null?void 0:y(E.echoOf.id),children:x("channel.echo",{title:E.echoOf.title})}),E.replyTo&&o.jsx(n5,{message:E,members:a,onJump:z=>w==null?void 0:w(z)}),E.question?o.jsx(KS,{message:{...E,question:E.question},keyboard:E.id===d,onSettled:f}):o.jsxs("div",{className:"ui-bubble jv-flat",children:[E.content&&o.jsx(r5,{whole:T.has(E.id),children:o.jsx(JS,{message:E,members:a,me:r,onJump:w})}),E.attachments.length>0&&o.jsx(VS,{files:E.attachments,onOpen:z=>m(E.attachments,z)})]}),b&&o.jsx(a5,{message:E,me:r,members:a,onReact:b,onError:k??(()=>{})})]}),E.thread&&E.thread.replies>0&&o.jsxs("button",{type:"button",className:"jv-thread-link","data-done":E.thread.status==="done"||void 0,onClick:()=>y==null?void 0:y(E.thread.id),children:[x("channel.replies",{count:E.thread.replies}),E.thread.status==="done"&&` · ${x("channel.threadDone")}`,E.thread.lastReplyAt&&o.jsx("span",{className:"jv-muted",children:x("channel.lastReply",{time:LL(E.thread.lastReplyAt)})})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[v&&!E.echoOf&&o.jsx(st,{icon:"chat-bubble",label:x("channel.replyInThread"),onClick:()=>v(E)}),b&&o.jsx(i5,{message:E,me:r,onReply:g,onReact:b,onError:k??(()=>{})}),j&&o.jsx(st,{icon:E.folded?"unfold":"fold",label:x(E.folded?"actions.unfold":"actions.fold"),onClick:()=>{E.folded&&T.add(E.id),j(E,!E.folded)}})]})]})]},E.id)})})}function d5({candidates:e,bots:a,busy:i,onCancel:r,onConfirm:s}){const[u,d]=S.useState(""),[f,m]=S.useState([]),v=e.filter(g=>g.name.toLowerCase().includes(u.trim().toLowerCase())),y=g=>m(b=>b.includes(g)?b.filter(j=>j!==g):[...b,g]);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:g=>d(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.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(g=>o.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(g.id),className:"jv-member-option",onClick:()=>y(g.id),children:[o.jsx(Cr,{member:g,bots:a,size:24}),o.jsx("span",{className:"jv-member-name",children:g.name}),o.jsx("span",{className:"jv-muted",children:g.kind==="bot"?"Bot":x("common.member")}),o.jsx("span",{className:"jv-check",children:f.includes(g.id)&&o.jsx(Be,{name:"check"})})]},g.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:()=>s(f),children:f.length?x("dialogs.addCount",{count:f.length}):x("common.add")})]})]})}function HL({chat:e,members:a,bots:i,onClose:r,onChanged:s}){const{busy:u,error:d,run:f}=In();async function m(v){await f("add",async()=>{let y=e;for(const g of v)y=await fe.addMember(e.id,g);s(y),r()},"dialogs.addFailed")}return o.jsxs(ds,{title:x("info.addMembers"),onClose:r,className:"jv-channel-dialog",children:[o.jsx(d5,{candidates:a.filter(v=>!e.memberIds.includes(v.id)),bots:i,busy:u,onCancel:r,onConfirm:v=>void m(v)}),d&&o.jsx("p",{className:"jv-form-error",role:"alert",children:d})]})}function UL({sections:e,members:a,bots:i,me:r,onClose:s,onSaved:u}){const d=S.useId(),[f,m]=S.useState(""),[v,y]=S.useState(""),[g,b]=S.useState(null),[j,w]=S.useState([r]),[k,C]=S.useState(!1),{busy:T,error:M,run:E}=In();async function R(A){A.preventDefault(),!(!f.trim()||T)&&await E("save",async()=>u(await fe.createChannel({name:f.trim(),topic:v.trim(),sectionId:g,memberIds:j.filter(H=>H!==r)})),"common.saveFailed")}const D=a.filter(A=>j.includes(A.id));return k?o.jsx(ds,{title:x("info.addMembers"),onClose:s,className:"jv-channel-dialog",children:o.jsx(d5,{candidates:a.filter(A=>!j.includes(A.id)),bots:i,busy:!1,onCancel:()=>C(!1),onConfirm:A=>{w(H=>[...H,...A]),C(!1)}})}):o.jsx(ds,{title:x("sidebar.newChannel"),onClose:s,className:"jv-channel-dialog",children:o.jsxs("form",{onSubmit:A=>void R(A),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:A=>m(A.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:A=>y(A.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-section`,children:x("info.section")}),o.jsx(BS,{id:`${d}-section`,value:g,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")," · ",D.length]}),o.jsxs("button",{type:"button",className:"ui-button",onClick:()=>C(!0),children:[o.jsx(Be,{name:"person-add"}),x("info.addMembers")]})]}),D.map(A=>o.jsxs("div",{className:"jv-member-option",children:[o.jsx(Cr,{member:A,bots:i,size:24}),o.jsx("span",{className:"jv-member-name",children:A.name}),o.jsx("span",{className:"jv-muted",children:A.id===r?x("common.you"):A.kind==="bot"?"Bot":x("common.member")}),A.id!==r&&o.jsx(st,{icon:"close",label:x("members.remove",{name:A.name}),className:"jv-member-remove",onClick:()=>w(H=>H.filter(U=>U!==A.id))})]},A.id))]}),M&&o.jsx("p",{className:"jv-form-error",role:"alert",children:M}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:s,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:T||!f.trim(),children:x("common.create")})]})]})})}function qL({section:e,onClose:a,onSaved:i,onDeleted:r}){const s=S.useId(),[u,d]=S.useState((e==null?void 0:e.name)??""),[f,m]=S.useState(!1),[v,y]=S.useState("");async function g(j){if(j.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{i(e?await fe.updateSection(e.id,{name:u.trim()}):await fe.createSection({name:u.trim()}))}catch(w){y(Gt(w,"common.saveFailed")),m(!1)}}}async function b(){if(!(!e||!confirm(x("dialogs.deleteSection",{name:e.name})))){m(!0);try{await fe.deleteSection(e.id),r==null||r(e.id)}catch(j){y(Gt(j,"dialogs.deleteFailed")),m(!1)}}}return o.jsx(ds,{title:x(e?"dialogs.editSection":"sidebar.newSection"),onClose:a,children:o.jsxs("form",{onSubmit:j=>void g(j),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${s}-name`,children:x("dialogs.sectionName")}),o.jsx("input",{id:`${s}-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 FL({bot:e,chats:a,onClose:i,onConfirm:r}){const[s,u]=S.useState(!1),[d,f]=S.useState(!1);return o.jsx(ds,{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:s,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(Me,{type:"button",variant:"ghost",onClick:i,children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),r(s).finally(()=>f(!1))},children:x(d?"deleteBot.deleting":"common.delete")})]})]})})}function f5({title:e,body:a,confirm:i,onClose:r,onConfirm:s}){const[u,d]=S.useState(!1);return o.jsx(ds,{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(Me,{type:"button",variant:"ghost",onClick:r,children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),s().finally(()=>d(!1))},children:u?x("deleteBot.working"):i})]})]})})}function VL({target:e,x:a,y:i,onClose:r,onOpenBot:s,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:v}){const y=S.useRef(null);S.useEffect(()=>{const j=k=>{var C;(C=y.current)!=null&&C.contains(k.target)||r()},w=k=>{k.key==="Escape"&&r()};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",w),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",w)}},[r]);const g=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:[g&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(g,!g.pinned),r()},children:[o.jsx(Be,{name:"pin"}),o.jsx("span",{className:"ui-menu-copy",children:x(g.pinned?"entry.unpin":"entry.pin")})]}),g&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(g,!g.muted),r()},children:[o.jsx(Be,{name:g.muted?"bell":"bell-slash"}),o.jsx("span",{className:"ui-menu-copy",children:x(g.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{s(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 $L({files:e,initialIndex:a=0,onClose:i}){const[r,s]=S.useState(a),[u,d]=S.useState("preview"),[f,m]=S.useState(!1),[v,y]=S.useState(""),[g,b]=S.useState(""),[j,w]=S.useState(""),[k,C]=S.useState(!0),[T,M]=S.useState(0),[E,R]=S.useState(!1),[D,A]=S.useState(!1),H=S.useRef(null),U=S.useRef(null),Y=S.useRef(new Map),z=e[r],V=vf(z),F=PS(V),J=!F&&z.size>vL,G=!F&&!J&&V!=="download";S.useEffect(()=>{const ae=H.current,ie=document.activeElement;return ae.showModal(),()=>{ae.close(),ie!=null&&ie.isConnected&&ie.focus({preventScroll:!0})}},[]),S.useEffect(()=>{const ae=new AbortController;return y(""),b(""),w(""),d("preview"),R(!1),A(!1),C(G),G&&(wc(V)?FS(z,ae.signal).then(b):qS(z,ae.signal).then(y)).then(()=>C(!1)).catch(ie=>{ae.signal.aborted||(w(Gt(ie,"files.readError")),C(!1))}),()=>ae.abort()},[z.id,T]),S.useEffect(()=>{U.current&&(U.current.scrollTop=Y.current.get(`${r}:${u}`)??0)},[r,u,k]);const $=()=>{var ae;return Y.current.set(`${r}:${u}`,((ae=U.current)==null?void 0:ae.scrollTop)??0)},K=ae=>{$(),s(Math.max(0,Math.min(e.length-1,ae)))},I=S.useMemo(()=>V==="html"&&v?xL(v):null,[V,v]),P=G&&["markdown","html"].includes(V)&&!k&&!j,W=wc(V)||F&&!D?"ui-image-view":V==="html"&&u==="preview"?"ui-html-view":V==="markdown"&&u==="preview"?"ui-document":"",_=o.jsxs("a",{className:"ui-button",href:Zl(z),download:z.name,children:[o.jsx(Be,{name:"cloud-download"}),x("files.downloadFile")]});return co.createPortal(o.jsxs("dialog",{ref:H,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:ae=>{ae.preventDefault(),i()},onKeyDown:ae=>{!["ArrowLeft","ArrowRight"].includes(ae.key)||["SELECT","INPUT","TEXTAREA"].includes(ae.target.tagName)||(ae.preventDefault(),K(r+(ae.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:z.name}),o.jsxs("small",{children:[x(HS[V])," · ",US(z.size)]})]}),o.jsxs("div",{className:"ui-preview-actions",children:[P&&o.jsx("button",{type:"button",className:"ui-button",onClick:()=>{$(),d(u==="source"?"preview":"source")},children:x(u==="source"?"files.showPreview":V==="html"?"files.showSource":"files.showText")}),E&&o.jsx(st,{icon:"window",label:x("files.openTab"),onClick:()=>window.open(hb(z),"_blank","noopener,noreferrer")}),o.jsx("a",{className:"ui-iconbtn",href:Zl(z),download:z.name,"aria-label":x("files.download",{name:z.name}),title:x("files.download",{name:z.name}),children:o.jsx(Be,{name:"cloud-download"})}),o.jsx(st,{icon:f?"arrows-contract":"arrows-expand",label:x(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),o.jsx(st,{icon:"close",label:x("files.closePreview"),"data-action":"ui-close",onClick:i})]})]}),I&&u==="preview"&&!k&&!j&&o.jsxs("div",{className:"jv-run-tip",role:"status",children:[o.jsx("p",{children:E?x("files.running"):x("files.scripts",{count:I.count,hosts:I.hosts.length?x("files.scriptHosts",{hosts:I.hosts.slice(0,3).join(x("common.listSeparator"))+(I.hosts.length>3?x("files.andMore"):"")}):""})}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>R(!E),children:x(E?"files.stop":"files.run")})]}),o.jsx("div",{className:`ui-preview-body ${W}`,ref:U,tabIndex:-1,children:F?D?o.jsxs("div",{className:"ui-fallback",children:[o.jsx(Be,{name:`file-${V}`}),o.jsx("strong",{children:x("files.cantPlay")}),o.jsx("p",{children:x("files.cantPlayHint")}),_]}):V==="video"?o.jsx("video",{className:"ui-preview-video",src:Zl(z),controls:!0,preload:"metadata",playsInline:!0,onError:()=>A(!0)},z.id):o.jsx("audio",{className:"ui-preview-audio",src:Zl(z),controls:!0,preload:"metadata",onError:()=>A(!0)},z.id):G?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(ae=>ae+1),children:x("common.retry")})]}):wc(V)?o.jsx("img",{className:"ui-preview-image",src:g,alt:z.name}):u==="source"||V==="text"?o.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):V==="html"?E?o.jsx("iframe",{title:x("files.runningTitle",{name:z.name}),sandbox:"allow-scripts",src:hb(z),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):o.jsx("iframe",{title:z.name,sandbox:"",srcDoc:bL(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):o.jsx("article",{className:"ui-prose",children:o.jsx(Fc,{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(J?"files.tooLarge":"files.unsupported")}),_]})}),e.length>1&&o.jsxs("footer",{className:"ui-preview-nav",children:[o.jsx(st,{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:ae=>K(Number(ae.target.value)),children:e.map((ae,ie)=>o.jsx("option",{value:ie,children:ae.name},ae.id))}),o.jsxs("span",{children:[r+1," / ",e.length]}),o.jsx(st,{icon:"chevron-right",label:x("files.next"),disabled:r===e.length-1,onClick:()=>K(r+1)})]})]}),document.body)}function GL({dialog:e,entryMenu:a,confirm:i,preview:r,infoBot:s,bots:u,statuses:d,chats:f,sections:m,members:v,connections:y,meId:g,onDialog:b,onEntryMenu:j,onConfirm:w,onPreview:k,onInfoBot:C,onSettings:T,onChannelInfo:M,onOpenChatId:E,chatSaved:R,openChat:D,onSectionSaved:A,onSectionDeleted:H,updateBot:U,openAnywhere:Y,removeChannel:z,deleteBot:V,pinChat:F,muteChat:J}){return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&o.jsx(UL,{sections:m,members:si(v),bots:u,me:g,onClose:()=>b(null),onSaved:G=>{R(G),b(null),D(G)}}),(e==null?void 0:e.kind)==="members"&&o.jsx(HL,{chat:f.find(G=>G.id===e.chat.id)??e.chat,members:si(v),bots:u,onClose:()=>b(null),onChanged:R}),(e==null?void 0:e.kind)==="section"&&o.jsx(qL,{section:e.section,onClose:()=>b(null),onSaved:A,onDeleted:H}),a&&o.jsx(VL,{target:a.target,x:a.at.x,y:a.at.y,onClose:()=>j(null),onOpenBot:G=>C(G.id),onSettings:G=>{G.type==="channel"&&M(G)},onPin:(G,$)=>void F(G,$),onMute:(G,$)=>void J(G,$),onDeleteChat:G=>w({kind:"chat",chat:G}),onDeleteBot:G=>w({kind:"bot",bot:G})}),(i==null?void 0:i.kind)==="chat"&&o.jsx(f5,{title:x("app.deleteChannelTitle",{name:i.chat.title}),confirm:x("common.delete"),onClose:()=>w(null),body:x("app.deleteChannelBody"),onConfirm:async()=>{await z(i.chat),w(null)}}),(i==null?void 0:i.kind)==="bot"&&o.jsx(FL,{bot:i.bot,chats:f.filter(G=>G.type==="dm"&&G.botId===i.bot.id).length,onClose:()=>w(null),onConfirm:async G=>{await V(i.bot,G),w(null)}}),s&&o.jsx(gL,{bot:s,status:d[s.id],connections:y,chats:f,onSaved:U,onOpenChat:G=>{C(null),E(G)},onOpenSubscription:Y,onManageModels:()=>{C(null),T("models")},onAddMachine:()=>{C(null),T("addMachine")},onClose:()=>C(null)},s.id),r&&o.jsx($L,{files:r.files,initialIndex:r.index,onClose:()=>k(null)})]})}function h5(e,a,i){const[r,s]=S.useState(null),[u,d]=S.useState(!1);return S.useEffect(()=>{const f=e.trim();if(!f){s(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void fe.search(f,a).then(y=>{m&&s(y)}).catch(y=>{m&&i(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[e,a]),{result:r,loading:u}}function m5(e,a,i){var r;return e.type==="thread"?`#${((r=a.find(s=>s.id===e.parentId))==null?void 0:r.title)??x("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:Hi(i.find(s=>s.id===e.botId))}function p5({text:e,query:a,room:i=24}){const r=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),s=r.toLocaleLowerCase().indexOf(a.trim().toLocaleLowerCase());if(s<0||!a.trim())return o.jsx(o.Fragment,{children:r.slice(0,120)});const u=Math.max(0,s-i),d=s+a.trim().length;return o.jsxs(o.Fragment,{children:[u>0&&"…",r.slice(u,s),o.jsx("mark",{className:"jv-hit",children:r.slice(s,d)}),r.slice(d,d+120)]})}const YL=e=>new Date(e).toDateString()===new Date().toDateString()?no(e):y0(e);function g5({message:e,chat:a,chats:i,members:r,query:s,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:m5(a,i,r)}),o.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:YL(e.createdAt)})]}),o.jsx("span",{className:"jv-hit-text",children:o.jsx(p5,{text:Cg(e),query:s})})]})}const vb=5;function Dd({label:e,items:a,empty:i}){const[r,s]=S.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,vb):o.jsx("p",{className:"jv-result-empty",children:i}),!r&&a.length>vb&&o.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>s(!0),children:[x("search.showAll",{count:a.length}),o.jsx(Be,{name:"chevron-down"})]})]})}function XL({query:e,shown:a,chats:i,members:r,onOpenChat:s,onOpenMessage:u,onError:d}){const{result:f,loading:m}=h5(e,void 0,d),v=((f==null?void 0:f.chats)??[]).filter(g=>!a.has(g.id)),y=g=>{var b,j;return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>s(g),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:g.type==="thread"?g.title:`#${g.title}`}),g.type==="thread"&&o.jsx("span",{className:"jv-hit-place",children:m5(g,i,r).split(" › ")[0]})]}),(((b=g.note)==null?void 0:b.text)||g.topic)&&o.jsx("span",{className:"jv-hit-text",children:o.jsx(p5,{text:((j=g.note)==null?void 0:j.text)||g.topic,query:e})})]},g.id)};return o.jsxs("div",{className:"jv-results","aria-live":"polite",children:[o.jsx(Dd,{label:x("search.threads"),items:v.filter(g=>g.type==="thread").map(y)}),o.jsx(Dd,{label:x("search.channels"),items:v.filter(g=>g.type==="channel").map(y)}),f?o.jsx(Dd,{label:x("search.messages"),empty:x("search.noMessages"),items:f.messages.map(({message:g,chat:b})=>o.jsx(g5,{message:g,chat:b,chats:i,members:r,query:e,onOpen:u},g.id))}):m&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")})]})}function KL({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 QL=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 ZL({className:e,align:a="inline-start",...i}){return o.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:an(QL({align:a}),e),onClick:r=>{var s,u;r.target.closest("button")||(u=(s=r.currentTarget.parentElement)==null?void 0:s.querySelector("input"))==null||u.focus()},...i})}function JL({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 WL({className:e,children:a,...i}){return o.jsxs(wT,{"data-slot":"scroll-area",className:an("relative",e),...i,children:[o.jsx(ST,{"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(eB,{}),o.jsx(kT,{})]})}function eB({className:e,orientation:a="vertical",...i}){return o.jsx(dT,{"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(vT,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const v5="jarvy-collapsed-sections",tB=()=>{try{return JSON.parse(localStorage.getItem(v5)??"[]")}catch{return[]}};function yb({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 y5(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 nB(e){var a;return e.type==="channel"&&y5(e)&&((a=e.hint)==null?void 0:a.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function xb({chat:e,channel:a}){const i=y5(e),r=e.lastMessage&&bs(e.lastMessage),s=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:s})]})}const bb=e=>{const a=e.getBoundingClientRect();return{x:a.right-168,y:a.bottom+4}};function aB({chats:e,sections:a,bots:i,members:r,onOpenMessage:s,onOpenFound:u,onError:d,working:f,asking:m,selected:v,filter:y,followed:g,followedOpen:b,onFilterChange:j,onSelect:w,onOpenBot:k,onOpenFollowed:C,onMenu:T,onEditSection:M}){const[E,R]=S.useState(tB),D=I=>R(P=>{const W=P.includes(I)?P.filter(_=>_!==I):[...P,I];return localStorage.setItem(v5,JSON.stringify(W)),W}),A=y.toLocaleLowerCase(),H=e.filter(I=>{var P;return I.type!=="thread"&&`${I.title} ${I.topic} ${((P=i.find(W=>W.id===I.botId))==null?void 0:P.name)??""}`.toLocaleLowerCase().includes(A)}),U=g.reduce((I,P)=>I+P.unread,0),Y=g.reduce((I,P)=>I+P.mentions,0),z=H.filter(I=>I.type==="channel").sort((I,P)=>Number(P.pinned)-Number(I.pinned)||I.title.localeCompare(P.title,"zh-CN")),V=i.map(I=>({bot:I,chat:e.find(P=>P.type==="dm"&&P.botId===I.id)})).filter(({bot:I})=>I.name.toLocaleLowerCase().includes(A)).sort((I,P)=>{var W,_,ae,ie;return Number(P.bot.agent)-Number(I.bot.agent)||+!!((W=P.chat)!=null&&W.pinned)-+!!((_=I.chat)!=null&&_.pinned)||(((ae=P.chat)==null?void 0:ae.updatedAt)??0)-(((ie=I.chat)==null?void 0:ie.updatedAt)??0)}),F=I=>o.jsxs("div",{className:"jv-side-wrap",onContextMenu:P=>{P.preventDefault(),T({kind:"channel",chat:I},{x:P.clientX,y:P.clientY})},children:[o.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===I.id||void 0,"data-unread":I.unread>0||void 0,"aria-current":v===I.id?"page":void 0,onClick:()=>w(I),children:[I.pinned?o.jsx(Dp,{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:I.title,children:I.title}),I.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(xb,{chat:I,channel:!0}),o.jsx(yb,{chat:I})]})]})]}),o.jsx("button",{type:"button",className:"jv-side-more","aria-label":x("sidebar.more",{name:I.title}),onClick:P=>T({kind:"channel",chat:I},bb(P.currentTarget)),children:o.jsx(By,{"aria-hidden":"true"})})]},I.id),J=({bot:I,chat:P})=>{const W=m.has(I.id)?"asking":f.has(I.id)?"working":void 0,_=!!P&&v===P.id;return o.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:ae=>{ae.preventDefault(),T({kind:"dm",bot:I,chat:P},{x:ae.clientX,y:ae.clientY})},children:[o.jsxs(Me,{type:"button",variant:"ghost","data-active":_,"aria-current":_?"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:()=>P?w(P):k(I),children:[o.jsx(so,{color:I.color,mood:I.mood,size:36,badge:W,crown:I.agent}),W&&o.jsx("span",{className:"sr-only",children:x(W==="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 ${P!=null&&P.unread?"font-semibold":"font-medium"}`,title:I.name,children:I.name}),(P==null?void 0:P.muted)&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(Be,{name:"bell-slash"})}),(P==null?void 0:P.pinned)&&o.jsx(Dp,{className:"jv-dm-pin shrink-0","aria-label":x("sidebar.pinned")}),P&&o.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(P.updatedAt).toISOString(),children:no(P.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:P?o.jsx(xb,{chat:P,channel:!1}):""}),P&&o.jsx(yb,{chat:P})]})]})]}),o.jsx(Me,{type:"button",variant:"ghost",size:"icon-xs","aria-label":x("sidebar.more",{name:I.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:ae=>T({kind:"dm",bot:I,chat:P},bb(ae.currentTarget)),children:o.jsx(By,{"aria-hidden":"true"})})]},I.id)},G=(I,P,W,_,ae)=>o.jsxs("div",{className:"jv-side-section-head",children:[o.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!W,onClick:()=>D(I),children:[o.jsx("span",{className:"jv-side-chevron",children:o.jsx(Be,{name:W?"chevron-right":"chevron-down"})}),o.jsxs("span",{className:"jv-side-section-name",children:[P,W&&_&&o.jsx("span",{className:"jv-dot","aria-label":x("sidebar.hasUnread")})]})]}),ae&&o.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":x("sidebar.editSection",{name:P}),onClick:()=>M(ae),children:o.jsx(Be,{name:"pencil"})})]}),$=I=>!A&&E.includes(I),K=(I,P,W,_)=>o.jsxs("div",{className:"jv-side-section",children:[G(I,P,$(I),W.some(ae=>ae.unread>0),_),!$(I)&&W.map(F)]},I);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:o.jsxs(KL,{className:"h-9 bg-background",children:[o.jsx(JL,{id:"jarvy-search",type:"search",value:y,onChange:I=>j(I.target.value),placeholder:x("sidebar.search"),"aria-label":x("sidebar.search"),onKeyDown:I=>{I.key==="Escape"&&y&&(I.preventDefault(),j(""))},className:"text-sm"}),o.jsx(ZL,{align:"inline-start",children:o.jsx(Dc,{"aria-hidden":"true"})})]})}),o.jsx(WL,{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(Dd,{label:x("sidebar.chats"),items:[...z.map(F),...V.map(J)]}),o.jsx(XL,{query:y,shown:new Set(z.map(I=>I.id)),chats:e,members:r,onOpenChat:u,onOpenMessage:s,onError:d})]}):o.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":x("sidebar.nav"),children:[g.length>0&&o.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":b||void 0,"data-unread":U>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")}),Y>0?o.jsx("span",{className:"jv-badge",children:Y}):U>0&&o.jsx("span",{className:"jv-count",children:U})]}),a.map(I=>K(`s:${I.id}`,I.name,z.filter(P=>P.sectionId===I.id),I)),z.some(I=>!I.sectionId||!a.some(P=>P.id===I.sectionId))&&K("channels",x("sidebar.channels"),z.filter(I=>!I.sectionId||!a.some(P=>P.id===I.sectionId))),o.jsxs("div",{className:"jv-side-section",children:[G("dms",x("sidebar.dms"),$("dms"),V.some(({chat:I})=>!!(I!=null&&I.unread))),!$("dms")&&o.jsx("div",{className:"space-y-1",children:V.map(J)}),!$("dms")&&V.length===0&&o.jsx("p",{className:"jv-side-empty",children:x("sidebar.noDms")})]})]})})]})}function iB({username:e,chats:a,sections:i,bots:r,members:s,followed:u,followedOpen:d,working:f,asking:m,selected:v,filter:y,creating:g,createMenu:b,accountMenu:j,onFilterChange:w,onOpenFollowed:k,onOpenChat:C,onOpenBot:T,onOpenMenu:M,onEditSection:E,onCreate:R,onFind:D,onOpenFound:A,onError:H,onToggleCreate:U,onToggleAccount:Y,onSettings:z,onToggleTheme:V,onLogOut:F}){const J=S.useRef(null),G=S.useRef(null);return S.useEffect(()=>{if(!j&&!b)return;const $=K=>{var I,P;j&&!((I=G.current)!=null&&I.contains(K.target))&&Y(!1),b&&!((P=J.current)!=null&&P.contains(K.target))&&U(!1)};return document.addEventListener("pointerdown",$),()=>document.removeEventListener("pointerdown",$)},[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:J,children:[o.jsx(st,{icon:"add",label:x("sidebar.create"),"aria-expanded":b,"aria-haspopup":"menu",disabled:g,onClick:()=>U(!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:()=>R("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:()=>R("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:()=>R("bot"),children:[o.jsx(Be,{name:"person-add"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newBot")})]})]})]})}),o.jsx(aB,{chats:a,sections:i,bots:r,members:s,onOpenMessage:D,onOpenFound:A,onError:H,working:f,asking:m,selected:v,filter:y,onFilterChange:w,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:C,onOpenBot:T,onMenu:M,onEditSection:E}),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:()=>Y(!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:G,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:z,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:V,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:F,children:[o.jsx(Be,{name:"arrow-bracket-to-left"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.signOut")})]})]})]})}function rB({textarea:e,value:a,setValue:i,inside:r,outside:s,bots:u,onInvite:d,participants:f}){const[m,v]=S.useState(null),[y,g]=S.useState(0),[b,j]=S.useState(null),w=S.useRef(null),k=S.useRef(null),C=S.useRef(null);S.useLayoutEffect(()=>{C.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(C.current,C.current),C.current=null)},[a,e]);const T=(_,ae)=>_.name.toLowerCase().includes(ae.toLowerCase()),M=m===null?[]:r.filter(_=>T(_,m)),E=f?M.filter(_=>f.has(_.id)):M,R=f?M.filter(_=>!f.has(_.id)):[],D=E.length>0&&R.length>0,A=[...E,...R],H=m===null?[]:s.filter(_=>T(_,m)),U=b?s.filter(_=>T(_,b.search)):[],Y=A.length+(H.length?1:0),z=()=>{v(null),j(null)};function V(_=a){const ae=e.current,ie=ae?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(_.slice(0,ae.selectionStart)):null;v(ie?ie[1]:null),g(0),j(null)}function F(_){const ae=e.current;if(!ae)return;r.some(q=>q.id===_.id)||d(_);const ie=a.slice(0,ae.selectionStart).replace(/@([^\s@]*)$/u,`@${_.name} `),L=ie+a.slice(ae.selectionStart);C.current=ie.length,i(L),z()}function J(_){b||j({search:m??"",active:0}),_&&requestAnimationFrame(()=>{var ae;return(ae=k.current)==null?void 0:ae.focus()})}function G(){var _;j(null),(_=e.current)==null||_.focus()}function $(_){if(!Y||_.nativeEvent.isComposing)return!1;const ae=y===A.length;return _.key==="ArrowDown"||_.key==="ArrowUp"?(_.preventDefault(),g((y+(_.key==="ArrowDown"?1:-1)+Y)%Y),j(null),!0):(_.key==="Enter"||_.key==="Tab")&&!ae?(_.preventDefault(),F(A[y]),!0):(_.key==="Enter"||_.key==="Tab"||_.key==="ArrowRight")&&ae?(_.preventDefault(),J(!0),!0):_.key==="Escape"?(_.preventDefault(),z(),!0):!1}function K(_){!b||_.nativeEvent.isComposing||((_.key==="ArrowDown"||_.key==="ArrowUp")&&U.length?(_.preventDefault(),j({...b,active:(b.active+(_.key==="ArrowDown"?1:-1)+U.length)%U.length})):_.key==="Enter"?(_.preventDefault(),U[b.active]&&F(U[b.active])):(_.key==="Escape"||_.key==="ArrowLeft"&&!b.search)&&(_.preventDefault(),G()))}const I=_=>{var ie;const ae=_.relatedTarget;(!ae||!((ie=w.current)!=null&&ie.contains(ae))&&ae!==e.current)&&z()},P=(_,ae)=>o.jsxs("button",{type:"button",role:"option","aria-selected":ae,className:"ui-menu-item","data-active":ae||void 0,onMouseDown:ie=>{ie.preventDefault(),F(_)},children:[o.jsx(Cr,{member:_,bots:u,size:20}),o.jsx("span",{className:"ui-menu-copy",children:_.name}),o.jsx("span",{className:"jv-muted",children:_.kind==="bot"?"Bot":x("common.member")})]},_.id);return{menu:Y>0?o.jsxs("div",{ref:w,className:"jv-mention-box","data-side":b?"":void 0,onBlur:I,children:[o.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":x("mention.menu"),children:[D&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inThread")}),E.map((_,ae)=>P(_,ae===y)),D&&o.jsx("div",{className:"jv-mention-sep",role:"separator"}),D&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inChannel")}),R.map((_,ae)=>P(_,E.length+ae===y)),H.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:()=>{g(A.length),J(!1)},onMouseDown:_=>{_.preventDefault(),g(A.length),J(!0)},children:[o.jsx("span",{className:"ui-menu-copy",children:x("mention.outside")}),o.jsx("span",{className:"jv-muted",children:H.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:_=>{_.preventDefault(),G()},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:_=>j({search:_.target.value,active:0}),onKeyDown:K})]}),o.jsx("div",{className:"jv-mention-side-list",children:U.length?U.map((_,ae)=>P(_,ae===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:V,onKeyDown:$,close:z,leaves:I}}const jb={text:null,files:[],quote:null,passages:[],key:null,signature:null,outgoing:null,sending:!1};function x5(e,a){var s;const i=((s=a.text)==null?void 0:s.trim())??"",r=e.text??"";return{text:r.trim()?i?`${i}
|
|
551
|
+
|
|
552
|
+
${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 lB{constructor(a){fc(this,"drafts",new Map);fc(this,"listeners",new Set);fc(this,"timer",null);fc(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,s]of Object.entries(i)){const u={...jb,...s,sending:!1};this.drafts.set(r,u.outgoing?{...u,...x5(u,u.outgoing)}:u)}}catch{localStorage.removeItem(a)}}get(a){return this.drafts.get(a)??jb}update(a,i){const r=this.get(a),s=typeof i=="function"?i(r):i;this.drafts.set(a,{...r,...s}),this.listeners.forEach(d=>d());const u=Object.keys(s).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:s,...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 s;return[...r.files,...((s=r.outgoing)==null?void 0:s.files)??[]]});await Promise.all(i.map(r=>a(r.id).catch(s=>console.warn(`Pending attachment ${r.id} was not deleted on log-out`,s)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(r=>r())}}const oB=e=>`jarvy-drafts:${e}`;function b5(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 sB(e,a){return S.useSyncExternalStore(e.subscribe,()=>e.get(a))}const wb=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function j5({chatId:e,id:a,drafts:i,placeholder:r,disabled:s=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:v,onError:y,onNotice:g}){const b=sB(i,e),j=b.sending,[w,k]=S.useState([]),[C,T]=S.useState(!1),M=w.filter(P=>P.chatId===e),E=M.length>0,R=S.useRef(new Map),D=S.useRef(null),A=b.text??d??"",H=b.files,U=b.quote,Y=P=>i.update(e,{text:P}),z=rB({textarea:D,value:A,setValue:Y,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:P=>u==null?void 0:u.onInvite(P),participants:u==null?void 0:u.participants});async function V(P){var L;const W=e;if(!P.length)return;if(E){g(x("composer.busy"));return}if(H.length+P.length>5){g(x("composer.tooMany",{count:5}));return}if(P.some(q=>q.size===0||q.size>Ly)){g(x("composer.size",{limit:`${Ly/1024**3} GB`}));return}const _=P.map(q=>({key:wb(),chatId:W,name:q.name,done:0})),ae=_.map(q=>q.key),ie=(q,ue)=>k(xe=>xe.map(be=>be.key===q?{...be,done:ue}:be));k(q=>[...q,..._]);for(const q of ae)R.current.set(q,new AbortController);try{for(const[q,ue]of P.entries()){const xe=ae[q];try{const be=await fe.uploadAttachment(W,ue,je=>ie(xe,je),(L=R.current.get(xe))==null?void 0:L.signal);i.update(W,je=>({files:[...je.files,be]}))}catch(be){if(!(be instanceof DOMException&&be.name==="AbortError"))throw be}finally{k(be=>be.filter(je=>je.key!==xe))}}}catch(q){y(q)}finally{k(q=>q.filter(ue=>!ae.includes(ue.key)));for(const q of ae)R.current.delete(q)}}async function F(P){const W=e;try{await fe.removeAttachment(P),i.update(W,_=>({files:_.files.filter(ae=>ae.id!==P)}))}catch(_){y(_)}}function J(P){const W=[...P.clipboardData.files];if(!W.length)return;P.preventDefault();const _=new Date().toISOString().replace(/\D/g,"").slice(0,14);V(W.map((ae,ie)=>ae.type.startsWith("image/")&&/^image\.\w+$/.test(ae.name)?new File([ae],`${x("composer.pasted")}-${_}${W.length>1?`-${ie+1}`:""}.${ae.name.split(".").pop()}`,{type:ae.type}):ae))}const G=P=>P.dataTransfer.types.includes("Files");function $(P){!G(P)||s||(P.preventDefault(),P.dataTransfer.dropEffect="copy",T(!0))}function K(P){G(P)&&(P.preventDefault(),T(!1),s||V([...P.dataTransfer.files]))}async function I(P){P==null||P.preventDefault();const W=e,_=i.get(W),ae=(_.text??d??"").trim(),ie=_.files,L=_.quote,q=_.passages,xe=[q.map((Re,ye)=>`[[q${ye+1}]]`).join(`
|
|
553
|
+
`),ae].filter(Boolean).join(`
|
|
554
|
+
|
|
555
|
+
`);if(!xe&&!ie.length||_.sending||E||s)return;const be=JSON.stringify([xe,ie.map(Re=>Re.id),(L==null?void 0:L.id)??null,q]),je=_.signature===be&&_.key?_.key:wb(),Ae={text:ae,files:ie,quote:L,passages:q};i.update(W,{text:"",files:[],quote:null,passages:[],key:je,signature:be,outgoing:Ae,sending:!0});try{await v(xe,ie.map(Re=>Re.id),je,L==null?void 0:L.id,q.map(({messageId:Re,text:ye})=>({messageId:Re,text:ye}))),i.update(W,{key:null,signature:null,outgoing:null})}catch(Re){i.update(W,ye=>x5(ye,Ae)),y(Re)}finally{i.update(W,{sending:!1})}}return S.useLayoutEffect(()=>{const P=()=>{const W=D.current,_=m==null?void 0:m.current;if(!W)return;const ae=_==null?void 0:_.scrollTop;W.style.height="auto",W.style.height=`${W.scrollHeight}px`,_&&ae!==void 0&&_.scrollTop!==ae&&_.scrollTo({top:ae,behavior:"instant"})};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[A,e,m]),o.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:P=>void I(P),onDragEnter:$,onDragOver:$,onDragLeave:P=>{P.currentTarget.contains(P.relatedTarget)||T(!1)},onDrop:K,children:[H.length+M.length>0&&o.jsxs("div",{className:"jarvy-pending-files",children:[H.map(P=>o.jsxs("span",{className:"jarvy-file-chip",children:[o.jsx(Be,{name:"paperclip"}),o.jsx("span",{title:P.name,children:P.name}),o.jsx("button",{type:"button","aria-label":x("composer.removeFile",{name:P.name}),onClick:()=>void F(P.id),children:"×"})]},P.id)),M.map(P=>o.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[o.jsx(Be,{name:"paperclip"}),o.jsx("span",{title:P.name,children:P.name}),o.jsxs("span",{className:"jarvy-file-percent",children:[Math.floor(P.done*100),"%"]}),o.jsx("button",{type:"button","aria-label":x("composer.cancelUpload",{name:P.name}),onClick:()=>{var W;return(W=R.current.get(P.key))==null?void 0:W.abort()},children:"×"}),o.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":x("composer.uploading",{name:P.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(P.done*100),children:o.jsx("span",{style:{width:`${P.done*100}%`}})})]},P.key))]}),U&&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:U.name}),o.jsx("span",{className:"jv-reply-text",children:U.text||x("common.attachment")}),o.jsx("button",{type:"button","aria-label":x("composer.cancelReply"),onClick:()=>i.update(e,{quote:null}),children:"×"})]}),o.jsx(AL,{quotes:b.passages,onRemove:P=>i.update(e,W=>({passages:W.passages.filter((_,ae)=>ae!==P)}))}),o.jsxs("div",{className:"ui-composer jv-composer",children:[u&&z.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||E||s||H.length>=5,onChange:P=>{const W=[...P.target.files??[]];P.target.value="",V(W)}})]}),o.jsx("textarea",{ref:D,id:a,rows:1,maxLength:32e3,value:A,onPaste:J,placeholder:r,disabled:s,"aria-label":x("composer.input"),onChange:P=>{Y(P.target.value),u&&z.track(P.target.value)},onKeyDown:P=>{u&&z.onKeyDown(P)||P.key==="Enter"&&!P.shiftKey&&!P.nativeEvent.isComposing&&(P.preventDefault(),I())},onClick:()=>{u&&z.track()},onBlur:u?z.leaves:void 0}),o.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":x("composer.send"),disabled:j||E||s||!A.trim()&&!H.length&&!b.passages.length,children:o.jsx(Be,{name:"arrow-up"})})]})]})}function cB({messages:e,members:a,me:i,activeQuestion:r,onSettled:s,onPreview:u,onQuote:d,onReact:f,onFold:m,onJump:v,onError:y,bot:g}){const b=l5();return o.jsx(o.Fragment,{children:e.map((j,w)=>{const k=e[w-1],C=e[w+1],T=j.role==="assistant"&&!!(C!=null&&C.question)&&C.senderId===j.senderId,M=j.folded;return o.jsxs(S.Fragment,{children:[Ng(j.createdAt,k==null?void 0:k.createdAt)&&o.jsx(c5,{time:j.createdAt}),o.jsxs("div",{className:`ui-message-row ${j.role==="user"?"ui-user":""}`,"data-message":j.id,"data-asks":T||void 0,"data-shut":M||void 0,tabIndex:-1,children:[j.role==="assistant"&&o.jsx("span",{className:"jarvy-bubble-avatar",children:o.jsx(so,{color:(g==null?void 0:g.color)??"gray",mood:g==null?void 0:g.mood,size:22,crown:g==null?void 0:g.agent})}),o.jsxs("div",{className:"jv-dm-stack",children:[s5(j,k)&&o.jsx(d0,{time:j.createdAt,className:"jv-dm-time"}),M?o.jsx("div",{className:"ui-bubble jv-folded-bubble",children:o.jsx(o5,{message:j})}):o.jsxs(o.Fragment,{children:[j.replyTo&&o.jsx(n5,{message:j,members:a,onJump:v}),j.question?o.jsx(KS,{message:{...j,question:j.question},keyboard:j.id===r,onSettled:s}):o.jsxs("div",{className:"ui-bubble",children:[j.content&&o.jsx(r5,{whole:b.has(j.id),children:o.jsx(JS,{message:j,members:a,me:i,onJump:v})}),j.attachments.length>0&&o.jsx(VS,{files:j.attachments,onOpen:E=>u(j.attachments,E)})]}),o.jsx(a5,{message:j,me:i,members:a,onReact:f,onError:y})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[o.jsx(i5,{message:j,me:i,onReply:d,onReact:f,onError:y}),o.jsx(st,{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 uB(e,a,i,r,s,u=0){const v=a.offsetWidth,y=a.offsetLeft,g=a.offsetTop,b=Math.max(300,Math.round(i*.4));e.style.maxHeight="";const j=e.hasAttribute("data-fit"),w=e.offsetHeight,k=I=>I==="left"||I==="right",C=I=>I==="left"?y-10-8:I==="right"?i-y-v-10-8:I==="below"?r-g-v-10-8:g-10-8,T=y+v/2>i/2,M=I=>j?k(I)?Math.min(b,Math.max(160,C(I))):Math.min(b,T?y+v-8:i-y-8):e.offsetWidth,E=I=>k(I)?M(I)<=C(I):Math.min(120,w)<=C(I),R=u>.05?"right":u<-.05?"left":null,A=(R==="left"||R===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(E)??(C("below")>=C("above")?"below":"above"),H=e.dataset.side,Y=H!==void 0&&H!==A&&k(H)===k(A)&&E(H)&&C(H)+40>=C(A)?H:A,z=j&&(Y==="left"||!k(Y)&&T),V=Y==="left"?y-10:Y==="right"?y+v+10:T?y+v:y;e.style.width="",e.style.maxWidth=j?`${M(Y)}px`:"",z?(e.style.left="",e.style.right=`${i-V}px`):(e.style.right="",j&&(e.style.left=`${V}px`));const F=e.offsetWidth,J=j?z?V-F:V:Y==="left"?y-10-F:Y==="right"?y+v+10:Math.min(Math.max(8,y+v-F),Math.max(8,i-F-8)),G=s&&J<s.right&&J+F>s.left?s.bottom+6:0,$=Math.min(Math.max(8,G),Math.max(8,r-140));let K;Y==="below"?(K=Math.max(8,Math.min(g+v+10,r-8-Math.min(w,120))),e.style.maxHeight=`${Math.max(40,r-K-8)}px`):Y==="above"?(e.style.maxHeight=`${Math.max(40,g-10-$)}px`,K=Math.max($,g-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,r-$-8)}px`,K=Math.min(Math.max($,g+6),Math.max($,r-e.offsetHeight-8))),j||(e.style.left=`${J}px`),e.style.top=`${K}px`,e.dataset.side=Y,e.style.setProperty("--npc-tail",k(Y)?`${Math.min(e.offsetHeight-18,Math.max(18,g+v/2-K))}px`:`${Math.min(F-18,Math.max(18,y+v/2-J))}px`)}const Sb=.06,dB=matchMedia("(prefers-reduced-motion: reduce)");function jd({text:e,limit:a,streaming:i=!1}){const[,r]=S.useState(0),s=S.useRef({text:"",count:0,rate:Sb,at:performance.now()}),u=performance.now(),d=s.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(Sb,(e.length-d.count)/a));const f=!dB.matches&&d.count<e.length;S.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 fB({className:e,children:a,onReading:i}){const r=S.useRef(null),s=S.useRef(null),u=S.useRef(i),[d,f]=S.useState(!1);return u.current=i,S.useEffect(()=>{const m=r.current,v=s.current;if(!m||!v)return;let y=!0,g=0;const b=()=>{m.scrollTop=m.scrollHeight,g=m.scrollTop},j=()=>{y&&b(),f(m.scrollTop>1)},w=()=>{const C=m.scrollHeight-m.scrollTop-m.clientHeight<4;C&&!y?(y=!0,g=m.scrollTop,u.current(!1)):!C&&y&&(m.scrollTop<g-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",w,{passive:!0}),()=>{k.disconnect(),m.removeEventListener("scroll",w),u.current(!1)}},[]),o.jsx("span",{ref:r,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:o.jsx("span",{ref:s,children:a})})}const w5={think:y8,mutter:W8,read:E8,write:F8,run:e7,script:b8,compact:h8,retry:C0,ask:Xj,say:I8,chat:Wj,tool:r7},f0=e=>x("npc.duration",{value:Li(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),hB={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function mB({view:e,name:a,cat:i,area:r,avoid:s,layout:u,facing:d,toolbar:f}){var V,F,J;const m=S.useRef(null),v=S.useRef(null),[y,g]=S.useState(!1),[,b]=S.useState(0);S.useLayoutEffect(()=>{u.current=()=>{var P;if(!m.current||!i.current||!r.current)return;const $=r.current.getBoundingClientRect(),K=s.current?s.current.getBoundingClientRect().top-$.top:$.height,I=(P=v.current)==null?void 0:P.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),uB(m.current,i.current,$.width,K,I?{left:I.left-$.left,right:I.right-$.left,bottom:I.bottom-$.top}:null,d())},u.current();const G=new ResizeObserver(()=>{var $;return($=u.current)==null?void 0:$.call(u)});for(const $ of[m.current,v.current])$&&G.observe($);return()=>{G.disconnect(),u.current=null}},[y]);const j=e.steps.some(G=>G.state==="running");S.useEffect(()=>{if(!y||!j)return;const G=setInterval(()=>b($=>$+1),200);return()=>clearInterval(G)},[y,j]),S.useEffect(()=>{if(!y)return;const G=$=>{$.key==="Escape"&&g(!1)};return addEventListener("keydown",G),()=>removeEventListener("keydown",G)},[y]);const w=(V=e.steps[0])==null?void 0:V.id;S.useEffect(()=>{g(!1)},[w]);const[k,C]=S.useState(!1),[T,M]=S.useState(!1),[E,R]=S.useState(null),D=k||T;S.useEffect(()=>{var G;R(D?((G=e.shown)==null?void 0:G.id)??null:null)},[D]);const A=E&&e.steps.find(G=>G.id===E)||e.shown,H=A?A.look:e.done?"action":null;let U=null;if((A==null?void 0:A.look)==="thought"||(A==null?void 0:A.look)==="mutter"){const G=(A.line??"").replace(/\n\s*\n\s*/g,`
|
|
556
|
+
|
|
557
|
+
`).trim(),$=o.jsx(jd,{text:G,limit:300,streaming:A.look==="thought"&&A.state==="running"},A.id),[K,I]=x("npc.mutter",{text:""}).split("");U=o.jsx(fB,{className:A.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:M,children:A.look==="thought"?$:o.jsxs(o.Fragment,{children:[K,$,I]})},A.id)}else if((A==null?void 0:A.look)==="speech")U=o.jsx("span",{className:"jv-npc-speech",children:o.jsx(jd,{text:A.line??"",limit:1500,streaming:A.state==="running"&&A.icon==="say"},A.id)});else if(A){const G=w5[A.icon];U=o.jsxs("span",{className:"jv-npc-action","data-state":A.state,children:[o.jsx(G,{}),o.jsx(jd,{text:A.title,limit:300},A.id),A.state==="running"&&o.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(U=o.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?o.jsx(Ra,{}):o.jsx(hs,{}),o.jsx(jd,{text:x(hB[e.done.outcome],{duration:f0(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const Y=e.steps.length>0,z=(A==null?void 0:A.icon)==="ask"&&A.state==="running";return S.useEffect(()=>{U||C(!1)},[!U]),o.jsxs(o.Fragment,{children:[f==null?void 0:f(v,()=>g(!1)),o.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:H??void 0,"data-kind":A==null?void 0:A.icon,"data-fading":!y&&!A&&((F=e.done)==null?void 0:F.fading)||void 0,hidden:!y&&!U,onPointerEnter:G=>{G.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:f0((e.endedAt??Date.now()+e.skew)-e.startedAt)}),o.jsx("button",{type:"button",onClick:()=>g(!1),"aria-label":x("npc.collapse"),title:x("npc.collapse"),children:o.jsx(H8,{})})]}),o.jsx("ol",{children:e.steps.map(G=>o.jsx(pB,{step:G,skew:e.skew},G.id))})]}):o.jsxs(o.Fragment,{children:[H==="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})})]}),Y?o.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>g(!0),title:x("npc.expand"),onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),g(!0))},children:U}):o.jsx("div",{className:"jv-npc-line",children:U}),z&&e.answer&&((J=A.options)==null?void 0:J.some(G=>G.value))&&o.jsx("div",{className:"jv-npc-options",children:A.options.map(G=>o.jsx("button",{type:"button",onClick:()=>e.answer(G.value),children:G.label},G.label))}),z&&!e.answer&&A.hint&&o.jsx("p",{className:"jv-npc-hint",children:A.hint})]})})]})}function pB({step:e,skew:a}){const[i,r]=S.useState(!1),s=w5[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(s,{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(Vj,{}):e.state==="ok"?o.jsx(Ra,{}):o.jsx(hs,{}),x(`npc.state.${e.state}`)]}),o.jsx("span",{className:"jv-npc-time",children:f0((e.endedAt??Date.now()+a)-e.startedAt)}),u&&o.jsx(il,{className:"jv-npc-chevron"})]}),i&&u&&o.jsx("pre",{"data-kind":e.icon,children:u})]})}const Od="src/web/thread/ThreadPane.tsx",Kd="npm run build",gB=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
|
|
558
|
+
`),vB=["> 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(`
|
|
559
|
+
`),S5={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},yB=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:Od,ms:2600,output:gB},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:Od,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
|
|
560
|
+
`)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:Kd,ms:3200,failed:!0,output:vB},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:Od,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:Kd,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
|
|
561
|
+
`)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...S5},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],h0=[{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",...S5}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:Od}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:Kd}},{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:Kd,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function xB({controls:e,onReplay:a,toolbar:i}){const[r,s]=S.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(p4,{})}),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:t8.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:()=>s(u=>!u),children:[o.jsx(K8,{}),x("npc.poses")]})]}),r&&o.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":x("npc.poses"),children:h0.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 bB={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},kb=e=>e.text?[...x(e.text)].slice(0,e.typed).join(""):"";function jB(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 Cb(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):kb(e);return{id:String(e.id),look:a,icon:bB[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:jB(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(s=>({label:x(s.label),value:s.value})):void 0,detail:e.kind==="ask"?x(e.question):e.text?kb(e):e.output}}const bp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},wB=40,Nb=6e3,Eb=500,SB={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class jp extends Error{}const kB=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...x(e.text)].length:0});function CB(e,a){const[i,r]=S.useState(bp),[s,u]=S.useState(a),[d,f]=S.useState(0),[m,v]=S.useState(null),[,y]=S.useState(0),g=S.useRef(null);S.useEffect(()=>{if(!e||m)return;let R=!0;const D=new Set,A=z=>new Promise((V,F)=>{const J=setTimeout(()=>{D.delete(J),R?V():F(new jp)},z);D.add(J)}),H=(z,V)=>r(F=>({...F,steps:F.steps.map(J=>J.id===z?{...J,...V}:J)})),U=(z,V)=>r(F=>({...F,flash:{mood:z,until:Date.now()+V}})),Y=async(z,V,F)=>{const J=[...x(V)].length,G=F?Math.max(16,F/J):wB;for(let $=1;$<=J;$++)H(z,{typed:$}),await A(G)};return(async()=>{r({...bp}),await A(700);const z=Date.now();let V="";r(J=>({...J,phase:"turn",startedAt:z}));for(const[J,G]of yB.entries()){const{ms:$,failed:K,replies:I,...P}=G,W=I?I[V]:G.text;if(r(_=>({..._,steps:[..._.steps,{...P,text:W,id:J,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),G.kind==="ask"){if(V=await new Promise(_=>{g.current=_}),g.current=null,!R)throw new jp;H(J,{state:"ok",endedAt:Date.now(),answer:G.options.find(_=>_.value===V)});continue}W?await Y(J,W,G.kind==="think"?$??null:null):await A($??1e3),(G.kind==="mutter"||G.kind==="say")&&await A(1100),H(J,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(r(_=>({..._,shake:_.shake+1})),U("dizzy",2600),await A(900))}const F=Date.now();for(r(J=>({...J,phase:"stretch",endedAt:F,recapUntil:F+Nb})),F-z>2e4&&U("happy",3200),await A(2200);;)r(J=>({...J,phase:"idle"})),await A(9e3),r(J=>({...J,phase:"groom"})),await A(2800)})().catch(z=>{if(!(z instanceof jp))throw z}),()=>{var z;R=!1;for(const V of D)clearTimeout(V);(z=g.current)==null||z.call(g,"")}},[e,d,m]),S.useEffect(()=>{var H;const R=Date.now(),D=[((H=i.flash)==null?void 0:H.until)??0,i.recapUntil-Eb,i.recapUntil].filter(U=>U>R);if(!D.length)return;const A=setTimeout(()=>y(U=>U+1),Math.min(...D)-R+20);return()=>clearTimeout(A)});const b=h0.find(R=>R.key===m)??null,j=Date.now(),w=b?null:i.phase==="turn"?[...i.steps].reverse().find(R=>R.state==="running")??null:null,k=b?b.motion:w?SB[w.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,T=i.endedAt!==null&&j<i.recapUntil,M=b?b.step?kB(b.step):null:w??(i.phase==="turn"?i.steps.at(-1)??null:null);return{...{view:{steps:i.steps.map(Cb),shown:M?Cb(M):null,startedAt:i.startedAt,endedAt:i.endedAt,skew:0,answer:R=>{var D;return(D=g.current)==null?void 0:D.call(g,R)},done:b!=null&&b.done?{ms:31400,outcome:"completed",fading:!1}:!b&&T?{ms:i.endedAt-i.startedAt,outcome:"completed",fading:j>=i.recapUntil-Eb}:null},motion:k,fast:b?!!b.fast:(w==null?void 0:w.kind)==="write"||(w==null?void 0:w.kind)==="run",mood:(b==null?void 0:b.mood)??C??s,shake:i.shake,canRecap:!b&&i.endedAt!==null&&!T,showRecap:()=>r(R=>({...R,recapUntil:Date.now()+Nb}))},controls:{pose:b,baseMood:s,setBaseMood:u,replay:()=>{v(null),f(R=>R+1)},hold:R=>{v(R),r(D=>{var A;return{...bp,shake:D.shake+((A=h0.find(H=>H.key===R))!=null&&A.shake?1:0)}})}}}}const NB=4e3,Tb={turn:null,last:null,skew:0};function EB(e,a){const i=[...e.steps];let r=e.dropped;for(const s of a)if(s.op==="step"){const u=i.findIndex(d=>d.id===s.step.id);u>=0?i[u]=s.step:i.push(s.step)}else if(s.op==="text"){const u=i.findIndex(v=>v.id===s.id),d=i[u];if(!d)continue;const f=(d.text??"")+s.append,m=Math.max(0,f.length-NB);i[u]={...d,text:f.slice(m),omitted:(d.omitted??0)+m}}else{const u=i.findIndex(d=>d.id===s.id);u>=0&&(i.splice(u,1),r++)}return{...e,steps:i,dropped:r}}function TB(e){const[a,i]=S.useState(Tb);return S.useEffect(()=>{if(i(Tb),!e)return;const r=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),s=u=>JSON.parse(u.data);return r.addEventListener("snapshot",u=>{const d=s(u);i(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),r.addEventListener("start",u=>{const{turn:d}=s(u);i(f=>({...f,turn:d}))}),r.addEventListener("patch",u=>{const{patches:d}=s(u);i(f=>f.turn?{...f,turn:EB(f.turn,d)}:f)}),r.addEventListener("end",u=>{const{outcome:d,endedAt:f}=s(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"]),Mi=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",Sp=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",AB=e=>{const a=(e??"").split(`
|
|
562
|
+
`)[0].trim();return a.length>40?`${a.slice(0,39)}…`:a},Ab=e=>e.type==="channel"?`#${e.title}`:e.title;function kp(e){return e?e.omitted?`${e.head}
|
|
563
|
+
${x("npc.live.omitted",{count:Li(e.omitted)})}
|
|
564
|
+
${e.tail}`:e.head+e.tail:""}const _b=e=>e.omitted?`${x("npc.live.omitted",{count:Li(e.omitted)})}
|
|
565
|
+
`:"";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 _B(e,a,i){const r={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:a},s=(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:_b(e)+(e.text??"")};case"text":return{...r,look:"mutter",icon:"mutter",title:x("npc.step.mutter"),line:e.text??"",detail:_b(e)+(e.text??"")};case"compaction":return s("compact",x(`npc.live.compact.${Mi(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?x("npc.live.tokens",{before:Li(e.tokensBefore),after:Li(e.tokensAfter)}):kp(e.output));case"retry":return s("retry",e.state==="running"?x("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):x(`npc.live.retry.${Mi(e)}`),kp(e.output))}const u=e.input??{},d=kp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
|
|
566
|
+
|
|
567
|
+
`);switch(e.tool){case"read":return s("read",x(`npc.live.read.${Mi(e)}`,{target:Sp(u.path)}),f);case"edit":return s("write",x(`npc.live.edit.${Mi(e)}`,{target:Sp(u.path)}),f);case"write":return s("write",x(`npc.live.write.${Mi(e)}`,{target:Sp(u.path)}),f);case"bash":return s("run",x(`npc.live.run.${Mi(e)}`,{target:AB(u.command)}),f);case"codemode":return s("script",x(`npc.live.script.${Mi(e)}`),f);case"chat":return MB(e,r,i,d);default:return s("tool",x(`npc.live.tool.${Mi(e)}`,{tool:e.tool??""}),f)}}function MB(e,a,i,r){const s=e.input??{},u=s.action??"",d=s.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==i)?Ab(d):void 0;if(u==="messages.send")return{...a,look:"speech",icon:"say",to:f,line:s.text??"",detail:[s.text,e.state==="failed"?r:""].filter(Boolean).join(`
|
|
568
|
+
|
|
569
|
+
`),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=RB(e);return{...a,look:"speech",icon:"ask",to:f,line:s.text??"",options:(s.options??[]).map(g=>({label:g})),hint:f?x("npc.live.answerIn",{chat:f}):x("npc.live.answerBelow"),detail:[s.text,...(s.options??[]).map(g=>`· ${g}`),r].filter(Boolean).join(`
|
|
570
|
+
`),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.${Mi(e)}`),detail:r};const m=d?Ab(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.${Mi(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 RB(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 Mb(e,a){const i=new Map(e.steps.map(s=>[s.id,s.parentId])),r=s=>{let u=0,d=s.parentId;for(;d&&u<4;)u++,d=i.get(d)??null;return u};return e.steps.map(s=>_B(s,r(s),a))}function wd(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 DB=4e3,Rb=1500;function Db(e,a,i,r){var j;const s=w=>w-i;let u=null;for(const w of e)w.state==="running"&&(!u||w.startedAt>=u.startedAt)&&(u=w);const d=[];for(const w of e.filter(k=>k.state!=="running"&&k.endedAt!==null&&wd(k).firm).sort((k,C)=>k.endedAt-C.endedAt)){const k=s(w.endedAt),C=d.at(-1);C&&w.look==="speech"&&(C.end=Math.min(C.end,Math.max(C.start+Rb,k)));const T=Math.max(k,(C==null?void 0:C.end)??0);T-k>DB||d.push({step:w,start:T,end:T+wd(w).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const w=s(f.startedAt);for(let k=d.length-1;k>=0;k--){const C=d[k];C.start>=w&&C.start>a?d.splice(k,1):C.end>w&&(C.end=Math.max(C.start+Rb,w))}}let m=null;for(const w of e){if(w.state==="running"||w.endedAt===null||!wd(w).light)continue;const k=s(w.endedAt)+wd(w).light;k>a&&(!m||w.endedAt>=m.step.endedAt)&&(m={step:w,end:k})}const v=d.find(w=>w.start<=a&&a<w.end),y=(v==null?void 0:v.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),g=y??f??u??(r?e.at(-1)??null:null),b=[...d.flatMap(w=>[w.start,w.end]),(m==null?void 0:m.end)??0].filter(w=>w>a);return{shown:g,lingering:!!y,next:b.length?Math.min(...b):0,wordsEnd:((j=d.at(-1))==null?void 0:j.end)??0}}const Ob=6e3,zb=500,Lb=2200,OB=2e4,zB=10*6e4,Bb=3e4,LB=2e4,BB=2800;function IB(e,a,i,r,s){var V;const{turn:u,last:d,skew:f}=TB(e),[m,v]=S.useState(null),[y,g]=S.useState(0),[b,j]=S.useState(0),[,w]=S.useState(0),k=S.useRef(new Set),C=S.useRef(Date.now()),T=S.useMemo(()=>u?Mb(u,a):d?Mb(d,a):[],[u,d,a]);S.useEffect(()=>{for(const F of(u==null?void 0:u.steps)??[])F.state==="failed"&&!k.current.has(F.id)&&(k.current.add(F.id),g(J=>J+1),v({mood:"dizzy",until:Date.now()+2600}))},[u]),S.useEffect(()=>{d&&(k.current.clear(),C.current=Date.now(),j(Math.max(Date.now(),Db(T,Date.now(),f,!1).wordsEnd)+Ob),d.outcome==="completed"&&d.endedAt-d.startedAt>OB&&v({mood:"happy",until:Date.now()+3200}))},[d]),S.useEffect(()=>{u&&(C.current=Date.now())},[u!==null]);const M=Date.now(),E=Db(T,M,f,u!==null),R=E.shown,D=T.filter(F=>F.state==="running").sort((F,J)=>J.startedAt-F.startedAt)[0],A=!u&&(d==null?void 0:d.outcome)==="completed"&&M+f-d.endedAt<Lb,H=M-C.current,U=!u&&(i==null?void 0:i.status)==="idle"&&H>Bb&&(H-Bb)%LB<BB,Y=D&&D.look!=="thought"?Cp(D):E.lingering&&R?Cp(R):D?Cp(D):u?{motion:"think",fast:!1}:A?{motion:"stretch",fast:!1}:U?{motion:"groom",fast:!1}:s,z=!u&&!R&&d!==null&&M<b;return S.useEffect(()=>{const F=[(m==null?void 0:m.until)??0,b-zb,b,((d==null?void 0:d.endedAt)??0)-f+Lb,E.next].filter(G=>G>Date.now()),J=setTimeout(()=>w(G=>G+1),F.length?Math.min(...F)-Date.now()+20:1e3);return()=>clearTimeout(J)}),{view:{steps:T,shown:R,skew:f,startedAt:((V=u??d)==null?void 0:V.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:z?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:M>=b-zb}:null},motion:Y.motion,fast:Y.fast,mood:m&&m.until>M?m.mood:r,shake:y,canRecap:!u&&d!==null&&!z&&M+f-d.endedAt<zB,showRecap:()=>j(Date.now()+Ob)}}const k5="jarvy-floating-bot",as=10,PB=4,Sd=new URLSearchParams(location.search).get("npc")==="demo";function HB(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 UB(){try{const e=JSON.parse(localStorage.getItem(k5)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function qB({bot:e,chatId:a,status:i,area:r,avoid:s,onOpen:u}){const d=S.useRef(null),f=S.useRef(null),m=S.useRef(UB()),v=S.useRef(null),y=S.useRef(!1),g=S.useRef(null),b=S.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),j=S.useRef(null),[w,k]=S.useState(!1),C=S.useRef(null),T=CB(Sd,e.mood),M=IB(Sd?null:e.id,a,i,e.mood,HB(i)),E=Sd?T:M;b.current.motion=E.motion,b.current.fast=E.fast,b.current.mood=E.mood;function R(){const U=r.current.getBoundingClientRect(),Y=d.current.offsetWidth,z=s.current?s.current.getBoundingClientRect().top-U.top:U.height,V=Math.max(as,U.width-Y-as),F=Math.max(as,z-Y-as);return{minX:as,minY:as,maxX:V,maxY:F}}function D(){var V;const U=(V=r.current)==null?void 0:V.getBoundingClientRect(),Y=d.current;if(!U||!Y)return 0;const z=U.width/2-Y.offsetWidth/2;return z>0?Math.max(-1,Math.min(1,(z-Y.offsetLeft)/z)):0}function A(){var z;if(!d.current||!r.current)return;const U=R(),Y=d.current;Y.style.left=`${U.minX+m.current.x*(U.maxX-U.minX)}px`,Y.style.top=`${U.minY+m.current.y*(U.maxY-U.minY)}px`,(z=C.current)==null||z.call(C)}S.useLayoutEffect(()=>{A();const U=new ResizeObserver(A);for(const Y of[r.current,s.current,d.current])Y&&U.observe(Y);return()=>U.disconnect()},[]),S.useEffect(()=>{var U;(U=j.current)==null||U.setColor(($a[e.color]??$a.gray).hex)},[e.color]),S.useEffect(()=>{var U;(U=j.current)==null||U.setCrown(e.agent)},[e.agent]);const H=i!=null&&i.error?`${i.runId??""}:${i.error}`:null;return S.useEffect(()=>{var U;H&&((U=j.current)==null||U.shake(performance.now()))},[H]),S.useEffect(()=>{var U;E.shake&&((U=j.current)==null||U.shake(performance.now()))},[E.shake]),S.useEffect(()=>{const U=V=>{(V.pointerType==="mouse"||V.type==="pointerdown")&&(g.current={x:V.clientX,y:V.clientY})},Y=V=>{V.relatedTarget||(g.current=null)},z=V=>{const F=V.target;if(F.id!=="jarvy-composer")return;const J=F.getBoundingClientRect();g.current={x:J.left+J.width/2,y:J.top+J.height/2}};return window.addEventListener("pointermove",U),window.addEventListener("pointerdown",U),document.addEventListener("pointerout",Y),document.addEventListener("input",z),document.addEventListener("focusin",z),()=>{window.removeEventListener("pointermove",U),window.removeEventListener("pointerdown",U),document.removeEventListener("pointerout",Y),document.removeEventListener("input",z),document.removeEventListener("focusin",z)}},[]),S.useEffect(()=>{let U=!0,Y=0,z=()=>{};const V=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([Yd(()=>import("./three.module-BdMZo7zQ.js"),[]),Yd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([F,J])=>{if(!U||!f.current)return;const G=new F.WebGLRenderer({canvas:f.current,antialias:!0,alpha:!0});J.configureRenderer(F,G);const{scene:$,camera:K}=J.createStage(F),I=new J.CatFigure(F,($a[e.color]??$a.gray).hex);I.setCrown(e.agent),I.pose(b.current.mood),$.add(I.root),J.frameCamera(K,1,3.3),j.current=I;let P=0;const W=ae=>{var L;const ie=d.current;if(ie){const q=Math.round(ie.offsetWidth*Math.min(2,devicePixelRatio||1));q!==P&&(P=q,G.setSize(q,q,!1));const ue=ie.getBoundingClientRect(),xe=g.current;b.current.lookX=xe?Math.max(-1,Math.min(1,(xe.x-ue.left-ue.width/2)/320)):0,b.current.lookY=xe?Math.max(-1,Math.min(1,(xe.y-ue.top-ue.height/2)/320)):0,b.current.reduced=V.matches;const be=b.current.motion,je=!!((L=v.current)!=null&&L.moved)&&(be==="idle"||be==="groom"||be==="stretch");(b.current.faceX===void 0||!(je||be==="sleep"))&&(b.current.faceX=D()),I.frame(ae,b.current),G.render($,K)}Y=requestAnimationFrame(W)},_=()=>{cancelAnimationFrame(Y),document.hidden||(Y=requestAnimationFrame(W))};document.addEventListener("visibilitychange",_),_(),k(!0),z=()=>{document.removeEventListener("visibilitychange",_),cancelAnimationFrame(Y),I.dispose(),G.dispose(),G.forceContextLoss(),j.current=null}}).catch(()=>{}),()=>{U=!1,z()}},[]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":w||void 0,"data-motion":E.motion,title:e.name,"aria-label":x("avatar.openInfo",{name:e.name}),onPointerDown:U=>{if(U.button!==0)return;const Y=U.currentTarget;Y.setPointerCapture(U.pointerId),v.current={id:U.pointerId,x:U.clientX,y:U.clientY,left:Y.offsetLeft,top:Y.offsetTop,moved:!1}},onPointerMove:U=>{const Y=v.current;if(!Y||Y.id!==U.pointerId)return;const z=U.clientX-Y.x,V=U.clientY-Y.y;if(!Y.moved&&Math.hypot(z,V)<PB)return;Y.moved=!0;const F=R(),J=Math.min(F.maxX,Math.max(F.minX,Y.left+z)),G=Math.min(F.maxY,Math.max(F.minY,Y.top+V));m.current={x:F.maxX>F.minX?(J-F.minX)/(F.maxX-F.minX):0,y:F.maxY>F.minY?(G-F.minY)/(F.maxY-F.minY):0},A()},onPointerUp:U=>{const Y=v.current;!Y||Y.id!==U.pointerId||(v.current=null,y.current=Y.moved,Y.moved&&localStorage.setItem(k5,JSON.stringify(m.current)))},onPointerCancel:()=>{v.current=null},onClick:()=>{if(y.current){y.current=!1;return}E.canRecap?E.showRecap():u()},style:{"--jv-avatar-size":"100%"},children:[o.jsx("canvas",{ref:f,"aria-hidden":"true"}),!w&&o.jsx(so,{color:e.color,mood:e.mood,size:88,crown:e.agent})]}),o.jsx(mB,{view:E.view,name:e.name,cat:d,area:r,avoid:s,layout:C,facing:D,toolbar:Sd?(U,Y)=>o.jsx(xB,{controls:T.controls,toolbar:U,onReplay:()=>{Y(),T.controls.replay()}}):void 0})]})}function FB({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 VB({className:e,...a}){return o.jsx("div",{"data-slot":"card-header",className:an("grid gap-1 px-5",e),...a})}function $B({className:e,...a}){return o.jsx("div",{"data-slot":"card-title",className:an("font-semibold leading-none",e),...a})}function GB({className:e,...a}){return o.jsx("div",{"data-slot":"card-content",className:an("px-5",e),...a})}function YB({bot:e,connections:a,onSaved:i,onManage:r}){return o.jsxs(FB,{className:"jarvy-model-picker jv-ui",children:[o.jsx(VB,{children:o.jsx($B,{children:x("botModel.pickFor",{name:e.name})})}),o.jsx(GB,{children:o.jsx(DS,{bot:e,connections:a,onSaved:i,onManage:r})})]})}function XB({chat:e,inChannel:a,bots:i,members:r,meId:s,drafts:u,composeReady:d,botName:f,activeBot:m,status:v,connections:y,activity:g,history:b,divider:j,activeQuestion:w,pane:k,onPane:C,onToggleInfo:T,find:M,onNav:E,onBot:R,hasBotDirects:D,onInvite:A,onQuote:H,onReply:U,onReact:Y,onFold:z,onJump:V,onSettled:F,onSend:J,onPreview:G,onSaveNote:$,notice:K,createBot:I,creating:P,updateBot:W,onManageModels:_,error:ae,chatArea:ie,transcript:L,composeWrap:q,hidden:ue,onOpenThread:xe}){const{messages:be,loading:je,hasOlder:Ae,loadingOlder:Re,top:ye,away:Q,unseen:he,toLatest:ke}=b;return o.jsxs("main",{className:"ui-chat","aria-label":x("chat.area"),ref:ie,hidden:ue,children:[!a&&o.jsx(st,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:x("common.openNav"),onClick:E}),!a&&D&&o.jsx(st,{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?"":g}),e?o.jsxs(o.Fragment,{children:[a?o.jsx(IL,{chat:e,members:si(r),bots:i,onNav:E,infoOpen:(k==null?void 0:k.kind)==="info"&&k.page==="main",onInfo:()=>T("main"),membersOpen:(k==null?void 0:k.kind)==="info"&&k.page==="members",onMembers:()=>T("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(qB,{bot:m,chatId:e.id,status:v,area:ie,avoid:q,onOpen:()=>R(m.id)}),a&&o.jsx(PL,{chat:e,onSave:$}),o.jsxs("div",{className:`ui-transcript jarvy-transcript${a?" jv-channel-transcript":""}`,ref:L,"aria-label":x("chat.transcript"),role:"log",children:[!a&&!(m!=null&&m.connectionId)&&m&&o.jsx("div",{className:"jarvy-model-onboarding",children:o.jsx(YB,{bot:m,connections:y,onSaved:W,onManage:_})}),je?o.jsx("p",{className:"jarvy-empty-text",children:x("chat.loading")}):be.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:[Ae&&o.jsx("div",{ref:ye,className:"jv-history-more","aria-live":"polite",children:Re?x("chat.loadingOlder"):""}),a?o.jsx(Xd,{messages:be,members:r,bots:i,me:s,divider:j,activeQuestion:w,onSettled:F,onPreview:G,onReply:U,onOpenThread:xe,onQuote:H,onReact:Y,onFold:z,onJump:V,onError:ae}):o.jsx(cB,{messages:be,members:r,me:s,activeQuestion:w,bot:m,onSettled:F,onPreview:G,onQuote:H,onReact:Y,onFold:z,onJump:V,onError:ae})]}),Q&&be.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button",onClick:ke,"aria-label":x("chat.toLatest"),children:[he>0&&o.jsx("span",{children:x("chat.unseen",{count:he})}),o.jsx(Be,{name:"chevron-down"})]})})]}),o.jsx(j5,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:q,scrollRef:L,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:si(r).filter(Ee=>Ee.id!==s&&e.memberIds.includes(Ee.id)),outside:si(r).filter(Ee=>!e.memberIds.includes(Ee.id)),onInvite:Ee=>A(e.id,Ee)}:void 0,onSend:J,onError:ae,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:I,disabled:P,children:[o.jsx(Be,{name:"person-add"}),x("sidebar.newBot")]})}),e&&o.jsx(t5,{container:L,drafts:u,chatId:e.id,source:Ee=>be.find(Ie=>Ie.id===Ee),members:r,onNotice:K})]})}const KB=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function QB(e,a){const[i,r]=S.useState([]);return S.useEffect(()=>{if(r([]),!e)return;let s=!0;return fe.botDirects(e).then(u=>{s&&r(u.chats)}).catch(()=>{}),()=>{s=!1}},[e,a]),i}function ZB({bot:e,chats:a,members:i,bots:r,me:s,tick:u,onClose:d,onPreview:f,onError:m}){const[v,y]=S.useState(null),[g,b]=S.useState(null);S.useEffect(()=>{if(b(null),!v)return;let k=!0;return fe.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)),w=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:[w&&o.jsx(st,{icon:"chevron-left",label:x("directs.back"),onClick:()=>y(null)}),o.jsx("strong",{children:w?x("directs.between",{name:e.name,other:Hi(j(w))}):x("chat.botDms",{name:e.name})}),o.jsx("span",{className:"jv-spacer"}),o.jsx(st,{icon:"close",label:x("common.close"),onClick:d})]}),w?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ui-pane-body jv-pane-body",children:g===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):g.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("chat.empty")}):o.jsx(Xd,{messages:g,members:i,bots:r,me:s,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(Cr,{member:C,bots:r,size:20}),o.jsx("strong",{children:Hi(C)}),o.jsx("span",{className:"jv-muted",children:KB(k.updatedAt)})]}),k.lastMessage&&o.jsx("span",{className:"jv-muted jv-thread-item-meta",children:bs(k.lastMessage)})]},k.id)})})]})}function JB(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:QS(a.activity),tone:"busy"}:{label:x((a==null?void 0:a.status)==="idle"?"activity.idle":"activity.stopped")}:{label:x("activity.noModel")}}function WB({channel:e,members:a,bots:i,statuses:r,me:s,onAdd:u,onBot:d,onChanged:f,onError:m}){const[v,y]=S.useState(null),g=a.filter(k=>e.memberIds.includes(k.id)),b=g.filter(k=>k.kind!=="bot").sort((k,C)=>+(C.id===s)-+(k.id===s)),j=g.filter(k=>k.kind==="bot"),w=k=>{const C=k.kind==="bot"?i.find(R=>R.id===k.id):void 0,T=r[k.id],M=k.kind==="bot"?JB(C,T):void 0,E=o.jsxs(o.Fragment,{children:[o.jsx(Cr,{member:k,bots:i,size:28,working:(T==null?void 0:T.status)==="running"&&T.activity!=="asking"}),o.jsxs("span",{className:"jv-member-name",children:[k.name,k.id===s&&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:E}):o.jsx("div",{className:"jv-member-main",children:E}),k.id!==s&&o.jsx(st,{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:g.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,T])=>T.length>0&&o.jsxs("section",{className:"jv-member-group","aria-label":C,children:[o.jsxs("h3",{children:[C," · ",T.length]}),T.map(w)]},k))}),v&&o.jsx(f5,{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 fe.removeMember(e.id,v.id)),y(null)}catch(k){m(k)}}})]})}function Ib({label:e,value:a,empty:i,maxLength:r,required:s=!1,onSave:u}){const d=S.useId(),[f,m]=S.useState(null),[v,y]=S.useState(!1);S.useEffect(()=>m(null),[a]);const g=async()=>{if(!(f===null||v||s&&!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(st,{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(),g()),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||s&&!f.trim(),onClick:()=>void g(),children:x("common.save")})]})]})}function eI({channel:e,page:a,sections:i,members:r,bots:s,statuses:u,me:d,onPage:f,onPin:m,onMute:v,onAdd:y,onBot:g,onDelete:b,onChanged:j,onClose:w,onError:k}){const C=S.useId(),T=async E=>{try{j(await fe.updateChannel(e.id,E))}catch(R){throw k(R),R}},M=r.filter(E=>e.memberIds.includes(E.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(st,{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(st,{icon:"close",label:x("common.close"),onClick:w})]}),a==="members"?o.jsx(WB,{channel:e,members:r,bots:s,statuses:u,me:d,onAdd:y,onBot:g,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(Ib,{label:x("info.name"),value:e.title,empty:x("info.newChannel"),maxLength:80,required:!0,onSave:E=>T({name:E})}),o.jsx(Ib,{label:x("info.topic"),value:e.topic,empty:x("info.noTopic"),maxLength:200,onSave:E=>T({topic:E})}),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(BS,{id:C,value:e.sectionId,sections:i,onChange:E=>void T({sectionId:E}).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 tI({chat:e,chats:a,members:i,focusKey:r,onOpenMessage:s,onClose:u,onError:d}){const[f,m]=S.useState(""),v=S.useRef(null);S.useEffect(()=>{var j,w;(j=v.current)==null||j.focus(),(w=v.current)==null||w.select()},[r,e.id]);const{result:y,loading:g}=h5(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(st,{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:w})=>o.jsx(g5,{message:j,chat:w,chats:a,members:i,query:f,showPlace:w.id!==e.id,onOpen:s},j.id))]}):o.jsx("p",{className:"jv-result-empty",children:x("search.noMessages")}):g&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")}):o.jsx("p",{className:"jv-result-empty",children:x("search.prompt")})})]})}const nI=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function aI({chat:e,channelName:a,expanded:i=!1,onTitle:r,onStatus:s,onSummary:u,onConclude:d}){var E;const[f,m]=S.useState(null),[v,y]=S.useState(null),[g,b]=S.useState(!1),[j,w]=S.useState(i);S.useEffect(()=>{m(null),y(null),w(i)},[e.id,i]);const k=async(R,D)=>{b(!0);try{await R(),D()}catch{}finally{b(!1)}},C=e.status==="done",T=e.note,M=((E=T==null?void 0:T.text.split(`
|
|
571
|
+
`).find(R=>R.trim()&&!R.startsWith("#")))==null?void 0:E.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(st,{icon:"pencil",label:x("thread.rename"),onClick:()=>m(e.title)})]}):o.jsxs("form",{className:"jv-inline-edit",onSubmit:R=>{R.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:R=>m(R.target.value),onKeyDown:R=>{R.key==="Escape"&&m(null)}}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:g||!f.trim(),children:x("common.save")})]}),o.jsx("button",{type:"button",className:"jv-thread-status","data-done":C||void 0,disabled:g,title:x("thread.toggleStatus"),onClick:()=>void k(()=>s(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:R=>y(R.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:g||!v.trim(),onClick:()=>void k(()=>u(v.trim()),()=>y(null)),children:x("common.save")})]})]}):T?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:()=>w(!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:[T.updatedBy.name," · ",nI(T.updatedAt)," · ",x("notice.version",{version:T.version})]}),o.jsx(st,{icon:"pencil",label:x("thread.editSummary"),onClick:()=>y(T.text)})]}),j&&o.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:o.jsx(Fc,{text:T.text})}),j&&!C&&o.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:g,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 Pb({threadId:e,mode:a,showSummary:i=!1,focus:r,onSearch:s,channel:u,drafts:d,members:f,bots:m,me:v,tick:y,onClose:g,onToggleMode:b,onNav:j,onChanged:w,onInvite:k,onPreview:C,onError:T,onNotice:M}){const[E,R]=S.useState(null),[D,A]=S.useState(null),[H,U]=S.useState([]),[Y,z]=S.useState(null),V=S.useRef(H);V.current=H;const F=S.useRef(null),J=S.useRef(null),G=S.useRef(null),$=S.useRef(!1),K=S.useRef(!0),[I,P]=S.useState(!1),W=S.useRef(0),_=S.useRef(0);S.useEffect(()=>{R(null),A(null),U([]),z(null),$.current=!1,K.current=!0,P(!1),W.current=0,_.current=0},[e]),S.useEffect(()=>{let Q=!0;return Promise.all([fe.chat(e),fe.messages(e)]).then(async([he,ke])=>{if(Q&&(R(he),U(ke.messages),G.current!==e&&(G.current=e,z(he.readSequence)),he.rootMessageId)){const Ee=await fe.message(he.rootMessageId);Q&&A(Ee)}}).catch(he=>{Q&&T(he)}),()=>{Q=!1}},[e,y]),S.useLayoutEffect(()=>{const Q=F.current;if(!Q||!E)return;const he=()=>Q.scrollTo({top:Q.scrollHeight,behavior:"instant"}),ke=H.at(-1),Ee=(ke==null?void 0:ke.senderId)===v&&ke.sequence>_.current;if(_.current=Math.max(_.current,(ke==null?void 0:ke.sequence)??0),$.current)(K.current||Ee)&&Q.scrollTo({top:Q.scrollHeight,behavior:"smooth"});else{if(!H.length&&!D)return;$.current=!0;const Ie=r?Q.querySelector(`[data-message="${r.id}"]`):null;if(Ie){if(K.current=!1,Ie.scrollIntoView({block:"center"}),r!=null&&r.passage&&WS(Ie,r.passage))return;Ie.classList.add("jv-jump"),setTimeout(()=>Ie.classList.remove("jv-jump"),1600);return}he(),requestAnimationFrame(he)}(K.current||Ee)&&(W.current=(ke==null?void 0:ke.sequence)??0)},[H,D,E]),S.useEffect(()=>{$.current&&r&&q(r.id,r.passage)},[r]),S.useEffect(()=>{const Q=F.current,he=J.current;if(!Q||!he)return;const ke=new ResizeObserver(()=>{!$.current||!K.current||Q.scrollHeight-Q.scrollTop-Q.clientHeight<8||Q.scrollTo({top:Q.scrollHeight,behavior:"instant"})});ke.observe(he);const Ee=()=>{var Ie;K.current=Q.scrollHeight-Q.scrollTop-Q.clientHeight<120,K.current&&(W.current=Math.max(W.current,((Ie=V.current.at(-1))==null?void 0:Ie.sequence)??0)),P(!K.current)};return Ee(),Q.addEventListener("scroll",Ee,{passive:!0}),()=>{ke.disconnect(),Q.removeEventListener("scroll",Ee)}},[F.current,e,E]),S.useEffect(()=>{const Q=H.at(-1);if(!E||!Q||Q.chatId!==E.id)return;const he=()=>{if(document.visibilityState!=="visible"||E.readSequence>=Q.sequence)return;const ke={...E,readSequence:Q.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};R(ke),fe.markRead(E.id,Q.sequence).then(()=>w(ke)).catch(T)};return he(),document.addEventListener("visibilitychange",he),()=>document.removeEventListener("visibilitychange",he)},[H,E]);const ae=async Q=>{try{const he=await Q();R(he),w(he)}catch(he){throw T(he),he}},ie=async(Q,he,ke)=>{try{const Ee=await fe.react(Q.id,he,ke),Ie=Ye=>Ye.id===Ee.id?{...Ye,reactions:Ee.reactions}:Ye;U(Ye=>Ye.map(Ie)),A(Ye=>Ye&&Ie(Ye))}catch(Ee){T(Ee)}},L=async(Q,he)=>{try{const ke=await fe.fold(Q.id,he),Ee=Ie=>Ie.id===ke.id?{...Ie,folded:ke.folded}:Ie;U(Ie=>Ie.map(Ee)),A(Ie=>Ie&&Ee(Ie))}catch(ke){T(ke)}},q=(Q,he)=>{var Ee;const ke=Q&&((Ee=F.current)==null?void 0:Ee.querySelector(`[data-message="${Q}"]`));if(!ke){M(x(Q?"thread.sourceElsewhere":"app.sourceGone"));return}e5(ke,he)},ue={onQuote:Q=>b5(d,Q,f),onReact:ie,onFold:L,onJump:q,onError:T},xe=async(Q,he,ke,Ee,Ie=[],Ye=!1)=>{await fe.send(e,Q,he,ke,Ye,Ee,Ie);const Ke=u?[...new Set(kg(Q,si(f)).filter(gt=>!u.memberIds.includes(gt.member.id)).map(gt=>gt.member.name))]:[];Ke.length&&M(x("app.notInChannel",{names:Ke.join(x("common.listSeparator")),count:Ke.length})),Promise.all([fe.chat(e),fe.messages(e)]).then(([gt,rn])=>{R(gt),U(rn.messages),w(gt)}).catch(T)},be=(u==null?void 0:u.title)??x("search.channel"),je=f.find(Q=>Q.id===(D==null?void 0:D.senderId)),Ae=I?H.filter(Q=>Q.sequence>W.current&&Q.senderId!==v).length:0,Re=a==="pane"?"aside":a==="embed"?"section":"main",ye=new Set([...D?[D.senderId,...D.mentions]:[],...H.flatMap(Q=>[Q.senderId,...Q.mentions])]);return ye.delete(v),o.jsxs(Re,{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:Q=>{E&&s&&(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="f"&&(Q.preventDefault(),s(E))},children:[o.jsxs("header",{className:a==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[a==="full"&&o.jsx(st,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:j}),a==="embed"&&o.jsx(st,{icon:"chevron-left",className:"ui-mobile-only",label:x("thread.backToList"),onClick:g}),a==="full"?o.jsxs("button",{type:"button",className:"jv-crumb",onClick:g,children:[o.jsx(Be,{name:"chevron-left"}),o.jsx("span",{className:"jv-hash",children:"#"}),be]}):a==="embed"?o.jsxs("button",{type:"button",className:"jv-crumb",title:x("thread.inChannel"),onClick:b,children:[o.jsx("span",{className:"jv-hash",children:"#"}),be]}):o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:x("thread.label")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",be]})]}),o.jsx("span",{className:"jv-spacer"}),E&&s&&o.jsx(st,{icon:"search",label:x("thread.search"),onClick:()=>s(E)}),E&&o.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":E.following||void 0,title:x(E.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void ae(()=>fe.follow(e,!E.following)).catch(()=>{}),children:[o.jsx(Be,{name:"bell"}),x(E.following?"threads.following":"thread.follow")]}),a!=="embed"&&o.jsx(st,{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(st,{icon:"close",label:x("thread.close"),onClick:g})]}),E&&o.jsx("div",{className:a==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:o.jsx(aI,{chat:E,channelName:be,expanded:i,onTitle:Q=>ae(()=>fe.updateThread(e,{title:Q})),onStatus:Q=>ae(()=>fe.updateThread(e,{status:Q})),onSummary:Q=>ae(()=>fe.setNote(e,Q)),onConclude:async()=>{var Q;try{await xe(`${x("thread.conclusion")}
|
|
572
|
+
|
|
573
|
+
${((Q=E.note)==null?void 0:Q.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),he=>he.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await ae(()=>fe.updateThread(e,{status:"done"})),M(x("thread.concluded",{channel:be}))}catch(he){throw T(he),he}}})}),o.jsxs("div",{ref:F,className:a==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[o.jsxs("div",{ref:J,children:[D&&o.jsx(Xd,{messages:[{...D,thread:null}],members:f,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:ie,onFold:L,onJump:q,onError:T}),o.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:o.jsx("span",{children:H.length?x("channel.replies",{count:H.length}):x("thread.noReplies")})}),o.jsx(Xd,{messages:H,members:f,bots:m,me:v,divider:Y??Number.MAX_SAFE_INTEGER,before:D==null?void 0:D.createdAt,onSettled:Q=>U(he=>he.map(ke=>ke.id===Q.id?Q:ke)),onPreview:C,...ue})]}),I&&H.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button","aria-label":x("thread.toLatest"),onClick:()=>{var Q;return(Q=F.current)==null?void 0:Q.scrollTo({top:F.current.scrollHeight,behavior:"smooth"})},children:[Ae>0&&o.jsx("span",{children:x("chat.unseen",{count:Ae})}),o.jsx(Be,{name:"chevron-down"})]})})]}),o.jsx(j5,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:x("thread.reply"),scrollRef:F,disabled:!E,initialText:H.length===0&&D&&D.senderId!==v&&je&&!je.deleted?`@${je.name} `:void 0,mention:{bots:m,inside:si(f).filter(Q=>Q.id!==v&&!!(u!=null&&u.memberIds.includes(Q.id))),outside:si(f).filter(Q=>!(u!=null&&u.memberIds.includes(Q.id))),onInvite:k,participants:ye},onSend:xe,onError:T,onNotice:M}),o.jsx(t5,{container:F,drafts:d,chatId:e,members:f,onNotice:M,source:Q=>Q===(D==null?void 0:D.id)?D:H.find(he=>he.id===Q)})]})}const Np={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},kd=e=>e.lastReplyAt??e.createdAt;function C5(e,a){const i=a==="created"?(r,s)=>s.createdAt-r.createdAt:a==="status"?(r,s)=>+(r.status==="done")-+(s.status==="done")||kd(s)-kd(r):(r,s)=>kd(s)-kd(r);return[...e].sort(i)}function N5(e){const a=`jarvy-thread-sort-${e}`,[i,r]=S.useState(()=>{const s=localStorage.getItem(a);return s==="created"||s==="status"?s:"updated"});return[i,s=>{r(s),localStorage.setItem(a,s)}]}function E5({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(m8,{}),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 T5=e=>ua(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function iI({channel:e,members:a,bots:i,tick:r,onOpen:s,onClose:u,onError:d}){const[f,m]=S.useState(null),[v,y]=S.useState("open"),[g,b]=N5("channel");S.useEffect(()=>{let k=!0;return fe.channelThreads(e.id).then(C=>{k&&m(C.threads)}).catch(C=>{k&&d(C)}),()=>{k=!1}},[e.id,r]);const j=C5((f??[]).filter(k=>v==="all"||k.status===v),g),w=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(E5,{value:g,onChange:b}),o.jsx(st,{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:w("open")})],["done",x("threads.doneCount",{count:w("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(T=>{var M;return T.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:()=>s(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(Cr,{member:C,bots:i,size:16}),o.jsx("span",{children:bs(k.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[x("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${T5(k.lastReplyAt)}`:"",k.following?` · ${x("threads.following")}`:""]})]},k.id)})})]})}function rI({threads:e,chats:a,members:i,bots:r,onNav:s,renderThread:u}){const[d,f]=S.useState(e),[m,v]=S.useState(null),[y,g]=S.useState("all"),[b,j]=N5("followed");S.useEffect(()=>f(M=>[...e,...M.filter(E=>!e.some(R=>R.id===E.id)).map(E=>({...E,following:!1,unread:0,alerts:0}))]),[e]);const w=C5(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),T=M=>d.filter(E=>E.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(st,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:s}),o.jsx("strong",{className:"jv-channel-title",children:x("sidebar.followed")})]}),o.jsx(E5,{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:T("open")})],["done",x("threads.doneCount",{count:T("done")})]].map(([M,E])=>o.jsx("button",{type:"button",role:"tab","aria-selected":y===M,onClick:()=>g(M),children:E},M))}),o.jsx("div",{className:"jv-followed-items",children:w.length===0?o.jsx("p",{className:"jv-picker-empty",children:x({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):w.map(M=>{const E=i.find(D=>{var A;return D.id===((A=M.root)==null?void 0:A.senderId)}),R=a.find(D=>D.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(Cr,{member:E,bots:r,size:16}),o.jsx("span",{children:bs(M.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(R==null?void 0:R.title)??""," · ",x("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${T5(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 lI({pane:e,followedView:a,followed:i,chats:r,sections:s,members:u,bots:d,statuses:f,meId:m,drafts:v,tick:y,paneChannel:g,activeBot:b,botDirects:j,find:w,onPane:k,onNav:C,onBackToChannel:T,onAddMembers:M,onOpenBot:E,onPin:R,onMute:D,onDeleteChannel:A,onChannelSaved:H,onThreadChanged:U,onInvite:Y,onPreview:z,onNotice:V,onError:F,paneWidth:J,onResize:G}){var P,W;const $=(e==null?void 0:e.kind)==="thread"?e:null,K=($==null?void 0:$.mode)==="full",I=()=>k(null);return o.jsxs(o.Fragment,{children:[a&&!K&&o.jsx(rI,{threads:i,chats:r,members:u,bots:d,onNav:C,renderThread:(_,ae)=>o.jsx(Pb,{threadId:_.id,mode:"embed",channel:r.find(ie=>ie.id===_.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:ae,onToggleMode:()=>T({id:_.id,parentId:_.parentId},!0),onInvite:ie=>Y(_.parentId,ie),onPreview:z,onError:F,onNotice:V},_.id)}),$&&o.jsx(Pb,{threadId:$.id,mode:$.mode,showSummary:$.summary,focus:$.focus,onSearch:w.search,channel:r.find(_=>_.id===$.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:()=>K?T($,!1):I(),onToggleMode:()=>K?T($,!0):k({...$,mode:"full"}),onInvite:_=>Y($.parentId,_),onPreview:z,onError:F,onNotice:V},`${$.id}:${((P=$.focus)==null?void 0:P.id)??""}:${((W=$.focus)==null?void 0:W.passage)??""}`),(e==null?void 0:e.kind)==="search"&&o.jsx(tI,{chat:e.chat,chats:r,members:u,focusKey:w.focusKey,onOpenMessage:w.openMessage,onClose:I,onError:F}),(e==null?void 0:e.kind)==="threads"&&g&&o.jsx(iI,{channel:g,members:u,bots:d,tick:y,onOpen:_=>k({kind:"thread",id:_,parentId:g.id,mode:"pane"}),onClose:I,onError:F}),(e==null?void 0:e.kind)==="info"&&g&&o.jsx(eI,{channel:g,page:e.page,sections:s,members:si(u),bots:d,statuses:f,me:m,onPage:_=>k({kind:"info",page:_}),onPin:()=>R(g),onMute:()=>D(g),onAdd:()=>M(g),onBot:E,onDelete:()=>A(g),onChanged:H,onClose:I,onError:F}),(e==null?void 0:e.kind)==="botdms"&&b&&!g&&o.jsx(ZB,{bot:b,chats:j,members:u,bots:d,me:m,tick:y,onClose:I,onPreview:z,onError:F}),e&&!K&&o.jsx("div",{className:"jv-resize",style:{right:J-4},onPointerDown:G,role:"separator","aria-orientation":"vertical","aria-label":x("app.resizePane")})]})}const Hb="@goodfish/jarvy",A5="0.10.0",oI={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},sI="Apache-2.0",m0=oI.url.replace(/^git\+/,"").replace(/\.git$/,""),Ub=`${m0}/blob/v${A5}`,cI=[{label:"about.source",detail:m0.replace(/^https:\/\//,""),href:m0},{label:"about.package",detail:Hb,href:`https://www.npmjs.com/package/${Hb}`},{label:"about.license",detail:sI,href:`${Ub}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${Ub}/THIRD_PARTY_NOTICE.md`}];function uI(){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:A5})})]}),cI.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(S8,{"aria-hidden":"true"})]},e.label))]})]})}function dI(){const[e,a]=S.useState(document.documentElement.classList.contains("dark")),i=s=>{Gd(s?"dark":"light"),a(s)},r=(s,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(Ra,{"aria-hidden":"true"})]},s);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:Jb.map(s=>r(s,_p(s,"name"),to()===s,()=>tj(s),s))})]}),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 fI=`<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>
|
|
574
|
+
`,hI=`<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>
|
|
575
|
+
`,mI=`<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>
|
|
576
|
+
`,pI=`<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>
|
|
577
|
+
`,gI=`<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>
|
|
578
|
+
`,vI=`<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>
|
|
579
|
+
`,yI=`<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>
|
|
580
|
+
`,xI=`<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>
|
|
581
|
+
`,bI=`<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>
|
|
582
|
+
`,jI=`<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>
|
|
583
|
+
`,wI=`<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>
|
|
584
|
+
`,SI=`<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>
|
|
585
|
+
`,kI=`<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>
|
|
586
|
+
`,CI=`<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>
|
|
587
|
+
`,NI=`<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>
|
|
588
|
+
`,EI=`<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>
|
|
589
|
+
`,TI=`<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>
|
|
590
|
+
`,AI=`<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>
|
|
591
|
+
`,_I=`<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>
|
|
592
|
+
`,MI=`<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>
|
|
593
|
+
`,RI=`<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>
|
|
594
|
+
`,DI=`<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>
|
|
595
|
+
`,OI=`<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>
|
|
596
|
+
`,zI=`<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>
|
|
597
|
+
`,LI=`<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>
|
|
598
|
+
`,BI=`<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>
|
|
599
|
+
`,II=`<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>
|
|
600
|
+
`,PI=`<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>
|
|
601
|
+
`,HI=`<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>
|
|
602
|
+
`,UI=Object.assign({"./antgroup.svg":fI,"./anthropic.svg":hI,"./azure.svg":mI,"./baseten.svg":pI,"./bedrock.svg":gI,"./cerebras.svg":vI,"./cloudflare.svg":yI,"./deepseek.svg":xI,"./fireworks.svg":bI,"./githubcopilot.svg":jI,"./google.svg":wI,"./groq.svg":SI,"./huggingface.svg":kI,"./kimi.svg":CI,"./meta.svg":NI,"./minimax.svg":EI,"./mistral.svg":TI,"./moonshot.svg":AI,"./nvidia.svg":_I,"./openai.svg":MI,"./opencode.svg":RI,"./openrouter.svg":DI,"./qwen.svg":OI,"./together.svg":zI,"./vercel.svg":LI,"./vertexai.svg":BI,"./xai.svg":II,"./xiaomimimo.svg":PI,"./zai.svg":HI}),qb={"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"},qI=e=>e&&qb[e]?UI[`./${qb[e]}.svg`]:void 0;function Eg({name:e,provider:a}){var r;const i=qI(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 _5(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 M5=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],R5=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",FI={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function VI({onBack:e,onSelect:a}){const[i,r]=S.useState([]),[s,u]=S.useState(""),[d,f]=S.useState(""),[m,v]=S.useState(!0),[y,g]=S.useState(0);S.useEffect(()=>{let w=!0;return v(!0),f(""),fe.modelProviders().then(k=>{w&&r(k.providers)}).catch(k=>{w&&f(Gt(k,"picker.loadFailed"))}).finally(()=>{w&&v(!1)}),()=>{w=!1}},[y]);const b=[FI,...i].filter(w=>`${w.name} ${w.id}`.toLowerCase().includes(s.toLowerCase())),j=w=>R5({authType:w.authType,custom:w.id==="custom"});return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx(Me,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":x("picker.back"),children:o.jsx(Qd,{})}),o.jsx("h2",{children:x("models.add")})]}),o.jsxs("label",{className:"jv-search",children:[o.jsx(Dc,{}),o.jsx("input",{autoFocus:!0,"aria-label":x("picker.search"),placeholder:x("picker.searchPlaceholder"),value:s,onChange:w=>u(w.target.value)})]}),M5.filter(w=>b.some(k=>j(k)===w.id)).map(({id:w,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)===w).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(il,{className:"jv-row-chevron"})]},`${C.id}:${C.authType}`))})]},w)),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(Me,{variant:"outline",onClick:()=>g(w=>w+1),children:x("picker.retry")})]}),!m&&!d&&!b.length&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("picker.noMatch")})})]})}const $I=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 GI({className:e,variant:a,...i}){return o.jsx("span",{"data-slot":"badge",className:an($I({variant:a}),e),...i})}function D5({className:e,...a}){return o.jsx(qE,{"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 YI({connection:e,providerName:a,authType:i,ensureConnection:r,onChanged:s}){var F,J;const[u,d]=S.useState({phase:"idle"}),[f,m]=S.useState(""),{busy:v,error:y,setError:g,run:b}=In(),[j,w]=S.useState(0),k=S.useRef(void 0),C=e==null?void 0:e.id,T=S.useRef(s);T.current=s;const M=S.useRef(u.phase);M.current=u.phase,S.useEffect(()=>{if(!C)return;const G=C;let $=!0,K;async function I(){var P;try{let W=await fe.authStatus(G);if(!$)return;if(k.current&&((P=W.prompt)==null?void 0:P.type)==="select"){const ae=k.current;if(k.current=void 0,W=await fe.authInput(G,W.prompt.id,ae),!$)return}const _=M.current==="running"&&W.phase!=="running";M.current=W.phase,d(W),_&&await T.current(),W.phase==="running"&&$&&(K=setTimeout(()=>void I(),750))}catch(W){$&&g(Gt(W,"auth.statusFailed"))}}return I(),()=>{$=!1,clearTimeout(K)}},[C,u.phase,j]),S.useEffect(()=>m(""),[(F=u.prompt)==null?void 0:F.id]);async function E(G){await b("act",async()=>{const $=await G();d($),$.phase!=="running"&&await s()},"common.failed")}function R(G){k.current=G,E(async()=>{const $=C??await r();return fe.authStart($)})}const D=a==="openai-codex"&&i==="oauth",A=a==="openai"&&i==="oauth",H=u.phase==="running",U=u.prompt,Y=u.event,z=(Y==null?void 0:Y.type)==="auth_url"?Y.url:(Y==null?void 0:Y.type)==="device_code"?Y.verificationUri:null,V=G=>{U&&C&&E(()=>fe.authInput(C,U.id,G))};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(GI,{variant:"outline","data-state":H?"running":e!=null&&e.configured?"connected":"disconnected",children:x(H?"auth.running":e!=null&&e.configured?i==="oauth"?"status.signedIn":"status.configured":i==="oauth"?"status.signedOut":"status.notConfigured")})]}),H?o.jsxs("div",{className:"jv-auth-flow",children:[z&&o.jsx(Me,{asChild:!0,variant:"outline",children:o.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:z,target:"_blank",rel:"noopener noreferrer",children:x("auth.openPage")})}),(Y==null?void 0:Y.type)==="device_code"&&o.jsx("p",{children:x("auth.code",{code:Y.userCode})}),(U==null?void 0:U.type)==="select"&&o.jsx("div",{className:"flex flex-wrap gap-2",children:(J=U.options)==null?void 0:J.map(G=>o.jsx(Me,{type:"button",variant:"outline",disabled:v,onClick:()=>V(G.id),children:D&&G.id==="browser"?x("auth.browser"):D&&G.id==="device_code"?x("auth.deviceCode"):G.label},G.id))}),U&&U.type!=="select"&&o.jsxs("div",{className:"jv-auth-input",children:[o.jsx(D5,{htmlFor:`oauth-input-${C??a}`,children:U.type==="manual_code"?x(A?"auth.redirectFull":"auth.redirectOrCode"):U.message}),U.type==="manual_code"&&o.jsx("p",{className:"jv-auth-note",children:x("auth.manualNote")}),o.jsx(vt,{id:`oauth-input-${C??a}`,type:U.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:v,onChange:G=>m(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),V(f))}}),o.jsx(Me,{type:"button",variant:"outline",disabled:v||!f.trim(),onClick:()=>V(f),children:x("common.continue")})]}),!U&&o.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:x("auth.waiting")}),(Y==null?void 0:Y.type)==="info"&&o.jsx("p",{className:"text-sm",children:Y.message}),o.jsx(Me,{type:"button",variant:"ghost",disabled:v,onClick:()=>void E(()=>fe.authCancel(C)),children:x("auth.cancel")})]}):o.jsxs("div",{className:"flex flex-wrap gap-2",children:[D?o.jsxs(o.Fragment,{children:[o.jsx(Me,{type:"button",variant:"outline",disabled:v,onClick:()=>R("browser"),children:x("auth.browser")}),o.jsx(Me,{type:"button",variant:"outline",disabled:v,onClick:()=>R("device_code"),children:x("auth.deviceCode")})]}):o.jsx(Me,{type:"button",variant:"outline",disabled:v,onClick:()=>R(),children:x(i==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&o.jsx(Me,{type:"button",variant:"outline",disabled:v,onClick:()=>void E(async()=>(await fe.authLogout(C),{phase:"idle"})),children:x(i==="api_key"?"auth.removeCredential":"auth.signOut")})]}),(y||u.phase==="error")&&o.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:y||x("error.loginFailed")}),y&&o.jsx(Me,{type:"button",variant:"link",disabled:v,onClick:()=>{g(""),w(G=>G+1)},children:x("auth.refresh")})]})}async function XI(e,a,i){try{return await fe.autoconfigModel({modelId:e.id,api:e.api||a,...i?{choice:i}:{}})}catch(r){return{status:"error",message:Gt(r,"auto.failed")}}}function KI(e,a){if(a.status!=="matched")return{...e,auto:a};const{fields:i,...r}=a,s=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...i,name:s?e.model.name:a.source.name||e.model.id},auto:r}}const O5=e=>`${e.provider} / ${e.modelId}`;function Fb({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:O5(i)}),i.official&&o.jsx("em",{children:x("auto.official")}),o.jsx("small",{children:i.api})]},`${i.provider}/${i.modelId}`))})}function QI({state:e,modelId:a,onRun:i}){const r=u=>i({provider:u.provider,modelId:u.modelId}),s=(e==null?void 0:e.status)==="pending";return o.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[o.jsxs(Me,{type:"button",variant:"outline",size:"sm",disabled:!a.trim()||s,onClick:()=>i(),children:[o.jsx(C4,{}),x(s?"auto.pending":"auto.run")]}),e&&!s&&o.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:x0("auto.matched",{source:o.jsx("strong",{className:"jv-mono",children:O5(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(Fb,{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(Fb,{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"],z5=[["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"]],L5=e=>e==="xhigh"||e==="max";function B5(e,a){const i=e[a];return i===null||i===void 0&&L5(a)?"unsupported":i===void 0?"default":"custom"}function ZI(e){return e.reasoning?z5.filter(([a])=>B5(e.thinkingLevelMap,a)!=="unsupported").map(([,a])=>x(a)):[x("thinking.level.off")]}function JI({model:e,api:a,onChange:i}){const r=e.thinkingLevelMap,s=(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:z5.map(([f,m])=>{const v=B5(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=>s(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:[!L5(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=>s(f,"custom",y.target.value)}):o.jsx("span",{})]},f)})}),o.jsx("p",{className:"jv-field-hint",children:x("thinking.supported",{levels:ZI(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"}],WI=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function p0({value:e,onChange:a,allowDefault:i=!1}){const r=Tp.some(s=>s.id===e)||!e?Tp:[...Tp,{id:e,label:e}];return o.jsxs(gr,{value:e||"default",onValueChange:s=>a(s==="default"?"":s),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(s=>o.jsx(sa,{value:s.id,children:s.label},s.id))]})]})}const eP=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),Vb={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function tP({value:e,onChange:a}){const i=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[r,s]=S.useState(()=>i(e)),[u,d]=S.useState(""),f=S.useRef(null);return S.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(r||"{}"))===JSON.stringify(e))return}catch{}s(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(fs,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,r.split(`
|
|
603
|
+
`).length)),placeholder:"{}",value:r,onChange:m=>{s(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 nP({draft:e,protocol:a,onChange:i,onRemove:r,onAutoconfig:s}){const{model:u}=e,[d,f]=S.useState(!u.id),[m,v]=S.useState(!1),[y,g]=S.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]}),w=(k,C,T)=>{const M=y.map((R,D)=>D===k?{...R,[C]:T}:R);g(M);const E={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==M[k].name&&(E[y[k].name]=null);for(const R of M)R.name&&(R.value||!R.saved)&&(E[R.name]=R.value);b({headerUpdates:E})};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:eP(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&&Vb[e.auto.status]&&o.jsx("span",{className:"jv-chip jv-chip-warn",children:x(Vb[e.auto.status])})]}),o.jsx(ll,{className:"jv-expand-icon"})]}),o.jsx(Me,{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(zd,{})})]}),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(QI,{state:e.auto,modelId:u.id,onRun:s}),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(JI,{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(Me,{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 T,M;return o.jsxs("div",{children:[o.jsx(D5,{children:x(C)}),m?o.jsx(vt,{type:"number",step:"any",min:0,value:((T=u.cost)==null?void 0:T[k])??"",onChange:E=>b({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(E.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(ll,{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(p0,{allowDefault:!0,value:u.api??"",onChange:k=>b({api:k,baseUrl:void 0})})]}),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:T=>w(C,"name",T.target.value)}),o.jsx(vt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?x("card.headerSaved"):"value",value:k.value,onChange:T=>w(C,"value",T.target.value)}),o.jsx(Me,{type:"button",size:"icon-sm",variant:"ghost","aria-label":x("card.removeHeader"),onClick:()=>{g(y.filter((T,M)=>M!==C)),k.name&&b({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:o.jsx(zd,{})})]},C)),o.jsxs(Me,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>g([...y,{name:"",value:"",saved:!1}]),children:[o.jsx(br,{}),x("card.addHeader")]})]}),o.jsx(tP,{value:u.compat,onChange:k=>b({compat:k})})]})]})]})]})}let aP=0;const Cd=(e,a,i=!1)=>({key:`draft-${++aP}`,model:e,selected:a,...i?{originalId:e.id}:{}});function iP({connection:e,preset:a,defaultName:i,saved:r=!1,onBack:s,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,g]=S.useState(e?m?e.providerName:e.displayName:m?"":i),[b,j]=S.useState((e==null?void 0:e.baseUrl)??""),[w,k]=S.useState((e==null?void 0:e.api)??a.api),[C,T]=S.useState(""),[M,E]=S.useState(()=>((e==null?void 0:e.models)??[]).map(Q=>Cd(Q,!0,!0))),[R,D]=S.useState([]),[A,H]=S.useState(""),{busy:U,error:Y,setError:z,run:V}=In(),[F,J]=S.useState(!1),[G,$]=S.useState(r?x("editor.saved"):""),[K,I]=S.useState(null),P=S.useRef(e==null?void 0:e.id);function W(Q){E(he=>{const ke=new Set(he.map(Ee=>Ee.model.id));return[...he,...Q.filter(Ee=>!ke.has(Ee.id)).map(Ee=>Cd(Ee,!1))]})}S.useEffect(()=>{if(m)return;let Q=!0;return J(!0),(e?fe.modelCatalog(e.id):fe.providerModels(a.id)).then(ke=>{Q&&W(ke.models)}).catch(ke=>{Q&&z(Gt(ke,"editor.fetchFailed"))}).finally(()=>{Q&&J(!1)}),()=>{Q=!1}},[e==null?void 0:e.id,a==null?void 0:a.id,m]);async function _(){J(!0),z(""),$("");try{const Q=await fe.discoverModels({connectionId:P.current,baseUrl:b,api:w,...C.trim()?{apiKey:C}:{}});W(Q.models),$(Q.models.length?x("editor.fetched",{count:Q.models.length}):x("editor.noneReturned"))}catch(Q){z(Gt(Q,"editor.fetchFailed"))}finally{J(!1)}}async function ae(Q,he){const ke=M.filter(Ie=>Q.includes(Ie.key)&&Ie.model.id.trim());if(!ke.length)return;z(""),$(""),E(Ie=>Ie.map(Ye=>ke.some(Ke=>Ke.key===Ye.key)?{...Ye,auto:{status:"pending"}}:Ye));const Ee={matched:0,choose:0,none:0,error:0};for(const Ie of ke){const Ye=await XI(Ie.model,w,he);Ee[Ye.status]++,E(Ke=>Ke.map(gt=>gt.key===Ie.key?KI(gt,Ye):gt))}ke.length>1&&$(x("editor.autoSummary",{parts:[x("editor.autoMatched",{count:Ee.matched}),Ee.choose&&x("editor.autoChoose",{count:Ee.choose}),Ee.none&&x("editor.autoNone",{count:Ee.none}),Ee.error&&x("editor.autoFailed",{count:Ee.error})].filter(Boolean).join(x("common.listSeparator"))}))}async function ie(){if(!P.current){const Q=await fe.createModelConnection({providerName:a.id,displayName:y,kind:"builtin",authType:v,baseUrl:b,api:w});P.current=Q.id}return await d(P.current),P.current}async function L(Q){Q.preventDefault(),$(""),await V("save",async()=>{let he;P.current?(he=await fe.updateModelConnection(P.current,{displayName:y,...m?{providerName:y}:{},baseUrl:b,api:w}),m&&C.trim()&&await fe.saveModelCredential(he.id,C)):(he=await fe.createModelConnection({providerName:m?y:a.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:b,api:w,...m&&C.trim()?{apiKey:C}:{}}),P.current=he.id);for(const ke of M)ke.selected&&await fe.saveConnectionModel(he.id,ke.model,ke.originalId);for(const ke of new Set([...R,...M.filter(Ee=>Ee.originalId&&!Ee.selected).map(Ee=>Ee.originalId)]))await fe.deleteConnectionModel(he.id,ke);T(""),await u(he.id),$(x("editor.saved"))},"editor.saveFailed")}async function q(){$(""),await V("reset",async()=>I(await fe.modelResetPlan(e.id)),"editor.resetFailed")}async function ue(){$(""),await V("reset",async()=>{const he=await fe.resetModelConnection(e.id);I(null),D([]),j(he.baseUrl),k(he.api),E(he.models.map(ke=>Cd(ke,!0,!0))),W((await fe.modelCatalog(he.id)).models),await f()},"editor.resetFailed")&&$(x("editor.resetDone"))}async function xe(){!e||!confirm(x("editor.confirmDelete",{name:e.displayName}))||await V("delete",async()=>{await fe.deleteModelConnection(e.id),await f(),s()},"editor.deleteFailed")}const be=M.filter(Q=>`${Q.model.id} ${Q.model.name}`.toLowerCase().includes(A.toLowerCase())),je=M.filter(Q=>Q.selected).length,Ae=m?(e==null?void 0:e.displayName)??x("group.custom"):(e==null?void 0:e.displayName)??a.name,Re=e?_5(e):null,ye=M.some(Q=>{var he;return((he=Q.auto)==null?void 0:he.status)==="pending"});return o.jsxs("form",{className:"jv-editor",onChange:()=>$(""),onSubmit:Q=>void L(Q),children:[o.jsxs("header",{className:"jv-editor-header",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:U,onClick:s,"aria-label":x("editor.back"),children:o.jsx(Qd,{})}),o.jsx(Eg,{name:Ae,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:Ae}),o.jsx("span",{children:m?"OpenAI / Anthropic compatible":x(v==="oauth"?"group.subscription":"group.apiKey")})]}),Re&&o.jsx("span",{className:"jv-status","data-ok":Re.ok||void 0,children:Re.label}),e&&o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:U,onClick:()=>void xe(),"aria-label":x("editor.delete"),children:o.jsx(zd,{})})]}),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:Q=>g(Q.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("editor.protocol")}),o.jsx(p0,{value:w,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:Q=>j(Q.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:Q=>T(Q.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:Q=>g(Q.target.value)})]}),o.jsx(YI,{connection:e,providerName:(e==null?void 0:e.providerName)??a.id,authType:v,ensureConnection:ie,onChanged:f}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[o.jsx(ll,{}),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:Q=>j(Q.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:"API Protocol"}),o.jsx(p0,{value:w,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:je,total:M.length})})]}),o.jsxs("div",{className:"jv-section-actions",children:[m&&o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:U||F||!b.trim()||!(C.trim()||e!=null&&e.configured),onClick:()=>void _(),children:[o.jsx(b0,{}),x(F?"editor.fetching":"editor.fetch")]}),je>0&&o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:U||ye,onClick:()=>void ae(M.filter(Q=>Q.selected).map(Q=>Q.key)),children:[o.jsx(C4,{}),x("editor.autoSelected")]}),o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",onClick:()=>E([...M,Cd(WI(),!0)]),children:[o.jsx(br,{}),x("editor.addManually")]}),e&&!m&&o.jsxs(Me,{type:"button",variant:"ghost",size:"sm",disabled:U||F||!!K,onClick:()=>void q(),children:[o.jsx(p4,{}),x("editor.reset")]})]})]}),K&&o.jsx(rP,{plan:K,busy:U,onCancel:()=>I(null),onConfirm:()=>void ue()}),M.length>6&&o.jsxs("div",{className:"jv-models-filter",children:[o.jsxs("label",{className:"jv-search",children:[o.jsx(Dc,{}),o.jsx("input",{"aria-label":x("editor.filter"),placeholder:x("editor.filterPlaceholder"),value:A,onChange:Q=>H(Q.target.value)})]}),o.jsx(Me,{type:"button",variant:"ghost",size:"sm",onClick:()=>E(Q=>Q.map(he=>be.includes(he)?{...he,selected:!0}:he)),children:x("editor.selectVisible")})]}),F&&!m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("editor.loadingCatalog")}),o.jsx("div",{className:"jv-model-cards",children:be.map(Q=>o.jsx(nP,{draft:Q,protocol:w,onAutoconfig:he=>void ae([Q.key],he),onChange:he=>E(ke=>ke.map(Ee=>Ee.key===Q.key?he:Ee)),onRemove:()=>{Q.originalId&&D(he=>[...he,Q.originalId]),E(he=>he.filter(ke=>ke.key!==Q.key))}},Q.key))}),!F&&!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:Y?o.jsx("p",{role:"alert",children:Y}):G?o.jsx("p",{role:"status",children:G}):null}),o.jsx(Me,{type:"submit",className:"jv-primary",disabled:U||F||ye,children:x(U?"editor.saving":"editor.save")})]})]})}function rP({plan:e,busy:a,onCancel:i,onConfirm:r}){const s=[...new Set(e.removed.flatMap(d=>d.bots))],u=x("common.listSeparator");return o.jsxs("div",{className:"jv-reset-confirm",role:"group","aria-label":x("editor.resetTitle"),children:[o.jsx("strong",{children:x("editor.resetTitle")}),e.reset.length>0&&o.jsx("p",{children:x("editor.resetModels",{count:e.reset.length})}),e.removed.length>0&&o.jsx("p",{children:x("editor.resetRemoves",{count:e.removed.length,names:e.removed.map(d=>d.name||d.id).join(u)})}),s.length>0&&o.jsx("p",{className:"jv-reset-bots",children:x("editor.resetBots",{count:s.length,bots:s.join(u)})}),o.jsx("p",{children:x("editor.resetKeeps")}),o.jsxs("div",{className:"jv-reset-actions",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"sm",onClick:i,children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",size:"sm",disabled:a,onClick:r,children:x("editor.resetConfirm")})]})]})}function lP({connections:e,onChanged:a}){const[i,r]=S.useState("list"),[s,u]=S.useState(),[d,f]=S.useState(),[m,v]=S.useState(0),y=()=>{r("list"),f(void 0),u(void 0),v(0)},g=j=>R5({authType:j.authType,custom:j.kind==="custom"});let b=(s==null?void 0:s.name)??"";if(s){let j=2;for(;e.some(w=>w.displayName===b);)b=`${s.name} ${j++}`}return i==="choose"?o.jsx(VI,{onBack:y,onSelect:j=>{u(j),f(void 0),r("editor")}}):i==="editor"?o.jsx(iP,{connection:e.find(j=>j.id===d),preset:s,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(w=>w+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(Me,{className:"jv-primary",onClick:()=>r("choose"),children:[o.jsx(br,{}),x("models.add")]})]}),!e.length&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("models.empty")})}),M5.filter(j=>e.some(w=>g(w)===j.id)).map(({id:j,label:w})=>o.jsxs("section",{className:"jv-section","aria-label":x(w),children:[o.jsx("h3",{className:"jv-section-title",children:x(w)}),o.jsx("div",{className:"jv-list",children:e.filter(k=>g(k)===j).map(k=>{const C=_5(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(il,{className:"jv-row-chevron"})]},k.id)})})]},j))]})}function oP(){var b;const[e,a]=S.useState(null),[i,r]=S.useState(null),[s,u]=S.useState(!1),[d,f]=S.useState(!1),[m,v]=S.useState(!1);S.useEffect(()=>{fe.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:x0("connection.localOnlyHint",{flag:o.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const g=async()=>{f(!0),v(!1);try{a(await fe.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(Me,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(i===j?"ui.copied":"connection.copy"),onClick:()=>void qc(j).then(w=>r(w?j:null)),children:i===j?o.jsx(Ra,{}):o.jsx(Zd,{})})]},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(Me,{asChild:!0,variant:"outline",size:"sm",children:o.jsxs("a",{href:"/api/connection/root.crt",children:[o.jsx(b0,{}),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":s,onClick:()=>u(!s),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("connection.howTo")})}),o.jsx(ll,{"aria-hidden":"true"})]}),s&&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 g(),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:s,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:s,value:e,onChange:f=>i(f.target.value)}),o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(a?"secrets.hideValue":"secrets.showValue"),onClick:()=>r(!a),children:a?o.jsx(j0,{}):o.jsx(w0,{})})]}),d&&e.length>0&&e.length<8&&o.jsx("span",{className:"jv-field-hint jv-secret-short",children:x("secrets.shortValue")})]})}function sP({secret:e,bots:a,onChanged:i}){return o.jsx(I5,{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,s)=>{let u=e;for(const d of r)u=await fe.grantSecret(e.id,d,s);i(u)}})}function I5({grantedIds:e,onceIds:a,bots:i,onGrant:r}){const[s,u]=S.useState(!1),[d,f]=S.useState(""),[m,v]=S.useState([]),{busy:y,error:g,run:b}=In(),j=e.map(D=>i.find(A=>A.id===D)).filter(D=>!!D),w=a??new Set,k=i.filter(D=>!e.includes(D.id)),C=k.filter(D=>D.name.toLowerCase().includes(d.trim().toLowerCase())),T=()=>{u(!1),f(""),v([])},M=D=>v(A=>A.includes(D)?A.filter(H=>H!==D):[...A,D]),E=D=>b("grant",D),R=()=>E(async()=>{await r(m,!0),T()});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"),j.length>0&&o.jsxs("span",{children:[" · ",j.length]})]}),!s&&o.jsxs(Me,{type:"button",variant:"outline",size:"sm",disabled:y,onClick:()=>u(!0),children:[o.jsx(br,{}),x("secrets.addBots")]})]}),j.length>0?o.jsx("ul",{className:"jv-secret-granted",children:j.map(D=>o.jsxs("li",{children:[o.jsx(so,{color:D.color,mood:D.mood,size:20,crown:D.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:D.name}),w.has(D.id)&&o.jsx("span",{className:"jv-secret-once",children:x("secrets.onceTag")}),o.jsx(Me,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:y,"aria-label":x("secrets.revoke",{name:D.name}),onClick:()=>void E(()=>r([D.id],!1)),children:o.jsx(hs,{})})]},D.id))}):!s&&o.jsx("p",{className:"jv-hint",children:x("secrets.noGrants")}),s&&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:D=>f(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.preventDefault(),C.length===1&&M(C[0].id))}}),o.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":x("secrets.addBots"),children:[C.map(D=>o.jsxs("button",{type:"button",role:"option","aria-selected":m.includes(D.id),className:"jv-secret-option",onClick:()=>M(D.id),children:[o.jsx(so,{color:D.color,mood:D.mood,size:24,crown:D.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:D.name}),m.includes(D.id)&&o.jsx(Ra,{"aria-hidden":"true"})]},D.id)),C.length===0&&o.jsx("p",{className:"jv-hint",children:x(i.length?k.length?"secrets.noMatch":"secrets.allGranted":"secrets.noBots")})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"sm",onClick:T,children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",size:"sm",disabled:y||!m.length,onClick:()=>void R(),children:m.length?x("dialogs.addCount",{count:m.length}):x("common.add")})]})]}),g&&o.jsx("p",{className:"jv-note-error",role:"alert",children:g})]})}function P5({id:e,open:a,onToggle:i,text:r,meta:s,busy:u,error:d,remove:f,confirming:m,onAskRemove:v,onCancel:y,onConfirm:g,children:b}){return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":a,"aria-controls":e,onClick:i,children:[o.jsx("span",{className:"jv-row-text",children:r}),s,o.jsx(ll,{className:"jv-row-chevron","aria-hidden":"true"})]}),a&&o.jsxs("div",{id:e,className:"jv-list-row jv-static-row jv-secret-details",children:[b,m?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":m.title,children:[o.jsx("strong",{children:m.title}),o.jsx("p",{children:m.body}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Me,{type:"button",variant:"ghost",size:"sm",onClick:y,children:x("common.cancel")}),o.jsx(Me,{type:"button",className:"jv-primary",size:"sm",disabled:u,onClick:g,children:m.confirm})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Me,{type:"button",variant:"ghost",size:"sm",disabled:u,onClick:v,children:f})}),d&&o.jsx("p",{className:"jv-note-error",role:"alert",children:d})]})]})}const $b=e=>ua(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function cP({secret:e,bots:a,open:i,onToggle:r,onChanged:s,onDeleted:u}){const[d,f]=S.useState(null),[m,v]=S.useState(e.description),[y,g]=S.useState(""),[b,j]=S.useState(!1),[w,k]=S.useState(!1),{busy:C,error:T,run:M}=In();S.useEffect(()=>{i&&fe.secretUses(e.id).then(H=>f(H.uses)).catch(()=>f([]))},[i,e.id,e.uses]);const E=H=>{H.preventDefault(),M("save",async()=>{s(await fe.updateSecret(e.id,{description:m.trim(),...y?{value:y}:{}})),g(""),j(!1)})},R=new Set(e.grants.map(H=>H.botId)),D=H=>{var U;return((U=a.find(Y=>Y.id===H))==null?void 0:U.name)??x("secrets.deletedBot")},A=m.trim()!==e.description||!!y;return o.jsxs(P5,{id:`secret-${e.id}`,open:i,onToggle:r,busy:C,error:T,text:o.jsxs(o.Fragment,{children:[o.jsx("strong",{className:"jv-mono",children:e.name}),o.jsx("span",{children:e.description||x("secrets.noDescription")})]}),meta:e.readable?o.jsx("span",{className:"jv-row-meta",children:R.size?x("secrets.grantCount",{count:R.size}):x("secrets.notGranted")}):o.jsx("span",{className:"jv-status","data-busy":"",children:x("secrets.unreadable")}),remove:x("secrets.delete"),confirming:w?{title:x("secrets.deleteTitle",{name:e.name}),body:x("secrets.deleteBody"),confirm:x("secrets.deleteConfirm")}:null,onAskRemove:()=>k(!0),onCancel:()=>k(!1),onConfirm:()=>void M("delete",async()=>{await fe.deleteSecret(e.id),u()}),children:[o.jsxs("p",{className:"jv-secret-meta",children:[x("secrets.fingerprint")," ",o.jsx("code",{children:e.fingerprint})," · ",x("secrets.updated",{time:$b(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(sP,{secret:e,bots:a,onChanged:s}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:E,"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:H=>v(H.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.newValue")}),o.jsx(yf,{value:y,visible:b,onChange:g,onVisible:j,placeholder:x("secrets.newValuePlaceholder")})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Me,{type:"submit",variant:"outline",size:"sm",disabled:C||!A,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(H=>o.jsxs("li",{children:[o.jsxs("span",{children:[D(H.botId)," · ",$b(H.at)," · ",x(H.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),H.detail&&o.jsx("code",{children:H.detail})]},H.id))}):o.jsx("p",{className:"jv-hint",children:x("secrets.noUses")})]})}const Gb=(e,a)=>e.name.localeCompare(a.name);function uP(){const[e,a]=S.useState(null),[i,r]=S.useState(""),[s,u]=S.useState([]),[d,f]=S.useState(!1),[m,v]=S.useState(null),[y,g]=S.useState(null);S.useEffect(()=>{fe.secrets().then(j=>{a([...j.secrets].sort(Gb)),r(j.keyLocation)}).catch(j=>g(Gt(j))),fe.bots().then(j=>u(j.bots)).catch(()=>u([]))},[]);const b=j=>a(w=>w&&w.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(Me,{className:"jv-primary",onClick:()=>f(!0),children:[o.jsx(br,{}),x("secrets.add")]})]}),d&&o.jsx(dP,{onCancel:()=>f(!1),onSaved:j=>{f(!1),a(w=>[...w??[],j].sort(Gb)),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(cP,{secret:j,bots:s,open:m===j.id,onToggle:()=>v(m===j.id?null:j.id),onChanged:b,onDeleted:()=>{v(null),a(w=>w&&w.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 dP({onCancel:e,onSaved:a}){const[i,r]=S.useState(""),[s,u]=S.useState(""),[d,f]=S.useState(""),[m,v]=S.useState(!1),{busy:y,error:g,run:b}=In(),j=async w=>{w.preventDefault(),await b("add",async()=>a(await fe.createSecret({name:i.trim(),description:s.trim(),value:d})))};return o.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:w=>void j(w),"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:w=>r(w.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:s,onChange:w=>u(w.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})]}),g&&o.jsx("p",{className:"jv-note-error",role:"alert",children:g}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Me,{type:"button",variant:"ghost",onClick:e,children:x("common.cancel")}),o.jsx(Me,{type:"submit",className:"jv-primary",disabled:y||!i.trim()||!d,children:x("common.save")})]})]})}function fP({machine:e,bots:a,open:i,onToggle:r,onChanged:s,onDeleted:u}){const[d,f]=S.useState(e.name),[m,v]=S.useState(e.directory),[y,g]=S.useState(e.description),[b,j]=S.useState(null),[w,k]=S.useState(null),{busy:C,doing:T,error:M,setError:E,run:R}=In(),[D,A]=S.useState(""),[H,U]=S.useState(!1),[Y,z]=S.useState(null),V=`${e.user}@${e.host}${e.port===22?"":`:${e.port}`}`,F=K=>{K.preventDefault(),R("save",async()=>{const I=await fe.updateMachine(e.id,{name:d.trim(),directory:m.trim(),description:y.trim()});s(I),f(I.name),v(I.directory),g(I.description)})},J=K=>void R("delete",async()=>{try{await fe.deleteMachine(e.id,K),u()}catch(I){throw!K&&I instanceof hr&&I.code!=="machine_missing"&&k("force"),I}}),G=d.trim()!==e.name||m.trim()!==e.directory||y.trim()!==e.description,$=w==="force";return o.jsxs(P5,{id:`machine-${e.id}`,open:i,onToggle:r,busy:C,error:M,text:o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:e.name}),o.jsx("span",{className:"jv-mono",children:V})]}),meta:o.jsx("span",{className:"jv-row-meta",children:e.botIds.length?x("secrets.grantCount",{count:e.botIds.length}):x("secrets.notGranted")}),remove:x("machines.delete"),confirming:w&&{title:x($?"machines.forceTitle":"machines.deleteTitle",{name:e.name}),body:$?x("machines.forceBody",{comment:`jarvy-${e.id}`}):x("machines.deleteBody"),confirm:x($?"machines.forceConfirm":"machines.deleteConfirm")},onAskRemove:()=>k("delete"),onCancel:()=>{k(null),E("")},onConfirm:()=>J($),children:[o.jsxs("form",{className:"jv-secret-edit jv-machine-edit",onSubmit:F,"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:K=>f(K.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:K=>v(K.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-description",children:[o.jsx("span",{children:x("machines.description")}),o.jsx(fs,{maxLength:2e3,rows:3,placeholder:x("machines.descriptionPlaceholder"),value:y,onChange:K=>g(K.target.value)})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Me,{type:"submit",variant:"outline",size:"sm",disabled:C||!G||!d.trim(),children:x("common.save")})})]}),o.jsxs("div",{className:"jv-machine-part",children:[o.jsxs("section",{className:"jv-secret-grants","aria-label":x("machines.fingerprint"),children:[o.jsx("h4",{className:"jv-secret-heading",children:x("machines.fingerprint")}),o.jsxs("div",{className:"jv-machine-key jv-machine-fingerprint",children:[o.jsx("div",{className:"jv-machine-codes",children:(b!=null&&b.changed?b.hostKeys.fingerprints:e.fingerprints).map(K=>o.jsx("code",{"data-new":(b==null?void 0:b.changed)||void 0,children:K},K))}),b!=null&&b.changed?o.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:C,onClick:()=>void R("trust",async()=>{s(await fe.trustMachine(e.id,b.hostKeys.fingerprints)),j(null)}),children:x("machines.trust")}):o.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:C,onClick:()=>void R("check",async()=>{const K=await fe.checkMachine(e.id);j(K),s(K.machine)}),children:x(T==="check"?"machines.checking":"machines.check")})]}),b&&o.jsx("p",{className:"jv-hint","data-warn":b.changed||void 0,children:x(b.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:K=>{K.preventDefault(),R("password",async()=>{s(await fe.setMachinePassword(e.id,D)),A(""),z(x("machines.passwordUpdated"))})},children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.newPassword")}),o.jsx(yf,{value:D,visible:H,onChange:A,onVisible:U,required:!0,warnShort:!1})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Me,{type:"button",variant:"outline",size:"sm",disabled:C,onClick:()=>void R("key",async()=>{const K=await fe.checkMachine(e.id);j(K),s(K.machine),z(x(K.machine.login==="key"?"machines.usingKey":"machines.stillPassword"))}),children:x("machines.useKey")}),o.jsx(Me,{type:"submit",variant:"outline",size:"sm",disabled:C||!D,children:x("machines.updatePassword")})]})]})]}),Y&&o.jsx("p",{className:"jv-hint",children:Y})]})]}),o.jsx("div",{className:"jv-machine-part",children:o.jsx(I5,{grantedIds:e.botIds,bots:a,onGrant:async(K,I)=>{let P=e;for(const W of K)P=await fe.grantMachine(e.id,W,I);s(P)}})})]})}function hP({adding:e=!1}){const[a,i]=S.useState(null),[r,s]=S.useState([]),[u,d]=S.useState(e),[f,m]=S.useState(null),[v,y]=S.useState(null);S.useEffect(()=>{fe.machines().then(b=>i(b.machines)).catch(b=>y(Gt(b))),fe.bots().then(b=>s(b.bots)).catch(()=>s([]))},[]);const g=b=>i(j=>j&&j.map(w=>w.id===b.id?b:w));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx("h2",{children:x("settings.machines")}),!u&&o.jsxs(Me,{className:"jv-primary",onClick:()=>d(!0),children:[o.jsx(br,{}),x("machines.add")]})]}),u&&o.jsx(mP,{onCancel:()=>d(!1),onSaved:b=>{d(!1),i(j=>[...j??[],b]),m(b.id)}}),a&&!a.length&&!u&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("machines.empty")})}),a&&a.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.machines"),children:o.jsx("div",{className:"jv-list",children:a.map(b=>o.jsx(fP,{machine:b,bots:r,open:f===b.id,onToggle:()=>m(f===b.id?null:b.id),onChanged:g,onDeleted:()=>{m(null),i(j=>j&&j.filter(w=>w.id!==b.id))}},b.id))})}),v&&o.jsx("p",{className:"jv-note-error",role:"alert",children:v})]})}function mP({onCancel:e,onSaved:a}){const[i,r]=S.useState(""),[s,u]=S.useState("22"),[d,f]=S.useState(""),[m,v]=S.useState(""),[y,g]=S.useState(""),[b,j]=S.useState(""),[w,k]=S.useState(null),[C,T]=S.useState(""),[M,E]=S.useState(!1),[R,D]=S.useState("password"),{busy:A,error:H,setError:U,run:Y}=In(),z=XS(!!w&&R==="key"),V={host:i.trim(),port:Number(s)||22,user:d.trim()},F=$=>Y("add",async()=>{try{await $()}catch(K){throw K instanceof hr&&K.code==="ssh_key_expired"&&z.renew(),K}}),J=$=>{$.preventDefault(),F(w?async()=>a(await fe.addMachine({...V,name:m.trim(),directory:y.trim(),description:b.trim(),hostKeys:w,...R==="key"?{keyId:z.key.keyId}:{password:C}})):async()=>k(await fe.scanMachine(V)))},G=V.user&&V.host?`${V.user}@${V.host}`:"";return o.jsxs("form",{className:"jv-panel jv-machine-form",autoComplete:"off",onSubmit:J,"aria-label":x("machines.add"),"aria-busy":A||void 0,children:[w?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:[V.user,"@",V.host,V.port===22?"":`:${V.port}`]})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:w.fingerprints.map($=>o.jsx("code",{children:$},$))}),o.jsx("span",{className:"jv-field-hint",children:x("machines.fingerprintHint")})]}),o.jsx("div",{className:"jv-seg jv-machine-login",role:"radiogroup","aria-label":x("machines.login"),children:["password","key"].map($=>o.jsx("button",{type:"button",role:"radio","aria-checked":R===$,disabled:A,onClick:()=>{D($),U("")},children:x($==="password"?"machines.byPassword":"machines.byKey")},$))}),R==="password"?o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.password")}),o.jsx(yf,{value:C,visible:M,onChange:T,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")}),z.key?o.jsx(Sg,{publicKey:z.key.publicKey}):z.error?o.jsx("p",{className:"jv-note-error",role:"alert",children:z.error}):o.jsx("p",{className:"jv-hint",children:"…"}),o.jsx("span",{className:"jv-field-hint",children:x("machines.keyHint",{user:V.user})})]})]}):o.jsxs("div",{className:"jv-machine-fields",children:[o.jsxs("div",{className:"jv-machine-address",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:$=>r($.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:s,onChange:$=>u($.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:$=>f($.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(vt,{maxLength:40,placeholder:G,value:m,onChange:$=>v($.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:$=>g($.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-wide",children:[o.jsx("span",{children:x("machines.description")}),o.jsx(fs,{maxLength:2e3,rows:3,placeholder:x("machines.descriptionPlaceholder"),value:b,onChange:$=>j($.target.value)})]})]}),H&&o.jsx("p",{className:"jv-note-error",role:"alert",children:H}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Me,{type:"button",variant:"ghost",disabled:A,onClick:()=>{w?(k(null),T(""),U("")):e()},children:x(w?"machines.back":"common.cancel")}),o.jsx(Me,{type:"submit",className:"jv-primary",disabled:A||!V.host||!V.user||!!w&&(R==="key"?!z.key:!C),children:x(w?R==="key"?A?"machines.verifying":"machines.verify":A?"machines.connecting":"machines.connect":A?"machines.scanning":"machines.next")})]})]})}const pP=[{id:"general",label:"settings.general",icon:J8},{id:"models",label:"settings.models",icon:j8},{id:"machines",label:"settings.machines",icon:y4},{id:"secrets",label:"settings.secrets",icon:Uj},{id:"network",label:"settings.network",icon:M8},{id:"about",label:"settings.about",icon:S0}];function gP({connections:e,onChanged:a,onClose:i,initialTab:r="general"}){const[s,u]=S.useState(r==="addMachine"?"machines":r),d=S.useRef(null);return S.useEffect(()=>{var f;(f=d.current)==null||f.scrollIntoView({block:"nearest",inline:"nearest"})},[s]),o.jsx(_S,{open:!0,onOpenChange:f=>{f||i()},children:o.jsxs(MS,{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")}),o.jsx("div",{className:"jv-settings-tabs",children:pP.map(f=>o.jsxs("button",{type:"button",ref:s===f.id?d:void 0,className:"jv-nav-item","aria-current":s===f.id?"page":void 0,onClick:()=>u(f.id),children:[o.jsx(f.icon,{}),x(f.label)]},f.id))})]}),o.jsx("main",{className:"jv-settings-content",children:s==="general"?o.jsx(dI,{}):s==="models"?o.jsx(lP,{connections:e,onChanged:a}):s==="machines"?o.jsx(hP,{adding:r==="addMachine"}):s==="secrets"?o.jsx(uP,{}):s==="network"?o.jsx(oP,{}):o.jsx(uI,{})})]})})}const Yb="Jarvy";let Xb=null,Di=null,Yl=null;function vP(){return document.querySelector('link[rel="icon"][type="image/png"]')}function yP(e){if(!(Di!=null&&Di.complete)||!Di.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(Di,0,0,a,a);const s=e>9?"9+":String(e),u=s.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 ${s.length>1?26:30}px system-ui, sans-serif`,r.textAlign="center",r.textBaseline="middle",r.fillText(s,a-u,u+2),i.toDataURL("image/png")}function Kb(e){document.title=e>0?`(${e>99?"99+":e}) ${Yb}`:Yb;const a=vP();if(!a)return;if(Xb??(Xb=a.href),Yl??(Yl=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){a.href=Xb,Yl&&!Yl.isConnected&&document.head.prepend(Yl);return}const i=yP(e);i&&(a.href=i,Yl==null||Yl.remove())}function xP(e){S.useEffect(()=>{Di||(Di=new Image,Di.src="/favicon.svg"),Di.complete?Kb(e):Di.onload=()=>Kb(e)},[e])}const Nd=50;function bP({chatId:e,ready:a,scroller:i,me:r,onError:s}){const[u,d]=S.useState([]),[f,m]=S.useState(!1),[v,y]=S.useState(!1),[g,b]=S.useState(!1),j=S.useRef(u),w=S.useRef(e),k=S.useRef(0),C=S.useRef(!1),T=S.useRef(!1);j.current=u,w.current=e,T.current=v;const M=S.useRef(null),E=S.useRef(!1),R=S.useRef(void 0),D=S.useRef(!0),A=S.useRef(!1),H=S.useRef(null),[U,Y]=S.useState(!1),z=S.useRef(0);S.useEffect(()=>{if(d([]),y(!1),A.current=!1,D.current=!0,!a||!e)return;let I=!0;const P=++k.current;return m(!0),Y(!1),z.current=0,fe.latestMessages(e,Nd).then(W=>{!I||P!==k.current||(E.current=!0,d(W.messages),y(W.hasOlder),m(!1))}).catch(W=>{I&&(m(!1),s(W))}),()=>{I=!1}},[e,a]);async function V(I){const P=j.current[0],W=++k.current;if(!P||P.chatId!==I){const ie=await fe.latestMessages(I,Nd);w.current===I&&W===k.current&&(d(ie.messages),y(ie.hasOlder),m(!1));return}const _=P.sequence-1,ae=await fe.messages(I,_);w.current!==I||W!==k.current||(d(ie=>[...ie.filter(L=>L.chatId===I&&L.sequence<=_),...ae.messages]),m(!1))}async function F(){const I=j.current[0],P=i.current;if(!(!I||!T.current||C.current)){C.current=!0,b(!0);try{const W=await fe.olderMessages(I.chatId,I.sequence,Nd);if(w.current!==I.chatId)return;M.current=P?P.scrollHeight-P.scrollTop:null,d(_=>{var ae;return((ae=_[0])==null?void 0:ae.id)===I.id?[...W.messages,..._]:_}),y(W.hasOlder)}catch(W){s(W)}finally{C.current=!1,b(!1)}}}S.useEffect(()=>{const I=i.current;if(!I)return;const P=new ResizeObserver(()=>{!A.current||!D.current||I.scrollHeight-I.scrollTop-I.clientHeight<8||I.scrollTo({top:I.scrollHeight,behavior:"instant"})}),W=()=>{P.disconnect(),P.observe(I);for(const ie of I.children)P.observe(ie)};W();const _=new MutationObserver(W);_.observe(I,{childList:!0});const ae=()=>{var ie;if(!A.current){D.current=!0,Y(!1);return}D.current=I.scrollHeight-I.scrollTop-I.clientHeight<160,Y(!D.current),D.current&&(z.current=((ie=j.current.at(-1))==null?void 0:ie.sequence)??0)};return ae(),I.addEventListener("scroll",ae,{passive:!0}),()=>{P.disconnect(),_.disconnect(),I.removeEventListener("scroll",ae)}},[i.current,e]),S.useLayoutEffect(()=>{const I=i.current,P=u.at(-1);if(I){if(M.current!==null)I.scrollTo({top:I.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if(E.current&&u.length){const W=()=>I.scrollTo({top:I.scrollHeight,behavior:"instant"});W(),requestAnimationFrame(W),E.current=!1,A.current=!0,D.current=!0}else P&&P.id!==R.current&&(D.current||P.senderId===r)&&I.scrollTo({top:I.scrollHeight,behavior:"smooth"});R.current=P==null?void 0:P.id,D.current&&(z.current=(P==null?void 0:P.sequence)??0)}},[u]),S.useEffect(()=>{const I=i.current,P=H.current;if(!I||!P||!v||!A.current)return;const W=new IntersectionObserver(_=>{var ae;(ae=_[0])!=null&&ae.isIntersecting&&A.current&&F()},{root:I,rootMargin:"400px 0px 0px 0px"});return W.observe(P),()=>W.disconnect()},[v,u,e,f]);async function J(I,P){if(j.current.some(L=>L.id===I)){G(I,P);return}const _=w.current,ae=await fe.message(I);if(ae.chatId!==_)return ae.chatId;const ie=await fe.olderMessages(ae.chatId,ae.sequence+1,Nd);w.current===ae.chatId&&(E.current=!0,d([...ie.messages,ae]),y(ie.hasOlder),requestAnimationFrame(()=>G(I,P)))}function G(I,P){var _;const W=(_=i.current)==null?void 0:_.querySelector(`[data-message="${I}"]`);W&&e5(W,P)}const $=U?u.filter(I=>I.sequence>z.current&&I.senderId!==r).length:0;return{messages:u,setMessages:d,loading:f,hasOlder:v,loadingOlder:g,refresh:V,top:H,away:U,unseen:$,toLatest:()=>{const I=i.current;I==null||I.scrollTo({top:I.scrollHeight,behavior:"smooth"})},toMessage:J,cancel:()=>{k.current++}}}function jP({ready:e,selected:a,messages:i,chats:r,chatList:s,setChats:u,onError:d}){const f=r.find(m=>m.id===a);S.useEffect(()=>{const m=a,v=i.at(-1);if(!e||!m||!v||v.chatId!==m)return;const y=()=>{const g=s.current.find(b=>b.id===m);document.visibilityState!=="visible"||((g==null?void 0:g.readSequence)??0)>=v.sequence&&!(g!=null&&g.hint)&&!(g!=null&&g.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)),fe.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 wP({onLogin:e}){const[a,i]=S.useState(""),[r,s]=S.useState(""),[u,d]=S.useState(!1),[f,m]=S.useState(!1),[v,y]=S.useState(null),[g,b]=S.useState(document.documentElement.classList.contains("dark"));async function j(w){if(w.preventDefault(),!f){m(!0),y(null);try{const k=await fe.login(a.trim(),r);s(""),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:Jb.map(w=>o.jsx("button",{type:"button",lang:w,"aria-pressed":to()===w,title:_p(w,"name"),onClick:()=>tj(w),children:_p(w,"short")},w))}),o.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Gd(g?"light":"dark"),b(!g)},"aria-label":x(g?"login.themeLight":"login.themeDark"),children:o.jsx(Be,{name:g?"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:w=>void j(w),"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:w=>i(w.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:w=>s(w.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 SP({selected:e,chats:a,transcript:i,openChat:r,setPane:s,paneRef:u,blocked:d}){const[f,m]=S.useState(null),[v,y]=S.useState(0);S.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 g(j,w,k){var T;if(j.type==="thread"){const M=a.find(E=>E.id===j.parentId);M&&r(M),s({kind:"thread",id:j.id,parentId:j.parentId,mode:"pane",focus:{id:w,passage:k}});return}((T=u.current)==null?void 0:T.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&s(null);const C=j.id===e;r(j),C?i.toMessage(w,k):m({chatId:j.id,id:w,passage:k})}function b(j){s({kind:"search",chat:j}),y(w=>w+1)}return S.useEffect(()=>{const j=w=>{var C,T;if(d||w.defaultPrevented||!(w.ctrlKey||w.metaKey)||w.key.toLowerCase()!=="f")return;const k=a.find(M=>M.id===e);k&&(((C=u.current)==null?void 0:C.kind)==="search"&&((T=document.activeElement)!=null&&T.closest(".jv-search-pane"))||(w.preventDefault(),b(k)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[d,a,e]),{openMessage:g,search:b,focusKey:v}}const kP=null;function Qb(){var Xi,Ki,ea,vi,se,ve;const[e,a]=S.useState("loading"),[i,r]=S.useState(""),[s,u]=S.useState([]),[d,f]=S.useState({}),m=S.useRef(new Map),[v,y]=S.useState([]),[g,b]=S.useState([]),[j,w]=S.useState([]),[k,C]=S.useState(null),[T,M]=S.useState({}),[E,R]=S.useState(null),[D,A]=S.useState(null),[H,U]=S.useState(null),[Y,z]=S.useState([]),[V,F]=S.useState(null),[J,G]=S.useState(!1),[$,K]=S.useState(!1),[I,P]=S.useState(!1),[W,_]=S.useState(""),[ae,ie]=S.useState(!1),[L,q]=S.useState(null),[ue,xe]=S.useState(!1),[be,je]=S.useState(420),[Ae,Re]=S.useState(0),[ye,Q]=S.useState([]),[he,ke]=S.useState(""),Ee=S.useRef(null),Ie=S.useRef(null),Ye=S.useRef(null),[Ke,gt]=S.useState(null),[rn,xn]=S.useState(null),[Hn,fa]=S.useState(null),ln=S.useRef(E);ln.current=E;const Ya=S.useRef(0),de=S.useRef(v);de.current=v;const Ce=S.useRef(L);Ce.current=L;const Fe=S.useMemo(()=>new lB(oB(i)),[i]);S.useEffect(()=>{const B=()=>Fe.save();return window.addEventListener("pagehide",B),()=>window.removeEventListener("pagehide",B)},[Fe]);const Ge=((Xi=j.find(B=>B.kind==="user"&&B.name===i))==null?void 0:Xi.id)??"",nt=bP({chatId:E,ready:e==="ready",scroller:Ee,me:Ge,onError:Qe}),{messages:Ht,setMessages:dn}=nt,Ut=SP({selected:E,chats:v,transcript:nt,openChat:ha,setPane:q,paneRef:Ce,blocked:!!H||!!V}),Rn=((Ki=v.find(B=>B.id===E))==null?void 0:Ki.botId)??D??((ea=s[0])==null?void 0:ea.id);async function Un(B){const re=(m.current.get(B)??0)+1;m.current.set(B,re);const me=await fe.botStatus(B);m.current.get(B)===re&&f(Te=>({...Te,[B]:me}))}S.useEffect(()=>{e==="ready"&&Rn&&Un(Rn).catch(Qe)},[e,Rn]);const Ot=((vi=v.find(B=>B.id===E&&B.type==="channel"))==null?void 0:vi.memberIds.filter(B=>s.some(re=>re.id===B)).join(","))??"";S.useEffect(()=>{if(e==="ready"&&Ot)for(const B of Ot.split(","))Un(B).catch(Qe)},[e,Ot]);async function Dn(B){var He,ct;const[re,me,Te,Ne,Ue,Pe]=await Promise.all([fe.bots(),fe.chats(),fe.modelConnections(),fe.sections(),fe.members(),fe.followedThreads()]);r(B),u(re.bots),y(me.chats),z(Te.connections),b(Ne.sections),w(Ue.members),Q(Pe.threads);const ze=me.chats.find(Ve=>Ve.type!=="thread");R((ze==null?void 0:ze.id)??null),ze&&M({[ze.id]:ze.readSequence}),A(((He=me.chats[0])==null?void 0:He.botId)??((ct=re.bots[0])==null?void 0:ct.id)??null),a("ready")}S.useEffect(()=>{Gd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),fe.me().then(B=>Dn(B.username)).catch(()=>a("login"))},[]),S.useEffect(()=>{if(e!=="ready")return;let B=!0;const re=new EventSource("/api/events"),me=async Ne=>{fe.followedThreads().then(Pe=>{B&&Q(Pe.threads)}).catch(()=>{}),Re(Pe=>Pe+1),await Yt();const Ue=ln.current;B&&Ue&&(!Ne||Ne===Ue)&&await pl(Ue)},Te=()=>void fe.sections().then(Ne=>{B&&b(Ne.sections)}).catch(Ne=>{B&&Qe(Ne)});return re.addEventListener("ready",()=>{var Ue;me().catch(Pe=>{B&&Qe(Pe)}),Te();const Ne=(Ue=de.current.find(Pe=>Pe.id===ln.current))==null?void 0:Ue.botId;Ne&&Un(Ne).catch(Pe=>{B&&Qe(Pe)}),fe.bots().then(Pe=>{B&&u(Pe.bots)}).catch(Pe=>{B&&Qe(Pe)})}),re.addEventListener("sections",Te),re.addEventListener("bots",()=>{fe.bots().then(Ne=>{B&&u(Ne.bots)}).catch(Ne=>{B&&Qe(Ne)}),me().catch(Ne=>{B&&Qe(Ne)})}),re.addEventListener("inbox",()=>void me().catch(Ne=>{B&&Qe(Ne)})),re.addEventListener("chat",Ne=>{const Ue=JSON.parse(Ne.data);typeof Ue.chatId=="string"&&me(Ue.chatId).catch(Pe=>{B&&Qe(Pe)})}),re.addEventListener("bot",Ne=>{var ze;const Ue=JSON.parse(Ne.data),Pe=Ue.status;m.current.set(Ue.botId,(m.current.get(Ue.botId)??0)+1),f(He=>({...He,[Ue.botId]:Pe})),Pe.error&&((ze=de.current.find(He=>He.id===ln.current))==null?void 0:ze.botId)===Pe.botId&&ke(Gz(Pe)),(Pe.status==="idle"||Pe.status==="stop")&&fe.bots().then(He=>{B&&u(He.bots)}).catch(He=>{B&&Qe(He)})}),re.onerror=()=>{fe.me().catch(Ne=>{B&&Ne instanceof hr&&Ne.status===401&&a("login")})},()=>{B=!1,re.close(),nt.cancel(),Ya.current++}},[e]),jP({ready:e==="ready",selected:E,messages:Ht,chats:v,chatList:de,setChats:y,onError:Qe}),xP(e==="ready"?v.reduce((B,re)=>B+re.alerts,0):0),S.useEffect(()=>{if(!he)return;const B=setTimeout(()=>ke(""),4800);return()=>clearTimeout(B)},[he]),S.useEffect(()=>{const B=re=>{re.defaultPrevented||H||V||(re.key==="Escape"&&(G(!1),K(!1),P(!1)),(re.ctrlKey||re.metaKey)&&re.key.toLowerCase()==="k"&&(re.preventDefault(),P(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-search"))==null?void 0:me.focus()})))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[H,V]),S.useEffect(()=>{const B=window.matchMedia("(max-width: 620px)"),re=()=>{B.matches||P(!1)};return B.addEventListener("change",re),()=>B.removeEventListener("change",re)},[]);function Qe(B){if(B instanceof hr&&B.status===401){a("login");return}ke(Gt(B,"common.failed"))}async function Yt(){const B=++Ya.current,re=await fe.chats();return B===Ya.current&&y(re.chats),re.chats}async function pl(B){await nt.refresh(B)}async function di(){const[B,re]=await Promise.all([fe.modelConnections(),fe.bots()]);z(B.connections),u(re.bots)}const fi=()=>void fe.members().then(B=>w(B.members)).catch(Qe);function bn(B){u(re=>re.map(me=>me.id===B.id?B:me)),fi()}function ha(B){var me;const re=nB(B);re?q({kind:"thread",id:re,parentId:B.id,mode:"pane",summary:((me=B.hint)==null?void 0:me.kind)==="note"}):B.id!==ln.current&&q(null),xe(!1),M(Te=>({...Te,[B.id]:B.readSequence})),R(B.id),B.botId&&A(B.botId),P(!1),G(!1),K(!1)}const gl=B=>q((L==null?void 0:L.kind)==="info"&&L.page===B?null:{kind:"info",page:B});function ma(B){y(re=>re.some(me=>me.id===B.id)?re.map(me=>me.id===B.id?B:me):[B,...re])}async function ho(B){if(!ae){ie(!0);try{const re=await fe.createChat(B);ma(re),ha(re),requestAnimationFrame(()=>{var me;return(me=document.querySelector("#jarvy-composer"))==null?void 0:me.focus()})}catch(re){Qe(re)}finally{ie(!1)}}}async function Xa(){if(!ae){ie(!0);try{const B=await fe.createBot(EL(si(j).map(me=>me.name))),re=await fe.createChat(B.id);u(me=>[...me,B]),ma(re),fi(),ha(re)}catch(B){Qe(B)}finally{ie(!1)}}}async function fn(B){try{await fe.deleteChat(B.id),await Yt(),ln.current===B.id&&R(null),ke(x("app.channelDeleted"))}catch(re){Qe(re)}}async function Bt(B,re){try{ma(await fe.pin(B.id,re))}catch(me){Qe(me)}}async function Vt(B,re){try{ma(await fe.mute(B.id,re))}catch(me){Qe(me)}}async function hi(B,re){try{await fe.deleteBot(B.id,re);const me=new Set(v.filter(Te=>Te.type==="dm"&&Te.botId===B.id).map(Te=>Te.id));y(Te=>Te.filter(Ne=>!me.has(Ne.id)).map(Ne=>Ne.memberIds.includes(B.id)?{...Ne,memberIds:Ne.memberIds.filter(Ue=>Ue!==B.id)}:Ne)),u(Te=>Te.filter(Ne=>Ne.id!==B.id)),fi(),ln.current&&me.has(ln.current)&&R(null),H===B.id&&U(null),ke(x("app.botDeleted",{name:B.name}))}catch(me){Qe(me)}}async function mi(B,re,me,Te,Ne){const Ue=E;await fe.send(Ue,B,re,me,!1,Te,Ne);const Pe=de.current.find(He=>He.id===Ue),ze=(Pe==null?void 0:Pe.type)==="channel"?[...new Set(kg(B,si(j)).filter(He=>!Pe.memberIds.includes(He.member.id)).map(He=>He.member.name))]:[];ze.length&&ke(x("app.notInChannel",{names:ze.join(x("common.listSeparator")),count:ze.length})),Promise.all([pl(Ue),Yt()]).catch(Qe)}function Ka(B,re){fe.addMember(B,re.id).then(me=>{ma(me),ke(x("app.memberAdded",{name:re.name,channel:me.title}))}).catch(Qe)}async function Qa(B){try{const re=await fe.openThread(B.id);q({kind:"thread",id:re.id,parentId:B.chatId,mode:"pane"})}catch(re){Qe(re)}}function Da(B,re){const me=v.find(Te=>Te.id===B.parentId);me&&ha(me),q(re?{kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"}:null)}function Zn(B){U(null);const re=v.find(me=>me.id===(B.type==="thread"?B.parentId:B.id));re&&ha(re),B.type==="thread"&&q({kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"})}async function Za(B,re,me){try{const Te=await fe.react(B.id,re,me);dn(Ne=>Ne.map(Ue=>Ue.id===Te.id?{...Ue,reactions:Te.reactions}:Ue))}catch(Te){Qe(Te)}}async function pa(B,re){try{const me=await fe.fold(B.id,re);dn(Te=>Te.map(Ne=>Ne.id===me.id?{...Ne,folded:me.folded}:Ne))}catch(me){Qe(me)}}function ga(B){b5(Fe,B,j)}const pi=(B,re)=>B?void nt.toMessage(B,re).then(async me=>{me&&Ut.openMessage(await fe.chat(me),B,re)}).catch(()=>ke(x("app.sourceGone"))):ke(x("app.sourceGone"));function vl(B){Q(re=>re.map(me=>me.id===B.id?{...me,...B}:me)),fe.followedThreads().then(re=>Q(re.threads)).catch(()=>{})}function va(B){B.preventDefault();const re=Te=>je(Math.min(Math.max(340,window.innerWidth-Te.clientX),Math.round(window.innerWidth*.6))),me=()=>{window.removeEventListener("pointermove",re),window.removeEventListener("pointerup",me),document.body.style.cursor=""};window.addEventListener("pointermove",re),window.addEventListener("pointerup",me),document.body.style.cursor="col-resize"}async function Nr(){try{await Fe.clear(B=>fe.removeAttachment(B)),await fe.logout(),a("login"),G(!1),F(null),m.current.clear(),f({}),q(null),Q([]),r(""),R(null),y([]),u([]),z([]),dn([])}catch(B){Qe(B)}}const Ja=e==="ready"&&v.some(B=>B.id===E);S.useEffect(()=>{const B=Ee.current;if(!B)return;let re=0,me=B.clientHeight;const Te=()=>{re=B.scrollHeight-B.scrollTop-B.clientHeight},Ne=new ResizeObserver(()=>{B.clientHeight!==me&&(me=B.clientHeight,B.scrollTo({top:B.scrollHeight-B.clientHeight-re,behavior:"instant"}))}),Ue=new MutationObserver(Te);return Te(),B.addEventListener("scroll",Te,{passive:!0}),Ne.observe(B),Ue.observe(B,{childList:!0,subtree:!0,characterData:!0}),()=>{Ne.disconnect(),Ue.disconnect(),B.removeEventListener("scroll",Te)}},[Ja]);const Wa=v.find(B=>B.id===E),qn=(Wa==null?void 0:Wa.type)==="channel",Vi=QB(e==="ready"?((se=v.find(B=>B.id===E&&B.type==="dm"))==null?void 0:se.botId)??void 0:void 0,Ae);if(e==="loading")return o.jsx("div",{className:"jarvy-loading",children:x("app.connecting")});if(e==="login")return o.jsx(wP,{onLogin:B=>void Dn(B).catch(Qe)});const Xt=v.find(B=>B.id===E),on=s.find(B=>B.id===((Xt==null?void 0:Xt.botId)??D))??s[0],Jn=!!(on!=null&&on.connectionId),Wn=qn||Jn,$i=(on==null?void 0:on.name)??"Jarvy",xt=on?d[on.id]:void 0,Rt=xt!=null&&xt.error?x("activity.error"):(xt==null?void 0:xt.status)==="running"?QS(xt.activity):"",sn=(ve=[...Ht].reverse().find(B=>{var re;return((re=B.question)==null?void 0:re.state)==="pending"}))==null?void 0:ve.id,jn=(L==null?void 0:L.kind)==="thread"?L:null,Gi=(jn==null?void 0:jn.mode)==="full",Er=qn?Wa:void 0,Tr=s.find(B=>B.id===H),gi=new Set(Object.values(d).filter(B=>B.status==="running"&&B.activity!=="asking").map(B=>B.botId)),Yi=new Set(Object.values(d).filter(B=>B.activity==="asking").map(B=>B.botId));return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ui-app","data-nav":I?"":void 0,"data-pane":L&&!Gi?"":void 0,style:{"--ui-pane":`${be}px`},children:[o.jsx(iB,{username:i,chats:v,sections:g,bots:s,members:j,followed:ye,followedOpen:ue&&!Gi,working:gi,asking:Yi,selected:ue?null:E,filter:W,creating:ae,createMenu:$,accountMenu:J,onFilterChange:_,onOpenFollowed:()=>{xe(!0),q(null),P(!1)},onOpenChat:ha,onOpenBot:B=>void ho(B.id),onOpenMenu:(B,re)=>xn({target:B,at:re}),onEditSection:B=>C({kind:"section",section:B}),onCreate:B=>{if(B==="bot")return void Xa();C({kind:B}),K(!1)},onFind:Ut.openMessage,onOpenFound:Zn,onError:Qe,onToggleCreate:B=>{K(B),G(!1)},onToggleAccount:B=>{G(B),K(!1)},onSettings:()=>{G(!1),F("general")},onToggleTheme:()=>{Gd(document.documentElement.classList.contains("dark")?"light":"dark"),G(!1)},onLogOut:()=>void Nr()}),o.jsx(XB,{chat:Xt,inChannel:qn,bots:s,members:j,meId:Ge,drafts:Fe,composeReady:Wn,botName:$i,activeBot:on,status:xt,connections:Y,activity:Rt,history:nt,divider:T[(Xt==null?void 0:Xt.id)??""]??(Xt==null?void 0:Xt.readSequence)??0,activeQuestion:sn,pane:L,onPane:q,onToggleInfo:gl,find:Ut,onNav:()=>P(!0),onBot:B=>U(B),hasBotDirects:Vi.length>0,onInvite:Ka,onQuote:ga,onReply:B=>void Qa(B),onReact:(B,re,me)=>void Za(B,re,me),onFold:(B,re)=>void pa(B,re),onJump:pi,onSettled:B=>dn(re=>re.map(me=>me.id===B.id?B:me)),onPreview:(B,re)=>gt({files:B,index:re}),onSend:mi,notice:ke,onSaveNote:async B=>{try{ma(await fe.setNote(Xt.id,B))}catch(re){throw Qe(re),re}},createBot:()=>void Xa(),creating:ae,updateBot:bn,onManageModels:()=>F("models"),error:Qe,chatArea:Ie,transcript:Ee,composeWrap:Ye,hidden:Gi||ue,onOpenThread:B=>q({kind:"thread",id:B,parentId:Xt.id,mode:"pane"})}),o.jsx(lI,{pane:L,followedView:ue,followed:ye,chats:v,sections:g,members:j,bots:s,statuses:d,meId:Ge,drafts:Fe,tick:Ae,paneChannel:Er,activeBot:on,botDirects:Vi,find:Ut,onPane:q,onNav:()=>P(!0),onBackToChannel:Da,onAddMembers:B=>C({kind:"members",chat:B}),onOpenBot:U,onPin:B=>void Bt(B,!B.pinned),onMute:B=>void Vt(B,!B.muted),onDeleteChannel:B=>fa({kind:"chat",chat:B}),onChannelSaved:ma,onThreadChanged:vl,onInvite:Ka,onPreview:(B,re)=>gt({files:B,index:re}),onNotice:ke,onError:Qe,paneWidth:be,onResize:va})]}),I&&o.jsx("div",{className:"ui-nav-scrim",onClick:()=>P(!1),role:"presentation"}),V&&o.jsx(gP,{connections:Y,initialTab:V,onChanged:di,onClose:()=>F(null)}),o.jsx(GL,{dialog:k,entryMenu:rn,confirm:Hn,preview:Ke,infoBot:Tr,bots:s,statuses:d,chats:v,sections:g,members:j,connections:Y,meId:Ge,onDialog:C,onEntryMenu:xn,onConfirm:fa,onPreview:gt,onInfoBot:U,onSettings:F,onChannelInfo:B=>{ha(B),q({kind:"info",page:"main"})},onOpenChatId:B=>{R(B),P(!1)},chatSaved:ma,openChat:ha,onSectionSaved:B=>{b(re=>re.some(me=>me.id===B.id)?re.map(me=>me.id===B.id?B:me):[...re,B]),C(null)},onSectionDeleted:B=>{C(null),b(re=>re.filter(me=>me.id!==B)),Yt().catch(Qe)},updateBot:bn,openAnywhere:Zn,removeChannel:fn,deleteBot:hi,pinChat:Bt,muteChat:Vt}),he&&o.jsx("div",{className:"ui-toast",role:"status",children:he}),kP]})}function CP(){const e=`https://${location.host}${location.pathname}${location.search}`;return o.jsxs("div",{className:"jv-insecure",role:"status",children:[o.jsx(Q8,{"aria-hidden":"true"}),o.jsx("span",{children:x("connection.insecure")}),o.jsx("a",{href:e,children:x("connection.useHttps")})]})}function NP(){return nj(),window.isSecureContext?o.jsx(Qb,{}):o.jsxs("div",{className:"jv-insecure-shell",children:[o.jsx(CP,{}),o.jsx(Qb,{})]})}EC.createRoot(document.getElementById("root")).render(o.jsx(S.StrictMode,{children:o.jsx(NP,{})}));
|