@goodfish/jarvy 0.12.0 → 0.12.1
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 +18 -0
- package/THIRD_PARTY_NOTICE.md +2 -0
- package/dist/server/cli.js +187 -86
- package/dist/web/assets/data-uMIXh-O1.js +1 -0
- package/dist/web/assets/index-BcZqnyAQ.js +837 -0
- package/dist/web/assets/index-QCSgDIcx.css +1 -0
- package/dist/web/index.html +2 -2
- package/licenses/UNICODE-LICENSE-V3.txt +39 -0
- package/package.json +2 -1
- package/dist/web/assets/index-Bt8AJEH6.css +0 -1
- package/dist/web/assets/index-tNqSfXZo.js +0 -787
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
var tC=Object.defineProperty;var Ly=e=>{throw TypeError(e)};var nC=(e,a,i)=>a in e?tC(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i;var Jt=(e,a,i)=>nC(e,typeof a!="symbol"?a+"":a,i),By=(e,a,i)=>a.has(e)||Ly("Cannot "+i);var Un=(e,a,i)=>(By(e,a,"read from private field"),i?i.call(e):a.get(e)),Iy=(e,a,i)=>a.has(e)?Ly("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,i),qm=(e,a,i,r)=>(By(e,a,"write to private field"),r?r.call(e,i):a.set(e,i),i);function aC(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 N0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Um={exports:{}},vc={};/**
|
|
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 Py;function iC(){if(Py)return vc;Py=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 vc.Fragment=a,vc.jsx=i,vc.jsxs=i,vc}var Hy;function rC(){return Hy||(Hy=1,Um.exports=iC()),Um.exports}var o=rC(),Fm={exports:{}},tt={};/**
|
|
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 qy;function lC(){if(qy)return tt;qy=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"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),j=Symbol.for("react.view_transition"),b=Symbol.iterator;function S(B){return B===null||typeof B!="object"?null:(B=b&&B[b]||B["@@iterator"],typeof B=="function"?B:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function A(B,W,fe){this.props=B,this.context=W,this.refs=T,this.updater=fe||k}A.prototype.isReactComponent={},A.prototype.setState=function(B,W){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,W,"setState")},A.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function C(){}C.prototype=A.prototype;function M(B,W,fe){this.props=B,this.context=W,this.refs=T,this.updater=fe||k}var O=M.prototype=new C;O.constructor=M,N(O,A.prototype),O.isPureReactComponent=!0;var _=Array.isArray;function I(){}var V={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function L(B,W,fe){var me=fe.ref;return{$$typeof:e,type:B,key:W,ref:me!==void 0?me:null,props:fe}}function H(B,W){return L(B.type,W,B.props)}function q(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Z(B){var W={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(fe){return W[fe]})}var $=/\/+/g;function F(B,W){return typeof B=="object"&&B!==null&&B.key!=null?Z(""+B.key):W.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(I,I):(B.status="pending",B.then(function(W){B.status==="pending"&&(B.status="fulfilled",B.value=W)},function(W){B.status==="pending"&&(B.status="rejected",B.reason=W)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function U(B,W,fe,me,pe){var Ce=typeof B;(Ce==="undefined"||Ce==="boolean")&&(B=null);var Ae=!1;if(B===null)Ae=!0;else switch(Ce){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(B.$$typeof){case e:case a:Ae=!0;break;case y:return Ae=B._init,U(Ae(B._payload),W,fe,me,pe)}}if(Ae)return pe=pe(B),Ae=me===""?"."+F(B,0):me,_(pe)?(fe="",Ae!=null&&(fe=Ae.replace($,"$&/")+"/"),U(pe,W,fe,"",function(Ee){return Ee})):pe!=null&&(q(pe)&&(pe=H(pe,fe+(pe.key==null||B&&B.key===pe.key?"":(""+pe.key).replace($,"$&/")+"/")+Ae)),W.push(pe)),1;Ae=0;var xe=me===""?".":me+":";if(_(B))for(var oe=0;oe<B.length;oe++)me=B[oe],Ce=xe+F(me,oe),Ae+=U(me,W,fe,Ce,pe);else if(oe=S(B),typeof oe=="function")for(B=oe.call(B),oe=0;!(me=B.next()).done;)me=me.value,Ce=xe+F(me,oe++),Ae+=U(me,W,fe,Ce,pe);else if(Ce==="object"){if(typeof B.then=="function")return U(K(B),W,fe,me,pe);throw W=String(B),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function P(B,W,fe){if(B==null)return B;var me=[],pe=0;return U(B,me,"","",function(Ce){return W.call(fe,Ce,pe++)}),me}function ie(B){if(B._status===-1){var W=B._result,fe=W();fe.then(function(me){(B._status===0||B._status===-1)&&(B._status=1,B._result=me,fe.status===void 0&&(fe.status="fulfilled",fe.value=me))},function(me){(B._status===0||B._status===-1)&&(B._status=2,B._result=me,fe.status===void 0&&(fe.status="rejected",fe.reason=me))}),B._status===-1&&(B._status=0,B._result=fe)}if(B._status===1)return B._result.default;throw B._result}var z=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)};function ne(B){var W=V.T,fe={};fe.types=W!==null?W.types:null,V.T=fe;try{var me=B(),pe=V.S;pe!==null&&pe(fe,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(I,z)}catch(Ce){z(Ce)}finally{W!==null&&fe.types!==null&&(W.types=fe.types),V.T=W}}function re(B){var W=V.T;if(W!==null){var fe=W.types;fe===null?W.types=[B]:fe.indexOf(B)===-1&&fe.push(B)}else ne(re.bind(null,B))}var R={map:P,forEach:function(B,W,fe){P(B,function(){W.apply(this,arguments)},fe)},count:function(B){var W=0;return P(B,function(){W++}),W},toArray:function(B){return P(B,function(W){return W})||[]},only:function(B){if(!q(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return tt.Activity=g,tt.Children=R,tt.Component=A,tt.Fragment=i,tt.Profiler=s,tt.PureComponent=M,tt.StrictMode=r,tt.Suspense=m,tt.ViewTransition=j,tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,tt.__COMPILER_RUNTIME={__proto__:null,c:function(B){return V.H.useMemoCache(B)}},tt.addTransitionType=re,tt.cache=function(B){return function(){return B.apply(null,arguments)}},tt.cacheSignal=function(){return null},tt.cloneElement=function(B,W,fe){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var me=N({},B.props),pe=B.key;if(W!=null)for(Ce in W.key!==void 0&&(pe=""+W.key),W)!X.call(W,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&W.ref===void 0||(me[Ce]=W[Ce]);var Ce=arguments.length-2;if(Ce===1)me.children=fe;else if(1<Ce){for(var Ae=Array(Ce),xe=0;xe<Ce;xe++)Ae[xe]=arguments[xe+2];me.children=Ae}return L(B.type,pe,me)},tt.createContext=function(B){return B={$$typeof:d,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:u,_context:B},B},tt.createElement=function(B,W,fe){var me,pe={},Ce=null;if(W!=null)for(me in W.key!==void 0&&(Ce=""+W.key),W)X.call(W,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(pe[me]=W[me]);var Ae=arguments.length-2;if(Ae===1)pe.children=fe;else if(1<Ae){for(var xe=Array(Ae),oe=0;oe<Ae;oe++)xe[oe]=arguments[oe+2];pe.children=xe}if(B&&B.defaultProps)for(me in Ae=B.defaultProps,Ae)pe[me]===void 0&&(pe[me]=Ae[me]);return L(B,Ce,pe)},tt.createRef=function(){return{current:null}},tt.forwardRef=function(B){return{$$typeof:f,render:B}},tt.isValidElement=q,tt.lazy=function(B){return{$$typeof:y,_payload:{_status:-1,_result:B},_init:ie}},tt.memo=function(B,W){return{$$typeof:p,type:B,compare:W===void 0?null:W}},tt.startTransition=ne,tt.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},tt.use=function(B){return V.H.use(B)},tt.useActionState=function(B,W,fe){return V.H.useActionState(B,W,fe)},tt.useCallback=function(B,W){return V.H.useCallback(B,W)},tt.useContext=function(B){return V.H.useContext(B)},tt.useDebugValue=function(){},tt.useDeferredValue=function(B,W){return V.H.useDeferredValue(B,W)},tt.useEffect=function(B,W){return V.H.useEffect(B,W)},tt.useEffectEvent=function(B){return V.H.useEffectEvent(B)},tt.useId=function(){return V.H.useId()},tt.useImperativeHandle=function(B,W,fe){return V.H.useImperativeHandle(B,W,fe)},tt.useInsertionEffect=function(B,W){return V.H.useInsertionEffect(B,W)},tt.useLayoutEffect=function(B,W){return V.H.useLayoutEffect(B,W)},tt.useMemo=function(B,W){return V.H.useMemo(B,W)},tt.useOptimistic=function(B,W){return V.H.useOptimistic(B,W)},tt.useReducer=function(B,W,fe){return V.H.useReducer(B,W,fe)},tt.useRef=function(B){return V.H.useRef(B)},tt.useState=function(B){return V.H.useState(B)},tt.useSyncExternalStore=function(B,W,fe){return V.H.useSyncExternalStore(B,W,fe)},tt.useTransition=function(){return V.H.useTransition()},tt.version="19.3.0",tt}var Uy;function E0(){return Uy||(Uy=1,Fm.exports=lC()),Fm.exports}var w=E0();const oC=N0(w),Lc=aC({__proto__:null,default:oC},[w]);var Vm={exports:{}},yc={},$m={exports:{}},Gm={};/**
|
|
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 Fy;function sC(){return Fy||(Fy=1,(function(e){function a(K,U){var P=K.length;K.push(U);e:for(;0<P;){var ie=P-1>>>1,z=K[ie];if(0<s(z,U))K[ie]=U,K[P]=z,P=ie;else break e}}function i(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var U=K[0],P=K.pop();if(P!==U){K[0]=P;e:for(var ie=0,z=K.length,ne=z>>>1;ie<ne;){var re=2*(ie+1)-1,R=K[re],B=re+1,W=K[B];if(0>s(R,P))B<z&&0>s(W,R)?(K[ie]=W,K[B]=P,ie=B):(K[ie]=R,K[re]=P,ie=re);else if(B<z&&0>s(W,P))K[ie]=W,K[B]=P,ie=B;else break e}}return U}function s(K,U){var P=K.sortIndex-U.sortIndex;return P!==0?P:K.id-U.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=[],p=[],y=1,g=null,j=3,b=!1,S=!1,k=!1,N=!1,T=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function M(K){for(var U=i(p);U!==null;){if(U.callback===null)r(p);else if(U.startTime<=K)r(p),U.sortIndex=U.expirationTime,a(m,U);else break;U=i(p)}}function O(K){if(k=!1,M(K),!S)if(i(m)!==null)S=!0,_||(_=!0,q());else{var U=i(p);U!==null&&F(O,U.startTime-K)}}var _=!1,I=-1,V=5,X=-1;function L(){return N?!0:!(e.unstable_now()-X<V)}function H(){if(N=!1,_){var K=e.unstable_now();X=K;var U=!0;try{e:{S=!1,k&&(k=!1,A(I),I=-1),b=!0;var P=j;try{t:{for(M(K),g=i(m);g!==null&&!(g.expirationTime>K&&L());){var ie=g.callback;if(typeof ie=="function"){g.callback=null,j=g.priorityLevel;var z=ie(g.expirationTime<=K);if(K=e.unstable_now(),typeof z=="function"){g.callback=z,M(K),U=!0;break t}g===i(m)&&r(m),M(K)}else r(m);g=i(m)}if(g!==null)U=!0;else{var ne=i(p);ne!==null&&F(O,ne.startTime-K),U=!1}}break e}finally{g=null,j=P,b=!1}U=void 0}}finally{U?q():_=!1}}}var q;if(typeof C=="function")q=function(){C(H)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,$=Z.port2;Z.port1.onmessage=H,q=function(){$.postMessage(null)}}else q=function(){T(H,0)};function F(K,U){I=T(function(){K(e.unstable_now())},U)}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"):V=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(K){switch(j){case 1:case 2:case 3:var U=3;break;default:U=j}var P=j;j=U;try{return K()}finally{j=P}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(K,U){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var P=j;j=K;try{return U()}finally{j=P}},e.unstable_scheduleCallback=function(K,U,P){var ie=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ie+P:ie):P=ie,K){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=P+z,K={id:y++,callback:U,priorityLevel:K,startTime:P,expirationTime:z,sortIndex:-1},P>ie?(K.sortIndex=P,a(p,K),i(m)===null&&K===i(p)&&(k?(A(I),I=-1):k=!0,F(O,P-ie))):(K.sortIndex=z,a(m,K),S||b||(S=!0,_||(_=!0,q()))),K},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(K){var U=j;return function(){var P=j;j=U;try{return K.apply(this,arguments)}finally{j=P}}}})(Gm)),Gm}var Vy;function cC(){return Vy||(Vy=1,$m.exports=sC()),$m.exports}var Ym={exports:{}},Bn={};/**
|
|
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 $y;function uC(){if($y)return Bn;$y=1;var e=E0();function a(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j])}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,j){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:b===d?d:""+b,children:y,containerInfo:g,implementation:j}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.browser=function(y){return{$$typeof:u,_reason:y}},Bn.createPortal=function(y,g){var j=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,j)},Bn.flushSync=function(y){var g=m.T,j=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=g,r.p=j,r.d.f()}},Bn.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))},Bn.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Bn.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var j=g.as,b=p(j,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;j==="style"?r.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:k}):j==="script"&&r.d.X(y,{crossOrigin:b,integrity:S,fetchPriority:k,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Bn.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var j=p(g.as,g.crossOrigin);r.d.M(y,{crossOrigin:j,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)},Bn.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var j=g.as,b=p(j,g.crossOrigin);r.d.L(y,j,{crossOrigin:b,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})}},Bn.preloadModule=function(y,g){if(typeof y=="string")if(g){var j=p(g.as,g.crossOrigin);r.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:j,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)},Bn.requestFormReset=function(y){r.d.r(y)},Bn.unstable_batchedUpdates=function(y,g){return y(g)},Bn.useFormState=function(y,g,j){return m.H.useFormState(y,g,j)},Bn.useFormStatus=function(){return m.H.useHostTransitionStatus()},Bn.version="19.3.0",Bn}var Gy;function bj(){if(Gy)return Ym.exports;Gy=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(),Ym.exports=uC(),Ym.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 Yy;function dC(){if(Yy)return yc;Yy=1;var e=cC(),a=E0(),i=bj();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 p(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 v=h.alternate;if(v===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===l)return m(h),t;if(v===c)return m(h),n;v=v.sibling}throw Error(r(188))}if(l.return!==c.return)l=h,c=v;else{for(var E=!1,D=h.child;D;){if(D===l){E=!0,l=h,c=v;break}if(D===c){E=!0,c=h,l=v;break}D=D.sibling}if(!E){for(D=v.child;D;){if(D===l){E=!0,l=v,c=h;break}if(D===c){E=!0,c=v,l=h;break}D=D.sibling}if(!E)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,v){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,c,h,v)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&g(t.child,n,l,c,h,v))return!0;t=t.sibling}return!1}function j(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 b(t){var n=!1;for(t=t.return;t!==null&&(t.tag===4&&(n=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return n}function S(t){var n=[null,null],l=j(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 N(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,A=null;function C(t,n,l){return t===l?!0:t===n?(T=t,!0):!1}function M(t,n,l){return t===l?(A=t,!1):t===n?(A!==null&&(T=t),!0):!1}function O(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 _(t,n,l){for(var c=0,h=t;h;h=l(h))c++;h=0;for(var v=n;v;v=l(v))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 I=Object.assign,V=Symbol.for("react.element"),X=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),F=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),re=Symbol.for("react.legacy_hidden"),R=Symbol.for("react.memo_cache_sentinel"),B=Symbol.for("react.view_transition"),W=Symbol.for("react.recoverable"),fe=Symbol.iterator;function me(t){return t===null||typeof t!="object"?null:(t=fe&&t[fe]||t["@@iterator"],typeof t=="function"?t:null)}var pe=Symbol.for("react.client.reference");function Ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===pe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case H:return"Fragment";case Z:return"Profiler";case q:return"StrictMode";case U:return"Suspense";case P:return"SuspenseList";case ne:return"Activity";case B:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case L:return"Portal";case F:return t.displayName||"Context";case $: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 ie:return n=t.displayName||null,n!==null?n:Ce(t.type)||"Memo";case z:n=t._payload,t=t._init;try{return Ce(t(n))}catch{}}return null}var Ae=Array.isArray,xe=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee={pending:!1,data:null,method:null,action:null},Xe=[],Be=-1;function at(t){return{current:t}}function Qe(t){0>Be||(t.current=Xe[Be],Xe[Be]=null,Be--)}function We(t,n){Be++,Xe[Be]=t.current,t.current=n}var Pt=at(null),vn=at(null),en=at(null),cn=at(null);function $n(t,n){switch(We(en,n),We(vn,t),We(Pt,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?$2(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=$2(n),t=G2(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Qe(Pt),We(Pt,t)}function An(){Qe(Pt),Qe(vn),Qe(en)}function Za(t){var n=t.memoizedState;n!==null&&(Wo._currentValue=n.memoizedState,We(cn,t)),n=Pt.current;var l=G2(n,t.type);n!==l&&(We(vn,t),We(Pt,l))}function ge(t){vn.current===t&&(Qe(Pt),Qe(vn)),cn.current===t&&(Qe(cn),Wo._currentValue=Ee)}var ke,Ye;function Ke(t){if(ke===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);ke=n&&n[1]||"",Ye=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ke+t+Ye}var ct=!1;function At(t,n){if(!t||ct)return"";ct=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(n){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(Oe){var J=Oe}Reflect.construct(t,[],ye)}else{try{ye.call()}catch(Oe){J=Oe}ye=!1;try{var le=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ye=!0,new t}finally{ye&&(le!==void 0?Object.defineProperty(t.prototype,"props",le):delete t.prototype.props)}}}else{try{throw Error()}catch(Oe){J=Oe}(ye=t())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(Oe){if(Oe&&J&&typeof Oe.stack=="string")return[Oe.stack,J.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 v=c.DetermineComponentFrameRoot(),E=v[0],D=v[1];if(E&&D){var Y=E.split(`
|
|
44
|
+
`),te=D.split(`
|
|
45
|
+
`);for(h=c=0;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;for(;h<te.length&&!te[h].includes("DetermineComponentFrameRoot");)h++;if(c===Y.length||h===te.length)for(c=Y.length-1,h=te.length-1;1<=c&&0<=h&&Y[c]!==te[h];)h--;for(;1<=c&&0<=h;c--,h--)if(Y[c]!==te[h]){if(c!==1||h!==1)do if(c--,h--,0>h||Y[c]!==te[h]){var ce=`
|
|
46
|
+
`+Y[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{ct=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Ke(l):""}function Xt(t,n){switch(t.tag){case 26:case 27:case 5:return Ke(t.type);case 16:return Ke("Lazy");case 13:return t.child!==n&&n!==null?Ke("Suspense Fallback"):Ke("Suspense");case 19:return Ke("SuspenseList");case 0:case 15:return At(t.type,!1);case 11:return At(t.type.render,!1);case 1:return At(t.type,!0);case 31:return Ke("Activity");case 30:return Ke("ViewTransition");default:return""}}function de(t){try{var n="",l=null;do n+=Xt(t,l),l=t,t=t.return;while(t);return n}catch(c){return`
|
|
47
|
+
Error generating stack: `+c.message+`
|
|
48
|
+
`+c.stack}}var _e=Object.prototype.hasOwnProperty,Re=e.unstable_scheduleCallback,Ie=e.unstable_cancelCallback,Fe=e.unstable_shouldYield,it=e.unstable_requestPaint,Gt=e.unstable_now,za=e.unstable_getCurrentPriorityLevel,Gn=e.unstable_ImmediatePriority,St=e.unstable_UserBlockingPriority,yn=e.unstable_NormalPriority,go=e.unstable_LowPriority,Xi=e.unstable_IdlePriority,yl=e.log,ga=e.unstable_setDisableYieldValue,gi=null,Ht=null;function tn(t){if(typeof yl=="function"&&ga(t),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(gi,t)}catch{}}var on=Math.clz32?Math.clz32:Wa,vi=Math.log,Ja=Math.LN2;function Wa(t){return t>>>=0,t===0?32:31-(vi(t)/Ja|0)|0}var ei=256,Da=262144,aa=4194304;function ti(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 va(t,n,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,v=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var D=c&134217727;return D!==0?(c=D&~v,c!==0?h=ti(c):(E&=D,E!==0?h=ti(E):l||(l=D&~t,l!==0&&(h=ti(l))))):(D=c&~v,D!==0?h=ti(D):E!==0?h=ti(E):l||(l=c&~t,l!==0&&(h=ti(l)))),h===0?0:n!==0&&n!==h&&(n&v)===0&&(v=h&-h,l=n&-n,v>=l||v===32&&(l&4194048)!==0)?n:h}function ia(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function yi(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-on(l),h=1<<c;n|=t[c],l&=~h}return n}function xl(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 ya(){var t=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),t}function Nr(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function ni(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Er(t,n,l,c,h,v){var E=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 D=t.entanglements,Y=t.expirationTimes,te=t.hiddenUpdates;for(l=E&~l;0<l;){var ce=31-on(l),ye=1<<ce;D[ce]=0,Y[ce]=-1;var J=te[ce];if(J!==null)for(te[ce]=null,ce=0;ce<J.length;ce++){var le=J[ce];le!==null&&(le.lane&=-536870913)}l&=~ye}c!==0&&xa(t,c,0),v!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=v&~(E&~n))}function xa(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var c=31-on(n);t.entangledLanes|=n,t.entanglements[c]=t.entanglements[c]|1073741824|l&261930}function Tr(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var c=31-on(l),h=1<<c;h&n|t[c]&n&&(t[c]|=n),l&=~h}}function La(t,n){var l=n&-n;return l=(l&42)!==0?1:Ba(l),(l&(t.suspendedLanes|n))!==0?0:l}function Ba(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 Yn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ft(){var t=oe.p;return t!==0?t:(t=window.event,t===void 0?32:Ay(t.type))}function jn(t,n){var l=oe.p;try{return oe.p=t,n()}finally{oe.p=l}}var Qt=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Qt,xn="__reactProps$"+Qt,nn="__reactContainer$"+Qt,bl="__reactEvents$"+Qt,Ar="__reactListeners$"+Qt,xi="__reactHandles$"+Qt,Ia="__reactResources$"+Qt,Qi="__reactMarker$"+Qt,Mr="__reactLoad$"+Qt;function _r(t){delete t[Vt],delete t[xn],delete t[Ar],delete t[xi]}function ba(t){var n;if(n=t[Vt])return n;for(var l=t.parentNode;l;){if(n=l[nn]||l[Vt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=cy(t);t!==null;){if(l=t[Vt])return l;t=cy(t)}return n}t=l,l=t.parentNode}return null}function bi(t){if(t=t[Vt]||t[nn]){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 be(t){var n=t[Ia];return n||(n=t[Ia]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function je(t){t[Qi]=!0}function Ve(t){t[Mr]=void 0}var et=new Set,G={};function ue(t,n){we(t,n),we(t+"Capture",n)}function we(t,n){for(G[t]=n,t=0;t<n.length;t++)et.add(n[t])}var He=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={},$e={};function De(t){return _e.call($e,t)?!0:_e.call(ze,t)?!1:He.test(t)?$e[t]=!0:(ze[t]=!0,!1)}var Le=!1;function dt(){var t=Le;return Le=!1,t}function lt(t,n,l){if(De(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 an(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 Ct(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 Nt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function vo(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ns(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,v=c.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(E){l=""+E,v.call(this,E)}}),Object.defineProperty(t,n,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(E){l=""+E},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Zi(t){if(!t._valueTracker){var n=vo(t)?"checked":"value";t._valueTracker=Ns(t,n,""+t[n])}}function yo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),c="";return t&&(c=vo(t)?t.checked?"true":"false":t.value),t=c,t!==l?(n.setValue(t),!0):!1}var Qc=/[\n"\\]/g;function $t(t){return t.replace(Qc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Hn(t,n,l,c,h,v,E,D){t.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.type=E:t.removeAttribute("type"),n!=null?E==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nt(n)):t.value!==""+Nt(n)&&(t.value=""+Nt(n)):E!=="submit"&&E!=="reset"||t.removeAttribute("value"),n!=null?E==="number"&&t.value==n?xo(t,Nt(t.value)):xo(t,Nt(n)):l!=null?xo(t,Nt(l)):c!=null&&t.removeAttribute("value"),h==null&&v!=null&&(t.defaultChecked=!!v),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?t.name=""+Nt(D):t.removeAttribute("name")}function Rr(t,n,l,c,h,v,E,D){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.type=v),n!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||n!=null)){Zi(t);return}l=l!=null?""+Nt(l):"",n=n!=null?""+Nt(n):l,D||n===t.value||(t.value=n),t.defaultValue=n}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=D?t.checked:!!c,t.defaultChecked=!!c,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(t.name=E),Zi(t)}function xo(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function ra(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=""+Nt(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 bo(t,n,l){if(n!=null&&(n=""+Nt(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+Nt(l):""}function ja(t,n,l,c){if(n==null){if(c!=null){if(l!=null)throw Error(r(92));if(Ae(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),n=l}l=Nt(n),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c),Zi(t)}function Kn(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Or=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 Es(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||Or.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function wa(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]="",Le=!0);for(var h in n)c=n[h],n.hasOwnProperty(h)&&l[h]!==c&&(Es(t,h,c),Le=!0)}else for(var v in n)n.hasOwnProperty(v)&&Es(t,v,n[v])}function jl(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 Ts=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"]]),As=/^[\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 Mn(t){return As.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Xn(){}var wl=null;function Sl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bt=null,wn=null;function Pa(t){var n=bi(t);if(n&&(t=n.stateNode)){var l=t[xn]||null;e:switch(t=n.stateNode,n.type){case"input":if(Hn(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="'+$t(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var c=l[n];if(c!==t&&c.form===t.form){var h=c[xn]||null;if(!h)throw Error(r(90));Hn(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&&yo(c)}break e;case"textarea":bo(t,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&ra(t,!!l.multiple,n,!1)}}}var Sa=!1;function kl(t,n,l){if(Sa)return t(n,l);Sa=!0;try{var c=t(n);return c}finally{if(Sa=!1,(bt!==null||wn!==null)&&(Qu(),bt&&(n=bt,t=wn,wn=bt=null,Pa(n),t)))for(n=0;n<t.length;n++)Pa(t[n])}}function Ji(t,n){var l=t.stateNode;if(l===null)return null;var c=l[xn]||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 _n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cl=!1;if(_n)try{var Ms={};Object.defineProperty(Ms,"passive",{get:function(){Cl=!0}}),window.addEventListener("test",Ms,Ms),window.removeEventListener("test",Ms,Ms)}catch{Cl=!1}var zr=null,Cf=null,Zc=null;function qg(){if(Zc)return Zc;var t,n=Cf,l=n.length,c,h="value"in zr?zr.value:zr.textContent,v=h.length;for(t=0;t<l&&n[t]===h[t];t++);var E=l-t;for(c=1;c<=E&&n[l-c]===h[v-c];c++);return Zc=h.slice(t,1<c?1-c:void 0)}function Jc(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 Wc(){return!0}function Ug(){return!1}function Qn(t){function n(l,c,h,v,E){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=v,this.target=E,this.currentTarget=null;for(var D in t)t.hasOwnProperty(D)&&(l=t[D],this[D]=l?l(v):v[D]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Wc:Ug,this.isPropagationStopped=Ug,this}return I(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=Wc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),n}var Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=Qn(Dr),_s=I({},Dr,{view:0,detail:0}),Nk=Qn(_s),Nf,Ef,Rs,tu=I({},_s,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Af,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!==Rs&&(Rs&&t.type==="mousemove"?(Nf=t.screenX-Rs.screenX,Ef=t.screenY-Rs.screenY):Ef=Nf=0,Rs=t),Nf)},movementY:function(t){return"movementY"in t?t.movementY:Ef}}),Fg=Qn(tu),Ek=I({},tu,{dataTransfer:0}),Tk=Qn(Ek),Ak=I({},_s,{relatedTarget:0}),Tf=Qn(Ak),Mk=I({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),_k=Qn(Mk),Rk=I({},Dr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ok=Qn(Rk),zk=I({},Dr,{data:0}),Vg=Qn(zk),Dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lk={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"},Bk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ik(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Bk[t])?!!n[t]:!1}function Af(){return Ik}var Pk=I({},_s,{key:function(t){if(t.key){var n=Dk[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Jc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Lk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Af,charCode:function(t){return t.type==="keypress"?Jc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Jc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Hk=Qn(Pk),qk=I({},tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$g=Qn(qk),Uk=I({},Dr,{submitter:0}),Fk=Qn(Uk),Vk=I({},_s,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Af}),$k=Qn(Vk),Gk=I({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yk=Qn(Gk),Kk=I({},tu,{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}),Xk=Qn(Kk),Qk=I({},Dr,{newState:0,oldState:0,source:0}),Zk=Qn(Qk),Jk=[9,13,27,32],Mf=_n&&"CompositionEvent"in window,Os=null;_n&&"documentMode"in document&&(Os=document.documentMode);var Wk=_n&&"TextEvent"in window&&!Os,Gg=_n&&(!Mf||Os&&8<Os&&11>=Os),Yg=" ",Kg=!1;function Xg(t,n){switch(t){case"keyup":return Jk.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var jo=!1;function e6(t,n){switch(t){case"compositionend":return Qg(n);case"keypress":return n.which!==32?null:(Kg=!0,Yg);case"textInput":return t=n.data,t===Yg&&Kg?null:t;default:return null}}function t6(t,n){if(jo)return t==="compositionend"||!Mf&&Xg(t,n)?(t=qg(),Zc=Cf=zr=null,jo=!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 Gg&&n.locale!=="ko"?null:n.data;default:return null}}var n6={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 Zg(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!n6[t.type]:n==="textarea"}function Jg(t,n,l,c){bt?wn?wn.push(c):wn=[c]:bt=c,n=nd(n,"onChange"),0<n.length&&(l=new eu("onChange","change",null,l,c),t.push({event:l,listeners:n}))}var zs=null,Ds=null;function a6(t){P2(t,0)}function nu(t){var n=se(t);if(yo(n))return t}function Wg(t,n){if(t==="change")return n}var e1=!1;if(_n){var _f;if(_n){var Rf="oninput"in document;if(!Rf){var t1=document.createElement("div");t1.setAttribute("oninput","return;"),Rf=typeof t1.oninput=="function"}_f=Rf}else _f=!1;e1=_f&&(!document.documentMode||9<document.documentMode)}function n1(){zs&&(zs.detachEvent("onpropertychange",a1),Ds=zs=null)}function a1(t){if(t.propertyName==="value"&&nu(Ds)){var n=[];Jg(n,Ds,t,Sl(t)),kl(a6,n)}}function i6(t,n,l){t==="focusin"?(n1(),zs=n,Ds=l,zs.attachEvent("onpropertychange",a1)):t==="focusout"&&n1()}function r6(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return nu(Ds)}function l6(t,n){if(t==="click")return nu(n)}function o6(t,n){if(t==="input"||t==="change")return nu(n)}function s6(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var ka=typeof Object.is=="function"?Object.is:s6;function Ls(t,n){if(ka(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(!_e.call(n,h)||!ka(t[h],n[h]))return!1}return!0}function Of(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 i1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function r1(t,n){var l=i1(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=i1(l)}}function l1(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?l1(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function o1(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Of(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=Of(t.document)}return n}function zf(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 c6=_n&&"documentMode"in document&&11>=document.documentMode,wo=null,Df=null,Bs=null,Lf=!1;function s1(t,n,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lf||wo==null||wo!==Of(c)||(c=wo,"selectionStart"in c&&zf(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}),Bs&&Ls(Bs,c)||(Bs=c,c=nd(Df,"onSelect"),0<c.length&&(n=new eu("onSelect","select",null,n,l),t.push({event:n,listeners:c}),n.target=wo)))}function Nl(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var So={animationend:Nl("Animation","AnimationEnd"),animationiteration:Nl("Animation","AnimationIteration"),animationstart:Nl("Animation","AnimationStart"),transitionrun:Nl("Transition","TransitionRun"),transitionstart:Nl("Transition","TransitionStart"),transitioncancel:Nl("Transition","TransitionCancel"),transitionend:Nl("Transition","TransitionEnd")},Bf={},c1={};_n&&(c1=document.createElement("div").style,"AnimationEvent"in window||(delete So.animationend.animation,delete So.animationiteration.animation,delete So.animationstart.animation),"TransitionEvent"in window||delete So.transitionend.transition);function El(t){if(Bf[t])return Bf[t];if(!So[t])return t;var n=So[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in c1)return Bf[t]=n[l];return t}var u1=El("animationend"),d1=El("animationiteration"),f1=El("animationstart"),u6=El("transitionrun"),d6=El("transitionstart"),f6=El("transitioncancel"),h1=El("transitionend"),m1=new Map,If="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(" ");If.push("scrollEnd");function ai(t,n){m1.set(t,n),ue(n,[t])}var h6=0;function Wi(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=oi.identifierPrefix;var l=h6++;return t="_"+t+"t_"+l.toString(32)+"_",n.autoName=t}function p1(t){if(t==null||typeof t=="string")return t;var n=null,l=Fo;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 er(t,n){return t=p1(t),n=p1(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var au=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)},Ha=[],ko=0,Pf=0;function iu(){for(var t=ko,n=Pf=ko=0;n<t;){var l=Ha[n];Ha[n++]=null;var c=Ha[n];Ha[n++]=null;var h=Ha[n];Ha[n++]=null;var v=Ha[n];if(Ha[n++]=null,c!==null&&h!==null){var E=c.pending;E===null?h.next=h:(h.next=E.next,E.next=h),c.pending=h}v!==0&&g1(l,h,v)}}function ru(t,n,l,c){Ha[ko++]=t,Ha[ko++]=n,Ha[ko++]=l,Ha[ko++]=c,Pf|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Hf(t,n,l,c){return ru(t,n,l,c),lu(t)}function Tl(t,n){return ru(t,null,null,n),lu(t)}function g1(t,n,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,v=t.return;v!==null;)v.childLanes|=l,c=v.alternate,c!==null&&(c.childLanes|=l),v.tag===22&&(t=v.stateNode,t===null||t._visibility&1||(h=!0)),t=v,v=v.return;return t.tag===3?(v=t.stateNode,h&&n!==null&&(h=31-on(l),t=v.hiddenUpdates,c=t[h],c===null?t[h]=[n]:c.push(n),n.lane=l|536870912),v):null}function lu(t){if(50<rc)throw rc=0,Xu=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Co={};function m6(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 la(t,n,l,c){return new m6(t,n,l,c)}function qf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tr(t,n){var l=t.alternate;return l===null?(l=la(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 v1(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 ou(t,n,l,c,h,v){var E=0;if(c=t,typeof c=="function")qf(c)&&(E=1);else if(typeof c=="string")E=U8(t,l,Pt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(c){case ne:return t=la(31,l,n,h),t.elementType=ne,t.lanes=v,t;case H:return Al(l.children,h,v,n);case q:E=8,h|=24;break;case Z:return t=la(12,l,n,h|2),t.elementType=Z,t.lanes=v,t;case U:return t=la(13,l,n,h),t.elementType=U,t.lanes=v,t;case P:return t=la(19,l,n,h),t.elementType=P,t.lanes=v,t;case re:case B:return t=h|32,t=la(30,l,n,t),t.elementType=B,t.lanes=v,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case F:E=10;break e;case $:E=9;break e;case K:E=11;break e;case ie:E=14;break e;case z:E=16,c=null;break e}E=29,l=Error(r(130,t===null?"null":typeof t,"")),c=null}return n=la(E,l,n,h),n.elementType=t,n.type=c,n.lanes=v,n}function Al(t,n,l,c){return t=la(7,t,c,n),t.lanes=l,t}function Uf(t,n,l){return t=la(6,t,null,n),t.lanes=l,t}function y1(t){var n=la(18,null,null,0);return n.stateNode=t,n}function Ff(t,n,l){return n=la(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var x1=new WeakMap;function qa(t,n){if(typeof t=="object"&&t!==null){var l=x1.get(t);return l!==void 0?l:(n={value:t,source:n,stack:de(n)},x1.set(t,n),n)}return{value:t,source:n,stack:de(n)}}var No=[],Eo=0,su=null,Is=0,Ua=[],Fa=0,Lr=null,ji=1,wi="";function nr(t,n){No[Eo++]=Is,No[Eo++]=su,su=t,Is=n}function b1(t,n,l){Ua[Fa++]=ji,Ua[Fa++]=wi,Ua[Fa++]=Lr,Lr=t;var c=ji;t=wi;var h=32-on(c)-1;c&=~(1<<h),l+=1;var v=32-on(n)+h;if(30<v){var E=h-h%5;v=(c&(1<<E)-1).toString(32),c>>=E,h-=E,ji=1<<32-on(n)+h|l<<h|c,wi=v+t}else ji=1<<v|l<<h|c,wi=t}function cu(t){t.return!==null&&(nr(t,1),b1(t,1,0))}function Vf(t){for(;t===su;)su=No[--Eo],No[Eo]=null,Is=No[--Eo],No[Eo]=null;for(;t===Lr;)Lr=Ua[--Fa],Ua[Fa]=null,wi=Ua[--Fa],Ua[Fa]=null,ji=Ua[--Fa],Ua[Fa]=null}function j1(t,n){Ua[Fa++]=ji,Ua[Fa++]=wi,Ua[Fa++]=Lr,ji=n.id,wi=n.overflow,Lr=t}var Sn=null,qt=null,ut=!1,Br=null,Va=!1,$f=Error(r(519));function Ir(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ps(qa(n,t)),$f}function w1(t){var n=t.stateNode,l=t.type,c=t.memoizedProps;switch(n[Vt]=t,n[xn]=c,l){case"dialog":ht("cancel",n),ht("close",n);break;case"iframe":case"object":case"embed":ht("load",n);break;case"video":case"audio":for(l=0;l<oc.length;l++)ht(oc[l],n);break;case"source":ht("error",n);break;case"img":case"image":case"link":ht("error",n),ht("load",n);break;case"details":ht("toggle",n);break;case"input":ht("invalid",n),Rr(n,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ht("invalid",n);break;case"textarea":ht("invalid",n),ja(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||F2(n.textContent,l)?(c.popover!=null&&(ht("beforetoggle",n),ht("toggle",n)),c.onScroll!=null&&ht("scroll",n),c.onScrollEnd!=null&&ht("scrollend",n),c.onClick!=null&&(n.onclick=Xn),n=!0):n=!1,n||Ir(t,!0)}function uu(t){for(Sn=t.return;Sn;)switch(Sn.tag){case 5:case 31:case 13:Va=!1;return;case 27:case 3:Va=!0;return;default:Sn=Sn.return}}function To(t){if(t!==Sn)return!1;if(!ut)return uu(t),ut=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||jm(t.type,t.memoizedProps)),l=!l),l&&qt&&Ir(t),uu(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=sy(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=sy(t)}else n===27?(n=qt,el(t.type)?(t=Mm,Mm=null,qt=t):qt=n):qt=Sn?Ga(t.stateNode.nextSibling):null;return!0}function Ml(){qt=Sn=null,ut=!1}function Gf(){var t=Br;return t!==null&&(ca===null?ca=t:ca.push.apply(ca,t),Br=null),t}function Ps(t){Br===null?Br=[t]:Br.push(t)}var Yf=at(null),_l=null,ar=null;function Pr(t,n,l){We(Yf,n._currentValue),n._currentValue=l}function ir(t){t._currentValue=Yf.current,Qe(Yf)}function du(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 Kf(t,n,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){var E=h.child;v=v.firstContext;e:for(;v!==null;){var D=v;v=h;for(var Y=0;Y<n.length;Y++)if(D.context===n[Y]){v.lanes|=l,D=v.alternate,D!==null&&(D.lanes|=l),du(v.return,l,t),c||(E=null);break e}v=D.next}}else if(h.tag===18){if(E=h.return,E===null)throw Error(r(341));E.lanes|=l,v=E.alternate,v!==null&&(v.lanes|=l),du(E,l,t),E=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=l,E=h.alternate,E!==null&&(E.lanes|=l),du(h.return,l,t),E=h.child,E=E!==null?E.sibling:null):E=h.child;if(E!==null)E.return=h;else for(E=h;E!==null;){if(E===t){E=null;break}if(h=E.sibling,h!==null){h.return=E.return,E=h;break}E=E.return}h=E}}function Rl(t,n,l,c){t=null;for(var h=n,v=!1;h!==null;){if(!v){if((h.flags&524288)!==0)v=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var E=h.alternate;if(E===null)throw Error(r(387));if(E=E.memoizedProps,E!==null){var D=h.type;ka(h.pendingProps.value,E.value)||(t!==null?t.push(D):t=[D])}}else if(h===cn.current){if(E=h.alternate,E===null)throw Error(r(387));E.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Wo):t=[Wo])}h=h.return}return t!==null&&Kf(n,t,l,c),n.flags|=262144,t!==null}function fu(t){for(t=t.firstContext;t!==null;){if(!ka(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ol(t){_l=t,ar=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Rn(t){return S1(_l,t)}function hu(t,n){return _l===null&&Ol(t),S1(t,n)}function S1(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},ar===null){if(t===null)throw Error(r(308));ar=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ar=ar.next=n;return l}var p6=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()})}},g6=e.unstable_scheduleCallback,v6=e.unstable_NormalPriority,un={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xf(){return{controller:new p6,data:new Map,refCount:0}}function Hs(t){t.refCount--,t.refCount===0&&g6(v6,function(){t.controller.abort()})}function k1(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 qs=null;function y6(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var Us=null,Qf=0,zl=0,Ao=null;function x6(t,n){if(Us===null){var l=Us=[];Qf=0,zl=fm(),Ao={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Qf++,n.then(C1,C1),n}function C1(){if(--Qf===0&&(qs=null,Us!==null)){Ao!==null&&(Ao.status="fulfilled");var t=Us;Us=null,zl=0,Ao=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function b6(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 N1=xe.S;xe.S=function(t,n){if(y2=Gt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&x6(t,n),qs!==null)for(var l=Yo;l!==null;)k1(l,qs),l=l.next;if(l=t.types,l!==null){for(var c=Yo;c!==null;)k1(c,l),c=c.next;if(zl!==0){c=qs,c===null&&(c=qs=[]);for(var h=0;h<l.length;h++){var v=l[h];c.indexOf(v)===-1&&c.push(v)}}}N1!==null&&N1(t,n)};var Dl=at(null);function Zf(){var t=Dl.current;return t!==null?t:Lt.pooledCache}function mu(t,n){n===null?We(Dl,Dl.current):We(Dl,n.pool)}function E1(){var t=Zf();return t===null?null:{parent:un._currentValue,pool:t}}var Mo=Error(r(460)),Jf=Error(r(474)),pu=Error(r(542)),gu={then:function(){}};function T1(t){return t=t.status,t==="fulfilled"||t==="rejected"}function A1(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(Xn,Xn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,_1(t),t===void 0&&!("reason"in n)?Error(r(600)):t;default:if(typeof n.status=="string")n.then(Xn,Xn);else{if(t=Lt,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,_1(t),t}throw Bl=n,Mo}}function Ll(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Bl=l,Mo):l}}var Bl=null;function M1(){if(Bl===null)throw Error(r(459));var t=Bl;return Bl=null,t}function _1(t){if(t===Mo||t===pu)throw Error(r(483))}var _o=null,Fs=0;function vu(t){var n=Fs;return Fs+=1,_o===null&&(_o=[]),A1(_o,t,n)}function Hr(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function yu(t,n){throw n.$$typeof===V?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function R1(t){function n(ee,Q){if(t){var ae=ee.deletions;ae===null?(ee.deletions=[Q],ee.flags|=16):ae.push(Q)}}function l(ee,Q){if(!t)return null;for(;Q!==null;)n(ee,Q),Q=Q.sibling;return null}function c(ee){for(var Q=new Map;ee!==null;)ee.key===null?Q.set(ee.index,ee):Q.set(ee.key,ee),ee=ee.sibling;return Q}function h(ee,Q){return ee=tr(ee,Q),ee.index=0,ee.sibling=null,ee}function v(ee,Q,ae){return ee.index=ae,t?(ae=ee.alternate,ae!==null?(ae=ae.index,ae<Q?(ee.flags|=2,Q):ae):(ee.flags|=134217730,Q)):(ee.flags|=1048576,Q)}function E(ee){return t&&ee.alternate===null&&(ee.flags|=134217730),ee}function D(ee,Q,ae,ve){return Q===null||Q.tag!==6?(Q=Uf(ae,ee.mode,ve),Q.return=ee,Q):(Q=h(Q,ae),Q.return=ee,Q)}function Y(ee,Q,ae,ve){var Pe=ae.type;return Pe===H?(ee=ce(ee,Q,ae.props.children,ve,ae.key),Hr(ee,ae),ee):Q!==null&&(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===z&&Ll(Pe)===Q.type)?(Q=h(Q,ae.props),Hr(Q,ae),Q.return=ee,Q):(Q=ou(ae.type,ae.key,ae.props,null,ee.mode,ve),Hr(Q,ae),Q.return=ee,Q)}function te(ee,Q,ae,ve){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ae.containerInfo||Q.stateNode.implementation!==ae.implementation?(Q=Ff(ae,ee.mode,ve),Q.return=ee,Q):(Q=h(Q,ae.children||[]),Q.return=ee,Q)}function ce(ee,Q,ae,ve,Pe){return Q===null||Q.tag!==7?(Q=Al(ae,ee.mode,ve,Pe),Q.return=ee,Q):(Q=h(Q,ae),Q.return=ee,Q)}function ye(ee,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Uf(""+Q,ee.mode,ae),Q.return=ee,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case X:return ae=ou(Q.type,Q.key,Q.props,null,ee.mode,ae),Hr(ae,Q),ae.return=ee,ae;case L:return Q=Ff(Q,ee.mode,ae),Q.return=ee,Q;case z:return Q=Ll(Q),ye(ee,Q,ae)}if(Ae(Q)||me(Q))return Q=Al(Q,ee.mode,ae,null),Q.return=ee,Q;if(typeof Q.then=="function")return ye(ee,vu(Q),ae);if(Q.$$typeof===F)return ye(ee,hu(ee,Q),ae);yu(ee,Q)}return null}function J(ee,Q,ae,ve){var Pe=Q!==null?Q.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Pe!==null?null:D(ee,Q,""+ae,ve);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case X:return ae.key===Pe?Y(ee,Q,ae,ve):null;case L:return ae.key===Pe?te(ee,Q,ae,ve):null;case z:return ae=Ll(ae),J(ee,Q,ae,ve)}if(Ae(ae)||me(ae))return Pe!==null?null:ce(ee,Q,ae,ve,null);if(typeof ae.then=="function")return J(ee,Q,vu(ae),ve);if(ae.$$typeof===F)return J(ee,Q,hu(ee,ae),ve);yu(ee,ae)}return null}function le(ee,Q,ae,ve,Pe){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ee=ee.get(ae)||null,D(Q,ee,""+ve,Pe);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case X:return ee=ee.get(ve.key===null?ae:ve.key)||null,Y(Q,ee,ve,Pe);case L:return ee=ee.get(ve.key===null?ae:ve.key)||null,te(Q,ee,ve,Pe);case z:return ve=Ll(ve),le(ee,Q,ae,ve,Pe)}if(Ae(ve)||me(ve))return ee=ee.get(ae)||null,ce(Q,ee,ve,Pe,null);if(typeof ve.then=="function")return le(ee,Q,ae,vu(ve),Pe);if(ve.$$typeof===F)return le(ee,Q,ae,hu(Q,ve),Pe);yu(Q,ve)}return null}function Oe(ee,Q,ae,ve){for(var Pe=null,yt=null,Ge=Q,Je=Q=0,hn=null;Ge!==null&&Je<ae.length;Je++){Ge.index>Je?(hn=Ge,Ge=null):hn=Ge.sibling;var jt=J(ee,Ge,ae[Je],ve);if(jt===null){Ge===null&&(Ge=hn);break}t&&Ge&&jt.alternate===null&&n(ee,Ge),Q=v(jt,Q,Je),yt===null?Pe=jt:yt.sibling=jt,yt=jt,Ge=hn}if(Je===ae.length)return l(ee,Ge),ut&&nr(ee,Je),Pe;if(Ge===null){for(;Je<ae.length;Je++)Ge=ye(ee,ae[Je],ve),Ge!==null&&(Q=v(Ge,Q,Je),yt===null?Pe=Ge:yt.sibling=Ge,yt=Ge);return ut&&nr(ee,Je),Pe}for(Ge=c(Ge);Je<ae.length;Je++)hn=le(Ge,ee,Je,ae[Je],ve),hn!==null&&(t&&(jt=hn.alternate,jt!==null&&Ge.delete(jt.key===null?Je:jt.key)),Q=v(hn,Q,Je),yt===null?Pe=hn:yt.sibling=hn,yt=hn);return t&&Ge.forEach(function(rl){return n(ee,rl)}),ut&&nr(ee,Je),Pe}function qe(ee,Q,ae,ve){if(ae==null)throw Error(r(151));for(var Pe=null,yt=null,Ge=Q,Je=Q=0,hn=null,jt=ae.next();Ge!==null&&!jt.done;Je++,jt=ae.next()){Ge.index>Je?(hn=Ge,Ge=null):hn=Ge.sibling;var rl=J(ee,Ge,jt.value,ve);if(rl===null){Ge===null&&(Ge=hn);break}t&&Ge&&rl.alternate===null&&n(ee,Ge),Q=v(rl,Q,Je),yt===null?Pe=rl:yt.sibling=rl,yt=rl,Ge=hn}if(jt.done)return l(ee,Ge),ut&&nr(ee,Je),Pe;if(Ge===null){for(;!jt.done;Je++,jt=ae.next())jt=ye(ee,jt.value,ve),jt!==null&&(Q=v(jt,Q,Je),yt===null?Pe=jt:yt.sibling=jt,yt=jt);return ut&&nr(ee,Je),Pe}for(Ge=c(Ge);!jt.done;Je++,jt=ae.next())jt=le(Ge,ee,Je,jt.value,ve),jt!==null&&(t&&(hn=jt.alternate,hn!==null&&Ge.delete(hn.key===null?Je:hn.key)),Q=v(jt,Q,Je),yt===null?Pe=jt:yt.sibling=jt,yt=jt);return t&&Ge.forEach(function(eC){return n(ee,eC)}),ut&&nr(ee,Je),Pe}function st(ee,Q,ae,ve){if(typeof ae=="object"&&ae!==null&&ae.type===H&&ae.key===null&&ae.props.ref===void 0&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case X:e:{for(var Pe=ae.key;Q!==null;){if(Q.key===Pe){if(Pe=ae.type,Pe===H){if(Q.tag===7){l(ee,Q.sibling),ve=h(Q,ae.props.children),Hr(ve,ae),ve.return=ee,ee=ve;break e}}else if(Q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===z&&Ll(Pe)===Q.type){l(ee,Q.sibling),ve=h(Q,ae.props),Hr(ve,ae),ve.return=ee,ee=ve;break e}l(ee,Q);break}else n(ee,Q);Q=Q.sibling}ae.type===H?(ve=Al(ae.props.children,ee.mode,ve,ae.key),Hr(ve,ae),ve.return=ee,ee=ve):(ve=ou(ae.type,ae.key,ae.props,null,ee.mode,ve),Hr(ve,ae),ve.return=ee,ee=ve)}return E(ee);case L:e:{for(Pe=ae.key;Q!==null;){if(Q.key===Pe)if(Q.tag===4&&Q.stateNode.containerInfo===ae.containerInfo&&Q.stateNode.implementation===ae.implementation){l(ee,Q.sibling),ve=h(Q,ae.children||[]),ve.return=ee,ee=ve;break e}else{l(ee,Q);break}else n(ee,Q);Q=Q.sibling}ve=Ff(ae,ee.mode,ve),ve.return=ee,ee=ve}return E(ee);case z:return ae=Ll(ae),st(ee,Q,ae,ve)}if(Ae(ae))return Oe(ee,Q,ae,ve);if(me(ae)){if(Pe=me(ae),typeof Pe!="function")throw Error(r(150));return ae=Pe.call(ae),qe(ee,Q,ae,ve)}if(typeof ae.then=="function")return st(ee,Q,vu(ae),ve);if(ae.$$typeof===F)return st(ee,Q,hu(ee,ae),ve);yu(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,Q!==null&&Q.tag===6?(l(ee,Q.sibling),ve=h(Q,ae),ve.return=ee,ee=ve):(l(ee,Q),ve=Uf(ae,ee.mode,ve),ve.return=ee,ee=ve),E(ee)):l(ee,Q)}return function(ee,Q,ae,ve){try{Fs=0;var Pe=st(ee,Q,ae,ve);return _o=null,Pe}catch(Ge){if(Ge===Mo||Ge===pu)throw Ge;var yt=la(29,Ge,null,ee.mode);return yt.lanes=ve,yt.return=ee,yt}finally{}}}var Il=R1(!0),O1=R1(!1),qr=!1;function Wf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eh(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 Ur(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Fr(t,n,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Et&2)!==0){var h=c.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),c.pending=n,n=lu(t),g1(t,null,l),n}return ru(t,c,n,l),lu(t)}function Vs(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,Tr(t,l)}}function th(t,n){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var E={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?h=v=E:v=v.next=E,l=l.next}while(l!==null);v===null?h=v=n:v=v.next=n}else h=v=n;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:v,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 nh=!1;function $s(){if(nh){var t=Ao;if(t!==null)throw t}}function Gs(t,n,l,c){nh=!1;var h=t.updateQueue;qr=!1;var v=h.firstBaseUpdate,E=h.lastBaseUpdate,D=h.shared.pending;if(D!==null){h.shared.pending=null;var Y=D,te=Y.next;Y.next=null,E===null?v=te:E.next=te,E=Y;var ce=t.alternate;ce!==null&&(ce=ce.updateQueue,D=ce.lastBaseUpdate,D!==E&&(D===null?ce.firstBaseUpdate=te:D.next=te,ce.lastBaseUpdate=Y))}if(v!==null){var ye=h.baseState;E=0,ce=te=Y=null,D=v;do{var J=D.lane&-536870913,le=J!==D.lane;if(le?(vt&J)===J:(c&J)===J){J!==0&&J===zl&&(nh=!0),ce!==null&&(ce=ce.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Oe=t,qe=D;J=n;var st=l;switch(qe.tag){case 1:if(Oe=qe.payload,typeof Oe=="function"){ye=Oe.call(st,ye,J);break e}ye=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=qe.payload,J=typeof Oe=="function"?Oe.call(st,ye,J):Oe,J==null)break e;ye=I({},ye,J);break e;case 2:qr=!0}}J=D.callback,J!==null&&(t.flags|=64,le&&(t.flags|=8192),le=h.callbacks,le===null?h.callbacks=[J]:le.push(J))}else le={lane:J,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ce===null?(te=ce=le,Y=ye):ce=ce.next=le,E|=J;if(D=D.next,D===null){if(D=h.shared.pending,D===null)break;le=D,D=le.next,le.next=null,h.lastBaseUpdate=le,h.shared.pending=null}}while(!0);ce===null&&(Y=ye),h.baseState=Y,h.firstBaseUpdate=te,h.lastBaseUpdate=ce,v===null&&(h.shared.lanes=0),Qr|=E,t.lanes=E,t.memoizedState=ye}}function z1(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function D1(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)z1(l[t],n)}var Vr=at(null),xu=at(0);function L1(t,n){t=cr,We(xu,t),We(Vr,n),cr=t|n.baseLanes}function ah(){We(xu,cr),We(Vr,Vr.current)}function ih(){cr=xu.current,Qe(Vr),Qe(xu)}var On=at(null),qn=null;function $r(t){var n=t.alternate;We(zn,zn.current&1),We(On,t),qn===null&&(n===null||Vr.current!==null||n.memoizedState!==null)&&(qn=t)}function rh(t){We(zn,zn.current),We(On,t),qn===null&&(qn=t)}function B1(t){t.tag===22?(We(zn,zn.current),We(On,t),qn===null&&(qn=t)):Gr()}function Gr(){We(zn,zn.current),We(On,On.current)}function Ca(t){Qe(On),qn===t&&(qn=null),Qe(zn)}var zn=at(0);function Ys(t,n){We(On,On.current),We(zn,n)}function lh(t){Qe(zn),Qe(On),qn===t&&(qn=null)}function bu(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Tm(l)||Am(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 rr=0,ot=null,zt=null,dn=null,ju=!1,Ro=!1,Pl=!1,wu=0,Ks=0,Oo=null,j6=0;function rn(){throw Error(r(321))}function oh(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!ka(t[l],n[l]))return!1;return!0}function sh(t,n,l,c,h,v){return rr=v,ot=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,xe.H=t===null||t.memoizedState===null?bv:jv,Pl=!1,v=l(c,h),Pl=!1,Ro&&(v=P1(n,l,c,h)),I1(t),v}function I1(t){xe.H=Au;var n=zt!==null&&zt.next!==null;if(rr=0,dn=zt=ot=null,ju=!1,Ks=0,Oo=null,n)throw Error(r(300));t===null||fn||(t=t.dependencies,t!==null&&fu(t)&&(fn=!0))}function P1(t,n,l,c){ot=t;var h=0;do{if(Ro&&(Oo=null),Ks=0,Ro=!1,25<=h)throw Error(r(301));if(h+=1,dn=zt=null,t.updateQueue!=null){var v=t.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}xe.H=A6,v=n(l,c)}while(Ro);return v}function w6(){var t=xe.H,n=t.useState()[0];return n=typeof n.then=="function"?Xs(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(ot.flags|=1024),n}function ch(){var t=wu!==0;return wu=0,t}function uh(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function dh(t){if(ju){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}ju=!1}rr=0,dn=zt=ot=null,Ro=!1,Ks=wu=0,Oo=null}function Zn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?ot.memoizedState=dn=t:dn=dn.next=t,dn}function sn(){if(zt===null){var t=ot.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var n=dn===null?ot.memoizedState:dn.next;if(n!==null)dn=n,zt=t;else{if(t===null)throw ot.alternate===null?Error(r(467)):Error(r(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},dn===null?ot.memoizedState=dn=t:dn=dn.next=t}return dn}function Su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(t){var n=Ks;return Ks+=1,Oo===null&&(Oo=[]),t=A1(Oo,t,n),n=ot,(dn===null?n.memoizedState:dn.next)===null&&(n=n.alternate,xe.H=n===null||n.memoizedState===null?bv:jv),t}function ku(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xs(t);if(t.$$typeof===W)return;if(t.$$typeof===F)return Rn(t)}throw Error(r(438,String(t)))}function fh(t){var n=null,l=ot.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var c=ot.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=Su(),ot.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]=R;return n.index++,l}function lr(t,n){return typeof n=="function"?n(t):n}function Cu(t){var n=sn();return hh(n,zt,t)}function hh(t,n,l){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var h=t.baseQueue,v=c.pending;if(v!==null){if(h!==null){var E=h.next;h.next=v.next,v.next=E}n.baseQueue=h=v,c.pending=null}if(v=t.baseState,h===null)t.memoizedState=v;else{n=h.next;var D=E=null,Y=null,te=n,ce=!1;do{var ye=te.lane&-536870913;if(ye!==te.lane?(vt&ye)===ye:(rr&ye)===ye){var J=te.revertLane;if(J===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ye===zl&&(ce=!0);else if((rr&J)===J){te=te.next,J===zl&&(ce=!0);continue}else ye={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(D=Y=ye,E=v):Y=Y.next=ye,ot.lanes|=J,Qr|=J;ye=te.action,Pl&&l(v,ye),v=te.hasEagerState?te.eagerState:l(v,ye)}else J={lane:ye,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(D=Y=J,E=v):Y=Y.next=J,ot.lanes|=ye,Qr|=ye;te=te.next}while(te!==null&&te!==n);if(Y===null?E=v:Y.next=D,!ka(v,t.memoizedState)&&(fn=!0,ce&&(l=Ao,l!==null)))throw l;t.memoizedState=v,t.baseState=E,t.baseQueue=Y,c.lastRenderedState=v}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function mh(t){var n=sn(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,v=n.memoizedState;if(h!==null){l.pending=null;var E=h=h.next;do v=t(v,E.action),E=E.next;while(E!==h);ka(v,n.memoizedState)||(fn=!0),n.memoizedState=v,n.baseQueue===null&&(n.baseState=v),l.lastRenderedState=v}return[v,c]}function H1(t,n,l){var c=ot,h=sn(),v=ut;if(v){if(l===void 0)throw Error(r(407));l=l()}else l=n();var E=!ka((zt||h).memoizedState,l);if(E&&(h.memoizedState=l,fn=!0),h=h.queue,vh(F1.bind(null,c,h,t),[t]),t=h.getSnapshot!==n||E||dn!==null&&(dn.memoizedState.tag&1)!==0,zo(t?9:8,{destroy:void 0},U1.bind(null,c,h,l,n),null),t){if(c.flags|=2048,Lt===null)throw Error(r(349));v||(rr&127)!==0||q1(c,n,l)}return l}function q1(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=ot.updateQueue,n===null?(n=Su(),ot.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function U1(t,n,l,c){n.value=l,n.getSnapshot=c,V1(n)&&$1(t)}function F1(t,n,l){return l(function(){V1(n)&&$1(t)})}function V1(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!ka(t,l)}catch{return!0}}function $1(t){var n=Tl(t,2);n!==null&&ua(n,t,2)}function ph(t){var n=Zn();if(typeof t=="function"){var l=t;if(t=l(),Pl){tn(!0);try{l()}finally{tn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:t},n}function G1(t,n,l,c){return t.baseState=l,hh(t,zt,typeof c=="function"?c:lr)}function S6(t,n,l,c,h){if(Tu(t))throw Error(r(485));if(t=n.action,t!==null){var v={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){v.listeners.push(E)}};xe.T!==null?l(!0):v.isTransition=!1,c(v),l=n.pending,l===null?(v.next=n.pending=v,Y1(n,v)):(v.next=l.next,n.pending=l.next=v)}}function Y1(t,n){var l=n.action,c=n.payload,h=t.state;if(n.isTransition){var v=xe.T,E={};E.types=v!==null?v.types:null,xe.T=E;try{var D=l(h,c),Y=xe.S;Y!==null&&Y(E,D),K1(t,n,D)}catch(te){gh(t,n,te)}finally{v!==null&&E.types!==null&&(v.types=E.types),xe.T=v}}else try{v=l(h,c),K1(t,n,v)}catch(te){gh(t,n,te)}}function K1(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){X1(t,n,c)},function(c){return gh(t,n,c)}):X1(t,n,l)}function X1(t,n,l){n.status="fulfilled",n.value=l,Q1(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,Y1(t,l)))}function gh(t,n,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do n.status="rejected",n.reason=l,Q1(n),n=n.next;while(n!==c)}t.action=null}function Q1(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Z1(t,n){return n}function J1(t,n){if(ut){var l=Lt.formState;if(l!==null){e:{var c=ot;if(ut){if(qt){t:{for(var h=qt,v=Va;h.nodeType!==8;){if(!v){h=null;break t}if(h=Ga(h.nextSibling),h===null){h=null;break t}}v=h.data,h=v==="F!"||v==="F"?h:null}if(h){qt=Ga(h.nextSibling),c=h.data==="F!";break e}}Ir(c)}c=!1}c&&(n=l[0])}}return l=Zn(),l.memoizedState=l.baseState=n,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Z1,lastRenderedState:n},l.queue=c,l=vv.bind(null,ot,c),c.dispatch=l,c=ph(!1),v=wh.bind(null,ot,!1,c.queue),c=Zn(),h={state:n,dispatch:null,action:t,pending:null},c.queue=h,l=S6.bind(null,ot,h,v,l),h.dispatch=l,c.memoizedState=t,[n,l,!1]}function W1(t){var n=sn();return ev(n,zt,t)}function ev(t,n,l){if(n=hh(t,n,Z1)[0],t=Cu(lr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var c=Xs(n)}catch(E){throw E===Mo?pu:E}else c=n;n=sn();var h=n.queue,v=h.dispatch;return l!==n.memoizedState&&(ot.flags|=2048,zo(9,{destroy:void 0},k6.bind(null,h,l),null)),[c,v,t]}function k6(t,n){t.action=n}function tv(t){var n=sn(),l=zt;if(l!==null)return ev(n,l,t);sn(),n=n.memoizedState,l=sn();var c=l.queue.dispatch;return l.memoizedState=t,[n,c,!1]}function zo(t,n,l,c){return t={tag:t,create:l,deps:c,inst:n,next:null},n=ot.updateQueue,n===null&&(n=Su(),ot.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 nv(){return sn().memoizedState}function Nu(t,n,l,c){var h=Zn();ot.flags|=t,h.memoizedState=zo(1|n,{destroy:void 0},l,c===void 0?null:c)}function Eu(t,n,l,c){var h=sn();c=c===void 0?null:c;var v=h.memoizedState.inst;zt!==null&&c!==null&&oh(c,zt.memoizedState.deps)?h.memoizedState=zo(n,v,l,c):(ot.flags|=t,h.memoizedState=zo(1|n,v,l,c))}function av(t,n){Nu(8390656,8,t,n)}function vh(t,n){Eu(2048,8,t,n)}function C6(t){ot.flags|=4;var n=ot.updateQueue;if(n===null)n=Su(),ot.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function iv(t){var n=sn().memoizedState;return C6({ref:n,nextImpl:t}),function(){if((Et&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function rv(t,n){return Eu(4,2,t,n)}function lv(t,n){return Eu(4,4,t,n)}function ov(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 sv(t,n,l){l=l!=null?l.concat([t]):null,Eu(4,4,ov.bind(null,n,t),l)}function yh(){}function cv(t,n){var l=sn();n=n===void 0?null:n;var c=l.memoizedState;return n!==null&&oh(n,c[1])?c[0]:(l.memoizedState=[t,n],t)}function uv(t,n){var l=sn();n=n===void 0?null:n;var c=l.memoizedState;if(n!==null&&oh(n,c[1]))return c[0];if(c=t(),Pl){tn(!0);try{t()}finally{tn(!1)}}return l.memoizedState=[c,n],c}function xh(t,n,l){return l===void 0||(rr&1073741824)!==0&&(vt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=b2(),ot.lanes|=t,Qr|=t,l)}function dv(t,n,l,c){return ka(l,n)?l:Vr.current!==null?(t=xh(t,l,c),ka(t,n)||(fn=!0),t):(rr&106)===0||(rr&1073741824)!==0&&(vt&261930)===0?(fn=!0,t.memoizedState=l):(t=b2(),ot.lanes|=t,Qr|=t,n)}function fv(t,n,l,c,h){var v=oe.p;oe.p=v!==0&&8>v?v:8;var E=xe.T,D={};D.types=E!==null?E.types:null,xe.T=D,wh(t,!1,n,l);try{var Y=h(),te=xe.S;if(te!==null&&te(D,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var ce=b6(Y,c);Qs(t,n,ce,Aa(t))}else Qs(t,n,c,Aa(t))}catch(ye){Qs(t,n,{then:function(){},status:"rejected",reason:ye},Aa())}finally{oe.p=v,E!==null&&D.types!==null&&(E.types=D.types),xe.T=E}}function N6(){}function bh(t,n,l,c){if(t.tag!==5)throw Error(r(476));var h=hv(t).queue;fv(t,h,n,Ee,l===null?N6:function(){return mv(t),l(c)})}function hv(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Ee,baseState:Ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:Ee},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lr,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function mv(t){var n=hv(t);n.next===null&&(n=t.alternate.memoizedState),Qs(t,n.next.queue,{},Aa())}function jh(){return Rn(Wo)}function pv(){return sn().memoizedState}function gv(){return sn().memoizedState}function E6(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=Aa();t=Ur(l);var c=Fr(n,t,l);c!==null&&(ua(c,n,l),Vs(c,n,l)),n={cache:Xf()},t.payload=n;return}n=n.return}}function T6(t,n,l){var c=Aa();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Tu(t)?yv(n,l):(l=Hf(t,n,l,c),l!==null&&(ua(l,t,c),xv(l,n,c)))}function vv(t,n,l){var c=Aa();Qs(t,n,l,c)}function Qs(t,n,l,c){var h={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Tu(t))yv(n,h);else{var v=t.alternate;if(t.lanes===0&&(v===null||v.lanes===0)&&(v=n.lastRenderedReducer,v!==null))try{var E=n.lastRenderedState,D=v(E,l);if(h.hasEagerState=!0,h.eagerState=D,ka(D,E))return ru(t,n,h,0),Lt===null&&iu(),!1}catch{}finally{}if(l=Hf(t,n,h,c),l!==null)return ua(l,t,c),xv(l,n,c),!0}return!1}function wh(t,n,l,c){if(c={lane:2,revertLane:fm(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Tu(t)){if(n)throw Error(r(479))}else n=Hf(t,l,c,2),n!==null&&ua(n,t,2)}function Tu(t){var n=t.alternate;return t===ot||n!==null&&n===ot}function yv(t,n){Ro=ju=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function xv(t,n,l){if((l&4194048)!==0){var c=n.lanes;c&=t.pendingLanes,l|=c,n.lanes=l,Tr(t,l)}}var Au={readContext:Rn,use:ku,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useLayoutEffect:rn,useInsertionEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useSyncExternalStore:rn,useId:rn,useHostTransitionStatus:rn,useFormState:rn,useActionState:rn,useOptimistic:rn,useMemoCache:rn,useCacheRefresh:rn,useEffectEvent:rn},bv={readContext:Rn,use:ku,useCallback:function(t,n){return Zn().memoizedState=[t,n===void 0?null:n],t},useContext:Rn,useEffect:av,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,Nu(4194308,4,ov.bind(null,n,t),l)},useLayoutEffect:function(t,n){return Nu(4194308,4,t,n)},useInsertionEffect:function(t,n){Nu(4,2,t,n)},useMemo:function(t,n){var l=Zn();n=n===void 0?null:n;var c=t();if(Pl){tn(!0);try{t()}finally{tn(!1)}}return l.memoizedState=[c,n],c},useReducer:function(t,n,l){var c=Zn();if(l!==void 0){var h=l(n);if(Pl){tn(!0);try{l(n)}finally{tn(!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=T6.bind(null,ot,t),[c.memoizedState,t]},useRef:function(t){var n=Zn();return t={current:t},n.memoizedState=t},useState:function(t){t=ph(t);var n=t.queue,l=vv.bind(null,ot,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:yh,useDeferredValue:function(t,n){var l=Zn();return xh(l,t,n)},useTransition:function(){var t=ph(!1);return t=fv.bind(null,ot,t.queue,!0,!1),Zn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var c=ot,h=Zn();if(ut){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Lt===null)throw Error(r(349));(vt&127)!==0||q1(c,n,l)}h.memoizedState=l;var v={value:l,getSnapshot:n};return h.queue=v,av(F1.bind(null,c,v,t),[t]),c.flags|=2048,zo(9,{destroy:void 0},U1.bind(null,c,v,l,n),null),l},useId:function(){var t=Zn(),n=Lt.identifierPrefix;if(ut){var l=wi,c=ji;l=(c&~(1<<32-on(c)-1)).toString(32)+l,n="_"+n+"R_"+l,l=wu++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=j6++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:jh,useFormState:J1,useActionState:J1,useOptimistic:function(t){var n=Zn();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=wh.bind(null,ot,!0,l),l.dispatch=n,[t,n]},useMemoCache:fh,useCacheRefresh:function(){return Zn().memoizedState=E6.bind(null,ot)},useEffectEvent:function(t){var n=Zn(),l={impl:t};return n.memoizedState=l,function(){if((Et&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},jv={readContext:Rn,use:ku,useCallback:cv,useContext:Rn,useEffect:vh,useImperativeHandle:sv,useInsertionEffect:rv,useLayoutEffect:lv,useMemo:uv,useReducer:Cu,useRef:nv,useState:function(){return Cu(lr)},useDebugValue:yh,useDeferredValue:function(t,n){var l=sn();return dv(l,zt.memoizedState,t,n)},useTransition:function(){var t=Cu(lr)[0],n=sn().memoizedState;return[typeof t=="boolean"?t:Xs(t),n]},useSyncExternalStore:H1,useId:pv,useHostTransitionStatus:jh,useFormState:W1,useActionState:W1,useOptimistic:function(t,n){var l=sn();return G1(l,zt,t,n)},useMemoCache:fh,useCacheRefresh:gv,useEffectEvent:iv},A6={readContext:Rn,use:ku,useCallback:cv,useContext:Rn,useEffect:vh,useImperativeHandle:sv,useInsertionEffect:rv,useLayoutEffect:lv,useMemo:uv,useReducer:mh,useRef:nv,useState:function(){return mh(lr)},useDebugValue:yh,useDeferredValue:function(t,n){var l=sn();return zt===null?xh(l,t,n):dv(l,zt.memoizedState,t,n)},useTransition:function(){var t=mh(lr)[0],n=sn().memoizedState;return[typeof t=="boolean"?t:Xs(t),n]},useSyncExternalStore:H1,useId:pv,useHostTransitionStatus:jh,useFormState:tv,useActionState:tv,useOptimistic:function(t,n){var l=sn();return zt!==null?G1(l,zt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:fh,useCacheRefresh:gv,useEffectEvent:iv};function Sh(t,n,l,c){n=t.memoizedState,l=l(c,n),l=l==null?n:I({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var kh={enqueueSetState:function(t,n,l){t=t._reactInternals;var c=Aa(),h=Ur(c);h.payload=n,l!=null&&(h.callback=l),n=Fr(t,h,c),n!==null&&(ua(n,t,c),Vs(n,t,c))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var c=Aa(),h=Ur(c);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Fr(t,h,c),n!==null&&(ua(n,t,c),Vs(n,t,c))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=Aa(),c=Ur(l);c.tag=2,n!=null&&(c.callback=n),n=Fr(t,c,l),n!==null&&(ua(n,t,l),Vs(n,t,l))}};function wv(t,n,l,c,h,v,E){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,v,E):n.prototype&&n.prototype.isPureReactComponent?!Ls(l,c)||!Ls(h,v):!0}function Sv(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&&kh.enqueueReplaceState(n,n.state,null)}function Hl(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=I({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function kv(t){au(t)}function Cv(t){console.error(t)}function Nv(t){au(t)}function Mu(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(c){setTimeout(function(){throw c})}}function Ev(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 Ch(t,n,l){return l=Ur(l),l.tag=3,l.payload={element:null},l.callback=function(){Mu(t,n)},l}function Tv(t){return t=Ur(t),t.tag=3,t}function Av(t,n,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var v=c.value;t.payload=function(){return h(v)},t.callback=function(){Ev(n,l,c)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(t.callback=function(){Ev(n,l,c),typeof h!="function"&&(Zr===null?Zr=new Set([this]):Zr.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})})}function M6(t,n,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(n=l.alternate,n!==null&&Rl(n,l,h,!0),l=On.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qn===null?Zu():l.alternate===null&&ln===0&&(ln=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===gu?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([c]):n.add(c),cm(t,c,h)),!1;case 22:return l.flags|=65536,c===gu?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)),cm(t,c,h)),!1}throw Error(r(435,l.tag))}return cm(t,c,h),Zu(),!1}if(ut)return n=On.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,c!==$f&&(t=Error(r(422),{cause:c}),Ps(qa(t,l)))):(c!==$f&&(n=Error(r(423),{cause:c}),Ps(qa(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=qa(c,l),h=Ch(t.stateNode,c,h),th(t,h),ln!==4&&(ln=2)),!1;var v=Error(r(520),{cause:c});if(v=qa(v,l),ic===null?ic=[v]:ic.push(v),ln!==4&&(ln=2),n===null)return!0;c=qa(c,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=Ch(l.stateNode,c,t),th(l,t),!1;case 1:if(n=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Zr===null||!Zr.has(v))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Tv(h),Av(h,t,l,c),th(l,h),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Nh=Error(r(461)),fn=!1;function bn(t,n,l,c){n.child=t===null?O1(n,null,l,c):Il(n,t.child,l,c)}function Mv(t,n,l,c,h){l=l.render;var v=n.ref;if("ref"in c){var E={};for(var D in c)D!=="ref"&&(E[D]=c[D])}else E=c;return Ol(n),c=sh(t,n,l,E,v,h),D=ch(),t!==null&&!fn?(uh(t,n,h),or(t,n,h)):(ut&&D&&cu(n),n.flags|=1,bn(t,n,c,h),n.child)}function _v(t,n,l,c,h){if(t===null){var v=l.type;return typeof v=="function"&&!qf(v)&&v.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=v,Rv(t,n,v,c,h)):(t=ou(l.type,null,c,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(v=t.child,!zh(t,h)){var E=v.memoizedProps;if(l=l.compare,l=l!==null?l:Ls,l(E,c)&&t.ref===n.ref)return or(t,n,h)}return n.flags|=1,t=tr(v,c),t.ref=n.ref,t.return=n,n.child=t}function Rv(t,n,l,c,h){if(t!==null){var v=t.memoizedProps;if(Ls(v,c)&&t.ref===n.ref)if(fn=!1,n.pendingProps=c=v,zh(t,h))(t.flags&131072)!==0&&(fn=!0);else return n.lanes=t.lanes,or(t,n,h)}return Eh(t,n,l,c,h)}function Ov(t,n,l,c){var h=c.children,v=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(v=v!==null?v.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&~v}else c=0,n.child=null;return zv(t,n,v,l,c)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&mu(n,v!==null?v.cachePool:null),v!==null?L1(n,v):ah(),B1(n);else return c=n.lanes=536870912,zv(t,n,v!==null?v.baseLanes|l:l,l,c)}else v!==null?(mu(n,v.cachePool),L1(n,v),Gr(),n.memoizedState=null):(t!==null&&mu(n,null),ah(),Gr());return bn(t,n,h,l),n.child}function Zs(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function zv(t,n,l,c,h){var v=Zf();return v=v===null?null:{parent:un._currentValue,pool:v},n.memoizedState={baseLanes:l,cachePool:v},t!==null&&mu(n,null),ah(),B1(n),t!==null&&Rl(t,n,c,!0),n.childLanes=h,null}function _u(t,n){return n=Ru({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Dv(t,n,l){return Il(n,t.child,null,l),t=_u(n,n.pendingProps),t.flags|=2,Ca(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(ut){if(c.mode==="hidden")return t=_u(n,c),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Zs(null,t);if(rh(n),(t=qt)?(t=oy(t,Va),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Lr!==null?{id:ji,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},l=y1(t),l.return=n,n.child=l,Sn=n,qt=null)):t=null,t===null)throw Ir(n);return n.lanes=536870912,null}return _u(n,c)}var v=t.memoizedState;if(v!==null){var E=v.dehydrated;if(rh(n),h)if(n.flags&256)n.flags&=-257,n=Dv(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(fn||Rl(t,n,l,!1),h=(l&t.childLanes)!==0,fn||h){if(Vr.current===null){if(c=Lt,c!==null&&(E=La(c,l),E!==0&&E!==v.retryLane))throw v.retryLane=E,Tl(t,E),ua(c,t,E),Nh;Zu()}n=Dv(t,n,l)}else t=v.treeContext,qt=Ga(E.nextSibling),Sn=n,ut=!0,Br=null,Va=!1,t!==null&&j1(n,t),n=_u(n,c),n.flags|=134221824;return n}return t=tr(t.child,{mode:c.mode,children:c.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Do(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 Eh(t,n,l,c,h){return Ol(n),l=sh(t,n,l,c,void 0,h),c=ch(),t!==null&&!fn?(uh(t,n,h),or(t,n,h)):(ut&&c&&cu(n),n.flags|=1,bn(t,n,l,h),n.child)}function Lv(t,n,l,c,h,v){return Ol(n),n.updateQueue=null,l=P1(n,c,l,h),I1(t),c=ch(),t!==null&&!fn?(uh(t,n,v),or(t,n,v)):(ut&&c&&cu(n),n.flags|=1,bn(t,n,l,v),n.child)}function Bv(t,n,l,c,h){if(Ol(n),n.stateNode===null){var v=Co,E=l.contextType;typeof E=="object"&&E!==null&&(v=Rn(E)),v=new l(c,v),n.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=kh,n.stateNode=v,v._reactInternals=n,v=n.stateNode,v.props=c,v.state=n.memoizedState,v.refs={},Wf(n),E=l.contextType,v.context=typeof E=="object"&&E!==null?Rn(E):Co,v.state=n.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(Sh(n,l,E,c),v.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(E=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),E!==v.state&&kh.enqueueReplaceState(v,v.state,null),Gs(n,c,v,h),$s(),v.state=n.memoizedState),typeof v.componentDidMount=="function"&&(n.flags|=4194308),c=!0}else if(t===null){v=n.stateNode;var D=n.memoizedProps,Y=Hl(l,D);v.props=Y;var te=v.context,ce=l.contextType;E=Co,typeof ce=="object"&&ce!==null&&(E=Rn(ce));var ye=l.getDerivedStateFromProps;ce=typeof ye=="function"||typeof v.getSnapshotBeforeUpdate=="function",D=n.pendingProps!==D,ce||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(D||te!==E)&&Sv(n,v,c,E),qr=!1;var J=n.memoizedState;v.state=J,Gs(n,c,v,h),$s(),te=n.memoizedState,D||J!==te||qr?(typeof ye=="function"&&(Sh(n,l,ye,c),te=n.memoizedState),(Y=qr||wv(n,l,Y,c,J,te,E))?(ce||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(n.flags|=4194308)):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=te),v.props=c,v.state=te,v.context=E,c=Y):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{v=n.stateNode,eh(t,n),E=n.memoizedProps,ce=Hl(l,E),v.props=ce,ye=n.pendingProps,J=v.context,te=l.contextType,Y=Co,typeof te=="object"&&te!==null&&(Y=Rn(te)),D=l.getDerivedStateFromProps,(te=typeof D=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(E!==ye||J!==Y)&&Sv(n,v,c,Y),qr=!1,J=n.memoizedState,v.state=J,Gs(n,c,v,h),$s();var le=n.memoizedState;E!==ye||J!==le||qr||t!==null&&t.dependencies!==null&&fu(t.dependencies)?(typeof D=="function"&&(Sh(n,l,D,c),le=n.memoizedState),(ce=qr||wv(n,l,ce,c,J,le,Y)||t!==null&&t.dependencies!==null&&fu(t.dependencies))?(te||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,le,Y),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,le,Y)),typeof v.componentDidUpdate=="function"&&(n.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof v.componentDidUpdate!="function"||E===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),n.memoizedProps=c,n.memoizedState=le),v.props=c,v.state=le,v.context=Y,c=ce):(typeof v.componentDidUpdate!="function"||E===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),c=!1)}return v=c,Do(t,n),c=(n.flags&128)!==0,v||c?(v=n.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:v.render(),n.flags|=1,t!==null&&c?(n.child=Il(n,t.child,null,h),n.child=Il(n,null,l,h)):bn(t,n,l,h),n.memoizedState=v.state,t=n.child):t=or(t,n,h),t}function Iv(t,n,l,c){return Ml(),n.flags|=256,bn(t,n,l,c),n.child}var Th={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ah(t){return{baseLanes:t,cachePool:E1()}}function Mh(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Ta),t}function Pv(t,n,l){var c=n.pendingProps,h=!1,v=(n.flags&128)!==0,E;if((E=v)||(E=t!==null&&t.memoizedState===null?!1:(zn.current&2)!==0),E&&(h=!0,n.flags&=-129),E=(n.flags&32)!==0,n.flags&=-33,t===null){if(ut){if(h?$r(n):Gr(),(t=qt)?(t=oy(t,Va),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Lr!==null?{id:ji,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},l=y1(t),l.return=n,n.child=l,Sn=n,qt=null)):t=null,t===null)throw Ir(n);return Am(t)?n.lanes=32:n.lanes=536870912,null}return v=c.children,c=c.fallback,h?(Gr(),h=n.mode,v=Ru({mode:"hidden",children:v},h),c=Al(c,h,l,null),v.return=n,c.return=n,v.sibling=c,n.child=v,c=n.child,c.memoizedState=Ah(l),c.childLanes=Mh(t,E,l),n.memoizedState=Th,Zs(null,c)):($r(n),_h(n,v))}var D=t.memoizedState;if(D!==null){var Y=D.dehydrated;if(Y!==null)return R6(t,n,v,E,c,Y,D,l)}return h?(Gr(),h=c.fallback,v=n.mode,D=t.child,Y=D.sibling,c=tr(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&1206910976,Y!==null?h=tr(Y,h):(h=Al(h,v,l,null),h.flags|=2),h.return=n,c.return=n,c.sibling=h,n.child=c,Zs(null,c),c=n.child,h=t.child.memoizedState,h===null?h=Ah(l):(v=h.cachePool,v!==null?(D=un._currentValue,v=v.parent!==D?{parent:D,pool:D}:v):v=E1(),h={baseLanes:h.baseLanes|l,cachePool:v}),c.memoizedState=h,c.childLanes=Mh(t,E,l),n.memoizedState=Th,Zs(t.child,c)):($r(n),l=t.child,t=l.sibling,l=tr(l,{mode:"visible",children:c.children}),l.return=n,l.sibling=null,t!==null&&(E=n.deletions,E===null?(n.deletions=[t],n.flags|=16):E.push(t)),n.child=l,n.memoizedState=null,l)}function _h(t,n){return n=Ru({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Ru(t,n){return t=la(22,t,null,n),t.lanes=0,t}function Ou(t,n,l){return Il(n,t.child,null,l),t=_h(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function R6(t,n,l,c,h,v,E,D){if(l)return n.flags&256?($r(n),n.flags&=-257,Ou(t,n,D)):n.memoizedState!==null?(Gr(),n.child=t.child,n.flags|=128,null):(Gr(),v=h.fallback,E=n.mode,h=Ru({mode:"visible",children:h.children},E),v=Al(v,E,D,null),v.flags|=2,h.return=n,v.return=n,h.sibling=v,n.child=h,Il(n,t.child,null,D),h=n.child,h.memoizedState=Ah(D),h.childLanes=Mh(t,c,D),n.memoizedState=Th,Zs(null,h));if($r(n),Am(v)){if(c=v.nextSibling&&v.nextSibling.dataset,c)var Y=c.dgst;return c=Y,c!==""&&(h=Error(r(419)),h.stack="",h.digest=c,Ps({value:h,source:null,stack:null})),Ou(t,n,D)}if(fn||Rl(t,n,D,!1),c=(D&t.childLanes)!==0,fn||c){if(Vr.current!==null)return Ou(t,n,D);if(c=Lt,c!==null&&(h=La(c,D),h!==0&&h!==E.retryLane))throw E.retryLane=h,Tl(t,h),ua(c,t,h),Nh;return Tm(v)||Zu(),Ou(t,n,D)}return Tm(v)?(n.flags|=192,n.child=t.child,null):(t=E.treeContext,qt=Ga(v.nextSibling),Sn=n,ut=!0,Br=null,Va=!1,t!==null&&j1(n,t),n=_h(n,h.children),n.flags|=134221824,n)}function Hv(t,n,l){t.lanes|=n;var c=t.alternate;c!==null&&(c.lanes|=n),du(t.return,n,l)}function qv(t){for(var n=null;t!==null;){var l=t.alternate;l!==null&&bu(l)===null&&(n=t),t=t.sibling}return n}function zu(t,n,l,c,h,v){var E=t.memoizedState;E===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h,treeForkCount:v}:(E.isBackwards=n,E.rendering=null,E.renderingStartTime=0,E.last=c,E.tail=l,E.tailMode=h,E.treeForkCount=v)}function Rh(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 Oh(t,n,l){var c=n.pendingProps,h=c.revealOrder,v=c.tail;c=c.children;var E=zn.current;if(n.flags&128)return Ys(n,E),null;var D=(E&2)!==0;if(D?(E=E&1|2,n.flags|=128):E&=1,Ys(n,E),h==="backwards"&&t!==null?(Rh(t),bn(t,n,c,l),Rh(t)):bn(t,n,c,l),c=ut?Is:0,!D&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Hv(t,l,n);else if(t.tag===19)Hv(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=qv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null,Rh(n)),zu(n,!0,h,null,v,c);break;case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&bu(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}zu(n,!0,l,null,v,c);break;case"together":zu(n,!1,null,null,void 0,c);break;case"independent":n.memoizedState=null;break;default:l=qv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),zu(n,!1,h,l,v,c)}return n.child}function Uv(t,n,l){var c=n.pendingProps;return Pr(n,n.type,c.value),bn(t,n,c.children,l),n.child}function or(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Qr|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(Rl(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=tr(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=tr(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function zh(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&fu(t)))}function O6(t,n,l){switch(n.tag){case 3:$n(n,n.stateNode.containerInfo),Pr(n,un,t.memoizedState.cache),Ml();break;case 27:case 5:Za(n);break;case 4:$n(n,n.stateNode.containerInfo);break;case 10:Pr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,rh(n),null;break;case 13:var c=n.memoizedState;if(c!==null){if(c.dehydrated!==null)return $r(n),n.flags|=128,null;c=Rl(t,n,l,!1);var h=n.child.childLanes;return c||(l&h)!==0?Pv(t,n,l):($r(n),t=or(t,n,l),t!==null?t.sibling:null)}$r(n);break;case 19:if(n.flags&128)return Oh(t,n,l);if(h=(t.flags&128)!==0,c=(l&n.childLanes)!==0,c||(Rl(t,n,l,!1),c=(l&n.childLanes)!==0),h){if(c)return Oh(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ys(n,zn.current),c)break;return null;case 22:return n.lanes=0,Ov(t,n,l,n.pendingProps);case 24:Pr(n,un,t.memoizedState.cache)}return or(t,n,l)}function Fv(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)fn=!0;else{if(!zh(t,l)&&(n.flags&128)===0)return fn=!1,O6(t,n,l);fn=(t.flags&131072)!==0}else fn=!1,ut&&(n.flags&1048576)!==0&&b1(n,Is,n.index);switch(n.lanes=0,n.tag){case 16:e:{var c=n.pendingProps;if(t=Ll(n.elementType),n.type=t,typeof t=="function")qf(t)?(c=Hl(t,c),n.tag=1,n=Bv(null,n,t,c,l)):(n.tag=0,n=Eh(null,n,t,c,l));else{if(t!=null){var h=t.$$typeof;if(h===K){n.tag=11,n=Mv(null,n,t,c,l);break e}else if(h===ie){n.tag=14,n=_v(null,n,t,c,l);break e}else if(h===F){n.tag=10,n.type=t,n=Uv(null,n,l);break e}}throw n=Ce(t)||t,Error(r(306,n,""))}}return n;case 0:return Eh(t,n,n.type,n.pendingProps,l);case 1:return c=n.type,h=Hl(c,n.pendingProps),Bv(t,n,c,h,l);case 3:e:{if($n(n,n.stateNode.containerInfo),t===null)throw Error(r(387));c=n.pendingProps;var v=n.memoizedState;h=v.element,eh(t,n),Gs(n,c,null,l);var E=n.memoizedState;if(c=E.cache,Pr(n,un,c),c!==v.cache&&Kf(n,[un],l,!0),$s(),c=E.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:E.cache},n.updateQueue.baseState=v,n.memoizedState=v,n.flags&256){n=Iv(t,n,c,l);break e}else if(c!==h){h=qa(Error(r(424)),n),Ps(h),n=Iv(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(qt=Ga(t.firstChild),Sn=n,ut=!0,Br=null,Va=!0,l=O1(n,null,c,l),n.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Ml(),c===h){n=or(t,n,l);break e}bn(t,n,c,l)}n=n.child}return n;case 26:return Do(t,n),t===null?(l=my(n.type,null,n.pendingProps,null))?n.memoizedState=l:ut||(n.stateNode=Y2(n.type,n.pendingProps,en.current,n)):n.memoizedState=my(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Za(n),t===null&&ut&&(c=n.stateNode=uy(n.type,n.pendingProps,en.current),Sn=n,Va=!0,h=qt,el(n.type)?(Mm=h,qt=Ga(c.firstChild)):qt=h),bn(t,n,n.pendingProps.children,l),Do(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&ut&&((h=c=qt)&&(c=E8(c,n.type,n.pendingProps,Va),c!==null?(n.stateNode=c,Sn=n,qt=Ga(c.firstChild),Va=!1,h=!0):h=!1),h||Ir(n)),Za(n),h=n.type,v=n.pendingProps,E=t!==null?t.memoizedProps:null,c=v.children,jm(h,v)?c=null:E!==null&&jm(h,E)&&(n.flags|=32),n.memoizedState!==null&&(h=sh(t,n,w6,null,null,l),Wo._currentValue=h),Do(t,n),bn(t,n,c,l),n.child;case 6:return t===null&&ut&&((t=l=qt)&&(l=T8(l,n.pendingProps,Va),l!==null?(n.stateNode=l,Sn=n,qt=null,t=!0):t=!1),t||Ir(n)),null;case 13:return Pv(t,n,l);case 4:return $n(n,n.stateNode.containerInfo),c=n.pendingProps,t===null?n.child=Il(n,null,c,l):bn(t,n,c,l),n.child;case 11:return Mv(t,n,n.type,n.pendingProps,l);case 7:return c=n.pendingProps,Do(t,n),bn(t,n,c,l),n.child;case 8:return bn(t,n,n.pendingProps.children,l),n.child;case 12:return bn(t,n,n.pendingProps.children,l),n.child;case 10:return Uv(t,n,l);case 9:return h=n.type._context,c=n.pendingProps.children,Ol(n),h=Rn(h),c=c(h),n.flags|=1,bn(t,n,c,l),n.child;case 14:return _v(t,n,n.type,n.pendingProps,l);case 15:return Rv(t,n,n.type,n.pendingProps,l);case 19:return Oh(t,n,l);case 31:return _6(t,n,l);case 22:return Ov(t,n,l,n.pendingProps);case 24:return Ol(n),c=Rn(un),t===null?(h=Zf(),h===null&&(h=Lt,v=Xf(),h.pooledCache=v,v.refCount++,v!==null&&(h.pooledCacheLanes|=l),h=v),n.memoizedState={parent:c,cache:h},Wf(n),Pr(n,un,h)):((t.lanes&l)!==0&&(eh(t,n),Gs(n,null,null,l),$s()),h=t.memoizedState,v=n.memoizedState,h.parent!==c?(h={parent:c,cache:c},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Pr(n,un,c)):(c=v.cache,Pr(n,un,c),c!==h.cache&&Kf(n,[un],l,!0))),bn(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:ut&&cu(n),t!==null&&t.memoizedProps.name!==c.name?n.flags|=4194816:Do(t,n),bn(t,n,c.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function sr(t){t.flags|=4}function Dh(t,n,l,c,h){var v;if((v=(t.mode&32)!==0)&&(v=l===null?yy(n,c):yy(n,c)&&(c.src!==l.src||c.srcSet!==l.srcSet)),v){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(k2())t.flags|=8192;else throw Bl=gu,Jf}else t.flags&=-16777217}function Vv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!xy(n))if(k2())t.flags|=8192;else throw Bl=gu,Jf}function Du(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?ya():536870912,t.lanes|=n,Ho|=n)}function Js(t,n){if(!ut)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 Ut(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 z6(t,n,l){var c=n.pendingProps;switch(Vf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(n),null;case 1:return Ut(n),null;case 3:return l=n.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),n.memoizedState.cache!==c&&(n.flags|=2048),ir(un),An(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(To(n)?sr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Gf())),Ut(n),null;case 26:var h=n.type,v=n.memoizedState;return t===null?(sr(n),v!==null?(Ut(n),Vv(n,v)):(Ut(n),Dh(n,h,null,c,l))):v?v!==t.memoizedState?(sr(n),Ut(n),Vv(n,v)):(Ut(n),n.flags&=-16777217):(t=t.memoizedProps,t!==c&&sr(n),Ut(n),Dh(n,h,t,c,l)),null;case 27:if(ge(n),l=en.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==c&&sr(n);else{if(!c){if(n.stateNode===null)throw Error(r(166));return Ut(n),n.subtreeFlags&=-33554433,null}t=Pt.current,To(n)?w1(n):(t=uy(h,c,l),n.stateNode=t,sr(n))}return Ut(n),n.subtreeFlags&=-33554433,null;case 5:if(ge(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==c&&sr(n);else{if(!c){if(n.stateNode===null)throw Error(r(166));return Ut(n),n.subtreeFlags&=-33554433,null}if(v=Pt.current,To(n))w1(n);else{var E=cc(en.current);switch(v){case 1:v=E.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:v=E.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":v=E.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":v=E.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":v=E.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?E.createElement("select",{is:c.is}):E.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?E.createElement(h,{is:c.is}):E.createElement(h)}}v[Vt]=n,v[xn]=c;e:for(E=n.child;E!==null;){if(E.tag===5||E.tag===6)v.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===n)break e;for(;E.sibling===null;){if(E.return===null||E.return===n)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}n.stateNode=v;e:switch(Ln(v,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&&sr(n)}}return Ut(n),n.subtreeFlags&=-33554433,Dh(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==c&&sr(n);else{if(typeof c!="string"&&n.stateNode===null)throw Error(r(166));if(t=en.current,To(n)){if(t=n.stateNode,l=n.memoizedProps,c=null,h=Sn,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[Vt]=n,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||F2(t.nodeValue,l)),t||Ir(n,!0)}else t=cc(t).createTextNode(c),t[Vt]=n,n.stateNode=t}return Ut(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(c=To(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[Vt]=n}else Ml(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ut(n),t=!1}else l=Gf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(Ca(n),n):(Ca(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Ut(n),null;case 13:if(c=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=To(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[Vt]=n}else Ml(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ut(n),h=!1}else h=Gf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Ca(n),n):(Ca(n),null)}return Ca(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),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==h&&(c.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Du(n,n.updateQueue),Ut(n),null);case 4:return An(),t===null&&gm(n.stateNode.containerInfo),n.flags|=67108864,Ut(n),null;case 10:return ir(n.type),Ut(n),null;case 19:if(lh(n),c=n.memoizedState,c===null)return Ut(n),null;if(h=(n.flags&128)!==0,v=c.rendering,v===null)if(h)Js(c,!1);else{if(ln!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(v=bu(t),v!==null){for(n.flags|=128,Js(c,!1),t=v.updateQueue,n.updateQueue=t,Du(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)v1(l,t),l=l.sibling;return Ys(n,zn.current&1|2),ut&&nr(n,c.treeForkCount),n.child}t=t.sibling}c.tail!==null&&Gt()>Yu&&(n.flags|=128,h=!0,Js(c,!1),n.lanes=4194304)}else{if(!h)if(t=bu(v),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Du(n,t),Js(c,!0),c.tail===null&&c.tailMode!=="collapsed"&&c.tailMode!=="visible"&&!v.alternate&&!ut)return Ut(n),null}else 2*Gt()-c.renderingStartTime>Yu&&l!==536870912&&(n.flags|=128,h=!0,Js(c,!1),n.lanes=4194304);c.isBackwards?(v.sibling=n.child,n.child=v):(t=c.last,t!==null?t.sibling=v:n.child=v,c.last=v)}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=Gt(),t.sibling=null,v=zn.current,v=h?v&1|2:v&1,c.tailMode==="visible"||c.tailMode==="collapsed"||!l||ut?Ys(n,v):(l=v,We(On,n),We(zn,l),qn===null&&(qn=n)),ut&&nr(n,c.treeForkCount),t}return Ut(n),null;case 22:case 23:return Ca(n),ih(),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&&(Ut(n),n.subtreeFlags&6&&(n.flags|=8192)):Ut(n),l=n.updateQueue,l!==null&&Du(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&&Qe(Dl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ir(un),Ut(n),null;case 25:return null;case 30:return n.flags|=33554432,Ut(n),null}throw Error(r(156,n.tag))}function D6(t,n){switch(Vf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ir(un),An(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return ge(n),null;case 31:if(n.memoizedState!==null){if(Ca(n),n.alternate===null)throw Error(r(340));Ml()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Ca(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Ml()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return lh(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 An(),null;case 10:return ir(n.type),null;case 22:case 23:return Ca(n),ih(),t!==null&&Qe(Dl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ir(un),null;case 25:return null;default:return null}}function $v(t,n){switch(Vf(n),n.tag){case 3:ir(un),An();break;case 26:case 27:case 5:ge(n);break;case 4:An();break;case 31:n.memoizedState!==null&&Ca(n);break;case 13:Ca(n);break;case 19:lh(n);break;case 10:ir(n.type);break;case 22:case 23:Ca(n),ih(),t!==null&&Qe(Dl);break;case 24:ir(un)}}function Ws(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 v=l.create,E=l.inst;c=v(),E.destroy=c}l=l.next}while(l!==h)}}catch(D){_t(n,n.return,D)}}function Yr(t,n,l){try{var c=n.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&t)===t){var E=c.inst,D=E.destroy;if(D!==void 0){E.destroy=void 0,h=n;var Y=l,te=D;try{te()}catch(ce){_t(h,Y,ce)}}}c=c.next}while(c!==v)}}catch(ce){_t(n,n.return,ce)}}function Gv(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{D1(n,l)}catch(c){_t(t,t.return,c)}}}function Yv(t,n,l){l.props=Hl(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){_t(t,n,c)}}function Si(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,v=Wi(t.memoizedProps,h);(h.ref===null||h.ref.name!==v)&&(h.ref=ey(v)),c=h.ref;break;case 7:if(t.stateNode===null){var E=new Ma(t);g(t.child,!1,C8,E,void 0,void 0),t.stateNode=E}c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(D){_t(t,n,D)}}function Dn(t,n){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){_t(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){_t(t,n,h)}else l.current=null}function Lu(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++)ly(t.stateNode,n[l])}function Kv(t){for(var n=t.return;n!==null&&(Bh(n)&&ly(t.stateNode,n.stateNode),!Lh(n));)n=n.return}function ec(t){for(var n=t.return;n!==null&&(Bh(n)&&N8(t.stateNode,n.stateNode),!Lh(n));)n=n.return}function Lh(t){return t.tag===5||t.tag===3||t.tag===27}function Bh(t){return t&&t.tag===7&&t.stateNode!==null}function Ih(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){_t(t,t.return,h)}}function Ph(t,n,l){try{var c=t.stateNode;o8(c,t.type,l,n),c[xn]=n}catch(h){_t(t,t.return,h)}}function Xv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&el(t.type)||t.tag===4}function Hh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Xv(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&&el(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 qh(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=Xn)),Lu(t,c),Le=!0;else if(h!==4&&(h===27&&(Lu(t,c),c=null,el(t.type)&&(l=t.stateNode,n=null)),t=t.child,t!==null))for(qh(t,n,l,c),t=t.sibling;t!==null;)qh(t,n,l,c),t=t.sibling}function Bu(t,n,l,c){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?l.insertBefore(h,n):l.appendChild(h),Lu(t,c),Le=!0;else if(h!==4&&(h===27&&(Lu(t,c),c=null,el(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Bu(t,n,l,c),t=t.sibling;t!==null;)Bu(t,n,l,c),t=t.sibling}function Qv(t){var n=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Ln(n,c,l),n[Vt]=t,n[xn]=l}catch(v){_t(t,t.return,v)}}var Iu=!1,Na=null;function Zv(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Iu=!0)}var ki=null;function Jv(){var t=ki;return ki=null,t}var oa=0;function Lo(t,n,l,c,h){return oa=0,Wv(t.child,n,l,c,h)}function Wv(t,n,l,c,h){for(var v=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(c!==null){var D=km(E);c.push(D),D.view&&(v=!0)}else v||km(E).view&&(v=!0);Iu=!0,J2(E,oa===0?n:n+"_"+oa,l),oa++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h||Wv(t.child,n,l,c,h)&&(v=!0));t=t.sibling}return v}function Ci(t,n){for(;t!==null;)t.tag===5?W2(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||Ci(t.child,n)),t=t.sibling}function Pu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Pu(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=er(n.default,n.share),n!=="none"&&(Lo(t,l,n,null,!1)||Ci(t.child,!1))}t=t.sibling}}function Uh(t,n){if(t.tag===30){var l=t.stateNode,c=t.memoizedProps,h=Wi(c,l),v=er(c.default,l.paired?c.share:c.enter);v!=="none"?Lo(t,h,v,null,!1)?(Pu(t),l.paired||n||Vo(t,c.onEnter)):Ci(t.child,!1):Pu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Uh(t,n),t=t.sibling;else Pu(t)}function Fh(t){if(Na!==null&&Na.size!==0){var n=Na;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 v=er(l.default,l.share);if(v!=="none"&&(Lo(t,c,v,null,!1)?(v=t.stateNode,h.paired=v,v.paired=h,Vo(t,l.onShare)):Ci(t.child,!1)),n.delete(c),n.size===0)break}}}Fh(t)}t=t.sibling}}}function Vh(t){if(t.tag===30){var n=t.memoizedProps,l=Wi(n,t.stateNode),c=Na!==null?Na.get(l):void 0,h=er(n.default,c!==void 0?n.share:n.exit);h!=="none"&&(Lo(t,l,h,null,!1)?c!==void 0?(h=t.stateNode,c.paired=h,h.paired=c,Na.delete(l),Vo(t,n.onShare)):Vo(t,n.onExit):Ci(t.child,!1)),Na!==null&&Fh(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Vh(t),t=t.sibling;else Na!==null&&Fh(t)}function e2(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,l=Wi(n,t.stateNode);n=er(n.default,n.update),t.flags&=-5,n!=="none"&&Lo(t,l,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&e2(t);t=t.sibling}}function $h(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,Ci(t.child,!1))}$h(t)}t=t.sibling}}function Hu(t){if(t.tag===30)t.stateNode.paired=null,Ci(t.child,!1),$h(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Hu(t),t=t.sibling;else $h(t)}function t2(t){for(t=t.child;t!==null;)t.tag===30?Ci(t.child,!1):(t.subtreeFlags&33554432)!==0&&t2(t),t=t.sibling}function Gh(t,n,l,c,h,v,E){for(var D=!1;n!==null;){if(n.tag===5){var Y=n.stateNode;if(v!==null&&oa<v.length){var te=v[oa],ce=km(Y);(te.view||ce.view)&&(D=!0);var ye;if(ye=(t.flags&4)===0)if(ce.clip)ye=!0;else{ye=te.rect;var J=ce.rect;ye=ye.y!==J.y||ye.x!==J.x||ye.height!==J.height||ye.width!==J.width}ye&&(t.flags|=4),ce.abs?ce=!te.abs:(te=te.rect,ce=ce.rect,ce=te.height!==ce.height||te.width!==ce.width),ce&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&J2(Y,oa===0?l:l+"_"+oa,h),D&&(t.flags&4)!==0||(ki===null&&(ki=[]),ki.push(Y,oa===0?c:c+"_"+oa,n.memoizedProps)),oa++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&E?t.flags|=n.flags&32:Gh(t,n.child,l,c,h,v,E)&&(D=!0));n=n.sibling}return D}function n2(t,n){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,c=t.stateNode,h=Wi(l,c),v=er(l.default,l.update),E;E=t.memoizedState,t.memoizedState=null,c=t;var D=t.child;oa=0,h=Gh(c,D,h,h,v,E,!1),(t.flags&4)!==0&&h&&Vo(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&n2(t);t=t.sibling}}var kn=!1,Tt=!1,Ni=!1,Yh=!1,a2=typeof WeakSet=="function"?WeakSet:Set,Cn=null,Ei=!1,tc=!1,qu=!1,Kh=!1;function L6(t,n,l){if(t=t.containerInfo,xm=es,t=o1(t),zf(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 v=h.anchorOffset,E=h.focusNode;h=h.focusOffset;try{c.nodeType,E.nodeType}catch{c=null;break e}var D=0,Y=-1,te=-1,ce=0,ye=0,J=t,le=null;t:for(;;){for(var Oe;J!==c||v!==0&&J.nodeType!==3||(Y=D+v),J!==E||h!==0&&J.nodeType!==3||(te=D+h),J.nodeType===3&&(D+=J.nodeValue.length),(Oe=J.firstChild)!==null;)le=J,J=Oe;for(;;){if(J===t)break t;if(le===c&&++ce===v&&(Y=D),le===E&&++ye===h&&(te=D),(Oe=J.nextSibling)!==null)break;J=le,le=J.parentNode}J=Oe}c=Y===-1||te===-1?null:{start:Y,end:te}}else c=null}c=c||{start:0,end:0}}else c=null;for(bm={focusedElem:t,selectionRange:c},es=!1,l=(l&335544064)===l,Cn=n,n=l?9270:1024;Cn!==null;){if(t=Cn,l&&(c=t.deletions,c!==null))for(v=0;v<c.length;v++)l&&Vh(c[v]);if(t.alternate===null&&(t.flags&2)!==0)l&&Zv(t),Uu(l);else{if(t.tag===22){if(c=t.alternate,t.memoizedState!==null){c!==null&&c.memoizedState===null&&l&&Vh(c),Uu(l);continue}else if(c!==null&&c.memoizedState!==null){l&&Zv(t),Uu(l);continue}}c=t.child,(t.subtreeFlags&n)!==0&&c!==null?(c.return=t,Cn=c):(l&&e2(t),Uu(l))}}Na=null}function Uu(t){for(;Cn!==null;){var n=Cn,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 v=n.stateNode;try{var E=Hl(n.type,h);l=v.getSnapshotBeforeUpdate(E,c),v.__reactInternalSnapshotBeforeUpdate=l}catch(D){_t(n,n.return,D)}}break;case 3:if((h&1024)!==0){if(c=n.stateNode.containerInfo,l=c.nodeType,l===9)Em(c);else if(l===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":Em(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=Wi(c.memoizedProps,c.stateNode),h=n.memoizedProps,h=er(h.default,h.update),h!=="none"&&Lo(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,Cn=c;break}Cn=n.return}}function i2(t,n,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Ti(t,l),c&4&&Ws(5,l);break;case 1:if(Ti(t,l),c&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(E){_t(l,l.return,E)}else{var h=Hl(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(E){_t(l,l.return,E)}}c&64&&Gv(l),c&512&&Si(l,l.return);break;case 3:if(Ti(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{D1(t,n)}catch(E){_t(l,l.return,E)}}break;case 27:n===null&&c&4&&Qv(l);case 26:case 5:Ti(t,l),n===null&&c&4&&Ih(l),c&512&&Si(l,l.return);break;case 12:Ti(t,l);break;case 31:Ti(t,l),c&4&&s2(t,l);break;case 13:Ti(t,l),c&4&&c2(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=K6.bind(null,l),A8(t,l))));break;case 22:if(c=l.memoizedState!==null||kn,!c){var v=n!==null&&n.memoizedState!==null||Tt;n=kn,h=Tt,kn=c,(Tt=v)&&!h?(c=2,(l.subtreeFlags&8772)!==0&&(c|=1),li(t,l,c)):Ti(t,l),kn=n,Tt=h}break;case 30:Ti(t,l),c&512&&Si(l,l.return);break;case 7:c&512&&Si(l,l.return);default:Ti(t,l)}}function Xh(t,n){for(t=t.child;t!==null;)r2(t,n),t=t.sibling}function r2(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,v=t.memoizedProps.style,E=v!=null&&v.hasOwnProperty("display")?v.display:null;h.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(Y){_t(t,t.return,Y)}Qh(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,Le=!0}catch(Y){_t(t,t.return,Y)}break;case 18:try{var D=t.stateNode;n?Z2(D,!0):Z2(t.stateNode,!1)}catch(Y){_t(t,t.return,Y)}break;case 22:case 23:t.memoizedState===null&&Xh(t,n);break;default:Xh(t,n)}}function Qh(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var l=t,c=n;switch(l.tag){case 4:r2(l,c);break e;case 22:l.memoizedState===null&&Qh(l,c);break e;default:Qh(l,c)}}t=t.sibling}}function l2(t){var n=t.alternate;n!==null&&(t.alternate=null,l2(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&_r(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 Yt=null,sa=!1;function ii(t,n,l){for(l=l.child;l!==null;)o2(t,n,l),l=l.sibling}function o2(t,n,l){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(gi,l)}catch{}switch(l.tag){case 26:Tt||Dn(l,n),ii(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Tt&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Tt||Dn(l,n),ec(l);var c=Yt,h=sa;el(l.type)&&(Yt=l.stateNode,sa=!1),ii(t,n,l),dy(l.stateNode,l.type,l.memoizedProps),Yt=c,sa=h;break;case 5:Tt||Dn(l,n),ec(l);case 6:if(l.tag===6&&ec(l),c=Yt,h=sa,Yt=null,ii(t,n,l),Yt=c,sa=h,Yt!==null)if(sa)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(l.stateNode),Le=!0}catch(v){_t(l,n,v)}else try{Yt.removeChild(l.stateNode),Le=!0}catch(v){_t(l,n,v)}break;case 18:Yt!==null&&(sa?(t=Yt,Q2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),ts(t)):Q2(Yt,l.stateNode));break;case 4:c=Yt,h=sa,Yt=l.stateNode.containerInfo,sa=!0,ii(t,n,l),Yt=c,sa=h;break;case 0:case 11:case 14:case 15:Yr(2,l,n),Tt||Yr(4,l,n),ii(t,n,l);break;case 1:Tt||(Dn(l,n),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Yv(l,n,c)),ii(t,n,l);break;case 21:ii(t,n,l);break;case 22:Tt=(c=Tt)||l.memoizedState!==null,ii(t,n,l),Tt=c;break;case 30:Dn(l,n),ii(t,n,l);break;case 7:Tt||Dn(l,n),ii(t,n,l);break;default:ii(t,n,l)}}function s2(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ts(t)}catch(l){_t(n,n.return,l)}}}function c2(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ts(t)}catch(l){_t(n,n.return,l)}}function B6(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new a2),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new a2),n;default:throw Error(r(435,t.tag))}}function Fu(t,n){var l=B6(t);n.forEach(function(c){if(!l.has(c)){l.add(c);var h=X6.bind(null,t,c);c.then(h,h)}})}function Jn(t,n,l){var c=n.deletions;if(c!==null)for(var h=0;h<c.length;h++){var v=c[h],E=t,D=n,Y=D;e:for(;Y!==null;){switch(Y.tag){case 27:if(el(Y.type)){Yt=Y.stateNode,sa=!1;break e}break;case 5:Yt=Y.stateNode,sa=!1;break e;case 3:case 4:Yt=Y.stateNode.containerInfo,sa=!0;break e}Y=Y.return}if(Yt===null)throw Error(r(160));o2(E,D,v),Yt=null,sa=!1,E=v.alternate,E!==null&&(E.return=null),v.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)u2(n,t,l),n=n.sibling}var ri=null;function u2(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 v=0;v<c.length;v++){var E=c[v];E.ref.impl=E.nextImpl}Jn(n,t,l),Wn(t),h&4&&(Yr(3,t,t.return),Ws(3,t),Yr(5,t,t.return));break;case 1:Jn(n,t,l),Wn(t),h&512&&(Tt||c===null||Dn(c,c.return)),h&64&&kn&&(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(v=ri,Jn(n,t,l),Wn(t),h&512&&(Tt||c===null||Dn(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(kn)t.stateNode=Y2(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,l=t.memoizedProps,h=v.ownerDocument||v;t:switch(n){case"title":c=h.getElementsByTagName("title")[0],(!c||c[Qi]||c[Vt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=h.createElement(n),h.head.insertBefore(c,h.querySelector("head > title"))),Ln(c,n,l),c[Vt]=t,je(c),n=c;break e;case"link":if(v=vy("link","href",h).get(n+(l.href||""))){for(E=0;E<v.length;E++)if(c=v[E],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)){v.splice(E,1);break t}}c=h.createElement(n),Ln(c,n,l),h.head.appendChild(c);break;case"meta":if(v=vy("meta","content",h).get(n+(l.content||""))){for(E=0;E<v.length;E++)if(c=v[E],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)){v.splice(E,1);break t}}c=h.createElement(n),Ln(c,n,l),h.head.appendChild(c);break;default:throw Error(r(468,n))}c[Vt]=t,je(c),n=c}t.stateNode=n}else kn||zm(v,t.type,t.stateNode);else t.stateNode=gy(v,l,t.memoizedProps);else h!==l?(h===null?(n=c.stateNode,n===null||Tt||n.parentNode.removeChild(n)):h.count--,l===null?kn||zm(v,t.type,t.stateNode):gy(v,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Ph(t,t.memoizedProps,c.memoizedProps);break;case 27:Jn(n,t,l),Wn(t),h&512&&(Tt||c===null||Dn(c,c.return)),c!==null&&h&4&&Ph(t,t.memoizedProps,c.memoizedProps);break;case 5:if(v=Ni,Ni=!1,Jn(n,t,l),Ni=v,Wn(t),h&512&&(Tt||c===null||Dn(c,c.return)),t.flags&32){n=t.stateNode;try{Kn(n,""),Le=!0}catch(ce){_t(t,t.return,ce)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,Ph(t,n,c!==null?c.memoizedProps:n)),h&1024&&(Yh=!0);break;case 6:if(Jn(n,t,l),Wn(t),h&4){if(t.stateNode===null)throw Error(r(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n,Le=!0}catch(ce){_t(t,t.return,ce)}}break;case 3:if(Le=!1,id=null,v=ri,ri=uc(n.containerInfo),Jn(n,t,l),ri=v,Wn(t),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ts(n.containerInfo)}catch(ce){_t(t,t.return,ce)}Yh&&(Yh=!1,d2(t)),Le=!1;break;case 4:h=Ni,Ni=kn,c=dt(),v=ri,ri=uc(t.stateNode.containerInfo),Jn(n,t,l),Wn(t),ri=v,Le&&tc&&(qu=!0),Le=c,Ni=h;break;case 12:Jn(n,t,l),Wn(t);break;case 31:Jn(n,t,l),Wn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Fu(t,n)));break;case 13:Jn(n,t,l),Wn(t),t.child.flags&8192&&t.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Gu=Gt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Fu(t,n)));break;case 22:v=t.memoizedState!==null,E=c!==null&&c.memoizedState!==null;var D=kn,Y=Tt,te=Ni;kn=D||v,Ni=te||v,Tt=Y||E,Jn(n,t,l),Tt=Y,Ni=te,kn=D,Wn(t),h&8192&&(n=t.stateNode,n._visibility=v?n._visibility&-2:n._visibility|1,!v||c===null||E||kn||Tt||(n=E||Tt,l=kn,c=Tt,kn=v||kn,Tt=n,Kr(t,2),kn=l,Tt=c),!v&&Ni||Xh(t,v)),h&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Fu(t,l))));break;case 19:Jn(n,t,l),Wn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Fu(t,n)));break;case 30:h&512&&(Tt||c===null||Dn(c,c.return)),h=dt(),v=tc,E=(l&335544064)===l,D=t.memoizedProps,tc=E&&er(D.default,D.update)!=="none",Jn(n,t,l),Wn(t),E&&c!==null&&Le&&(t.flags|=4),tc=v,Le=h;break;case 21:break;case 7:h&512&&(Tt||c===null||Dn(c,c.return)),c&&c.stateNode!==null&&(c.stateNode._fragmentFiber=t);default:Jn(n,t,l),Wn(t)}}function Wn(t){var n=t.flags;if(n&2){try{for(var l,c=t.return;c!==null;){if(Xv(c)){l=c;break}c=c.return}c=null;for(var h=t.return;h!==null;){if(Bh(h)){var v=h.stateNode;c===null?c=[v]:c.push(v)}if(Lh(h))break;h=h.return}var E=c;if(l==null)throw Error(r(160));switch(l.tag){case 27:var D=l.stateNode,Y=Hh(t);Bu(t,Y,D,E);break;case 5:var te=l.stateNode;l.flags&32&&(Kn(te,""),l.flags&=-33);var ce=Hh(t);Bu(t,ce,te,E);break;case 3:case 4:var ye=l.stateNode.containerInfo,J=Hh(t);qh(t,J,ye,E);break;default:throw Error(r(161))}}catch(le){_t(t,t.return,le)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function d2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;d2(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,es=!0,n.reset(),es=!1),t=t.sibling}}function Bo(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)f2(n,t),n=n.sibling;else n2(n)}function f2(t,n){var l=t.alternate;if(l===null)Uh(t,!1);else switch(t.tag){case 3:if(Kh=Ei=!1,Jv(),Bo(n,t),!Ei&&!qu){if(t=ki,t!==null)for(var c=0;c<t.length;c+=3){l=t[c];var h=t[c+1];W2(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"})),Kh=!0}ki=null;break;case 5:Bo(n,t);break;case 4:c=Ei,Ei=!1,Bo(n,t),Ei&&(qu=!0),Ei=c;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Uh(t,!1):Bo(n,t));break;case 30:c=Ei,h=Jv(),Ei=!1,Bo(n,t),Ei&&(t.flags|=4);var v=t.memoizedProps,E=t.stateNode;n=Wi(v,E),E=Wi(l.memoizedProps,E);var D=er(v.default,v.update);D==="none"?n=!1:(v=l.memoizedState,l.memoizedState=null,l=t.child,oa=0,n=Gh(t,l,n,E,D,v,!0),oa!==(v===null?0:v.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Vo(t,t.memoizedProps.onUpdate),ki=h):h!==null&&(h.push.apply(h,ki),ki=h),Ei=(t.flags&32)!==0?!0:c;break;default:Bo(n,t)}}function Ti(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)i2(t,n.alternate,n),n=n.sibling}function Kr(t,n){for(t=t.child;t!==null;){var l=t,c=n;switch(l.tag){case 0:case 11:case 14:case 15:Yr(4,l,l.return),Kr(l,c);break;case 1:Dn(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&Yv(l,l.return,h),Kr(l,c);break;case 27:(c&2)!==0&&dy(l.stateNode,l.type,l.memoizedProps);case 5:Dn(l,l.return),l.tag!==5&&l.tag!==27||ec(l),Kr(l,c);break;case 6:ec(l);break;case 26:Dn(l,l.return),h=l.stateNode,l.memoizedState!==null||h===null||Tt||h.parentNode.removeChild(h),Kr(l,c);break;case 22:l.memoizedState===null&&Kr(l,c);break;case 30:Dn(l,l.return),Kr(l,c);break;case 7:Dn(l,l.return);default:Kr(l,c)}t=t.sibling}}function li(t,n,l){for(l=(n.subtreeFlags&8772)!==0?l:l&-2,n=n.child;n!==null;){var c=n.alternate,h=t,v=n,E=v.flags,D=(l&1)!==0;switch(v.tag){case 0:case 11:case 15:li(h,v,l),Ws(4,v);break;case 1:if(li(h,v,l),c=v,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(ce){_t(c,c.return,ce)}if(c=v,h=c.updateQueue,h!==null){var Y=c.stateNode;try{var te=h.shared.hiddenCallbacks;if(te!==null)for(h.shared.hiddenCallbacks=null,h=0;h<te.length;h++)z1(te[h],Y)}catch(ce){_t(c,c.return,ce)}}D&&E&64&&Gv(v),Si(v,v.return);break;case 27:(l&2)!==0&&Qv(v);case 5:v.tag!==5&&v.tag!==27||Kv(v),li(h,v,l),D&&c===null&&E&4&&Ih(v),Si(v,v.return);break;case 6:Kv(v);break;case 26:Y=v.stateNode,v.memoizedState!==null||Y===null||kn||zm(uc(Y.ownerDocument),v.type,Y),li(h,v,l),D&&c===null&&E&4&&Ih(v),Si(v,v.return);break;case 12:li(h,v,l);break;case 31:li(h,v,l),D&&E&4&&s2(h,v);break;case 13:li(h,v,l),D&&E&4&&c2(h,v);break;case 22:v.memoizedState===null&&li(h,v,l),Si(v,v.return);break;case 30:li(h,v,l),Si(v,v.return);break;case 7:Si(v,v.return);default:li(h,v,l)}n=n.sibling}}function Zh(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&&Hs(l))}function Jh(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Hs(t))}function $a(t,n,l,c){var h=(l&335544064)===l;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)h2(t,n,l,c),n=n.sibling;else h&&t2(n)}function h2(t,n,l,c){var h=(l&335544064)===l;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Hu(n);var v=n.flags;switch(n.tag){case 0:case 11:case 15:$a(t,n,l,c),v&2048&&Ws(9,n);break;case 1:$a(t,n,l,c);break;case 3:$a(t,n,l,c),h&&Kh&&(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="")),v&2048&&(v=null,n.alternate!==null&&(v=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==v&&(n.refCount++,v!=null&&Hs(v)));break;case 12:if(v&2048){$a(t,n,l,c),v=n.stateNode;try{var E=n.memoizedProps,D=E.id,Y=E.onPostCommit;typeof Y=="function"&&Y(D,n.alternate===null?"mount":"update",v.passiveEffectDuration,-0)}catch(te){_t(n,n.return,te)}}else $a(t,n,l,c);break;case 31:$a(t,n,l,c);break;case 13:$a(t,n,l,c);break;case 23:break;case 22:E=n.stateNode,D=n.alternate,n.memoizedState!==null?(h&&D!==null&&D.memoizedState===null&&Hu(D),E._visibility&2?$a(t,n,l,c):nc(t,n)):(h&&D!==null&&D.memoizedState!==null&&Hu(n),E._visibility&2?$a(t,n,l,c):(E._visibility|=2,Io(t,n,l,c,(n.subtreeFlags&10256)!==0||!1))),v&2048&&Zh(D,n);break;case 24:$a(t,n,l,c),v&2048&&Jh(n.alternate,n);break;case 30:h&&(v=n.alternate,v!==null&&(Ci(v.child,!0),Ci(n.child,!0))),$a(t,n,l,c);break;default:$a(t,n,l,c)}}function Io(t,n,l,c,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var v=t,E=n,D=l,Y=c,te=E.flags;switch(E.tag){case 0:case 11:case 15:Io(v,E,D,Y,h),Ws(8,E);break;case 23:break;case 22:var ce=E.stateNode;E.memoizedState!==null?ce._visibility&2?Io(v,E,D,Y,h):nc(v,E):(ce._visibility|=2,Io(v,E,D,Y,h)),h&&te&2048&&Zh(E.alternate,E);break;case 24:Io(v,E,D,Y,h),h&&te&2048&&Jh(E.alternate,E);break;default:Io(v,E,D,Y,h)}n=n.sibling}}function nc(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:nc(l,c),h&2048&&Zh(c.alternate,c);break;case 24:nc(l,c),h&2048&&Jh(c.alternate,c);break;default:nc(l,c)}n=n.sibling}}var ql=8192;function Ul(t,n,l){if(t.subtreeFlags&ql)for(t=t.child;t!==null;)m2(t,n,l),t=t.sibling}function m2(t,n,l){switch(t.tag){case 26:Ul(t,n,l),t.flags&ql&&(t.memoizedState!==null?F8(l,ri,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&jy(l,t)));break;case 5:Ul(t,n,l),t.flags&ql&&(t=t.stateNode,(n&335544128)===n&&jy(l,t));break;case 3:case 4:var c=ri;ri=uc(t.stateNode.containerInfo),Ul(t,n,l),ri=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ql,ql=16777216,Ul(t,n,l),ql=c):Ul(t,n,l));break;case 30:if((t.flags&ql)!==0&&(c=t.memoizedProps.name,c!=null&&c!=="auto")){var h=t.stateNode;h.paired=null,Na===null&&(Na=new Map),Na.set(c,h)}Ul(t,n,l);break;default:Ul(t,n,l)}}function p2(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 ac(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];Cn=c,v2(c,t)}p2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)g2(t),t=t.sibling}function g2(t){switch(t.tag){case 0:case 11:case 15:ac(t),t.flags&2048&&Yr(9,t,t.return);break;case 3:ac(t);break;case 12:ac(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Vu(t)):ac(t);break;default:ac(t)}}function Vu(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];Cn=c,v2(c,t)}p2(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Yr(8,n,n.return),Vu(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Vu(n));break;default:Vu(n)}t=t.sibling}}function v2(t,n){for(;Cn!==null;){var l=Cn;switch(l.tag){case 0:case 11:case 15:Yr(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:Hs(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,Cn=c;else e:for(l=t;Cn!==null;){c=Cn;var h=c.sibling,v=c.return;if(l2(c),c===l){Cn=null;break e}if(h!==null){h.return=v,Cn=h;break e}Cn=v}}}var I6={getCacheForType:function(t){var n=Rn(un),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return Rn(un).controller.signal}},P6=typeof WeakMap=="function"?WeakMap:Map,Et=0,Lt=null,ft=null,vt=0,Mt=0,Ea=null,Xr=!1,Po=!1,Wh=!1,cr=0,ln=0,Qr=0,Fl=0,$u=0,Ta=0,Ho=0,ic=null,ca=null,em=!1,Gu=0,y2=0,Yu=1/0,Ku=null,Zr=null,Zt=0,oi=null,Vl=null,Ai=0,tm=0,nm=null,x2=null,qo=null,Uo=null,Fo=null,rc=0,Xu=null;function Aa(){return(Et&2)!==0&&vt!==0?vt&-vt:xe.T!==null?fm():Ft()}function b2(){if(Ta===0)if((vt&536870912)===0||ut){var t=Da;Da<<=1,(Da&3932160)===0&&(Da=262144),Ta=t}else Ta=536870912;return t=On.current,t!==null&&(t.flags|=32),Ta}function Vo(t,n){if(n!=null){var l=t.stateNode,c=l.ref;c===null&&(c=l.ref=ey(Wi(t.memoizedProps,l))),Uo===null&&(Uo=[]),Uo.push(n.bind(null,c))}}function ua(t,n,l){(t===Lt&&(Mt===2||Mt===9)||t.cancelPendingCommit!==null)&&($o(t,0),Jr(t,vt,Ta,!1)),ni(t,l),((Et&2)===0||t!==Lt)&&(t===Lt&&((Et&2)===0&&(Fl|=l),ln===4&&Jr(t,vt,Ta,!1)),Mi(t))}function j2(t,n,l){if((Et&6)!==0)throw Error(r(327));var c=!l&&(n&127)===0&&(n&t.expiredLanes)===0||ia(t,n),h=c?U6(t,n):im(t,n,!0),v=c;do{if(h===0){Po&&!c&&Jr(t,n,0,!1);break}else{if(l=t.current.alternate,v&&!H6(l)){h=im(t,n,!1),v=!1;continue}if(h===2){if(v=n,t.errorRecoveryDisabledLanes&v)var E=0;else E=t.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){n=E;e:{var D=t;h=ic;var Y=D.current.memoizedState.isDehydrated;if(Y&&($o(D,E).flags|=256),E=im(D,E,!1),E!==2&&E!==6){if(Wh&&!Y){D.errorRecoveryDisabledLanes|=v,Fl|=v,h=4;break e}v=ca,ca=h,v!==null&&(ca===null?ca=v:ca.push.apply(ca,v))}h=E}if(v=!1,h!==2)continue}}if(h===1){$o(t,0),Jr(t,n,0,!0);break}e:{switch(c=t,v=h,v){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Jr(c,n,Ta,!Xr);break e;case 2:ca=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(h=Gu+300-Gt(),10<h)){if(Jr(c,n,Ta,!Xr),va(c,0,!0)!==0)break e;Ai=n,c.timeoutHandle=Sm(w2.bind(null,c,l,ca,Ku,em,n,Ta,Fl,Ho,Xr,v,"Throttled",-0,0),h);break e}w2(c,l,ca,Ku,em,n,Ta,Fl,Ho,Xr,v,null,-0,0)}}break}while(!0);Mi(t)}function w2(t,n,l,c,h,v,E,D,Y,te,ce,ye,J,le){t.timeoutHandle=-1;var Oe=n.subtreeFlags,qe=(v&335544064)===v;if(ye=null,(qe||Oe&8192||(Oe&16785408)===16785408)&&(ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Na=null,m2(n,v,ye),qe&&(Oe=ye,qe=t.containerInfo,qe=(qe.nodeType===9?qe:qe.ownerDocument).__reactViewTransition,qe!=null&&(Oe.count++,Oe.waitingForViewTransition=!0,Oe=hc.bind(Oe),qe.finished.then(Oe,Oe))),Oe=(v&62914560)===v?Gu-Gt():(v&4194048)===v?y2-Gt():0,Oe=V8(ye,Oe),Oe!==null)){Ai=v,t.cancelPendingCommit=Oe(M2.bind(null,t,n,v,l,c,h,E,D,Y,te,ce,ye,null,J,le)),Jr(t,v,E,!te);return}M2(t,n,v,l,c,h,E,D,Y,te,ce,ye)}function H6(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],v=h.getSnapshot;h=h.value;try{if(!ka(v(),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 Jr(t,n,l,c){n=yi(t,n),n&=~$u,n&=~Fl,t.suspendedLanes|=n,t.pingedLanes&=~n,c&&(t.warmLanes|=n),c=t.expirationTimes;for(var h=n;0<h;){var v=31-on(h),E=1<<v;c[v]=-1,h&=~E}l!==0&&xa(t,l,n)}function Qu(){return(Et&6)===0?(lc(0),!1):!0}function am(){if(ft!==null){if(Mt===0)var t=ft.return;else t=ft,ar=_l=null,dh(t),_o=null,Fs=0,t=ft;for(;t!==null;)$v(t.alternate,t),t=t.return;ft=null}}function $o(t,n){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,u8(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Ai=0,am(),Lt=t,ft=l=tr(t.current,null),vt=n,Mt=0,Ea=null,Xr=!1,Po=ia(t,n),Wh=!1,Ho=Ta=$u=Fl=Qr=ln=0,ca=ic=null,em=!1,cr=yi(t,n),iu(),l}function S2(t,n){ot=null,xe.H=Au,n===Mo||n===pu?(n=M1(),Mt=3):n===Jf?(n=M1(),Mt=4):Mt=n===Nh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ea=n,ft===null&&(ln=1,Mu(t,qa(n,t.current)))}function k2(){var t=On.current;return t===null?!0:(vt&4194048)===vt?qn===null:(vt&62914560)===vt||(vt&536870912)!==0?t===qn:!1}function C2(){var t=xe.H;return xe.H=Au,t===null?Au:t}function N2(){var t=xe.A;return xe.A=I6,t}function Zu(){ln=4,Xr||(vt&4194048)!==vt&&On.current!==null||(Po=!0),(Qr&134217727)===0&&(Fl&134217727)===0||Lt===null||Jr(Lt,vt,Ta,!1)}function im(t,n,l){var c=Et;Et|=2;var h=C2(),v=N2();(Lt!==t||vt!==n)&&(Ku=null,$o(t,n)),n=!1;var E=ln;e:do try{if(Mt!==0&&ft!==null){var D=ft,Y=Ea;switch(Mt){case 8:am(),E=6;break e;case 3:case 2:case 9:case 6:On.current===null&&(n=!0);var te=Mt;if(Mt=0,Ea=null,Go(t,D,Y,te),l&&Po){E=0;break e}break;default:te=Mt,Mt=0,Ea=null,Go(t,D,Y,te)}}q6(),E=ln;break}catch(ce){S2(t,ce)}while(!0);return n&&t.shellSuspendCounter++,ar=_l=null,Et=c,xe.H=h,xe.A=v,ft===null&&(Lt=null,vt=0,iu()),E}function q6(){for(;ft!==null;)E2(ft)}function U6(t,n){var l=Et;Et|=2;var c=C2(),h=N2();Lt!==t||vt!==n?(Ku=null,Yu=Gt()+500,$o(t,n)):Po=ia(t,n);e:do try{if(Mt!==0&&ft!==null){n=ft;var v=Ea;t:switch(Mt){case 1:Mt=0,Ea=null,Go(t,n,v,1);break;case 2:case 9:if(T1(v)){Mt=0,Ea=null,T2(n);break}n=function(){Mt!==2&&Mt!==9||Lt!==t||(Mt=7),Mi(t)},v.then(n,n);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:T1(v)?(Mt=0,Ea=null,T2(n)):(Mt=0,Ea=null,Go(t,n,v,7));break;case 5:var E=null;switch(ft.tag){case 26:E=ft.memoizedState;case 5:case 27:var D=ft;if(E?xy(E):D.stateNode.complete){Mt=0,Ea=null;var Y=D.sibling;if(Y!==null)ft=Y;else{var te=D.return;te!==null?(ft=te,Ju(te)):ft=null}break t}}Mt=0,Ea=null,Go(t,n,v,5);break;case 6:Mt=0,Ea=null,Go(t,n,v,6);break;case 8:am(),ln=6;break e;default:throw Error(r(462))}}F6();break}catch(ce){S2(t,ce)}while(!0);return ar=_l=null,xe.H=c,xe.A=h,Et=l,ft!==null?0:(Lt=null,vt=0,iu(),ln)}function F6(){for(;ft!==null&&!Fe();)E2(ft)}function E2(t){var n=Fv(t.alternate,t,cr);t.memoizedProps=t.pendingProps,n===null?Ju(t):ft=n}function T2(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=Lv(l,n,n.pendingProps,n.type,void 0,vt);break;case 11:n=Lv(l,n,n.pendingProps,n.type.render,n.ref,vt);break;case 5:dh(n);var c=n;c===Sn&&(ut?(uu(c),c.tag===5&&c.stateNode!=null&&(qt=c.stateNode)):(uu(c),ut=!0));default:$v(l,n),n=ft=v1(n,cr),n=Fv(l,n,cr)}t.memoizedProps=t.pendingProps,n===null?Ju(t):ft=n}function Go(t,n,l,c){ar=_l=null,dh(n),_o=null,Fs=0;var h=n.return;try{if(M6(t,h,n,l,vt)){ln=1,Mu(t,qa(l,t.current)),ft=null;return}}catch(v){if(h!==null)throw ft=h,v;ln=1,Mu(t,qa(l,t.current)),ft=null;return}n.flags&32768?(ut||c===1?t=!0:Po||(vt&536870912)!==0?t=!1:(Xr=t=!0,(c===2||c===9||c===3||c===6)&&(c=On.current,c!==null&&c.tag===13&&(c.flags|=16384))),A2(n,t)):Ju(n)}function Ju(t){var n=t;do{if((n.flags&32768)!==0){A2(n,Xr);return}t=n.return;var l=z6(n.alternate,n,cr);if(l!==null){ft=l;return}if(n=n.sibling,n!==null){ft=n;return}ft=n=t}while(n!==null);ln===0&&(ln=5)}function A2(t,n){do{var l=D6(t.alternate,t);if(l!==null){l.flags&=32767,ft=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){ft=t;return}ft=t=l}while(t!==null);ln=6,ft=null}function M2(t,n,l,c,h,v,E,D,Y,te,ce,ye){t.cancelPendingCommit=null;do Wu();while(Zt!==0);if((Et&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));t===Lt&&(ft=Lt=null,vt=0),Vl=n,oi=t,Ai=l,nm=h,x2=c,V6(t,n,l,E,D,Y,ye)}}function V6(t,n,l,c,h,v,E){var D=n.lanes|n.childLanes;if(tm=D,D|=Pf,Er(t,l,D,c,h,v),Uo=null,(l&335544064)===l?(Fo=y6(t),c=10262):(Fo=null,c=10256),(n.subtreeFlags&c)!==0||(n.flags&c)!==0?(t.callbackNode=null,t.callbackPriority=0,Q6(yn,function(){return sm(),null})):(t.callbackNode=null,t.callbackPriority=0),Iu=!1,c=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||c){c=xe.T,xe.T=null,h=oe.p,oe.p=2,v=Et,Et|=4;try{L6(t,n,l)}finally{Et=v,oe.p=h,xe.T=c}}Zt=1,Iu?qo=g8(E,t.containerInfo,Fo,rm,lm,G6,om,sm,$6):(rm(),lm(),om())}function $6(t){if(Zt!==0){var n=oi.onRecoverableError;n(t,{componentStack:null})}}function G6(){Zt===3&&(Zt=0,f2(Vl,oi),Zt=4)}function rm(){if(Zt===1){Zt=0;var t=oi,n=Vl,l=Ai,c=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||c){c=xe.T,xe.T=null;var h=oe.p;oe.p=2;var v=Et;Et|=4;try{tc=qu=!1,u2(n,t,l),l=bm;var E=o1(t.containerInfo),D=l.focusedElem,Y=l.selectionRange;if(E!==D&&D&&D.ownerDocument&&l1(D.ownerDocument.documentElement,D)){if(Y!==null&&zf(D)){var te=Y.start,ce=Y.end;if(ce===void 0&&(ce=te),"selectionStart"in D)D.selectionStart=te,D.selectionEnd=Math.min(ce,D.value.length);else{var ye=D.ownerDocument||document,J=ye&&ye.defaultView||window;if(J.getSelection){var le=J.getSelection(),Oe=D.textContent.length,qe=Math.min(Y.start,Oe),st=Y.end===void 0?qe:Math.min(Y.end,Oe);!le.extend&&qe>st&&(E=st,st=qe,qe=E);var ee=r1(D,qe),Q=r1(D,st);if(ee&&Q&&(le.rangeCount!==1||le.anchorNode!==ee.node||le.anchorOffset!==ee.offset||le.focusNode!==Q.node||le.focusOffset!==Q.offset)){var ae=ye.createRange();ae.setStart(ee.node,ee.offset),le.removeAllRanges(),qe>st?(le.addRange(ae),le.extend(Q.node,Q.offset)):(ae.setEnd(Q.node,Q.offset),le.addRange(ae))}}}}for(ye=[],le=D;le=le.parentNode;)le.nodeType===1&&ye.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ye.length;D++){var ve=ye[D];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}es=!!xm,bm=xm=null}finally{Et=v,oe.p=h,xe.T=c}}t.current=n,Zt=2}}function lm(){if(Zt===2){Zt=0;var t=oi,n=Vl,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=xe.T,xe.T=null;var c=oe.p;oe.p=2;var h=Et;Et|=4;try{i2(t,n.alternate,n)}finally{Et=h,oe.p=c,xe.T=l}}Zt=3}}function om(){if(Zt===4||Zt===3){Zt=0;var t=qo;qo=null,it();var n=oi,l=Vl,c=Ai,h=x2,v=(c&335544064)===c?10262:10256;if((l.subtreeFlags&v)!==0||(l.flags&v)!==0?Zt=5:(Zt=0,Vl=oi=null,_2(n,n.pendingLanes)),v=n.pendingLanes,v===0&&(Zr=null),Yn(c),l=l.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(gi,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=xe.T,v=oe.p,oe.p=2,xe.T=null;try{for(var E=n.onRecoverableError,D=0;D<h.length;D++){var Y=h[D];E(Y.value,{componentStack:Y.stack})}}finally{xe.T=l,oe.p=v}}if(h=Uo,E=Fo,Fo=null,h!==null&&(Uo=null,E===null&&(E=[]),t!==null))for(Y=0;Y<h.length;Y++)l=(0,h[Y])(E),l!==void 0&&t.finished.finally(l);(Ai&3)!==0&&Wu(),Mi(n),v=n.pendingLanes,(c&261930)!==0&&(v&42)!==0?n===Xu?rc++:(rc=0,Xu=n):(rc=0,Xu=null),lc(0)}}function _2(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Hs(n)))}function Wu(){return qo!==null&&(qo.skipTransition(),qo=null),rm(),lm(),om(),sm()}function sm(){if(Zt!==5)return!1;var t=oi,n=tm;tm=0;var l=Yn(Ai),c=xe.T,h=oe.p;try{oe.p=32>l?32:l,xe.T=null,l=nm,nm=null;var v=oi,E=Ai;if(Zt=0,Vl=oi=null,Ai=0,(Et&6)!==0)throw Error(r(331));var D=Et;if(Et|=4,g2(v.current),h2(v,v.current,E,l),Et=D,lc(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(gi,v)}catch{}return!0}finally{oe.p=h,xe.T=c,_2(t,n)}}function R2(t,n,l){n=qa(l,n),n=Ch(t.stateNode,n,2),t=Fr(t,n,2),t!==null&&(ni(t,2),Mi(t))}function _t(t,n,l){if(t.tag===3)R2(t,t,l);else for(;n!==null;){if(n.tag===3){R2(n,t,l);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Zr===null||!Zr.has(c))){t=qa(l,t),l=Tv(2),c=Fr(n,l,2),c!==null&&(Av(l,c,n,t),ni(c,2),Mi(c));break}}n=n.return}}function cm(t,n,l){var c=t.pingCache;if(c===null){c=t.pingCache=new P6;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)||(Wh=!0,h.add(l),t=Y6.bind(null,t,n,l),n.then(t,t))}function Y6(t,n,l){var c=t.pingCache;c!==null&&c.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Lt===t&&(vt&l)===l&&((ln===4||ln===3&&(vt&62914560)===vt&&300>Gt()-Gu)&&(Et&2)===0?$o(t,0):$u|=l,Ho===vt&&(Ho=0)),Mi(t)}function O2(t,n){n===0&&(n=ya()),t=Tl(t,n),t!==null&&(ni(t,n),Mi(t))}function K6(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),O2(t,l)}function X6(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),O2(t,l)}function Q6(t,n){return Re(t,n)}var Yo=null,Ko=null,um=!1,ed=!1,dm=!1,Wr=0;function Mi(t){t!==Ko&&t.next===null&&(Ko===null?Yo=Ko=t:Ko=Ko.next=t),ed=!0,um||(um=!0,J6())}function lc(t,n){if(!dm&&ed){dm=!0;do for(var l=!1,c=Yo;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var v=0;else{var E=c.suspendedLanes,D=c.pingedLanes;v=(1<<31-on(42|t)+1)-1,v&=h&~(E&~D),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,B2(c,v))}else v=vt,v=va(c,c===Lt?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||ia(c,v)||(l=!0,B2(c,v));c=c.next}while(l);dm=!1}}function Z6(){z2()}function z2(){ed=um=!1;var t=0;Wr!==0&&c8()&&(t=Wr);for(var n=Gt(),l=null,c=Yo;c!==null;){var h=c.next,v=D2(c,n);v===0?(c.next=null,l===null?Yo=h:l.next=h,h===null&&(Ko=l)):(l=c,(t!==0||(v&3)!==0)&&(ed=!0)),c=h}Zt!==0&&Zt!==5||lc(t),Wr!==0&&(Wr=0)}function D2(t,n){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,v=t.pendingLanes&-62914561;0<v;){var E=31-on(v),D=1<<E,Y=h[E];Y===-1?((D&l)===0||(D&c)!==0)&&(h[E]=xl(D,n)):Y<=n&&(t.expiredLanes|=D),v&=~D}if(n=Lt,l=vt,l=va(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===n&&(Mt===2||Mt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ie(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||ia(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(c!==null&&Ie(c),Yn(l)){case 2:case 8:l=St;break;case 32:l=yn;break;case 268435456:l=Xi;break;default:l=yn}return c=L2.bind(null,t),l=Re(l,c),t.callbackPriority=n,t.callbackNode=l,n}return c!==null&&c!==null&&Ie(c),t.callbackPriority=2,t.callbackNode=null,2}function L2(t,n){if(Zt!==0&&Zt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Wu()&&t.callbackNode!==l)return null;var c=vt;return c=va(t,t===Lt?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(j2(t,c,n),D2(t,Gt()),t.callbackNode!=null&&t.callbackNode===l?L2.bind(null,t):null)}function B2(t,n){if(Wu())return null;j2(t,n,!0)}function J6(){d8(function(){(Et&6)!==0?Re(Gn,Z6):z2()})}function fm(){if(Wr===0){var t=zl;t===0&&(t=ei,ei<<=1,(ei&261888)===0&&(ei=256)),Wr=t}return Wr}function I2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Mn(t)}function W6(t,n,l,c,h){if(n==="submit"&&l&&l.stateNode===h){var v=I2((h[xn]||null).action),E=c.submitter;E&&(n=(n=E[xn]||null)?I2(n.formAction):E.getAttribute("formAction"),n!==null&&(v=n,E=null));var D=new eu("action","action",null,c,h);t.push({event:D,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Wr!==0){var Y=new FormData(h,E);bh(l,{pending:!0,data:Y,method:h.method,action:v},null,Y)}}else typeof v=="function"&&(D.preventDefault(),Y=new FormData(h,E),bh(l,{pending:!0,data:Y,method:h.method,action:v},v,Y))},currentTarget:h}]})}}for(var hm=0;hm<If.length;hm++){var mm=If[hm],e8=mm.toLowerCase(),t8=mm[0].toUpperCase()+mm.slice(1);ai(e8,"on"+t8)}ai(u1,"onAnimationEnd"),ai(d1,"onAnimationIteration"),ai(f1,"onAnimationStart"),ai("dblclick","onDoubleClick"),ai("focusin","onFocus"),ai("focusout","onBlur"),ai(u6,"onTransitionRun"),ai(d6,"onTransitionStart"),ai(f6,"onTransitionCancel"),ai(h1,"onTransitionEnd"),we("onMouseEnter",["mouseout","mouseover"]),we("onMouseLeave",["mouseout","mouseover"]),we("onPointerEnter",["pointerout","pointerover"]),we("onPointerLeave",["pointerout","pointerover"]),ue("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ue("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ue("onBeforeInput",["compositionend","keypress","textInput","paste"]),ue("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ue("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ue("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oc="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(" "),n8=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oc));function P2(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 v=void 0;if(n)for(var E=c.length-1;0<=E;E--){var D=c[E],Y=D.instance,te=D.currentTarget;if(D=D.listener,Y!==v&&h.isPropagationStopped())break e;v=D,h.currentTarget=te;try{v(h)}catch(ce){au(ce)}h.currentTarget=null,v=Y}else for(E=0;E<c.length;E++){if(D=c[E],Y=D.instance,te=D.currentTarget,D=D.listener,Y!==v&&h.isPropagationStopped())break e;v=D,h.currentTarget=te;try{v(h)}catch(ce){au(ce)}h.currentTarget=null,v=Y}}}}function ht(t,n){var l=n[bl];l===void 0&&(l=n[bl]=new Set);var c=t+"__bubble";l.has(c)||(H2(n,t,2,!1),l.add(c))}function pm(t,n,l){var c=0;n&&(c|=4),H2(l,t,c,n)}var td="_reactListening"+Math.random().toString(36).slice(2);function gm(t){if(!t[td]){t[td]=!0,et.forEach(function(l){l!=="selectionchange"&&(n8.has(l)||pm(l,!1,t),pm(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[td]||(n[td]=!0,pm("selectionchange",!1,n))}}function H2(t,n,l,c){switch(Ay(n)){case 2:var h=K8;break;case 8:h=X8;break;default:h=Lm}l=h.bind(null,n,l,t),h=void 0,!Cl||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 vm(t,n,l,c,h){var v=c;if((n&1)===0&&(n&2)===0&&c!==null)e:for(;;){if(c===null)return;var E=c.tag;if(E===3||E===4){var D=c.stateNode.containerInfo;if(D===h)break;if(E===4)for(E=c.return;E!==null;){var Y=E.tag;if((Y===3||Y===4)&&E.stateNode.containerInfo===h)return;E=E.return}for(;D!==null;){if(E=ba(D),E===null)return;if(Y=E.tag,Y===5||Y===6||Y===26||Y===27){c=v=E;continue e}D=D.parentNode}}c=c.return}kl(function(){var te=v,ce=Sl(l),ye=[];e:{var J=m1.get(t);if(J!==void 0){var le=eu,Oe=t;switch(t){case"keypress":if(Jc(l)===0)break e;case"keydown":case"keyup":le=Hk;break;case"focusin":Oe="focus",le=Tf;break;case"focusout":Oe="blur",le=Tf;break;case"beforeblur":case"afterblur":le=Tf;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":le=Fg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=Tk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=$k;break;case u1:case d1:case f1:le=_k;break;case h1:le=Yk;break;case"scroll":case"scrollend":le=Nk;break;case"wheel":le=Xk;break;case"copy":case"cut":case"paste":le=Ok;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=$g;break;case"submit":le=Fk;break;case"toggle":case"beforetoggle":le=Zk}var qe=(n&4)!==0,st=!qe&&(t==="scroll"||t==="scrollend"),ee=qe?J!==null?J+"Capture":null:J;qe=[];for(var Q=te,ae;Q!==null;){var ve=Q;if(ae=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||ae===null||ee===null||(ve=Ji(Q,ee),ve!=null&&qe.push(sc(Q,ve,ae))),st)break;Q=Q.return}0<qe.length&&(J=new le(J,Oe,null,l,ce),ye.push({event:J,listeners:qe}))}}if((n&7)===0){e:{if(le=t==="mouseover"||t==="pointerover",J=t==="mouseout"||t==="pointerout",le&&l!==wl&&(Oe=l.relatedTarget||l.fromElement)&&(ba(Oe)||Oe[nn]))break e;(J||le)&&(Oe=ce.window===ce?ce:(le=ce.ownerDocument)?le.defaultView||le.parentWindow:window,J?(le=l.relatedTarget||l.toElement,J=te,le=le?ba(le):null,le!==null&&(st=u(le),qe=le.tag,le!==st||qe!==5&&qe!==27&&qe!==6)&&(le=null)):(J=null,le=te),J!==le&&(qe=Fg,ve="onMouseLeave",ee="onMouseEnter",Q="mouse",(t==="pointerout"||t==="pointerover")&&(qe=$g,ve="onPointerLeave",ee="onPointerEnter",Q="pointer"),st=J==null?Oe:se(J),ae=le==null?Oe:se(le),Oe=new qe(ve,Q+"leave",J,l,ce),Oe.target=st,Oe.relatedTarget=ae,ve=null,ba(ce)===te&&(qe=new qe(ee,Q+"enter",le,l,ce),qe.target=ae,qe.relatedTarget=st,ve=qe),st=ve,qe=J&&le?_(J,le,a8):null,J!==null&&q2(ye,Oe,J,qe,!1),le!==null&&st!==null&&q2(ye,st,le,qe,!0)))}e:{if(J=te?se(te):window,le=J.nodeName&&J.nodeName.toLowerCase(),le==="select"||le==="input"&&J.type==="file")var Pe=Wg;else if(Zg(J))if(e1)Pe=o6;else{Pe=r6;var yt=i6}else le=J.nodeName,!le||le.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?te&&jl(te.elementType)&&(Pe=Wg):Pe=l6;if(Pe&&(Pe=Pe(t,te))){Jg(ye,Pe,l,ce);break e}yt&&yt(t,J,te)}switch(yt=te?se(te):window,t){case"focusin":(Zg(yt)||yt.contentEditable==="true")&&(wo=yt,Df=te,Bs=null);break;case"focusout":Bs=Df=wo=null;break;case"mousedown":Lf=!0;break;case"contextmenu":case"mouseup":case"dragend":Lf=!1,s1(ye,l,ce);break;case"selectionchange":if(c6)break;case"keydown":case"keyup":s1(ye,l,ce)}var Ge;if(Mf)e:{switch(t){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else jo?Xg(t,l)&&(Je="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Je="onCompositionStart");Je&&(Gg&&l.locale!=="ko"&&(jo||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&jo&&(Ge=qg()):(zr=ce,Cf="value"in zr?zr.value:zr.textContent,jo=!0)),yt=nd(te,Je),0<yt.length&&(Je=new Vg(Je,t,null,l,ce),ye.push({event:Je,listeners:yt}),Ge?Je.data=Ge:(Ge=Qg(l),Ge!==null&&(Je.data=Ge)))),(Ge=Wk?e6(t,l):t6(t,l))&&(Je=nd(te,"onBeforeInput"),0<Je.length&&(yt=new Vg("onBeforeInput","beforeinput",null,l,ce),ye.push({event:yt,listeners:Je}),yt.data=Ge)),W6(ye,t,te,l,ce)}P2(ye,n)})}function sc(t,n,l){return{instance:t,listener:n,currentTarget:l}}function nd(t,n){for(var l=n+"Capture",c=[];t!==null;){var h=t,v=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||v===null||(h=Ji(t,l),h!=null&&c.unshift(sc(t,h,v)),h=Ji(t,n),h!=null&&c.push(sc(t,h,v))),t.tag===3)return c;t=t.return}return[]}function a8(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function q2(t,n,l,c,h){for(var v=n._reactName,E=[];l!==null&&l!==c;){var D=l,Y=D.alternate,te=D.stateNode;if(D=D.tag,Y!==null&&Y===c)break;D!==5&&D!==26&&D!==27||te===null||(Y=te,h?(te=Ji(l,v),te!=null&&E.unshift(sc(l,te,Y))):h||(te=Ji(l,v),te!=null&&E.push(sc(l,te,Y)))),l=l.return}E.length!==0&&t.push({event:n,listeners:E})}var i8=/\r\n?/g,r8=/\u0000|\uFFFD/g;function U2(t){return(typeof t=="string"?t:""+t).replace(i8,`
|
|
49
|
+
`).replace(r8,"")}function F2(t,n){return n=U2(n),U2(t)===n}function Rt(t,n,l,c,h,v){switch(l){case"children":if(typeof c=="string")n==="body"||n==="textarea"&&c===""||Kn(t,c);else if(typeof c=="number"||typeof c=="bigint")n!=="body"&&Kn(t,""+c);else return;break;case"className":an(t,"class",c);break;case"tabIndex":an(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":an(t,l,c);break;case"style":wa(t,c,v);return;case"data":if(n!=="object"){an(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=Mn(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 v=="function"&&(l==="formAction"?(n!=="input"&&Rt(t,n,"name",h.name,h,null),Rt(t,n,"formEncType",h.formEncType,h,null),Rt(t,n,"formMethod",h.formMethod,h,null),Rt(t,n,"formTarget",h.formTarget,h,null)):(Rt(t,n,"encType",h.encType,h,null),Rt(t,n,"method",h.method,h,null),Rt(t,n,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Mn(c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=Xn);return;case"onScroll":c!=null&&ht("scroll",t);return;case"onScrollEnd":c!=null&&ht("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));(v!=null?v.__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=Mn(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":ht("beforetoggle",t),ht("toggle",t),lt(t,"popover",c);break;case"xlinkActuate":Ct(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Ct(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Ct(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Ct(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Ct(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Ct(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Ct(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Ct(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Ct(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":lt(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=Ts.get(l)||l,lt(t,l,c);else return}Le=!0}function ym(t,n,l,c,h,v){switch(l){case"style":wa(t,c,v);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));(v!=null?v.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof c=="string")Kn(t,c);else if(typeof c=="number"||typeof c=="bigint")Kn(t,""+c);else return;break;case"onScroll":c!=null&&ht("scroll",t);return;case"onScrollEnd":c!=null&&ht("scrollend",t);return;case"onClick":c!=null&&(t.onclick=Xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!G.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),v=l.slice(2,h?l.length-7:void 0),n=t[xn]||null,n=n!=null?n[l]:null,typeof n=="function"&&t.removeEventListener(v,n,h),typeof c=="function")){typeof n!="function"&&n!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(v,c,h);break e}Le=!0,l in t?t[l]=c:c===!0?t.setAttribute(l,""):lt(t,l,c)}return}Le=!0}function Ln(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ht("error",t),ht("load",t);var c=!1,h=!1,v;for(v in l)if(l.hasOwnProperty(v)){var E=l[v];if(E!=null)switch(v){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Rt(t,n,v,E,l,null)}}h&&Rt(t,n,"srcSet",l.srcSet,l,null),c&&Rt(t,n,"src",l.src,l,null);return;case"input":ht("invalid",t);var D=v=E=h=null,Y=null,te=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":E=ce;break;case"checked":Y=ce;break;case"defaultChecked":te=ce;break;case"value":v=ce;break;case"defaultValue":D=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,n));break;default:Rt(t,n,c,ce,l,null)}}Rr(t,v,D,Y,te,E,h,!1);return;case"select":ht("invalid",t),c=E=v=null;for(h in l)if(l.hasOwnProperty(h)&&(D=l[h],D!=null))switch(h){case"value":v=D;break;case"defaultValue":E=D;break;case"multiple":c=D;default:Rt(t,n,h,D,l,null)}n=v,l=E,t.multiple=!!c,n!=null?ra(t,!!c,n,!1):l!=null&&ra(t,!!c,l,!0);return;case"textarea":ht("invalid",t),v=h=c=null;for(E in l)if(l.hasOwnProperty(E)&&(D=l[E],D!=null))switch(E){case"value":c=D;break;case"defaultValue":h=D;break;case"children":v=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:Rt(t,n,E,D,l,null)}ja(t,c,h,v);return;case"option":for(Y in l)if(l.hasOwnProperty(Y)&&(c=l[Y],c!=null))switch(Y){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Rt(t,n,Y,c,l,null)}return;case"dialog":ht("beforetoggle",t),ht("toggle",t),ht("cancel",t),ht("close",t);break;case"iframe":case"object":ht("load",t);break;case"video":case"audio":for(c=0;c<oc.length;c++)ht(oc[c],t);break;case"image":ht("error",t),ht("load",t);break;case"details":ht("toggle",t);break;case"embed":case"source":case"link":ht("error",t),ht("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in l)if(l.hasOwnProperty(te)&&(c=l[te],c!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Rt(t,n,te,c,l,null)}return;default:if(jl(n)){for(ce in l)l.hasOwnProperty(ce)&&(c=l[ce],c!==void 0&&ym(t,n,ce,c,l,void 0));return}}for(D in l)l.hasOwnProperty(D)&&(c=l[D],c!=null&&Rt(t,n,D,c,l,null))}var l8={};function o8(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,v=null,E=null,D=null,Y=null,te=null,ce=null;for(le in l){var ye=l[le];if(l.hasOwnProperty(le)&&ye!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":Y=ye;default:c.hasOwnProperty(le)||Rt(t,n,le,null,c,ye)}}for(var J in c){var le=c[J];if(ye=l[J],c.hasOwnProperty(J)&&(le!=null||ye!=null))switch(J){case"type":le!==ye&&(Le=!0),v=le;break;case"name":le!==ye&&(Le=!0),h=le;break;case"checked":le!==ye&&(Le=!0),te=le;break;case"defaultChecked":le!==ye&&(Le=!0),ce=le;break;case"value":le!==ye&&(Le=!0),E=le;break;case"defaultValue":le!==ye&&(Le=!0),D=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,n));break;default:le!==ye&&Rt(t,n,J,le,c,ye)}}Hn(t,E,D,Y,te,ce,v,h);return;case"select":le=E=D=J=null;for(v in l)if(Y=l[v],l.hasOwnProperty(v)&&Y!=null)switch(v){case"value":break;case"multiple":le=Y;default:c.hasOwnProperty(v)||Rt(t,n,v,null,c,Y)}for(h in c)if(v=c[h],Y=l[h],c.hasOwnProperty(h)&&(v!=null||Y!=null))switch(h){case"value":v!==Y&&(Le=!0),J=v;break;case"defaultValue":v!==Y&&(Le=!0),D=v;break;case"multiple":v!==Y&&(Le=!0),E=v;default:v!==Y&&Rt(t,n,h,v,c,Y)}n=D,l=E,c=le,J!=null?ra(t,!!l,J,!1):!!c!=!!l&&(n!=null?ra(t,!!l,n,!0):ra(t,!!l,l?[]:"",!1));return;case"textarea":le=J=null;for(D in l)if(h=l[D],l.hasOwnProperty(D)&&h!=null&&!c.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Rt(t,n,D,null,c,h)}for(E in c)if(h=c[E],v=l[E],c.hasOwnProperty(E)&&(h!=null||v!=null))switch(E){case"value":h!==v&&(Le=!0),J=h;break;case"defaultValue":h!==v&&(Le=!0),le=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==v&&Rt(t,n,E,h,c,v)}bo(t,J,le);return;case"option":for(var Oe in l)if(J=l[Oe],l.hasOwnProperty(Oe)&&J!=null&&!c.hasOwnProperty(Oe))switch(Oe){case"selected":t.selected=!1;break;default:Rt(t,n,Oe,null,c,J)}for(Y in c)if(J=c[Y],le=l[Y],c.hasOwnProperty(Y)&&J!==le&&(J!=null||le!=null))switch(Y){case"selected":J!==le&&(Le=!0),t.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:Rt(t,n,Y,J,c,le)}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 qe in l)J=l[qe],l.hasOwnProperty(qe)&&J!=null&&!c.hasOwnProperty(qe)&&Rt(t,n,qe,null,c,J);for(te in c)if(J=c[te],le=l[te],c.hasOwnProperty(te)&&J!==le&&(J!=null||le!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:Rt(t,n,te,J,c,le)}return;default:if(jl(n)){for(var st in l)J=l[st],l.hasOwnProperty(st)&&J!==void 0&&!c.hasOwnProperty(st)&&ym(t,n,st,void 0,c,J);for(ce in c)J=c[ce],le=l[ce],!c.hasOwnProperty(ce)||J===le||J===void 0&&le===void 0||ym(t,n,ce,J,c,le);return}}for(var ee in l)J=l[ee],l.hasOwnProperty(ee)&&J!=null&&!c.hasOwnProperty(ee)&&Rt(t,n,ee,null,c,J);for(ye in c)J=c[ye],le=l[ye],!c.hasOwnProperty(ye)||J===le||J==null&&le==null||Rt(t,n,ye,J,c,le)}function V2(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function s8(){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],v=h.transferSize,E=h.initiatorType,D=h.duration;if(v&&D&&V2(E)){for(E=0,D=h.responseEnd,c+=1;c<l.length;c++){var Y=l[c],te=Y.startTime;if(te>D)break;var ce=Y.transferSize,ye=Y.initiatorType;ce&&V2(ye)&&(Y=Y.responseEnd,E+=ce*(Y<D?1:(D-te)/(Y-te)))}if(--c,n+=8*(v+E)/(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 xm=null,bm=null;function cc(t){return t.nodeType===9?t:t.ownerDocument}function $2(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 G2(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 Y2(t,n,l,c){return l=cc(l).createElement(t),l[Vt]=c,l[xn]=n,Ln(l,t,n),je(l),l}function jm(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 wm=null;function c8(){var t=window.event;return t&&t.type==="popstate"?t===wm?!1:(wm=t,!0):(wm=null,!1)}var Sm=typeof setTimeout=="function"?setTimeout:void 0,u8=typeof clearTimeout=="function"?clearTimeout:void 0,K2=typeof Promise=="function"?Promise:void 0,X2=typeof requestAnimationFrame=="function"?requestAnimationFrame:Sm,d8=typeof queueMicrotask=="function"?queueMicrotask:typeof K2<"u"?function(t){return K2.resolve(null).then(t).catch(f8)}:Sm;function f8(t){setTimeout(function(){throw t})}function el(t){return t==="head"}function Q2(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),ts(n);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")_m(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,_m(l);for(var v=l.firstChild;v;){var E=v.nextSibling,D=v.nodeName;v[Qi]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=E}}else l==="body"&&_m(t.ownerDocument.body);l=h}while(l);ts(n)}function Z2(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 J2(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 v=n[h];0<v.width&&0<v.height&&c++}c===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function W2(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 h8(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 km(t){var n=t.getBoundingClientRect(),l=getComputedStyle(t);return h8(n,l,t)}function m8(t){return t.documentElement.clientHeight}function p8(t){this.addEventListener("load",t),this.addEventListener("error",t)}function g8(t,n,l,c,h,v,E,D,Y){var te=n.nodeType===9?n:n.ownerDocument;try{var ce=te.startViewTransition({update:function(){var J=te.defaultView,le=J.navigation&&J.navigation.transition,Oe=te.fonts.status;c();var qe=[];if(Oe==="loaded"&&(m8(te),te.fonts.status==="loading"&&qe.push(te.fonts.ready)),Oe=qe.length,t!==null)for(var st=t.suspenseyImages,ee=0,Q=0;Q<st.length;Q++){var ae=st[Q];if(!ae.complete){var ve=ae.getBoundingClientRect();if(0<ve.bottom&&0<ve.right&&ve.top<J.innerHeight&&ve.left<J.innerWidth){if(ee+=by(ae),ee>rd){qe.length=Oe;break}ae=new Promise(p8.bind(ae)),qe.push(ae)}}}if(0<qe.length)return J=Promise.race([Promise.all(qe),new Promise(function(Pe){return setTimeout(Pe,500)})]).then(h,h),(le?Promise.allSettled([le.finished,J]):J).then(v,v);if(h(),le)return le.finished.then(v,v);v()},types:l});te.__reactViewTransition=ce;var ye=[];return ce.ready.then(function(){for(var J=te.documentElement.getAnimations({subtree:!0}),le=0;le<J.length;le++){var Oe=J[le],qe=Oe.effect,st=qe.pseudoElement;if(st!=null&&st.startsWith("::view-transition")){ye.push(Oe),Oe=qe.getKeyframes();for(var ee=st=void 0,Q=!0,ae=0;ae<Oe.length;ae++){var ve=Oe[ae],Pe=ve.width;if(st===void 0)st=Pe;else if(st!==Pe){Q=!1;break}if(Pe=ve.height,ee===void 0)ee=Pe;else if(ee!==Pe){Q=!1;break}delete ve.width,delete ve.height,ve.transform==="none"&&delete ve.transform}Q&&st!==void 0&&ee!==void 0&&(qe.setKeyframes(Oe),Q=getComputedStyle(qe.target,qe.pseudoElement),Q.width!==st||Q.height!==ee)&&(Q=Oe[0],Q.width=st,Q.height=ee,Q=Oe[Oe.length-1],Q.width=st,Q.height=ee,qe.setKeyframes(Oe))}}E()},function(J){te.__reactViewTransition===ce&&(te.__reactViewTransition=null);try{if(typeof J=="object"&&J!==null)switch(J.name){case"InvalidStateError":(J.message==="View transition was skipped because document visibility state is hidden."||J.message==="Skipping view transition because document visibility state has become hidden."||J.message==="Skipping view transition because viewport size changed."||J.message==="Transition was aborted because of invalid state")&&(J=null)}J!==null&&Y(J)}finally{c(),h(),E()}}),ce.finished.finally(function(){for(var J=0;J<ye.length;J++)ye[J].cancel();te.__reactViewTransition===ce&&(te.__reactViewTransition=null),D()}),ce}catch{return c(),h(),E(),null}}function $l(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}$l.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:I({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},$l.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,l=t.getAnimations({subtree:!0}),c=[],h=0;h<l.length;h++){var v=l[h].effect;v!==null&&v.target===t&&v.pseudoElement===n&&c.push(l[h])}return c},$l.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ey(t){return{name:t,group:new $l("group",t),imagePair:new $l("image-pair",t),old:new $l("old",t),new:new $l("new",t)}}function Ma(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ma.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 v=this._eventListeners;if(ny(v,t,n,l)===-1){var E=this,D=n;l!=null&&typeof l!="boolean"&&l.once===!0&&(D=function(Y){E.removeEventListener(t,n,l),typeof n=="function"?n.call(this,Y):n.handleEvent(Y)}),c!==null&&(h=E.removeEventListener.bind(E,t,n,l),c.addEventListener("abort",h,{once:!0}),h=c.removeEventListener.bind(c,"abort",h)),c=Xo(l),v.push({type:t,listener:n,optionsOrUseCapture:l,attachedListener:D,cleanup:h}),g(this._fragmentFiber.child,!1,v8,t,D,c)}this._eventListeners=v}};function v8(t,n,l,c){return N(t).addEventListener(n,l,c),!1}Ma.prototype.removeEventListener=function(t,n,l){var c=this._eventListeners;if(c!==null&&(n=ny(c,t,n,l),n!==-1)){var h=c[n];l=h.attachedListener;var v=h.cleanup;h=Xo(h.optionsOrUseCapture),g(this._fragmentFiber.child,!1,y8,t,l,h),c.splice(n,1),v!==null&&v()}};function y8(t,n,l,c){return N(t).removeEventListener(n,l,c),!1}function Xo(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function ty(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function ny(t,n,l,c){if(t.length===0)return-1;c=ty(c);for(var h=0;h<t.length;h++){var v=t[h];if(v.type===n&&v.listener===l&&ty(v.optionsOrUseCapture)===c)return h}return-1}Ma.prototype.dispatchEvent=function(t){var n=j(this._fragmentFiber);if(n===null)return!0;n=N(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 v=l[h];c.addEventListener(v.type,v.attachedListener,Xo(v.optionsOrUseCapture))}if(n.appendChild(c),t=c.dispatchEvent(t),l)for(h=0;h<l.length;h++)v=l[h],c.removeEventListener(v.type,v.attachedListener,Xo(v.optionsOrUseCapture));return n.removeChild(c),t}return n.dispatchEvent(t)},Ma.prototype.focus=function(t){g(this._fragmentFiber.child,!0,ay,t,void 0,void 0)};function ay(t,n){return t.tag===6?!1:(t=N(t),M8(t,n))}Ma.prototype.focusLast=function(t){var n=[];g(this._fragmentFiber.child,!0,Cm,n,void 0,void 0);for(var l=n.length-1;0<=l&&!ay(n[l],t);l--);};function Cm(t,n){return n.push(t),!1}Ma.prototype.blur=function(){var t=j(this._fragmentFiber);t!==null&&(t=N(t),t=cc(t).activeElement,t!==null&&g(this._fragmentFiber.child,!1,x8,t,void 0,void 0))};function x8(t,n){return t.tag===6?!1:(t=N(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Ma.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),g(this._fragmentFiber.child,!1,b8,t,void 0,void 0)};function b8(t,n){return t.tag===6||(t=N(t),n.observe(t)),!1}Ma.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),g(this._fragmentFiber.child,!1,j8,t,void 0,void 0);for(var l=n=0;l<si.length;l++){var c=si[l];c.fragmentInstance===this&&c.observer===t?t.unobserve(c.instance):si[n++]=c}si.length=n}};function j8(t,n){return t.tag===6||(t=N(t),n.unobserve(t)),!1}var si=[],Nm=!1;function w8(t,n,l){si.push({fragmentInstance:t,observer:n,instance:l}),Nm||(Nm=!0,_8(function(){Nm=!1;var c=si;si=[];for(var h=0;h<c.length;h++){var v=c[h];v.observer.unobserve(v.instance)}}))}Ma.prototype.getClientRects=function(){var t=[];return g(this._fragmentFiber.child,!1,S8,t,void 0,void 0),t};function S8(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=N(t),n.push.apply(n,t.getClientRects());return!1}Ma.prototype.getRootNode=function(t){var n=j(this._fragmentFiber);return n===null?this:N(n).getRootNode(t)},Ma.prototype.compareDocumentPosition=function(t){var n=j(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];g(this._fragmentFiber.child,!1,Cm,l,void 0,void 0);var c=N(n);if(l.length===0){if(l=c,b(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=S(n)[1],l===null?h=Node.DOCUMENT_POSITION_PRECEDING:(t=N(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=N(l[0]),h=N(l[l.length-1]);var v=b(this._fragmentFiber)?n.parentElement:c;if(v==null)return Node.DOCUMENT_POSITION_DISCONNECTED;c=v.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,v=v.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var E=n.compareDocumentPosition(t),D=h.compareDocumentPosition(t),Y=E&Node.DOCUMENT_POSITION_CONTAINED_BY||D&Node.DOCUMENT_POSITION_CONTAINED_BY;return D=c&&v&&E&Node.DOCUMENT_POSITION_FOLLOWING&&D&Node.DOCUMENT_POSITION_PRECEDING,n=c&&n===t||v&&h===t||Y||D?Node.DOCUMENT_POSITION_CONTAINED_BY:!c&&n===t||!v&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:E,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||k8(n,this._fragmentFiber,l[0],l[l.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function k8(t,n,l,c,h){var v=ba(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!v)e:{for(;v!==null;){if(v.tag===7&&(v===n||v.alternate===n)){l=!0;break e}v=v.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(v===null)return v=h.ownerDocument,h===v||h===v.documentElement||h===v.body;e:{for(v=n,n=j(n);v!==null;){if(!(v.tag!==5&&v.tag!==3&&v.tag!==27||v!==n&&v.alternate!==n)){v=!0;break e}v=v.return}v=!1}return v}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!v)&&!(n=v===l)&&(n=_(l,v,O),n===null?n=!1:(g(n,!0,C,v,l),v=T,T=null,n=v!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!v)&&!(n=v===c)&&(n=_(c,v,O),n===null?n=!1:(g(n,!0,M,v,c),v=T,A=T=null,n=v!==null)),n):!1}function iy(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)}Ma.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(r(566));var n=[];g(this._fragmentFiber.child,!1,Cm,n,void 0,void 0);var l=t!==!1;if(n.length===0){var c=S(this._fragmentFiber);if(c=l?c[1]||c[0]||j(this._fragmentFiber):c[0]||c[1],c===null)return;if(c.tag===6){t=N(c),iy(t,l);return}if(c=N(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=N(h),iy(h,l)):N(h).scrollIntoView(t),c+=l?-1:1}};function C8(t,n){return t=N(t),ry(t,n),!1}function ry(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function ly(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,Xo(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(v){for(var E=0,D=0;D<si.length;D++){var Y=si[D];(Y.fragmentInstance!==n||Y.observer!==v||Y.instance!==t)&&(si[E++]=Y)}si.length=E,v.observe(t)}),ry(t,n))}function N8(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,Xo(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(v){typeof v.rootMargin=="string"?w8(n,v,t):v.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function Em(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":Em(l),_r(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function E8(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[Qi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(v=t.getAttribute("rel"),v==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(v!==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(v=t.getAttribute("src"),(v!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&v&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var v=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===v)return t}else return t;if(t=Ga(t.nextSibling),t===null)break}return null}function T8(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ga(t.nextSibling),t===null))return null;return t}function oy(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ga(t.nextSibling),t===null))return null;return t}function Tm(t){return t.data==="$?"||t.data==="$~"}function Am(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function A8(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 Ga(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 Mm=null;function sy(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Ga(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function cy(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 M8(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 _8(t){X2(function(){X2(function(n){return t(n)})})}function uy(t,n,l){switch(n=cc(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 dy(t,n,l){for(var c in l){var h=l[c];l.hasOwnProperty(c)&&h!=null&&Rt(t,n,c,null,l8,h)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Xn&&(t.onclick=null),_r(t)}function _m(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);_r(t)}var Ya=new Map,fy=new Set;function uc(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 ur=oe.d;oe.d={f:R8,r:O8,D:z8,C:D8,L:L8,m:B8,X:P8,S:I8,M:H8};function R8(){var t=ur.f(),n=Qu();return t||n}function O8(t){var n=bi(t);n!==null&&n.tag===5&&n.type==="form"?mv(n):ur.r(t)}var Qo=typeof document>"u"?null:document;function hy(t,n,l){var c=Qo;if(c&&typeof n=="string"&&n){var h=$t(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),fy.has(h)||(fy.add(h),t={rel:t,crossOrigin:l,href:n},c.querySelector(h)===null&&(n=c.createElement("link"),Ln(n,"link",t),je(n),c.head.appendChild(n)))}}function z8(t){ur.D(t),hy("dns-prefetch",t,null)}function D8(t,n){ur.C(t,n),hy("preconnect",t,n)}function L8(t,n,l){ur.L(t,n,l);var c=Qo;if(c&&t&&n){var h='link[rel="preload"][as="'+$t(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+$t(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+$t(l.imageSizes)+'"]')):h+='[href="'+$t(t)+'"]';var v=h;switch(n){case"style":v=Zo(t);break;case"script":v=Jo(t)}if(!(Ya.has(v)||(t=I({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),Ya.set(v,t),c.querySelector(h)!==null||n==="style"&&c.querySelector(dc(v))||n==="script"&&c.querySelector(fc(v))))){var E=c.createElement("link");Ln(E,"link",t),n==="style"&&(E[Mr]=!0,E.onload=E.onerror=function(){Ve(E)}),je(E),c.head.appendChild(E)}}}function B8(t,n){ur.m(t,n);var l=Qo;if(l&&t){var c=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+$t(c)+'"][href="'+$t(t)+'"]',v=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Jo(t)}if(!Ya.has(v)&&(t=I({rel:"modulepreload",href:t},n),Ya.set(v,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(fc(v)))return}c=l.createElement("link"),Ln(c,"link",t),je(c),l.head.appendChild(c)}}}function I8(t,n,l){ur.S(t,n,l);var c=Qo;if(c&&t){var h=be(c).hoistableStyles,v=Zo(t);n=n||"default";var E=h.get(v);if(!E){var D={loading:0,preload:null};if(E=c.querySelector(dc(v)))D.loading=5;else{t=I({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ya.get(v))&&Rm(t,l);var Y=E=c.createElement("link");je(Y),Ln(Y,"link",t),Y._p=new Promise(function(te,ce){Y.onload=te,Y.onerror=ce}),Y.addEventListener("load",function(){D.loading|=1}),Y.addEventListener("error",function(){D.loading|=2}),D.loading|=4,ad(E,n,c)}E={type:"stylesheet",instance:E,count:1,state:D},h.set(v,E)}}}function P8(t,n){ur.X(t,n);var l=Qo;if(l&&t){var c=be(l).hoistableScripts,h=Jo(t),v=c.get(h);v||(v=l.querySelector(fc(h)),v||(t=I({src:t,async:!0},n),(n=Ya.get(h))&&Om(t,n),v=l.createElement("script"),je(v),Ln(v,"link",t),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(h,v))}}function H8(t,n){ur.M(t,n);var l=Qo;if(l&&t){var c=be(l).hoistableScripts,h=Jo(t),v=c.get(h);v||(v=l.querySelector(fc(h)),v||(t=I({src:t,async:!0,type:"module"},n),(n=Ya.get(h))&&Om(t,n),v=l.createElement("script"),je(v),Ln(v,"link",t),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(h,v))}}function my(t,n,l,c){var h=(h=en.current)?uc(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=Zo(l.href),n=be(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=Zo(l.href);var v=be(h).hoistableStyles,E=v.get(t);if(E||(h=h.ownerDocument||h,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(t,E),(v=h.querySelector(dc(t)))?v._p||(E.instance=v,E.state.loading=5):(v=Ya.get(t),v||(v={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ya.set(t,v)),q8(h,t,v,E.state))),n&&c===null)throw Error(r(528,""));return E}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=Jo(l),n=be(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 Zo(t){return'href="'+$t(t)+'"'}function dc(t){return'link[rel="stylesheet"]['+t+"]"}function py(t){return I({},t,{"data-precedence":t.precedence,precedence:null})}function q8(t,n,l,c){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Mr]!==!0){c.loading=1;return}}else n=t.createElement("link"),n[Mr]=!0,n.onload=n.onerror=Ve.bind(null,n),Ln(n,"link",l),je(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 Jo(t){return'[src="'+$t(t)+'"]'}function fc(t){return"script[async]"+t}function gy(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var c=t.querySelector('style[data-href~="'+$t(l.href)+'"]');if(c)return n.instance=c,je(c),c;var h=I({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),je(c),Ln(c,"style",h),ad(c,l.precedence,t),n.instance=c;case"stylesheet":h=Zo(l.href);var v=t.querySelector(dc(h));if(v)return n.state.loading|=4,n.instance=v,je(v),v;c=py(l),(h=Ya.get(h))&&Rm(c,h),v=(t.ownerDocument||t).createElement("link"),je(v);var E=v;return E._p=new Promise(function(D,Y){E.onload=D,E.onerror=Y}),Ln(v,"link",c),n.state.loading|=4,ad(v,l.precedence,t),n.instance=v;case"script":return v=Jo(l.src),(h=t.querySelector(fc(v)))?(n.instance=h,je(h),h):(c=l,(h=Ya.get(v))&&(c=I({},l),Om(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),je(h),Ln(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,ad(c,l.precedence,t));return n.instance}function ad(t,n,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,v=h,E=0;E<c.length;E++){var D=c[E];if(D.dataset.precedence===n)v=D;else if(v!==h)break}v?v.parentNode.insertBefore(t,v.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function Rm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Om(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var id=null;function vy(t,n,l){if(id===null){var c=new Map,h=id=new Map;h.set(l,c)}else h=id,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 v=l[h];if(!(v[Qi]||v[Vt]||t==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var E=v.getAttribute(n)||"";E=t+E;var D=c.get(E);D?D.push(v):c.set(E,[v])}}return c}function zm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function U8(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 yy(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function xy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function by(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function jy(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=by(n),t.suspenseyImages.push(n)),t=$8.bind(t),n.decode().then(t,t))}function F8(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=Zo(c.href),v=n.querySelector(dc(h));if(v){n=v._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=hc.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=v,je(v);return}v=n.ownerDocument||n,c=py(c),(h=Ya.get(h))&&Rm(c,h),v=v.createElement("link"),je(v);var E=v;E._p=new Promise(function(D,Y){E.onload=D,E.onerror=Y}),Ln(v,"link",c),l.instance=v}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=hc.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var rd=0;function V8(t,n){return t.stylesheets&&t.count===0&&od(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var c=setTimeout(function(){if(t.stylesheets&&od(t,t.stylesheets),t.unsuspend){var v=t.unsuspend;t.unsuspend=null,v()}},6e4+n);0<t.imgBytes&&rd===0&&(rd=62500*s8());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&od(t,t.stylesheets),t.unsuspend)){var v=t.unsuspend;t.unsuspend=null,v()}},(t.imgBytes>rd?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function wy(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)od(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function hc(){this.count--,wy(this)}function $8(){this.imgCount--,wy(this)}var ld=null;function od(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ld=new Map,n.forEach(G8,t),ld=null,hc.call(t))}function G8(t,n){if(!(n.state.loading&4)){var l=ld.get(t);if(l)var c=l.get(null);else{l=new Map,ld.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<h.length;v++){var E=h[v];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(l.set(E.dataset.precedence,E),c=E)}c&&l.set(null,c)}h=n.instance,E=h.getAttribute("data-precedence"),v=l.get(E)||c,v===c&&l.set(null,h),l.set(E,h),this.count++,c=hc.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),v?v.parentNode.insertBefore(h,v.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Wo={$$typeof:F,Provider:null,Consumer:null,_currentValue:Ee,_currentValue2:Ee,_threadCount:0};function Y8(t,n,l,c,h,v,E,D,Y){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=v,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.transitionTypes=null,this.incompleteTransitions=new Map}function Sy(t,n,l,c,h,v,E,D,Y,te,ce,ye){return t=new Y8(t,n,l,E,Y,te,ce,ye,D),n=1,v===!0&&(n|=24),v=la(3,null,null,n),t.current=v,v.stateNode=t,n=Xf(),n.refCount++,t.pooledCache=n,n.refCount++,v.memoizedState={element:c,isDehydrated:l,cache:n},Wf(v),t}function ky(t){return t?(t=Co,t):Co}function Cy(t,n,l,c,h,v){h=ky(h),c.context===null?c.context=h:c.pendingContext=h,c=Ur(n),c.payload={element:l},v=v===void 0?null:v,v!==null&&(c.callback=v),l=Fr(t,c,n),l!==null&&(ua(l,t,n),Vs(l,t,n))}function Ny(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function Dm(t,n){Ny(t,n),(t=t.alternate)&&Ny(t,n)}function Ey(t){if(t.tag===13||t.tag===31){var n=Tl(t,67108864);n!==null&&ua(n,t,67108864),Dm(t,67108864)}}function Ty(t){if(t.tag===13||t.tag===31){var n=Aa();n=Ba(n);var l=Tl(t,n);l!==null&&ua(l,t,n),Dm(t,n)}}var es=!0;function K8(t,n,l,c){var h=xe.T;xe.T=null;var v=oe.p;try{oe.p=2,Lm(t,n,l,c)}finally{oe.p=v,xe.T=h}}function X8(t,n,l,c){var h=xe.T;xe.T=null;var v=oe.p;try{oe.p=8,Lm(t,n,l,c)}finally{oe.p=v,xe.T=h}}function Lm(t,n,l,c){if(es){var h=Bm(c);if(h===null)vm(t,n,c,sd,l),My(t,c);else if(Z8(h,t,n,l,c))c.stopPropagation();else if(My(t,c),n&4&&-1<Q8.indexOf(t)){for(;h!==null;){var v=bi(h);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var E=ti(v.pendingLanes);if(E!==0){var D=v;for(D.pendingLanes|=2,D.entangledLanes|=2;E;){var Y=1<<31-on(E);D.entanglements[1]|=Y,E&=~Y}Mi(v),(Et&6)===0&&(Yu=Gt()+500,lc(0))}}break;case 31:case 13:D=Tl(v,2),D!==null&&ua(D,v,2),Qu(),Dm(v,2)}if(v=Bm(c),v===null&&vm(t,n,c,sd,l),v===h)break;h=v}h!==null&&c.stopPropagation()}else vm(t,n,c,null,l)}}function Bm(t){return t=Sl(t),Im(t)}var sd=null;function Im(t){if(sd=null,t=ba(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 sd=t,null}function Ay(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(za()){case Gn:return 2;case St:return 8;case yn:case go:return 32;case Xi:return 268435456;default:return 32}default:return 32}}var Pm=!1,tl=null,nl=null,al=null,mc=new Map,pc=new Map,il=[],Q8="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 My(t,n){switch(t){case"focusin":case"focusout":tl=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":mc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":pc.delete(n.pointerId)}}function gc(t,n,l,c,h,v){return t===null||t.nativeEvent!==v?(t={blockedOn:n,domEventName:l,eventSystemFlags:c,nativeEvent:v,targetContainers:[h]},n!==null&&(n=bi(n),n!==null&&Ey(n)),t):(t.eventSystemFlags|=c,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function Z8(t,n,l,c,h){switch(n){case"focusin":return tl=gc(tl,t,n,l,c,h),!0;case"dragenter":return nl=gc(nl,t,n,l,c,h),!0;case"mouseover":return al=gc(al,t,n,l,c,h),!0;case"pointerover":var v=h.pointerId;return mc.set(v,gc(mc.get(v)||null,t,n,l,c,h)),!0;case"gotpointercapture":return v=h.pointerId,pc.set(v,gc(pc.get(v)||null,t,n,l,c,h)),!0}return!1}function _y(t){var n=ba(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,jn(t.priority,function(){Ty(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,jn(t.priority,function(){Ty(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 cd(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=Bm(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);wl=c,l.target.dispatchEvent(c),wl=null}else return n=bi(l),n!==null&&Ey(n),t.blockedOn=l,!1;n.shift()}return!0}function Ry(t,n,l){cd(t)&&l.delete(n)}function J8(){Pm=!1,tl!==null&&cd(tl)&&(tl=null),nl!==null&&cd(nl)&&(nl=null),al!==null&&cd(al)&&(al=null),mc.forEach(Ry),pc.forEach(Ry)}function ud(t,n){t.blockedOn===n&&(t.blockedOn=null,Pm||(Pm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,J8)))}var dd=null;function Oy(t){dd!==t&&(dd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dd===t&&(dd=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(Im(c||l)===null)continue;break}var v=bi(l);v!==null&&(t.splice(n,3),n-=3,bh(v,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function ts(t){function n(Y){return ud(Y,t)}tl!==null&&ud(tl,t),nl!==null&&ud(nl,t),al!==null&&ud(al,t),mc.forEach(n),pc.forEach(n);for(var l=0;l<il.length;l++){var c=il[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<il.length&&(l=il[0],l.blockedOn===null);)_y(l),l.blockedOn===null&&il.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],v=l[c+1],E=h[xn]||null;if(typeof v=="function")E||Oy(l);else if(E){var D=null;if(v&&v.hasAttribute("formAction")){if(h=v,E=v[xn]||null)D=E.formAction;else if(Im(h)!==null)continue}else D=E.action;typeof D=="function"?l[c+1]=D:(l.splice(c,3),c-=3),Oy(l)}}}function zy(){function t(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(E){return h=E})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.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 Hm(t){this._internalRoot=t}fd.prototype.render=Hm.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,c=Aa();Cy(l,c,t,n,null,null)},fd.prototype.unmount=Hm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Cy(t.current,2,null,t,null,null),Qu(),n[nn]=null}};function fd(t){this._internalRoot=t}fd.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ft();t={blockedOn:null,target:t,priority:n};for(var l=0;l<il.length&&n!==0&&n<il[l].priority;l++);il.splice(l,0,t),l===0&&_y(t)}};var Dy=a.version;if(Dy!=="19.3.0")throw Error(r(527,Dy,"19.3.0"));oe.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=p(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var W8={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hd.isDisabled&&hd.supportsFiber)try{gi=hd.inject(W8),Ht=hd}catch{}}return yc.createRoot=function(t,n){if(!s(t))throw Error(r(299));var l=!1,c="",h=kv,v=Cv,E=Nv;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&&(v=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError)),n=Sy(t,1,!1,null,null,l,c,null,h,v,E,zy),t[nn]=n.current,gm(t),new Hm(n)},yc.hydrateRoot=function(t,n,l){if(!s(t))throw Error(r(299));var c=!1,h="",v=kv,E=Cv,D=Nv,Y=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(D=l.onRecoverableError),l.formState!==void 0&&(Y=l.formState)),n=Sy(t,1,!0,n,l??null,c,h,Y,v,E,D,zy),n.context=ky(null),l=n.current,c=Aa(),c=Ba(c),h=Ur(c),h.callback=null,Fr(l,h,c),l=c,n.current.lanes=l,ni(n,l),Mi(n),t[nn]=n.current,gm(t),new fd(n)},yc.version="19.3.0",yc}var Ky;function fC(){if(Ky)return Vm.exports;Ky=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(),Vm.exports=dC(),Vm.exports}var hC=fC();const mC={"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.recent":"Recent","actions.searchEmoji":"Search emoji","actions.noEmoji":"No emoji found","actions.emoji.Smileys & Emotion":"Smileys and emotion","actions.emoji.People & Body":"People and body","actions.emoji.Animals & Nature":"Animals and nature","actions.emoji.Food & Drink":"Food and drink","actions.emoji.Travel & Places":"Travel and places","actions.emoji.Activities":"Activities","actions.emoji.Objects":"Objects","actions.emoji.Symbols":"Symbols","actions.emoji.Flags":"Flags","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"},pC={"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"},gC={"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."},vC={"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.loadFailed":"Couldn't load the threads","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"},yC={"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}"},xC={"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}"},bC={"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","environment.limits":"Resource limits","environment.limits.edit":"Change resource limits","environment.limits.none":"No limits","environment.limits.unlimited":"Unlimited","environment.limits.memory":"Memory {value}","environment.limits.cpu":"CPU {value}","environment.limits.cores":"{count} cores","environment.limits.oneCore":"1 core","environment.limits.memoryField":"Memory (GB)","environment.limits.cpuField":"CPU (cores)","environment.limits.machine":"This machine: {cpus} cores · {memory} GB","environment.limits.below":"Below the {usage} in use now. After saving, some programs in the sandbox may be ended.","environment.limits.failed":"Couldn't change the resource limits","environment.usage":"Usage","environment.usage.value":"Memory {memory} · CPU {cpu}","error.limitsInvalid":"Memory can be 0.25–{memory} GB and CPU 0.1–{cpus} cores, or unlimited."},jC={"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"},wC={"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."},SC={"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}"},kC={"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."},CC={"ports.title":"Port forwarding","ports.empty":"No forwarded ports","ports.open":"Open {name}","ports.port":"Port {port}","ports.sandboxPort":"Sandbox port","ports.link":"Link","ports.linkOther":"Other address","ports.copy":"Copy link","ports.state":"State","ports.state.live":"Running","ports.state.local":"Local only","ports.state.idle":"Not listening","ports.state.stopped":"Sandbox stopped","ports.state.unknown":"Unknown state","ports.hint.local":"The service listens only on 127.0.0.1 in the sandbox and can't be reached through the link. Ask the Bot to listen on 0.0.0.0.","ports.hint.idle":"No service in the sandbox listens on this port.","ports.hint.stopped":"The link works once the sandbox starts.","ports.stop":"Stop forwarding","ports.stopTitle":"Stop forwarding “{name}”?","ports.stopBody":"Its link stops working. The service keeps running in the sandbox.","ports.back":"Back","ports.loadFailed":"Couldn't load the forwarded ports.","ports.changeFailed":"Couldn't stop forwarding the port.","ports.range":"Forwarding ports","ports.rangeHint":"When a Bot publishes a port, Jarvy forwards it from a port in this range. Ports already forwarded keep theirs.","ports.rangeFrom":"From","ports.rangeTo":"To","ports.rangeSaved":"Saved","error.portInvalid":"That port can't be forwarded.","error.portMissing":"That port isn't forwarded.","error.portRangeInvalid":"Use ports from 1024 to 65535, the first no larger than the last, at most 1000 of them.","error.portRangeOwn":"The range can't include Jarvy's own port.","error.portsExhausted":"No free port left in {from}–{to}. Widen the range in Settings › Network."},NC={...mC,...pC,...gC,...vC,...yC,...xC,...bC,...jC,...wC,...SC,...kC,...CC},EC={"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.recent":"最近使用","actions.searchEmoji":"搜索表情","actions.noEmoji":"没有找到表情","actions.emoji.Smileys & Emotion":"表情和情绪","actions.emoji.People & Body":"人物和手势","actions.emoji.Animals & Nature":"动物和自然","actions.emoji.Food & Drink":"食物和饮料","actions.emoji.Travel & Places":"旅行和地点","actions.emoji.Activities":"活动","actions.emoji.Objects":"物品","actions.emoji.Symbols":"符号","actions.emoji.Flags":"旗帜","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 信息"},TC={"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 列表"},AC={"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":"下载后用播放器打开。"},MC={"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.loadFailed":"无法加载线程","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":"回复线程"},_C={"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}"},RC={"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}"},OC={"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":"重置","environment.limits":"资源上限","environment.limits.edit":"修改资源上限","environment.limits.none":"不限制","environment.limits.unlimited":"不限制","environment.limits.memory":"内存 {value}","environment.limits.cpu":"CPU {value}","environment.limits.cores":"{count} 核","environment.limits.oneCore":"1 核","environment.limits.memoryField":"内存(GB)","environment.limits.cpuField":"CPU(核)","environment.limits.machine":"本机 {cpus} 核 · {memory} GB","environment.limits.below":"低于当前占用的 {usage}。保存后,沙箱中的部分程序可能被结束。","environment.limits.failed":"无法修改资源上限","environment.usage":"当前占用","environment.usage.value":"内存 {memory} · CPU {cpu}","error.limitsInvalid":"内存可设为 0.25–{memory} GB,CPU 可设为 0.1–{cpus} 核,或不限制。"},zC={"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"},DC={"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 无法解密,请在「设置 › 模型」中重新输入。"},LC={"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}"},BC={"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":"给任务起个名字,写上要做什么。"},IC={"ports.title":"端口转发","ports.empty":"暂无转发的端口","ports.open":"打开{name}","ports.port":"端口 {port}","ports.sandboxPort":"沙箱端口","ports.link":"链接","ports.linkOther":"其它地址","ports.copy":"复制链接","ports.state":"状态","ports.state.live":"运行中","ports.state.local":"仅本地监听","ports.state.idle":"未监听","ports.state.stopped":"沙箱已停止","ports.state.unknown":"状态未知","ports.hint.local":"服务仅监听沙箱内的 127.0.0.1,无法通过链接访问。请让 Bot 改为监听 0.0.0.0。","ports.hint.idle":"沙箱内暂无服务监听此端口。","ports.hint.stopped":"沙箱启动后即可通过链接访问。","ports.stop":"停止转发","ports.stopTitle":"停止转发「{name}」?","ports.stopBody":"链接将失效,沙箱内的服务不受影响。","ports.back":"返回","ports.loadFailed":"无法加载转发的端口。","ports.changeFailed":"无法停止转发此端口。","ports.range":"转发端口范围","ports.rangeHint":"Bot 发布端口时,Jarvy 从此范围中分配端口进行转发。已转发的端口不受影响。","ports.rangeFrom":"起始","ports.rangeTo":"结束","ports.rangeSaved":"已保存","error.portInvalid":"此端口无法转发。","error.portMissing":"此端口未在转发。","error.portRangeInvalid":"端口范围须在 1024–65535 之间,起始不大于结束,最多 1000 个。","error.portRangeOwn":"范围不能包含 Jarvy 自己的端口。","error.portsExhausted":"{from}–{to} 中已无空闲端口,请在「设置 › 网络」中扩大范围。"},PC={...EC,...TC,...AC,...MC,..._C,...RC,...OC,...zC,...DC,...LC,...BC,...IC},jj=["en","zh"],wj={en:NC,zh:PC},Bc={en:"en",zh:"zh-CN"},Sj="jarvy-locale";function HC(){var i;const e=localStorage.getItem(Sj);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 Pi=HC();document.documentElement.lang=Bc[Pi];const Bp=new Set,sl=()=>Pi;function kj(e){if(e!==Pi){Pi=e,localStorage.setItem(Sj,e),document.documentElement.lang=Bc[e];for(const a of Bp)a()}}function Cj(){return w.useSyncExternalStore(e=>(Bp.add(e),()=>{Bp.delete(e)}),sl)}const Ip=(e,a)=>wj[e][a==="name"?"locale.name":"locale.short"];function Nj(e,a){const i=wj[Pi][e];return typeof i=="string"?i:new Intl.PluralRules(Bc[Pi]).select(Number(a))==="one"?i.one:i.other}function x(e,a){const i=Nj(e,a==null?void 0:a.count);return a?i.replace(/\{(\w+)\}/g,(r,s)=>s in a?String(a[s]):r):i}const na=(e,a)=>new Date(e).toLocaleString(Bc[Pi],a),ro=e=>na(e,{hour:Pi==="zh"?"2-digit":"numeric",minute:"2-digit"}),T0=e=>{const a=new Date(e).getFullYear()===new Date().getFullYear();return na(e,{year:a?void 0:"numeric",month:Pi==="zh"?"numeric":"short",day:"numeric"})},Hi=(e,a)=>new Intl.NumberFormat(Bc[Pi],a).format(e);function A0(e,a){return Nj(e,a.count).split(/\{(\w+)\}/).map((i,r)=>o.jsx(w.Fragment,{children:r%2?a[i]??`{${i}}`:i},r))}class qi extends Error{constructor(a,i,r,s){super(i),this.status=a,this.code=r,this.params=s}}async function Se(e,a={}){let i;try{i=await fetch(`/api${e}`,{...a,credentials:"same-origin",headers:{...a.body&&!(a.body instanceof Blob)?{"Content-Type":"application/json"}:{},...a.headers}})}catch{throw new Error(x("api.offline"))}const r=await i.json().catch(()=>({}));if(!i.ok)throw Ej(i.status,r);return r}const Ej=(e,a)=>{const i=typeof a=="object"&&a!==null?a:{};return new qi(e,i.error===void 0?`HTTP ${e}`:String(i.error),typeof i.code=="string"?i.code:void 0,i.params)};function qC(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(Ej(d.status,f))},d.send(a)})}async function UC(e,a=0){const i=[];let r=a;for(;;){const s=await Se(`/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 nt=e=>JSON.stringify(e),he={me:()=>Se("/me"),search:(e,a)=>Se(`/search?q=${encodeURIComponent(e)}${a?`&in=${a}`:""}&limit=60`),login:(e,a)=>Se("/login",{method:"POST",body:nt({username:e,password:a})}),logout:()=>Se("/logout",{method:"POST"}),bots:()=>Se("/bots"),createBot:e=>Se("/bots",{method:"POST",body:nt({name:e})}),saveBot:(e,a)=>Se(`/bots/${e}`,{method:"PUT",body:nt(a)}),modelOptions:()=>Se("/model-options"),selectBotModel:(e,a,i,r,s)=>Se(`/bots/${e}/model`,{method:"PUT",body:nt({connectionId:a,modelId:i,thinkingLevel:r,language:s})}),answerQuestion:(e,a,i)=>Se(`/chats/${e}/questions/${a}`,{method:"POST",body:nt(i)}),setBotColor:(e,a)=>Se(`/bots/${e}/color`,{method:"PUT",body:nt({color:a})}),chats:()=>Se("/chats"),createChat:e=>Se("/chats",{method:"POST",body:nt({botId:e})}),deleteChat:e=>Se(`/chats/${e}`,{method:"DELETE"}),members:()=>Se("/members"),sections:()=>Se("/sections"),createSection:e=>Se("/sections",{method:"POST",body:nt(e)}),updateSection:(e,a)=>Se(`/sections/${e}`,{method:"PATCH",body:nt(a)}),deleteSection:e=>Se(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>Se("/channels",{method:"POST",body:nt(e)}),updateChannel:(e,a)=>Se(`/chats/${e}`,{method:"PATCH",body:nt(a)}),addMember:(e,a)=>Se(`/chats/${e}/members`,{method:"POST",body:nt({memberId:a})}),removeMember:(e,a)=>Se(`/chats/${e}/members/${a}`,{method:"DELETE"}),setNote:(e,a)=>Se(`/chats/${e}/note`,{method:"PUT",body:nt({text:a})}),markRead:(e,a)=>Se(`/chats/${e}/read`,{method:"POST",body:nt({sequence:a})}),messages:UC,latestMessages:(e,a)=>Se(`/chats/${e}/messages?tail=${a}`),olderMessages:(e,a,i)=>Se(`/chats/${e}/messages?before=${a}&limit=${i}`),send:(e,a,i,r,s=!1,u,d=[])=>Se(`/chats/${e}/messages`,{method:"POST",body:nt({content:a,attachmentIds:i,clientMessageId:r,...s?{alsoToChannel:s}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),fold:(e,a)=>Se(`/messages/${e}/fold`,{method:"PUT",body:nt({folded:a})}),react:(e,a,i)=>Se(`/messages/${e}/reaction`,{method:"PUT",body:nt({emoji:a,on:i})}),pin:(e,a)=>Se(`/chats/${e}/pin`,{method:"PUT",body:nt({pinned:a})}),mute:(e,a)=>Se(`/chats/${e}/mute`,{method:"PUT",body:nt({muted:a})}),deleteBot:(e,a)=>Se(`/bots/${e}${a?"?files=delete":""}`,{method:"DELETE"}),chat:e=>Se(`/chats/${e}`),message:e=>Se(`/messages/${e}`),openThread:e=>Se(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>Se(`/chats/${e}/threads`),followedThreads:({filter:e,sort:a,cursor:i})=>Se(`/threads?${new URLSearchParams({filter:e,sort:a,...i?{cursor:i}:{}})}`),followedThread:e=>Se(`/threads/${e}`),updateThread:(e,a)=>Se(`/chats/${e}`,{method:"PATCH",body:nt(a)}),follow:(e,a)=>Se(`/chats/${e}/follow`,{method:"PUT",body:nt({following:a})}),botDirects:e=>Se(`/members/${e}/dms`),tasks:e=>Se(`/bots/${e}/tasks`),createTask:(e,a)=>Se(`/bots/${e}/tasks`,{method:"POST",body:nt(a)}),updateTask:(e,a,i)=>Se(`/bots/${e}/tasks/${a}`,{method:"PUT",body:nt(i)}),setTaskOn:(e,a,i)=>Se(`/bots/${e}/tasks/${a}/${i?"resume":"pause"}`,{method:"POST"}),deleteTask:(e,a)=>Se(`/bots/${e}/tasks/${a}`,{method:"DELETE"}),botSubscriptions:e=>Se(`/members/${e}/subscriptions`),controlBot:(e,a)=>Se(`/bots/${e}/${a}`,{method:"POST"}),grantBotMachine:(e,a,i)=>Se(`/bots/${e}/environment`,{method:"PUT",body:nt({machineId:a,granted:i})}),machines:()=>Se("/environments"),scanMachine:e=>Se("/environments/scan",{method:"POST",body:nt(e)}),addMachine:e=>Se("/environments",{method:"POST",body:nt(e)}),prepareMachineKey:()=>Se("/environments/keys",{method:"POST"}),setMachinePassword:(e,a)=>Se(`/environments/${e}/password`,{method:"PUT",body:nt({password:a})}),updateMachine:(e,a)=>Se(`/environments/${e}`,{method:"PUT",body:nt(a)}),checkMachine:e=>Se(`/environments/${e}/check`,{method:"POST"}),trustMachine:(e,a)=>Se(`/environments/${e}/trust`,{method:"POST",body:nt({fingerprints:a})}),deleteMachine:(e,a=!1)=>Se(`/environments/${e}${a?"?force=1":""}`,{method:"DELETE"}),grantMachine:(e,a,i)=>Se(`/environments/${e}/grants/${a}`,{method:"PUT",body:nt({granted:i})}),fulfilMachine:(e,a,i)=>Se(`/environments/requests/${e}/${a}`,{method:"POST",body:nt(i)}),computer:(e,a)=>Se(`/bots/${e}/computer/${a}`,{method:"POST"}),setComputerLimits:(e,a)=>Se(`/bots/${e}/computer/limits`,{method:"PUT",body:nt(a)}),computerResources:e=>Se(`/bots/${e}/computer/resources`),connection:()=>Se("/connection"),setConnection:e=>Se("/connection",{method:"PUT",body:nt({allowHttp:e})}),setPortRange:e=>Se("/connection",{method:"PUT",body:nt({ports:e})}),ports:e=>Se(`/bots/${e}/ports`),unpublishPort:(e,a)=>Se(`/bots/${e}/ports/${a}`,{method:"DELETE"}),secrets:()=>Se("/secrets"),createSecret:e=>Se("/secrets",{method:"POST",body:nt(e)}),updateSecret:(e,a)=>Se(`/secrets/${e}`,{method:"PUT",body:nt(a)}),deleteSecret:e=>Se(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,a,i)=>Se(`/secrets/${e}/grants/${a}`,{method:"PUT",body:nt({granted:i})}),secretUses:e=>Se(`/secrets/${e}/uses`),fulfilSecret:(e,a,i)=>Se(`/secrets/requests/${e}/${a}`,{method:"POST",body:nt(i)}),botStatus:e=>Se(`/bots/${e}/status`),uploadAttachment:qC,removeAttachment:e=>Se(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>Se(`/model-connections/${e}/auth`),authStart:e=>Se(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>Se(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,a,i)=>Se(`/model-connections/${e}/auth/input`,{method:"POST",body:nt({promptId:a,value:i})}),authLogout:e=>Se(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>Se(`/model-connections/${e}/catalog`),modelResetPlan:e=>Se(`/model-connections/${e}/reset`),resetModelConnection:e=>Se(`/model-connections/${e}/reset`,{method:"POST"}),providerModels:e=>Se(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>Se("/model-providers"),autoconfigModel:e=>Se("/model-autoconfig",{method:"POST",body:nt(e)}),discoverModels:e=>Se("/model-discovery",{method:"POST",body:nt(e)}),modelConnections:()=>Se("/model-connections"),createModelConnection:e=>Se("/model-connections",{method:"POST",body:nt(e)}),updateModelConnection:(e,a)=>Se(`/model-connections/${e}`,{method:"PUT",body:nt(a)}),deleteModelConnection:e=>Se(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,a,i=!1)=>Se(`/model-connections/${e}/credential`,{method:"PUT",body:nt({apiKey:a,remove:i})}),saveConnectionModel:(e,a,i)=>Se(`/model-connections/${e}/models`,{method:i?"PUT":"POST",body:nt({model:a,originalId:i})}),deleteConnectionModel:(e,a)=>Se(`/model-connections/${e}/models`,{method:"DELETE",body:nt({modelId:a})})},Xy=4*1024**3,FC=["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 VC=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 $C(e,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:VC(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 GC=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 YC=e=>{const a=GC(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 Pp=(...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 Gl={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 Km(e){return e!=null}function KC(e,a={}){var j,b;const i=a.attributeNames??{},r=S=>i[S]??S,s=e.size??e.width??Gl.width,u=e.size??e.height??Gl.height,d=((j=e.aliases)==null?void 0:j.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((b=a.className)==null?void 0:b.split(" ").filter(Boolean))??[],p=a.includeDefaultClasses===!1?Pp(...m):Pp("lucide",...f,...m),y=a.absoluteStrokeWidth?Number(a.strokeWidth??Gl["stroke-width"])*Number(e.size??e.width??Gl.width)/Number(a.size??a.width??Gl.width):a.strokeWidth??Gl["stroke-width"];return["svg",{...Object.entries(Gl).reduce((S,[k,N])=>(S[r(k)]=N,S),{}),..."color"in a&&a.color&&{[r("stroke")]:a.color},..."size"in a&&Km(a.size)&&{[r("width")]:a.size,[r("height")]:a.size},..."width"in a&&Km(a.width)&&{[r("width")]:a.width},..."height"in a&&Km(a.height)&&{[r("height")]:a.height},[r("stroke-width")]:y,...p&&{[r("class")]:p},[r("viewBox")]:`0 0 ${s} ${u}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},e.node.map(S=>{const[k,N,T]=S,A=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...N}:N;return T?[k,A,T]:[k,A]})]}/**
|
|
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 XC(e,a={}){return KC(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 QC=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},ZC=w.createContext({}),JC=()=>w.useContext(ZC),WC=w.forwardRef(({color:e,size:a,width:i,height:r,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:p=[],icon:y={node:p,aliases:[],size:24},...g},j)=>{const{size:b=24,strokeWidth:S=2,absoluteStrokeWidth:k=!1,nonScalingStroke:N=!1,color:T="currentColor",className:A=""}=JC()??{},C=!!m||QC(g),[M,O,_=[]]=XC(y,{color:e??T,width:i??a??b,height:r??a??b,strokeWidth:s??S,absoluteStrokeWidth:u??k,nonScalingStroke:d??N,className:Pp(A,f),hasA11yProp:C,attributes:g});return w.createElement(M,{ref:j,...O},[..._.map(([I,V])=>w.createElement(I,V)),...Array.isArray(m)?m:[m]])});/**
|
|
95
|
+
* @license lucide-react v1.47.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/function Me(e,a=[],i=[]){const r=typeof e=="string"?$C(e,a,i):e,s=w.forwardRef(({className:u,...d},f)=>w.createElement(WC,{ref:f,icon:r,className:u,...d}));return r.name&&(s.displayName=YC(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 Tj={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"}]]};Tj.node;const e7=Me(Tj);/**
|
|
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 Aj={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"}]]};Aj.node;const t7=Me(Aj);/**
|
|
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 Mj={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"}]]};Mj.node;const n7=Me(Mj);/**
|
|
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 _j={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};_j.node;const af=Me(_j);/**
|
|
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 Rj={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};Rj.node;const Hp=Me(Rj);/**
|
|
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 Oj={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Oj.node;const a7=Me(Oj);/**
|
|
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 zj={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"}]]};zj.node;const i7=Me(zj);/**
|
|
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 Dj={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"}]]};Dj.node;const r7=Me(Dj);/**
|
|
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 Lj={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"}]]};Lj.node;const l7=Me(Lj);/**
|
|
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 Bj={name:"cat",size:24,node:[["path",{d:"M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z",key:"x6xyqk"}],["path",{d:"M8 14v.5",key:"1nzgdb"}],["path",{d:"M16 14v.5",key:"1lajdz"}],["path",{d:"M11.25 16.25h1.5L12 17l-.75-.75Z",key:"12kq1m"}]]};Bj.node;const o7=Me(Bj);/**
|
|
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 Ij={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"]};Ij.node;const s7=Me(Ij);/**
|
|
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 Pj={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Pj.node;const ma=Me(Pj);/**
|
|
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 Hj={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Hj.node;const cl=Me(Hj);/**
|
|
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 qj={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};qj.node;const Uj=Me(qj);/**
|
|
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 Fj={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Fj.node;const Ii=Me(Fj);/**
|
|
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 Vj={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Vj.node;const c7=Me(Vj);/**
|
|
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 $j={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"]};$j.node;const u7=Me($j);/**
|
|
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 Gj={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"}]]};Gj.node;const Ic=Me(Gj);/**
|
|
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 Yj={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"}]]};Yj.node;const d7=Me(Yj);/**
|
|
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 Kj={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"}]]};Kj.node;const M0=Me(Kj);/**
|
|
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 Xj={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"]};Xj.node;const Qy=Me(Xj);/**
|
|
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 Qj={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"}]]};Qj.node;const f7=Me(Qj);/**
|
|
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 Zj={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"}]]};Zj.node;const qp=Me(Zj);/**
|
|
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 Jj={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"}]]};Jj.node;const _0=Me(Jj);/**
|
|
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 Wj={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"}]]};Wj.node;const R0=Me(Wj);/**
|
|
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 e4={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"]};e4.node;const h7=Me(e4);/**
|
|
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 t4={name:"face-slightly-smiling",size:24,node:[["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M9 10V9",key:"1lazqi"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["smile"]};t4.node;const m7=Me(t4);/**
|
|
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 n4={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"]};n4.node;const p7=Me(n4);/**
|
|
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 a4={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"]};a4.node;const g7=Me(a4);/**
|
|
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 i4={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"}]]};i4.node;const v7=Me(i4);/**
|
|
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 r4={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"}]]};r4.node;const y7=Me(r4);/**
|
|
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 l4={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};l4.node;const x7=Me(l4);/**
|
|
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 o4={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"}]]};o4.node;const b7=Me(o4);/**
|
|
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 s4={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"}]]};s4.node;const j7=Me(s4);/**
|
|
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 c4={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"}]]};c4.node;const w7=Me(c4);/**
|
|
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 u4={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};u4.node;const S7=Me(u4);/**
|
|
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 d4={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"}]]};d4.node;const k7=Me(d4);/**
|
|
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 f4={name:"heart",size:24,node:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]};f4.node;const C7=Me(f4);/**
|
|
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 h4={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"}]]};h4.node;const N7=Me(h4);/**
|
|
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 m4={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"}]]};m4.node;const O0=Me(m4);/**
|
|
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 p4={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"}]]};p4.node;const g4=Me(p4);/**
|
|
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 v4={name:"lightbulb",size:24,node:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]};v4.node;const E7=Me(v4);/**
|
|
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 y4={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"}]]};y4.node;const T7=Me(y4);/**
|
|
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 x4={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};x4.node;const b4=Me(x4);/**
|
|
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 j4={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"}]]};j4.node;const A7=Me(j4);/**
|
|
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 w4={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"}]]};w4.node;const M7=Me(w4);/**
|
|
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 S4={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"]};S4.node;const k4=Me(S4);/**
|
|
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 C4={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"}]]};C4.node;const _7=Me(C4);/**
|
|
340
|
+
* @license lucide-react v1.47.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const N4={name:"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"}]]};N4.node;const R7=Me(N4);/**
|
|
345
|
+
* @license lucide-react v1.47.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const E4={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"}]]};E4.node;const O7=Me(E4);/**
|
|
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 T4={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"}]]};T4.node;const A4=Me(T4);/**
|
|
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 M4={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"}]]};M4.node;const z7=Me(M4);/**
|
|
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 _4={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};_4.node;const R4=Me(_4);/**
|
|
365
|
+
* @license lucide-react v1.47.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const O4={name:"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"}]]};O4.node;const D7=Me(O4);/**
|
|
370
|
+
* @license lucide-react v1.47.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const z4={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"]};z4.node;const L7=Me(z4);/**
|
|
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 D4={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"}]]};D4.node;const z0=Me(D4);/**
|
|
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 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 B7=Me(L4);/**
|
|
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 B4={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"}]]};B4.node;const I7=Me(B4);/**
|
|
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 I4={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"}]]};I4.node;const Up=Me(I4);/**
|
|
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 P4={name:"plane",size:24,node:[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]};P4.node;const P7=Me(P4);/**
|
|
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 H4={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};H4.node;const br=Me(H4);/**
|
|
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 q4={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"}]]};q4.node;const H7=Me(q4);/**
|
|
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 U4={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"}]]};U4.node;const D0=Me(U4);/**
|
|
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 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 q7=Me(F4);/**
|
|
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 V4={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"]};V4.node;const U7=Me(V4);/**
|
|
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 $4={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"}]]};$4.node;const G4=Me($4);/**
|
|
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 Y4={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Y4.node;const gs=Me(Y4);/**
|
|
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 K4={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"}]]};K4.node;const X4=Me(K4);/**
|
|
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 Q4={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"}]]};Q4.node;const F7=Me(Q4);/**
|
|
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 Z4={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"}]]};Z4.node;const V7=Me(Z4);/**
|
|
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 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 $7=Me(J4);/**
|
|
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 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 G7=Me(W4);/**
|
|
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 ew={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"}]]};ew.node;const Y7=Me(ew);/**
|
|
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 tw={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"]};tw.node;const nw=Me(tw);/**
|
|
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 aw={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"}]]};aw.node;const K7=Me(aw);/**
|
|
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 iw={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"]};iw.node;const X7=Me(iw);/**
|
|
480
|
+
* @license lucide-react v1.47.0 - ISC
|
|
481
|
+
*
|
|
482
|
+
* This source code is licensed under the ISC license.
|
|
483
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
484
|
+
*/const rw={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"}]]};rw.node;const Q7=Me(rw);/**
|
|
485
|
+
* @license lucide-react v1.47.0 - ISC
|
|
486
|
+
*
|
|
487
|
+
* This source code is licensed under the ISC license.
|
|
488
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
489
|
+
*/const lw={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"]};lw.node;const Ud=Me(lw);/**
|
|
490
|
+
* @license lucide-react v1.47.0 - ISC
|
|
491
|
+
*
|
|
492
|
+
* This source code is licensed under the ISC license.
|
|
493
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
494
|
+
*/const ow={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"]};ow.node;const L0=Me(ow);/**
|
|
495
|
+
* @license lucide-react v1.47.0 - ISC
|
|
496
|
+
*
|
|
497
|
+
* This source code is licensed under the ISC license.
|
|
498
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
499
|
+
*/const sw={name:"trophy",size:24,node:[["path",{d:"M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2",key:"pwuv1l"}],["path",{d:"M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2",key:"1y54w1"}],["path",{d:"M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3",key:"e30mpu"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3",key:"i0yafy"}]]};sw.node;const Z7=Me(sw);/**
|
|
500
|
+
* @license lucide-react v1.47.0 - ISC
|
|
501
|
+
*
|
|
502
|
+
* This source code is licensed under the ISC license.
|
|
503
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
504
|
+
*/const cw={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"}]]};cw.node;const J7=Me(cw);/**
|
|
505
|
+
* @license lucide-react v1.47.0 - ISC
|
|
506
|
+
*
|
|
507
|
+
* This source code is licensed under the ISC license.
|
|
508
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
509
|
+
*/const uw={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"}]]};uw.node;const W7=Me(uw);/**
|
|
510
|
+
* @license lucide-react v1.47.0 - ISC
|
|
511
|
+
*
|
|
512
|
+
* This source code is licensed under the ISC license.
|
|
513
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
514
|
+
*/const dw={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"}]]};dw.node;const e9=Me(dw);/**
|
|
515
|
+
* @license lucide-react v1.47.0 - ISC
|
|
516
|
+
*
|
|
517
|
+
* This source code is licensed under the ISC license.
|
|
518
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
519
|
+
*/const fw={name:"utensils",size:24,node:[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],aliases:["fork-knife"]};fw.node;const t9=Me(fw);/**
|
|
520
|
+
* @license lucide-react v1.47.0 - ISC
|
|
521
|
+
*
|
|
522
|
+
* This source code is licensed under the ISC license.
|
|
523
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
524
|
+
*/const hw={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"}]]};hw.node;const n9=Me(hw);/**
|
|
525
|
+
* @license lucide-react v1.47.0 - ISC
|
|
526
|
+
*
|
|
527
|
+
* This source code is licensed under the ISC license.
|
|
528
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
+
*/const mw={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};mw.node;const vs=Me(mw),pw={list:(e,a)=>Se(`/bots/${e}/activity${a===void 0?"":`?before=${encodeURIComponent(a)}`}`),message:(e,a)=>Se(`/bots/${e}/activity/messages/${a}`)};function gw(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=gw(e[a]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function a9(){for(var e,a,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(a=gw(e))&&(r&&(r+=" "),r+=a);return r}const Zy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jy=a9,B0=(e,a)=>i=>{var r;if((a==null?void 0:a.variants)==null)return Jy(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:s,defaultVariants:u}=a,d=Object.keys(s).map(p=>{const y=i==null?void 0:i[p],g=u==null?void 0:u[p];if(y===null)return null;const j=Zy(y)||Zy(g);return s[p][j]}),f=i&&Object.entries(i).reduce((p,y)=>{let[g,j]=y;return j===void 0||(p[g]=j),p},{}),m=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((p,y)=>{let{class:g,className:j,...b}=y;return Object.entries(b).every(S=>{let[k,N]=S;return Array.isArray(N)?N.includes({...u,...f}[k]):{...u,...f}[k]===N})?[...p,g,j]:p},[]);return Jy(e,d,m,i==null?void 0:i.class,i==null?void 0:i.className)},vw=48,Gi=(e,a=0)=>{const i=new Int32Array(e.length);for(let r=0;r<e.length;r++)i[r]=e.charCodeAt(r)-vw-a;return i},rf=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},ul=e=>{const a=new Int32Array(e.length);let i=0;for(let r=0;r<e.length;r++){const s=e.charCodeAt(r)-vw;i+=s>>>1^-(s&1),a[r]=i}return a},i9=384,r9=[],Zl=rf(Gi("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),l9=rf(Gi(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),o9="@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",s9=(()=>{const e=Zl.length-1,a=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,d=s+1;for(let f=Zl[s];f<Zl[s+1];f++)u+=a[d],d+=a[d];a[s]=u}const i=new Int32Array(Zl[e]);let r=0;for(let s=0;s<e;s++){let u=s+1;for(let d=Zl[s];d<Zl[s+1];d++)i[r++]=u,u+=a[u]}return i})(),c9=Gi("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),u9=rf(Gi("123333359346463635126536711576")),d9=Gi("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),f9=Gi("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),h9=ul("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),m9=(()=>{const e=new Int32Array(319).fill(-1),a=ul("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=ul("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let r=0;r<a.length;r++)e[a[r]]=i[r];return e})(),p9="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}),Wy=ul("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),g9=ul("ɠ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"),v9=ul("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),yw=new Int32Array(995),xw=new Int32Array(995),bw=new Int32Array(995);let Fp="";const Vp=new Int32Array(1038);{const e=new Map;let a=0,i=0;for(let r=0;r<Wy.length;r++)for(const s of p9[v9[r]]){let u=e.get(s);u===void 0&&(u=a++,e.set(s,u),Vp[u*2]=Fp.length,Vp[u*2+1]=s.length,Fp+=s),yw[i]=Wy[r],xw[i]=g9[r],bw[i]=u,i++}}const y9=ul("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),x9=rf(Gi("1::24444432:442:44:44>222222:44:4421322511111311111114")),b9=ul("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"),j9=Gi("ij"),w9=Gi(""),S9=Gi("1"),k9="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var C9={GROUP_COUNT:i9,customValidatorNames:r9,edgeStart:Zl,labelStart:l9,labelText:o9,edgeTarget:s9,nodeGroup:c9,nodeVlist:m9,vlistPat:u9,vlistOps:d9,vlistRef:f9,vlistGroup:h9,litAnchor:yw,litGroup:xw,litPool:bw,poolOffsets:Vp,poolText:Fp,adjGid:y9,adjStart:x9,adjTgt:b9,patGid:j9,patTgt:w9,postfixLookupGroups:S9,orderSensitiveModifiers:k9};const N9="line"in new Error,_i=-1,Yl=-1,Xm=(e,a,i)=>{let r=2166136261;for(let s=a;s<i;s++)r=Math.imul(r^e.charCodeAt(s),16777619);return r},zd=(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},E9=(e,a,i={})=>{const{GROUP_COUNT:r,edgeStart:s,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:p,vlistPat:y,vlistOps:g,vlistRef:j,vlistGroup:b,litAnchor:S,litGroup:k,litPool:N,poolOffsets:T,poolText:A,adjGid:C,adjStart:M,adjTgt:O,patGid:_,patTgt:I,postfixLookupGroups:V,customValidatorNames:X,orderSensitiveModifiers:L}=e,H=new Int32Array(r).fill(-1);for(let se=0;se<C.length;se++)H[C[se]]=se;let q=0;for(let se=0;se+1<M.length;se++){const be=M[se+1]-M[se];be>q&&(q=be)}let Z=32;for(;Z<2*(1+q+_.length);)Z<<=1;const $=new Int32Array(j.length+1);for(let se=0;se<j.length;se++)$[se+1]=$[se]+y[j[se]+1]-y[j[se]];const F=new Uint8Array(r);for(let se=0;se<V.length;se++)F[V[se]]=1;const K=s.length-1,U=new Uint8Array(K);let P=0,ie=!0;for(let se=0;se<S.length;se++){U[S[se]]=1;const be=T[N[se]*2+1];be>P&&(P=be);const je=A.charCodeAt(T[N[se]*2]);(je===91||je===40)&&(ie=!1)}let z=1;for(;z<S.length*2;)z<<=1;const ne=new Int32Array(z).fill(-1);for(let se=0;se<S.length;se++){const be=T[N[se]*2];let je=(Xm(A,be,be+T[N[se]*2+1])^Math.imul(S[se],2654435761)|0)&z-1;for(;ne[je]!==-1;)je=je+1&z-1;ne[je]=se}const re=(se,be,je,Ve)=>{let et=(Xm(be,je,Ve)^Math.imul(se,2654435761)|0)&z-1;const G=Ve-je;for(;;){const ue=ne[et];if(ue===-1)return-1;if(S[ue]===se&&T[N[ue]*2+1]===G){const we=T[N[ue]*2];let He=!0;for(let ze=0;ze<G;ze++)if(A.charCodeAt(we+ze)!==be.charCodeAt(je+ze)){He=!1;break}if(He)return k[ue]}et=et+1&z-1}},R=i.cacheSize??8192,B=i.prefix??e.prefix??"",W=B===""?"":B+":",fe=W.length,me=(X??[]).map(se=>{throw new Error("cn: missing validator "+se)}),pe=/\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$/,Ce=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let oe=0,Ee=-1,Xe=-1,Be=-1,at=-1;const Qe=se=>se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95,We=se=>/\s/.test(String.fromCharCode(se)),Pt=(se,be,je)=>{if(oe=0,Ee=-1,je-be<3)return;const Ve=se.charCodeAt(be),et=se.charCodeAt(je-1);if(Ve===91&&et===93)oe=1;else if(Ve===40&&et===41)oe=2;else return;Be=be+1,at=je-1;let G=be+1;if(Qe(se.charCodeAt(G))){for(G++;G<je-1;){const ue=se.charCodeAt(G);if(!Qe(ue)&&ue!==45)break;G++}G<je-2&&se.charCodeAt(G)===58&&(Ee=be+1,Xe=G,Be=G+1)}},vn=(se,be,je,Ve)=>{if(je-be!==Ve.length)return!1;for(let et=0;et<Ve.length;et++)if(se.charCodeAt(be+et)!==Ve.charCodeAt(et))return!1;return!0},en=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$n=se=>!!se&&!Number.isNaN(Number(se)),An=(se,be,je)=>{if(je-be<11||!vn(se,be,be+10,"@container"))return!1;if(se.charCodeAt(be+10)===47)return je-be>=12;const Ve=se.charCodeAt(be+11);return Ve===115&&je-be>=17&&vn(se,be+10,be+16,"-size/")||Ve===110&&je-be>=19&&vn(se,be+10,be+18,"-normal/")},Za=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],ge="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(" ")),ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Ye=(se,be,je,Ve)=>{if(se>=10){if(se>=25)return me[se-25](be.slice(je,Ve));const et=se-10;if(oe!==Za[et])return!1;if(Ee>=0){for(const G of ge[et])if(vn(be,Ee,Xe,G))return!0;return!1}switch(ke[et]){case 0:return!1;case 1:return!0;case 2:{const G=be.slice(Be,at);return pe.test(G)&&!Ce.test(G)}case 3:return $n(be.slice(Be,at));case 4:return xe.test(be.slice(Be,at));default:return Ae.test(be.slice(Be,at))}}switch(se){case 0:return!0;case 1:return oe===0;case 2:return oe===1;case 3:return oe===2;case 4:return en.test(be.slice(je,Ve));case 5:return $n(be.slice(je,Ve));case 6:{const et=be.slice(je,Ve);return!!et&&Number.isInteger(Number(et))}case 7:return Ve>je&&be.charCodeAt(Ve-1)===37&&$n(be.slice(je,Ve-1));case 8:return cn.test(be.slice(je,Ve));default:return An(be,je,Ve)}},Ke=new Set(typeof L=="string"?L.split(" "):L),ct=(se,be,je,Ve,et,G)=>{const ue=Xm(be,je,Ve)^(et?2654435769:0)|0;let we=se.get(ue);if(we!==void 0)e:for(let $e=0;$e<we.length;$e++){const De=we[$e];if(!(De.imp!==et||De.k.length!==Ve-je)){for(let Le=0;Le<De.k.length;Le++)if(De.k.charCodeAt(Le)!==be.charCodeAt(je+Le))continue e;return De.id}}else se.set(ue,we=[]);const He=be.slice(je,Ve),ze=G(He);return we.push({k:He,imp:et,id:ze}),ze};let At=new Map,Xt=new Map,de=2;const _e=4096,Re=(se,be)=>{const je=[];let Ve=0,et=0,G=0;for(let ze=0;ze<se.length;ze++){const $e=se.charCodeAt(ze);Ve===0&&et===0&&$e===58?(je.push(se.slice(G,ze)),G=ze+1):$e===91?Ve++:$e===93?Ve--:$e===40?et++:$e===41&&et--}je.push(se.slice(G));let ue=je[0];if(je.length>1){const ze=[];let $e=[];for(const De of je)De.charCodeAt(0)===91||Ke.has(De)?($e.length&&(ze.push(...$e.sort()),$e=[]),ze.push(De)):$e.push(De);$e.length&&ze.push(...$e.sort()),ue=ze.join(":")}const we=be?ue+" !":ue;let He=Xt.get(we);return He===void 0&&Xt.set(we,He=de++),He};let Ie=new Map,Fe=r;const it=r+4096,Gt=()=>Fe++,za=2097152,Gn=8192,St=new Int32Array(Gn),yn=new Array(Gn).fill(null),go=new Int32Array(Gn),Xi=new Int32Array(Gn),yl=new Uint8Array(Gn);let ga=0;const gi=(se,be,je,Ve,et,G,ue,we)=>{let He=se;if(yn[se]!==null)if(yn[se|1]===null)He=se|1;else if((ga++&3)===0)He=se|ga>>2&1;else return;yn[He]=be.slice(je,Ve),St[He]=et,go[He]=G,Xi[He]=ue,yl[He]=we},Ht=()=>yn.fill(null);let tn=256,on=[new Int32Array(tn),new Int32Array(tn),new Int32Array(tn),new Int32Array(tn)],[vi,Ja,Wa,ei]=on,Da=new Uint8Array(tn),aa=new Uint8Array(tn);const ti=()=>{tn*=2,on=on.map(be=>{const je=new Int32Array(tn);return je.set(be),je}),[vi,Ja,Wa,ei]=on;const se=new Uint8Array(tn);se.set(Da),Da=se,aa=new Uint8Array(tn)};let va=64,ia=new Int32Array(va),yi=new Int32Array(va);const xl=new Int32Array(r);let ya=2048,Nr=21,ni=new Float64Array(ya),Er=new Int32Array(ya),xa=0;const Tr=(se,be)=>{if(se===0&&be<r)return xl[be]===xa?1:(xl[be]=xa,0);const je=se*2097152+be+1;let Ve=Math.imul(je,2654435761)>>>Nr;for(;Er[Ve]===xa;){if(ni[Ve]===je)return 1;Ve=Ve+1&ya-1}return ni[Ve]=je,Er[Ve]=xa,0},La=(se,be,je,Ve,et)=>{if(je-be>=2&&se.charCodeAt(be)===91&&se.charCodeAt(je-1)===93){let G=-1;for(let ue=be+1;ue<je-1;ue++)if(se.charCodeAt(ue)===58){G=ue;break}return G===-1||G===be+1?_i:ct(Ie,se,be+1,G,0,Gt)}if(Ve>=0&&m[Ve]>=0)return m[Ve];for(let G=et-1;G>=0;G--){const ue=yi[G];if(ue>je)continue;const we=ia[G],He=je-ue;if(U[we]===1&&He>0&&He<=P){const lt=se.charCodeAt(ue);if(ie===!1||lt!==91&<!==40){const an=re(we,se,ue,je);if(an>=0)return an}}const ze=p[we];if(ze<0)continue;const $e=j[ze],De=y[$e],Le=y[$e+1];if(De===Le)continue;Pt(se,ue,je);const dt=$[ze]-De;for(let lt=De;lt<Le;lt++)if(Ye(g[lt],se,ue,je))return b[dt+lt]}return _i},Ba=se=>{const be=se.length;let je=0,Ve=0,et=!1;(de>_e||At.size>_e)&&(At=new Map,Xt=new Map,de=2,Ht()),Fe>it&&(Ie=new Map,Fe=r,Ht());let G=0;for(;G<be;){let ze=se.charCodeAt(G);if(ze===32||ze>=9&&ze<=13||ze>=160&&We(ze)){ze!==32&&(et=!0),G++;continue}const $e=G;let De=0;for(;G<be;){if(ze=se.charCodeAt(G),ze<=32){if(ze===32)break;if(ze>=9&&ze<=13){et=!0;break}}else if(ze>=160&&We(ze)){et=!0;break}De=Math.imul(De^ze,16777619),G++}const Le=G,dt=Le-$e;je===tn&&ti();const lt=je++;vi[lt]=$e,Ja[lt]=Le,Ve+=dt,De^=Math.imul(dt,2654435761);const an=De^De>>>15|0,Ct=an&8190;{let bt=-1;if(St[Ct]===an&&yn[Ct]!==null&&yn[Ct].length===dt?bt=Ct:St[Ct|1]===an&&yn[Ct|1]!==null&&yn[Ct|1].length===dt&&(bt=Ct|1),bt>=0){const wn=yn[bt];let Pa=!0;for(let Sa=0;Sa<dt;Sa++)if(wn.charCodeAt(Sa)!==se.charCodeAt($e+Sa)){Pa=!1;break}if(Pa){Wa[lt]=go[bt],ei[lt]=Xi[bt],Da[lt]=yl[bt];continue}}}let Nt=$e;if(fe!==0){if(Le-$e<=fe||!se.startsWith(W,$e)){Wa[lt]=_i,gi(Ct,se,$e,Le,an,_i,0,0);continue}Nt=$e+fe}let vo=0,Ns=0,Zi=-1,yo=-1;for(let bt=Nt;bt<Le;bt++){const wn=se.charCodeAt(bt);if(vo===0&&Ns===0){if(wn===58){Zi=bt;continue}if(wn===47){yo=bt;continue}}wn===91?vo++:wn===93?vo--:wn===40?Ns++:wn===41&&Ns--}const Qc=Zi>=Nt?Zi+1:Nt;let $t=Qc,Hn=Le,Rr=!1,xo=0;Hn>$t&&se.charCodeAt(Hn-1)===33?(Rr=!0,Hn--):Hn>$t&&se.charCodeAt($t)===33&&(Rr=!0,$t++,xo=1);let ra=-1;yo>Qc&&(ra=yo+xo,ra>=Hn&&(ra=-1));let bo=$t;Hn-$t>1&&se.charCodeAt($t)===45&&(bo=$t+1);let ja=0,Kn=0,Or=0,Es=-1,wa=0;(p[0]>=0||U[0]===1)&&(ia[0]=0,yi[0]=bo,wa=1);let jl=Yl,Ts=0;for(let bt=bo;bt<Hn;bt++)if(bt===ra&&(jl=Kn<Or?Yl:ja,Ts=wa),ja!==Yl){const wn=se.charCodeAt(bt);let Pa=-1;if(Kn<Or)d.charCodeAt(Kn)===wn?(Kn++,Kn===Or&&(Pa=ja=Es)):ja=Yl;else{const Sa=s[ja],kl=s[ja+1];let Ji=Yl;for(let _n=Sa;_n<kl;_n++){const Cl=u[_n];if(d.charCodeAt(Cl)===wn){u[_n+1]-Cl===1?Pa=Ji=f[_n]:(Kn=Cl+1,Or=u[_n+1],Es=f[_n],Ji=ja);break}}ja=Ji}if(Pa>=0&&(p[Pa]>=0||U[Pa]===1)&&bt+1<Hn&&se.charCodeAt(bt+1)===45){if(wa===va){va*=2;const Sa=new Int32Array(va);Sa.set(ia),ia=Sa;const kl=new Int32Array(va);kl.set(yi),yi=kl}ia[wa]=Pa,yi[wa]=bt+2,wa++}}ra===Hn&&(jl=Kn<Or?Yl:ja,Ts=wa);const As=Kn<Or?Yl:ja;let Mn,Xn=!1;if(ra>=0)if(Xn=!0,Mn=La(se,$t,ra,jl,Ts),Mn!==_i&&Mn<r&&F[Mn]){const bt=La(se,$t,Hn,As,wa);bt!==_i&&bt!==Mn&&(Mn=bt,Xn=!1)}else Mn===_i&&(Mn=La(se,$t,Hn,As,wa),Xn=!1);else Mn=La(se,$t,Hn,As,wa);let wl=0,Sl=0;Mn===_i?Wa[lt]=_i:(Sl=Xn?1:0,wl=Nt>=Zi?Rr?1:0:ct(At,se,Nt,Zi,Rr?1:0,bt=>Re(bt,Rr)),Wa[lt]=Mn,Da[lt]=Sl,ei[lt]=wl),gi(Ct,se,$e,Le,an,Mn,wl,Sl)}if(je===0)return"";if(je===1)return vi[0]===0&&Ja[0]===be?se:se.slice(vi[0],Ja[0]);if(je*Z>ya){for(;je*Z>ya;)ya<<=1,Nr--;ni=new Float64Array(ya),Er=new Int32Array(ya)}if(de>=za||Fe>=za)throw new Error("cn: too many distinct classes in one merge");xa=xa+1|0,xa===0&&(xl.fill(0),Er.fill(0),xa=1);let ue=!1;for(let ze=je-1;ze>=0;ze--){const $e=Wa[ze];if($e===_i){aa[ze]=1;continue}const De=ei[ze];if(Tr(De,$e)===1){aa[ze]=0,ue=!0;continue}if(aa[ze]=1,$e<r){const Le=H[$e];if(Le>=0)for(let dt=M[Le];dt<M[Le+1];dt++)Tr(De,O[dt]);if(Da[ze]&1)for(let dt=0;dt<_.length;dt++)_[dt]===$e&&Tr(De,I[dt])}}if(!ue&&!et&&be===Ve+je-1)return se;let we="",He=0;for(;He<je;){if(!aa[He]){He++;continue}const ze=vi[He];let $e=Ja[He],De=He+1;for(;De<je&&aa[De]&&vi[De]===$e+1&&se.charCodeAt($e)===32;)$e=Ja[De],De++;we.length>0&&(we+=" "),we+=se.slice(ze,$e),He=De}return we},Yn=16384,Ft=new Int32Array(Yn*2);let jn=0,Qt=1,Vt=Object.create(null),xn=Object.create(null),nn=new Map,bl=new Map,Ar=0,xi=0;const Ia=()=>{jn^=Yn,Qt=Qt+1|0,xi=0},Qi=se=>{let be=Vt[se];if(be!==void 0)return be;const je=zd(se,0,se.length),Ve=(je&16383)+jn,et=Ft[Ve]===(je^Qt)||Ft[Ve^Yn]===(je^Qt-1);return et&&(be=xn[se],be!==void 0)?(Vt[se]=be,be):(be=Ba(se),et?(Vt[se]=be,++Ar>R&&(Ar=0,xn=Vt,Vt=Object.create(null),Ia())):(Ft[Ve]=je^Qt,++xi>Yn&&Ia()),be)},Mr=se=>{let be=nn.get(se);if(be!==void 0)return be;const je=zd(se,0,se.length),Ve=(je&16383)+jn,et=Ft[Ve]===(je^Qt)||Ft[Ve^Yn]===(je^Qt-1);return et&&(be=bl.get(se),be!==void 0)?(nn.set(se,be),be):(be=Ba(se),et?(nn.set(se,be),++Ar>R&&(Ar=0,bl=nn,nn=new Map,Ia())):(Ft[Ve]=je^Qt,++xi>Yn&&Ia()),be)},_r=se=>{const be=zd(se,0,se.length),je=(be&16383)+jn;return Ft[je]===(be^Qt)||Ft[je^Yn]===(be^Qt-1)?!0:(Ft[je]=be^Qt,++xi>Yn&&Ia(),!1)},ba=R===0?Ba:N9?se=>{const be=nn.get(se);return be!==void 0?be:Mr(se)}:Qi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ba(arguments[0]):ba(A9.apply(null,arguments))},mergeString:ba,seenBefore:R===0?()=>!1:_r,mergeUncached:Ba}},Fd=(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:Fd(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},T9=(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:Fd(s,a);u&&(i&&(i+=" "),i+=u)}return i},A9=function(){return T9(arguments,!1)},M9=256,ex=16,_9=1024,Qm=4096,R9=(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,p=[],y=[],g=0;const j=(T,A,C)=>{m===null&&(m=new Array(Qm).fill(""),p=new Array(Qm).fill(""),y=new Array(Qm).fill(""));const M=zd(T,0,T.length)&4094;if(m[M]===T&&p[M]===A)return y[M];if(m[M|1]===T&&p[M|1]===A)return y[M|1];const O=e(C?A+" "+T:T),_=m[M]===""?M:M|(m[M|1]===""?1:g++&1);return m[_]=T,p[_]=A,y[_]=O,O},b=(T,A,C,M)=>{let O=0;if(A){if(A!==T.a0)return!1;O=1}if(C){if(C!==(O===0?T.a0:T.a1))return!1;O++}if(M){if(M!==(O===0?T.a0:O===1?T.a1:T.a2))return!1;O++}return O===T.t},S=(T,A)=>{const C=T.a;let M=0;for(let O=0;O<A.length;O++){const _=A[O];if(_){if(_!==C[M])return!1;M++}}return M===T.t},k=(T,A)=>{const C=T.length,M=f===null?null:f.n;if(!A){if(M!==null&&S(M,T))return f=M,M.r;if(f!==null&&f!==M&&S(f,T))return f.r}let O="",_=-1,I=0,V=!1;for(let H=0;H<C;H++){let q=T[H];if(q){if(typeof q!="string"){if(q=T[H]=Fd(q,!0),!q)continue;V=!0}_<0&&(O=q,_=H),I++}}if(I===0)return"";if(I===1)return e(O);if(V){if(M!==null&&S(M,T))return f=M,M.r;if(f!==null&&f!==M&&S(f,T))return f.r}let X=s.get(O);X===void 0&&(X=u.get(O),X!==void 0&&s.set(O,X));let L=null;if(X!==void 0){if(X.skip>0){X.skip--,f=null;let q=O;for(let Z=_+1;Z<C;Z++){const $=T[Z];$&&(q+=" "+$)}return j(q,"",!1)}const H=X.e;e:for(let q=0;q<H.length;q++){const Z=H[q];if(Z.t!==I)continue;const $=Z.a;let F=1;for(let K=_+1;K<C;K++){const U=T[K];if(U&&U!==$[F++])continue e}L=Z;break}L!==null&&(X.miss=0)}if(L===null){let H=O;const q=[O];for(let $=_+1;$<C;$++){const F=T[$];F&&(H+=" "+F,q.push(F))}if(!i(H))return r(H);L={r:e(H),t:q.length,a0:q[0],a1:q[1],a2:q[2]??"",a:q,n:null},X===void 0?s.set(O,X={e:[],miss:0,skip:0,at:0}):++X.miss>ex&&(X.miss=ex,X.skip=_9,X.e.length=0,X.at=0);const Z=X.e;Z.length<M9?Z.push(L):(Z[X.at]=L,X.at=X.at+1&255),++d>1e3&&(d=0,u=s,s=new Map)}return f!==null&&f!==L&&(f.n=L),f=L,L.r},N=T=>Array.isArray(T)?k(T.slice(),!1):e(Fd(T,!0));return function(T,A,C){const M=arguments.length;if((M|1)===3){const I=f;if(I!==null){const V=I.n;if(V!==null&&b(V,T,A,C))return f=V,V.r;if(I!==V&&b(I,T,A,C))return I.r}if(M===2&&typeof A=="string"&&A!==""){const V=s.get(T);if(V!==void 0&&V.skip>0)return V.skip--,f=null,j(A,T,!0)}return k([T,A,C],!0)}if(M===1)return typeof T=="string"?e(T):N(T);const O=f;if(O!==null){const I=O.n;if(I!==null){const V=I.a;let X=0,L=!0;for(let H=0;H<M;H++){const q=arguments[H];if(q){if(q!==V[X]){L=!1;break}X++}}if(L&&X===I.t)return f=I,I.r}if(O!==I){const V=O.a;let X=0,L=!0;for(let H=0;H<M;H++){const q=arguments[H];if(q){if(q!==V[X]){L=!1;break}X++}}if(L&&X===O.t)return O.r}}const _=[];for(let I=0;I<M;I++)_.push(arguments[I]);return k(_,!0)}},tx=E9(C9),gn=R9(tx.mergeString,tx);var ho=bj(),O9=Object.defineProperty,I0=(e,a)=>O9(e,"name",{value:a,configurable:!0});function $p(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}I0($p,"setRef");function jw(...e){return a=>{let i=!1;const r=e.map(s=>{const u=$p(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():$p(e[s],null)}}}}I0(jw,"composeRefs");function Ot(...e){return w.useCallback(jw(...e),e)}I0(Ot,"useComposedRefs");var z9=Object.defineProperty,mi=(e,a)=>z9(e,"name",{value:a,configurable:!0});function Ui(e){const a=w.forwardRef((i,r)=>{let{children:s,...u}=i,d=null,f=!1;const m=[];Gp(s)&&typeof md=="function"&&(s=md(s._payload)),w.Children.forEach(s,j=>{var b;if(Cw(j)){f=!0;const S=j;let k="child"in S.props?S.props.child:S.props.children;Gp(k)&&typeof md=="function"&&(k=md(k._payload)),d=B9(S,k),m.push((b=d==null?void 0:d.props)==null?void 0:b.children)}else m.push(j)}),d?d=w.cloneElement(d,void 0,m):!f&&w.Children.count(s)===1&&w.isValidElement(s)&&(d=s);const p=d?kw(d):void 0,y=Ot(r,p);if(!d){if(s||s===0)throw new Error(f?H9(e):P9(e));return s}const g=Sw(u,d.props??{});return d.type!==w.Fragment&&(g.ref=r?y:p),w.cloneElement(d,g)});return a.displayName=`${e}.Slot`,a}mi(Ui,"createSlot");var D9=Ui("Slot"),ww=Symbol.for("radix.slottable");function L9(e){const a=mi(i=>"child"in i?i.children(i.child):i.children,"Slottable");return a.displayName=`${e}.Slottable`,a.__radixId=ww,a}mi(L9,"createSlottable");var B9=mi((e,a)=>{if("child"in e.props){const i=e.props.child;return w.isValidElement(i)?w.cloneElement(i,void 0,e.props.children(i.props.children)):null}return w.isValidElement(a)?a:null},"getSlottableElementFromSlottable");function Sw(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}}mi(Sw,"mergeProps");function kw(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)}mi(kw,"getElementRef");function Cw(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ww}mi(Cw,"isSlottable");var I9=Symbol.for("react.lazy");function Gp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===I9&&"_payload"in e&&Nw(e._payload)}mi(Gp,"isLazyComponent");function Nw(e){return typeof e=="object"&&e!==null&&"then"in e}mi(Nw,"isPromiseLike");var P9=mi(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),H9=mi(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),md=Lc[" use ".trim().toString()],q9=Object.defineProperty,U9=(e,a)=>q9(e,"name",{value:a,configurable:!0}),F9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kt=F9.reduce((e,a)=>{const i=Ui(`Primitive.${a}`),r=w.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 Ew(e,a){e&&ho.flushSync(()=>e.dispatchEvent(a))}U9(Ew,"dispatchDiscreteCustomEvent");var V9=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"}),$9=Object.defineProperty,Xa=(e,a)=>$9(e,"name",{value:a,configurable:!0});function G9(e,a){const i=w.createContext(a);i.displayName=e+"Context";const r=Xa(u=>{const{children:d,...f}=u,m=w.useMemo(()=>f,Object.values(f));return o.jsx(i.Provider,{value:m,children:d})},"Provider");r.displayName=e+"Provider";function s(u,d={}){const{optional:f=!1}=d,m=w.useContext(i);if(m)return m;if(a!==void 0)return a;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Xa(s,"useContext"),[r,s]}Xa(G9,"createContext");function hl(e,a=[]){let i=[];function r(u,d){const f=w.createContext(d);f.displayName=u+"Context";const m=i.length;i=[...i,d];const p=Xa(g=>{var T;const{scope:j,children:b,...S}=g,k=((T=j==null?void 0:j[e])==null?void 0:T[m])||f,N=w.useMemo(()=>S,Object.values(S));return o.jsx(k.Provider,{value:N,children:b})},"Provider");p.displayName=u+"Provider";function y(g,j,b={}){var T;const{optional:S=!1}=b,k=((T=j==null?void 0:j[e])==null?void 0:T[m])||f,N=w.useContext(k);if(N)return N;if(d!==void 0)return d;if(!S)throw new Error(`\`${g}\` must be used within \`${u}\``)}return Xa(y,"useContext"),[p,y]}Xa(r,"createContext");const s=Xa(()=>{const u=i.map(d=>w.createContext(d));return Xa(function(f){const m=(f==null?void 0:f[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return s.scopeName=e,[r,Tw(s,...a)]}Xa(hl,"createContextScope");function Tw(...e){const a=e[0];if(e.length===1)return a;const i=Xa(()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return Xa(function(u){const d=r.reduce((f,{useScope:m,scopeName:p})=>{const g=m(u)[`__scope${p}`];return{...f,...g}},{});return w.useMemo(()=>({[`__scope${a.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return i.scopeName=a.scopeName,i}Xa(Tw,"composeContextScopes");var Y9=Object.defineProperty,En=(e,a)=>Y9(e,"name",{value:a,configurable:!0});function Aw(e){const a=e+"CollectionProvider",[i,r]=hl(a),[s,u]=i(a,{collectionRef:{current:null},itemMap:new Map}),d=En(k=>{const{scope:N,children:T}=k,A=w.useRef(null),C=w.useRef(new Map).current;return o.jsx(s,{scope:N,itemMap:C,collectionRef:A,children:T})},"CollectionProvider");d.displayName=a;const f=e+"CollectionSlot",m=Ui(f),p=w.forwardRef((k,N)=>{const{scope:T,children:A}=k,C=u(f,T),M=Ot(N,C.collectionRef);return o.jsx(m,{ref:M,children:A})});p.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",j=Ui(y),b=w.forwardRef((k,N)=>{const{scope:T,children:A,...C}=k,M=w.useRef(null),O=Ot(N,M),_=u(y,T);return w.useEffect(()=>(_.itemMap.set(M,{ref:M,...C}),()=>void _.itemMap.delete(M))),o.jsx(j,{[g]:"",ref:O,children:A})});b.displayName=y;function S(k){const N=u(e+"CollectionConsumer",k);return w.useCallback(()=>{const A=N.collectionRef.current;if(!A)return[];const C=Array.from(A.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((_,I)=>C.indexOf(_.ref.current)-C.indexOf(I.ref.current))},[N.collectionRef,N.itemMap])}return En(S,"useCollection"),[{Provider:d,Slot:p,ItemSlot:b},S,r]}En(Aw,"createCollection");var nx=new WeakMap,mn,Ra,Zm=(Ra=class extends Map{constructor(i){super(i);Iy(this,mn);qm(this,mn,[...super.keys()]),nx.set(this,!0)}set(i,r){return nx.get(this)&&(this.has(i)?Un(this,mn)[Un(this,mn).indexOf(i)]=i:Un(this,mn).push(i)),super.set(i,r),this}insert(i,r,s){const u=this.has(r),d=Un(this,mn).length,f=P0(i);let m=f>=0?f:d+f;const p=m<0||m>=d?-1:m;if(p===this.size||u&&p===this.size-1||p===-1)return this.set(r,s),this;const y=this.size+(u?0:1);f<0&&m++;const g=[...Un(this,mn)];let j,b=!1;for(let S=m;S<y;S++)if(m===S){let k=g[S];g[S]===r&&(k=g[S+1]),u&&this.delete(r),j=this.get(k),this.set(r,s)}else{!b&&g[S-1]===r&&(b=!0);const k=g[b?S:S-1],N=j;j=this.get(k),this.delete(k),this.set(k,N)}return this}with(i,r,s){const u=new Ra(this);return u.insert(i,r,s),u}before(i){const r=Un(this,mn).indexOf(i)-1;if(!(r<0))return this.entryAt(r)}setBefore(i,r,s){const u=Un(this,mn).indexOf(i);return u===-1?this:this.insert(u,r,s)}after(i){let r=Un(this,mn).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=Un(this,mn).indexOf(i);return u===-1?this:this.insert(u+1,r,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return qm(this,mn,[]),super.clear()}delete(i){const r=super.delete(i);return r&&Un(this,mn).splice(Un(this,mn).indexOf(i),1),r}deleteAt(i){const r=this.keyAt(i);return r!==void 0?this.delete(r):!1}at(i){const r=Dd(Un(this,mn),i);if(r!==void 0)return this.get(r)}entryAt(i){const r=Dd(Un(this,mn),i);if(r!==void 0)return[r,this.get(r)]}indexOf(i){return Un(this,mn).indexOf(i)}keyAt(i){return Dd(Un(this,mn),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 Ra(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 Ra(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 Ra(r)}toReversed(){const i=new Ra;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 Ra(r)}slice(i,r){const s=new Ra;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}},mn=new WeakMap,En(Ra,"OrderedDict"),Ra);function Dd(e,a){if("at"in Array.prototype)return Array.prototype.at.call(e,a);const i=Mw(e,a);return i===-1?void 0:e[i]}En(Dd,"at");function Mw(e,a){const i=e.length,r=P0(a),s=r>=0?r:i+r;return s<0||s>=i?-1:s}En(Mw,"toSafeIndex");function P0(e){return e!==e||e===0?0:Math.trunc(e)}En(P0,"toSafeInteger");function K9(e){const a=e+"CollectionProvider",[i,r]=hl(a),[s,u]=i(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Zm,setItemMap:En(()=>{},"setItemMap")}),d=En(({state:C,...M})=>C?o.jsx(m,{...M,state:C}):o.jsx(f,{...M}),"CollectionProvider");d.displayName=a;const f=En(C=>{const M=N();return o.jsx(m,{...C,state:M})},"CollectionInit");f.displayName=a+"Init";const m=En(C=>{const{scope:M,children:O,state:_}=C,I=w.useRef(null),[V,X]=w.useState(null),L=Ot(I,X),[H,q]=_;return w.useEffect(()=>{if(!V)return;const Z=Ow(()=>{});return Z.observe(V,{childList:!0,subtree:!0}),()=>{Z.disconnect()}},[V]),o.jsx(s,{scope:M,itemMap:H,setItemMap:q,collectionRef:L,collectionRefObject:I,collectionElement:V,children:O})},"CollectionProviderImpl");m.displayName=a+"Impl";const p=e+"CollectionSlot",y=Ui(p),g=w.forwardRef((C,M)=>{const{scope:O,children:_}=C,I=u(p,O),V=Ot(M,I.collectionRef);return o.jsx(y,{ref:V,children:_})});g.displayName=p;const j=e+"CollectionItemSlot",b="data-radix-collection-item",S=Ui(j),k=w.forwardRef((C,M)=>{const{scope:O,children:_,...I}=C,V=w.useRef(null),[X,L]=w.useState(null),H=Ot(M,V,L),q=u(j,O),{setItemMap:Z}=q,$=w.useRef(I);_w($.current,I)||($.current=I);const F=$.current;return w.useEffect(()=>{const K=F;return Z(U=>X?U.has(X)?U.set(X,{...K,element:X}).toSorted(Yp):(U.set(X,{...K,element:X}),U.toSorted(Yp)):U),()=>{Z(U=>!X||!U.has(X)?U:(U.delete(X),new Zm(U)))}},[X,F,Z]),o.jsx(S,{[b]:"",ref:H,children:_})});k.displayName=j;function N(){return w.useState(new Zm)}En(N,"useInitCollection");function T(C){const{itemMap:M}=u(e+"CollectionConsumer",C);return M}return En(T,"useCollection"),[{Provider:d,Slot:g,ItemSlot:k},{createCollectionScope:r,useCollection:T,useInitCollection:N}]}En(K9,"createCollection");function _w(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}En(_w,"shallowEqual");function Rw(e,a){return!!(a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}En(Rw,"isElementPreceding");function Yp(e,a){return!e[1].element||!a[1].element?0:Rw(e[1].element,a[1].element)?-1:1}En(Yp,"sortByDocumentPosition");function Ow(e){return new MutationObserver(i=>{for(const r of i)if(r.type==="childList"){e();return}})}En(Ow,"getChildListObserver");var X9=Object.defineProperty,ys=(e,a)=>X9(e,"name",{value:a,configurable:!0}),zw=!!(typeof window<"u"&&window.document&&window.document.createElement);function kt(e,a,{checkForDefaultPrevented:i=!0}={}){return ys(function(s){if(e==null||e(s),i===!1||!s||!s.defaultPrevented)return a==null?void 0:a(s)},"handleEvent")}ys(kt,"composeEventHandlers");function Q9(e){var a;if(!zw)throw new Error("Cannot access window outside of the DOM");return((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??window}ys(Q9,"getOwnerWindow");function Kp(e){if(!zw)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}ys(Kp,"getOwnerDocument");function Dw(e,a=!1){const{activeElement:i}=Kp(e);if(!(i!=null&&i.nodeName))return null;if(Lw(i)&&i.contentDocument)return Dw(i.contentDocument.body,a);if(a){const r=i.getAttribute("aria-activedescendant");if(r){const s=Kp(i).getElementById(r);if(s)return s}}return i}ys(Dw,"getActiveElement");function Lw(e){return e.tagName==="IFRAME"}ys(Lw,"isFrame");var Pn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Z9=Object.defineProperty,J9=(e,a)=>Z9(e,"name",{value:a,configurable:!0}),ax=Lc[" useEffectEvent ".trim().toString()],ix=Lc[" useInsertionEffect ".trim().toString()];function Bw(e){if(typeof ax=="function")return ax(e);const a=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ix=="function"?ix(()=>{a.current=e}):Pn(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}J9(Bw,"useEffectEvent");var W9=Object.defineProperty,Pc=(e,a)=>W9(e,"name",{value:a,configurable:!0}),eN=Lc[" useInsertionEffect ".trim().toString()]||Pn;function Tc({prop:e,defaultProp:a,onChange:i=Pc(()=>{},"onChange"),caller:r}){const[s,u,d]=Iw({defaultProp:a,onChange:i}),f=e!==void 0,m=f?e:s,p=w.useCallback(y=>{var g;if(f){const j=Pw(y)?y(e):y;j!==e&&((g=d.current)==null||g.call(d,j))}else u(y)},[f,e,u,d]);return[m,p]}Pc(Tc,"useControllableState");function Iw({defaultProp:e,onChange:a}){const[i,r]=w.useState(e),s=w.useRef(i),u=w.useRef(a);return eN(()=>{u.current=a},[a]),w.useEffect(()=>{var d;s.current!==i&&((d=u.current)==null||d.call(u,i),s.current=i)},[i,s]),[i,r,u]}Pc(Iw,"useUncontrolledState");function Pw(e){return typeof e=="function"}Pc(Pw,"isFunction");var rx=Symbol("RADIX:SYNC_STATE");function tN(e,a,i,r){const{prop:s,defaultProp:u,onChange:d,caller:f}=a,m=s!==void 0,p=Bw(d),y=[{...i,state:u}];r&&y.push(r);const[g,j]=w.useReducer((N,T)=>{if(T.type===rx)return{...N,state:T.state};const A=e(N,T);return m&&!Object.is(A.state,N.state)&&p(A.state),A},...y),b=g.state,S=w.useRef(b);w.useEffect(()=>{S.current!==b&&(S.current=b,m||p(b))},[b,S,m]);const k=w.useMemo(()=>s!==void 0?{...g,state:s}:g,[g,s]);return w.useEffect(()=>{m&&!Object.is(s,g.state)&&j({type:rx,state:s})},[s,g.state,m]),[k,j]}Pc(tN,"useControllableStateReducer");var nN=Object.defineProperty,mr=(e,a)=>nN(e,"name",{value:a,configurable:!0});function Hw(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}mr(Hw,"useStateMachine");var Yi=mr(e=>{const{present:a,children:i}=e,r=qw(a),s=typeof i=="function"?i({present:r.isPresent}):w.Children.only(i),u=Uw(r.ref,Fw(s));return typeof i=="function"||r.isPresent?w.cloneElement(s,{ref:u}):null},"Presence");function qw(e){const[a,i]=w.useState(),r=w.useRef(null),s=w.useRef(e),u=w.useRef("none"),d=w.useRef(void 0),f=e?"mounted":"unmounted",[m,p]=Hw(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{m==="mounted"?(u.current=d.current??os(r.current),d.current=void 0):u.current="none"},[m]),Pn(()=>{const y=r.current,g=s.current;if(g!==e){const b=u.current,S=os(y);e?(d.current=S,p("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?p("UNMOUNT"):p(g&&b!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),Pn(()=>{if(a){let y;const g=a.ownerDocument.defaultView??window,j=mr(S=>{const N=os(r.current).includes(CSS.escape(S.animationName));if(S.target===a&&N&&(p("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"),b=mr(S=>{S.target===a&&(u.current=os(r.current))},"handleAnimationStart");return a.addEventListener("animationstart",b),a.addEventListener("animationcancel",j),a.addEventListener("animationend",j),()=>{g.clearTimeout(y),a.removeEventListener("animationstart",b),a.removeEventListener("animationcancel",j),a.removeEventListener("animationend",j)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{if(y){const g=getComputedStyle(y);r.current=g,d.current=os(g)}else r.current=null;i(y)},[])}}mr(qw,"usePresence");function Xp(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}mr(Xp,"setRef");function Uw(...e){const a=w.useRef(e);return a.current=e,w.useCallback(i=>{const r=a.current;let s=!1;const u=r.map(d=>{const f=Xp(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():Xp(r[d],null)}}},[])}mr(Uw,"useStableComposedRefs");function os(e){return(e==null?void 0:e.animationName)||"none"}mr(os,"getAnimationName");function Fw(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(Fw,"getElementRef");var aN=Object.defineProperty,iN=(e,a)=>aN(e,"name",{value:a,configurable:!0}),rN=Lc[" useId ".trim().toString()]||(()=>{}),lN=0;function to(e){const[a,i]=w.useState(rN());return Pn(()=>{e||i(r=>r??String(lN++))},[e]),e||(a?`radix-${a}`:"")}iN(to,"useId");var oN=Object.defineProperty,sN=(e,a)=>oN(e,"name",{value:a,configurable:!0}),cN=w.createContext(void 0);function H0(e){const a=w.useContext(cN);return e||a||"ltr"}sN(H0,"useDirection");var uN=Object.defineProperty,dN=(e,a)=>uN(e,"name",{value:a,configurable:!0});function In(e){const a=w.useRef(e);return w.useEffect(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}dN(In,"useCallbackRef");var fN=Object.defineProperty,Nn=(e,a)=>fN(e,"name",{value:a,configurable:!0}),Qp="dismissableLayer.update",hN="dismissableLayer.pointerDownOutside",mN="dismissableLayer.focusOutside",lx,Vw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),q0=w.forwardRef(Nn(function(a,i){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:p,...y}=a,g=w.useContext(Vw),[j,b]=w.useState(null),S=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=w.useState({}),N=Ot(i,b),T=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),C=A?T.indexOf(A):-1,M=j?T.indexOf(j):-1,O=g.layersWithOutsidePointerEventsDisabled.size>0,_=M>=C,I=w.useRef(!1),V=Gw(q=>{d==null||d(q),m==null||m(q),q.defaultPrevented||p==null||p()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:g.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(q=>{if(!(q instanceof Node))return!1;const Z=[...g.branches].some($=>$.contains(q));return _&&!Z},[g.branches,_])}),X=Yw(q=>{if(s&&I.current)return;const Z=q.target;[...g.branches].some(F=>F.contains(Z))||(f==null||f(q),m==null||m(q),q.defaultPrevented||p==null||p())},S),L=j?M===T.length-1:!1,H=In(q=>{q.key==="Escape"&&(u==null||u(q),!q.defaultPrevented&&p&&(q.preventDefault(),p()))});return w.useEffect(()=>{if(L)return S.addEventListener("keydown",H,{capture:!0}),()=>S.removeEventListener("keydown",H,{capture:!0})},[S,L,H]),w.useEffect(()=>{if(j)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(lx=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(j)),g.layers.add(j),Zp(),()=>{r&&(g.layersWithOutsidePointerEventsDisabled.delete(j),g.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=lx))}},[j,S,r,g]),w.useEffect(()=>()=>{j&&(g.layers.delete(j),g.layersWithOutsidePointerEventsDisabled.delete(j),Zp())},[j,g]),w.useEffect(()=>{const q=Nn(()=>k({}),"handleUpdate");return document.addEventListener(Qp,q),()=>document.removeEventListener(Qp,q)},[]),o.jsx(Kt.div,{...y,ref:N,style:{pointerEvents:O?_?"auto":"none":void 0,...a.style},onFocusCapture:kt(a.onFocusCapture,X.onFocusCapture),onBlurCapture:kt(a.onBlurCapture,X.onBlurCapture),onPointerDownCapture:kt(a.onPointerDownCapture,V.onPointerDownCapture)})},"DismissableLayer"));function $w(){const e=w.useContext(Vw),[a,i]=w.useState(null);return w.useEffect(()=>{if(a)return e.dismissableSurfaces.add(a),()=>{e.dismissableSurfaces.delete(a)}},[a,e.dismissableSurfaces]),i}Nn($w,"useDismissableLayerSurface");var pN=Nn(()=>!0,"IS_TRUE");function Gw(e,a){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=pN}=a,f=In(e),m=w.useRef(!1),p=w.useRef(!1),y=w.useRef(new Map),g=w.useRef(()=>{});return w.useEffect(()=>{function j(){p.current=!1,s.current=!1,y.current.clear()}Nn(j,"resetOutsideInteraction");function b(){return Array.from(y.current.values()).some(Boolean)}Nn(b,"isOutsideInteractionIntercepted");function S(C){if(!p.current)return;const M=C.target;M instanceof Node&&[...u].some(_=>_.contains(M))||y.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{p.current&&g.current()},0)}Nn(S,"handleInteractionCapture");function k(C){p.current&&y.current.set(C.type,!1)}Nn(k,"handleInteractionBubble");const N=Nn(C=>{if(C.target&&!m.current){let M=function(){i.removeEventListener("click",g.current);const _=b();j(),_||U0(hN,f,O,{discrete:!0})};if(Nn(M,"handleAndDispatchPointerDownOutsideEvent"),!d(C.target)){i.removeEventListener("click",g.current),j(),m.current=!1;return}const O={originalEvent:C};p.current=!0,s.current=r&&C.button===0,y.current.clear(),!r||C.button!==0?M():(i.removeEventListener("click",g.current),g.current=M,i.addEventListener("click",g.current,{once:!0}))}else i.removeEventListener("click",g.current),j();m.current=!1},"handlePointerDown"),T=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const C of T)i.addEventListener(C,S,!0),i.addEventListener(C,k);const A=window.setTimeout(()=>{i.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(A),i.removeEventListener("pointerdown",N),i.removeEventListener("click",g.current);for(const C of T)i.removeEventListener(C,S,!0),i.removeEventListener(C,k)}},[i,f,r,s,u,d]),{onPointerDownCapture:Nn(()=>m.current=!0,"onPointerDownCapture")}}Nn(Gw,"usePointerDownOutside");function Yw(e,a=globalThis==null?void 0:globalThis.document){const i=In(e),r=w.useRef(!1);return w.useEffect(()=>{const s=Nn(u=>{u.target&&!r.current&&U0(mN,i,{originalEvent:u},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,i]),{onFocusCapture:Nn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Nn(()=>r.current=!1,"onBlurCapture")}}Nn(Yw,"useFocusOutside");function Zp(){const e=new CustomEvent(Qp);document.dispatchEvent(e)}Nn(Zp,"dispatchUpdate");function U0(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?Ew(s,u):s.dispatchEvent(u)}Nn(U0,"handleAndDispatchCustomEvent");var gN=Object.defineProperty,ta=(e,a)=>gN(e,"name",{value:a,configurable:!0}),Jm="focusScope.autoFocusOnMount",Wm="focusScope.autoFocusOnUnmount",ox={bubbles:!1,cancelable:!0},F0=w.forwardRef(ta(function(a,i){const{loop:r=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=a,[m,p]=w.useState(null),y=In(u),g=In(d),j=w.useRef(null),b=Ot(i,p),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let N=function(M){if(S.paused||!m)return;const O=M.target;m.contains(O)?j.current=O:dr(j.current,{select:!0})},T=function(M){if(S.paused||!m)return;const O=M.relatedTarget;O!==null&&(m.contains(O)||dr(j.current,{select:!0}))},A=function(M){if(document.activeElement===document.body)for(const _ of M)_.removedNodes.length>0&&dr(m)};ta(N,"handleFocusIn"),ta(T,"handleFocusOut"),ta(A,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",T);const C=new MutationObserver(A);return m&&C.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",T),C.disconnect()}}},[s,m,S.paused]),w.useEffect(()=>{if(m){sx.add(S);const N=document.activeElement;if(!m.contains(N)){const A=new CustomEvent(Jm,ox);m.addEventListener(Jm,y),m.dispatchEvent(A),A.defaultPrevented||(Kw(Ww(V0(m)),{select:!0}),document.activeElement===N&&dr(m))}return()=>{m.removeEventListener(Jm,y),setTimeout(()=>{const A=new CustomEvent(Wm,ox);m.addEventListener(Wm,g),m.dispatchEvent(A),A.defaultPrevented||dr(N??document.body,{select:!0}),m.removeEventListener(Wm,g),sx.remove(S)},0)}}},[m,y,g,S]);const k=w.useCallback(N=>{if(!r&&!s||S.paused)return;const T=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,A=document.activeElement;if(T&&A){const C=N.currentTarget,[M,O]=Xw(C);M&&O?!N.shiftKey&&A===O?(N.preventDefault(),r&&dr(M,{select:!0})):N.shiftKey&&A===M&&(N.preventDefault(),r&&dr(O,{select:!0})):A===C&&N.preventDefault()}},[r,s,S.paused]);return o.jsx(Kt.div,{tabIndex:-1,...f,ref:b,onKeyDown:k})},"FocusScope"));function Kw(e,{select:a=!1}={}){const i=document.activeElement;for(const r of e)if(dr(r,{select:a}),document.activeElement!==i)return}ta(Kw,"focusFirst");function Xw(e){const a=V0(e),i=Jp(a,e),r=Jp(a.reverse(),e);return[i,r]}ta(Xw,"getTabbableEdges");function V0(e){const a=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ta(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}ta(V0,"getTabbableCandidates");function Jp(e,a){const i=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(i?!r.checkVisibility({checkVisibilityCSS:!0}):Qw(r,{upTo:a})))return r}ta(Jp,"findVisible");function Qw(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}ta(Qw,"isHidden");function Zw(e){return e instanceof HTMLInputElement&&"select"in e}ta(Zw,"isSelectableInput");function dr(e,{select:a=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&Zw(e)&&a&&e.select()}}ta(dr,"focus");var sx=Jw();function Jw(){let e=[];return{add(a){const i=e[0];a!==i&&(i==null||i.pause()),e=Wp(e,a),e.unshift(a)},remove(a){var i;e=Wp(e,a),(i=e[0])==null||i.resume()}}}ta(Jw,"createFocusScopesStack");function Wp(e,a){const i=[...e],r=i.indexOf(a);return r!==-1&&i.splice(r,1),i}ta(Wp,"arrayRemove");function Ww(e){return e.filter(a=>a.tagName!=="A")}ta(Ww,"removeLinks");var vN=Object.defineProperty,yN=(e,a)=>vN(e,"name",{value:a,configurable:!0}),$0=w.forwardRef(yN(function(a,i){var m;const{container:r,...s}=a,[u,d]=w.useState(!1);Pn(()=>d(!0),[]);const f=r||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?ho.createPortal(o.jsx(Kt.div,{...s,ref:i}),f):null},"Portal")),xN=Object.defineProperty,G0=(e,a)=>xN(e,"name",{value:a,configurable:!0}),pd=0,Ri=null;function bN(e){return Hc(),e.children}G0(bN,"FocusGuards");function Hc(){w.useEffect(()=>{Ri||(Ri={start:e0(),end:e0()});const{start:e,end:a}=Ri;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),pd++,()=>{pd===1&&(Ri==null||Ri.start.remove(),Ri==null||Ri.end.remove(),Ri=null),pd=Math.max(0,pd-1)}},[])}G0(Hc,"useFocusGuards");function e0(){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}G0(e0,"createFocusGuard");var Di=function(){return Di=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},Di.apply(this,arguments)};function e3(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 jN(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 Ld="right-scroll-bar-position",Bd="width-before-scroll-bar",wN="with-scroll-bars-hidden",SN="--removed-body-scroll-bar-size";function ep(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}function kN(e,a){var i=w.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 CN=typeof window<"u"?w.useLayoutEffect:w.useEffect,cx=new WeakMap;function NN(e,a){var i=kN(null,function(r){return e.forEach(function(s){return ep(s,r)})});return CN(function(){var r=cx.get(i);if(r){var s=new Set(r),u=new Set(e),d=i.current;s.forEach(function(f){u.has(f)||ep(f,null)}),u.forEach(function(f){s.has(f)||ep(f,d)})}cx.set(i,e)},[e]),i}function EN(e){return e}function TN(e,a){a===void 0&&(a=EN);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)},p=function(){return Promise.resolve().then(m)};p(),i={push:function(y){d.push(y),p()},filter:function(y){return d=d.filter(y),i}}}};return s}function AN(e){e===void 0&&(e={});var a=TN(null);return a.options=Di({async:!0,ssr:!1},e),a}var t3=function(e){var a=e.sideCar,i=e3(e,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=a.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Di({},i))};t3.isSideCarExport=!0;function MN(e,a){return e.useMedium(a),t3}var n3=AN(),tp=function(){},lf=w.forwardRef(function(e,a){var i=w.useRef(null),r=w.useState({onScrollCapture:tp,onWheelCapture:tp,onTouchMoveCapture:tp}),s=r[0],u=r[1],d=e.forwardProps,f=e.children,m=e.className,p=e.removeScrollBar,y=e.enabled,g=e.shards,j=e.sideCar,b=e.noRelative,S=e.noIsolation,k=e.inert,N=e.allowPinchZoom,T=e.as,A=T===void 0?"div":T,C=e.gapMode,M=e3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=j,_=NN([i,a]),I=Di(Di({},M),s);return w.createElement(w.Fragment,null,y&&w.createElement(O,{sideCar:n3,removeScrollBar:p,shards:g,noRelative:b,noIsolation:S,inert:k,setCallbacks:u,allowPinchZoom:!!N,lockRef:i,gapMode:C}),d?w.cloneElement(w.Children.only(f),Di(Di({},I),{ref:_})):w.createElement(A,Di({},I,{className:m,ref:_}),f))});lf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lf.classNames={fullWidth:Bd,zeroRight:Ld};var _N=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=_N();return a&&e.setAttribute("nonce",a),e}function ON(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function zN(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var DN=function(){var e=0,a=null;return{add:function(i){e==0&&(a=RN())&&(ON(a,i),zN(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},LN=function(){var e=DN();return function(a,i){w.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&i])}},a3=function(){var e=LN(),a=function(i){var r=i.styles,s=i.dynamic;return e(r,s),null};return a},BN={left:0,top:0,right:0,gap:0},np=function(e){return parseInt(e||"",10)||0},IN=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[np(i),np(r),np(s)]},PN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return BN;var a=IN(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])}},HN=a3(),us="data-scroll-locked",qN=function(e,a,i,r){var s=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),`
|
|
530
|
+
.`.concat(wN,` {
|
|
531
|
+
overflow: hidden `).concat(r,`;
|
|
532
|
+
padding-right: `).concat(f,"px ").concat(r,`;
|
|
533
|
+
}
|
|
534
|
+
body[`).concat(us,`] {
|
|
535
|
+
overflow: hidden `).concat(r,`;
|
|
536
|
+
overscroll-behavior: contain;
|
|
537
|
+
`).concat([a&&"position: relative ".concat(r,";"),i==="margin"&&`
|
|
538
|
+
padding-left: `.concat(s,`px;
|
|
539
|
+
padding-top: `).concat(u,`px;
|
|
540
|
+
padding-right: `).concat(d,`px;
|
|
541
|
+
margin-left:0;
|
|
542
|
+
margin-top:0;
|
|
543
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
544
|
+
`),i==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.`).concat(Ld,` {
|
|
548
|
+
right: `).concat(f,"px ").concat(r,`;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.`).concat(Bd,` {
|
|
552
|
+
margin-right: `).concat(f,"px ").concat(r,`;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.`).concat(Ld," .").concat(Ld,` {
|
|
556
|
+
right: 0 `).concat(r,`;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.`).concat(Bd," .").concat(Bd,` {
|
|
560
|
+
margin-right: 0 `).concat(r,`;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
body[`).concat(us,`] {
|
|
564
|
+
`).concat(SN,": ").concat(f,`px;
|
|
565
|
+
}
|
|
566
|
+
`)},ux=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},UN=function(){w.useEffect(function(){return document.body.setAttribute(us,(ux()+1).toString()),function(){var e=ux()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},FN=function(e){var a=e.noRelative,i=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;UN();var u=w.useMemo(function(){return PN(s)},[s]);return w.createElement(HN,{styles:qN(u,!a,s,i?"":"!important")})},t0=!1;if(typeof window<"u")try{var gd=Object.defineProperty({},"passive",{get:function(){return t0=!0,!0}});window.addEventListener("test",gd,gd),window.removeEventListener("test",gd,gd)}catch{t0=!1}var ns=t0?{passive:!1}:!1,VN=function(e){return e.tagName==="TEXTAREA"},i3=function(e,a){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[a]!=="hidden"&&!(i.overflowY===i.overflowX&&!VN(e)&&i[a]==="visible")},$N=function(e){return i3(e,"overflowY")},GN=function(e){return i3(e,"overflowX")},dx=function(e,a){var i=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=r3(e,r);if(s){var u=l3(e,r),d=u[1],f=u[2];if(d>f)return!0}r=r.parentNode}while(r&&r!==i.body);return!1},YN=function(e){var a=e.scrollTop,i=e.scrollHeight,r=e.clientHeight;return[a,i,r]},KN=function(e){var a=e.scrollLeft,i=e.scrollWidth,r=e.clientWidth;return[a,i,r]},r3=function(e,a){return e==="v"?$N(a):GN(a)},l3=function(e,a){return e==="v"?YN(a):KN(a)},XN=function(e,a){return e==="h"&&a==="rtl"?-1:1},QN=function(e,a,i,r,s){var u=XN(e,window.getComputedStyle(a).direction),d=u*r,f=i.target,m=a.contains(f),p=!1,y=d>0,g=0,j=0;do{if(!f)break;var b=l3(e,f),S=b[0],k=b[1],N=b[2],T=k-N-u*S;(S||T)&&r3(e,f)&&(g+=T,j+=S);var A=f.parentNode;f=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!m&&f!==document.body||m&&(a.contains(f)||a===f));return(y&&Math.abs(g)<1||!y&&Math.abs(j)<1)&&(p=!0),p},vd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fx=function(e){return[e.deltaX,e.deltaY]},hx=function(e){return e&&"current"in e?e.current:e},ZN=function(e,a){return e[0]===a[0]&&e[1]===a[1]},JN=function(e){return`
|
|
567
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
568
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
569
|
+
`)},WN=0,as=[];function eE(e){var a=w.useRef([]),i=w.useRef([0,0]),r=w.useRef(),s=w.useState(WN++)[0],u=w.useState(a3)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var k=jN([e.lockRef.current],(e.shards||[]).map(hx),!0).filter(Boolean);return k.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(k,N){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var T=vd(k),A=i.current,C="deltaX"in k?k.deltaX:A[0]-T[0],M="deltaY"in k?k.deltaY:A[1]-T[1],O,_=k.target,I=Math.abs(C)>Math.abs(M)?"h":"v";if("touches"in k&&I==="h"&&_.type==="range")return!1;var V=window.getSelection(),X=V&&V.anchorNode,L=X?X===_||X.contains(_):!1;if(L)return!1;var H=dx(I,_);if(!H)return!0;if(H?O=I:(O=I==="v"?"h":"v",H=dx(I,_)),!H)return!1;if(!r.current&&"changedTouches"in k&&(C||M)&&(r.current=O),!O)return!0;var q=r.current||O;return QN(q,N,k,q==="h"?C:M)},[]),m=w.useCallback(function(k){var N=k;if(!(!as.length||as[as.length-1]!==u)){var T="deltaY"in N?fx(N):vd(N),A=a.current.filter(function(O){return O.name===N.type&&(O.target===N.target||N.target===O.shadowParent)&&ZN(O.delta,T)})[0];if(A&&A.should){N.cancelable&&N.preventDefault();return}if(!A){var C=(d.current.shards||[]).map(hx).filter(Boolean).filter(function(O){return O.contains(N.target)}),M=C.length>0?f(N,C[0]):!d.current.noIsolation;M&&N.cancelable&&N.preventDefault()}}},[]),p=w.useCallback(function(k,N,T,A){var C={name:k,delta:N,target:T,should:A,shadowParent:tE(T)};a.current.push(C),setTimeout(function(){a.current=a.current.filter(function(M){return M!==C})},1)},[]),y=w.useCallback(function(k){i.current=vd(k),r.current=void 0},[]),g=w.useCallback(function(k){p(k.type,fx(k),k.target,f(k,e.lockRef.current))},[]),j=w.useCallback(function(k){p(k.type,vd(k),k.target,f(k,e.lockRef.current))},[]);w.useEffect(function(){return as.push(u),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:j}),document.addEventListener("wheel",m,ns),document.addEventListener("touchmove",m,ns),document.addEventListener("touchstart",y,ns),function(){as=as.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,ns),document.removeEventListener("touchmove",m,ns),document.removeEventListener("touchstart",y,ns)}},[]);var b=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:JN(s)}):null,b?w.createElement(FN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tE(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const nE=MN(n3,eE);var of=w.forwardRef(function(e,a){return w.createElement(lf,Di({},e,{ref:a,sideCar:nE}))});of.classNames=lf.classNames;var aE=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},is=new WeakMap,yd=new WeakMap,xd={},ap=0,o3=function(e){return e&&(e.host||o3(e.parentNode))},iE=function(e,a){return a.map(function(i){if(e.contains(i))return i;var r=o3(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})},rE=function(e,a,i,r){var s=iE(a,Array.isArray(e)?e:[e]);xd[i]||(xd[i]=new WeakMap);var u=xd[i],d=[],f=new Set,m=new Set(s),p=function(g){!g||f.has(g)||(f.add(g),p(g.parentNode))};s.forEach(p);var y=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(j){if(f.has(j))y(j);else try{var b=j.getAttribute(r),S=b!==null&&b!=="false",k=(is.get(j)||0)+1,N=(u.get(j)||0)+1;is.set(j,k),u.set(j,N),d.push(j),k===1&&S&&yd.set(j,!0),N===1&&j.setAttribute(i,"true"),S||j.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",j,T)}})};return y(a),f.clear(),ap++,function(){d.forEach(function(g){var j=is.get(g)-1,b=u.get(g)-1;is.set(g,j),u.set(g,b),j||(yd.has(g)||g.removeAttribute(r),yd.delete(g)),b||g.removeAttribute(i)}),ap--,ap||(is=new WeakMap,is=new WeakMap,yd=new WeakMap,xd={})}},Y0=function(e,a,i){i===void 0&&(i="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=aE(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),rE(r,s,i,"aria-hidden")):function(){return null}},lE=Object.defineProperty,pi=(e,a)=>lE(e,"name",{value:a,configurable:!0}),K0="Dialog",[s3,bq]=hl(K0),[oE,jr]=s3(K0),sE=pi(e=>{const{__scopeDialog:a,children:i,open:r,defaultOpen:s,onOpenChange:u,modal:d=!0}=e,f=w.useRef(null),m=w.useRef(null),[p,y]=Tc({prop:r,defaultProp:s??!1,onChange:u,caller:K0}),[g,j]=w.useState(0),[b,S]=w.useState(0);return o.jsx(oE,{scope:a,triggerRef:f,contentRef:m,contentId:to(),titleId:to(),descriptionId:to(),titlePresent:g>0,descriptionPresent:b>0,setTitleCount:j,setDescriptionCount:S,open:p,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(k=>!k),[y]),modal:d,children:i})},"Dialog"),c3="DialogPortal",[cE,u3]=s3(c3,{forceMount:void 0}),uE=pi(e=>{const{__scopeDialog:a,forceMount:i,children:r,container:s}=e,u=jr(c3,a);return o.jsx(cE,{scope:a,forceMount:i,children:w.Children.map(r,d=>o.jsx(Yi,{present:i||u.open,children:o.jsx($0,{asChild:!0,container:s,children:d})}))})},"DialogPortal"),n0="DialogOverlay",dE=w.forwardRef(pi(function(a,i){const r=u3(n0,a.__scopeDialog),{forceMount:s=r.forceMount,...u}=a,d=jr(n0,a.__scopeDialog);return d.modal?o.jsx(Yi,{present:s||d.open,children:o.jsx(hE,{...u,ref:i})}):null},"DialogOverlay")),fE=Ui("DialogOverlay.RemoveScroll"),hE=w.forwardRef(pi(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(n0,r),d=$w(),f=Ot(i,d);return o.jsx(of,{as:fE,allowPinchZoom:!0,shards:[u.contentRef],children:o.jsx(Kt.div,{"data-state":X0(u.open),...s,ref:f,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),Ac="DialogContent",mE=w.forwardRef(pi(function(a,i){const r=u3(Ac,a.__scopeDialog),{forceMount:s=r.forceMount,...u}=a,d=jr(Ac,a.__scopeDialog);return o.jsx(Yi,{present:s||d.open,children:d.modal?o.jsx(pE,{...u,ref:i}):o.jsx(gE,{...u,ref:i})})},"DialogContent")),pE=w.forwardRef(pi(function(a,i){const r=jr(Ac,a.__scopeDialog),s=w.useRef(null),u=Ot(i,r.contentRef,s);return w.useEffect(()=>{const d=s.current;if(d)return Y0(d)},[]),o.jsx(d3,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:kt(a.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:kt(a.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:kt(a.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),gE=w.forwardRef(pi(function(a,i){const r=jr(Ac,a.__scopeDialog),s=w.useRef(!1),u=w.useRef(!1);return o.jsx(d3,{...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 p,y;(p=a.onInteractOutside)==null||p.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")),d3=w.forwardRef(pi(function(a,i){const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=a,m=jr(Ac,r);return Hc(),o.jsx(o.Fragment,{children:o.jsx(F0,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(q0,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":X0(m.open),...f,ref:i,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),vE="DialogTitle",yE=w.forwardRef(pi(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(vE,r),{setTitleCount:d}=u;return Pn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),o.jsx(Kt.h2,{id:u.titleId,...s,ref:i})},"DialogTitle")),xE="DialogClose",bE=w.forwardRef(pi(function(a,i){const{__scopeDialog:r,...s}=a,u=jr(xE,r);return o.jsx(Kt.button,{type:"button",...s,ref:i,onClick:kt(a.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function X0(e){return e?"open":"closed"}pi(X0,"getState");var jE=Object.defineProperty,wE=(e,a)=>jE(e,"name",{value:a,configurable:!0});function f3(e){const[a,i]=w.useState(void 0);return Pn(()=>{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,p=Array.isArray(m)?m[0]:m;d=p.inlineSize,f=p.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}wE(f3,"useSize");const SE=["top","right","bottom","left"],dl=Math.min,fr=Math.max,Vd=Math.round,bd=Math.floor,hr=e=>({x:e,y:e}),kE={left:"right",right:"left",bottom:"top",top:"bottom"};function h3(e,a,i){return fr(e,dl(a,i))}function pr(e,a){return typeof e=="function"?e(a):e}function fl(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Q0(e){return e==="x"?"y":"x"}function Z0(e){return e==="y"?"height":"width"}function Bi(e){const a=e[0];return a==="t"||a==="b"?"y":"x"}function J0(e){return Q0(Bi(e))}function CE(e,a,i){i===void 0&&(i=!1);const r=xs(e),s=J0(e),u=Z0(s);let d=s==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(d=$d(d)),[d,$d(d)]}function NE(e){const a=$d(e);return[a0(e),a,a0(a)]}function a0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mx=["left","right"],px=["right","left"],EE=["top","bottom"],TE=["bottom","top"];function AE(e,a,i){switch(e){case"top":case"bottom":return i?a?px:mx:a?mx:px;case"left":case"right":return a?EE:TE;default:return[]}}function ME(e,a,i,r){const s=xs(e);let u=AE(fl(e),i==="start",r);return s&&(u=u.map(d=>d+"-"+s),a&&(u=u.concat(u.map(a0)))),u}function $d(e){const a=fl(e);return kE[a]+e.slice(a.length)}function _E(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 m3(e){return typeof e!="number"?_E(e):{top:e,right:e,bottom:e,left:e}}function Gd(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 gx(e,a,i){let{reference:r,floating:s}=e;const u=Bi(a),d=J0(a),f=Z0(d),m=fl(a),p=u==="y",y=r.x+r.width/2-s.width/2,g=r.y+r.height/2-s.height/2,j=r[f]/2-s[f]/2;let b;switch(m){case"top":b={x:y,y:r.y-s.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-s.width,y:g};break;default:b={x:r.x,y:r.y}}const S=xs(a);return S&&(b[d]+=j*(S==="end"?1:-1)*(i&&p?-1:1)),b}async function RE(e,a){var i;a===void 0&&(a={});const{x:r,y:s,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:j=!1,padding:b=0}=pr(a,e),S=m3(b),N=f[j?g==="floating"?"reference":"floating":g],T=Gd(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(N)))==null||i?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:p,rootBoundary:y,strategy:m})),A=g==="floating"?{x:r,y:s,width:d.floating.width,height:d.floating.height}:d.reference,C=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),M=await(u.isElement==null?void 0:u.isElement(C))&&await(u.getScale==null?void 0:u.getScale(C))||{x:1,y:1},O=Gd(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:A,offsetParent:C,strategy:m}):A);return{top:(T.top-O.top+S.top)/M.y,bottom:(O.bottom-T.bottom+S.bottom)/M.y,left:(T.left-O.left+S.left)/M.x,right:(O.right-T.right+S.right)/M.x}}const OE=50,zE=async(e,a,i)=>{const{placement:r="bottom",strategy:s="absolute",middleware:u=[],platform:d}=i,f=d.detectOverflow?d:{...d,detectOverflow:RE},m=await(d.isRTL==null?void 0:d.isRTL(a));let p=await d.getElementRects({reference:e,floating:a,strategy:s}),{x:y,y:g}=gx(p,r,m),j=r,b=0;const S={};for(let k=0;k<u.length;k++){const N=u[k];if(!N)continue;const{name:T,fn:A}=N,{x:C,y:M,data:O,reset:_}=await A({x:y,y:g,initialPlacement:r,placement:j,strategy:s,middlewareData:S,rects:p,platform:f,elements:{reference:e,floating:a}});y=C??y,g=M??g,S[T]={...S[T],...O},_&&b<OE&&(b++,typeof _=="object"&&(_.placement&&(j=_.placement),_.rects&&(p=_.rects===!0?await d.getElementRects({reference:e,floating:a,strategy:s}):_.rects),{x:y,y:g}=gx(p,j,m)),k=-1)}return{x:y,y:g,placement:j,strategy:s,middlewareData:S}},DE=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:p,padding:y=0}=pr(e,a)||{};if(p==null)return{};const g=m3(y),j={x:i,y:r},b=J0(s),S=Z0(b),k=await d.getDimensions(p),N=b==="y",T=N?"top":"left",A=N?"bottom":"right",C=N?"clientHeight":"clientWidth",M=u.reference[S]+u.reference[b]-j[b]-u.floating[S],O=j[b]-u.reference[b],_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let I=_?_[C]:0;(!I||!await(d.isElement==null?void 0:d.isElement(_)))&&(I=f.floating[C]||u.floating[S]);const V=M/2-O/2,X=I/2-k[S]/2-1,L=dl(g[T],X),H=dl(g[A],X),q=I-k[S]-H,Z=I/2-k[S]/2+V,$=h3(L,Z,q),F=!m.arrow&&xs(s)!=null&&Z!==$&&u.reference[S]/2-(Z<L?L:H)-k[S]/2<0,K=F?Z<L?Z-L:Z-q:0;return{[b]:j[b]+K,data:{[b]:$,centerOffset:Z-$-K,...F&&{alignmentOffset:K}},reset:F}}}),LE=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:p}=a,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:j,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...N}=pr(e,a);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const T=fl(s),A=Bi(f),C=fl(f)===f,M=await(m.isRTL==null?void 0:m.isRTL(p.floating)),O=j||(C||!k?[$d(f)]:NE(f)),_=S!=="none";!j&&_&&O.push(...ME(f,k,S,M));const I=[f,...O],V=await m.detectOverflow(a,N),X=[];let L=((r=u.flip)==null?void 0:r.overflows)||[];if(y&&X.push(V[T]),g){const $=CE(s,d,M);X.push(V[$[0]],V[$[1]])}if(L=[...L,{placement:s,overflows:X}],!X.every($=>$<=0)){var H,q;const $=(((H=u.flip)==null?void 0:H.index)||0)+1,F=I[$];if(F&&(!(g==="alignment"?A!==Bi(F):!1)||L.every(P=>Bi(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:$,overflows:L},reset:{placement:F}};let K=(q=L.filter(U=>U.overflows[0]<=0).sort((U,P)=>U.overflows[1]-P.overflows[1])[0])==null?void 0:q.placement;if(!K)switch(b){case"bestFit":{var Z;const U=(Z=L.filter(P=>{if(_){const ie=Bi(P.placement);return ie===A||ie==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(ie=>ie>0).reduce((ie,z)=>ie+z,0)]).sort((P,ie)=>P[1]-ie[1])[0])==null?void 0:Z[0];U&&(K=U);break}case"initialPlacement":K=f;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function vx(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function yx(e){return SE.some(a=>e[a]>=0)}const BE=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=vx(d,i.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:yx(f)}}}case"escaped":{const d=await r.detectOverflow(a,{...u,altBoundary:!0}),f=vx(d,i.floating);return{data:{escapedOffsets:f,escaped:yx(f)}}}default:return{}}}}},p3=new Set(["left","top"]);async function IE(e,a){const{placement:i,platform:r,elements:s}=e,u=await(r.isRTL==null?void 0:r.isRTL(s.floating)),d=fl(i),f=xs(i),m=Bi(i)==="y",p=p3.has(d)?-1:1,y=u&&m?-1:1,g=pr(a,e);let{mainAxis:j,crossAxis:b,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof S=="number"&&(b=f==="end"?S*-1:S),m?{x:b*y,y:j*p}:{x:j*p,y:b*y}}const PE=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 IE(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}}}}},HE=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:A=>{let{x:C,y:M}=A;return{x:C,y:M}}},...p}=pr(e,a),y={x:i,y:r},g=await u.detectOverflow(a,p),j=Bi(s),b=Q0(j);let S=y[b],k=y[j];const N=(A,C)=>h3(C+g[A==="y"?"top":"left"],C,C-g[A==="y"?"bottom":"right"]);d&&(S=N(b,S)),f&&(k=N(j,k));const T=m.fn({...a,[b]:S,[j]:k});return{...T,data:{x:T.x-i,y:T.y-r,enabled:{[b]:d,[j]:f}}}}}},qE=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:p=0,mainAxis:y=!0,crossAxis:g=!0}=pr(e,a),j={x:s,y:u},b=Bi(d),S=Q0(b);let k=j[S],N=j[b];const T=pr(p,a),A=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(i=T.mainAxis)!=null?i:0,crossAxis:(r=T.crossAxis)!=null?r:0};if(y){const O=S==="y"?"height":"width",_=f.reference[S]-f.floating[O]+A.mainAxis,I=f.reference[S]+f.reference[O]-A.mainAxis;k<_?k=_:k>I&&(k=I)}if(g){var C,M;const O=S==="y"?"width":"height",_=p3.has(fl(d)),I=f.reference[b]-f.floating[O]+(_&&((C=m.offset)==null?void 0:C[b])||0)+(_?0:A.crossAxis),V=f.reference[b]+f.reference[O]+(_?0:((M=m.offset)==null?void 0:M[b])||0)-(_?A.crossAxis:0);N<I?N=I:N>V&&(N=V)}return{[S]:k,[b]:N}}}},UE=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),p=fl(i),y=xs(i),g=Bi(i)==="y",{width:j,height:b}=r.floating;let S,k;p==="top"||p==="bottom"?(S=p,k=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,S=y==="end"?"top":"bottom");const N=b-m.top-m.bottom,T=j-m.left-m.right,A=dl(b-m[S],N),C=dl(j-m[k],T),M=a.middlewareData.shift,O=!M;let _=A,I=C;M!=null&&M.enabled.x&&(I=T),M!=null&&M.enabled.y&&(_=N),O&&!y&&(g?I=j-2*fr(m.left,m.right):_=b-2*fr(m.top,m.bottom)),await d({...a,availableWidth:I,availableHeight:_});const V=await s.getDimensions(u.floating);return j!==V.width||b!==V.height?{reset:{rects:!0}}:{}}}};function sf(){return typeof window<"u"}function bs(e){return g3(e)?(e.nodeName||"").toLowerCase():"#document"}function ha(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function wr(e){var a;return(a=(g3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function g3(e){return sf()?e instanceof Node||e instanceof ha(e).Node:!1}function Fi(e){return sf()?e instanceof Element||e instanceof ha(e).Element:!1}function ml(e){return sf()?e instanceof HTMLElement||e instanceof ha(e).HTMLElement:!1}function xx(e){return!sf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ha(e).ShadowRoot}function cf(e){const{overflow:a,overflowX:i,overflowY:r,display:s}=Vi(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&s!=="inline"&&s!=="contents"}function FE(e){return/^(table|td|th)$/.test(bs(e))}function uf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const VE=/transform|translate|scale|rotate|perspective|filter/,$E=/paint|layout|strict|content/,Kl=e=>!!e&&e!=="none";let ip;function W0(e){const a=Fi(e)?Vi(e):e;return Kl(a.transform)||Kl(a.translate)||Kl(a.scale)||Kl(a.rotate)||Kl(a.perspective)||!eg()&&(Kl(a.backdropFilter)||Kl(a.filter))||VE.test(a.willChange||"")||$E.test(a.contain||"")}function GE(e){let a=lo(e);for(;ml(a)&&!Mc(a);){if(W0(a))return a;if(uf(a))return null;a=lo(a)}return null}function eg(){return ip==null&&(ip=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ip}function Mc(e){return/^(html|body|#document)$/.test(bs(e))}function Vi(e){return ha(e).getComputedStyle(e)}function df(e){return Fi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lo(e){if(bs(e)==="html")return e;const a=e.assignedSlot||e.parentNode||xx(e)&&e.host||wr(e);return xx(a)?a.host:a}function v3(e){const a=lo(e);return Mc(a)?(e.ownerDocument||e).body:ml(a)&&cf(a)?a:v3(a)}function _c(e,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const s=v3(e),u=s===((r=e.ownerDocument)==null?void 0:r.body),d=ha(s);if(u){const f=i0(d);return a.concat(d,d.visualViewport||[],cf(s)?s:[],f&&i?_c(f):[])}else return a.concat(s,_c(s,[],i))}function i0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y3(e){const a=Vi(e);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const s=ml(e),u=s?e.offsetWidth:i,d=s?e.offsetHeight:r,f=Vd(i)!==u||Vd(r)!==d;return f&&(i=u,r=d),{width:i,height:r,$:f}}function tg(e){return Fi(e)?e:e.contextElement}function ds(e){const a=tg(e);if(!ml(a))return hr(1);const i=a.getBoundingClientRect(),{width:r,height:s,$:u}=y3(a);let d=(u?Vd(i.width):i.width)/r,f=(u?Vd(i.height):i.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const YE=hr(0);function x3(e){const a=ha(e);return!eg()||!a.visualViewport?YE:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function KE(e,a,i){return a===void 0&&(a=!1),!!i&&a&&i===ha(e)}function oo(e,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const s=e.getBoundingClientRect(),u=tg(e);let d=hr(1);a&&(r?Fi(r)&&(d=ds(r)):d=ds(e));const f=KE(u,i,r)?x3(u):hr(0);let m=(s.left+f.x)/d.x,p=(s.top+f.y)/d.y,y=s.width/d.x,g=s.height/d.y;if(u&&r){const j=ha(u),b=Fi(r)?ha(r):r;let S=j,k=i0(S);for(;k&&b!==S;){const N=ds(k),T=k.getBoundingClientRect(),A=Vi(k),C=T.left+(k.clientLeft+parseFloat(A.paddingLeft))*N.x,M=T.top+(k.clientTop+parseFloat(A.paddingTop))*N.y;m*=N.x,p*=N.y,y*=N.x,g*=N.y,m+=C,p+=M,S=ha(k),k=i0(S)}}return Gd({width:y,height:g,x:m,y:p})}function ff(e,a){const i=df(e).scrollLeft;return a?a.left+i:oo(wr(e)).left+i}function b3(e,a){const i=e.getBoundingClientRect(),r=i.left+a.scrollLeft-ff(e,i),s=i.top+a.scrollTop;return{x:r,y:s}}function XE(e){let{elements:a,rect:i,offsetParent:r,strategy:s}=e;const u=s==="fixed",d=wr(r),f=a?uf(a.floating):!1;if(r===d||f&&u)return i;let m={scrollLeft:0,scrollTop:0},p=hr(1);const y=hr(0),g=ml(r);if((g||!u)&&((bs(r)!=="body"||cf(d))&&(m=df(r)),g)){const b=oo(r);p=ds(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const j=d&&!g&&!u?b3(d,m):hr(0);return{width:i.width*p.x,height:i.height*p.y,x:i.x*p.x-m.scrollLeft*p.x+y.x+j.x,y:i.y*p.y-m.scrollTop*p.y+y.y+j.y}}function QE(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ZE(e){const a=df(e),i=e.ownerDocument.body,r=fr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=fr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-a.scrollLeft+ff(e);const d=-a.scrollTop;return Vi(i).direction==="rtl"&&(u+=fr(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:u,y:d}}const JE=25;function WE(e,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",s=ha(e),u=wr(e),d=s.visualViewport;let f=u.clientWidth,m=u.clientHeight,p=0,y=0;if(d){const j=!eg()||a==="fixed";r?j||(p=-d.offsetLeft,y=-d.offsetTop):(f=d.width,m=d.height,j&&(p=d.offsetLeft,y=d.offsetTop))}if(ff(u)<=0){const j=u.ownerDocument,b=j.body,S=getComputedStyle(b),k=j.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,N=Math.abs(u.clientWidth-b.clientWidth-k),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?N/2:N;T<=JE&&(f-=T)}return{width:f,height:m,x:p,y}}function eT(e,a){const i=oo(e,!0,a==="fixed"),r=i.top+e.clientTop,s=i.left+e.clientLeft,u=ds(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=s*u.x,p=r*u.y;return{width:d,height:f,x:m,y:p}}function bx(e,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=WE(e,i,a);else if(a==="document")r=ZE(wr(e));else if(Fi(a))r=eT(a,i);else{const s=x3(e);r={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Gd(r)}function tT(e,a){const i=a.get(e);if(i)return i;let r=_c(e,[],!1).filter(f=>Fi(f)&&bs(f)!=="body"),s=null;const u=Vi(e).position==="fixed";let d=u?lo(e):e;for(;Fi(d)&&!Mc(d);){const f=Vi(d),m=W0(d),p=s?s.position:u?"fixed":"";!m&&(p==="fixed"||p==="absolute"&&f.position==="static")?r=r.filter(g=>g!==d):s=f,d=lo(d)}return a.set(e,r),r}function nT(e){let{element:a,boundary:i,rootBoundary:r,strategy:s}=e;const d=[...i==="clippingAncestors"?uf(a)?[]:tT(a,this._c):[].concat(i),r],f=bx(a,d[0],s);let m=f.top,p=f.right,y=f.bottom,g=f.left;for(let j=1;j<d.length;j++){const b=bx(a,d[j],s);m=fr(b.top,m),p=dl(b.right,p),y=dl(b.bottom,y),g=fr(b.left,g)}return{width:p-g,height:y-m,x:g,y:m}}function aT(e){const{width:a,height:i}=y3(e);return{width:a,height:i}}function iT(e,a,i){const r=ml(a),s=wr(a),u=i==="fixed",d=oo(e,!0,u,a);let f={scrollLeft:0,scrollTop:0};const m=hr(0);if((r||!u)&&((bs(a)!=="body"||cf(s))&&(f=df(a)),r)){const j=oo(a,!0,u,a);m.x=j.x+a.clientLeft,m.y=j.y+a.clientTop}!r&&s&&(m.x=ff(s));const p=s&&!r&&!u?b3(s,f):hr(0),y=d.left+f.scrollLeft-m.x-p.x,g=d.top+f.scrollTop-m.y-p.y;return{x:y,y:g,width:d.width,height:d.height}}function rp(e){return Vi(e).position==="static"}function jx(e,a){if(!ml(e)||Vi(e).position==="fixed")return null;if(a)return a(e);let i=e.offsetParent;return wr(e)===i&&(i=i.ownerDocument.body),i}function j3(e,a){const i=ha(e);if(uf(e))return i;if(!ml(e)){let s=lo(e);for(;s&&!Mc(s);){if(Fi(s)&&!rp(s))return s;s=lo(s)}return i}let r=jx(e,a);for(;r&&FE(r)&&rp(r);)r=jx(r,a);return r&&Mc(r)&&rp(r)&&!W0(r)?i:r||GE(e)||i}const rT=async function(e){const a=this.getOffsetParent||j3,i=this.getDimensions,r=await i(e.floating);return{reference:iT(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lT(e){return Vi(e).direction==="rtl"}const oT={convertOffsetParentRelativeRectToViewportRelativeRect:XE,getDocumentElement:wr,getClippingRect:nT,getOffsetParent:j3,getElementRects:rT,getClientRects:QE,getDimensions:aT,getScale:ds,isElement:Fi,isRTL:lT};function w3(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function sT(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 j=e.getBoundingClientRect(),{left:b,top:S,width:k,height:N}=j;if(y||a(),!k||!N)return;const T=bd(S),A=bd(u.clientWidth-(b+k)),C=bd(u.clientHeight-(S+N)),M=bd(b),_={rootMargin:-T+"px "+-A+"px "+-C+"px "+-M+"px",threshold:fr(0,dl(1,g))||1};let I=!0;function V(X){const L=X[0].intersectionRatio;if(!w3(j,e.getBoundingClientRect()))return f();if(L!==g){if(!I)return f();L?f(!1,L):s=setTimeout(()=>{f(!1,1e-7)},1e3)}I=!1}try{r=new IntersectionObserver(V,{..._,root:u.ownerDocument})}catch{r=new IntersectionObserver(V,_)}r.observe(e)}const m=ha(e),p=()=>f(i);return m.addEventListener("resize",p),f(!0),()=>{m.removeEventListener("resize",p),d()}}function cT(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,p=tg(e),y=s||u?[...p?_c(p):[],...a?_c(a):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",i),u&&T.addEventListener("resize",i)});const g=p&&f?sT(p,i,u):null;let j=-1,b=null;d&&(b=new ResizeObserver(T=>{let[A]=T;A&&A.target===p&&b&&a&&(b.unobserve(a),cancelAnimationFrame(j),j=requestAnimationFrame(()=>{var C;(C=b)==null||C.observe(a)})),i()}),p&&!m&&b.observe(p),a&&b.observe(a));let S,k=m?oo(e):null;m&&N();function N(){const T=oo(e);k&&!w3(k,T)&&i(),k=T,S=requestAnimationFrame(N)}return i(),()=>{var T;y.forEach(A=>{s&&A.removeEventListener("scroll",i),u&&A.removeEventListener("resize",i)}),g==null||g(),(T=b)==null||T.disconnect(),b=null,m&&cancelAnimationFrame(S)}}const uT=PE,dT=HE,fT=LE,hT=UE,mT=BE,wx=DE,pT=qE,gT=(e,a,i)=>{const r=new Map,s=i??{},u={...oT,...s.platform,_c:r};return zE(e,a,{...s,platform:u})};var vT=typeof document<"u",yT=function(){},Id=vT?w.useLayoutEffect:yT;function Yd(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(!Yd(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)&&!Yd(e[u],a[u]))return!1}return!0}return e!==e&&a!==a}function S3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sx(e,a){const i=S3(e);return Math.round(a*i)/i}function lp(e){const a=w.useRef(e);return Id(()=>{a.current=e}),a}function xT(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:p}=e,[y,g]=w.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[j,b]=w.useState(r);Yd(j,r)||b(r);const[S,k]=w.useState(null),[N,T]=w.useState(null),A=w.useCallback(P=>{P!==_.current&&(_.current=P,k(P))},[]),C=w.useCallback(P=>{P!==I.current&&(I.current=P,T(P))},[]),M=u||S,O=d||N,_=w.useRef(null),I=w.useRef(null),V=w.useRef(y),X=m!=null,L=lp(m),H=lp(s),q=lp(p),Z=w.useCallback(()=>{if(!_.current||!I.current)return;const P={placement:a,strategy:i,middleware:j};H.current&&(P.platform=H.current),gT(_.current,I.current,P).then(ie=>{const z={...ie,isPositioned:q.current!==!1};$.current&&!Yd(V.current,z)&&(V.current=z,ho.flushSync(()=>{g(z)}))})},[j,a,i,H,q]);Id(()=>{p===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,g(P=>({...P,isPositioned:!1})))},[p]);const $=w.useRef(!1);Id(()=>($.current=!0,()=>{$.current=!1}),[]),Id(()=>{if(M&&(_.current=M),O&&(I.current=O),M&&O){if(L.current)return L.current(M,O,Z);Z()}},[M,O,Z,L,X]);const F=w.useMemo(()=>({reference:_,floating:I,setReference:A,setFloating:C}),[A,C]),K=w.useMemo(()=>({reference:M,floating:O}),[M,O]),U=w.useMemo(()=>{const P={position:i,left:0,top:0};if(!K.floating)return P;const ie=Sx(K.floating,y.x),z=Sx(K.floating,y.y);return f?{...P,transform:"translate("+ie+"px, "+z+"px)",...S3(K.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:ie,top:z}},[i,f,K.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:Z,refs:F,elements:K,floatingStyles:U}),[y,Z,F,K,U])}const bT=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?wx({element:r.current,padding:s}).fn(i):{}:r?wx({element:r,padding:s}).fn(i):{}}}},jT=(e,a)=>{const i=uT(e);return{name:i.name,fn:i.fn,options:[e,a]}},wT=(e,a)=>{const i=dT(e);return{name:i.name,fn:i.fn,options:[e,a]}},ST=(e,a)=>({fn:pT(e).fn,options:[e,a]}),kT=(e,a)=>{const i=fT(e);return{name:i.name,fn:i.fn,options:[e,a]}},CT=(e,a)=>{const i=hT(e);return{name:i.name,fn:i.fn,options:[e,a]}},NT=(e,a)=>{const i=mT(e);return{name:i.name,fn:i.fn,options:[e,a]}},ET=(e,a)=>{const i=bT(e);return{name:i.name,fn:i.fn,options:[e,a]}};var TT=Object.defineProperty,ol=(e,a)=>TT(e,"name",{value:a,configurable:!0}),k3="Popper",[C3,hf]=hl(k3),[AT,N3]=C3(k3),MT=ol(e=>{const{__scopePopper:a,children:i}=e,[r,s]=w.useState(null),[u,d]=w.useState(void 0);return o.jsx(AT,{scope:a,anchor:r,onAnchorChange:s,placementState:u,setPlacementState:d,children:i})},"Popper"),_T="PopperAnchor",RT=w.forwardRef(ol(function(a,i){const{__scopePopper:r,virtualRef:s,...u}=a,d=N3(_T,r),f=w.useRef(null),m=d.onAnchorChange,p=w.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=Ot(i,p),g=w.useRef(null);w.useEffect(()=>{if(!s)return;const k=g.current;g.current=s.current,k!==g.current&&m(g.current)});const j=d.placementState&&mf(d.placementState),b=j==null?void 0:j[0],S=j==null?void 0:j[1];return s?null:o.jsx(Kt.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...u,ref:y})},"PopperAnchor")),E3="PopperContent",[OT,jq]=C3(E3),zT=w.forwardRef(ol(function(a,i){var Ce,Ae,xe,oe,Ee,Xe,Be;const{__scopePopper:r,side:s="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:p=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:j="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:k,...N}=a,T=N3(E3,r),[A,C]=w.useState(null),M=Ot(i,C),[O,_]=w.useState(null),I=f3(O),V=(I==null?void 0:I.width)??0,X=(I==null?void 0:I.height)??0,L=s+(d!=="center"?"-"+d:""),H=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},q=Array.isArray(y)?y:[y],Z=q.length>0,$={padding:H,boundary:q.filter(T3),altBoundary:Z},{refs:F,floatingStyles:K,placement:U,isPositioned:P,middlewareData:ie}=xT({strategy:"fixed",placement:L,whileElementsMounted:ol((...at)=>cT(...at,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:T.anchor},middleware:[jT({mainAxis:u+X,alignmentAxis:f}),p&&wT({mainAxis:!0,crossAxis:!1,limiter:j==="partial"?ST():void 0,...$}),p&&kT({...$}),CT({...$,apply:ol(({elements:at,rects:Qe,availableWidth:We,availableHeight:Pt})=>{const{width:vn,height:en}=Qe.reference,cn=at.floating.style;cn.setProperty("--radix-popper-available-width",`${We}px`),cn.setProperty("--radix-popper-available-height",`${Pt}px`),cn.setProperty("--radix-popper-anchor-width",`${vn}px`),cn.setProperty("--radix-popper-anchor-height",`${en}px`)},"apply")}),O&&ET({element:O,padding:m}),DT({arrowWidth:V,arrowHeight:X}),b&&NT({strategy:"referenceHidden",...$,boundary:Z?$.boundary:void 0})]}),z=T.setPlacementState;Pn(()=>(z(U),()=>{z(void 0)}),[U,z]);const[ne,re]=mf(U),R=In(k);Pn(()=>{P&&(R==null||R())},[P,R]);const B=(Ce=ie.arrow)==null?void 0:Ce.x,W=(Ae=ie.arrow)==null?void 0:Ae.y,fe=((xe=ie.arrow)==null?void 0:xe.centerOffset)!==0,[me,pe]=w.useState();return Pn(()=>{A&&pe(window.getComputedStyle(A).zIndex)},[A]),o.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:P?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(oe=ie.transformOrigin)==null?void 0:oe.x,(Ee=ie.transformOrigin)==null?void 0:Ee.y].join(" "),...((Xe=ie.hide)==null?void 0:Xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:o.jsx(OT,{scope:r,placedSide:ne,placedAlign:re,onArrowChange:_,arrowX:B,arrowY:W,shouldHideArrow:fe,children:o.jsx(Kt.div,{"data-side":ne,"data-align":re,...N,ref:M,style:{...N.style,animation:P?(Be=N.style)==null?void 0:Be.animation:"none"}})})})},"PopperContent"));function T3(e){return e!==null}ol(T3,"isNotNull");var DT=ol(e=>({name:"transformOrigin",options:e,fn(a){var N,T,A;const{placement:i,rects:r,middlewareData:s}=a,d=((N=s.arrow)==null?void 0:N.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[p,y]=mf(i),g={start:"0%",center:"50%",end:"100%"}[y],j=(((T=s.arrow)==null?void 0:T.x)??0)+f/2,b=(((A=s.arrow)==null?void 0:A.y)??0)+m/2;let S="",k="";return p==="bottom"?(S=d?g:`${j}px`,k=`${-m}px`):p==="top"?(S=d?g:`${j}px`,k=`${r.floating.height+m}px`):p==="right"?(S=`${-m}px`,k=d?g:`${b}px`):p==="left"&&(S=`${r.floating.width+m}px`,k=d?g:`${b}px`),{data:{x:S,y:k}}}}),"transformOrigin");function mf(e){const[a,i="center"]=e.split("-");return[a,i]}ol(mf,"getSideAndAlignFromPlacement");var A3=MT,M3=RT,_3=zT,LT=Object.defineProperty,BT=(e,a)=>LT(e,"name",{value:a,configurable:!0}),IT=w.forwardRef(BT(function(a,i){return o.jsx(Kt.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")),PT=IT,HT=Object.defineProperty,qT=(e,a)=>HT(e,"name",{value:a,configurable:!0});function R3(e){const a=w.useRef({value:e,previous:e});return w.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}qT(R3,"usePrevious");var UT=Object.defineProperty,FT=(e,a)=>UT(e,"name",{value:a,configurable:!0});function Kd(e,[a,i]){return Math.min(i,Math.max(a,e))}FT(Kd,"clamp");var VT=Object.defineProperty,pl=(e,a)=>VT(e,"name",{value:a,configurable:!0}),ng="Popover",[O3,wq]=hl(ng,[hf]),ag=hf(),[$T,js]=O3(ng),GT=pl(e=>{const{__scopePopover:a,children:i,open:r,defaultOpen:s,onOpenChange:u,modal:d=!1}=e,f=ag(a),m=w.useRef(null),[p,y]=w.useState(!1),[g,j]=Tc({prop:r,defaultProp:s??!1,onChange:u,caller:ng});return o.jsx(A3,{...f,children:o.jsx($T,{scope:a,contentId:to(),triggerRef:m,open:g,onOpenChange:j,onOpenToggle:w.useCallback(()=>j(b=>!b),[j]),hasCustomAnchor:p,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:d,children:i})})},"Popover"),YT="PopoverTrigger",KT=w.forwardRef(pl(function(a,i){const{__scopePopover:r,...s}=a,u=js(YT,r),d=ag(r),f=Ot(i,u.triggerRef),m=o.jsx(Kt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":ig(u.open),...s,ref:f,onClick:kt(a.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:o.jsx(M3,{asChild:!0,...d,children:m})},"PopoverTrigger")),z3="PopoverPortal",[XT,QT]=O3(z3,{forceMount:void 0}),ZT=pl(e=>{const{__scopePopover:a,forceMount:i,children:r,container:s}=e,u=js(z3,a);return o.jsx(XT,{scope:a,forceMount:i,children:o.jsx(Yi,{present:i||u.open,children:o.jsx($0,{asChild:!0,container:s,children:r})})})},"PopoverPortal"),Rc="PopoverContent",JT=w.forwardRef(pl(function(a,i){const r=QT(Rc,a.__scopePopover),{forceMount:s=r.forceMount,...u}=a,d=js(Rc,a.__scopePopover);return o.jsx(Yi,{present:s||d.open,children:d.modal?o.jsx(eA,{...u,ref:i}):o.jsx(tA,{...u,ref:i})})},"PopoverContent")),WT=Ui("PopoverContent.RemoveScroll"),eA=w.forwardRef(pl(function(a,i){const r=js(Rc,a.__scopePopover),s=w.useRef(null),u=Ot(i,s),d=w.useRef(!1);return w.useEffect(()=>{const f=s.current;if(f)return Y0(f)},[]),o.jsx(of,{as:WT,allowPinchZoom:!0,children:o.jsx(D3,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kt(a.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:kt(a.onPointerDownOutside,f=>{const m=f.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0,y=m.button===2||p;d.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:kt(a.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),tA=w.forwardRef(pl(function(a,i){const r=js(Rc,a.__scopePopover),s=w.useRef(!1),u=w.useRef(!1);return o.jsx(D3,{...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 p,y;(p=a.onInteractOutside)==null||p.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")),D3=w.forwardRef(pl(function(a,i){const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:p,onFocusOutside:y,onInteractOutside:g,...j}=a,b=js(Rc,r),S=ag(r);return Hc(),o.jsx(F0,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(q0,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:m,onPointerDownOutside:p,onFocusOutside:y,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(_3,{"data-state":ig(b.open),role:"dialog",id:b.contentId,...S,...j,ref:i,style:{...j.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 ig(e){return e?"open":"closed"}pl(ig,"getState");var L3=GT,B3=KT,I3=ZT,P3=JT,nA=Object.defineProperty,pt=(e,a)=>nA(e,"name",{value:a,configurable:!0});function H3(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}pt(H3,"useStateMachine");var q3="ScrollArea",[U3,Sq]=hl(q3),[aA,Qa]=U3(q3),iA=w.forwardRef(pt(function(a,i){const{__scopeScrollArea:r,type:s="hover",dir:u,scrollHideDelay:d=600,...f}=a,[m,p]=w.useState(null),[y,g]=w.useState(null),[j,b]=w.useState(null),[S,k]=w.useState(null),[N,T]=w.useState(null),[A,C]=w.useState(0),[M,O]=w.useState(0),[_,I]=w.useState(!1),[V,X]=w.useState(!1),L=Ot(i,p),H=H0(u);return o.jsx(aA,{scope:r,type:s,dir:H,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:g,content:j,onContentChange:b,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:_,onScrollbarXEnabledChange:I,scrollbarY:N,onScrollbarYChange:T,scrollbarYEnabled:V,onScrollbarYEnabledChange:X,onCornerWidthChange:C,onCornerHeightChange:O,children:o.jsx(Kt.div,{dir:H,...f,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":M+"px",...a.style}})})},"ScrollArea")),rA="ScrollAreaViewport",lA=w.forwardRef(pt(function(a,i){const{__scopeScrollArea:r,children:s,nonce:u,...d}=a,f=Qa(rA,r),m=w.useRef(null),p=Ot(i,m,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(oA,{nonce:u}),o.jsx(Kt.div,{"data-radix-scroll-area-viewport":"",...d,ref:p,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")),oA=w.memo(pt(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",sA=w.forwardRef(pt(function(a,i){const{forceMount:r,...s}=a,u=Qa(Sr,a.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=a.orientation==="horizontal";return w.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?o.jsx(cA,{...s,ref:i,forceMount:r}):u.type==="scroll"?o.jsx(uA,{...s,ref:i,forceMount:r}):u.type==="auto"?o.jsx(F3,{...s,ref:i,forceMount:r}):u.type==="always"?o.jsx(rg,{...s,ref:i,"data-state":"visible"}):null},"ScrollAreaScrollbar")),cA=w.forwardRef(pt(function(a,i){const{forceMount:r,...s}=a,u=Qa(Sr,a.__scopeScrollArea),[d,f]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let p=0;if(m){const y=pt(()=>{window.clearTimeout(p),f(!0)},"handlePointerEnter"),g=pt(()=>{p=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",g),()=>{window.clearTimeout(p),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),o.jsx(Yi,{present:r||d,children:o.jsx(F3,{"data-state":d?"visible":"hidden",...s,ref:i})})},"ScrollAreaScrollbarHover")),uA=w.forwardRef(pt(function(a,i){const{forceMount:r,...s}=a,u=Qa(Sr,a.__scopeScrollArea),d=a.orientation==="horizontal",f=Uc(()=>p("SCROLL_END"),100),[m,p]=H3("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>p("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,p]),w.useEffect(()=>{const y=u.viewport,g=d?"scrollLeft":"scrollTop";if(y){let j=y[g];const b=pt(()=>{const S=y[g];j!==S&&(p("SCROLL"),f()),j=S},"handleScroll");return y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[u.viewport,d,p,f]),o.jsx(Yi,{present:r||m!=="hidden",children:o.jsx(rg,{"data-state":m==="hidden"?"hidden":"visible",...s,ref:i,onPointerEnter:kt(a.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:kt(a.onPointerLeave,()=>p("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),F3=w.forwardRef(pt(function(a,i){const r=Qa(Sr,a.__scopeScrollArea),{forceMount:s,...u}=a,[d,f]=w.useState(!1),m=a.orientation==="horizontal",p=Uc(()=>{if(r.viewport){const y=r.viewport.offsetWidth<r.viewport.scrollWidth,g=r.viewport.offsetHeight<r.viewport.scrollHeight;f(m?y:g)}},10);return so(r.viewport,p),so(r.content,p),o.jsx(Yi,{present:s||d,children:o.jsx(rg,{"data-state":d?"visible":"hidden",...u,ref:i})})},"ScrollAreaScrollbarAuto")),rg=w.forwardRef(pt(function(a,i){const{orientation:r="vertical",...s}=a,u=Qa(Sr,a.__scopeScrollArea),d=w.useRef(null),f=w.useRef(0),[m,p]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=lg(m.viewport,m.content),g={...s,sizes:m,onSizesChange:p,hasThumb:y>0&&y<1,onThumbChange:pt(b=>d.current=b,"onThumbChange"),onThumbPointerUp:pt(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:pt(b=>f.current=b,"onThumbPointerDown")};function j(b,S){return Y3(b,f.current,m,S)}return pt(j,"getScrollPosition"),r==="horizontal"?o.jsx(dA,{...g,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const b=u.viewport.scrollLeft,S=l0(b,m,u.dir);d.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:b=>{u.viewport&&(u.viewport.scrollLeft=b)},onDragScroll:b=>{u.viewport&&(u.viewport.scrollLeft=j(b,u.dir))}}):r==="vertical"?o.jsx(fA,{...g,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const b=u.viewport.scrollTop,S=l0(b,m);d.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:b=>{u.viewport&&(u.viewport.scrollTop=b)},onDragScroll:b=>{u.viewport&&(u.viewport.scrollTop=j(b))}}):null},"ScrollAreaScrollbarVisible")),dA=w.forwardRef(pt(function(a,i){const{sizes:r,onSizesChange:s,...u}=a,d=Qa(Sr,a.__scopeScrollArea),[f,m]=w.useState(),p=w.useRef(null),y=Ot(i,p,d.onScrollbarXChange);return w.useEffect(()=>{p.current&&m(getComputedStyle(p.current))},[p]),o.jsx($3,{"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":qc(r)+"px",...a.style},onThumbPointerDown:g=>a.onThumbPointerDown(g.x),onDragScroll:g=>a.onDragScroll(g.x),onWheelScroll:(g,j)=>{if(d.viewport){const b=d.viewport.scrollLeft+g.deltaX;a.onWheelScroll(b),sg(b,j)&&g.preventDefault()}},onResize:()=>{p.current&&d.viewport&&f&&s({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Oc(f.paddingLeft),paddingEnd:Oc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),fA=w.forwardRef(pt(function(a,i){const{sizes:r,onSizesChange:s,...u}=a,d=Qa(Sr,a.__scopeScrollArea),[f,m]=w.useState(),p=w.useRef(null),y=Ot(i,p,d.onScrollbarYChange);return w.useEffect(()=>{p.current&&m(getComputedStyle(p.current))},[p]),o.jsx($3,{"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":qc(r)+"px",...a.style},onThumbPointerDown:g=>a.onThumbPointerDown(g.y),onDragScroll:g=>a.onDragScroll(g.y),onWheelScroll:(g,j)=>{if(d.viewport){const b=d.viewport.scrollTop+g.deltaY;a.onWheelScroll(b),sg(b,j)&&g.preventDefault()}},onResize:()=>{p.current&&d.viewport&&f&&s({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Oc(f.paddingTop),paddingEnd:Oc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[hA,V3]=U3(Sr),$3=w.forwardRef(pt(function(a,i){const{__scopeScrollArea:r,sizes:s,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:p,onDragScroll:y,onWheelScroll:g,onResize:j,...b}=a,S=Qa(Sr,r),[k,N]=w.useState(null),T=Ot(i,N),A=w.useRef(null),C=w.useRef(""),M=S.viewport,O=s.content-s.viewport,_=In(g),I=In(p),V=Uc(j,10);function X(L){if(A.current){const H=L.clientX-A.current.left,q=L.clientY-A.current.top;y({x:H,y:q})}}return pt(X,"handleDragScroll"),w.useEffect(()=>{const L=pt(H=>{const q=H.target;(k==null?void 0:k.contains(q))&&_(H,O)},"handleWheel");return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[M,k,O,_]),w.useEffect(I,[s,I]),so(k,V),so(S.content,V),o.jsx(hA,{scope:r,scrollbar:k,hasThumb:u,onThumbChange:In(d),onThumbPointerUp:In(f),onThumbPositionChange:I,onThumbPointerDown:In(m),children:o.jsx(Kt.div,{...b,ref:T,style:{position:"absolute",...b.style},onPointerDown:kt(a.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),A.current=k.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),X(L))}),onPointerMove:kt(a.onPointerMove,X),onPointerUp:kt(a.onPointerUp,L=>{const H=L.target;H.hasPointerCapture(L.pointerId)&&H.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=C.current,S.viewport&&(S.viewport.style.scrollBehavior=""),A.current=null})})})},"ScrollAreaScrollbarImpl")),r0="ScrollAreaThumb",mA=w.forwardRef(pt(function(a,i){const{forceMount:r,...s}=a,u=V3(r0,a.__scopeScrollArea);return o.jsx(Yi,{present:r||u.hasThumb,children:o.jsx(pA,{ref:i,...s})})},"ScrollAreaThumb")),pA=w.forwardRef(pt(function(a,i){const{__scopeScrollArea:r,style:s,...u}=a,d=Qa(r0,r),f=V3(r0,r),{onThumbPositionChange:m}=f,p=Ot(i,f.onThumbChange),y=w.useRef(void 0),g=Uc(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const j=d.viewport;if(j){const b=pt(()=>{if(g(),!y.current){const S=yA(j,m);y.current=S,m()}},"handleScroll");return m(),j.addEventListener("scroll",b),()=>j.removeEventListener("scroll",b)}},[d.viewport,g,m]),o.jsx(Kt.div,{"data-state":f.hasThumb?"visible":"hidden",...u,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:kt(a.onPointerDownCapture,j=>{const S=j.target.getBoundingClientRect(),k=j.clientX-S.left,N=j.clientY-S.top;f.onThumbPointerDown({x:k,y:N})}),onPointerUp:kt(a.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),G3="ScrollAreaCorner",gA=w.forwardRef(pt(function(a,i){const r=Qa(G3,a.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&s?o.jsx(vA,{...a,ref:i}):null},"ScrollAreaCorner")),vA=w.forwardRef(pt(function(a,i){const{__scopeScrollArea:r,...s}=a,u=Qa(G3,r),[d,f]=w.useState(0),[m,p]=w.useState(0),y=!!(d&&m),{onCornerWidthChange:g,onCornerHeightChange:j}=u;return so(u.scrollbarX,()=>{var S;const b=((S=u.scrollbarX)==null?void 0:S.offsetHeight)||0;u.onCornerHeightChange(b),p(b)}),so(u.scrollbarY,()=>{var S;const b=((S=u.scrollbarY)==null?void 0:S.offsetWidth)||0;u.onCornerWidthChange(b),f(b)}),w.useEffect(()=>()=>{g(0),j(0)},[g,j]),y?o.jsx(Kt.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 Oc(e){return e?parseInt(e,10):0}pt(Oc,"toInt");function lg(e,a){const i=e/a;return isNaN(i)?0:i}pt(lg,"getThumbRatio");function qc(e){const a=lg(e.viewport,e.content),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-i)*a;return Math.max(r,18)}pt(qc,"getThumbSize");function Y3(e,a,i,r="ltr"){const s=qc(i),u=s/2,d=a||u,f=s-d,m=i.scrollbar.paddingStart+d,p=i.scrollbar.size-i.scrollbar.paddingEnd-f,y=i.content-i.viewport,g=r==="ltr"?[0,y]:[y*-1,0];return og([m,p],g)(e)}pt(Y3,"getScrollPositionFromPointer");function l0(e,a,i="ltr"){const r=qc(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],p=Kd(e,m);return og([0,d],[0,f])(p)}pt(l0,"getThumbOffsetFromScroll");function og(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])}}pt(og,"linearScale");function sg(e,a){return e>0&&e<a}pt(sg,"isScrollingWithinScrollbarBounds");var yA=pt((e,a=()=>{})=>{let i={left:e.scrollLeft,top:e.scrollTop},r=0;return pt((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 Uc(e,a){const i=In(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(i,a)},[i,a])}pt(Uc,"useDebounceCallback");function so(e,a){const i=In(a);Pn(()=>{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])}pt(so,"useResizeObserver");var xA=iA,bA=lA,jA=gA,wA=Object.defineProperty,Dt=(e,a)=>wA(e,"name",{value:a,configurable:!0}),SA=[" ","Enter","ArrowUp","ArrowDown"],kA=[" ","Enter"],fs="Select",[pf,cg,CA]=Aw(fs),[mo,kq]=hl(fs,[CA,hf]),ug=hf(),[NA,gl]=mo(fs),[EA,TA]=mo(fs);function K3(e){const{__scopeSelect:a,children:i,open:r,defaultOpen:s,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:p,name:y,autoComplete:g,disabled:j,required:b,form:S,internal_do_not_use_render:k}=e,N=ug(a),[T,A]=w.useState(null),[C,M]=w.useState(null),[O,_]=w.useState(!1),I=H0(p),[V,X]=Tc({prop:r,defaultProp:s??!1,onChange:u,caller:fs}),[L,H]=Tc({prop:d,defaultProp:f,onChange:m,caller:fs}),q=w.useRef(null),Z=w.useRef(L);w.useEffect(()=>{const re=S?T==null?void 0:T.ownerDocument.getElementById(S):T==null?void 0:T.form;if(re instanceof HTMLFormElement){const R=Dt(()=>H(Z.current),"reset");return re.addEventListener("reset",R),()=>re.removeEventListener("reset",R)}},[S,T,H]);const $=T?!!S||!!T.closest("form"):!0,[F,K]=w.useState(new Set),U=to(),P=Array.from(F).map(re=>re.props.value).join(";"),ie=w.useCallback(re=>{K(R=>new Set(R).add(re))},[]),z=w.useCallback(re=>{K(R=>{const B=new Set(R);return B.delete(re),B})},[]),ne={required:b,trigger:T,onTriggerChange:A,valueNode:C,onValueNodeChange:M,valueNodeHasChildren:O,onValueNodeHasChildrenChange:_,contentId:U,value:L,onValueChange:H,open:V,onOpenChange:X,dir:I,triggerPointerDownPosRef:q,disabled:j,name:y,autoComplete:g,form:S,nativeOptions:F,nativeSelectKey:P,isFormControl:$};return o.jsx(A3,{...N,children:o.jsx(NA,{scope:a,...ne,children:o.jsx(pf.Provider,{scope:a,children:o.jsx(EA,{scope:a,onNativeOptionAdd:ie,onNativeOptionRemove:z,children:Z3(k)?k(ne):i})})})})}Dt(K3,"SelectProvider");var AA=Dt(e=>{const{__scopeSelect:a,children:i,...r}=e;return o.jsx(K3,{__scopeSelect:a,...r,internal_do_not_use_render:({isFormControl:s})=>o.jsxs(o.Fragment,{children:[i,s?o.jsx(eM,{__scopeSelect:a}):null]})})},"Select"),MA="SelectTrigger",_A=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,disabled:s=!1,...u}=a,d=ug(r),f=gl(MA,r),m=f.disabled||s,p=Ot(i,f.onTriggerChange),y=cg(r),g=w.useRef("touch"),[j,b,S]=dg(N=>{const T=y().filter(M=>!M.disabled),A=T.find(M=>M.value===f.value),C=fg(T,N,A);C!==void 0&&f.onValueChange(C.value)}),k=Dt(N=>{m||(f.onOpenChange(!0),S()),N&&(f.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})},"handleOpen");return o.jsx(M3,{asChild:!0,...d,children:o.jsx(Kt.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":Fc(f.value)?"":void 0,...u,ref:p,onClick:kt(u.onClick,N=>{N.currentTarget.focus(),g.current!=="mouse"&&k(N)}),onPointerDown:kt(u.onPointerDown,N=>{g.current=N.pointerType;const T=N.target;T.hasPointerCapture(N.pointerId)&&T.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(k(N),N.preventDefault())}),onKeyDown:kt(u.onKeyDown,N=>{const T=j.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&b(N.key),!(T&&N.key===" ")&&SA.includes(N.key)&&(k(),N.preventDefault())})})})},"SelectTrigger")),RA="SelectValue",OA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,className:s,style:u,children:d,placeholder:f="",...m}=a,p=gl(RA,r),{onValueNodeHasChildrenChange:y}=p,g=d!==void 0,j=Ot(i,p.onValueNodeChange);Pn(()=>{y(g)},[y,g]);const b=Fc(p.value);return o.jsx(Kt.span,{...m,asChild:b?!1:m.asChild,ref:j,style:{pointerEvents:"none"},children:o.jsx(w.Fragment,{children:b?f:d},b?"placeholder":"value")})},"SelectValue")),zA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,children:s,...u}=a;return o.jsx(Kt.span,{"aria-hidden":!0,...u,ref:i,children:s||"▼"})},"SelectIcon")),DA="SelectPortal",[LA,BA]=mo(DA,{forceMount:void 0}),IA=Dt(e=>{const{__scopeSelect:a,forceMount:i,...r}=e;return o.jsx(LA,{scope:e.__scopeSelect,forceMount:i,children:o.jsx($0,{asChild:!0,...r})})},"SelectPortal"),co="SelectContent",PA=w.forwardRef(Dt(function(a,i){const r=BA(co,a.__scopeSelect),{forceMount:s=r.forceMount,...u}=a,d=gl(co,a.__scopeSelect),[f,m]=w.useState();return Pn(()=>{m(new DocumentFragment)},[]),o.jsx(Yi,{present:s||d.open,children:({present:p})=>p?o.jsx(UA,{...u,ref:i}):o.jsx(HA,{...u,fragment:f})})},"SelectContent")),HA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,children:s,fragment:u}=a;return u?ho.createPortal(o.jsx(X3,{scope:r,children:o.jsx(pf.Slot,{scope:r,children:o.jsx("div",{ref:i,children:s})})}),u):null},"SelectContentFragment")),ci=10,[X3,gf]=mo(co),qA=Ui("SelectContent.RemoveScroll"),UA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r}=a,{position:s="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:p,align:y,alignOffset:g,arrowPadding:j,collisionBoundary:b,collisionPadding:S,sticky:k,hideWhenDetached:N,avoidCollisions:T,...A}=a,C=gl(co,r),[M,O]=w.useState(null),[_,I]=w.useState(null),V=Ot(i,O),[X,L]=w.useState(null),[H,q]=w.useState(null),Z=cg(r),[$,F]=w.useState(!1),K=w.useRef(!1);w.useEffect(()=>{if(M)return Y0(M)},[M]),Hc();const U=w.useCallback(pe=>{const[Ce,...Ae]=Z().map(Ee=>Ee.ref.current),[xe]=Ae.slice(-1),oe=document.activeElement;for(const Ee of pe)if(Ee===oe||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===Ce&&_&&(_.scrollTop=0),Ee===xe&&_&&(_.scrollTop=_.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==oe))return},[Z,_]),P=w.useCallback(()=>U([X,M]),[U,X,M]);w.useEffect(()=>{$&&P()},[$,P]);const{onOpenChange:ie,triggerPointerDownPosRef:z}=C;w.useEffect(()=>{if(M){let pe={x:0,y:0};const Ce=Dt(xe=>{var oe,Ee;pe={x:Math.abs(Math.round(xe.pageX)-(((oe=z.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(xe.pageY)-(((Ee=z.current)==null?void 0:Ee.y)??0))}},"handlePointerMove"),Ae=Dt(xe=>{pe.x<=10&&pe.y<=10?xe.preventDefault():xe.composedPath().includes(M)||ie(!1),document.removeEventListener("pointermove",Ce),z.current=null},"handlePointerUp");return z.current!==null&&(document.addEventListener("pointermove",Ce),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[M,ie,z]),w.useEffect(()=>{const pe=Dt(()=>ie(!1),"close");return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[ie]);const[ne,re]=dg(pe=>{const Ce=Z().filter(oe=>!oe.disabled),Ae=Ce.find(oe=>oe.ref.current===document.activeElement),xe=fg(Ce,pe,Ae);xe&&setTimeout(()=>{var oe;return(oe=xe.ref.current)==null?void 0:oe.focus()})}),R=w.useCallback((pe,Ce,Ae)=>{const xe=!K.current&&!Ae;(C.value!==void 0&&C.value===Ce||xe)&&(L(pe),xe&&(K.current=!0))},[C.value]),B=w.useCallback(()=>M==null?void 0:M.focus(),[M]),W=w.useCallback((pe,Ce,Ae)=>{const xe=!K.current&&!Ae;(C.value!==void 0&&C.value===Ce||xe)&&q(pe)},[C.value]),fe=s==="popper"?kx:FA,me=fe===kx?{side:m,sideOffset:p,align:y,alignOffset:g,arrowPadding:j,collisionBoundary:b,collisionPadding:S,sticky:k,hideWhenDetached:N,avoidCollisions:T}:{};return o.jsx(X3,{scope:r,content:M,viewport:_,onViewportChange:I,itemRefCallback:R,selectedItem:X,onItemLeave:B,itemTextRefCallback:W,focusSelectedItem:P,selectedItemText:H,position:s,isPositioned:$,searchRef:ne,children:o.jsx(of,{as:qA,allowPinchZoom:!0,children:o.jsx(F0,{asChild:!0,trapped:C.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:kt(u,pe=>{var Ce;(Ce=C.trigger)==null||Ce.focus({preventScroll:!0}),pe.preventDefault()}),children:o.jsx(q0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:o.jsx(fe,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:pe=>pe.preventDefault(),...A,...me,onPlaced:()=>F(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:kt(A.onKeyDown,pe=>{const Ce=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!Ce&&pe.key.length===1&&re(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let xe=Z().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const oe=pe.target,Ee=xe.indexOf(oe);xe=xe.slice(Ee+1)}setTimeout(()=>U(xe)),pe.preventDefault()}})})})})})})},"SelectContentImpl")),FA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,onPlaced:s,...u}=a,d=gl(co,r),f=gf(co,r),[m,p]=w.useState(null),[y,g]=w.useState(null),j=Ot(i,g),b=cg(r),S=w.useRef(!1),k=w.useRef(!0),{viewport:N,selectedItem:T,selectedItemText:A,focusSelectedItem:C}=f,M=w.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&N&&T&&A){const V=d.trigger.getBoundingClientRect(),X=y.getBoundingClientRect(),L=d.valueNode.getBoundingClientRect(),H=A.getBoundingClientRect();if(d.dir!=="rtl"){const oe=H.left-X.left,Ee=L.left-oe,Xe=V.left-Ee,Be=V.width+Xe,at=Math.max(Be,X.width),Qe=window.innerWidth-ci,We=Kd(Ee,[ci,Math.max(ci,Qe-at)]);m.style.minWidth=Be+"px",m.style.left=We+"px"}else{const oe=X.right-H.right,Ee=window.innerWidth-L.right-oe,Xe=window.innerWidth-V.right-Ee,Be=V.width+Xe,at=Math.max(Be,X.width),Qe=window.innerWidth-ci,We=Kd(Ee,[ci,Math.max(ci,Qe-at)]);m.style.minWidth=Be+"px",m.style.right=We+"px"}const q=b(),Z=window.innerHeight-ci*2,$=N.scrollHeight,F=window.getComputedStyle(y),K=parseInt(F.borderTopWidth,10),U=parseInt(F.paddingTop,10),P=parseInt(F.borderBottomWidth,10),ie=parseInt(F.paddingBottom,10),z=K+U+$+ie+P,ne=Math.min(T.offsetHeight*5,z),re=window.getComputedStyle(N),R=parseInt(re.paddingTop,10),B=parseInt(re.paddingBottom,10),W=V.top+V.height/2-ci,fe=Z-W,me=T.offsetHeight/2,pe=T.offsetTop+me,Ce=K+U+pe,Ae=z-Ce;if(Ce<=W){const oe=q.length>0&&T===q[q.length-1].ref.current;m.style.bottom="0px";const Ee=y.clientHeight-N.offsetTop-N.offsetHeight,Xe=Math.max(fe,me+(oe?B:0)+Ee+P),Be=Ce+Xe;m.style.height=Be+"px"}else{const oe=q.length>0&&T===q[0].ref.current;m.style.top="0px";const Xe=Math.max(W,K+N.offsetTop+(oe?R:0)+me)+Ae;m.style.height=Xe+"px",N.scrollTop=Ce-W+N.offsetTop}m.style.margin=`${ci}px 0`,m.style.minHeight=ne+"px",m.style.maxHeight=Z+"px",s==null||s(),requestAnimationFrame(()=>S.current=!0)}},[b,d.trigger,d.valueNode,m,y,N,T,A,d.dir,s]);Pn(()=>M(),[M]);const[O,_]=w.useState();Pn(()=>{y&&_(window.getComputedStyle(y).zIndex)},[y]);const I=w.useCallback(V=>{V&&k.current===!0&&(M(),C==null||C(),k.current=!1)},[M,C]);return o.jsx(VA,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:I,children:o.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:o.jsx(Kt.div,{...u,ref:j,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),kx=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,align:s="start",collisionPadding:u=ci,...d}=a,f=ug(r);return o.jsx(_3,{...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")),[VA,$A]=mo(co,{}),Cx="SelectViewport",GA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,nonce:s,...u}=a,d=gf(Cx,r),f=$A(Cx,r),m=Ot(i,d.onViewportChange),p=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),o.jsx(pf.Slot,{scope:r,children:o.jsx(Kt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:kt(u.onScroll,y=>{const g=y.currentTarget,{contentWrapper:j,shouldExpandOnScrollRef:b}=f;if(b!=null&&b.current&&j){const S=Math.abs(p.current-g.scrollTop);if(S>0){const k=window.innerHeight-ci*2,N=parseFloat(j.style.minHeight),T=parseFloat(j.style.height),A=Math.max(N,T);if(A<k){const C=A+S,M=Math.min(k,C),O=C-M;j.style.height=M+"px",j.style.bottom==="0px"&&(g.scrollTop=O>0?O:0,j.style.justifyContent="flex-end")}}}p.current=g.scrollTop})})})]})},"SelectViewport")),YA="SelectGroup",[Cq,Nq]=mo(YA),o0="SelectItem",[KA,Q3]=mo(o0),XA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,value:s,disabled:u=!1,textValue:d,...f}=a,m=gl(o0,r),p=gf(o0,r),y=m.value===s,[g,j]=w.useState(d??""),[b,S]=w.useState(!1),k=In(M=>{var O;return(O=p.itemRefCallback)==null?void 0:O.call(p,M,s,u)}),N=Ot(i,k),T=to(),A=w.useRef("touch"),C=Dt(()=>{u||(m.onValueChange(s),m.onOpenChange(!1))},"handleSelect");return o.jsx(KA,{scope:r,value:s,disabled:u,textId:T,isSelected:y,onItemTextChange:w.useCallback(M=>{j(O=>O||((M==null?void 0:M.textContent)??"").trim())},[]),children:o.jsx(pf.ItemSlot,{scope:r,value:s,disabled:u,textValue:g,children:o.jsx(Kt.div,{role:"option","aria-labelledby":T,"data-highlighted":b?"":void 0,"aria-selected":y&&b,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:N,onFocus:kt(f.onFocus,()=>S(!0)),onBlur:kt(f.onBlur,()=>S(!1)),onClick:kt(f.onClick,()=>{A.current!=="mouse"&&C()}),onPointerUp:kt(f.onPointerUp,()=>{A.current==="mouse"&&C()}),onPointerDown:kt(f.onPointerDown,M=>{A.current=M.pointerType}),onPointerMove:kt(f.onPointerMove,M=>{var O;A.current=M.pointerType,u?(O=p.onItemLeave)==null||O.call(p):A.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:kt(f.onPointerLeave,M=>{var O;M.currentTarget===document.activeElement&&((O=p.onItemLeave)==null||O.call(p))}),onKeyDown:kt(f.onKeyDown,M=>{var _;u||M.target!==M.currentTarget||((_=p.searchRef)==null?void 0:_.current)!==""&&M.key===" "||(kA.includes(M.key)&&C(),M.key===" "&&M.preventDefault())})})})})},"SelectItem")),jd="SelectItemText",QA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,className:s,style:u,...d}=a,f=gl(jd,r),m=gf(jd,r),p=Q3(jd,r),y=TA(jd,r),[g,j]=w.useState(null),b=In(C=>{var M;return(M=m.itemTextRefCallback)==null?void 0:M.call(m,C,p.value,p.disabled)}),S=Ot(i,j,p.onItemTextChange,b),k=g==null?void 0:g.textContent,N=w.useMemo(()=>o.jsx("option",{value:p.value,disabled:p.disabled,children:k},p.value),[p.disabled,p.value,k]),{onNativeOptionAdd:T,onNativeOptionRemove:A}=y;return Pn(()=>(T(N),()=>A(N)),[T,A,N]),o.jsxs(o.Fragment,{children:[o.jsx(Kt.span,{id:p.textId,...d,ref:S}),p.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Fc(f.value)?ho.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),ZA="SelectItemIndicator",JA=w.forwardRef(Dt(function(a,i){const{__scopeSelect:r,...s}=a;return Q3(ZA,r).isSelected?o.jsx(Kt.span,{"aria-hidden":!0,...s,ref:i}):null},"SelectItemIndicator")),WA="SelectBubbleInput",eM=w.forwardRef(Dt(function({__scopeSelect:a,...i},r){const s=gl(WA,a),{value:u,onValueChange:d,required:f,disabled:m,name:p,autoComplete:y,form:g}=s,{nativeOptions:j,nativeSelectKey:b}=s,S=w.useRef(null),k=Ot(r,S),N=u??"",T=R3(N),A=Array.from(j).some(C=>(C.props.value??"")==="");return w.useEffect(()=>{const C=S.current;if(!C)return;const M=window.HTMLSelectElement.prototype,_=Object.getOwnPropertyDescriptor(M,"value").set;if(T!==N&&_){const I=new Event("change",{bubbles:!0});_.call(C,N),C.dispatchEvent(I)}},[T,N]),o.jsxs(Kt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:y,disabled:m,form:g,onChange:C=>d(C.target.value),...i,style:{...V9,...i.style},ref:k,defaultValue:N,children:[Fc(u)&&!A?o.jsx("option",{value:""}):null,Array.from(j)]},b)},"SelectBubbleInput"));function Z3(e){return typeof e=="function"}Dt(Z3,"isFunction");function Fc(e){return e===""||e===void 0}Dt(Fc,"shouldShowPlaceholder");function dg(e){const a=In(e),i=w.useRef(""),r=w.useRef(0),s=w.useCallback(d=>{const f=i.current+d;a(f),Dt((function m(p){i.current=p,window.clearTimeout(r.current),p!==""&&(r.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[a]),u=w.useCallback(()=>{i.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[i,s,u]}Dt(dg,"useTypeaheadSearch");function fg(e,a,i){const s=a.length>1&&Array.from(a).every(p=>p===a[0])?a[0]:a,u=i?e.indexOf(i):-1;let d=J3(e,Math.max(u,0));s.length===1&&(d=d.filter(p=>p!==i));const m=d.find(p=>p.textValue.toLowerCase().startsWith(s.toLowerCase()));return m!==i?m:void 0}Dt(fg,"findNextItem");function J3(e,a){return e.map((i,r)=>e[(a+r)%e.length])}Dt(J3,"wrapArray");const tM=B0("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 Te({className:e,variant:a="default",size:i="default",asChild:r=!1,...s}){const u=r?D9:"button";return o.jsx(u,{"data-slot":"button","data-variant":a,"data-size":i,className:gn(tM({variant:a,size:i,className:e})),...s})}const hg=e=>na(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Wl({value:e}){return o.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function W3({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(Wl,{value:r.arguments}):o.jsxs(o.Fragment,{children:[o.jsx(W3,{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(Wl,{value:r.result.details})]})]})]},s)}})})}function nM({detail:e,onSelect:a}){const[i,r]=w.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:hg(s.timestamp)})]}),o.jsxs("div",{role:"tablist","aria-label":x("history.view"),children:[o.jsx(Te,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="content",onClick:()=>r("content"),children:x("history.content")}),o.jsx(Te,{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(Wl,{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(W3,{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(Wl,{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(Wl,{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(Wl,{value:s.usage})]}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Extra"}),o.jsx(Wl,{value:s.extra})]})]})})]})}const Nx={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},Ex=e=>na(e,{year:"numeric",month:"long",day:"numeric"}),aM=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(" "),iM=e=>na(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function rM({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=Ex(s.timestamp);return o.jsxs(w.Fragment,{children:[(r===0||Ex(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:`${hg(s.timestamp)}.${String(s.timestamp%1e3).padStart(3,"0")}`,children:iM(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(O7,{}),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(z0,{}),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(Hp,{})]})]}):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:Nx[i.record.role]?x(Nx[i.record.role]):i.record.role}),o.jsxs("span",{children:["#",i.record.id]})]}),o.jsx("span",{className:"jv-activity-preview",children:aM(i.record)||x("activity.emptyMessage")})]})})]})]},`${i.kind}:${s.id}`)})})}const lM={read:(e,a)=>Se(`/bots/${e}/history/${a}`)};function oM(e,a){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const sM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uM={};function Tx(e,a){return(uM.jsx?cM:sM).test(e)}const dM=/[ \t\n\f\r]/g;function fM(e){return typeof e=="object"?e.type==="text"?Ax(e.value):!1:Ax(e)}function Ax(e){return e.replace(dM,"")===""}class Vc{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Vc.prototype.normal={};Vc.prototype.property={};Vc.prototype.space=void 0;function e5(e,a){const i={},r={};for(const s of e)Object.assign(i,s.property),Object.assign(r,s.normal);return new Vc(i,r,a)}function s0(e){return e.toLowerCase()}class pa{constructor(a,i){this.attribute=i,this.property=a}}pa.prototype.attribute="";pa.prototype.booleanish=!1;pa.prototype.boolean=!1;pa.prototype.commaOrSpaceSeparated=!1;pa.prototype.commaSeparated=!1;pa.prototype.defined=!1;pa.prototype.mustUseProperty=!1;pa.prototype.number=!1;pa.prototype.overloadedBoolean=!1;pa.prototype.property="";pa.prototype.spaceSeparated=!1;pa.prototype.space=void 0;let hM=0;const rt=po(),pn=po(),c0=po(),Ne=po(),Bt=po(),no=po(),_a=po();function po(){return 2**++hM}const u0=Object.freeze(Object.defineProperty({__proto__:null,boolean:rt,booleanish:pn,commaOrSpaceSeparated:_a,commaSeparated:no,number:Ne,overloadedBoolean:c0,spaceSeparated:Bt},Symbol.toStringTag,{value:"Module"})),op=Object.keys(u0);class mg extends pa{constructor(a,i,r,s){let u=-1;if(super(a,i),Mx(this,"space",s),typeof r=="number")for(;++u<op.length;){const d=op[u];Mx(this,op[u],(r&u0[d])===u0[d])}}}mg.prototype.defined=!0;function Mx(e,a,i){i&&(e[a]=i)}function ws(e){const a={},i={};for(const[r,s]of Object.entries(e.properties)){const u=new mg(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[s0(r)]=r,i[s0(u.attribute)]=r}return new Vc(a,i,e.space)}const t5=ws({properties:{ariaActiveDescendant:null,ariaAtomic:pn,ariaAutoComplete:null,ariaBusy:pn,ariaChecked:pn,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:pn,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:pn,ariaFlowTo:Bt,ariaGrabbed:pn,ariaHasPopup:null,ariaHidden:pn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:Ne,ariaLive:null,ariaModal:pn,ariaMultiLine:pn,ariaMultiSelectable:pn,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:pn,ariaReadOnly:pn,ariaRelevant:null,ariaRequired:pn,ariaRoleDescription:Bt,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:pn,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(e,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function n5(e,a){return a in e?e[a]:a}function a5(e,a){return n5(e,a.toLowerCase())}const mM=ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:no,acceptCharset:Bt,accessKey:Bt,action:null,allow:null,allowFullScreen:rt,allowPaymentRequest:rt,allowUserMedia:rt,alpha:rt,alt:null,as:null,async:rt,autoCapitalize:null,autoComplete:Bt,autoFocus:rt,autoPlay:rt,blocking:Bt,capture:null,charSet:null,checked:rt,cite:null,className:Bt,closedBy:null,colorSpace:null,cols:Ne,colSpan:Ne,command:null,commandFor:null,content:null,contentEditable:pn,controls:rt,controlsList:Bt,coords:Ne|no,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rt,defer:rt,dir:null,dirName:null,disabled:rt,download:c0,draggable:pn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rt,formTarget:null,headers:Bt,height:Ne,hidden:c0,high:Ne,href:null,hrefLang:null,htmlFor:Bt,httpEquiv:Bt,id:null,imageSizes:null,imageSrcSet:null,inert:rt,inputMode:null,integrity:null,is:null,isMap:rt,itemId:null,itemProp:Bt,itemRef:Bt,itemScope:rt,itemType:Bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rt,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:rt,muted:rt,name:null,nonce:null,noModule:rt,noValidate:rt,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:rt,optimum:Ne,pattern:null,ping:Bt,placeholder:null,playsInline:rt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rt,referrerPolicy:null,rel:Bt,required:rt,reversed:rt,rows:Ne,rowSpan:Ne,sandbox:Bt,scope:null,scoped:rt,seamless:rt,selected:rt,shadowRootClonable:rt,shadowRootCustomElementRegistry:rt,shadowRootDelegatesFocus:rt,shadowRootMode:null,shadowRootSerializable:rt,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:pn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:rt,useMap:null,value:pn,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rt,declare:rt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:rt,noHref:rt,noShade:rt,noWrap:rt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:pn,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:rt,disablePictureInPicture:rt,disableRemotePlayback:rt,exportParts:no,part:Bt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:a5}),pM=ws({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:_a,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:Bt,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:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:rt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,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:no,g2:no,glyphName:no,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:_a,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,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:Ne,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:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_a,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_a,rev:_a,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_a,requiredFeatures:_a,requiredFonts:_a,requiredFormats:_a,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:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:_a,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_a,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_a,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:n5}),i5=ws({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()}}),r5=ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:a5}),l5=ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,a){return"xml:"+a.slice(3).toLowerCase()}}),gM={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"},vM=/[A-Z]/g,_x=/-[a-z]/g,yM=/^data[-\w.:]+$/i;function xM(e,a){const i=s0(a);let r=a,s=pa;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&yM.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(_x,jM);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!_x.test(u)){let d=u.replace(vM,bM);d.charAt(0)!=="-"&&(d="-"+d),a="data"+d}}s=mg}return new s(r,a)}function bM(e){return"-"+e.toLowerCase()}function jM(e){return e.charAt(1).toUpperCase()}const wM=e5([t5,mM,i5,r5,l5],"html"),pg=e5([t5,pM,i5,r5,l5],"svg");function SM(e){return e.join(" ").trim()}var rs={},sp,Rx;function kM(){if(Rx)return sp;Rx=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=`
|
|
570
|
+
`,p="/",y="*",g="",j="comment",b="declaration";function S(N,T){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];T=T||{};var A=1,C=1;function M($){var F=$.match(a);F&&(A+=F.length);var K=$.lastIndexOf(m);C=~K?$.length-K:C+$.length}function O(){var $={line:A,column:C};return function(F){return F.position=new _($),X(),F}}function _($){this.start=$,this.end={line:A,column:C},this.source=T.source}_.prototype.content=N;function I($){var F=new Error(T.source+":"+A+":"+C+": "+$);if(F.reason=$,F.filename=T.source,F.line=A,F.column=C,F.source=N,!T.silent)throw F}function V($){var F=$.exec(N);if(F){var K=F[0];return M(K),N=N.slice(K.length),F}}function X(){V(i)}function L($){var F;for($=$||[];F=H();)F!==!1&&$.push(F);return $}function H(){var $=O();if(!(p!=N.charAt(0)||y!=N.charAt(1))){for(var F=2;g!=N.charAt(F)&&(y!=N.charAt(F)||p!=N.charAt(F+1));)++F;if(F+=2,g===N.charAt(F-1))return I("End of comment missing");var K=N.slice(2,F-2);return C+=2,M(K),N=N.slice(F),C+=2,$({type:j,comment:K})}}function q(){var $=O(),F=V(r);if(F){if(H(),!V(s))return I("property missing ':'");var K=V(u),U=$({type:b,property:k(F[0].replace(e,g)),value:K?k(K[0].replace(e,g)):g});return V(d),U}}function Z(){var $=[];L($);for(var F;F=q();)F!==!1&&($.push(F),L($));return $}return X(),Z()}function k(N){return N?N.replace(f,g):g}return sp=S,sp}var Ox;function CM(){if(Ox)return rs;Ox=1;var e=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=i;const a=e(kM());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:p,value:y}=m;f?s(p,y,m):y&&(u=u||{},u[p]=y)}),u}return rs}var xc={},zx;function NM(){if(zx)return xc;zx=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(p){return!p||i.test(p)||e.test(p)},d=function(p,y){return y.toUpperCase()},f=function(p,y){return"".concat(y,"-")},m=function(p,y){return y===void 0&&(y={}),u(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(s,f):p=p.replace(r,f),p.replace(a,d))};return xc.camelCase=m,xc}var bc,Dx;function EM(){if(Dx)return bc;Dx=1;var e=bc&&bc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},a=e(CM()),i=NM();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,bc=r,bc}var TM=EM();const AM=N0(TM),o5=s5("end"),gg=s5("start");function s5(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 MM(e){const a=gg(e),i=o5(e);if(a&&i)return{start:a,end:i}}function kc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lx(e.position):"start"in e||"end"in e?Lx(e):"line"in e||"column"in e?d0(e):""}function d0(e){return Bx(e&&e.line)+":"+Bx(e&&e.column)}function Lx(e){return d0(e&&e.start)+"-"+d0(e&&e.end)}function Bx(e){return e&&typeof e=="number"?e:1}class Vn 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=kc(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}}Vn.prototype.file="";Vn.prototype.name="";Vn.prototype.reason="";Vn.prototype.message="";Vn.prototype.stack="";Vn.prototype.column=void 0;Vn.prototype.line=void 0;Vn.prototype.ancestors=void 0;Vn.prototype.cause=void 0;Vn.prototype.fatal=void 0;Vn.prototype.place=void 0;Vn.prototype.ruleId=void 0;Vn.prototype.source=void 0;const vg={}.hasOwnProperty,_M=new Map,RM=/[A-Z]/g,OM=new Set(["table","tbody","thead","tfoot","tr"]),zM=new Set(["td","th"]),c5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DM(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=FM(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=UM(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"?pg:wM,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=u5(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function u5(e,a,i){if(a.type==="element")return LM(e,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return BM(e,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return PM(e,a,i);if(a.type==="mdxjsEsm")return IM(e,a);if(a.type==="root")return HM(e,a,i);if(a.type==="text")return qM(e,a)}function LM(e,a,i){const r=e.schema;let s=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=pg,e.schema=s),e.ancestors.push(a);const u=f5(e,a.tagName,!1),d=VM(e,a);let f=xg(e,a);return OM.has(a.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!fM(m):!0})),d5(e,d,u,a),yg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function BM(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)}zc(e,a.position)}function IM(e,a){if(a.data&&a.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(a.data.estree);zc(e,a.position)}function PM(e,a,i){const r=e.schema;let s=r;a.name==="svg"&&r.space==="html"&&(s=pg,e.schema=s),e.ancestors.push(a);const u=a.name===null?e.Fragment:f5(e,a.name,!0),d=$M(e,a),f=xg(e,a);return d5(e,d,u,a),yg(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function HM(e,a,i){const r={};return yg(r,xg(e,a)),e.create(a,e.Fragment,r,i)}function qM(e,a){return a.value}function d5(e,a,i,r){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(a.node=r)}function yg(e,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(e.children=i)}}function UM(e,a,i){return r;function r(s,u,d,f){const p=Array.isArray(d.children)?i:a;return f?p(u,d,f):p(u,d)}}function FM(e,a){return i;function i(r,s,u,d){const f=Array.isArray(u.children),m=gg(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 VM(e,a){const i={};let r,s;for(s in a.properties)if(s!=="children"&&vg.call(a.properties,s)){const u=GM(e,s,a.properties[s]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&zM.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 $M(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 zc(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 zc(e,a.position);else u=r.value===null?!0:r.value;i[s]=u}return i}function xg(e,a){const i=[];let r=-1;const s=e.passKeys?new Map:_M;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 p=s.get(m)||0;d=m+"-"+p,s.set(m,p+1)}}const f=u5(e,u,d);f!==void 0&&i.push(f)}return i}function GM(e,a,i){const r=xM(e.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?oM(i):SM(i)),r.property==="style"){let s=typeof i=="object"?i:YM(e,String(i));return e.stylePropertyNameCase==="css"&&(s=KM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?gM[r.property]||r.property:r.attribute,i]}}function YM(e,a){try{return AM(a,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,s=new Vn("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=c5+"#cannot-parse-style-attribute",s}}function f5(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=Tx(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=Tx(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const s=r.value;return vg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);zc(e)}function zc(e,a){const i=new Vn("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=c5+"#cannot-handle-mdx-estrees-without-createevaluater",i}function KM(e){const a={};let i;for(i in e)vg.call(e,i)&&(a[XM(i)]=e[i]);return a}function XM(e){let a=e.replace(RM,QM);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function QM(e){return"-"+e.toLowerCase()}const cp={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"]},ZM={};function bg(e,a){const i=ZM,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return h5(e,r,s)}function h5(e,a,i){if(JM(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 Ix(e.children,a,i)}return Array.isArray(e)?Ix(e,a,i):""}function Ix(e,a,i){const r=[];let s=-1;for(;++s<e.length;)r[s]=h5(e[s],a,i);return r.join("")}function JM(e){return!!(e&&typeof e=="object")}const Px=document.createElement("i");function jg(e){const a="&"+e+";";Px.innerHTML=a;const i=Px.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===a?!1:i}function Oa(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 Ka(e,a){return e.length>0?(Oa(e,e.length,0,a),e):a}const Hx={}.hasOwnProperty;function m5(e){const a={};let i=-1;for(;++i<e.length;)WM(a,e[i]);return a}function WM(e,a){let i;for(i in a){const s=(Hx.call(e,i)?e[i]:void 0)||(e[i]={}),u=a[i];let d;if(u)for(d in u){Hx.call(s,d)||(s[d]=[]);const f=u[d];e_(s[d],Array.isArray(f)?f:f?[f]:[])}}}function e_(e,a){let i=-1;const r=[];for(;++i<a.length;)(a[i].add==="after"?e:r).push(a[i]);Oa(e,0,0,r)}function p5(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 fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ea=vl(/[A-Za-z]/),Fn=vl(/[\dA-Za-z]/),t_=vl(/[#-'*+\--9=?A-Z^-~]/);function Xd(e){return e!==null&&(e<32||e===127)}const f0=vl(/\d/),n_=vl(/[\dA-Fa-f]/),a_=vl(/[!-/:-@[-`{-~]/);function Ze(e){return e!==null&&e<-2}function It(e){return e!==null&&(e<0||e===32)}function mt(e){return e===-2||e===-1||e===32}const vf=vl(new RegExp("\\p{P}|\\p{S}","u")),uo=vl(/\s/);function vl(e){return a;function a(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ss(e){const a=[];let i=-1,r=0,s=0;for(;++i<e.length;){const u=e.charCodeAt(i);let d="";if(u===37&&Fn(e.charCodeAt(i+1))&&Fn(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 wt(e,a,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return mt(m)?(e.enter(i),f(m)):a(m)}function f(m){return mt(m)&&u++<s?(e.consume(m),f):(e.exit(i),a(m))}}const i_={tokenize:r_};function r_(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"),wt(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 Ze(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const l_={tokenize:o_},qx={tokenize:s_};function o_(e){const a=this,i=[];let r=0,s,u,d;return f;function f(C){if(r<i.length){const M=i[r];return a.containerState=M[1],e.attempt(M[0].continuation,m,p)(C)}return p(C)}function m(C){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,s&&A();const M=a.events.length;let O=M,_;for(;O--;)if(a.events[O][0]==="exit"&&a.events[O][1].type==="chunkFlow"){_=a.events[O][1].end;break}T(r);let I=M;for(;I<a.events.length;)a.events[I][1].end={..._},I++;return Oa(a.events,O+1,0,a.events.slice(M)),a.events.length=I,p(C)}return f(C)}function p(C){if(r===i.length){if(!s)return j(C);if(s.currentConstruct&&s.currentConstruct.concrete)return S(C);a.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(qx,y,g)(C)}function y(C){return s&&A(),T(r),j(C)}function g(C){return a.parser.lazy[a.now().line]=r!==i.length,d=a.now().offset,S(C)}function j(C){return a.containerState={},e.attempt(qx,b,S)(C)}function b(C){return r++,i.push([a.currentConstruct,a.containerState]),j(C)}function S(C){if(C===null){s&&A(),T(0),e.consume(C);return}return s=s||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(C)}function k(C){if(C===null){N(e.exit("chunkFlow"),!0),T(0),e.consume(C);return}return Ze(C)?(e.consume(C),N(e.exit("chunkFlow")),r=0,a.interrupt=void 0,f):(e.consume(C),k)}function N(C,M){const O=a.sliceStream(C);if(M&&O.push(null),C.previous=u,u&&(u.next=C),u=C,s.defineSkip(C.start),s.write(O),a.parser.lazy[C.start.line]){let _=s.events.length;for(;_--;)if(s.events[_][1].start.offset<d&&(!s.events[_][1].end||s.events[_][1].end.offset>d))return;const I=a.events.length;let V=I,X,L;for(;V--;)if(a.events[V][0]==="exit"&&a.events[V][1].type==="chunkFlow"){if(X){L=a.events[V][1].end;break}X=!0}for(T(r),_=I;_<a.events.length;)a.events[_][1].end={...L},_++;Oa(a.events,V+1,0,a.events.slice(I)),a.events.length=_}}function T(C){let M=i.length;for(;M-- >C;){const O=i[M];a.containerState=O[1],O[0].exit.call(a,e)}i.length=C}function A(){s.write([null]),u=void 0,s=void 0,a.containerState._closeFlow=void 0}}function s_(e,a,i){return wt(e,e.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hs(e){if(e===null||It(e)||uo(e))return 1;if(vf(e))return 2}function yf(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 h0={name:"attention",resolveAll:c_,tokenize:u_};function c_(e,a){let i=-1,r,s,u,d,f,m,p,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},j={...e[i][1].start};Ux(g,-m),Ux(j,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:j},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},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Ka(p,[["enter",e[r][1],a],["exit",e[r][1],a]])),p=Ka(p,[["enter",s,a],["enter",d,a],["exit",d,a],["enter",u,a]]),p=Ka(p,yf(a.parser.constructs.insideSpan.null,e.slice(r+1,i),a)),p=Ka(p,[["exit",u,a],["enter",f,a],["exit",f,a],["exit",s,a]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,p=Ka(p,[["enter",e[i][1],a],["exit",e[i][1],a]])):y=0,Oa(e,r-1,i-r+3,p),i=r+p.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function u_(e,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=hs(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 p=e.exit("attentionSequence"),y=hs(m),g=!y||y===2&&s||i.includes(m),j=!s||s===2&&y||i.includes(r);return p._open=!!(u===42?g:g&&(s||!j)),p._close=!!(u===42?j:j&&(y||!g)),a(m)}}function Ux(e,a){e.column+=a,e.offset+=a,e._bufferIndex+=a}const d_={name:"autolink",tokenize:f_};function f_(e,a,i){let r=0;return s;function s(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return ea(b)?(e.consume(b),d):b===64?i(b):p(b)}function d(b){return b===43||b===45||b===46||Fn(b)?(r=1,f(b)):p(b)}function f(b){return b===58?(e.consume(b),r=0,m):(b===43||b===45||b===46||Fn(b))&&r++<32?(e.consume(b),f):(r=0,p(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),a):b===null||b===32||b===60||Xd(b)?i(b):(e.consume(b),m)}function p(b){return b===64?(e.consume(b),y):t_(b)?(e.consume(b),p):i(b)}function y(b){return Fn(b)?g(b):i(b)}function g(b){return b===46?(e.consume(b),r=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),a):j(b)}function j(b){if((b===45||Fn(b))&&r++<63){const S=b===45?j:g;return e.consume(b),S}return i(b)}}const $c={partial:!0,tokenize:h_};function h_(e,a,i){return r;function r(u){return mt(u)?wt(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||Ze(u)?a(u):i(u)}}const g5={continuation:{tokenize:p_},exit:g_,name:"blockQuote",tokenize:m_};function m_(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 mt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),a):(e.exit("blockQuotePrefix"),a(d))}}function p_(e,a,i){const r=this;return s;function s(d){return mt(d)?wt(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(g5,a,i)(d)}}function g_(e){e.exit("blockQuote")}const v5={name:"characterEscape",tokenize:v_};function v_(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 a_(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),a):i(u)}}const y5={name:"characterReference",tokenize:y_};function y_(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"),p):(e.enter("characterReferenceValue"),u=31,d=Fn,y(g))}function p(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=n_,y):(e.enter("characterReferenceValue"),u=7,d=f0,y(g))}function y(g){if(g===59&&s){const j=e.exit("characterReferenceValue");return d===Fn&&!jg(r.sliceSerialize(j))?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 Fx={partial:!0,tokenize:b_},Vx={concrete:!0,name:"codeFenced",tokenize:x_};function x_(e,a,i){const r=this,s={partial:!0,tokenize:O};let u=0,d=0,f;return m;function m(_){return p(_)}function p(_){const I=r.events[r.events.length-1];return u=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(_)}function y(_){return _===f?(d++,e.consume(_),y):d<3?i(_):(e.exit("codeFencedFenceSequence"),mt(_)?wt(e,g,"whitespace")(_):g(_))}function g(_){return _===null||Ze(_)?(e.exit("codeFencedFence"),r.interrupt?a(_):e.check(Fx,k,M)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),j(_))}function j(_){return _===null||Ze(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(_)):mt(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),wt(e,b,"whitespace")(_)):_===96&&_===f?i(_):(e.consume(_),j)}function b(_){return _===null||Ze(_)?g(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(_))}function S(_){return _===null||Ze(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(_)):_===96&&_===f?i(_):(e.consume(_),S)}function k(_){return e.attempt(s,M,N)(_)}function N(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),T}function T(_){return u>0&&mt(_)?wt(e,A,"linePrefix",u+1)(_):A(_)}function A(_){return _===null||Ze(_)?e.check(Fx,k,M)(_):(e.enter("codeFlowValue"),C(_))}function C(_){return _===null||Ze(_)?(e.exit("codeFlowValue"),A(_)):(e.consume(_),C)}function M(_){return e.exit("codeFenced"),a(_)}function O(_,I,V){let X=0;return L;function L(F){return _.enter("lineEnding"),_.consume(F),_.exit("lineEnding"),H}function H(F){return _.enter("codeFencedFence"),mt(F)?wt(_,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):q(F)}function q(F){return F===f?(_.enter("codeFencedFenceSequence"),Z(F)):V(F)}function Z(F){return F===f?(X++,_.consume(F),Z):X>=d?(_.exit("codeFencedFenceSequence"),mt(F)?wt(_,$,"whitespace")(F):$(F)):V(F)}function $(F){return F===null||Ze(F)?(_.exit("codeFencedFence"),I(F)):V(F)}}}function b_(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 up={name:"codeIndented",tokenize:w_},j_={partial:!0,tokenize:S_};function w_(e,a,i){const r=this;return s;function s(p){return e.enter("codeIndented"),wt(e,u,"linePrefix",5)(p)}function u(p){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(p):i(p)}function d(p){return p===null?m(p):Ze(p)?e.attempt(j_,d,m)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Ze(p)?(e.exit("codeFlowValue"),d(p)):(e.consume(p),f)}function m(p){return e.exit("codeIndented"),a(p)}}function S_(e,a,i){const r=this;return s;function s(d){return r.parser.lazy[r.now().line]?i(d):Ze(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):wt(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):Ze(d)?s(d):i(d)}}const k_={name:"codeText",previous:N_,resolve:C_,tokenize:E_};function C_(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 N_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function E_(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)):Ze(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||Ze(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),p)}function y(g){return g===96?(e.consume(g),s++,y):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),a(g)):(u.type="codeTextData",p(g))}}class T_{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&&jc(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),jc(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),jc(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);jc(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);jc(this.left,i.reverse())}}}function jc(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 x5(e){const a={};let i=-1,r,s,u,d,f,m,p;const y=new T_(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,A_(y,i)),i=a[i],p=!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 Oa(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function A_(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=[],p={};let y,g,j=-1,b=i,S=0,k=0;const N=[k];for(;b;){for(;e.get(++s)[1]!==b;);u.push(s),b._tokenizer||(y=r.sliceStream(b),b.next||y.push(null),g&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=i;++j<f.length;)f[j][0]==="exit"&&f[j-1][0]==="enter"&&f[j][1].type===f[j-1][1].type&&f[j][1].start.line!==f[j][1].end.line&&(k=j+1,N.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):N.pop(),j=N.length;j--;){const T=f.slice(N[j],N[j+1]),A=u.pop();m.push([A,A+T.length-1]),e.splice(A,2,T)}for(m.reverse(),j=-1;++j<m.length;)p[S+m[j][0]]=S+m[j][1],S+=m[j][1]-m[j][0]-1;return p}const M_={resolve:R_,tokenize:O_},__={partial:!0,tokenize:z_};function R_(e){return x5(e),e}function O_(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):Ze(f)?e.check(__,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 z_(e,a,i){const r=this;return s;function s(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),wt(e,u,"linePrefix")}function u(d){if(d===null||Ze(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 b5(e,a,i,r,s,u,d,f,m){const p=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),j):T===null||T===32||T===41||Xd(T)?i(T):(e.enter(r),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(T))}function j(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"}),b(T))}function b(T){return T===62?(e.exit("chunkString"),e.exit(f),j(T)):T===null||T===60||Ze(T)?i(T):(e.consume(T),T===92?S:b)}function S(T){return T===60||T===62||T===92?(e.consume(T),b):b(T)}function k(T){return!y&&(T===null||T===41||It(T))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(r),a(T)):y<p&&T===40?(e.consume(T),y++,k):T===41?(e.consume(T),y--,k):T===null||T===32||T===40||Xd(T)?i(T):(e.consume(T),T===92?N:k)}function N(T){return T===40||T===41||T===92?(e.consume(T),k):k(T)}}function j5(e,a,i,r,s,u){const d=this;let f=0,m;return p;function p(b){return e.enter(r),e.enter(s),e.consume(b),e.exit(s),e.enter(u),y}function y(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?i(b):b===93?(e.exit(u),e.enter(s),e.consume(b),e.exit(s),e.exit(r),a):Ze(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Ze(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),m||(m=!mt(b)),b===92?j:g)}function j(b){return b===91||b===92||b===93?(e.consume(b),f++,g):g(b)}}function w5(e,a,i,r,s,u){let d;return f;function f(j){return j===34||j===39||j===40?(e.enter(r),e.enter(s),e.consume(j),e.exit(s),d=j===40?41:j,m):i(j)}function m(j){return j===d?(e.enter(s),e.consume(j),e.exit(s),e.exit(r),a):(e.enter(u),p(j))}function p(j){return j===d?(e.exit(u),m(d)):j===null?i(j):Ze(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),wt(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===d||j===null||Ze(j)?(e.exit("chunkString"),p(j)):(e.consume(j),j===92?g:y)}function g(j){return j===d||j===92?(e.consume(j),y):y(j)}}function Cc(e,a){let i;return r;function r(s){return Ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,r):mt(s)?wt(e,r,i?"linePrefix":"lineSuffix")(s):a(s)}}const D_={name:"definition",tokenize:B_},L_={partial:!0,tokenize:I_};function B_(e,a,i){const r=this;let s;return u;function u(b){return e.enter("definition"),d(b)}function d(b){return j5.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return s=fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):i(b)}function m(b){return It(b)?Cc(e,p)(b):p(b)}function p(b){return b5(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(L_,g,g)(b)}function g(b){return mt(b)?wt(e,j,"whitespace")(b):j(b)}function j(b){return b===null||Ze(b)?(e.exit("definition"),r.parser.defined.push(s),a(b)):i(b)}}function I_(e,a,i){return r;function r(f){return It(f)?Cc(e,s)(f):i(f)}function s(f){return w5(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return mt(f)?wt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Ze(f)?a(f):i(f)}}const P_={name:"hardBreakEscape",tokenize:H_};function H_(e,a,i){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return Ze(u)?(e.exit("hardBreakEscape"),a(u)):i(u)}}const q_={name:"headingAtx",resolve:U_,tokenize:F_};function U_(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"},Oa(e,r,i-r+1,[["enter",s,a],["enter",u,a],["exit",u,a],["exit",s,a]])),e}function F_(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||It(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||Ze(y)?(e.exit("atxHeading"),a(y)):mt(y)?wt(e,f,"whitespace")(y):(e.enter("atxHeadingText"),p(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function p(y){return y===null||y===35||It(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),p)}}const V_=["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"],$x=["pre","script","style","textarea"],$_={concrete:!0,name:"htmlFlow",resolveTo:K_,tokenize:X_},G_={partial:!0,tokenize:Z_},Y_={partial:!0,tokenize:Q_};function K_(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 X_(e,a,i){const r=this;let s,u,d,f,m;return p;function p(R){return y(R)}function y(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),g}function g(R){return R===33?(e.consume(R),j):R===47?(e.consume(R),u=!0,k):R===63?(e.consume(R),s=3,r.interrupt?a:z):ea(R)?(e.consume(R),d=String.fromCharCode(R),N):i(R)}function j(R){return R===45?(e.consume(R),s=2,b):R===91?(e.consume(R),s=5,f=0,S):ea(R)?(e.consume(R),s=4,r.interrupt?a:z):i(R)}function b(R){return R===45?(e.consume(R),r.interrupt?a:z):i(R)}function S(R){const B="CDATA[";return R===B.charCodeAt(f++)?(e.consume(R),f===B.length?r.interrupt?a:q:S):i(R)}function k(R){return ea(R)?(e.consume(R),d=String.fromCharCode(R),N):i(R)}function N(R){if(R===null||R===47||R===62||It(R)){const B=R===47,W=d.toLowerCase();return!B&&!u&&$x.includes(W)?(s=1,r.interrupt?a(R):q(R)):V_.includes(d.toLowerCase())?(s=6,B?(e.consume(R),T):r.interrupt?a(R):q(R)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(R):u?A(R):C(R))}return R===45||Fn(R)?(e.consume(R),d+=String.fromCharCode(R),N):i(R)}function T(R){return R===62?(e.consume(R),r.interrupt?a:q):i(R)}function A(R){return mt(R)?(e.consume(R),A):L(R)}function C(R){return R===47?(e.consume(R),L):R===58||R===95||ea(R)?(e.consume(R),M):mt(R)?(e.consume(R),C):L(R)}function M(R){return R===45||R===46||R===58||R===95||Fn(R)?(e.consume(R),M):O(R)}function O(R){return R===61?(e.consume(R),_):mt(R)?(e.consume(R),O):C(R)}function _(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),m=R,I):mt(R)?(e.consume(R),_):V(R)}function I(R){return R===m?(e.consume(R),m=null,X):R===null||Ze(R)?i(R):(e.consume(R),I)}function V(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||It(R)?O(R):(e.consume(R),V)}function X(R){return R===47||R===62||mt(R)?C(R):i(R)}function L(R){return R===62?(e.consume(R),H):i(R)}function H(R){return R===null||Ze(R)?q(R):mt(R)?(e.consume(R),H):i(R)}function q(R){return R===45&&s===2?(e.consume(R),K):R===60&&s===1?(e.consume(R),U):R===62&&s===4?(e.consume(R),ne):R===63&&s===3?(e.consume(R),z):R===93&&s===5?(e.consume(R),ie):Ze(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(G_,re,Z)(R)):R===null||Ze(R)?(e.exit("htmlFlowData"),Z(R)):(e.consume(R),q)}function Z(R){return e.check(Y_,$,re)(R)}function $(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),F}function F(R){return R===null||Ze(R)?Z(R):(e.enter("htmlFlowData"),q(R))}function K(R){return R===45?(e.consume(R),z):q(R)}function U(R){return R===47?(e.consume(R),d="",P):q(R)}function P(R){if(R===62){const B=d.toLowerCase();return $x.includes(B)?(e.consume(R),ne):q(R)}return ea(R)&&d.length<8?(e.consume(R),d+=String.fromCharCode(R),P):q(R)}function ie(R){return R===93?(e.consume(R),z):q(R)}function z(R){return R===62?(e.consume(R),ne):R===45&&s===2?(e.consume(R),z):q(R)}function ne(R){return R===null||Ze(R)?(e.exit("htmlFlowData"),re(R)):(e.consume(R),ne)}function re(R){return e.exit("htmlFlow"),a(R)}}function Q_(e,a,i){const r=this;return s;function s(d){return Ze(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 Z_(e,a,i){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt($c,a,i)}}const J_={name:"htmlText",tokenize:W_};function W_(e,a,i){const r=this;let s,u,d;return f;function f(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),p):z===47?(e.consume(z),O):z===63?(e.consume(z),C):ea(z)?(e.consume(z),V):i(z)}function p(z){return z===45?(e.consume(z),y):z===91?(e.consume(z),u=0,S):ea(z)?(e.consume(z),A):i(z)}function y(z){return z===45?(e.consume(z),b):i(z)}function g(z){return z===null?i(z):z===45?(e.consume(z),j):Ze(z)?(d=g,U(z)):(e.consume(z),g)}function j(z){return z===45?(e.consume(z),b):g(z)}function b(z){return z===62?K(z):z===45?j(z):g(z)}function S(z){const ne="CDATA[";return z===ne.charCodeAt(u++)?(e.consume(z),u===ne.length?k:S):i(z)}function k(z){return z===null?i(z):z===93?(e.consume(z),N):Ze(z)?(d=k,U(z)):(e.consume(z),k)}function N(z){return z===93?(e.consume(z),T):k(z)}function T(z){return z===62?K(z):z===93?(e.consume(z),T):k(z)}function A(z){return z===null||z===62?K(z):Ze(z)?(d=A,U(z)):(e.consume(z),A)}function C(z){return z===null?i(z):z===63?(e.consume(z),M):Ze(z)?(d=C,U(z)):(e.consume(z),C)}function M(z){return z===62?K(z):C(z)}function O(z){return ea(z)?(e.consume(z),_):i(z)}function _(z){return z===45||Fn(z)?(e.consume(z),_):I(z)}function I(z){return Ze(z)?(d=I,U(z)):mt(z)?(e.consume(z),I):K(z)}function V(z){return z===45||Fn(z)?(e.consume(z),V):z===47||z===62||It(z)?X(z):i(z)}function X(z){return z===47?(e.consume(z),K):z===58||z===95||ea(z)?(e.consume(z),L):Ze(z)?(d=X,U(z)):mt(z)?(e.consume(z),X):K(z)}function L(z){return z===45||z===46||z===58||z===95||Fn(z)?(e.consume(z),L):H(z)}function H(z){return z===61?(e.consume(z),q):Ze(z)?(d=H,U(z)):mt(z)?(e.consume(z),H):X(z)}function q(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(e.consume(z),s=z,Z):Ze(z)?(d=q,U(z)):mt(z)?(e.consume(z),q):(e.consume(z),$)}function Z(z){return z===s?(e.consume(z),s=void 0,F):z===null?i(z):Ze(z)?(d=Z,U(z)):(e.consume(z),Z)}function $(z){return z===null||z===34||z===39||z===60||z===61||z===96?i(z):z===47||z===62||It(z)?X(z):(e.consume(z),$)}function F(z){return z===47||z===62||It(z)?X(z):i(z)}function K(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),a):i(z)}function U(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),P}function P(z){return mt(z)?wt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):ie(z)}function ie(z){return e.enter("htmlTextData"),d(z)}}const wg={name:"labelEnd",resolveAll:aR,resolveTo:iR,tokenize:rR},eR={tokenize:lR},tR={tokenize:oR},nR={tokenize:sR};function aR(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&&Oa(e,0,e.length,i),e}function iR(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}},p={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",p,a]],f=Ka(f,e.slice(u+1,u+r+3)),f=Ka(f,[["enter",y,a]]),f=Ka(f,yf(a.parser.constructs.insideSpan.null,e.slice(u+r+4,d-3),a)),f=Ka(f,[["exit",y,a],e[d-2],e[d-1],["exit",p,a]]),f=Ka(f,e.slice(d+1)),f=Ka(f,[["exit",m,a]]),Oa(e,u,e.length,f),e}function rR(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(j){return u?u._inactive?g(j):(d=r.parser.defined.includes(fi(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(j),e.exit("labelMarker"),e.exit("labelEnd"),m):i(j)}function m(j){return j===40?e.attempt(eR,y,d?y:g)(j):j===91?e.attempt(tR,y,d?p:g)(j):d?y(j):g(j)}function p(j){return e.attempt(nR,y,g)(j)}function y(j){return a(j)}function g(j){return u._balanced=!0,i(j)}}function lR(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 It(g)?Cc(e,u)(g):u(g)}function u(g){return g===41?y(g):b5(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function d(g){return It(g)?Cc(e,m)(g):y(g)}function f(g){return i(g)}function m(g){return g===34||g===39||g===40?w5(e,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function p(g){return It(g)?Cc(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 oR(e,a,i){const r=this;return s;function s(f){return j5.call(r,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return r.parser.defined.includes(fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(f):i(f)}function d(f){return i(f)}}function sR(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 cR={name:"labelStartImage",resolveAll:wg.resolveAll,tokenize:uR};function uR(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 dR={name:"labelStartLink",resolveAll:wg.resolveAll,tokenize:fR};function fR(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 dp={name:"lineEnding",tokenize:hR};function hR(e,a){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),wt(e,a,"linePrefix")}}const Pd={name:"thematicBreak",tokenize:mR};function mR(e,a,i){let r=0,s;return u;function u(p){return e.enter("thematicBreak"),d(p)}function d(p){return s=p,f(p)}function f(p){return p===s?(e.enter("thematicBreakSequence"),m(p)):r>=3&&(p===null||Ze(p))?(e.exit("thematicBreak"),a(p)):i(p)}function m(p){return p===s?(e.consume(p),r++,m):(e.exit("thematicBreakSequence"),mt(p)?wt(e,f,"whitespace")(p):f(p))}}const da={continuation:{tokenize:yR},exit:bR,name:"list",tokenize:vR},pR={partial:!0,tokenize:jR},gR={partial:!0,tokenize:xR};function vR(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(b){const S=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:f0(b)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Pd,i,p)(b):p(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return i(b)}function m(b){return f0(b)&&++d<10?(e.consume(b),m):(!r.interrupt||d<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),p(b)):i(b)}function p(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check($c,r.interrupt?i:y,e.attempt(pR,j,g))}function y(b){return r.containerState.initialBlankLine=!0,u++,j(b)}function g(b){return mt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),j):i(b)}function j(b){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,a(b)}}function yR(e,a,i){const r=this;return r.containerState._closeFlow=void 0,e.check($c,s,u);function s(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,wt(e,a,"listItemIndent",r.containerState.size+1)(f)}function u(f){return r.containerState.furtherBlankLines||!mt(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(gR,a,d)(f))}function d(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,wt(e,e.attempt(da,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function xR(e,a,i){const r=this;return wt(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 bR(e){e.exit(this.containerState.type)}function jR(e,a,i){const r=this;return wt(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!mt(u)&&d&&d[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const Gx={name:"setextUnderline",resolveTo:wR,tokenize:SR};function wR(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 SR(e,a,i){const r=this;let s;return u;function u(p){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=p,d(p)):i(p)}function d(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===s?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),mt(p)?wt(e,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Ze(p)?(e.exit("setextHeadingLine"),a(p)):i(p)}}const kR={tokenize:CR};function CR(e){const a=this,i=e.attempt($c,r,e.attempt(this.parser.constructs.flowInitial,s,wt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(M_,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 NR={resolveAll:k5()},ER=S5("string"),TR=S5("text");function S5(e){return{resolveAll:k5(e==="text"?AR: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 p(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 p(y)?(i.exit("data"),u(y)):(i.consume(y),m)}function p(y){if(y===null)return!0;const g=s[y];let j=-1;if(g)for(;++j<g.length;){const b=g[j];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function k5(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 AR(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 p=s[u];if(typeof p=="string"){for(d=p.length;p.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(p===-2)m=!0,f++;else if(p!==-1){u++;break}}if(a._contentTypeTextTrailing&&i===e.length&&(f=0),f){const p={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={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(i,0,["enter",p,a],["exit",p,a]),i+=2)}i++}return e}const MR={42:da,43:da,45:da,48:da,49:da,50:da,51:da,52:da,53:da,54:da,55:da,56:da,57:da,62:g5},_R={91:D_},RR={[-2]:up,[-1]:up,32:up},OR={35:q_,42:Pd,45:[Gx,Pd],60:$_,61:Gx,95:Pd,96:Vx,126:Vx},zR={38:y5,92:v5},DR={[-5]:dp,[-4]:dp,[-3]:dp,33:cR,38:y5,42:h0,60:[d_,J_],91:dR,92:[P_,v5],93:wg,95:h0,96:k_},LR={null:[h0,NR]},BR={null:[42,95]},IR={null:[]},PR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:BR,contentInitial:_R,disable:IR,document:MR,flow:OR,flowInitial:RR,insideSpan:LR,string:zR,text:DR},Symbol.toStringTag,{value:"Module"}));function HR(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:I(O),check:I(_),consume:A,enter:C,exit:M,interrupt:I(_,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:j,sliceStream:b,write:g};let y=a.tokenize.call(p,m);return a.resolveAll&&u.push(a),p;function g(H){return d=Ka(d,H),N(),d[d.length-1]!==null?[]:(V(a,0),p.events=yf(u,p.events,p),p.events)}function j(H,q){return UR(b(H),q)}function b(H){return qR(d,H)}function S(){const{_bufferIndex:H,_index:q,line:Z,column:$,offset:F}=r;return{_bufferIndex:H,_index:q,line:Z,column:$,offset:F}}function k(H){s[H.line]=H.column,L()}function N(){let H;for(;r._index<d.length;){const q=d[r._index];if(typeof q=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<q.length;)T(q.charCodeAt(r._bufferIndex));else T(q)}}function T(H){y=y(H)}function A(H){Ze(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,L()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===d[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=H}function C(H,q){const Z=q||{};return Z.type=H,Z.start=S(),p.events.push(["enter",Z,p]),f.push(Z),Z}function M(H){const q=f.pop();return q.end=S(),p.events.push(["exit",q,p]),q}function O(H,q){V(H,q.from)}function _(H,q){q.restore()}function I(H,q){return Z;function Z($,F,K){let U,P,ie,z;return Array.isArray($)?re($):"tokenize"in $?re([$]):ne($);function ne(fe){return me;function me(pe){const Ce=pe!==null&&fe[pe],Ae=pe!==null&&fe.null,xe=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return re(xe)(pe)}}function re(fe){return U=fe,P=0,fe.length===0?K:R(fe[P])}function R(fe){return me;function me(pe){return z=X(),ie=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?W():fe.tokenize.call(q?Object.assign(Object.create(p),q):p,m,B,W)(pe)}}function B(fe){return H(ie,z),F}function W(fe){return z.restore(),++P<U.length?R(U[P]):K}}}function V(H,q){H.resolveAll&&!u.includes(H)&&u.push(H),H.resolve&&Oa(p.events,q,p.events.length-q,H.resolve(p.events.slice(q),p)),H.resolveTo&&(p.events=H.resolveTo(p.events,p))}function X(){const H=S(),q=p.previous,Z=p.currentConstruct,$=p.events.length,F=Array.from(f);return{from:$,restore:K};function K(){r=H,p.previous=q,p.currentConstruct=Z,p.events.length=$,f=F,L()}}function L(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function qR(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 UR(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=`
|
|
571
|
+
`;break}case-3:{d=`\r
|
|
572
|
+
`;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 FR(e){const r={constructs:m5([PR,...(e||{}).extensions||[]]),content:s(i_),defined:[],document:s(l_),flow:s(kR),lazy:{},string:s(ER),text:s(TR)};return r;function s(u){return d;function d(f){return HR(r,u,f)}}}function VR(e){for(;!x5(e););return e}const Yx=/[\0\t\n\r]/g;function $R(){let e=1,a="",i=!0,r;return s;function s(u,d,f){const m=[];let p,y,g,j,b;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(Yx.lastIndex=g,p=Yx.exec(u),j=p&&p.index!==void 0?p.index:u.length,b=u.charCodeAt(j),!p){a=u.slice(g);break}if(b===10&&g===j&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),g<j&&(m.push(u.slice(g,j)),e+=j-g),b){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=j+1}return f&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const GR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YR(e){return e.replace(GR,KR)}function KR(e,a,i){if(a)return a;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),u=s===120||s===88;return p5(i.slice(u?2:1),u?16:10)}return jg(i)||e}const C5={}.hasOwnProperty;function XR(e,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),QR(i)(VR(FR(i).document().write($R()(e,a,!0))))}function QR(e){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Pt),autolinkProtocol:X,autolinkEmail:X,atxHeading:u(Be),blockQuote:u(Ae),characterEscape:X,characterReference:X,codeFenced:u(xe),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(xe,d),codeText:u(oe,d),codeTextData:X,data:X,codeFlowValue:X,definition:u(Ee),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(Xe),hardBreakEscape:u(at),hardBreakTrailing:u(at),htmlFlow:u(Qe,d),htmlFlowData:X,htmlText:u(Qe,d),htmlTextData:X,image:u(We),label:d,link:u(Pt),listItem:u(en),listItemValue:j,listOrdered:u(vn,g),listUnordered:u(vn),paragraph:u(cn),reference:R,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Be),strong:u($n),thematicBreak:u(Za)},exit:{atxHeading:m(),atxHeadingSequence:O,autolink:m(),autolinkEmail:Ce,autolinkProtocol:pe,blockQuote:m(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:fe,characterReference:me,codeFenced:m(N),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:m(T),codeText:m(F),codeTextData:L,data:L,definition:m(),definitionDestinationString:M,definitionLabelString:A,definitionTitleString:C,emphasis:m(),hardBreakEscape:m(q),hardBreakTrailing:m(q),htmlFlow:m(Z),htmlFlowData:L,htmlText:m($),htmlTextData:L,image:m(U),label:ie,labelText:P,lineEnding:H,link:m(K),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:B,resourceDestinationString:z,resourceTitleString:ne,resource:re,setextHeading:m(V),setextHeadingLineSequence:I,setextHeadingText:_,strong:m(),thematicBreak:m()}};N5(a,(e||{}).mdastExtensions||[]);const i={};return r;function r(ge){let ke={type:"root",children:[]};const Ye={stack:[ke],tokenStack:[],config:a,enter:f,exit:p,buffer:d,resume:y,data:i},Ke=[];let ct=-1;for(;++ct<ge.length;)if(ge[ct][1].type==="listOrdered"||ge[ct][1].type==="listUnordered")if(ge[ct][0]==="enter")Ke.push(ct);else{const At=Ke.pop();ct=s(ge,At,ct)}for(ct=-1;++ct<ge.length;){const At=a[ge[ct][0]];C5.call(At,ge[ct][1].type)&&At[ge[ct][1].type].call(Object.assign({sliceSerialize:ge[ct][2].sliceSerialize},Ye),ge[ct][1])}if(Ye.tokenStack.length>0){const At=Ye.tokenStack[Ye.tokenStack.length-1];(At[1]||Kx).call(Ye,void 0,At[0])}for(ke.position={start:ll(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:ll(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<a.transforms.length;)ke=a.transforms[ct](ke)||ke;return ke}function s(ge,ke,Ye){let Ke=ke-1,ct=-1,At=!1,Xt,de,_e,Re;for(;++Ke<=Ye;){const Ie=ge[Ke];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ct++:ct--,Re=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(Xt&&!Re&&!ct&&!_e&&(_e=Ke),Re=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Re=void 0}if(!ct&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ct===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(Xt){let Fe=Ke;for(de=void 0;Fe--;){const it=ge[Fe];if(it[1].type==="lineEnding"||it[1].type==="lineEndingBlank"){if(it[0]==="exit")continue;de&&(ge[de][1].type="lineEndingBlank",At=!0),it[1].type="lineEnding",de=Fe}else if(!(it[1].type==="linePrefix"||it[1].type==="blockQuotePrefix"||it[1].type==="blockQuotePrefixWhitespace"||it[1].type==="blockQuoteMarker"||it[1].type==="listItemIndent"))break}_e&&(!de||_e<de)&&(Xt._spread=!0),Xt.end=Object.assign({},de?ge[de][1].start:Ie[1].end),ge.splice(de||Ke,0,["exit",Xt,Ie[2]]),Ke++,Ye++}if(Ie[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};Xt=Fe,ge.splice(Ke,0,["enter",Fe,Ie[2]]),Ke++,Ye++,_e=void 0,Re=!0}}}return ge[ke][1]._spread=At,Ye}function u(ge,ke){return Ye;function Ye(Ke){f.call(this,ge(Ke),Ke),ke&&ke.call(this,Ke)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(ge,ke,Ye){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([ke,Ye||void 0]),ge.position={start:ll(ke.start),end:void 0}}function m(ge){return ke;function ke(Ye){ge&&ge.call(this,Ye),p.call(this,Ye)}}function p(ge,ke){const Ye=this.stack.pop(),Ke=this.tokenStack.pop();if(Ke)Ke[0].type!==ge.type&&(ke?ke.call(this,ge,Ke[0]):(Ke[1]||Kx).call(this,ge,Ke[0]));else throw new Error("Cannot close `"+ge.type+"` ("+kc({start:ge.start,end:ge.end})+"): it’s not open");Ye.position.end=ll(ge.end)}function y(){return bg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function j(ge){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=ge}function S(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=ge}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/(\r?\n|\r)$/g,"")}function A(ge){const ke=this.resume(),Ye=this.stack[this.stack.length-1];Ye.label=ke,Ye.identifier=fi(this.sliceSerialize(ge)).toLowerCase()}function C(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function M(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function O(ge){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Ye=this.sliceSerialize(ge).length;ke.depth=Ye}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function I(ge){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function X(ge){const Ye=this.stack[this.stack.length-1].children;let Ke=Ye[Ye.length-1];(!Ke||Ke.type!=="text")&&(Ke=An(),Ke.position={start:ll(ge.start),end:void 0},Ye.push(Ke)),this.stack.push(Ke)}function L(ge){const ke=this.stack.pop();ke.value+=this.sliceSerialize(ge),ke.position.end=ll(ge.end)}function H(ge){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ye=ke.children[ke.children.length-1];Ye.position.end=ll(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ke.type)&&(X.call(this,ge),L.call(this,ge))}function q(){this.data.atHardBreak=!0}function Z(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function $(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function F(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function K(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function U(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function P(ge){const ke=this.sliceSerialize(ge),Ye=this.stack[this.stack.length-2];Ye.label=YR(ke),Ye.identifier=fi(ke).toLowerCase()}function ie(){const ge=this.stack[this.stack.length-1],ke=this.resume(),Ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ye.type==="link"){const Ke=ge.children;Ye.children=Ke}else Ye.alt=ke}function z(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function ne(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function re(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function B(ge){const ke=this.resume(),Ye=this.stack[this.stack.length-1];Ye.label=ke,Ye.identifier=fi(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function W(ge){this.data.characterReferenceType=ge.type}function fe(ge){const ke=this.sliceSerialize(ge),Ye=this.data.characterReferenceType;let Ke;Ye?(Ke=p5(ke,Ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ke=jg(ke);const ct=this.stack[this.stack.length-1];ct.value+=Ke}function me(ge){const ke=this.stack.pop();ke.position.end=ll(ge.end)}function pe(ge){L.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(ge)}function Ce(ge){L.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(ge)}function Ae(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xe(){return{type:"emphasis",children:[]}}function Be(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function We(){return{type:"image",title:null,url:"",alt:null}}function Pt(){return{type:"link",title:null,url:"",children:[]}}function vn(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function en(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function cn(){return{type:"paragraph",children:[]}}function $n(){return{type:"strong",children:[]}}function An(){return{type:"text",value:""}}function Za(){return{type:"thematicBreak"}}}function ll(e){return{line:e.line,column:e.column,offset:e.offset}}function N5(e,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?N5(e,r):ZR(e,r)}}function ZR(e,a){let i;for(i in a)if(C5.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 Kx(e,a){throw e?new Error("Cannot close `"+e.type+"` ("+kc({start:e.start,end:e.end})+"): a different token (`"+a.type+"`, "+kc({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+kc({start:a.start,end:a.end})+") is still open")}function JR(e){const a=this;a.parser=i;function i(r){return XR(r,{...a.data("settings"),...e,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function WR(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 eO(e,a){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(a,i),[e.applyData(a,i),{type:"text",value:`
|
|
573
|
+
`}]}function tO(e,a){const i=a.value?a.value+`
|
|
574
|
+
`:"",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 nO(e,a){const i={type:"element",tagName:"del",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function aO(e,a){const i={type:"element",tagName:"em",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function iO(e,a){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),s=Ss(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 p={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(a,p),e.applyData(a,p)}function rO(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 lO(e,a){if(e.options.allowDangerousHtml){const i={type:"raw",value:a.value};return e.patch(a,i),e.applyData(a,i)}}function E5(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 oO(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return E5(e,a);const s={src:Ss(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 sO(e,a){const i={src:Ss(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 cO(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 uO(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return E5(e,a);const s={href:Ss(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 dO(e,a){const i={href:Ss(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 fO(e,a,i){const r=e.all(a),s=i?hO(i):T5(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:`
|
|
575
|
+
`}),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:`
|
|
576
|
+
`});const p={type:"element",tagName:"li",properties:u,children:d};return e.patch(a,p),e.applyData(a,p)}function hO(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=T5(i[r])}return a}function T5(e){const a=e.spread;return a??e.children.length>1}function mO(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 pO(e,a){const i={type:"element",tagName:"p",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function gO(e,a){const i={type:"root",children:e.wrap(e.all(a))};return e.patch(a,i),e.applyData(a,i)}function vO(e,a){const i={type:"element",tagName:"strong",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function yO(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=gg(a.children[1]),m=o5(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 xO(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 p=[];for(;++m<f;){const g=a.children[m],j={},b=d?d[m]:void 0;b&&(j.align=b);let S={type:"element",tagName:u,properties:j,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),p.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(a,y),e.applyData(a,y)}function bO(e,a){const i={type:"element",tagName:"td",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}const Xx=9,Qx=32;function jO(e){const a=String(e),i=/\r?\n|\r/g;let r=i.exec(a),s=0;const u=[];for(;r;)u.push(Zx(a.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(a);return u.push(Zx(a.slice(s),s>0,!1)),u.join("")}function Zx(e,a,i){let r=0,s=e.length;if(a){let u=e.codePointAt(r);for(;u===Xx||u===Qx;)r++,u=e.codePointAt(r)}if(i){let u=e.codePointAt(s-1);for(;u===Xx||u===Qx;)s--,u=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function wO(e,a){const i={type:"text",value:jO(String(a.value))};return e.patch(a,i),e.applyData(a,i)}function SO(e,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(a,i),e.applyData(a,i)}const kO={blockquote:WR,break:eO,code:tO,delete:nO,emphasis:aO,footnoteReference:iO,heading:rO,html:lO,imageReference:oO,image:sO,inlineCode:cO,linkReference:uO,link:dO,listItem:fO,list:mO,paragraph:pO,root:gO,strong:vO,table:yO,tableCell:bO,tableRow:xO,text:wO,thematicBreak:SO,toml:wd,yaml:wd,definition:wd,footnoteDefinition:wd};function wd(){}const A5=-1,xf=0,Nc=1,Qd=2,Sg=3,kg=4,Cg=5,Ng=6,M5=7,_5=8,{defineProperty:CO}=Object,R5=typeof self=="object"?self:globalThis,Jx=(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 R5[e](a)},NO=(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 xf:case A5:return i(d,s);case Nc:{const f=i([],s);for(const m of d)f.push(r(m));return f}case Qd:{const f=i({},s);for(const[m,p]of d){const y=r(m),g=r(p);y==="__proto__"?CO(f,y,{value:g,configurable:!0,enumerable:!0,writable:!0}):f[y]=g}return f}case Sg:return i(new Date(d),s);case kg:{const{source:f,flags:m}=d;return i(new RegExp(f,m),s)}case Cg:{const f=i(new Map,s);for(const[m,p]of d)f.set(r(m),r(p));return f}case Ng:{const f=i(new Set,s);for(const m of d)f.add(r(m));return f}case M5:{const{name:f,message:m}=d;return i(typeof R5[f]=="function"?Jx(f,m):new Error(m),s)}case _5: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(Jx(u,d),s)};return r},Wx=e=>NO(new Map,e)(0),Jl="",{toString:EO}={},{keys:TO,is:AO}=Object,wc=e=>{const a=typeof e;if(a!=="object"||!e)return[xf,a];const i=EO.call(e).slice(8,-1);switch(i){case"Array":return[Nc,Jl];case"Object":return[Qd,Jl];case"Date":return[Sg,Jl];case"RegExp":return[kg,Jl];case"Map":return[Cg,Jl];case"Set":return[Ng,Jl];case"DataView":return[Nc,i]}return i.includes("Array")?[Nc,i]:e instanceof Error?[M5,e.name||"Error"]:[Qd,i]},Sd=([e,a])=>e===xf&&(a==="function"||a==="symbol"),MO=(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]=wc(d);switch(f){case xf:{let y=d;switch(m){case"bigint":f=_5,y=d.toString();break;case"number":if(!d&&AO(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([A5],d)}return s([f,y],d)}case Nc:{if(m){let j=d;return m==="DataView"?j=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(j=new Uint8Array(d)),s([m,[...j]],d)}const y=[],g=s([f,y],d);for(const j of d)y.push(u(j));return g}case Qd:{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 j of TO(d))(e||!Sd(wc(d[j])))&&y.push([u(j),u(d[j])]);return g}case Sg:return s([f,isNaN(d.getTime())?Jl:d.toISOString()],d);case kg:{const{source:y,flags:g}=d;return s([f,{source:y,flags:g}],d)}case Cg:{const y=[],g=s([f,y],d);for(const[j,b]of d)(e||!(Sd(wc(j))||Sd(wc(b))))&&y.push([u(j),u(b)]);return g}case Ng:{const y=[],g=s([f,y],d);for(const j of d)(e||!Sd(wc(j)))&&y.push(u(j));return g}}const{message:p}=d;return s([f,{name:m,message:p}],d)};return u},eb=(e,{json:a,lossy:i}={})=>{const r=[];return MO(!(a||i),!!a,new Map,r)(e),r},Zd=typeof structuredClone=="function"?(e,a)=>a&&("json"in a||"lossy"in a)?Wx(eb(e,a)):structuredClone(e):(e,a)=>Wx(eb(e,a));function _O(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 RO(e,a){return"Back to reference "+(e+1)+(a>1?"-"+a:"")}function OO(e){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||_O,r=e.options.footnoteBackLabel||RO,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 p=e.footnoteById.get(e.footnoteOrder[m]);if(!p)continue;const y=e.all(p),g=String(p.identifier).toUpperCase(),j=Ss(g.toLowerCase());let b=0;const S=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++b<=k;){S.length>0&&S.push({type:"text",value:" "});let A=typeof i=="string"?i:i(m,b);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+j+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(m,b),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const N=y[y.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else y.push(...S);const T={type:"element",tagName:"li",properties:{id:a+"fn-"+j},children:e.wrap(y,!0)};e.patch(p,T),f.push(T)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Zd(d),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
577
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
578
|
+
`}]}}const bf=(function(e){if(e==null)return BO;if(typeof e=="function")return jf(e);if(typeof e=="object")return Array.isArray(e)?zO(e):DO(e);if(typeof e=="string")return LO(e);throw new Error("Expected function, string, or object as test")});function zO(e){const a=[];let i=-1;for(;++i<e.length;)a[i]=bf(e[i]);return jf(r);function r(...s){let u=-1;for(;++u<a.length;)if(a[u].apply(this,s))return!0;return!1}}function DO(e){const a=e;return jf(i);function i(r){const s=r;let u;for(u in e)if(s[u]!==a[u])return!1;return!0}}function LO(e){return jf(a);function a(i){return i&&i.type===e}}function jf(e){return a;function a(i,r,s){return!!(IO(i)&&e.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function BO(){return!0}function IO(e){return e!==null&&typeof e=="object"&&"type"in e}const O5=[],PO=!0,m0=!1,HO="skip";function z5(e,a,i,r){let s;typeof a=="function"&&typeof i!="function"?(r=i,i=a):s=a;const u=bf(s),d=r?-1:1;f(e,void 0,[])();function f(m,p,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(j,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return j;function j(){let b=O5,S,k,N;if((!a||u(m,p,y[y.length-1]||void 0))&&(b=qO(i(m,y)),b[0]===m0))return b;if("children"in m&&m.children){const T=m;if(T.children&&b[0]!==HO)for(k=(r?T.children.length:-1)+d,N=y.concat(T);k>-1&&k<T.children.length;){const A=T.children[k];if(S=f(A,k,N)(),S[0]===m0)return S;k=typeof S[1]=="number"?S[1]:k+d}}return b}}}function qO(e){return Array.isArray(e)?e:typeof e=="number"?[PO,e]:e==null?O5:[e]}function Eg(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),z5(e,u,f,s);function f(m,p){const y=p[p.length-1],g=y?y.children.indexOf(m):void 0;return d(m,g,y)}}const p0={}.hasOwnProperty,UO={};function FO(e,a){const i=a||UO,r=new Map,s=new Map,u=new Map,d={...kO,...i.handlers},f={all:p,applyData:$O,definitionById:r,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:i,patch:VO,wrap:YO};return Eg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:s,j=String(y.identifier).toUpperCase();g.has(j)||g.set(j,y)}}),f;function m(y,g){const j=y.type,b=f.handlers[j];if(p0.call(f.handlers,j)&&b)return b(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(j)){if("children"in y){const{children:k,...N}=y,T=Zd(N);return T.children=f.all(y),T}return Zd(y)}return(f.options.unknownHandler||GO)(f,y,g)}function p(y){const g=[];if("children"in y){const j=y.children;let b=-1;for(;++b<j.length;){const S=f.one(j[b],y);if(S){if(b&&j[b-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=tb(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=tb(k.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function VO(e,a){e.position&&(a.position=MM(e))}function $O(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,Zd(u)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function GO(e,a){const i=a.data||{},r="value"in a&&!(p0.call(i,"hProperties")||p0.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 YO(e,a){const i=[];let r=-1;for(a&&i.push({type:"text",value:`
|
|
579
|
+
`});++r<e.length;)r&&i.push({type:"text",value:`
|
|
580
|
+
`}),i.push(e[r]);return a&&e.length>0&&i.push({type:"text",value:`
|
|
581
|
+
`}),i}function tb(e){let a=0,i=e.charCodeAt(a);for(;i===9||i===32;)a++,i=e.charCodeAt(a);return e.slice(a)}function nb(e,a){const i=FO(e,a),r=i.one(e,void 0),s=OO(i),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
582
|
+
`},s),u}function KO(e,a){return e&&"run"in e?async function(i,r){const s=nb(i,{file:r,...a});await e.run(s,r)}:function(i,r){return nb(i,{file:r,...e||a})}}function ab(e){if(e)throw e}var fp,ib;function XO(){if(ib)return fp;ib=1;var e=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):a.call(p)==="[object Array]"},u=function(p){if(!p||a.call(p)!=="[object Object]")return!1;var y=e.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!g)return!1;var j;for(j in p);return typeof j>"u"||e.call(p,j)},d=function(p,y){i&&y.name==="__proto__"?i(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue},f=function(p,y){if(y==="__proto__")if(e.call(p,y)){if(r)return r(p,y).value}else return;return p[y]};return fp=function m(){var p,y,g,j,b,S,k=arguments[0],N=1,T=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<T;++N)if(p=arguments[N],p!=null)for(y in p)g=f(k,y),j=f(p,y),k!==j&&(A&&j&&(u(j)||(b=s(j)))?(b?(b=!1,S=g&&s(g)?g:[]):S=g&&u(g)?g:{},d(k,{name:y,newValue:m(A,S,j)})):typeof j<"u"&&d(k,{name:y,newValue:j}));return k},fp}var QO=XO();const hp=N0(QO);function g0(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 ZO(){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,...p){const y=e[++u];let g=-1;if(m){d(m);return}for(;++g<s.length;)(p[g]===null||p[g]===void 0)&&(p[g]=s[g]);s=p,y?JO(y,f)(...p):d(null,...p)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),a}}function JO(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(p){const y=p;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 Oi={basename:WO,dirname:ez,extname:tz,join:nz,sep:"/"};function WO(e,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Gc(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 ez(e){if(Gc(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 tz(e){Gc(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 nz(...e){let a=-1,i;for(;++a<e.length;)Gc(e[a]),e[a]&&(i=i===void 0?e[a]:i+"/"+e[a]);return i===void 0?".":az(i)}function az(e){Gc(e);const a=e.codePointAt(0)===47;let i=iz(e,!a);return i.length===0&&!a&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),a?"/"+i:i}function iz(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 Gc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rz={cwd:lz};function lz(){return"/"}function v0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oz(e){if(typeof e=="string")e=new URL(e);else if(!v0(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 sz(e)}function sz(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 mp=["history","path","basename","stem","extname","dirname"];class D5{constructor(a){let i;a?v0(a)?i={path:a}:typeof a=="string"||cz(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":rz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mp.length;){const u=mp[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)mp.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Oi.basename(this.path):void 0}set basename(a){gp(a,"basename"),pp(a,"basename"),this.path=Oi.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?Oi.dirname(this.path):void 0}set dirname(a){rb(this.basename,"dirname"),this.path=Oi.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?Oi.extname(this.path):void 0}set extname(a){if(pp(a,"extname"),rb(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=Oi.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){v0(a)&&(a=oz(a)),gp(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?Oi.basename(this.path,this.extname):void 0}set stem(a){gp(a,"stem"),pp(a,"stem"),this.path=Oi.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 Vn(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 pp(e,a){if(e&&e.includes(Oi.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+Oi.sep+"`")}function gp(e,a){if(!e)throw new Error("`"+a+"` cannot be empty")}function rb(e,a){if(!e)throw new Error("Setting `"+a+"` requires `path` to be set too")}function cz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uz=(function(e){const r=this.constructor.prototype,s=r[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),dz={}.hasOwnProperty;class Tg extends uz{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=ZO()}copy(){const a=new Tg;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(hp(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(xp("data",this.frozen),this.namespace[a]=i,this):dz.call(this.namespace,a)&&this.namespace[a]||void 0:a?(xp("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=kd(a),r=this.parser||this.Parser;return vp("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),vp("process",this.parser||this.Parser),yp("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(u,d){const f=kd(a),m=r.parse(f);r.run(m,f,function(y,g,j){if(y||!g||!j)return p(y);const b=g,S=r.stringify(b,j);mz(S)?j.value=S:j.result=S,p(y,j)});function p(y,g){y||!g?d(y):u?u(g):i(void 0,g)}}}processSync(a){let i=!1,r;return this.freeze(),vp("processSync",this.parser||this.Parser),yp("processSync",this.compiler||this.Compiler),this.process(a,s),ob("processSync","process",i),r;function s(u,d){i=!0,ab(u),r=d}}run(a,i,r){lb(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=kd(i);s.run(a,m,p);function p(y,g,j){const b=g||a;y?f(y):d?d(b):r(void 0,b,j)}}}runSync(a,i){let r=!1,s;return this.run(a,i,u),ob("runSync","run",r),s;function u(d,f){ab(d),s=f,r=!0}}stringify(a,i){this.freeze();const r=kd(i),s=this.compiler||this.Compiler;return yp("stringify",s),lb(a),s(a,r)}use(a,...i){const r=this.attachers,s=this.namespace;if(xp("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(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,...g]=p;m(y,g)}else d(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function d(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(s.settings=hp(!0,s.settings,p.settings))}function f(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const g=p[y];u(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,y){let g=-1,j=-1;for(;++g<r.length;)if(r[g][0]===p){j=g;break}if(j===-1)r.push([p,...y]);else if(y.length>0){let[b,...S]=y;const k=r[j][1];g0(k)&&g0(b)&&(b=hp(!0,k,b)),r[j]=[p,b,...S]}}}}const fz=new Tg().freeze();function vp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xp(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 lb(e){if(!g0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ob(e,a,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+a+"` instead")}function kd(e){return hz(e)?e:new D5(e)}function hz(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mz(e){return typeof e=="string"||pz(e)}function pz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gz="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sb=[],cb={allowDangerousHtml:!0},vz=/^(https?|ircs?|mailto|xmpp)$/i,yz=[{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 xz(e){const a=bz(e),i=jz(e);return wz(a.runSync(a.parse(i),i),e)}function bz(e){const a=e.rehypePlugins||sb,i=e.remarkPlugins||sb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cb}:cb;return fz().use(JR).use(i).use(KO,r).use(a)}function jz(e){const a=e.children||"",i=new D5;return typeof a=="string"&&(i.value=a),i}function wz(e,a){const i=a.allowedElements,r=a.allowElement,s=a.components,u=a.disallowedElements,d=a.skipHtml,f=a.unwrapDisallowed,m=a.urlTransform||Sz;for(const y of yz)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+gz+y.id,void 0);return Eg(e,p),DM(e,{Fragment:o.Fragment,components:s,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function p(y,g,j){if(y.type==="raw"&&j&&typeof g=="number")return d?j.children.splice(g,1):j.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in cp)if(Object.hasOwn(cp,b)&&Object.hasOwn(y.properties,b)){const S=y.properties[b],k=cp[b];(k===null||k.includes(y.tagName))&&(y.properties[b]=m(String(S||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!b&&r&&typeof g=="number"&&(b=!r(y,g,j)),b&&j&&typeof g=="number")return f&&y.children?j.children.splice(g,1,...y.children):j.children.splice(g,1),g}}}function Sz(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||vz.test(e.slice(0,a))?e:""}function kz(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function L5(e,a,i){const s=bf((i||{}).ignore||[]),u=Cz(a);let d=-1;for(;++d<u.length;)z5(e,"text",f);function f(p,y){let g=-1,j;for(;++g<y.length;){const b=y[g],S=j?j.children:void 0;if(s(b,S?S.indexOf(b):void 0,j))return;j=b}if(j)return m(p,y)}function m(p,y){const g=y[y.length-1],j=u[d][0],b=u[d][1];let S=0;const N=g.children.indexOf(p);let T=!1,A=[];j.lastIndex=0;let C=j.exec(p.value);for(;C;){const M=C.index,O={index:C.index,input:C.input,stack:[...y,p]};let _=b(...C,O);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?j.lastIndex=M+1:(S!==M&&A.push({type:"text",value:p.value.slice(S,M)}),Array.isArray(_)?A.push(..._):_&&A.push(_),S=M+C[0].length,T=!0),!j.global)break;C=j.exec(p.value)}return T?(S<p.value.length&&A.push({type:"text",value:p.value.slice(S)}),g.children.splice(N,1,...A)):A=[p],N+A.length}}function Cz(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([Nz(s[0]),Ez(s[1])])}return a}function Nz(e){return typeof e=="string"?new RegExp(kz(e),"g"):e}function Ez(e){return typeof e=="function"?e:function(){return e}}function Tz(e){L5(e,[/\r?\n|\r/g,Az])}function Az(){return{type:"break"}}function Mz(){return function(e){Tz(e)}}const _z=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,Rz=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function Oz(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 B5(e,a){return{type:"link",url:e,children:[{type:"text",value:a}]}}function zz(e){const a=[];let i=0;for(const r of e.matchAll(Rz))r.index>i&&a.push({type:"text",value:e.slice(i,r.index)}),a.push(B5(r[0],r[0])),i=r.index+r[0].length;return i<e.length&&a.push({type:"text",value:e.slice(i)}),a}function I5(e){const a=e.children;if(a)for(let i=0;i<a.length;i++){const r=a[i];if(r.type!=="link"){I5(r);continue}const s=Oz(r),u=s===void 0?-1:s.search(_z);if(s===void 0||u<=0)continue;const d=s.slice(0,u),f=r.url.slice(0,r.url.length-s.length),m=zz(s.slice(u));a.splice(i,1,B5(f+d,d),...m),i+=m.length}}function Dz(){return e=>I5(e)}function ub(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 bp="phrasing",jp=["autolink","link","image","label"];function Lz(){return{transforms:[Fz],enter:{literalAutolink:Iz,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:Uz,literalAutolinkEmail:qz,literalAutolinkHttp:Pz,literalAutolinkWww:Hz}}}function Bz(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bp,notInConstruct:jp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bp,notInConstruct:jp},{character:":",before:"[ps]",after:"\\/",inConstruct:bp,notInConstruct:jp}]}}function Iz(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function Pz(e){this.config.exit.autolinkProtocol.call(this,e)}function Hz(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 qz(e){this.config.exit.autolinkEmail.call(this,e)}function Uz(e){this.exit(e)}function Fz(e){L5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Vz],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$z]],{ignore:["link","linkReference"]})}function Vz(e,a,i,r,s){let u="";if(!P5(s)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!Gz(i)))return!1;const d=Yz(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 $z(e,a,i,r){return!P5(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function Gz(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 Yz(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=ub(e,"(");let u=ub(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 P5(e,a){const i=e.input.charCodeAt(e.index-1);return(e.index===0||uo(i)||vf(i))&&(!a||i!==47)}H5.peek=nD;function Kz(){this.buffer()}function Xz(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Qz(){this.buffer()}function Zz(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jz(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=fi(this.sliceSerialize(e)).toLowerCase(),i.label=a}function Wz(e){this.exit(e)}function eD(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=fi(this.sliceSerialize(e)).toLowerCase(),i.label=a}function tD(e){this.exit(e)}function nD(){return"["}function H5(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 aD(){return{enter:{gfmFootnoteCallString:Kz,gfmFootnoteCall:Xz,gfmFootnoteDefinitionLabelString:Qz,gfmFootnoteDefinition:Zz},exit:{gfmFootnoteCallString:Jz,gfmFootnoteCall:Wz,gfmFootnoteDefinitionLabelString:eD,gfmFootnoteDefinition:tD}}}function iD(e){let a=!1;return e&&e.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:H5},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,u,d){const f=u.createTracker(d);let m=f.move("[^");const p=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?`
|
|
583
|
+
`:" ")+u.indentLines(u.containerFlow(r,f.current()),a?q5:rD))),p(),m}}function rD(e,a,i){return a===0?e:q5(e,a,i)}function q5(e,a,i){return(i?"":" ")+e}const lD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];U5.peek=dD;function oD(){return{canContainEols:["delete"],enter:{strikethrough:cD},exit:{strikethrough:uD}}}function sD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lD}],handlers:{delete:U5}}}function cD(e){this.enter({type:"delete",children:[]},e)}function uD(e){this.exit(e)}function U5(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 dD(){return"~"}function fD(e){return e.length}function hD(e,a){const i=a||{},r=(i.align||[]).concat(),s=i.stringLength||fD,u=[],d=[],f=[],m=[];let p=0,y=-1;for(;++y<e.length;){const k=[],N=[];let T=-1;for(e[y].length>p&&(p=e[y].length);++T<e[y].length;){const A=mD(e[y][T]);if(i.alignDelimiters!==!1){const C=s(A);N[T]=C,(m[T]===void 0||C>m[T])&&(m[T]=C)}k.push(A)}d[y]=k,f[y]=N}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<p;)u[g]=db(r[g]);else{const k=db(r);for(;++g<p;)u[g]=k}g=-1;const j=[],b=[];for(;++g<p;){const k=u[g];let N="",T="";k===99?(N=":",T=":"):k===108?N=":":k===114&&(T=":");let A=i.alignDelimiters===!1?1:Math.max(1,m[g]-N.length-T.length);const C=N+"-".repeat(A)+T;i.alignDelimiters!==!1&&(A=N.length+A+T.length,A>m[g]&&(m[g]=A),b[g]=A),j[g]=C}d.splice(1,0,j),f.splice(1,0,b),y=-1;const S=[];for(;++y<d.length;){const k=d[y],N=f[y];g=-1;const T=[];for(;++g<p;){const A=k[g]||"";let C="",M="";if(i.alignDelimiters!==!1){const O=m[g]-(N[g]||0),_=u[g];_===114?C=" ".repeat(O):_===99?O%2?(C=" ".repeat(O/2+.5),M=" ".repeat(O/2-.5)):(C=" ".repeat(O/2),M=C):M=" ".repeat(O)}i.delimiterStart!==!1&&!g&&T.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&A==="")&&(i.delimiterStart!==!1||g)&&T.push(" "),i.alignDelimiters!==!1&&T.push(C),T.push(A),i.alignDelimiters!==!1&&T.push(M),i.padding!==!1&&T.push(" "),(i.delimiterEnd!==!1||g!==p-1)&&T.push("|")}S.push(i.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return S.join(`
|
|
584
|
+
`)}function mD(e){return e==null?"":String(e)}function db(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 pD(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()),gD);return s(),d}function gD(e,a,i){return">"+(i?"":" ")+e}function vD(e,a){return fb(e,a.inConstruct,!0)&&!fb(e,a.notInConstruct,!1)}function fb(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 hb(e,a,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
|
|
585
|
+
`&&vD(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
586
|
+
`}function yD(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 xD(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 bD(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 jD(e,a,i,r){const s=bD(i),u=e.value||"",d=s==="`"?"GraveAccent":"Tilde";if(xD(e,i)){const g=i.enter("codeIndented"),j=i.indentLines(u,wD);return g(),j}const f=i.createTracker(r),m=s.repeat(Math.max(yD(u,s)+1,3)),p=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:`
|
|
587
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
588
|
+
`),u&&(y+=f.move(u+`
|
|
589
|
+
`)),y+=f.move(m),p(),y}function wD(e,a,i){return(i?"":" ")+e}function Ag(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 SD(e,a,i,r){const s=Ag(i),u=s==='"'?"Quote":"Apostrophe",d=i.enter("definition");let f=i.enter("label");const m=i.createTracker(r);let p=m.move("[");return p+=m.move(i.safe(i.associationId(e),{before:p,after:"]",...m.current()})),p+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(i.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=i.enter("destinationRaw"),p+=m.move(i.safe(e.url,{before:p,after:e.title?" ":`
|
|
590
|
+
`,...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),p+=m.move(" "+s),p+=m.move(i.safe(e.title,{before:p,after:s,...m.current()})),p+=m.move(s),f()),d(),p}function kD(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 Dc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jd(e,a,i){const r=hs(e),s=hs(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}}F5.peek=CD;function F5(e,a,i,r){const s=kD(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 p=m.charCodeAt(0),y=Jd(r.before.charCodeAt(r.before.length-1),p,s);y.inside&&(m=Dc(p)+m.slice(1));const g=m.charCodeAt(m.length-1),j=Jd(r.after.charCodeAt(0),g,s);j.inside&&(m=m.slice(0,-1)+Dc(g));const b=d.move(s);return u(),i.attentionEncodeSurroundingInfo={after:j.outside,before:y.outside},f+m+b}function CD(e,a,i){return i.options.emphasis||"*"}function ND(e,a){let i=!1;return Eg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,m0}),!!((!e.depth||e.depth<3)&&bg(e)&&(a.options.setext||i))}function ED(e,a,i,r){const s=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(r);if(ND(e,i)){const y=i.enter("headingSetext"),g=i.enter("phrasing"),j=i.containerPhrasing(e,{...u.current(),before:`
|
|
591
|
+
`,after:`
|
|
592
|
+
`});return g(),y(),j+`
|
|
593
|
+
`+(s===1?"=":"-").repeat(j.length-(Math.max(j.lastIndexOf("\r"),j.lastIndexOf(`
|
|
594
|
+
`))+1))}const d="#".repeat(s),f=i.enter("headingAtx"),m=i.enter("phrasing");u.move(d+" ");let p=i.containerPhrasing(e,{before:"# ",after:`
|
|
595
|
+
`,...u.current()});return/^[\t ]/.test(p)&&(p=Dc(p.charCodeAt(0))+p.slice(1)),p=p?d+" "+p:d,i.options.closeAtx&&(p+=" "+d),m(),f(),p}V5.peek=TD;function V5(e){return e.value||""}function TD(){return"<"}$5.peek=AD;function $5(e,a,i,r){const s=Ag(i),u=s==='"'?"Quote":"Apostrophe",d=i.enter("image");let f=i.enter("label");const m=i.createTracker(r);let p=m.move("![");return p+=m.move(i.safe(e.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(i.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=i.enter("destinationRaw"),p+=m.move(i.safe(e.url,{before:p,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),p+=m.move(" "+s),p+=m.move(i.safe(e.title,{before:p,after:s,...m.current()})),p+=m.move(s),f()),p+=m.move(")"),d(),p}function AD(){return"!"}G5.peek=MD;function G5(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 p=i.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),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"||!p||p!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function MD(){return"!"}Y5.peek=_D;function Y5(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 p=m.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(m.index+1)}}return s+r+s}function _D(){return"`"}function K5(e,a){const i=bg(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))}X5.peek=RD;function X5(e,a,i,r){const s=Ag(i),u=s==='"'?"Quote":"Apostrophe",d=i.createTracker(r);let f,m;if(K5(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 p=d.move("[");return p+=d.move(i.containerPhrasing(e,{before:p,after:"](",...d.current()})),p+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=i.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(i.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(m=i.enter("destinationRaw"),p+=d.move(i.safe(e.url,{before:p,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=i.enter(`title${u}`),p+=d.move(" "+s),p+=d.move(i.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),m()),p+=d.move(")"),f(),p}function RD(e,a,i){return K5(e,i)?"<":"["}Q5.peek=OD;function Q5(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 p=i.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),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"||!p||p!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function OD(){return"["}function Mg(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 zD(e){const a=Mg(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 DD(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 Z5(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 LD(e,a,i,r){const s=i.enter("list"),u=i.bulletCurrent;let d=e.ordered?DD(i):Mg(i);const f=e.ordered?d==="."?")":".":zD(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),Z5(i)===d&&y){let g=-1;for(;++g<e.children.length;){const j=e.children[g];if(j&&j.type==="listItem"&&j.children&&j.children[0]&&j.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=f),i.bulletCurrent=d;const p=i.containerFlow(e,r);return i.bulletLastUsed=d,i.bulletCurrent=u,s(),p}function BD(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 ID(e,a,i,r){const s=BD(i);let u=i.bulletCurrent||Mg(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"),p=i.indentLines(i.containerFlow(e,f.current()),y);return m(),p;function y(g,j,b){return j?(b?"":" ".repeat(d))+g:(b?u:u+" ".repeat(d-u.length))+g}}function PD(e,a,i,r){const s=i.enter("paragraph"),u=i.enter("phrasing"),d=i.containerPhrasing(e,r);return u(),s(),d}const HD=bf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qD(e,a,i,r){return(e.children.some(function(d){return HD(d)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function UD(e){const a=e.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}J5.peek=FD;function J5(e,a,i,r){const s=UD(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 p=m.charCodeAt(0),y=Jd(r.before.charCodeAt(r.before.length-1),p,s);y.inside&&(m=Dc(p)+m.slice(1));const g=m.charCodeAt(m.length-1),j=Jd(r.after.charCodeAt(0),g,s);j.inside&&(m=m.slice(0,-1)+Dc(g));const b=d.move(s+s);return u(),i.attentionEncodeSurroundingInfo={after:j.outside,before:y.outside},f+m+b}function FD(e,a,i){return i.options.strong||"*"}function VD(e,a,i,r){return i.safe(e.value,r)}function $D(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 GD(e,a,i){const r=(Z5(i)+(i.options.ruleSpaces?" ":"")).repeat($D(i));return i.options.ruleSpaces?r.slice(0,-1):r}const W5={blockquote:pD,break:hb,code:jD,definition:SD,emphasis:F5,hardBreak:hb,heading:ED,html:V5,image:$5,imageReference:G5,inlineCode:Y5,link:X5,linkReference:Q5,list:LD,listItem:ID,paragraph:PD,root:qD,strong:J5,text:VD,thematicBreak:GD};function YD(){return{enter:{table:KD,tableData:mb,tableHeader:mb,tableRow:QD},exit:{codeText:ZD,table:XD,tableData:Sp,tableHeader:Sp,tableRow:Sp}}}function KD(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 XD(e){this.exit(e),this.data.inTable=void 0}function QD(e){this.enter({type:"tableRow",children:[]},e)}function Sp(e){this.exit(e)}function mb(e){this.enter({type:"tableCell",children:[]},e)}function ZD(e){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,JD));const i=this.stack[this.stack.length-1];i.type,i.value=a,this.exit(e)}function JD(e,a){return a==="|"?a:e}function WD(e){const a=e||{},i=a.tableCellPadding,r=a.tablePipeAlign,s=a.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
596
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:j,table:d,tableCell:m,tableRow:f}};function d(b,S,k,N){return p(y(b,k,N),b.align)}function f(b,S,k,N){const T=g(b,k,N),A=p([T]);return A.slice(0,A.indexOf(`
|
|
597
|
+
`))}function m(b,S,k,N){const T=k.enter("tableCell"),A=k.enter("phrasing"),C=k.containerPhrasing(b,{...N,before:u,after:u});return A(),T(),C}function p(b,S){return hD(b,{align:S,alignDelimiters:r,padding:i,stringLength:s})}function y(b,S,k){const N=b.children;let T=-1;const A=[],C=S.enter("table");for(;++T<N.length;)A[T]=g(N[T],S,k);return C(),A}function g(b,S,k){const N=b.children;let T=-1;const A=[],C=S.enter("tableRow");for(;++T<N.length;)A[T]=m(N[T],b,S,k);return C(),A}function j(b,S,k){let N=W5.inlineCode(b,S,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function eL(){return{exit:{taskListCheckValueChecked:pb,taskListCheckValueUnchecked:pb,paragraph:nL}}}function tL(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aL}}}function pb(e){const a=this.stack[this.stack.length-2];a.type,a.checked=e.type==="taskListCheckValueChecked"}function nL(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 aL(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=W5.listItem(e,a,i,{...r,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(y){return y+d}}function iL(){return[Lz(),aD(),oD(),YD(),eL()]}function rL(e){return{extensions:[Bz(),iD(e),sD(),WD(e),tL()]}}const lL={tokenize:fL,partial:!0},eS={tokenize:hL,partial:!0},tS={tokenize:mL,partial:!0},nS={tokenize:pL,partial:!0},oL={tokenize:gL,partial:!0},aS={name:"wwwAutolink",tokenize:uL,previous:rS},iS={name:"protocolAutolink",tokenize:dL,previous:lS},kr={name:"emailAutolink",tokenize:cL,previous:oS},Ki={};function sL(){return{text:Ki}}let Xl=48;for(;Xl<123;)Ki[Xl]=kr,Xl++,Xl===58?Xl=65:Xl===91&&(Xl=97);Ki[43]=kr;Ki[45]=kr;Ki[46]=kr;Ki[95]=kr;Ki[72]=[kr,iS];Ki[104]=[kr,iS];Ki[87]=[kr,aS];Ki[119]=[kr,aS];function cL(e,a,i){const r=this;let s,u;return d;function d(g){return!y0(g)||!oS.call(r,r.previous)||_g(r.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return y0(g)?(e.consume(g),f):g===64?(e.consume(g),m):i(g)}function m(g){return g===46?e.check(oL,y,p)(g):g===45||g===95||Fn(g)?(u=!0,e.consume(g),m):y(g)}function p(g){return e.consume(g),s=!0,m}function y(g){return u&&s&&ea(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),a(g)):i(g)}}function uL(e,a,i){const r=this;return s;function s(d){return d!==87&&d!==119||!rS.call(r,r.previous)||_g(r.events)?i(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lL,e.attempt(eS,e.attempt(tS,u),i),i)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),a(d)}}function dL(e,a,i){const r=this;let s="",u=!1;return d;function d(g){return(g===72||g===104)&&lS.call(r,r.previous)&&!_g(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(ea(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const j=s.toLowerCase();if(j==="http"||j==="https")return e.consume(g),m}return i(g)}function m(g){return g===47?(e.consume(g),u?p:(u=!0,m)):i(g)}function p(g){return g===null||Xd(g)||It(g)||uo(g)||vf(g)?i(g):e.attempt(eS,e.attempt(tS,y),i)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),a(g)}}function fL(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 hL(e,a,i){let r,s,u;return d;function d(p){return p===46||p===95?e.check(nS,m,f)(p):p===null||It(p)||uo(p)||p!==45&&vf(p)?m(p):(u=!0,e.consume(p),d)}function f(p){return p===95?r=!0:(s=r,r=void 0),e.consume(p),d}function m(p){return s||r||!u?i(p):a(p)}}function mL(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(nS,a,u)(d):d===null||It(d)||uo(d)?a(d):(e.consume(d),s)}function u(d){return d===41&&r++,e.consume(d),s}}function pL(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||It(f)||uo(f)?a(f):i(f)}function s(f){return f===null||f===40||f===91||It(f)||uo(f)?a(f):r(f)}function u(f){return ea(f)?d(f):i(f)}function d(f){return f===59?(e.consume(f),r):ea(f)?(e.consume(f),d):i(f)}}function gL(e,a,i){return r;function r(u){return e.consume(u),s}function s(u){return Fn(u)?i(u):a(u)}}function rS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||It(e)}function lS(e){return!ea(e)}function oS(e){return!(e===47||y0(e))}function y0(e){return e===43||e===45||e===46||e===95||Fn(e)}function _g(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 vL={tokenize:CL,partial:!0};function yL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wL,continuation:{tokenize:SL},exit:kL}},text:{91:{name:"gfmFootnoteCall",tokenize:jL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xL,resolveTo:bL}}}}function xL(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 p=fi(r.sliceSerialize({start:d.end,end:r.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?i(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),a(m))}}function bL(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 jL(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",p)}function p(g){if(u>999||g===93&&!d||g===null||g===91||It(g))return i(g);if(g===93){e.exit("chunkString");const j=e.exit("gfmFootnoteCallString");return s.includes(fi(r.sliceSerialize(j)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),a):i(g)}return It(g)||(d=!0),u++,e.consume(g),g===92?y:p}function y(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function wL(e,a,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(S)}function y(S){if(d>999||S===93&&!f||S===null||S===91||It(S))return i(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=fi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),j}return It(S)||(f=!0),d++,e.consume(S),S===92?g:y}function g(S){return S===91||S===92||S===93?(e.consume(S),d++,y):y(S)}function j(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(u)||s.push(u),wt(e,b,"gfmFootnoteDefinitionWhitespace")):i(S)}function b(S){return a(S)}}function SL(e,a,i){return e.check($c,a,e.attempt(vL,a,i))}function kL(e){e.exit("gfmFootnoteDefinition")}function CL(e,a,i){const r=this;return wt(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 NL(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 p=m;for(;p--;)if(d[p][0]==="exit"&&d[p][1].type==="strikethroughSequenceTemporary"&&d[p][1]._open&&d[m][1].end.offset-d[m][1].start.offset===d[p][1].end.offset-d[p][1].start.offset){d[m][1].type="strikethroughSequence",d[p][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},d[p][1].start),end:Object.assign({},d[m][1].end)},g={type:"strikethroughText",start:Object.assign({},d[p][1].end),end:Object.assign({},d[m][1].start)},j=[["enter",y,f],["enter",d[p][1],f],["exit",d[p][1],f],["enter",g,f]],b=f.parser.constructs.insideSpan.null;b&&Oa(j,j.length,0,yf(b,d.slice(p+1,m),f)),Oa(j,j.length,0,[["exit",g,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",y,f]]),Oa(d,p-1,m-p+3,j),m=p+j.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 p=this.previous,y=this.events;let g=0;return j;function j(S){return p===126&&y[y.length-1][1].type!=="characterEscape"?m(S):(d.enter("strikethroughSequenceTemporary"),b(S))}function b(S){const k=hs(p);if(S===126)return g>1?m(S):(d.consume(S),g++,b);if(g<2&&!i)return m(S);const N=d.exit("strikethroughSequenceTemporary"),T=hs(S);return N._open=!T||T===2&&!!k,N._close=!k||k===2&&!!T,f(S)}}}class EL{constructor(){this.map=[],this.index=new Map}add(a,i,r){TL(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 TL(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 AL(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 ML(){return{flow:{null:{name:"table",tokenize:_L,resolveAll:RL}}}}function _L(e,a,i){const r=this;let s=0,u=0,d;return f;function f(L){let H=r.events.length-1;for(;H>-1;){const{type:$}=r.events[H][1];if($==="lineEnding"||$==="linePrefix")H--;else break}const q=H>-1?r.events[H][1].type:null,Z=q==="tableHead"||q==="tableRow"?_:m;return Z===_&&r.parser.lazy[r.now().line]?i(L):Z(L)}function m(L){return e.enter("tableHead"),e.enter("tableRow"),p(L)}function p(L){return L===124||(d=!0,u+=1),y(L)}function y(L){return L===null?i(L):Ze(L)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),b):i(L):mt(L)?wt(e,y,"whitespace")(L):(u+=1,d&&(d=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||It(L)?(e.exit("data"),y(L)):(e.consume(L),L===92?j:g)}function j(L){return L===92||L===124?(e.consume(L),g):g(L)}function b(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(L):(e.enter("tableDelimiterRow"),d=!1,mt(L)?wt(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?N(L):L===124?(d=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),k):O(L)}function k(L){return mt(L)?wt(e,N,"whitespace")(L):N(L)}function N(L){return L===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),T):L===45?(u+=1,T(L)):L===null||Ze(L)?M(L):O(L)}function T(L){return L===45?(e.enter("tableDelimiterFiller"),A(L)):O(L)}function A(L){return L===45?(e.consume(L),A):L===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(L))}function C(L){return mt(L)?wt(e,M,"whitespace")(L):M(L)}function M(L){return L===124?S(L):L===null||Ze(L)?!d||s!==u?O(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),a(L)):O(L)}function O(L){return i(L)}function _(L){return e.enter("tableRow"),I(L)}function I(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),I):L===null||Ze(L)?(e.exit("tableRow"),a(L)):mt(L)?wt(e,I,"whitespace")(L):(e.enter("data"),V(L))}function V(L){return L===null||L===124||It(L)?(e.exit("data"),I(L)):(e.consume(L),L===92?X:V)}function X(L){return L===92||L===124?(e.consume(L),V):V(L)}}function RL(e,a){let i=-1,r=!0,s=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,p,y,g;const j=new EL;for(;++i<e.length;){const b=e[i],S=b[1];b[0]==="enter"?S.type==="tableHead"?(f=!1,m!==0&&(gb(j,a,m,p,y),y=void 0,m=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},j.add(i,0,[["enter",p,a]])):S.type==="tableRow"||S.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({},S.start),end:Object.assign({},S.end)},j.add(i,0,[["enter",y,a]])),s=S.type==="tableDelimiterRow"?2:y?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],g=Cd(j,a,u,s,void 0,g),u=[0,0,0,0]),d[2]=i)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(d[0]=d[1],g=Cd(j,a,u,s,void 0,g)),u=d,d=[u[1],i,0,0])):S.type==="tableHead"?(f=!0,m=i):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=i,u[1]!==0?(d[0]=d[1],g=Cd(j,a,u,s,i,g)):d[1]!==0&&(g=Cd(j,a,d,s,i,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(d[3]=i)}for(m!==0&&gb(j,a,m,p,y),j.consume(a.events),i=-1;++i<a.events.length;){const b=a.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=AL(a.events,i))}return e}function Cd(e,a,i,r,s,u){const d=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},ss(a.events,i[0])),e.add(i[0],0,[["exit",u,a]]));const m=ss(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 p=ss(a.events,i[2]),y=ss(a.events,i[3]),g={type:f,start:Object.assign({},p),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",g,a]]),r!==2){const j=a.events[i[2]],b=a.events[i[3]];if(j[1].end=Object.assign({},b[1].end),j[1].type="chunkText",j[1].contentType="text",i[3]>i[2]+1){const S=i[2]+1,k=i[3]-i[2]-1;e.add(S,k,[])}}e.add(i[3]+1,0,[["exit",g,a]])}return s!==void 0&&(u.end=Object.assign({},ss(a.events,s)),e.add(s,0,[["exit",u,a]]),u=void 0),u}function gb(e,a,i,r,s){const u=[],d=ss(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 ss(e,a){const i=e[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const OL={name:"tasklistCheck",tokenize:DL};function zL(){return{text:{91:OL}}}function DL(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 It(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 Ze(m)?a(m):mt(m)?e.check({tokenize:LL},a,i)(m):i(m)}}function LL(e,a,i){return wt(e,r,"whitespace");function r(s){return s===null?i(s):a(s)}}function BL(e){return m5([sL(),yL(),NL(e),ML(),zL()])}const IL={};function PL(e){const a=this,i=e||IL,r=a.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),d=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(BL(i)),u.push(iL()),d.push(rL(i))}function Wd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const HL={add:br,"chat-bubble":_7,window:e7,close:vs,"chevron-left":Uj,"chevron-right":Ii,"chevron-down":cl,gear:F7,"person-add":W7,"arrow-bracket-to-left":A7,"arrow-up":a7,copy:Ic,check:ma,"cloud-download":M0,bell:r7,"bell-slash":i7,image:N7,paperclip:z0,"smiley-plus":h7,info:O0,people:e9,pencil:I7,file:y7,"file-video":g7,"file-audio":p7,folder:j7,"layout-sidebar-left":L7,sun:Q7,moon:D7,"arrows-expand":f7,"arrows-contract":G7,"arrow-u-up-right":q7,"list-bullets":T7,eye:R0,"eye-slash":_0,pin:Up,megaphone:M7,trash:Ud,search:gs,quote:H7,fold:b7,unfold:J7};function Ue({name:e}){const a=HL[e]??O0;return o.jsx(a,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function gt({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(Ue,{name:e})})}function ms({title:e,onClose:a,children:i,className:r=""}){const s=w.useRef(null),u=w.useId();return w.useEffect(()=>{const d=s.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),ho.createPortal(o.jsxs("dialog",{ref:s,className:`ui-small-dialog ${r}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),a()},children:[o.jsx(gt,{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 ks(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 qL({children:e}){const a=w.useRef(null),[i,r]=w.useState("idle");w.useEffect(()=>{if(i==="idle")return;const u=setTimeout(()=>r("idle"),1500);return()=>clearTimeout(u)},[i]);const s=async()=>{var u;return r(await ks((((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(gt,{icon:i==="copied"?"check":"copy",label:x(i==="copied"?"ui.copied":i==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void s()})]})}const UL=[PL,Dz,Mz],sS=w.createContext(void 0);function FL({href:e,children:a}){const i=w.useContext(sS);return e==="#mention"||e==="#mention-me"?o.jsx("span",{className:"jv-mention","data-me":e==="#mention-me"||void 0,children:a}):i&&(e!=null&&e.startsWith("#quote-"))?i(Number(e.slice(7))):o.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:a})}const VL={a:FL,img:({alt:e})=>o.jsx("span",{children:x("ui.image",{alt:e||x("ui.imageHidden")})}),pre:({children:e})=>o.jsx(qL,{children:e})},Yc=w.memo(function({text:a,renderQuote:i}){return Cj(),o.jsx(sS.Provider,{value:i,children:o.jsx(xz,{remarkPlugins:UL,skipHtml:!0,components:VL,children:a})})}),vb={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",limits_invalid:"error.limitsInvalid",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",port_invalid:"error.portInvalid",port_missing:"error.portMissing",port_range_invalid:"error.portRangeInvalid",port_range_own:"error.portRangeOwn",ports_exhausted:"error.portsExhausted",question_closed:"error.questionClosed",question_expired:"error.questionExpired",secret_description_invalid:"error.secretDescriptionInvalid",secret_missing:"error.secretMissing",secret_name_invalid:"error.secretNameInvalid",secret_name_taken:"error.secretNameTaken",secret_value_missing:"error.secretValueMissing",secret_value_too_long:"error.secretValueTooLong",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",task_invalid:"error.taskInvalid",task_schedule_invalid:"error.taskScheduleInvalid",task_time_past:"error.taskTimePast",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay"},cS=(e,a)=>{const i=e&&Object.hasOwn(vb,e)?vb[e]:void 0;return i?x(i,a):null};function Wt(e,a="common.failed"){return e instanceof qi?cS(e.code,e.params)??(e.status<500?e.message:x(a)):e instanceof Error&&e.message?e.message:x(a)}const $L=e=>cS(e.errorCode,e.errorParams)??e.error??"";function GL({botId:e,selected:a,onSelect:i,onOpenChat:r}){const[s,u]=w.useState(null),[d,f]=w.useState(!0),[m,p]=w.useState(""),[y,g]=w.useState(0);if(w.useEffect(()=>{let S=!0;return f(!0),p(""),u(null),(a.kind==="history"?lM.read(e,a.id).then(N=>({kind:"history",data:N})):pw.message(e,a.id).then(N=>({kind:"chat",data:N}))).then(N=>{S&&u(N)}).catch(N=>{S&&p(Wt(N,"activity.detailFailed"))}).finally(()=>{S&&f(!1)}),()=>{S=!1}},[e,a.kind,a.id,y]),d)return o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.detailLoading")});if(m)return o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:m}),o.jsx(Te,{variant:"outline",size:"sm",onClick:()=>g(S=>S+1),children:x("common.retry")})]});if(!s)return null;if(s.kind==="history")return o.jsx(nM,{detail:s.data,onSelect:S=>i({kind:"history",id:S})},s.data.record.id);const{chat:j,message:b}=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:j.title}),o.jsx("p",{children:hg(b.createdAt)})]}),o.jsxs(Te,{variant:"ghost",size:"sm",onClick:()=>r(j.id),children:[x("activity.openChat"),o.jsx(Hp,{})]})]}),o.jsxs("div",{className:"jv-activity-message-body",children:[b.content&&o.jsx(Yc,{text:b.content}),b.attachments.length>0&&o.jsx("div",{className:"jv-activity-message-files",children:b.attachments.map(S=>o.jsxs("a",{href:`/api/attachments/${S.id}`,download:S.name,children:[o.jsx(z0,{}),S.name]},S.id))}),b.source&&o.jsxs(Te,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>i({kind:"history",id:b.source.historyId}),children:[x("activity.sentBy",{id:b.source.historyId}),o.jsx(Hp,{})]})]})]})}const uS=sE;function dS({className:e,children:a,showCloseButton:i=!0,...r}){return o.jsxs(uE,{children:[o.jsx(dE,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),o.jsxs(mE,{"data-slot":"dialog-content",className:gn("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(bE,{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(vs,{className:"size-4"})})]})]})}function Rg({className:e,...a}){return o.jsx("div",{"data-slot":"dialog-header",className:gn("flex flex-col gap-2",e),...a})}function wf({className:e,...a}){return o.jsx(yE,{"data-slot":"dialog-title",className:gn("text-lg font-semibold",e),...a})}function YL({botId:e,botName:a,onBack:i,onOpenChat:r}){const[s,u]=w.useState([void 0]),d=s.at(-1),[f,m]=w.useState({items:[],nextBefore:null}),[p,y]=w.useState(!0),[g,j]=w.useState(""),[b,S]=w.useState(0),[k,N]=w.useState(null),T=w.useRef(null),A=w.useRef(0),C=w.useRef(null);w.useEffect(()=>{let _=!0;return y(!0),j(""),m({items:[],nextBefore:null}),T.current&&(T.current.scrollTop=0),pw.list(e,d).then(I=>{_&&m(I)}).catch(I=>{_&&j(Wt(I,"activity.loadFailed"))}).finally(()=>{_&&y(!1)}),()=>{_=!1}},[e,d,b]);const M=_=>{var I;k||(A.current=((I=T.current)==null?void 0:I.scrollTop)??0,C.current=document.activeElement),N(_)},O=()=>{if(!k){i();return}N(null),requestAnimationFrame(()=>{var _;T.current&&(T.current.scrollTop=A.current),(_=C.current)==null||_.focus({preventScroll:!0})})};return o.jsxs(o.Fragment,{children:[o.jsxs(Rg,{className:"jv-bot-info-navigation",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(k?"activity.backToTimeline":"usage.back"),onClick:O,children:o.jsx(af,{})}),o.jsx(wf,{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(Te,{type:"button",variant:"ghost",size:"sm",disabled:p,onClick:()=>{u([void 0]),S(_=>_+1)},"aria-label":x("activity.refresh"),children:[o.jsx(D0,{}),x(p?"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:p?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(Te,{variant:"outline",size:"sm",onClick:()=>S(_=>_+1),children:x("common.retry")})]}):f.items.length?o.jsx(rM,{items:f.items,onSelect:M}):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(Te,{type:"button",variant:"ghost",size:"sm",disabled:p||s.length===1,onClick:()=>u(_=>_.slice(0,-1)),children:[o.jsx(Uj,{}),x("activity.newer")]}),o.jsx("span",{children:x("activity.page",{page:s.length})}),o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",disabled:p||f.nextBefore===null,onClick:()=>u(_=>[..._,f.nextBefore]),children:[x("activity.older"),o.jsx(Ii,{})]})]})]}),k&&o.jsx("section",{className:"jv-activity-detail","aria-label":x(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:o.jsx(GL,{botId:e,selected:k,onSelect:M,onOpenChat:r})})]})]})}const KL={list:(e,a)=>Se(`/bots/${e}/usage?since=${a}`)},XL=["today","7d","30d","all"],QL=e=>e==="today"?x("usage.today"):e==="all"?x("usage.all"):x("usage.days",{count:e==="7d"?7:30}),Nd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function ZL(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 yb=e=>Hi(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),xb=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function JL({botId:e,botName:a,onBack:i}){const[r,s]=w.useState("today"),[u,d]=w.useState(null),[f,m]=w.useState(""),[p,y]=w.useState(0);w.useEffect(()=>{let S=!0;return d(null),m(""),KL.list(e,ZL(r)).then(k=>{S&&d(k.models)}).catch(k=>{S&&m(Wt(k,"usage.loadFailed"))}),()=>{S=!1}},[e,r,p]);const g=(u==null?void 0:u.filter(S=>S.cost!==null))??[],j=u&&Object.fromEntries(Nd.map(([S])=>[S,u.reduce((k,N)=>k+N[S],0)])),b=g.length?xb(g.reduce((S,k)=>S+k.cost,0)):x("usage.unpriced");return o.jsxs(o.Fragment,{children:[o.jsxs(Rg,{className:"jv-bot-info-navigation",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x("usage.back"),onClick:i,children:o.jsx(af,{})}),o.jsx(wf,{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:XL.map(S=>o.jsx("button",{type:"button",role:"tab","aria-selected":r===S,onClick:()=>s(S),children:QL(S)},S))}),o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(S=>S+1),"aria-label":x("usage.refreshLabel"),children:[o.jsx(D0,{}),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(Te,{variant:"outline",size:"sm",onClick:()=>y(S=>S+1),children:x("usage.retry")})]}):u?u.length?o.jsxs(o.Fragment,{children:[o.jsxs("table",{className:"jv-usage-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:x("usage.model")}),Nd.map(([S,k])=>o.jsx("th",{scope:"col",children:x(k)},S)),o.jsx("th",{scope:"col",children:x("usage.cost")})]})}),o.jsx("tbody",{children:u.map(S=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsxs("span",{className:"jv-usage-model",children:[o.jsx("strong",{children:S.model}),o.jsx("span",{children:S.provider})]})}),Nd.map(([k,N])=>o.jsx("td",{"data-label":x(N),title:Hi(S[k]),children:yb(S[k])},k)),o.jsx("td",{"data-label":x("usage.cost"),className:S.cost===null?"jv-usage-unpriced":void 0,title:S.cost===null?void 0:`$${S.cost.toFixed(4)}`,children:S.cost===null?x("usage.unpriced"):xb(S.cost)})]},`${S.provider}/${S.model}`))}),u.length>1&&j&&o.jsx("tfoot",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsx("strong",{children:x("usage.total")})}),Nd.map(([S,k])=>o.jsx("td",{"data-label":x(k),title:Hi(j[S]),children:yb(j[S])},S)),o.jsx("td",{"data-label":x("usage.cost"),className:g.length?void 0:"jv-usage-unpriced",children:b})]})})]}),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 ui={gray:{hex:9146265,label:"color.gray"},blue:{hex:2000636,label:"color.blue"},green:{hex:3129195,label:"color.green"},amber:{hex:16093970,label:"color.amber"},rose:{hex:15881087,label:"color.rose"},violet:{hex:9067766,label:"color.violet"}},fS=e=>{var a;return`#${(((a=ui[e])==null?void 0:a.hex)??ui.gray.hex).toString(16).padStart(6,"0")}`},WL={open:1,happy:0,eyeScale:1,kind:0,lid:0,lidTilt:0,smile:0,blush:0,mouth:0,mouthOpen:1,earL:.22,earR:.22,tilt:0,lift:0,squash:1,yaw:0,look:[0,0]},eB={body:.85,waist:.1,ears:1,earSize:1.1,earX:.3,earY:.26,earW:.16,earH:.32,earBlend:.03,earThick:.06,eyeGap:.205,eyeSize:1.22},bb={lit:.55,rim:.5},tB="attribute vec2 p; void main(){ gl_Position = vec4(p, 0., 1.); }",nB=`
|
|
598
|
+
precision highp float;
|
|
599
|
+
uniform vec2 uRes, uLook;
|
|
600
|
+
uniform vec3 uColor, uInk;
|
|
601
|
+
uniform float uSquash, uEarL, uEarR, uOpen, uHappy, uTilt, uLift, uZoom, uShadow, uYaw;
|
|
602
|
+
uniform float uEars, uEarSize, uBody, uEyeGap, uEyeSize, uWaist, uEarX, uEarY, uEarW, uEarH, uEarBlend;
|
|
603
|
+
uniform float uKind, uEyeScale, uLid, uLidTilt, uSmile, uBlush, uMouth, uMouthOpen, uEarThick;
|
|
604
|
+
uniform float uLit, uRim;
|
|
605
|
+
|
|
606
|
+
float smin(float a, float b, float k){ float h = max(k - abs(a - b), 0.) / k; return min(a, b) - h * h * k * .25; }
|
|
607
|
+
float sdEllipsoid(vec3 p, vec3 r){ float k0 = length(p / r), k1 = length(p / (r * r)); return k0 * (k0 - 1.) / k1; }
|
|
608
|
+
float sdTri(vec2 p, vec2 q){
|
|
609
|
+
p.x = abs(p.x);
|
|
610
|
+
vec2 a = p - q * clamp(dot(p, q) / dot(q, q), 0., 1.);
|
|
611
|
+
vec2 b = p - q * vec2(clamp(p.x / q.x, 0., 1.), 1.);
|
|
612
|
+
float s = -sign(q.y);
|
|
613
|
+
vec2 d = min(vec2(dot(a, a), s * (p.x * q.y - p.y * q.x)), vec2(dot(b, b), s * (p.y - q.y)));
|
|
614
|
+
return -sqrt(d.x) * sign(d.y);
|
|
615
|
+
}
|
|
616
|
+
float sdPill(vec2 q, float a, float r){ return length(vec2(q.x, q.y - clamp(q.y, -a, a))) - r; }
|
|
617
|
+
float sdSeg(vec2 p, vec2 a, vec2 b){ vec2 pa = p - a, ba = b - a; float h = clamp(dot(pa, ba) / dot(ba, ba), 0., 1.); return length(pa - ba * h); }
|
|
618
|
+
float sdStar5(vec2 p, float r, float rf){
|
|
619
|
+
const vec2 k1 = vec2(.809016994375, -.587785252292);
|
|
620
|
+
const vec2 k2 = vec2(-k1.x, k1.y);
|
|
621
|
+
p.x = abs(p.x);
|
|
622
|
+
p -= 2. * max(dot(k1, p), 0.) * k1; p -= 2. * max(dot(k2, p), 0.) * k2;
|
|
623
|
+
p.x = abs(p.x); p.y -= r;
|
|
624
|
+
vec2 ba = rf * vec2(-k1.y, k1.x) - vec2(0., 1.);
|
|
625
|
+
float h = clamp(dot(p, ba) / dot(ba, ba), 0., r);
|
|
626
|
+
return length(p - ba * h) * sign(p.y * ba.x - p.x * ba.y);
|
|
627
|
+
}
|
|
628
|
+
mat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
|
|
629
|
+
float fill(float d){ return 1. - smoothstep(-.0035, .0035, d); }
|
|
630
|
+
|
|
631
|
+
// An ear: a fin standing on the head, thick down the middle and thin at both edges, thinner toward the tip — so from the
|
|
632
|
+
// side it is a pointed rhombus, not a slab. Melted in at the base, so it grows out of the ball instead of sitting on it.
|
|
633
|
+
float sdEar(vec3 q, float ang){
|
|
634
|
+
q.xy = rot(ang) * q.xy;
|
|
635
|
+
float h = uEarH * uEarSize, w = uEarW * uEarSize, round_ = .030 * uEarSize;
|
|
636
|
+
float d2 = sdTri(q.xy - vec2(0., h), vec2(w, -h));
|
|
637
|
+
float up = clamp((q.y + h * .05) / (h * 1.45), 0., 1.), across = clamp(abs(q.x) / w, 0., 1.);
|
|
638
|
+
float half_ = uEarThick * uEarSize * (1. - .45 * up) * (1. - .55 * across * across);
|
|
639
|
+
vec2 e = vec2(d2, abs(q.z) - half_);
|
|
640
|
+
return min(max(e.x, e.y), 0.) + length(max(e, 0.)) - round_;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// Down to body space: lifted, tilted about the bottom edge, then squashed at a constant volume, so a squat ball widens.
|
|
644
|
+
vec3 toBody(vec3 p){
|
|
645
|
+
p.y -= uLift;
|
|
646
|
+
p.xz = rot(uYaw) * p.xz;
|
|
647
|
+
float floorY = -.58 * uBody;
|
|
648
|
+
p.y -= floorY; p.xy = rot(uTilt) * p.xy; p.y += floorY;
|
|
649
|
+
float widen = 1. / sqrt(max(uSquash, .55));
|
|
650
|
+
p.x *= widen; p.z *= widen; p.y = (p.y - floorY) * uSquash + floorY;
|
|
651
|
+
return p;
|
|
652
|
+
}
|
|
653
|
+
float map(vec3 p){
|
|
654
|
+
vec3 b = toBody(p);
|
|
655
|
+
vec3 bp = b;
|
|
656
|
+
bp.x /= (1. + uWaist * clamp(-b.y, 0., 1.));
|
|
657
|
+
float d = sdEllipsoid(bp, vec3(.58, .58 * uBody, .55));
|
|
658
|
+
if (uEars > .5){
|
|
659
|
+
float el = sdEar(bp - vec3(-uEarX, uEarY, -.01), uEarL);
|
|
660
|
+
float er = sdEar(bp - vec3(uEarX, uEarY, -.01), -uEarR);
|
|
661
|
+
d = smin(d, min(el, er), uEarBlend);
|
|
662
|
+
}
|
|
663
|
+
return d;
|
|
664
|
+
}
|
|
665
|
+
vec3 normal(vec3 p){ vec2 e = vec2(.0015, 0.); return normalize(vec3(map(p + e.xyy) - map(p - e.xyy), map(p + e.yxy) - map(p - e.yxy), map(p + e.yyx) - map(p - e.yyx))); }
|
|
666
|
+
float ao(vec3 p, vec3 n){ float o = 0., s = 1.; for (int i = 1; i <= 5; i++){ float h = .02 + .05 * float(i); o += (h - map(p + n * h)) * s; s *= .7; } return clamp(1. - 1.5 * o, 0., 1.); }
|
|
667
|
+
|
|
668
|
+
// One eye. 0 pill (with lids, or a smile arc), 1 squeezed chevron, 2 star, 3 spiral, 4 closed in content.
|
|
669
|
+
float eye(vec2 q, float side){
|
|
670
|
+
q /= uEyeScale;
|
|
671
|
+
float open = max(uOpen, .10), H = .105 * open, d;
|
|
672
|
+
if (uKind < .5){
|
|
673
|
+
float dPill = sdPill(vec2(q.x, q.y / open), .055, .05) * min(open, 1.);
|
|
674
|
+
// Lids: the top cut slants (inner corner low = cross, high = worried); the bottom cut is a curve (a smiling eye).
|
|
675
|
+
dPill = max(dPill, q.y - (H - 2. * H * uLid + uLidTilt * side * q.x));
|
|
676
|
+
vec2 c = vec2(0., -H - .10 + uSmile * .14);
|
|
677
|
+
dPill = max(dPill, -(length(q - c) - .10));
|
|
678
|
+
vec2 qa = q - vec2(0., -.04);
|
|
679
|
+
float dArc = max(abs(length(qa) - .062 * uEyeSize) - .019, -qa.y + .004);
|
|
680
|
+
d = mix(dPill * uEyeSize, dArc, uHappy);
|
|
681
|
+
} else if (uKind < 1.5){
|
|
682
|
+
vec2 tip = vec2(-side * .045, 0.);
|
|
683
|
+
d = min(sdSeg(q, tip, vec2(side * .04, .062)), sdSeg(q, tip, vec2(side * .04, -.062))) - .02;
|
|
684
|
+
} else if (uKind < 2.5){
|
|
685
|
+
d = sdStar5(q * rot(side * .12), .092, .48) - .012;
|
|
686
|
+
} else if (uKind < 3.5){
|
|
687
|
+
float r = length(q), a = atan(q.y, q.x) * side, k = .036;
|
|
688
|
+
d = max(abs(fract(r / k - a / 6.2831853) - .5) * k - .0095, r - .088);
|
|
689
|
+
} else {
|
|
690
|
+
vec2 qa = q - vec2(0., .035);
|
|
691
|
+
d = max(abs(length(qa) - .062 * uEyeSize) - .019, qa.y + .004);
|
|
692
|
+
}
|
|
693
|
+
return d * uEyeScale;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// Every mouth is a white line, the same pen as the eyes: no filled cavity, no tongue.
|
|
697
|
+
// 1 cat ω, 2 a smile, 3 an O (a yawn), 4 a short line, 5 wavy (a wry face), 6 a frown
|
|
698
|
+
float mouth(vec2 q){
|
|
699
|
+
if (uMouth < .5) return 0.;
|
|
700
|
+
float w = .0145, d = 1.;
|
|
701
|
+
if (uMouth < 1.5){
|
|
702
|
+
float r = .034;
|
|
703
|
+
float a = max(abs(length(q - vec2(-r, .012)) - r) - w, q.y - .012);
|
|
704
|
+
float b = max(abs(length(q - vec2(r, .012)) - r) - w, q.y - .012);
|
|
705
|
+
d = min(a, b);
|
|
706
|
+
} else if (uMouth < 2.5){
|
|
707
|
+
vec2 c = vec2(0., .048 * uMouthOpen);
|
|
708
|
+
float R = .062 * uMouthOpen;
|
|
709
|
+
d = max(abs(length(q - c) - R) - w, max(q.y - c.y + .004, abs(q.x) - R * .92));
|
|
710
|
+
} else if (uMouth < 3.5){
|
|
711
|
+
d = abs(length(q / vec2(.060, .080 * uMouthOpen)) - 1.) * .060 - .018;
|
|
712
|
+
} else if (uMouth < 4.5){
|
|
713
|
+
d = sdSeg(q, vec2(-.032, 0.), vec2(.032, 0.)) - w;
|
|
714
|
+
} else if (uMouth < 5.5){
|
|
715
|
+
d = max(abs(q.y - .011 * sin(q.x * 95.)) - .0125, abs(q.x) - .05);
|
|
716
|
+
} else {
|
|
717
|
+
d = max(abs(length(q - vec2(0., -.05)) - .05) - w, -(q.y + .022));
|
|
718
|
+
}
|
|
719
|
+
return fill(d);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// The face is painted on the ball's surface, so it sits on the curve rather than floating in front of it.
|
|
723
|
+
vec3 paintFace(vec3 b, vec3 base){
|
|
724
|
+
if (b.z < 0.) return base;
|
|
725
|
+
float ink = 0., blush = 0.;
|
|
726
|
+
for (int i = 0; i < 2; i++){
|
|
727
|
+
float side = i == 0 ? -1. : 1.;
|
|
728
|
+
vec2 q = b.xy - (vec2(side * uEyeGap, .01) + uLook);
|
|
729
|
+
ink = max(ink, fill(eye(q, side)));
|
|
730
|
+
vec2 qb = (b.xy - vec2(side * (uEyeGap + .092), .01 - .142) - uLook * .4) / vec2(.080, .050);
|
|
731
|
+
blush = max(blush, 1. - smoothstep(.75, 1.02, length(qb)));
|
|
732
|
+
}
|
|
733
|
+
base = mix(base, mix(uColor, vec3(1., .56, .72), .86), blush * uBlush);
|
|
734
|
+
base = mix(base, uInk, max(ink, mouth(b.xy - vec2(uLook.x * .7, .01 - .215 + uLook.y * .5))));
|
|
735
|
+
return base;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
void main(){
|
|
739
|
+
vec2 uv = (gl_FragCoord.xy - .5 * uRes) / uRes.y;
|
|
740
|
+
vec3 ro = vec3(0., .30, 3.4), ta = vec3(0., -.02, 0.);
|
|
741
|
+
vec3 ww = normalize(ta - ro), uu = normalize(cross(ww, vec3(0., 1., 0.))), vv = cross(uu, ww);
|
|
742
|
+
vec3 rd = normalize(uv.x * uu + uv.y * vv + 2.45 * uZoom * ww);
|
|
743
|
+
float t = 0., near = 9.; bool hit = false;
|
|
744
|
+
for (int i = 0; i < 110; i++){
|
|
745
|
+
float d = map(ro + rd * t);
|
|
746
|
+
near = min(near, d);
|
|
747
|
+
if (d < .0008){ hit = true; break; }
|
|
748
|
+
t += d * .8; if (t > 6.) break;
|
|
749
|
+
}
|
|
750
|
+
vec4 col = vec4(0.);
|
|
751
|
+
float tf = (-.585 - ro.y) / rd.y;
|
|
752
|
+
if (tf > 0. && uShadow > 0.){
|
|
753
|
+
vec3 g = ro + rd * tf;
|
|
754
|
+
float s = exp(-pow(length(vec2(g.x / .95, g.z / .8)) / .58, 2.) * 2.0);
|
|
755
|
+
col = vec4(0., 0., 0., .20 * s * uShadow);
|
|
756
|
+
}
|
|
757
|
+
if (hit){
|
|
758
|
+
vec3 p = ro + rd * t, n = normal(p);
|
|
759
|
+
vec3 L = normalize(vec3(-.5, .8, .75));
|
|
760
|
+
// One solid colour, deepened toward the bottom edge and in the hollows, then a soft light from the upper left and a
|
|
761
|
+
// rim that catches the far edge — with the outline, that is what makes a flat colour read as a round body.
|
|
762
|
+
vec3 base = uColor * mix(.94, 1., smoothstep(-.62, .30, p.y)) * mix(.90, 1., ao(p, n));
|
|
763
|
+
float lam = clamp((dot(n, L) + .45) / 1.45, 0., 1.);
|
|
764
|
+
vec3 soft = uColor * mix(vec3(.80, .83, .93), vec3(1.), smoothstep(.08, .86, lam)) * mix(.88, 1., ao(p, n));
|
|
765
|
+
base = mix(base, soft, uLit);
|
|
766
|
+
base += uColor * uRim * pow(1. - max(dot(n, -rd), 0.), 3.2) * .55;
|
|
767
|
+
base = paintFace(toBody(p), base);
|
|
768
|
+
// The crease where the ears meet the head turns edge-on when the head turns, and takes the outline with it.
|
|
769
|
+
base = mix(base, uColor * vec3(.55, .57, .65), (1. - smoothstep(.10, .17, max(dot(n, -rd), 0.))) * .85);
|
|
770
|
+
col = vec4(base, 1.);
|
|
771
|
+
}
|
|
772
|
+
if (!hit && near < 9.){
|
|
773
|
+
// The outline is a band of even width just outside the silhouette, so it does not vanish where the surface turns away
|
|
774
|
+
// fast; a near miss inside the band paints the line over the shadow. Its width is a fixed share of the picture, so
|
|
775
|
+
// the DM figure gets a clear edge and a 22 px avatar a hairline, as in the design study.
|
|
776
|
+
float w = .003 * t;
|
|
777
|
+
float edge = 1. - smoothstep(w * .55, w, near);
|
|
778
|
+
if (edge > 0.) col = vec4(mix(col.rgb, uColor * vec3(.55, .57, .65), edge), max(col.a, edge));
|
|
779
|
+
}
|
|
780
|
+
gl_FragColor = vec4(col.rgb * col.a, col.a);
|
|
781
|
+
}`;function hS(e,a){const i=2.45*a/3.4,r=.92,s=r/e.squash;return{x:.5-s*Math.sin(e.tilt)*i,y:.5-.39*a/.92-(s*Math.cos(e.tilt)+e.lift-r)*i,scale:a/.92,angle:-e.tilt}}const jb=e=>[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255],aB=256;function mS(){const e=document.createElement("canvas"),a=e.getContext("webgl",{premultipliedAlpha:!0,preserveDrawingBuffer:!0,antialias:!1});if(!a)return;const i=(p,y)=>{const g=a.createShader(p);if(a.shaderSource(g,y),a.compileShader(g),!a.getShaderParameter(g,a.COMPILE_STATUS))throw new Error(a.getShaderInfoLog(g)??"shader");return g},r=a.createProgram();a.attachShader(r,i(a.VERTEX_SHADER,tB)),a.attachShader(r,i(a.FRAGMENT_SHADER,nB)),a.linkProgram(r),a.useProgram(r),a.bindBuffer(a.ARRAY_BUFFER,a.createBuffer()),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),a.STATIC_DRAW);const s=a.getAttribLocation(r,"p");a.enableVertexAttribArray(s),a.vertexAttribPointer(s,2,a.FLOAT,!1,0,0);const u=p=>a.getUniformLocation(r,p),d=jb(16777215),f=[document.createElement("canvas"),document.createElement("canvas")],m=(p,y,g,j,b)=>{e.width!==p&&(e.width=e.height=p),a.viewport(0,0,p,p),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.uniform2f(u("uRes"),p,p),a.uniform3fv(u("uColor"),jb(y)),a.uniform3fv(u("uInk"),d),a.uniform2fv(u("uLook"),g.look);for(const[S,k]of[["uSquash",g.squash],["uEarL",g.earL],["uEarR",g.earR],["uOpen",g.open],["uHappy",g.happy],["uTilt",g.tilt],["uLift",g.lift],["uKind",g.kind],["uEyeScale",g.eyeScale],["uLid",g.lid],["uLidTilt",g.lidTilt],["uSmile",g.smile],["uBlush",g.blush],["uMouth",g.mouth],["uMouthOpen",g.mouthOpen],["uYaw",-g.yaw]])a.uniform1f(u(S),k);for(const[S,k]of Object.entries(eB))a.uniform1f(u("u"+S[0].toUpperCase()+S.slice(1)),k);a.uniform1f(u("uZoom"),b),a.uniform1f(u("uShadow"),j?1:0),a.uniform1f(u("uLit"),bb.lit),a.uniform1f(u("uRim"),bb.rim),a.drawArrays(a.TRIANGLES,0,3)};return{paint(p,y,g,j,{shadow:b=!0,zoom:S=.9}={}){let k=y*2;for(;k<aB;)k*=2;m(k,g,j,b,S);let N=e;for(let T=0;k>y*2;k/=2,T^=1){const A=f[T],C=A.getContext("2d");A.width!==k/2?A.width=A.height=k/2:C.clearRect(0,0,k/2,k/2),C.drawImage(N,0,0,k,k,0,0,k/2,k/2),N=A}p.drawImage(N,0,0,k,k,0,0,y,y)},dispose(){var p;(p=a.getExtension("WEBGL_lose_context"))==null||p.loseContext()}}}const iB={normal:{},happy:{happy:1,blush:1,earL:.16,earR:.16},sad:{lid:.28,lidTilt:-.62,look:[0,-.02],earL:.62,earR:.62,mouth:6,squash:.97},angry:{lid:.4,lidTilt:1.1,earL:.56,earR:.56,mouth:4,look:[0,-.01]},dizzy:{kind:3,mouth:5,tilt:.08,earL:.1,earR:.46}},pS=e=>({...WL,...iB[e]}),rB=40,kp=new Map;let Ed;function gS(e,a,i){const r=a/100;e.save(),e.translate(i.x*a,i.y*a),e.rotate(i.angle),e.scale(i.scale,i.scale),e.fillStyle="#f2b830",e.strokeStyle="#c98d12",e.lineWidth=1.6*r,e.lineJoin="round",e.beginPath(),e.moveTo(-13*r,6*r),e.lineTo(-13*r,-2*r),e.lineTo(-6*r,3*r),e.lineTo(0,-7*r),e.lineTo(6*r,3*r),e.lineTo(13*r,-2*r),e.lineTo(13*r,6*r),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#fff6dc";for(const[s,u]of[[-13,-2],[0,-7],[13,-2]])e.beginPath(),e.arc(s*r,u*r,2.2*r,0,Math.PI*2),e.fill();e.restore()}function lB(e,a,i,r,s){var y;if(Ed===void 0){const g=mS();Ed=g?{figure:g,out:document.createElement("canvas")}:null}if(!Ed)return"";const{figure:u,out:d}=Ed,f=pS(a),m=r?.92:.9;d.width=d.height=i;const p=d.getContext("2d");return p?(u.paint(p,i,((y=ui[e])==null?void 0:y.hex)??ui.gray.hex,f,{shadow:r,zoom:m}),s&&gS(p,i,hS(f,m)),d.toDataURL("image/png")):""}function oB(e,a,i,r,s=!1){const u=Math.round(i*Math.min(3,Math.max(1,r))),d=i>=rB,f=s&&d,m=`${e}:${a}:${u}:${f}`;let p=kp.get(m);return p||(p=Promise.resolve().then(()=>lB(e,a,u,d,f)),kp.set(m,p),p.catch(()=>kp.delete(m))),p}function sB(e){let a;const i=()=>{e(),r()},r=()=>{a=matchMedia(`(resolution: ${devicePixelRatio}dppx)`),a.addEventListener("change",i,{once:!0})};return r(),()=>a==null?void 0:a.removeEventListener("change",i)}function fo({color:e,mood:a="normal",size:i=36,badge:r,crown:s=!1}){const[u,d]=w.useState(),f=w.useSyncExternalStore(sB,()=>devicePixelRatio||1);return w.useEffect(()=>{let m=!0;return oB(e,a,i,f,s).then(p=>{m&&d(p)}).catch(()=>{}),()=>{m=!1}},[e,a,i,f,s]),o.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${i}px`,"--jv-avatar-color":fS(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=AA,vr=OA;function yr({className:e,children:a,...i}){return o.jsxs(_A,{"data-slot":"select-trigger",className:gn("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(zA,{asChild:!0,children:o.jsx(cl,{className:"size-4 opacity-50"})})]})}function xr({className:e,children:a,container:i,...r}){return o.jsx(IA,{container:i??void 0,children:o.jsx(PA,{"data-slot":"select-content",position:"popper",sideOffset:5,className:gn("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(GA,{children:a})})})}function fa({className:e,children:a,...i}){return o.jsxs(XA,{"data-slot":"select-item",className:gn("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(QA,{children:a}),o.jsx(JA,{"data-slot":"select-indicator",className:"absolute right-2",children:o.jsx(ma,{className:"size-4"})})]})}function Tn(){const[e,a]=w.useState(null),[i,r]=w.useState(""),s=w.useCallback(async(u,d,f)=>{a(u),r("");try{return await d(),!0}catch(m){return r(Wt(m,f)),!1}finally{a(null)}},[]);return{busy:e!==null,doing:e,error:i,setError:r,run:s}}const wb={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},cB=(e,a)=>JSON.stringify([e,a]);function vS({bot:e,connections:a,onSaved:i,onManage:r}){const[s,u]=w.useState([]),[d,f]=w.useState(!0),[m,p]=w.useState(""),[y,g]=w.useState(0),{busy:j,error:b,run:S}=Tn(),[k,N]=w.useState(!1),[T,A]=w.useState(""),[C,M]=w.useState(-1),O=w.useRef(null),_=w.useRef(null),[I,V]=w.useState(null),X=w.useId();w.useEffect(()=>{let re=!0;return f(!0),p(""),he.modelOptions().then(R=>{re&&u(R.connections)}).catch(R=>{re&&p(Wt(R,"botModel.loadFailed"))}).finally(()=>{re&&f(!1)}),()=>{re=!1}},[a,y]);const L=s.flatMap(re=>re.models.map(R=>({...R,connectionId:re.id,connectionName:re.name,key:cB(re.id,R.id)}))).sort((re,R)=>re.name.localeCompare(R.name,void 0,{numeric:!0})),H=L.find(re=>re.connectionId===e.connectionId&&re.id===e.modelId),q=a.find(re=>re.id===e.connectionId),Z=q==null?void 0:q.models.find(re=>re.id===e.modelId),$=L.filter(re=>`${re.name} ${re.id} ${re.connectionName}`.toLocaleLowerCase().includes(T.trim().toLocaleLowerCase())),F=s.map(re=>({...re,models:$.filter(R=>R.connectionId===re.id)})).filter(re=>re.models.length),K=F.flatMap(re=>re.models),U=L.length>8,P=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function ie(re){N(re),A(""),M(-1)}async function z(re,R,B){ie(!1),await S("choose",async()=>i(await he.selectBotModel(e.id,re,R,B,sl())),"botModel.switchFailed")}function ne(re){var R;if(re.key==="ArrowDown"||re.key==="ArrowUp"){re.preventDefault();const B=re.key==="ArrowDown"?Math.min(C+1,K.length-1):Math.max(C-1,0);M(B),(R=document.getElementById(`${X}-${B}`))==null||R.scrollIntoView({block:"nearest"})}else if(re.key==="Enter"&&K[C]){re.preventDefault();const B=K[C];z(B.connectionId,B.id,e.thinkingLevel)}}return o.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":j||d,ref:re=>V((re==null?void 0:re.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(L3,{open:k,onOpenChange:ie,children:[o.jsxs(B3,{className:"jv-model-trigger","aria-label":x("botModel.pick"),"aria-haspopup":"listbox",disabled:j||d||!!m,children:[o.jsx("span",{children:(H==null?void 0:H.name)??(Z==null?void 0:Z.name)??x(e.connectionId?"botModel.broken":"botModel.choose")}),j?o.jsx(b4,{className:"animate-spin"}):o.jsx(cl,{})]}),o.jsx(I3,{container:I,children:o.jsxs(P3,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,collisionBoundary:I,onOpenAutoFocus:re=>{var R;re.preventDefault(),(R=U?O.current:_.current)==null||R.focus()},onKeyDown:ne,children:[U&&o.jsxs("div",{className:"jv-model-search",children:[o.jsx(gs,{}),o.jsx("input",{ref:O,role:"combobox","aria-label":x("botModel.filter"),"aria-expanded":"true","aria-controls":X,"aria-activedescendant":C>=0?`${X}-${C}`:void 0,placeholder:x("botModel.filterPlaceholder"),value:T,onChange:re=>{A(re.target.value),M(-1)},autoComplete:"off",spellCheck:!1})]}),o.jsxs("div",{ref:_,id:X,role:"listbox","aria-label":x("botModel.list"),tabIndex:-1,"aria-activedescendant":C>=0?`${X}-${C}`:void 0,className:"jv-model-options",children:[F.map(re=>o.jsxs("div",{role:"group","aria-label":re.name,children:[o.jsx("div",{className:"jv-model-group-label",children:re.name}),re.models.map(R=>{const B=K.indexOf(R),W=R.connectionId===e.connectionId&&R.id===e.modelId;return o.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${X}-${B}`,"aria-selected":W,"data-active":B===C||void 0,title:R.id,onClick:()=>void z(R.connectionId,R.id,e.thinkingLevel),children:[o.jsx("span",{className:"jv-option-check",children:W&&o.jsx(ma,{})}),o.jsx("span",{children:R.name})]},R.key)})]},re.id)),!K.length&&o.jsx("p",{className:"jv-menu-empty",children:x(L.length?"botModel.noMatch":"botModel.none")})]}),o.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{ie(!1),r()},children:x("botModel.manage")})]})})]}),(H||q)&&o.jsx("span",{className:"jv-field-note",children:(H==null?void 0:H.connectionName)??(q==null?void 0:q.displayName)})]}),o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("botModel.thinking")}),o.jsxs(gr,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:j||d||!H||!!m,onValueChange:re=>{e.connectionId&&z(e.connectionId,e.modelId,re)},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",...(H==null?void 0:H.thinking.levels)??[]].map(re=>{const R=H==null?void 0:H.thinkingLevelMap[re],B=R&&R!==re?R:re;return o.jsx(fa,{value:re,children:o.jsxs("span",{className:"jv-thinking-option",children:[o.jsxs("span",{children:[B,R&&R!==re&&o.jsxs("small",{children:[" (",re,")"]})]}),o.jsx("small",{children:wb[re]&&x(wb[re])})]})},re)})})]})]})]}),d&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.loading")}),j&&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(re=>re+1),children:x("common.retry")})]}),b&&o.jsx("p",{className:"jv-model-error",role:"alert",children:b})]})}function xt({className:e,type:a,...i}){return o.jsx("input",{type:a,"data-slot":"input",className:gn("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})}const eo=2**30,uB=2**20,ao=(e,a=2)=>String(Number(e.toFixed(a))),Sb=e=>e<eo?`${Math.round(e/uB)} MB`:`${ao(e/eo,1)} GB`,dB=e=>`${e<10?ao(e,1):Math.round(e)}%`,fB=e=>e===1?x("environment.limits.oneCore"):x("environment.limits.cores",{count:ao(e)});function hB({memory:e,cpus:a}){if(e===null&&a===null)return x("environment.limits.none");const i=x("environment.limits.unlimited");return`${x("environment.limits.memory",{value:e===null?i:`${ao(e/eo)} GB`})} · ${x("environment.limits.cpu",{value:a===null?i:fB(a)})}`}function mB({bot:e,onSaved:a}){const i=e.environment.computer,r=i.state==="running",[s,u]=w.useState(null),[d,f]=w.useState(!1),[m,p]=w.useState(""),[y,g]=w.useState(""),{busy:j,error:b,setError:S,run:k}=Tn();w.useEffect(()=>{let _=!0;const I=()=>void he.computerResources(e.id).then(X=>{_&&u(X)}).catch(()=>{});I();const V=r?setInterval(I,1e4):void 0;return()=>{_=!1,clearInterval(V)}},[e.id,r]);const N=r?(s==null?void 0:s.usage)??null:null,T=(s==null?void 0:s.capacity)??null;function A(){p(i.limits.memory===null?"":ao(i.limits.memory/eo)),g(i.limits.cpus===null?"":ao(i.limits.cpus)),S(""),f(!0)}const C={memory:m.trim()?Math.round(Number(m)*eo):null,cpus:y.trim()?Number(y):null},M=N&&C.memory!==null&&C.memory<N.memory,O=_=>{_.preventDefault(),k("save",async()=>{a(await he.setComputerLimits(e.id,C)),f(!1)},"environment.limits.failed")};return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-env-fact jv-env-limits","aria-expanded":d,onClick:()=>d?f(!1):A(),children:[o.jsx("span",{children:x("environment.limits")}),o.jsx("span",{className:"jv-env-value",children:hB(i.limits)}),o.jsx(Ii,{className:"jv-row-chevron"})]}),N&&!d&&o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-fact",children:[o.jsx("span",{children:x("environment.usage")}),o.jsx("span",{className:"jv-env-value",children:x("environment.usage.value",{memory:Sb(N.memory),cpu:dB(N.cpu)})})]}),d&&o.jsx("div",{className:"jv-list-row jv-static-row jv-env-details",children:o.jsxs("form",{className:"jv-env-limits-form","aria-label":x("environment.limits.edit"),onSubmit:O,children:[o.jsxs("div",{className:"jv-env-limit-fields",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("environment.limits.memoryField")}),o.jsx(xt,{type:"number",inputMode:"decimal",min:.25,max:T?Number((T.memory/eo).toFixed(2)):void 0,step:"any",placeholder:x("environment.limits.unlimited"),value:m,onChange:_=>{p(_.target.value),S("")}})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("environment.limits.cpuField")}),o.jsx(xt,{type:"number",inputMode:"decimal",min:.1,max:T==null?void 0:T.cpus,step:"any",placeholder:x("environment.limits.unlimited"),value:y,onChange:_=>{g(_.target.value),S("")}})]})]}),T&&o.jsx("small",{className:"jv-hint",children:x("environment.limits.machine",{cpus:T.cpus,memory:ao(T.memory/eo,1)})}),M&&o.jsx("p",{className:"jv-env-warn",role:"status",children:x("environment.limits.below",{usage:Sb(N.memory)})}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b}),o.jsxs("div",{className:"jv-env-confirm-actions",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(!1),children:x("common.cancel")}),o.jsx(Te,{type:"submit",className:"jv-primary",size:"sm",disabled:j,children:x("common.save")})]})]})})]})}const pB={preparing:"environment.state.preparing",running:"environment.state.running",stopped:"environment.state.stopped",failed:"environment.state.failed",unavailable:"environment.state.unavailable"};function gB({bot:e,onSaved:a,onAddMachine:i}){const{doing:r,error:s,run:u}=Tn(),[d,f]=w.useState(null),{computer:m,current:p,currentName:y,machines:g=[]}=e.environment,j=(N,T,A)=>u(N,async()=>a(await T()),A),b=N=>void j(N,()=>he.computer(e.id,N),"common.failed"),S=m==null?void 0:m.state,k=S?pB[S]: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&&S&&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")}),p==="ssh"&&o.jsx("span",{className:"jv-env-away",children:x("environment.awayMachine",{name:y??""})})]}),o.jsx("span",{className:"jv-status","data-ok":S==="running"||void 0,"data-busy":S==="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})]}),S!=="unavailable"&&o.jsx(mB,{bot:e,onSaved:a}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-env-details",children:[S==="unavailable"?o.jsx("p",{children:x("environment.unavailable")}):!d&&o.jsxs("div",{className:"jv-env-actions",children:[o.jsx(Te,{type:"button",variant:"outline",size:"sm",disabled:!!r||S==="preparing",onClick:()=>S==="running"?f("stop"):b("start"),children:x(r==="start"?"environment.starting":r==="stop"?"environment.stopping":S==="running"?"environment.stop":"environment.start")}),o.jsx(Te,{type:"button",variant:"ghost",size:"sm",disabled:!!r||S==="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(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:x("common.cancel")}),o.jsx(Te,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const N=d;f(null),b(N)},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(N=>o.jsxs("button",{type:"button",role:"switch","aria-checked":N.granted,disabled:!!r,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void j("grant",()=>he.grantBotMachine(e.id,N.id,!N.granted),"environment.accessFailed"),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:N.name})}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]},N.id))]}),s&&o.jsx("p",{className:"jv-note-error",role:"alert",children:s})]})}function ps({className:e,...a}){return o.jsx("textarea",{"data-slot":"textarea",className:gn("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 kb=(e,a)=>ro(new Date(2e3,0,1,e,a)),yS=e=>na(new Date(2023,0,1+e),{weekday:"long"}),xS=e=>`${T0(e)} ${ro(e)}`;function vB(e){switch(e.kind){case"once":return x("tasks.schedule.once",{time:xS(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:kb(e.hour,e.minute)});case"weekly":return x("tasks.schedule.weekly",{day:yS(e.weekday),time:kb(e.hour,e.minute)})}}const cs=e=>String(e).padStart(2,"0"),Cb=e=>{const a=new Date(e);return`${a.getFullYear()}-${cs(a.getMonth()+1)}-${cs(a.getDate())}T${cs(a.getHours())}:${cs(a.getMinutes())}`},yB=(e,a)=>`${cs(e)}:${cs(a)}`,xB=["once","every","daily","weekly"],bS=5;function bB(e){const a=Date.now()+36e5,i={at:Cb(a-a%(300*1e3)),count:"30",unit:"minutes",time:"09:00",weekday:"1"};return e&&(e.kind==="once"&&(i.at=Cb(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=yB(e.hour,e.minute)),e.kind==="weekly"&&(i.weekday=String(e.weekday))),i}function jB(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>=bS?{kind:e,minutes:u}:null}return s?e==="daily"?{kind:e,...s}:{kind:e,weekday:Number(a.weekday),...s}:null}function wB({task:e,busy:a,error:i,onSave:r,onDelete:s,onCancel:u}){const[d,f]=w.useState((e==null?void 0:e.name)??""),[m,p]=w.useState((e==null?void 0:e.instruction)??""),[y,g]=w.useState((e==null?void 0:e.schedule.kind)??"daily"),[j,b]=w.useState(()=>bB(e==null?void 0:e.schedule)),[S,k]=w.useState(!1),N=jB(y,j),T=C=>b(M=>({...M,...C}));function A(C){C.preventDefault(),N&&d.trim()&&m.trim()&&r({name:d.trim(),instruction:m.trim(),schedule:N})}return o.jsxs("form",{className:"jv-panel jv-task-editor",onSubmit:A,"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(xt,{required:!0,maxLength:80,value:d,placeholder:x("tasks.namePlaceholder"),onChange:C=>f(C.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.instruction")}),o.jsx(ps,{required:!0,maxLength:8e3,rows:4,value:m,placeholder:x("tasks.instructionPlaceholder"),onChange:C=>p(C.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:xB.map(C=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===C,onClick:()=>g(C),children:x(`tasks.kind.${C}`)},C))}),o.jsxs("div",{className:"jv-task-when","data-kind":y,children:[y==="once"&&o.jsx(xt,{type:"datetime-local","aria-label":x("tasks.at"),value:j.at,onChange:C=>T({at:C.target.value})}),y==="every"&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"jv-task-label",children:x("tasks.everyCount")}),o.jsx(xt,{type:"number",min:j.unit==="hours"?1:bS,step:1,"aria-label":x("tasks.everyCount"),value:j.count,onChange:C=>T({count:C.target.value})}),o.jsxs(gr,{value:j.unit,onValueChange:C=>T({unit:C}),children:[o.jsx(yr,{"aria-label":x("tasks.everyCount"),children:o.jsx(vr,{})}),o.jsx(xr,{className:"jv-select-menu",children:["minutes","hours"].map(C=>o.jsx(fa,{value:C,children:x(`tasks.unit.${C}`)},C))})]})]}),y==="weekly"&&o.jsxs(gr,{value:j.weekday,onValueChange:C=>T({weekday:C}),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(C=>o.jsx(fa,{value:String(C),children:yS(C)},C))})]}),(y==="daily"||y==="weekly")&&o.jsx(xt,{type:"time","aria-label":x("tasks.time"),value:j.time,onChange:C=>T({time:C.target.value})})]}),y==="every"&&!N&&o.jsx("small",{className:"jv-hint",children:x("tasks.minimum")})]}),i&&o.jsx("p",{className:"jv-note-error",role:"alert",children:i}),S&&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(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(!1),children:x("common.cancel")}),o.jsx(Te,{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(Te,{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(Te,{type:"button",variant:"ghost",onClick:u,children:x("common.cancel")}),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:a||!N||!d.trim()||!m.trim(),children:x("common.save")})]})]})]})}function SB({bot:e,runs:a}){const[i,r]=w.useState(null),[s,u]=w.useState(null),{busy:d,error:f,setError:m,run:p}=Tn(),y=Tn(),g=d||y.busy,j=y.error;w.useEffect(()=>{let O=!0;return he.tasks(e.id).then(_=>{O&&r(_.tasks)}).catch(_=>{O&&m(Wt(_,"tasks.loadFailed"))}),()=>{O=!1}},[e.id,a]);const b=O=>r(_=>(_??[]).some(I=>I.id===O.id)?_.map(I=>I.id===O.id?O:I):[..._??[],O]);function S(O){m(""),y.setError(""),u(O)}async function k(O){await y.run("save",async()=>{b(s==="new"||!s?await he.createTask(e.id,O):await he.updateTask(e.id,s.id,O)),u(null)},"tasks.saveFailed")}const N=O=>p("change",O,"tasks.changeFailed"),T=O=>N(async()=>b(await he.setTaskOn(e.id,O.id,O.state!=="active"))),A=O=>N(async()=>{await he.deleteTask(e.id,O.id),r(_=>(_==null?void 0:_.filter(I=>I.id!==O.id))??null),u(null)}),C=O=>O.state==="active"?O.schedule.kind==="once"||!O.nextRunAt?"":x("tasks.next",{time:xS(O.nextRunAt)}):x(O.state==="done"?"tasks.done":"tasks.paused"),M=O=>[vB(O.schedule),C(O)].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(Te,{type:"button",variant:"ghost",size:"sm",disabled:g||i===null,onClick:()=>S("new"),children:[o.jsx(br,{}),x("tasks.add")]})]}),s?o.jsx(wB,{task:s==="new"?void 0:s,busy:g,error:j,onSave:O=>void k(O),onCancel:()=>u(null),...s==="new"?{}:{onDelete:()=>void A(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(O=>o.jsxs("div",{className:"jv-task-row","data-state":O.state,children:[o.jsx("button",{type:"button",className:"jv-list-row jv-task-open","aria-label":O.name,onClick:()=>S(O),children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:O.name}),o.jsx("span",{children:M(O)})]})}),O.state!=="done"&&o.jsx("button",{type:"button",role:"switch","aria-checked":O.state==="active","aria-label":x("tasks.toggle",{name:O.name}),disabled:g,className:"jv-env-access jv-task-switch",onClick:()=>void T(O),children:o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})})]},O.id))}),f&&o.jsx("p",{className:"jv-note-error",role:"alert",children:f})]})}const Nb={local:"ports.hint.local",idle:"ports.hint.idle",stopped:"ports.hint.stopped"};function Eb(e){const a=`${location.protocol}//${location.hostname.includes(":")?`[${location.hostname}]`:location.hostname}:${e.hostPort}`;return[a,...e.urls.filter(i=>i!==a)]}function kB({bot:e,runs:a}){const[i,r]=w.useState(null),[s,u]=w.useState(null),[d,f]=w.useState(!1),[m,p]=w.useState(null),{busy:y,error:g,setError:j,run:b}=Tn();w.useEffect(()=>{let A=!0;return he.ports(e.id).then(C=>{A&&r(C.ports)}).catch(C=>{A&&j(Wt(C,"ports.loadFailed"))}),()=>{A=!1}},[e.id,a]);const S=s===null?null:(i==null?void 0:i.find(A=>A.port===s))??null;function k(A){j(""),f(!1),u(A)}const N=A=>b("unpublish",async()=>{await he.unpublishPort(e.id,A.port),r(C=>(C==null?void 0:C.filter(M=>M.port!==A.port))??null),k(null)},"ports.changeFailed"),T=A=>o.jsx("span",{className:"jv-port-state","data-state":A.state,children:x(`ports.state.${A.state}`)});return o.jsxs("section",{className:"jv-section","aria-label":x("ports.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("ports.title")}),S?o.jsxs("div",{className:"jv-list jv-port-details",role:"group","aria-label":S.name,children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-port-head",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:S.name}),o.jsx("span",{children:S.description})]}),o.jsx("span",{className:"jv-status","data-ok":S.state==="live"||void 0,"data-busy":S.state==="local"||S.state==="idle"||void 0,children:x(`ports.state.${S.state}`)})]}),Nb[S.state]&&o.jsx("div",{className:"jv-list-row jv-static-row jv-port-hint",role:"note",children:x(Nb[S.state])}),o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("ports.sandboxPort")})}),o.jsx("code",{className:"jv-port-value",children:S.port})]}),Eb(S).map((A,C)=>o.jsxs("div",{className:"jv-list-row jv-static-row jv-port-link",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x(C?"ports.linkOther":"ports.link")}),o.jsx("code",{title:A,children:A})]}),o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(m===A?"ui.copied":"ports.copy"),onClick:()=>void ks(A).then(M=>p(M?A:null)),children:m===A?o.jsx(ma,{}):o.jsx(Ic,{})}),o.jsx(Te,{asChild:!0,variant:"ghost",size:"icon-sm",children:o.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer","aria-label":x("ports.open",{name:S.name}),children:o.jsx(qp,{})})})]},A)),d?o.jsxs("div",{className:"jv-list-row jv-static-row jv-port-confirm",role:"group","aria-label":x("ports.stopTitle",{name:S.name}),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("ports.stopTitle",{name:S.name})}),o.jsx("span",{children:x("ports.stopBody")})]}),o.jsxs("div",{className:"jv-port-actions-end",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(!1),children:x("common.cancel")}),o.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"jv-port-unpublish",disabled:y,onClick:()=>void N(S),children:x("ports.stop")})]})]}):o.jsxs("div",{className:"jv-list-row jv-static-row jv-port-actions",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"jv-port-unpublish",disabled:y,onClick:()=>f(!0),children:x("ports.stop")}),o.jsx(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(null),children:x("ports.back")})]})]}):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("ports.empty")})})}):i.map(A=>o.jsxs("div",{className:"jv-port-row","data-state":A.state,children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-port-open","aria-label":A.name,onClick:()=>k(A.port),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:A.name}),o.jsxs("span",{className:"jv-port-line",children:[x("ports.port",{port:A.port})," · ",T(A)]})]}),o.jsx(Ii,{className:"jv-row-chevron"})]}),o.jsx(Te,{asChild:!0,variant:"ghost",size:"icon-sm",className:"jv-port-go",children:o.jsx("a",{href:Eb(A)[0],target:"_blank",rel:"noopener noreferrer","aria-label":x("ports.open",{name:A.name}),children:o.jsx(qp,{})})})]},A.port))}),g&&o.jsx("p",{className:"jv-note-error",role:"alert",children:g})]})}function CB(){const[e,a]=w.useState(!1),i=r=>s=>{s.pointerType==="mouse"&&a(r)};return o.jsxs(L3,{open:e,onOpenChange:a,children:[o.jsx(B3,{className:"jv-context-stale",title:"","aria-label":x("bot.contextStale"),onPointerEnter:i(!0),onPointerLeave:i(!1),children:o.jsx(L0,{"aria-hidden":"true"})}),o.jsx(I3,{children:o.jsx(P3,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:r=>r.preventDefault(),children:x("bot.contextStale")})})]})}const NB={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function EB({bot:e,status:a,connections:i,chats:r,onSaved:s,onManageModels:u,onAddMachine:d,onClose:f,onOpenChat:m,onOpenSubscription:p}){const[y,g]=w.useState("info"),[j,b]=w.useState(e.name),[S,k]=w.useState(e.description),[N,T]=w.useState(e.systemPrompt),[A,C]=w.useState(!1),[M,O]=w.useState(null),[_,I]=w.useState(null),[V,X]=w.useState(null),[L,H]=w.useState(""),[q,Z]=w.useState(!1),[$,F]=w.useState(null);w.useEffect(()=>{let R=!0;return he.botSubscriptions(e.id).then(B=>{R&&F(B.chats)}).catch(()=>{}),()=>{R=!1}},[e.id]),w.useEffect(()=>{if(!q)return;const R=setTimeout(()=>Z(!1),1500);return()=>clearTimeout(R)},[q]);const K=j!==e.name||S!==e.description||N!==e.systemPrompt,U=(a==null?void 0:a.status)??"stop",P=a==null?void 0:a.context;async function ie(R){X(R),H("");try{await he.controlBot(e.id,R)}catch(B){H(Wt(B,"common.failed"))}finally{X(null)}}async function z(R){R.preventDefault(),C(!0),O(null);try{s(await he.saveBot(e.id,{name:j,description:S,systemPrompt:N})),O({kind:"ok",text:x("bot.saved")})}catch(B){O({kind:"error",text:Wt(B,"common.saveFailed")})}finally{C(!1)}}async function ne(R){if(R!==e.color){C(!0),I(null);try{s(await he.setBotColor(e.id,R))}catch(B){I({kind:"error",text:Wt(B,"bot.changeFailed")})}finally{C(!1)}}}const re=R=>R&&o.jsx("p",{className:R.kind==="error"?"jv-note-error":"jv-note-ok",role:R.kind==="error"?"alert":"status",children:R.text});return o.jsx(uS,{open:!0,onOpenChange:R=>{R||f()},children:o.jsx(dS,{className:`jv-bot-info jv-ui ${y==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:y==="activity"?o.jsx(YL,{botId:e.id,botName:e.name,onBack:()=>g("info"),onOpenChat:m}):y==="usage"?o.jsx(JL,{botId:e.id,botName:e.name,onBack:()=>g("info")}):o.jsxs(o.Fragment,{children:[o.jsx(Rg,{className:"jv-dialog-header",children:o.jsx(wf,{children:x("entry.botInfo")})}),o.jsxs("div",{className:"jv-bot-scroll",children:[o.jsxs("section",{className:"jv-bot-hero",children:[o.jsx(fo,{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(ui).map(R=>o.jsx("button",{type:"button",role:"radio","aria-checked":e.color===R,"aria-label":x(ui[R].label),title:x(ui[R].label),disabled:A,style:{background:fS(R)},onClick:()=>void ne(R)},R))}),re(_)]})]}),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(R=>o.jsx("li",{children:x(R)},R))})]})]}),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(vS,{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(CB,{}),P.tokens===null?x("bot.unknown"):x("bot.tokens",{used:Hi(P.tokens),window:Hi(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:R=>void z(R),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("info.name")}),o.jsx(xt,{id:"jarvy-bot-name",required:!0,maxLength:80,value:j,onChange:R=>b(R.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("bot.description")}),o.jsx(ps,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:S,onChange:R=>k(R.target.value),placeholder:x("bot.descriptionPlaceholder")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:"Persona"}),o.jsx(ps,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:N,onChange:R=>T(R.target.value),placeholder:x("bot.personaPlaceholder")}),o.jsx("small",{className:"jv-hint",children:x("bot.personaHint")})]}),o.jsxs("div",{className:"jv-form-footer",children:[re((M==null?void 0:M.kind)==="error"||!K?M:null)??(K?o.jsx("p",{className:"jv-hint",children:x("bot.unsaved")}):o.jsx("span",{})),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:A||!K,children:x(A?"bot.saving":"common.save")})]})]})]}),o.jsx(gB,{bot:e,onSaved:s,onAddMachine:d}),o.jsx(SB,{bot:e,runs:`${U}:${(a==null?void 0:a.runId)??""}`}),o.jsx(kB,{bot:e,runs:`${U}:${(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":U!=="stop"||void 0,"data-busy":U==="running"||void 0,children:x(NB[U])}),U==="running"&&o.jsx(Te,{type:"button",variant:"ghost",size:"sm",disabled:!!V,onClick:()=>void ie("abort"),children:x(V==="abort"?"bot.aborting":"bot.abort")}),o.jsx(Te,{type:"button",variant:"outline",size:"sm",disabled:!!V||!e.connectionId,onClick:()=>void ie(U==="stop"?"start":"stop"),children:x(V==="start"?"bot.starting":V==="stop"?"bot.stopping":U==="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(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(q?"ui.copied":"bot.copyWorkspace"),onClick:()=>void ks(e.workspacePath).then(R=>Z(R)),children:q?o.jsx(ma,{}):o.jsx(Ic,{})})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>g("activity"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(U7,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("bot.activity")})}),o.jsx(Ii,{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(s7,{})}),o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("usage.title")})}),o.jsx(Ii,{className:"jv-row-chevron"})]})]}),L&&o.jsx("p",{className:"jv-note-error",role:"alert",children:L})]}),$&&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:$.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")})})}):$.map(R=>{var B;return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>p(R),children:[o.jsx("span",{className:"jv-row-icon",children:R.type==="thread"?o.jsx(A4,{}):o.jsx(k7,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:R.title}),o.jsx("span",{children:R.type==="thread"?x("bot.threadIn",{channel:((B=r.find(W=>W.id===R.parentId))==null?void 0:B.title)??""}):x("info.menu")})]}),o.jsx(Ii,{className:"jv-row-chevron"})]},R.id)})})]})]})]})})})}function jS({id:e,value:a,sections:i,onChange:r}){const[s,u]=w.useState(null);return o.jsxs(gr,{value:a??"none",onValueChange:d=>r(d==="none"?null:d),children:[o.jsx(yr,{id:e,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:o.jsx(vr,{})}),o.jsxs(xr,{className:"jv-select-menu",position:"popper",sideOffset:4,container:s,children:[o.jsx(fa,{value:"none",children:x("info.noSection")}),i.map(d=>o.jsx(fa,{value:d.id,children:d.name},d.id))]})]})}const TB=1024*1024,AB=e=>e==="text"||e==="markdown"||e==="html"||e==="svg",MB=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],di=e=>`/api/attachments/${e.id}`,_B=e=>Og(e)==="gif"||e.mimeType==="image/gif"?di(e):`${di(e)}/thumb`,Og=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function Kc(e){const a=Og(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/")||MB.includes(a)?"text":"download"}const Ec=e=>e==="image"||e==="svg",wS=e=>e==="video"||e==="audio",SS={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 kS(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 CS(e,a){const i=await fetch(di(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 NS(e,a){return Kc(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await CS(e,a))}`:di(e)}const Tb=e=>`/api/attachments/${e.id}/run`;function RB(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 OB(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}`}const Ab=new Map;function zB({file:e,onSize:a}){const i=Kc(e)==="svg",[r,s]=w.useState(()=>i?void 0:_B(e)),[u,d]=w.useState(!1);w.useEffect(()=>{if(!i)return;const m=new AbortController;return d(!1),NS(e,m.signal).then(s).catch(()=>{m.signal.aborted||d(!0)}),()=>m.abort()},[e.id]);const f=()=>{!i&&r!==di(e)?s(di(e)):d(!0)};return u?o.jsx("span",{className:"ui-broken-image",children:o.jsx(Ue,{name:"image"})}):r?o.jsx("img",{src:r,alt:e.name,loading:"lazy",onError:f,onLoad:m=>{const{naturalWidth:p,naturalHeight:y}=m.currentTarget;p&&y&&a({width:p,height:y})}}):o.jsx(Ue,{name:"image"})}function DB({file:e,onOpen:a}){const[i,r]=w.useState(()=>Ab.get(e.id)),s=Kc(e),u=Ec(s),d=wS(s),f=Og(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(zB,{file:e,onSize:p=>{Ab.set(e.id,p),r(p)}})}):o.jsx("span",{className:"ui-file-icon","data-kind":d?s:void 0,children:o.jsx(Ue,{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(SS[s])} · `:"",f?`${f} · `:"",kS(e.size)]})]})]}),o.jsx("a",{className:"ui-iconbtn",href:di(e),download:e.name,"aria-label":x("files.download",{name:e.name}),title:x("files.download",{name:e.name}),children:o.jsx(Ue,{name:"cloud-download"})})]})}function ES({files:e,onOpen:a}){const i=e.some(r=>Ec(Kc(r)));return o.jsx("div",{className:`ui-message-files ${i?"ui-has-images":""}`,children:e.map((r,s)=>o.jsx(DB,{file:r,onOpen:()=>a(s)},r.id))})}function TS({icon:e,title:a,titleClass:i,purpose:r,label:s,busy:u,error:d,ready:f,decline:m,confirm:p,onDecline:y,onConfirm:g,children:j}){const b=S=>{S.preventDefault(),f&&g()};return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":s,"aria-busy":u||void 0,onSubmit:b,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:[j,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:p})]})]})}function AS({state:e,text:a,purpose:i}){return o.jsxs("p",{className:"jv-question-done","data-state":e,title:`${a}
|
|
782
|
+
${i}`,children:[e==="answered"?o.jsx(ma,{"aria-hidden":"true"}):o.jsx(R4,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:a}),o.jsx("span",{className:"jv-question-asked",children:i})]})}function MS({label:e,value:a,visible:i,disabled:r,autoFocus:s,placeholder:u,hint:d,short:f,onChange:m,onVisible:p}){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:()=>p(!i),children:i?o.jsx(_0,{}):o.jsx(R0,{})})]}),o.jsx("small",{"data-short":f||void 0,children:d})]})}function LB({message:e,onSettled:a}){var A;const i=e.question,r=i.secret,[s,u]=w.useState(""),[d,f]=w.useState(!1),[m,p]=w.useState(!1),[y,g]=w.useState("always"),{busy:j,error:b,run:S}=Tn();if(i.state!=="pending"){const C=((A=i.answer)==null?void 0:A.selected[0])===1?"once":"always",M=i.state==="answered"?x(C==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:r.name}):x(i.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:r.name});return o.jsx(AS,{state:i.state,text:M,purpose:r.purpose})}const k=r.needsValue||m,N=s.length>0&&s.length<8,T=C=>{j||S("answer",async()=>a(await C()),"question.failed")};return o.jsxs(TS,{icon:o.jsx(g4,{"aria-hidden":"true"}),title:r.name,titleClass:"jv-secret-request-name",purpose:r.purpose,label:x("secretCard.title",{name:r.name}),busy:j,error:b,ready:!k||!!s,decline:x("secretCard.decline"),confirm:x(k?"secretCard.saveAllow":"secretCard.allow"),onDecline:()=>T(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>T(()=>he.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(L0,{"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:()=>{p(!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(MS,{label:x("secretCard.value"),value:s,visible:d,disabled:j,autoFocus:!0,placeholder:x("secretCard.valuePlaceholder"),hint:x(N?"secrets.shortValue":"secretCard.valueHint"),short:N,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(C=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===C,disabled:j,onClick:()=>g(C),children:x(C==="always"?"secretCard.always":"secretCard.once")},C))}),o.jsx("small",{children:x(y==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]})]})}function zg({publicKey:e}){const[a,i]=w.useState(!1);return w.useEffect(()=>{if(!a)return;const r=setTimeout(()=>i(!1),1500);return()=>clearTimeout(r)},[a]),o.jsxs("div",{className:"jv-machine-key",children:[o.jsx("code",{children:e}),o.jsxs("button",{type:"button",className:"ui-button jv-machine-copy","aria-label":x("machines.copy"),onClick:()=>void ks(e).then(i),children:[a?o.jsx(ma,{"aria-hidden":"true"}):o.jsx(Ic,{"aria-hidden":"true"}),o.jsx("span",{children:x(a?"machines.copied":"machines.copy")})]})]})}function _S(e){const[a,i]=w.useState(null),[r,s]=w.useState(null);return w.useEffect(()=>{if(!e||a)return;let u=!0;return he.prepareMachineKey().then(d=>{u&&i(d)}).catch(d=>{u&&s(Wt(d))}),()=>{u=!1}},[e,a]),{key:a,error:r,renew:()=>{i(null),s(null)}}}function BB({message:e,onSettled:a}){const i=e.question,r=i.machine,[s,u]=w.useState(""),[d,f]=w.useState(!1),{busy:m,error:p,setError:y,run:g}=Tn(),[j,b]=w.useState("password"),S=_S(i.state==="pending"&&!r.existing&&j==="key"),k=`${r.user}@${r.host}${r.port===22?"":`:${r.port}`}`;if(i.state!=="pending"){const C=x(i.state==="answered"?r.existing?"machineCard.granted":"machineCard.added":i.state==="dismissed"?"machineCard.declined":"machineCard.ignored",{name:r.name});return o.jsx(AS,{state:i.state,text:C,purpose:r.purpose})}const N=C=>{m||g("answer",async()=>{try{a(await C())}catch(M){throw M instanceof qi&&M.code==="ssh_key_expired"&&S.renew(),M}},"question.failed")},T=!r.existing,A=!T||(j==="key"?!!S.key:!!s);return o.jsxs(TS,{icon:o.jsx(X4,{"aria-hidden":"true"}),title:r.name,purpose:r.purpose,label:x("machineCard.title",{name:r.name}),busy:m,error:p,ready:A,decline:x("machineCard.decline"),confirm:x(T?j==="key"?m?"machines.verifying":"machines.verify":m?"machines.connecting":"machineCard.add":"machineCard.allow"),onDecline:()=>N(()=>he.answerQuestion(e.chatId,e.id,{action:"dismiss"})),onConfirm:()=>N(()=>he.fulfilMachine(e.chatId,e.id,j==="key"&&S.key?{keyId:S.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(L0,{"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(C=>o.jsx("code",{children:C},C))}),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(C=>o.jsx("button",{type:"button",role:"radio","aria-checked":j===C,disabled:m,onClick:()=>{b(C),y("")},children:x(C==="password"?"machines.byPassword":"machines.byKey")},C))}),j==="password"?o.jsx(MS,{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")}),S.key?o.jsx(zg,{publicKey:S.key.publicKey}):S.error?o.jsx("p",{className:"jv-question-error",role:"alert",children:S.error}):o.jsx("small",{children:"…"}),o.jsx("small",{children:x("machines.keyHint",{user:r.user})})]})]})]})}const Mb=e=>String.fromCharCode(65+e),_b=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function RS(e){const{message:a}=e,{secret:i,machine:r}=a.question;return i?o.jsx(LB,{message:{...a,question:{...a.question,secret:i}},onSettled:e.onSettled}):r?o.jsx(BB,{message:{...a,question:{...a.question,machine:r}},onSettled:e.onSettled}):o.jsx(IB,{...e})}function IB({message:e,keyboard:a,onSettled:i}){var T,A;const r=e.question,s=r.state==="pending",u=w.useId(),[d,f]=w.useState([]),[m,p]=w.useState(""),{busy:y,error:g,run:j}=Tn();async function b(C){y||!s||await j("settle",async()=>i(await he.answerQuestion(e.chatId,e.id,C)),"question.failed")}const S=C=>{if(!r.multiple){b({action:"answer",selected:[C]});return}f(M=>M.includes(C)?M.filter(O=>O!==C):[...M,C])},k=()=>void b({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),N=()=>{m.trim()&&(r.multiple?k():b({action:"answer",selected:[],custom:m.trim()}))};if(w.useEffect(()=>{if(!a||!s)return;const C=M=>{if(M.defaultPrevented||M.metaKey||M.ctrlKey||M.altKey||M.key.length!==1||_b(M.target)||_b(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const O=M.key.toUpperCase().charCodeAt(0)-65;O<0||O>=r.options.length||(M.preventDefault(),S(O))};return document.addEventListener("keydown",C,!0),()=>document.removeEventListener("keydown",C,!0)}),!s){const C=r.state==="answered"?[...(((T=r.answer)==null?void 0:T.selected)??[]).map(M=>{var O;return((O=r.options[M])==null?void 0:O.label)??""}),...(A=r.answer)!=null&&A.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}
|
|
783
|
+
${C===null?x("question.dismissed"):x("question.chose",{answer:C})}`,children:[C===null?o.jsx(R4,{"aria-hidden":"true"}):o.jsx(ma,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:C===null?x("question.dismissed"):A0("question.chose",{answer:o.jsx("strong",{children:C})})}),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(k4,{"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 b({action:"dismiss"}),children:o.jsx(vs,{"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((C,M)=>{const O=d.includes(M);return o.jsxs("button",{type:"button",className:"jv-question-option","data-style":C.style,"data-on":O||void 0,"aria-pressed":r.multiple?O:void 0,"aria-keyshortcuts":a?Mb(M).toLowerCase():void 0,disabled:y,onClick:()=>S(M),children:[o.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:O?o.jsx(ma,{}):Mb(M)}),o.jsxs("span",{className:"jv-question-copy",children:[o.jsx("strong",{children:C.label}),C.description&&o.jsx("small",{children:C.description})]})]},C.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:C=>p(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.nativeEvent.isComposing&&(C.preventDefault(),N())}}),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:N,children:x("question.send")})]})]})}function $i(e){return e?e.deleted?x("member.deleted",{name:e.name}):e.name:x("member.unknown")}const PB={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},OS=e=>x(PB[e??""]??"activity.running"),hi=e=>e.filter(a=>!a.deleted);function HB(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 Cp=/[\p{Script=Latin}\p{Nd}_]/u;function Dg(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&&Cp.test(i[d-1]))continue;const f=s.find(m=>{const p=m.name.toLowerCase();if(!p||!r.startsWith(p,d+1))return!1;const y=i[d+1+p.length];return!(y&&Cp.test(y)&&Cp.test(p.at(-1)))});f&&(u.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return u}function qB(e,a,i){let r="",s=0;for(const u of Dg(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,x0=(e,a=40)=>{const i=e.replace(/\s+/g," ").trim();return i.length>a?`${i.slice(0,a)}…`:i};function Lg(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 Cs(e){return Lg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||x("common.attachment")}function DS({message:e,members:a,me:i,onJump:r}){const s=qB(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=$i(a.find(p=>p.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(Ue,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:m})}),o.jsx("span",{className:"jv-quote-text",children:x0(f.text,80)})]})};return o.jsx(Yc,{text:s,renderQuote:u})}function LS(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 j=s.nextNode();j;j=s.nextNode())if(!((g=j.parentElement)!=null&&g.closest(".jv-quote-tag, button")))for(let b=0;b<j.data.length;b++)/\s/.test(j.data[b])||u.push({node:j,offset:b});const d=u.map(j=>j.node.data[j.offset]).join(""),f=d.indexOf(i);if(f<0)return!1;const m=u[f],p=u[f+i.length-1],y=new Range;return y.setStart(m.node,m.offset),y.setEnd(p.node,p.offset+1),CSS.highlights.set("jv-passage",new Highlight(y)),setTimeout(()=>CSS.highlights.delete("jv-passage"),2400),!0}function b0(e,a){var i;(i=e.querySelector(".jv-long-toggle[aria-expanded='false']"))==null||i.click(),e.scrollIntoView({block:"center",behavior:"smooth"}),!(a&&LS(e,a))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function UB({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(Ue,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:i.name})}),o.jsx("span",{className:"jv-quote-text",children:x0(i.text)}),o.jsx("button",{type:"button","aria-label":x("quote.remove",{text:x0(i.text,20)}),onClick:()=>a(r),children:"×"})]},r))}):null}function BS({container:e,drafts:a,chatId:i,source:r,members:s,onNotice:u}){const d=(y,g)=>{const j=r(y);j&&!FB(a,i,j,s,g)&&u(x("quote.tooMany",{count:10}))},[f,m]=w.useState(null);if(w.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const g=T=>{var A;return(A=T instanceof Element?T:T==null?void 0:T.parentElement)==null?void 0:A.closest(".ui-bubble")},j=()=>{var _,I;const T=getSelection(),A=(T==null?void 0:T.toString())??"";if(!T||T.isCollapsed||!A.trim()){m(null);return}const C=g(T.anchorNode),M=C==null?void 0:C.closest("[data-message]");if(!C||!M||!y.contains(C)||g(T.focusNode)!==C||(I=(_=T.anchorNode)==null?void 0:_.parentElement)!=null&&I.closest(".jv-quote-tag, button")){m(null);return}const O=T.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(O.left+O.width/2,90),innerWidth-90),y:Math.max(O.top-8,48),messageId:M.getAttribute("data-message"),text:A.trim()})},b=()=>requestAnimationFrame(j),S=()=>m(null),k=T=>{T.key==="Escape"&&S()},N=()=>{var T;(T=getSelection())!=null&&T.isCollapsed&&S()};return y.addEventListener("mouseup",b),y.addEventListener("scroll",S,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",N),()=>{y.removeEventListener("mouseup",b),y.removeEventListener("scroll",S,!0),document.removeEventListener("keydown",k),document.removeEventListener("selectionchange",N)}},[e]),!f)return null;const p=()=>{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:()=>{ks(f.text),p()},children:[o.jsx(Ue,{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),p()},children:[o.jsx(Ue,{name:"quote"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.quote")})]})]})}function FB(e,a,i,r,s){if(e.get(a).passages.length>=10)return!1;const u={messageId:i.id,name:$i(r.find(d=>d.id===i.senderId)),text:s};return e.update(a,d=>({passages:[...d.passages,u]})),!0}const VB="modulepreload",$B=function(e){return"/"+e},Rb={},GB=function(a,i,r){let s=Promise.resolve();if(i&&i.length>0){let d=function(p){return Promise.all(p.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(p=>{if(p=$B(p),p in Rb)return;Rb[p]=!0;const y=p.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const j=document.createElement("link");if(j.rel=y?"stylesheet":VB,y||(j.as="script"),j.crossOrigin="",j.href=p,m&&j.setAttribute("nonce",m),document.head.appendChild(j),y)return new Promise((b,S)=>{j.addEventListener("load",b),j.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}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 Ob;function YB(){return Ob??(Ob=GB(()=>import("./data-uMIXh-O1.js"),[]).then(e=>e.default.groups)),Ob}const KB=["👍","👎","👌","✅","❌","👀","🙏","🤔"],IS=9,PS="jarvy-emoji-recent",XB={"Smileys & Emotion":m7,"People & Body":S7,"Animals & Nature":o7,"Food & Drink":t9,"Travel & Places":P7,Activities:Z7,Objects:E7,Symbols:C7,Flags:x7};function QB(){try{const e=JSON.parse(localStorage.getItem(PS)??"[]");return Array.isArray(e)?e.filter(a=>typeof a=="string").slice(0,IS):[]}catch{return[]}}function ZB(e,a){const[,i,r,s,u]=e,d=a.toLowerCase(),f=i.toLowerCase().split(/[\s:]+/),m=r.toLowerCase().split(" "),p=u.split(" "),y=f.includes(d)||s.split(/:\s*/).includes(a)?5:m.includes(d)||p.includes(a)?4:f.some(g=>g.startsWith(d))||s.startsWith(a)?3:m.some(g=>g.startsWith(d))||p.some(g=>g.startsWith(a))?2:d.length>3&&m.some(g=>g.includes(d))||s.includes(a)||u.includes(a)?1:0;return y&&y*1e3-Math.min(m.length+p.length,999)}function JB({onPick:e}){const[a,i]=w.useState(""),[r,s]=w.useState(QB),[u,d]=w.useState(0),[f,m]=w.useState([]);w.useEffect(()=>{let A=!0;return YB().then(C=>{A&&m(C)}),()=>{A=!1}},[]);const p=w.useRef(null),y=w.useRef(null),g=w.useRef([]),j=w.useMemo(()=>new Map(f.flatMap(A=>A.emoji.map(C=>[C[0],C]))),[f]),b=w.useMemo(()=>{const A=a.trim();return!A||!f.length?null:f.flatMap(C=>C.emoji).map(C=>[C,ZB(C,A)]).filter(([,C])=>C>0).sort((C,M)=>M[1]-C[1]).map(([C])=>C)},[a,f]),S=A=>{const C=[A,...r.filter(M=>M!==A)].slice(0,IS);s(C);try{localStorage.setItem(PS,JSON.stringify(C))}catch{}e(A)};w.useEffect(()=>{const A=y.current;if(!A||b)return;const C=()=>{const M=A.getBoundingClientRect().top;let O=0;g.current.forEach((_,I)=>{_&&_.getBoundingClientRect().top-M<40&&(O=I)}),d(O)};return A.addEventListener("scroll",C,{passive:!0}),()=>A.removeEventListener("scroll",C)},[b]);const k=A=>{const C=g.current[A];!C||!y.current||(y.current.scrollTop+=C.getBoundingClientRect().top-y.current.getBoundingClientRect().top,d(A))},N=A=>o.jsx("button",{type:"button",className:"jv-emoji-cell",title:sl()==="zh"?A[3]:A[1],onClick:()=>S(A[0]),children:A[0]},A[0]),T=A=>{var I;const C=[...((I=p.current)==null?void 0:I.querySelectorAll(".jv-emoji-grid button"))??[]],M=C.indexOf(document.activeElement),O={ArrowRight:1,ArrowLeft:-1,ArrowDown:9,ArrowUp:-9,Home:0,End:0}[A.key];if(M<0||O===void 0)return;const _=C[A.key==="Home"?M-M%9:A.key==="End"?M-M%9+8:Math.max(0,Math.min(C.length-1,M+O))];_&&(A.preventDefault(),_.focus())};return o.jsxs("div",{className:"jv-emoji-panel",ref:p,onKeyDown:T,children:[o.jsx("div",{className:"jv-emoji-quick",children:KB.map(A=>o.jsx("button",{type:"button",onClick:()=>S(A),children:A},A))}),o.jsxs("label",{className:"jv-emoji-search",children:[o.jsx(gs,{"aria-hidden":"true"}),o.jsx("input",{value:a,onChange:A=>i(A.target.value),placeholder:x("actions.searchEmoji"),"aria-label":x("actions.searchEmoji"),autoFocus:matchMedia("(hover: hover)").matches,onKeyDown:A=>{A.key==="Escape"&&a&&(A.stopPropagation(),i("")),A.key==="Enter"&&(b!=null&&b[0])&&(A.preventDefault(),S(b[0][0]))}})]}),o.jsx("div",{className:"jv-emoji-groups",role:"tablist","data-hidden":!f.length||void 0,children:f.map(({name:A},C)=>{const M=XB[A];return o.jsx("button",{type:"button",role:"tab","aria-selected":!b&&C===u,title:x(`actions.emoji.${A}`),onKeyDown:O=>{var I,V;if(O.key!=="ArrowLeft"&&O.key!=="ArrowRight")return;O.preventDefault();const _=(C+(O.key==="ArrowRight"?1:-1)+f.length)%f.length;k(_),(V=(I=p.current)==null?void 0:I.querySelectorAll(".jv-emoji-groups button")[_])==null||V.focus()},onClick:()=>{b?(i(""),requestAnimationFrame(()=>k(C))):k(C)},children:o.jsx(M,{"aria-hidden":"true"})},A)})}),o.jsx("div",{className:"jv-emoji-scroll",ref:y,role:b?void 0:"tabpanel",children:b?b.length?o.jsx("div",{className:"jv-emoji-grid",children:b.map(N)}):o.jsx("p",{className:"jv-emoji-empty",children:x("actions.noEmoji")}):o.jsxs(o.Fragment,{children:[!!r.length&&o.jsxs("section",{className:"jv-emoji-section",children:[o.jsxs("h2",{children:[o.jsx(c7,{"aria-hidden":"true"}),x("actions.recent")]}),o.jsx("div",{className:"jv-emoji-grid",children:r.map(A=>N(j.get(A)??[A,"","","",""]))})]}),f.map(({name:A,emoji:C},M)=>o.jsxs("section",{className:"jv-emoji-section",ref:O=>{g.current[M]=O},children:[o.jsx("h2",{children:x(`actions.emoji.${A}`)}),o.jsx("div",{className:"jv-emoji-grid",children:C.map(N)})]},A))]})})]})}const WB=380,zb=310;function HS({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:$i(r)}),o.jsx("span",{className:"jv-reply-text",children:Cs(e.replyTo)})]})}function qS({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=>$i(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 US({message:e,me:a,onReply:i,onReact:r,onError:s}){const[u,d]=w.useState(!1),[f,m]=w.useState(!1),[p,y]=w.useState(!1),g=w.useRef(null);w.useEffect(()=>{if(!u)return;const S=k=>{var N;(N=g.current)!=null&&N.contains(k.target)||d(!1)};return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},[u]);const j=S=>{var N;const k=!((N=e.reactions.find(T=>T.emoji===S))!=null&&N.memberIds.includes(a));try{r(e,S,k)}catch(T){s(T)}d(!1)},b=()=>{var N,T,A,C;const S=(N=g.current)==null?void 0:N.getBoundingClientRect(),k=(A=(T=g.current)==null?void 0:T.closest(".ui-transcript, .ui-pane-body"))==null?void 0:A.getBoundingClientRect();if(S){const M=((k==null?void 0:k.right)??window.innerWidth)-S.left,O=S.right-((k==null?void 0:k.left)??0),_=!!((C=g.current)!=null&&C.closest(".ui-user"));m(((k==null?void 0:k.bottom)??window.innerHeight)-S.bottom<WB),y(_?M>=zb||M>O:O<zb&&M>O)}d(!u)};return o.jsxs("div",{className:"jv-message-actions",ref:g,children:[i&&o.jsx(gt,{icon:"arrow-u-up-right",label:x("actions.reply"),onClick:()=>i(e)}),o.jsx(gt,{icon:"smiley-plus",label:x("actions.react"),"aria-expanded":u,onClick:b}),u&&o.jsx("div",{className:"jv-emoji-menu",role:"dialog","aria-label":x("actions.pickEmoji"),"data-up":f||void 0,"data-right":p||void 0,onKeyDown:S=>{S.key==="Escape"&&d(!1)},children:o.jsx(JB,{onPick:j})})]})}const eI=12;function FS({children:e,whole:a=!1}){const i=w.useRef(null),[r,s]=w.useState(null),[u,d]=w.useState(a);w.useLayoutEffect(()=>{const m=i.current;if(!m)return;const p=()=>{const g=parseFloat(getComputedStyle(m).lineHeight)||24,j=Math.round(eI*g);s(m.scrollHeight>j+2*g?j:null)};p();const y=new ResizeObserver(p);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 VS(){const[e,a]=w.useState(new Set);return{has:i=>e.has(i),add:i=>a(r=>new Set(r).add(i))}}function $S({message:e}){return o.jsxs("div",{className:"jv-folded",children:[o.jsx("span",{className:"jv-folded-text",children:Cs(e)}),o.jsxs("span",{className:"jv-folded-tag",children:[o.jsx(Ue,{name:"fold"}),x("fold.folded")]})]})}const tI=5*6e4,io=e=>new Date(e).toDateString(),Bg=(e,a)=>a===void 0||io(e)!==io(a),GS=(e,a,i=a==null?void 0:a.createdAt)=>Bg(e.createdAt,i)||(a==null?void 0:a.senderId)!==e.senderId||e.createdAt-a.createdAt>=tI;function nI(e){const a=new Date,i=new Date(e),r=new Date(a.getFullYear(),a.getMonth(),a.getDate()-1);if(io(e)===io(a.getTime()))return x("chat.today");if(io(e)===r.toDateString())return x("chat.yesterday");const s=sl()==="zh"?"long":"short";return i.getFullYear()===a.getFullYear()?na(e,{weekday:"short",month:s,day:"numeric"}):na(e,{year:"numeric",month:s,day:"numeric"})}const aI=e=>na(e,{year:"numeric",month:sl()==="zh"?"long":"short",day:"numeric",hour:sl()==="zh"?"2-digit":"numeric",minute:"2-digit"}),iI=e=>io(e)===io(Date.now())?ro(e):`${T0(e)} ${ro(e)}`;function YS({time:e}){return o.jsx("div",{className:"jv-day",role:"separator",children:o.jsx("span",{children:nI(e)})})}function j0({time:e,className:a}){return o.jsx("time",{className:a,dateTime:new Date(e).toISOString(),title:aI(e),children:ro(e)})}const KS="jarvy-notice-closed",rI=()=>{try{return JSON.parse(localStorage.getItem(KS)??"[]")}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(fo,{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 lI({chat:e,members:a,bots:i,infoOpen:r,membersOpen:s,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:p,onThreads:y,onSearch:g}){const j=a.filter(b=>e.memberIds.includes(b.id));return o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(gt,{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(Ue,{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:j.length}),"aria-pressed":s,title:x("channel.members"),onClick:p,children:[o.jsx("span",{className:"jv-stack",children:j.slice(0,3).map(b=>o.jsx("span",{className:"jv-stack-item",children:o.jsx(Cr,{member:b,bots:i,size:22})},b.id))}),o.jsx("span",{className:"jv-members-count",children:j.length})]}),o.jsx(gt,{icon:"search",label:x("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:g}),o.jsx(gt,{icon:"chat-bubble",label:x("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function oI({chat:e,onSave:a}){var b;const[i,r]=w.useState(rI),[s,u]=w.useState(null),[d,f]=w.useState(!1);w.useEffect(()=>u(null),[e.id]);const m=!i.includes(e.id),p=e.note,y=()=>r(S=>{const k=m?[...S,e.id]:S.filter(N=>N!==e.id);return localStorage.setItem(KS,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(Ue,{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:S=>u(S.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>u(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!s.trim(),onClick:()=>void g(),children:x("common.save")})]})]});if(!p)return o.jsxs("div",{className:"jv-notice","data-empty":!0,children:[o.jsx(Ue,{name:"megaphone"}),o.jsx("span",{className:"jv-muted",children:x("notice.none")}),o.jsx(gt,{icon:"pencil",label:x("notice.edit"),onClick:()=>u("")})]});const j=((b=p.text.split(`
|
|
784
|
+
`).find(S=>S.trim()&&!S.startsWith("#")))==null?void 0:b.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(Ue,{name:"megaphone"}),o.jsx("strong",{children:x("notice.title")}),!m&&o.jsx("span",{className:"jv-notice-first",children:j}),o.jsx(Ue,{name:m?"chevron-down":"chevron-right"})]}),o.jsxs("span",{className:"jv-muted jv-notice-meta",children:[p.updatedBy.name," · ",na(p.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",x("notice.version",{version:p.version})]}),o.jsx(gt,{icon:"pencil",label:x("notice.edit"),onClick:()=>u(p.text)})]}),m&&o.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:o.jsx(Yc,{text:p.text})})]})}function ef({messages:e,members:a,bots:i,me:r,divider:s,before:u,activeQuestion:d,onSettled:f,onPreview:m,onReply:p,onOpenThread:y,onQuote:g,onReact:j,onFold:b,onJump:S,onError:k}){var A;const N=(A=e.find(C=>C.sequence>s&&C.senderId!==r))==null?void 0:A.id,T=VS();return o.jsx(o.Fragment,{children:e.map((C,M)=>{const O=e[M-1],_=a.find(L=>L.id===C.senderId),I=(O==null?void 0:O.createdAt)??u,V=!GS(C,O,I)&&C.id!==N,X=C.folded;return o.jsxs("div",{children:[Bg(C.createdAt,I)&&o.jsx(YS,{time:C.createdAt}),C.id===N&&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":C.id,"data-folded":V||void 0,"data-mention":C.mentions.includes(r)||void 0,"data-shut":X||void 0,children:[o.jsx("div",{className:"jv-row-gutter",children:V?o.jsx(j0,{time:C.createdAt,className:"jv-row-time"}):o.jsx(Cr,{member:_,bots:i,size:32})}),o.jsxs("div",{className:"jv-row-body",children:[!V&&o.jsxs("div",{className:"jv-row-head",children:[o.jsx("strong",{children:$i(_)}),(_==null?void 0:_.kind)==="bot"&&o.jsx("span",{className:"jv-role",children:"Bot"}),o.jsx(j0,{time:C.createdAt})]}),X?o.jsx($S,{message:C}):o.jsxs(o.Fragment,{children:[C.echoOf&&o.jsx("button",{type:"button",className:"jv-echo",onClick:()=>y==null?void 0:y(C.echoOf.id),children:x("channel.echo",{title:C.echoOf.title})}),C.replyTo&&o.jsx(HS,{message:C,members:a,onJump:L=>S==null?void 0:S(L)}),C.question?o.jsx(RS,{message:{...C,question:C.question},keyboard:C.id===d,onSettled:f}):o.jsxs("div",{className:"ui-bubble jv-flat",children:[C.content&&o.jsx(FS,{whole:T.has(C.id),children:o.jsx(DS,{message:C,members:a,me:r,onJump:S})}),C.attachments.length>0&&o.jsx(ES,{files:C.attachments,onOpen:L=>m(C.attachments,L)})]}),j&&o.jsx(qS,{message:C,me:r,members:a,onReact:j,onError:k??(()=>{})})]}),C.thread&&C.thread.replies>0&&o.jsxs("button",{type:"button",className:"jv-thread-link","data-done":C.thread.status==="done"||void 0,onClick:()=>y==null?void 0:y(C.thread.id),children:[x("channel.replies",{count:C.thread.replies}),C.thread.status==="done"&&` · ${x("channel.threadDone")}`,C.thread.lastReplyAt&&o.jsx("span",{className:"jv-muted",children:x("channel.lastReply",{time:iI(C.thread.lastReplyAt)})})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[p&&!C.echoOf&&o.jsx(gt,{icon:"chat-bubble",label:x("channel.replyInThread"),onClick:()=>p(C)}),j&&o.jsx(US,{message:C,me:r,onReply:g,onReact:j,onError:k??(()=>{})}),b&&o.jsx(gt,{icon:C.folded?"unfold":"fold",label:x(C.folded?"actions.unfold":"actions.fold"),onClick:()=>{C.folded&&T.add(C.id),b(C,!C.folded)}})]})]})]},C.id)})})}function XS({candidates:e,bots:a,busy:i,onCancel:r,onConfirm:s}){const[u,d]=w.useState(""),[f,m]=w.useState([]),p=e.filter(g=>g.name.toLowerCase().includes(u.trim().toLowerCase())),y=g=>m(j=>j.includes(g)?j.filter(b=>b!==g):[...j,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(),p.length===1&&y(p[0].id))}})}),o.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":x("dialogs.candidates"),children:[p.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(Ue,{name:"check"})})]},g.id)),p.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 sI({chat:e,members:a,bots:i,onClose:r,onChanged:s}){const{busy:u,error:d,run:f}=Tn();async function m(p){await f("add",async()=>{let y=e;for(const g of p)y=await he.addMember(e.id,g);s(y),r()},"dialogs.addFailed")}return o.jsxs(ms,{title:x("info.addMembers"),onClose:r,className:"jv-channel-dialog",children:[o.jsx(XS,{candidates:a.filter(p=>!e.memberIds.includes(p.id)),bots:i,busy:u,onCancel:r,onConfirm:p=>void m(p)}),d&&o.jsx("p",{className:"jv-form-error",role:"alert",children:d})]})}function cI({sections:e,members:a,bots:i,me:r,onClose:s,onSaved:u}){const d=w.useId(),[f,m]=w.useState(""),[p,y]=w.useState(""),[g,j]=w.useState(null),[b,S]=w.useState([r]),[k,N]=w.useState(!1),{busy:T,error:A,run:C}=Tn();async function M(_){_.preventDefault(),!(!f.trim()||T)&&await C("save",async()=>u(await he.createChannel({name:f.trim(),topic:p.trim(),sectionId:g,memberIds:b.filter(I=>I!==r)})),"common.saveFailed")}const O=a.filter(_=>b.includes(_.id));return k?o.jsx(ms,{title:x("info.addMembers"),onClose:s,className:"jv-channel-dialog",children:o.jsx(XS,{candidates:a.filter(_=>!b.includes(_.id)),bots:i,busy:!1,onCancel:()=>N(!1),onConfirm:_=>{S(I=>[...I,..._]),N(!1)}})}):o.jsx(ms,{title:x("sidebar.newChannel"),onClose:s,className:"jv-channel-dialog",children:o.jsxs("form",{onSubmit:_=>void M(_),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:_=>m(_.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:p,maxLength:200,placeholder:x("dialogs.optional"),onChange:_=>y(_.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-section`,children:x("info.section")}),o.jsx(jS,{id:`${d}-section`,value:g,sections:e,onChange:j})]}),o.jsxs("div",{className:"jv-members",children:[o.jsxs("div",{className:"jv-members-head",children:[o.jsxs("span",{children:[x("channel.members")," · ",O.length]}),o.jsxs("button",{type:"button",className:"ui-button",onClick:()=>N(!0),children:[o.jsx(Ue,{name:"person-add"}),x("info.addMembers")]})]}),O.map(_=>o.jsxs("div",{className:"jv-member-option",children:[o.jsx(Cr,{member:_,bots:i,size:24}),o.jsx("span",{className:"jv-member-name",children:_.name}),o.jsx("span",{className:"jv-muted",children:_.id===r?x("common.you"):_.kind==="bot"?"Bot":x("common.member")}),_.id!==r&&o.jsx(gt,{icon:"close",label:x("members.remove",{name:_.name}),className:"jv-member-remove",onClick:()=>S(I=>I.filter(V=>V!==_.id))})]},_.id))]}),A&&o.jsx("p",{className:"jv-form-error",role:"alert",children:A}),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 uI({section:e,onClose:a,onSaved:i,onDeleted:r}){const s=w.useId(),[u,d]=w.useState((e==null?void 0:e.name)??""),[f,m]=w.useState(!1),[p,y]=w.useState("");async function g(b){if(b.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{i(e?await he.updateSection(e.id,{name:u.trim()}):await he.createSection({name:u.trim()}))}catch(S){y(Wt(S,"common.saveFailed")),m(!1)}}}async function j(){if(!(!e||!confirm(x("dialogs.deleteSection",{name:e.name})))){m(!0);try{await he.deleteSection(e.id),r==null||r(e.id)}catch(b){y(Wt(b,"dialogs.deleteFailed")),m(!1)}}}return o.jsx(ms,{title:x(e?"dialogs.editSection":"sidebar.newSection"),onClose:a,children:o.jsxs("form",{onSubmit:b=>void g(b),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:b=>d(b.target.value)})]}),p&&o.jsx("p",{className:"jv-form-error",role:"alert",children:p}),o.jsxs("div",{className:"ui-dialog-actions",children:[e&&o.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void j(),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 dI({bot:e,chats:a,onClose:i,onConfirm:r}){const[s,u]=w.useState(!1),[d,f]=w.useState(!1);return o.jsx(ms,{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(Te,{type:"button",variant:"ghost",onClick:i,children:x("common.cancel")}),o.jsx(Te,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),r(s).finally(()=>f(!1))},children:x(d?"deleteBot.deleting":"common.delete")})]})]})})}function QS({title:e,body:a,confirm:i,onClose:r,onConfirm:s}){const[u,d]=w.useState(!1);return o.jsx(ms,{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(Te,{type:"button",variant:"ghost",onClick:r,children:x("common.cancel")}),o.jsx(Te,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),s().finally(()=>d(!1))},children:u?x("deleteBot.working"):i})]})]})})}function fI({target:e,x:a,y:i,onClose:r,onOpenBot:s,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:p}){const y=w.useRef(null);w.useEffect(()=>{const b=k=>{var N;(N=y.current)!=null&&N.contains(k.target)||r()},S=k=>{k.key==="Escape"&&r()};return document.addEventListener("pointerdown",b),document.addEventListener("keydown",S),()=>{document.removeEventListener("pointerdown",b),document.removeEventListener("keydown",S)}},[r]);const g=e.chat,j={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:j,children:[g&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(g,!g.pinned),r()},children:[o.jsx(Ue,{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(Ue,{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(Ue,{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(Ue,{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:()=>{p(e.bot),r()},children:[o.jsx(Ue,{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(Ue,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})}function hI({files:e,initialIndex:a=0,onClose:i}){const[r,s]=w.useState(a),[u,d]=w.useState("preview"),[f,m]=w.useState(!1),[p,y]=w.useState(""),[g,j]=w.useState(""),[b,S]=w.useState(""),[k,N]=w.useState(!0),[T,A]=w.useState(0),[C,M]=w.useState(!1),[O,_]=w.useState(!1),I=w.useRef(null),V=w.useRef(null),X=w.useRef(new Map),L=e[r],H=Kc(L),q=wS(H),Z=AB(H)&&L.size>TB,$=!q&&!Z&&H!=="download";w.useEffect(()=>{const ne=I.current,re=document.activeElement;return ne.showModal(),()=>{ne.close(),re!=null&&re.isConnected&&re.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const ne=new AbortController;return y(""),j(""),S(""),d("preview"),M(!1),_(!1),N($),$&&(Ec(H)?NS(L,ne.signal).then(j):CS(L,ne.signal).then(y)).then(()=>N(!1)).catch(re=>{ne.signal.aborted||(S(Wt(re,"files.readError")),N(!1))}),()=>ne.abort()},[L.id,T]),w.useEffect(()=>{V.current&&(V.current.scrollTop=X.current.get(`${r}:${u}`)??0)},[r,u,k]);const F=()=>{var ne;return X.current.set(`${r}:${u}`,((ne=V.current)==null?void 0:ne.scrollTop)??0)},K=ne=>{F(),s(Math.max(0,Math.min(e.length-1,ne)))},U=w.useMemo(()=>H==="html"&&p?RB(p):null,[H,p]),P=$&&["markdown","html"].includes(H)&&!k&&!b,ie=Ec(H)||q&&!O?"ui-image-view":H==="html"&&u==="preview"?"ui-html-view":H==="markdown"&&u==="preview"?"ui-document":"",z=o.jsxs("a",{className:"ui-button",href:di(L),download:L.name,children:[o.jsx(Ue,{name:"cloud-download"}),x("files.downloadFile")]});return ho.createPortal(o.jsxs("dialog",{ref:I,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:ne=>{ne.preventDefault(),i()},onKeyDown:ne=>{!["ArrowLeft","ArrowRight"].includes(ne.key)||["SELECT","INPUT","TEXTAREA"].includes(ne.target.tagName)||(ne.preventDefault(),K(r+(ne.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:L.name}),o.jsxs("small",{children:[x(SS[H])," · ",kS(L.size)]})]}),o.jsxs("div",{className:"ui-preview-actions",children:[P&&o.jsx("button",{type:"button",className:"ui-button",onClick:()=>{F(),d(u==="source"?"preview":"source")},children:x(u==="source"?"files.showPreview":H==="html"?"files.showSource":"files.showText")}),C&&o.jsx(gt,{icon:"window",label:x("files.openTab"),onClick:()=>window.open(Tb(L),"_blank","noopener,noreferrer")}),o.jsx("a",{className:"ui-iconbtn",href:di(L),download:L.name,"aria-label":x("files.download",{name:L.name}),title:x("files.download",{name:L.name}),children:o.jsx(Ue,{name:"cloud-download"})}),o.jsx(gt,{icon:f?"arrows-contract":"arrows-expand",label:x(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),o.jsx(gt,{icon:"close",label:x("files.closePreview"),"data-action":"ui-close",onClick:i})]})]}),U&&u==="preview"&&!k&&!b&&o.jsxs("div",{className:"jv-run-tip",role:"status",children:[o.jsx("p",{children:C?x("files.running"):x("files.scripts",{count:U.count,hosts:U.hosts.length?x("files.scriptHosts",{hosts:U.hosts.slice(0,3).join(x("common.listSeparator"))+(U.hosts.length>3?x("files.andMore"):"")}):""})}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(!C),children:x(C?"files.stop":"files.run")})]}),o.jsx("div",{className:`ui-preview-body ${ie}`,ref:V,tabIndex:-1,children:q?O?o.jsxs("div",{className:"ui-fallback",children:[o.jsx(Ue,{name:`file-${H}`}),o.jsx("strong",{children:x("files.cantPlay")}),o.jsx("p",{children:x("files.cantPlayHint")}),z]}):H==="video"?o.jsx("video",{className:"ui-preview-video",src:di(L),controls:!0,preload:"metadata",playsInline:!0,onError:()=>_(!0)},L.id):o.jsx("audio",{className:"ui-preview-audio",src:di(L),controls:!0,preload:"metadata",onError:()=>_(!0)},L.id):$?k?o.jsx("p",{className:"ui-unloaded",children:x("files.reading")}):b?o.jsxs("div",{className:"ui-error",role:"alert",children:[o.jsx("p",{children:b}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>A(ne=>ne+1),children:x("common.retry")})]}):Ec(H)?o.jsx("img",{className:"ui-preview-image",src:g,alt:L.name}):u==="source"||H==="text"?o.jsx("pre",{className:"ui-source",tabIndex:0,children:p}):H==="html"?C?o.jsx("iframe",{title:x("files.runningTitle",{name:L.name}),sandbox:"allow-scripts",src:Tb(L),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):o.jsx("iframe",{title:L.name,sandbox:"",srcDoc:OB(p),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):o.jsx("article",{className:"ui-prose",children:o.jsx(Yc,{text:p})}):o.jsxs("div",{className:"ui-fallback",children:[o.jsx(Ue,{name:"file"}),o.jsx("strong",{children:x("files.downloadToView")}),o.jsx("p",{children:x(Z?"files.tooLarge":"files.unsupported")}),z]})}),e.length>1&&o.jsxs("footer",{className:"ui-preview-nav",children:[o.jsx(gt,{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:ne=>K(Number(ne.target.value)),children:e.map((ne,re)=>o.jsx("option",{value:re,children:ne.name},ne.id))}),o.jsxs("span",{children:[r+1," / ",e.length]}),o.jsx(gt,{icon:"chevron-right",label:x("files.next"),disabled:r===e.length-1,onClick:()=>K(r+1)})]})]}),document.body)}function mI({dialog:e,entryMenu:a,confirm:i,preview:r,infoBot:s,bots:u,statuses:d,chats:f,sections:m,members:p,connections:y,meId:g,onDialog:j,onEntryMenu:b,onConfirm:S,onPreview:k,onInfoBot:N,onSettings:T,onChannelInfo:A,onOpenChatId:C,chatSaved:M,openChat:O,onSectionSaved:_,onSectionDeleted:I,updateBot:V,openAnywhere:X,removeChannel:L,deleteBot:H,pinChat:q,muteChat:Z}){return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&o.jsx(cI,{sections:m,members:hi(p),bots:u,me:g,onClose:()=>j(null),onSaved:$=>{M($),j(null),O($)}}),(e==null?void 0:e.kind)==="members"&&o.jsx(sI,{chat:f.find($=>$.id===e.chat.id)??e.chat,members:hi(p),bots:u,onClose:()=>j(null),onChanged:M}),(e==null?void 0:e.kind)==="section"&&o.jsx(uI,{section:e.section,onClose:()=>j(null),onSaved:_,onDeleted:I}),a&&o.jsx(fI,{target:a.target,x:a.at.x,y:a.at.y,onClose:()=>b(null),onOpenBot:$=>N($.id),onSettings:$=>{$.type==="channel"&&A($)},onPin:($,F)=>void q($,F),onMute:($,F)=>void Z($,F),onDeleteChat:$=>S({kind:"chat",chat:$}),onDeleteBot:$=>S({kind:"bot",bot:$})}),(i==null?void 0:i.kind)==="chat"&&o.jsx(QS,{title:x("app.deleteChannelTitle",{name:i.chat.title}),confirm:x("common.delete"),onClose:()=>S(null),body:x("app.deleteChannelBody"),onConfirm:async()=>{await L(i.chat),S(null)}}),(i==null?void 0:i.kind)==="bot"&&o.jsx(dI,{bot:i.bot,chats:f.filter($=>$.type==="dm"&&$.botId===i.bot.id).length,onClose:()=>S(null),onConfirm:async $=>{await H(i.bot,$),S(null)}}),s&&o.jsx(EB,{bot:s,status:d[s.id],connections:y,chats:f,onSaved:V,onOpenChat:$=>{N(null),C($)},onOpenSubscription:X,onManageModels:()=>{N(null),T("models")},onAddMachine:()=>{N(null),T("addMachine")},onClose:()=>N(null)},s.id),r&&o.jsx(hI,{files:r.files,initialIndex:r.index,onClose:()=>k(null)})]})}function ZS(e,a,i){const[r,s]=w.useState(null),[u,d]=w.useState(!1);return w.useEffect(()=>{const f=e.trim();if(!f){s(null),d(!1);return}let m=!0;d(!0);const p=setTimeout(()=>void he.search(f,a).then(y=>{m&&s(y)}).catch(y=>{m&&i(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(p)}},[e,a]),{result:r,loading:u}}function JS(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}`:$i(i.find(s=>s.id===e.botId))}function WS({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 pI=e=>new Date(e).toDateString()===new Date().toDateString()?ro(e):T0(e);function ek({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:$i(r.find(f=>f.id===e.senderId))}),u&&o.jsx("span",{className:"jv-hit-place",children:JS(a,i,r)}),o.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:pI(e.createdAt)})]}),o.jsx("span",{className:"jv-hit-text",children:o.jsx(WS,{text:Lg(e),query:s})})]})}const Db=5;function Hd({label:e,items:a,empty:i}){const[r,s]=w.useState(!1);return!a.length&&!i?null:o.jsxs("section",{className:"jv-result-group","aria-label":e,children:[o.jsxs("h3",{className:"jv-result-head",children:[e,o.jsx("span",{children:a.length})]}),a.length?r?a:a.slice(0,Db):o.jsx("p",{className:"jv-result-empty",children:i}),!r&&a.length>Db&&o.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>s(!0),children:[x("search.showAll",{count:a.length}),o.jsx(Ue,{name:"chevron-down"})]})]})}function gI({query:e,shown:a,chats:i,members:r,onOpenChat:s,onOpenMessage:u,onError:d}){const{result:f,loading:m}=ZS(e,void 0,d),p=((f==null?void 0:f.chats)??[]).filter(g=>!a.has(g.id)),y=g=>{var j,b;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:JS(g,i,r).split(" › ")[0]})]}),(((j=g.note)==null?void 0:j.text)||g.topic)&&o.jsx("span",{className:"jv-hit-text",children:o.jsx(WS,{text:((b=g.note)==null?void 0:b.text)||g.topic,query:e})})]},g.id)};return o.jsxs("div",{className:"jv-results","aria-live":"polite",children:[o.jsx(Hd,{label:x("search.threads"),items:p.filter(g=>g.type==="thread").map(y)}),o.jsx(Hd,{label:x("search.channels"),items:p.filter(g=>g.type==="channel").map(y)}),f?o.jsx(Hd,{label:x("search.messages"),empty:x("search.noMessages"),items:f.messages.map(({message:g,chat:j})=>o.jsx(ek,{message:g,chat:j,chats:i,members:r,query:e,onOpen:u},g.id))}):m&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")})]})}function vI({className:e,...a}){return o.jsx("div",{"data-slot":"input-group",role:"group",className:gn("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 yI=B0("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 xI({className:e,align:a="inline-start",...i}){return o.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:gn(yI({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 bI({className:e,...a}){return o.jsx(xt,{"data-slot":"input-group-control",className:gn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...a})}function jI({className:e,children:a,...i}){return o.jsxs(xA,{"data-slot":"scroll-area",className:gn("relative",e),...i,children:[o.jsx(bA,{"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(wI,{}),o.jsx(jA,{})]})}function wI({className:e,orientation:a="vertical",...i}){return o.jsx(sA,{"data-slot":"scroll-area-scrollbar",orientation:a,className:gn("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(mA,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const tk="jarvy-collapsed-sections",SI=()=>{try{return JSON.parse(localStorage.getItem(tk)??"[]")}catch{return[]}};function Lb({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 nk(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 kI(e){var a;return e.type==="channel"&&nk(e)&&((a=e.hint)==null?void 0:a.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function Bb({chat:e,channel:a}){const i=nk(e),r=e.lastMessage&&Cs(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 Ib=e=>{const a=e.getBoundingClientRect();return{x:a.right-168,y:a.bottom+4}};function CI({chats:e,sections:a,bots:i,members:r,onOpenMessage:s,onOpenFound:u,onError:d,working:f,asking:m,selected:p,filter:y,followed:g,followedOpen:j,onFilterChange:b,onSelect:S,onOpenBot:k,onOpenFollowed:N,onMenu:T,onEditSection:A}){const[C,M]=w.useState(SI),O=U=>M(P=>{const ie=P.includes(U)?P.filter(z=>z!==U):[...P,U];return localStorage.setItem(tk,JSON.stringify(ie)),ie}),_=y.toLocaleLowerCase(),I=e.filter(U=>{var P;return U.type!=="thread"&&`${U.title} ${U.topic} ${((P=i.find(ie=>ie.id===U.botId))==null?void 0:P.name)??""}`.toLocaleLowerCase().includes(_)}),V=(g==null?void 0:g.unread)??0,X=(g==null?void 0:g.mentions)??0,L=I.filter(U=>U.type==="channel").sort((U,P)=>Number(P.pinned)-Number(U.pinned)||U.title.localeCompare(P.title,"zh-CN")),H=i.map(U=>({bot:U,chat:e.find(P=>P.type==="dm"&&P.botId===U.id)})).filter(({bot:U})=>U.name.toLocaleLowerCase().includes(_)).sort((U,P)=>{var ie,z,ne,re;return Number(P.bot.agent)-Number(U.bot.agent)||+!!((ie=P.chat)!=null&&ie.pinned)-+!!((z=U.chat)!=null&&z.pinned)||(((ne=P.chat)==null?void 0:ne.updatedAt)??0)-(((re=U.chat)==null?void 0:re.updatedAt)??0)}),q=U=>o.jsxs("div",{className:"jv-side-wrap",onContextMenu:P=>{P.preventDefault(),T({kind:"channel",chat:U},{x:P.clientX,y:P.clientY})},children:[o.jsxs("button",{type:"button",className:"jv-side-row","data-active":p===U.id||void 0,"data-unread":U.unread>0||void 0,"aria-current":p===U.id?"page":void 0,onClick:()=>S(U),children:[U.pinned?o.jsx(Up,{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:U.title,children:U.title}),U.muted&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(Ue,{name:"bell-slash"})})]}),o.jsxs("span",{className:"jv-side-line",children:[o.jsx(Bb,{chat:U,channel:!0}),o.jsx(Lb,{chat:U})]})]})]}),o.jsx("button",{type:"button",className:"jv-side-more","aria-label":x("sidebar.more",{name:U.title}),onClick:P=>T({kind:"channel",chat:U},Ib(P.currentTarget)),children:o.jsx(Qy,{"aria-hidden":"true"})})]},U.id),Z=({bot:U,chat:P})=>{const ie=m.has(U.id)?"asking":f.has(U.id)?"working":void 0,z=!!P&&p===P.id;return o.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:ne=>{ne.preventDefault(),T({kind:"dm",bot:U,chat:P},{x:ne.clientX,y:ne.clientY})},children:[o.jsxs(Te,{type:"button",variant:"ghost","data-active":z,"aria-current":z?"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?S(P):k(U),children:[o.jsx(fo,{color:U.color,mood:U.mood,size:36,badge:ie,crown:U.agent}),ie&&o.jsx("span",{className:"sr-only",children:x(ie==="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:U.name,children:U.name}),(P==null?void 0:P.muted)&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(Ue,{name:"bell-slash"})}),(P==null?void 0:P.pinned)&&o.jsx(Up,{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:ro(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(Bb,{chat:P,channel:!1}):""}),P&&o.jsx(Lb,{chat:P})]})]})]}),o.jsx(Te,{type:"button",variant:"ghost",size:"icon-xs","aria-label":x("sidebar.more",{name:U.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:ne=>T({kind:"dm",bot:U,chat:P},Ib(ne.currentTarget)),children:o.jsx(Qy,{"aria-hidden":"true"})})]},U.id)},$=(U,P,ie,z,ne)=>o.jsxs("div",{className:"jv-side-section-head",children:[o.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!ie,onClick:()=>O(U),children:[o.jsx("span",{className:"jv-side-chevron",children:o.jsx(Ue,{name:ie?"chevron-right":"chevron-down"})}),o.jsxs("span",{className:"jv-side-section-name",children:[P,ie&&z&&o.jsx("span",{className:"jv-dot","aria-label":x("sidebar.hasUnread")})]})]}),ne&&o.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":x("sidebar.editSection",{name:P}),onClick:()=>A(ne),children:o.jsx(Ue,{name:"pencil"})})]}),F=U=>!_&&C.includes(U),K=(U,P,ie,z)=>o.jsxs("div",{className:"jv-side-section",children:[$(U,P,F(U),ie.some(ne=>ne.unread>0),z),!F(U)&&ie.map(q)]},U);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:o.jsxs(vI,{className:"h-9 bg-background",children:[o.jsx(bI,{id:"jarvy-search",type:"search",value:y,onChange:U=>b(U.target.value),placeholder:x("sidebar.search"),"aria-label":x("sidebar.search"),onKeyDown:U=>{U.key==="Escape"&&y&&(U.preventDefault(),b(""))},className:"text-sm"}),o.jsx(xI,{align:"inline-start",children:o.jsx(gs,{"aria-hidden":"true"})})]})}),o.jsx(jI,{className:"min-h-0 flex-1",type:"auto",children:_?o.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":x("sidebar.results"),children:[o.jsx(Hd,{label:x("sidebar.chats"),items:[...L.map(q),...H.map(Z)]}),o.jsx(gI,{query:y,shown:new Set(L.map(U=>U.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!=null&&g.total)&&o.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":j||void 0,"data-unread":V>0||void 0,"aria-current":j?"page":void 0,onClick:N,children:[o.jsx(Ue,{name:"chat-bubble"}),o.jsx("span",{className:"jv-side-label",children:x("sidebar.followed")}),X>0?o.jsx("span",{className:"jv-badge",children:X}):V>0&&o.jsx("span",{className:"jv-count",children:V})]}),a.map(U=>K(`s:${U.id}`,U.name,L.filter(P=>P.sectionId===U.id),U)),L.some(U=>!U.sectionId||!a.some(P=>P.id===U.sectionId))&&K("channels",x("sidebar.channels"),L.filter(U=>!U.sectionId||!a.some(P=>P.id===U.sectionId))),o.jsxs("div",{className:"jv-side-section",children:[$("dms",x("sidebar.dms"),F("dms"),H.some(({chat:U})=>!!(U!=null&&U.unread))),!F("dms")&&o.jsx("div",{className:"space-y-1",children:H.map(Z)}),!F("dms")&&H.length===0&&o.jsx("p",{className:"jv-side-empty",children:x("sidebar.noDms")})]})]})})]})}function NI({username:e,chats:a,sections:i,bots:r,members:s,followed:u,followedOpen:d,working:f,asking:m,selected:p,filter:y,creating:g,createMenu:j,accountMenu:b,onFilterChange:S,onOpenFollowed:k,onOpenChat:N,onOpenBot:T,onOpenMenu:A,onEditSection:C,onCreate:M,onFind:O,onOpenFound:_,onError:I,onToggleCreate:V,onToggleAccount:X,onSettings:L,onToggleTheme:H,onLogOut:q}){const Z=w.useRef(null),$=w.useRef(null);return w.useEffect(()=>{if(!b&&!j)return;const F=K=>{var U,P;b&&!((U=$.current)!=null&&U.contains(K.target))&&X(!1),j&&!((P=Z.current)!=null&&P.contains(K.target))&&V(!1)};return document.addEventListener("pointerdown",F),()=>document.removeEventListener("pointerdown",F)},[b,j]),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:Z,children:[o.jsx(gt,{icon:"add",label:x("sidebar.create"),"aria-expanded":j,"aria-haspopup":"menu",disabled:g,onClick:()=>V(!j)}),j&&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:()=>M("channel"),children:[o.jsx(Ue,{name:"list-bullets"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newChannel")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>M("section"),children:[o.jsx(Ue,{name:"folder"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newSection")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>M("bot"),children:[o.jsx(Ue,{name:"person-add"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newBot")})]})]})]})}),o.jsx(CI,{chats:a,sections:i,bots:r,members:s,onOpenMessage:O,onOpenFound:_,onError:I,working:f,asking:m,selected:p,filter:y,onFilterChange:S,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:N,onOpenBot:T,onMenu:A,onEditSection:C}),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":b,onClick:()=>X(!b),children:[o.jsx("span",{className:"ui-user-avatar",children:e.slice(0,2).toUpperCase()}),o.jsx("span",{children:e}),o.jsx(Ue,{name:"chevron-down"})]})})]}),b&&o.jsxs("div",{ref:$,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:L,children:[o.jsx(Ue,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("settings.title")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:H,children:[o.jsx(Ue,{name:"moon"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.toggleTheme")})]}),o.jsx("hr",{className:"ui-menu-divider"}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:q,children:[o.jsx(Ue,{name:"arrow-bracket-to-left"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.signOut")})]})]})]})}function EI({textarea:e,value:a,setValue:i,inside:r,outside:s,bots:u,onInvite:d,participants:f}){const[m,p]=w.useState(null),[y,g]=w.useState(0),[j,b]=w.useState(null),S=w.useRef(null),k=w.useRef(null),N=w.useRef(null);w.useLayoutEffect(()=>{N.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(N.current,N.current),N.current=null)},[a,e]);const T=(z,ne)=>z.name.toLowerCase().includes(ne.toLowerCase()),A=m===null?[]:r.filter(z=>T(z,m)),C=f?A.filter(z=>f.has(z.id)):A,M=f?A.filter(z=>!f.has(z.id)):[],O=C.length>0&&M.length>0,_=[...C,...M],I=m===null?[]:s.filter(z=>T(z,m)),V=j?s.filter(z=>T(z,j.search)):[],X=_.length+(I.length?1:0),L=()=>{p(null),b(null)};function H(z=a){const ne=e.current,re=ne?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(z.slice(0,ne.selectionStart)):null;p(re?re[1]:null),g(0),b(null)}function q(z){const ne=e.current;if(!ne)return;r.some(B=>B.id===z.id)||d(z);const re=a.slice(0,ne.selectionStart).replace(/@([^\s@]*)$/u,`@${z.name} `),R=re+a.slice(ne.selectionStart);N.current=re.length,i(R),L()}function Z(z){j||b({search:m??"",active:0}),z&&requestAnimationFrame(()=>{var ne;return(ne=k.current)==null?void 0:ne.focus()})}function $(){var z;b(null),(z=e.current)==null||z.focus()}function F(z){if(!X||z.nativeEvent.isComposing)return!1;const ne=y===_.length;return z.key==="ArrowDown"||z.key==="ArrowUp"?(z.preventDefault(),g((y+(z.key==="ArrowDown"?1:-1)+X)%X),b(null),!0):(z.key==="Enter"||z.key==="Tab")&&!ne?(z.preventDefault(),q(_[y]),!0):(z.key==="Enter"||z.key==="Tab"||z.key==="ArrowRight")&&ne?(z.preventDefault(),Z(!0),!0):z.key==="Escape"?(z.preventDefault(),L(),!0):!1}function K(z){!j||z.nativeEvent.isComposing||((z.key==="ArrowDown"||z.key==="ArrowUp")&&V.length?(z.preventDefault(),b({...j,active:(j.active+(z.key==="ArrowDown"?1:-1)+V.length)%V.length})):z.key==="Enter"?(z.preventDefault(),V[j.active]&&q(V[j.active])):(z.key==="Escape"||z.key==="ArrowLeft"&&!j.search)&&(z.preventDefault(),$()))}const U=z=>{var re;const ne=z.relatedTarget;(!ne||!((re=S.current)!=null&&re.contains(ne))&&ne!==e.current)&&L()},P=(z,ne)=>o.jsxs("button",{type:"button",role:"option","aria-selected":ne,className:"ui-menu-item","data-active":ne||void 0,onMouseDown:re=>{re.preventDefault(),q(z)},children:[o.jsx(Cr,{member:z,bots:u,size:20}),o.jsx("span",{className:"ui-menu-copy",children:z.name}),o.jsx("span",{className:"jv-muted",children:z.kind==="bot"?"Bot":x("common.member")})]},z.id);return{menu:X>0?o.jsxs("div",{ref:S,className:"jv-mention-box","data-side":j?"":void 0,onBlur:U,children:[o.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":x("mention.menu"),children:[O&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inThread")}),C.map((z,ne)=>P(z,ne===y)),O&&o.jsx("div",{className:"jv-mention-sep",role:"separator"}),O&&o.jsx("p",{className:"jv-mention-group","aria-hidden":"true",children:x("mention.inChannel")}),M.map((z,ne)=>P(z,C.length+ne===y)),I.length>0&&o.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!j,"data-active":y===_.length||void 0,onMouseEnter:()=>{g(_.length),Z(!1)},onMouseDown:z=>{z.preventDefault(),g(_.length),Z(!0)},children:[o.jsx("span",{className:"ui-menu-copy",children:x("mention.outside")}),o.jsx("span",{className:"jv-muted",children:I.length}),o.jsx(Ue,{name:"chevron-right"})]})]}),j&&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:z=>{z.preventDefault(),$()},children:o.jsx(Ue,{name:"chevron-left"})}),o.jsx("input",{ref:k,type:"search",value:j.search,placeholder:x("common.searchMembers"),"aria-label":x("mention.searchOutside"),onChange:z=>b({search:z.target.value,active:0}),onKeyDown:K})]}),o.jsx("div",{className:"jv-mention-side-list",children:V.length?V.map((z,ne)=>P(z,ne===j.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:H,onKeyDown:F,close:L,leaves:U}}const Pb={text:null,files:[],quote:null,passages:[],key:null,signature:null,outgoing:null,sending:!1};function ak(e,a){var s;const i=((s=a.text)==null?void 0:s.trim())??"",r=e.text??"";return{text:r.trim()?i?`${i}
|
|
785
|
+
|
|
786
|
+
${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 TI{constructor(a){Jt(this,"drafts",new Map);Jt(this,"listeners",new Set);Jt(this,"timer",null);Jt(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={...Pb,...s,sending:!1};this.drafts.set(r,u.outgoing?{...u,...ak(u,u.outgoing)}:u)}}catch{localStorage.removeItem(a)}}get(a){return this.drafts.get(a)??Pb}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 AI=e=>`jarvy-drafts:${e}`;function ik(e,a,i){e.update(a.chatId,{quote:{id:a.id,name:$i(i.find(r=>r.id===a.senderId)),text:Lg(a).replace(/\s+/g," ").slice(0,160)}})}function MI(e,a){return w.useSyncExternalStore(e.subscribe,()=>e.get(a))}const Hb=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function rk({chatId:e,id:a,drafts:i,placeholder:r,disabled:s=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:p,onError:y,onNotice:g}){const j=MI(i,e),b=j.sending,[S,k]=w.useState([]),[N,T]=w.useState(!1),A=S.filter(P=>P.chatId===e),C=A.length>0,M=w.useRef(new Map),O=w.useRef(null),_=j.text??d??"",I=j.files,V=j.quote,X=P=>i.update(e,{text:P}),L=EI({textarea:O,value:_,setValue:X,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 H(P){var R;const ie=e;if(!P.length)return;if(C){g(x("composer.busy"));return}if(I.length+P.length>5){g(x("composer.tooMany",{count:5}));return}if(P.some(B=>B.size===0||B.size>Xy)){g(x("composer.size",{limit:`${Xy/1024**3} GB`}));return}const z=P.map(B=>({key:Hb(),chatId:ie,name:B.name,done:0})),ne=z.map(B=>B.key),re=(B,W)=>k(fe=>fe.map(me=>me.key===B?{...me,done:W}:me));k(B=>[...B,...z]);for(const B of ne)M.current.set(B,new AbortController);try{for(const[B,W]of P.entries()){const fe=ne[B];try{const me=await he.uploadAttachment(ie,W,pe=>re(fe,pe),(R=M.current.get(fe))==null?void 0:R.signal);i.update(ie,pe=>({files:[...pe.files,me]}))}catch(me){if(!(me instanceof DOMException&&me.name==="AbortError"))throw me}finally{k(me=>me.filter(pe=>pe.key!==fe))}}}catch(B){y(B)}finally{k(B=>B.filter(W=>!ne.includes(W.key)));for(const B of ne)M.current.delete(B)}}async function q(P){const ie=e;try{await he.removeAttachment(P),i.update(ie,z=>({files:z.files.filter(ne=>ne.id!==P)}))}catch(z){y(z)}}function Z(P){const ie=[...P.clipboardData.files];if(!ie.length)return;P.preventDefault();const z=new Date().toISOString().replace(/\D/g,"").slice(0,14);H(ie.map((ne,re)=>ne.type.startsWith("image/")&&/^image\.\w+$/.test(ne.name)?new File([ne],`${x("composer.pasted")}-${z}${ie.length>1?`-${re+1}`:""}.${ne.name.split(".").pop()}`,{type:ne.type}):ne))}const $=P=>P.dataTransfer.types.includes("Files");function F(P){!$(P)||s||(P.preventDefault(),P.dataTransfer.dropEffect="copy",T(!0))}function K(P){$(P)&&(P.preventDefault(),T(!1),s||H([...P.dataTransfer.files]))}async function U(P){P==null||P.preventDefault();const ie=e,z=i.get(ie),ne=(z.text??d??"").trim(),re=z.files,R=z.quote,B=z.passages,fe=[B.map((Ae,xe)=>`[[q${xe+1}]]`).join(`
|
|
787
|
+
`),ne].filter(Boolean).join(`
|
|
788
|
+
|
|
789
|
+
`);if(!fe&&!re.length||z.sending||C||s)return;const me=JSON.stringify([fe,re.map(Ae=>Ae.id),(R==null?void 0:R.id)??null,B]),pe=z.signature===me&&z.key?z.key:Hb(),Ce={text:ne,files:re,quote:R,passages:B};i.update(ie,{text:"",files:[],quote:null,passages:[],key:pe,signature:me,outgoing:Ce,sending:!0});try{await p(fe,re.map(Ae=>Ae.id),pe,R==null?void 0:R.id,B.map(({messageId:Ae,text:xe})=>({messageId:Ae,text:xe}))),i.update(ie,{key:null,signature:null,outgoing:null})}catch(Ae){i.update(ie,xe=>ak(xe,Ce)),y(Ae)}finally{i.update(ie,{sending:!1})}}return w.useLayoutEffect(()=>{const P=()=>{const ie=O.current,z=m==null?void 0:m.current;if(!ie)return;const ne=z==null?void 0:z.scrollTop;ie.style.height="auto",ie.style.height=`${ie.scrollHeight}px`,z&&ne!==void 0&&z.scrollTop!==ne&&z.scrollTo({top:ne,behavior:"instant"})};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[_,e,m]),o.jsxs("form",{ref:f,className:`ui-compose-wrap${N?" jarvy-dropping":""}`,onSubmit:P=>void U(P),onDragEnter:F,onDragOver:F,onDragLeave:P=>{P.currentTarget.contains(P.relatedTarget)||T(!1)},onDrop:K,children:[I.length+A.length>0&&o.jsxs("div",{className:"jarvy-pending-files",children:[I.map(P=>o.jsxs("span",{className:"jarvy-file-chip",children:[o.jsx(Ue,{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 q(P.id),children:"×"})]},P.id)),A.map(P=>o.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[o.jsx(Ue,{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 ie;return(ie=M.current.get(P.key))==null?void 0:ie.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))]}),V&&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:V.name}),o.jsx("span",{className:"jv-reply-text",children:V.text||x("common.attachment")}),o.jsx("button",{type:"button","aria-label":x("composer.cancelReply"),onClick:()=>i.update(e,{quote:null}),children:"×"})]}),o.jsx(UB,{quotes:j.passages,onRemove:P=>i.update(e,ie=>({passages:ie.passages.filter((z,ne)=>ne!==P)}))}),o.jsxs("div",{className:"ui-composer jv-composer",children:[u&&L.menu,N&&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(Ue,{name:"add"}),o.jsx("input",{type:"file",multiple:!0,"aria-label":x("composer.attach"),disabled:b||C||s||I.length>=5,onChange:P=>{const ie=[...P.target.files??[]];P.target.value="",H(ie)}})]}),o.jsx("textarea",{ref:O,id:a,rows:1,maxLength:32e3,value:_,onPaste:Z,placeholder:r,disabled:s,"aria-label":x("composer.input"),onChange:P=>{X(P.target.value),u&&L.track(P.target.value)},onKeyDown:P=>{u&&L.onKeyDown(P)||P.key==="Enter"&&!P.shiftKey&&!P.nativeEvent.isComposing&&(P.preventDefault(),U())},onClick:()=>{u&&L.track()},onBlur:u?L.leaves:void 0}),o.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":x("composer.send"),disabled:b||C||s||!_.trim()&&!I.length&&!j.passages.length,children:o.jsx(Ue,{name:"arrow-up"})})]})]})}function _I({messages:e,members:a,me:i,activeQuestion:r,onSettled:s,onPreview:u,onQuote:d,onReact:f,onFold:m,onJump:p,onError:y,bot:g}){const j=VS();return o.jsx(o.Fragment,{children:e.map((b,S)=>{const k=e[S-1],N=e[S+1],T=b.role==="assistant"&&!!(N!=null&&N.question)&&N.senderId===b.senderId,A=b.folded;return o.jsxs(w.Fragment,{children:[Bg(b.createdAt,k==null?void 0:k.createdAt)&&o.jsx(YS,{time:b.createdAt}),o.jsxs("div",{className:`ui-message-row ${b.role==="user"?"ui-user":""}`,"data-message":b.id,"data-asks":T||void 0,"data-shut":A||void 0,tabIndex:-1,children:[b.role==="assistant"&&o.jsx("span",{className:"jarvy-bubble-avatar",children:o.jsx(fo,{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:[GS(b,k)&&o.jsx(j0,{time:b.createdAt,className:"jv-dm-time"}),A?o.jsx("div",{className:"ui-bubble jv-folded-bubble",children:o.jsx($S,{message:b})}):o.jsxs(o.Fragment,{children:[b.replyTo&&o.jsx(HS,{message:b,members:a,onJump:p}),b.question?o.jsx(RS,{message:{...b,question:b.question},keyboard:b.id===r,onSettled:s}):o.jsxs("div",{className:"ui-bubble",children:[b.content&&o.jsx(FS,{whole:j.has(b.id),children:o.jsx(DS,{message:b,members:a,me:i,onJump:p})}),b.attachments.length>0&&o.jsx(ES,{files:b.attachments,onOpen:C=>u(b.attachments,C)})]}),o.jsx(qS,{message:b,me:i,members:a,onReact:f,onError:y})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[o.jsx(US,{message:b,me:i,onReply:d,onReact:f,onError:y}),o.jsx(gt,{icon:b.folded?"unfold":"fold",label:x(b.folded?"actions.unfold":"actions.fold"),onClick:()=>{b.folded&&j.add(b.id),m(b,!b.folded)}})]})]})]},b.id)})})}const RI={sleep:"zz",busy:"sweat",ask:"ask",stretch:"sparkle"},OI={sleep:{kind:4,earL:.36,earR:.36,look:[0,-.02]},think:{lid:.16,earL:.16,earR:.46},work:{open:.55,earL:.14,earR:.14},busy:{kind:1,mouth:5,earL:.5,earR:.5},read:{lid:.34},turn:{mouth:2,mouthOpen:.8,earL:.1,earR:.1},ask:{eyeScale:1.08,earL:.12,earR:.38},yawn:{kind:4,mouth:5,earL:.42,earR:.42},stretch:{kind:2,mouth:2,mouthOpen:.8,blush:.8,earL:.06,earR:.06},groom:{kind:4}},qb={rest:.2,turn:.02,ask:.08,read:.12},Ub=Math.PI*2,Sc=(e,a,i)=>e+(a-e)*i;class zI{constructor(){Jt(this,"x",0);Jt(this,"v",0);Jt(this,"last",0)}kick(a){this.v+=a}step(a){const i=this.last?Math.min(.05,Math.max(0,(a-this.last)/1e3)):0;this.last=a;const r=9.5;return this.v+=(-180*this.x-r*this.v)*i,this.x+=this.v*i,this.x}}class DI{constructor(){Jt(this,"squash",new zI);Jt(this,"start",0);Jt(this,"motion",null);Jt(this,"motionAt",0);Jt(this,"blinkAt",1400);Jt(this,"blinkStart",-1e9);Jt(this,"lookX",0);Jt(this,"lookY",0);Jt(this,"yaw",0);Jt(this,"lift",0);Jt(this,"tilt",0)}frame(a,i){const r=i.motion,s=!!i.reduced,u=r==="sleep",d=i.faceX??0,f=(r==="turn"||r==="ask"||r==="read"?qb[r]:qb.rest)*d;this.start||(this.start=a,this.yaw=f),r!==this.motion&&(this.motion&&!s&&this.squash.kick(u?-.4:.6),this.motion=r,this.motionAt=a);const m=(a-this.start)/1e3,p=(a-this.motionAt)/1e3,y={...pS(i.mood),...OI[r]},g=(M,O)=>s?0:Math.sin(m*M)*O,j=!u&&i.mood==="dizzy",b=r==="idle"?1:u?.25:.45;this.lookX=Sc(this.lookX,(j?0:i.lookX*b)*.055,.18),this.lookY=Sc(this.lookY,(j?0:i.lookY*b)*.045,.15),this.yaw=Sc(this.yaw,f,.07);let S=(u?1.05:1)+(s?0:Math.sin(Ub*m/(u?4.4:3.4))*(u?.014:.008)),k=0,N=y.tilt,T=y.look;if(r==="think")T=[g(.9,.045)+.03,.04],N+=.06+g(1.3,.03);else if(r==="work"||r==="busy"){const M=r==="busy"||i.fast,O=s?0:Math.abs(Math.sin(Ub*m*(M?1.9:1.5)));S+=.032*(1-O),k=.013*O,T=M?[g(6.5,.012)+g(2.3,.005),-.03]:[g(1.9,.02),-.03],r==="busy"&&(N+=g(1.6,.02))}else if(r==="read")T=[s?0:p*.55%1*.09-.045,-.045],N+=g(.7,.02);else if(r==="ask")T=[0,.03],N+=.14+g(1.1,.03);else if(r==="yawn"){const M=s?0:Math.sin(Math.PI*Math.min(1,p%3.2/1.8));S+=.05*M,k=.02*M}else if(r==="stretch"){const M=s?0:Math.sin(Math.PI*Math.min(1,p%3.6/1.8));S-=.04*M,k=.03*M}else r==="groom"&&(N-=.1,T=[.04,-.03]);this.lift=Sc(this.lift,k,.2),this.tilt=Sc(this.tilt,N,.2),y.kind===0&&y.open>.5&&a-this.start>this.blinkAt&&a-this.blinkStart>400&&(this.blinkStart=a,this.blinkAt=a-this.start+2200+Math.random()*3200);const A=(a-this.blinkStart)/160,C=A>=0&&A<=1?1-.94*Math.sin(Math.PI*A):1;return{...y,open:y.open*C,squash:S*y.squash+this.squash.step(a),lift:this.lift,tilt:this.tilt,yaw:this.yaw,look:[this.lookX+T[0],this.lookY+T[1]]}}shake(){this.squash.kick(-2.2)}}function LI(e,a,i,r,s,u=0){const p=a.offsetWidth,y=a.offsetLeft,g=a.offsetTop,j=Math.max(300,Math.round(i*.4));e.style.maxHeight="";const b=e.hasAttribute("data-fit"),S=e.offsetHeight,k=U=>U==="left"||U==="right",N=U=>U==="left"?y-10-8:U==="right"?i-y-p-10-8:U==="below"?r-g-p-10-8:g-10-8,T=y+p/2>i/2,A=U=>b?k(U)?Math.min(j,Math.max(160,N(U))):Math.min(j,T?y+p-8:i-y-8):e.offsetWidth,C=U=>k(U)?A(U)<=N(U):Math.min(120,S)<=N(U),M=u>.05?"right":u<-.05?"left":null,_=(M==="left"||M===null&&N("left")>=N("right")?["left","right"]:["right","left"]).find(C)??(N("below")>=N("above")?"below":"above"),I=e.dataset.side,X=I!==void 0&&I!==_&&k(I)===k(_)&&C(I)&&N(I)+40>=N(_)?I:_,L=b&&(X==="left"||!k(X)&&T),H=X==="left"?y-10:X==="right"?y+p+10:T?y+p:y;e.style.width="",e.style.maxWidth=b?`${A(X)}px`:"",L?(e.style.left="",e.style.right=`${i-H}px`):(e.style.right="",b&&(e.style.left=`${H}px`));const q=e.offsetWidth,Z=b?L?H-q:H:X==="left"?y-10-q:X==="right"?y+p+10:Math.min(Math.max(8,y+p-q),Math.max(8,i-q-8)),$=s&&Z<s.right&&Z+q>s.left?s.bottom+6:0,F=Math.min(Math.max(8,$),Math.max(8,r-140));let K;X==="below"?(K=Math.max(8,Math.min(g+p+10,r-8-Math.min(S,120))),e.style.maxHeight=`${Math.max(40,r-K-8)}px`):X==="above"?(e.style.maxHeight=`${Math.max(40,g-10-F)}px`,K=Math.max(F,g-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,r-F-8)}px`,K=Math.min(Math.max(F,g+6),Math.max(F,r-e.offsetHeight-8))),b||(e.style.left=`${Z}px`),e.style.top=`${K}px`,e.dataset.side=X,e.style.setProperty("--npc-tail",k(X)?`${Math.min(e.offsetHeight-18,Math.max(18,g+p/2-K))}px`:`${Math.min(q-18,Math.max(18,y+p/2-Z))}px`)}const Fb=.06,BI=matchMedia("(prefers-reduced-motion: reduce)");function Td({text:e,limit:a,streaming:i=!1}){const[,r]=w.useState(0),s=w.useRef({text:"",count:0,rate:Fb,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(Fb,(e.length-d.count)/a));const f=!BI.matches&&d.count<e.length;w.useEffect(()=>{if(!f)return;const p=requestAnimationFrame(()=>r(y=>y+1));return()=>cancelAnimationFrame(p)});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 II({className:e,children:a,onReading:i}){const r=w.useRef(null),s=w.useRef(null),u=w.useRef(i),[d,f]=w.useState(!1);return u.current=i,w.useEffect(()=>{const m=r.current,p=s.current;if(!m||!p)return;let y=!0,g=0;const j=()=>{m.scrollTop=m.scrollHeight,g=m.scrollTop},b=()=>{y&&j(),f(m.scrollTop>1)},S=()=>{const N=m.scrollHeight-m.scrollTop-m.clientHeight<4;N&&!y?(y=!0,g=m.scrollTop,u.current(!1)):!N&&y&&(m.scrollTop<g-1?(y=!1,u.current(!0)):j()),f(m.scrollTop>1)},k=new ResizeObserver(b);return k.observe(p),k.observe(m),b(),m.addEventListener("scroll",S,{passive:!0}),()=>{k.disconnect(),m.removeEventListener("scroll",S),u.current(!1)}},[]),o.jsx("span",{ref:r,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:o.jsx("span",{ref:s,children:a})})}const lk={think:l7,mutter:K7,read:v7,write:B7,run:X7,script:u7,compact:t7,retry:D0,ask:k4,say:R7,chat:A4,tool:n9},w0=e=>x("npc.duration",{value:Hi(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),PI={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function HI({view:e,name:a,cat:i,area:r,avoid:s,layout:u,facing:d,toolbar:f}){var H,q,Z;const m=w.useRef(null),p=w.useRef(null),[y,g]=w.useState(!1),[,j]=w.useState(0);w.useLayoutEffect(()=>{u.current=()=>{var P;if(!m.current||!i.current||!r.current)return;const F=r.current.getBoundingClientRect(),K=s.current?s.current.getBoundingClientRect().top-F.top:F.height,U=(P=p.current)==null?void 0:P.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),LI(m.current,i.current,F.width,K,U?{left:U.left-F.left,right:U.right-F.left,bottom:U.bottom-F.top}:null,d())},u.current();const $=new ResizeObserver(()=>{var F;return(F=u.current)==null?void 0:F.call(u)});for(const F of[m.current,p.current])F&&$.observe(F);return()=>{$.disconnect(),u.current=null}},[y]);const b=e.steps.some($=>$.state==="running");w.useEffect(()=>{if(!y||!b)return;const $=setInterval(()=>j(F=>F+1),200);return()=>clearInterval($)},[y,b]),w.useEffect(()=>{if(!y)return;const $=F=>{F.key==="Escape"&&g(!1)};return addEventListener("keydown",$),()=>removeEventListener("keydown",$)},[y]);const S=(H=e.steps[0])==null?void 0:H.id;w.useEffect(()=>{g(!1)},[S]);const[k,N]=w.useState(!1),[T,A]=w.useState(!1),[C,M]=w.useState(null),O=k||T;w.useEffect(()=>{var $;M(O?(($=e.shown)==null?void 0:$.id)??null:null)},[O]);const _=C&&e.steps.find($=>$.id===C)||e.shown,I=_?_.look:e.done?"action":null;let V=null;if((_==null?void 0:_.look)==="thought"||(_==null?void 0:_.look)==="mutter"){const $=(_.line??"").replace(/\n\s*\n\s*/g,`
|
|
790
|
+
|
|
791
|
+
`).trim(),F=o.jsx(Td,{text:$,limit:300,streaming:_.look==="thought"&&_.state==="running"},_.id),[K,U]=x("npc.mutter",{text:""}).split("");V=o.jsx(II,{className:_.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:A,children:_.look==="thought"?F:o.jsxs(o.Fragment,{children:[K,F,U]})},_.id)}else if((_==null?void 0:_.look)==="speech")V=o.jsx("span",{className:"jv-npc-speech",children:o.jsx(Td,{text:_.line??"",limit:1500,streaming:_.state==="running"&&_.icon==="say"},_.id)});else if(_){const $=lk[_.icon];V=o.jsxs("span",{className:"jv-npc-action","data-state":_.state,children:[o.jsx($,{}),o.jsx(Td,{text:_.title,limit:300},_.id),_.state==="running"&&o.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(V=o.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?o.jsx(ma,{}):o.jsx(vs,{}),o.jsx(Td,{text:x(PI[e.done.outcome],{duration:w0(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const X=e.steps.length>0,L=(_==null?void 0:_.icon)==="ask"&&_.state==="running";return w.useEffect(()=>{V||N(!1)},[!V]),o.jsxs(o.Fragment,{children:[f==null?void 0:f(p,()=>g(!1)),o.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:I??void 0,"data-kind":_==null?void 0:_.icon,"data-fading":!y&&!_&&((q=e.done)==null?void 0:q.fading)||void 0,hidden:!y&&!V,onPointerEnter:$=>{$.pointerType==="mouse"&&N(!0)},onPointerLeave:()=>N(!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:w0((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(z7,{})})]}),o.jsx("ol",{children:e.steps.map($=>o.jsx(qI,{step:$,skew:e.skew},$.id))})]}):o.jsxs(o.Fragment,{children:[I==="speech"&&o.jsxs("span",{className:"jv-npc-name",children:[a,(_==null?void 0:_.to)&&o.jsx("em",{children:x("npc.to",{chat:_.to})})]}),X?o.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>g(!0),title:x("npc.expand"),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),g(!0))},children:V}):o.jsx("div",{className:"jv-npc-line",children:V}),L&&e.answer&&((Z=_.options)==null?void 0:Z.some($=>$.value))&&o.jsx("div",{className:"jv-npc-options",children:_.options.map($=>o.jsx("button",{type:"button",onClick:()=>e.answer($.value),children:$.label},$.label))}),L&&!e.answer&&_.hint&&o.jsx("p",{className:"jv-npc-hint",children:_.hint})]})})]})}function qI({step:e,skew:a}){const[i,r]=w.useState(!1),s=lk[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(b4,{}):e.state==="ok"?o.jsx(ma,{}):o.jsx(vs,{}),x(`npc.state.${e.state}`)]}),o.jsx("span",{className:"jv-npc-time",children:w0((e.endedAt??Date.now()+a)-e.startedAt)}),u&&o.jsx(Ii,{className:"jv-npc-chevron"})]}),i&&u&&o.jsx("pre",{"data-kind":e.icon,children:u})]})}const qd="src/web/thread/ThreadPane.tsx",tf="npm run build",UI=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
|
|
792
|
+
`),FI=["> 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(`
|
|
793
|
+
`),ok={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},VI=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:qd,ms:2600,output:UI},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:qd,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
|
|
794
|
+
`)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:tf,ms:3200,failed:!0,output:FI},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:qd,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:tf,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
|
|
795
|
+
`)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...ok},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],S0=[{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",...ok}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:qd}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:tf}},{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:tf,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function $I({controls:e,onReplay:a,toolbar:i}){const[r,s]=w.useState(!1);return o.jsxs("div",{ref:i,className:"jv-npc-toolbar",role:"toolbar","aria-label":x("npc.toolbar"),children:[o.jsxs("div",{className:"jv-npc-toolbar-row",children:[o.jsx("span",{children:x("npc.toolbar")}),o.jsx("button",{type:"button",className:"jv-npc-icon",onClick:a,"aria-label":x("npc.replay"),title:x("npc.replay"),children:o.jsx(G4,{})}),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:FC.map(u=>o.jsx(fa,{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(V7,{}),x("npc.poses")]})]}),r&&o.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":x("npc.poses"),children:S0.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 GI={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},Vb=e=>e.text?[...x(e.text)].slice(0,e.typed).join(""):"";function YI(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 $b(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):Vb(e);return{id:String(e.id),look:a,icon:GI[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:YI(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?Vb(e):e.output}}const Np={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},KI=40,Gb=6e3,Yb=500,XI={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class Ep extends Error{}const QI=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...x(e.text)].length:0});function ZI(e,a){const[i,r]=w.useState(Np),[s,u]=w.useState(a),[d,f]=w.useState(0),[m,p]=w.useState(null),[,y]=w.useState(0),g=w.useRef(null);w.useEffect(()=>{if(!e||m)return;let M=!0;const O=new Set,_=L=>new Promise((H,q)=>{const Z=setTimeout(()=>{O.delete(Z),M?H():q(new Ep)},L);O.add(Z)}),I=(L,H)=>r(q=>({...q,steps:q.steps.map(Z=>Z.id===L?{...Z,...H}:Z)})),V=(L,H)=>r(q=>({...q,flash:{mood:L,until:Date.now()+H}})),X=async(L,H,q)=>{const Z=[...x(H)].length,$=q?Math.max(16,q/Z):KI;for(let F=1;F<=Z;F++)I(L,{typed:F}),await _($)};return(async()=>{r({...Np}),await _(700);const L=Date.now();let H="";r(Z=>({...Z,phase:"turn",startedAt:L}));for(const[Z,$]of VI.entries()){const{ms:F,failed:K,replies:U,...P}=$,ie=U?U[H]:$.text;if(r(z=>({...z,steps:[...z.steps,{...P,text:ie,id:Z,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),$.kind==="ask"){if(H=await new Promise(z=>{g.current=z}),g.current=null,!M)throw new Ep;I(Z,{state:"ok",endedAt:Date.now(),answer:$.options.find(z=>z.value===H)});continue}ie?await X(Z,ie,$.kind==="think"?F??null:null):await _(F??1e3),($.kind==="mutter"||$.kind==="say")&&await _(1100),I(Z,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(r(z=>({...z,shake:z.shake+1})),V("dizzy",2600),await _(900))}const q=Date.now();for(r(Z=>({...Z,phase:"stretch",endedAt:q,recapUntil:q+Gb})),q-L>2e4&&V("happy",3200),await _(2200);;)r(Z=>({...Z,phase:"idle"})),await _(9e3),r(Z=>({...Z,phase:"groom"})),await _(2800)})().catch(L=>{if(!(L instanceof Ep))throw L}),()=>{var L;M=!1;for(const H of O)clearTimeout(H);(L=g.current)==null||L.call(g,"")}},[e,d,m]),w.useEffect(()=>{var I;const M=Date.now(),O=[((I=i.flash)==null?void 0:I.until)??0,i.recapUntil-Yb,i.recapUntil].filter(V=>V>M);if(!O.length)return;const _=setTimeout(()=>y(V=>V+1),Math.min(...O)-M+20);return()=>clearTimeout(_)});const j=S0.find(M=>M.key===m)??null,b=Date.now(),S=j?null:i.phase==="turn"?[...i.steps].reverse().find(M=>M.state==="running")??null:null,k=j?j.motion:S?XI[S.kind]:i.phase==="stretch"?"stretch":i.phase==="groom"?"groom":i.phase==="turn"?"think":"idle",N=i.flash&&i.flash.until>b?i.flash.mood:null,T=i.endedAt!==null&&b<i.recapUntil,A=j?j.step?QI(j.step):null:S??(i.phase==="turn"?i.steps.at(-1)??null:null);return{...{view:{steps:i.steps.map($b),shown:A?$b(A):null,startedAt:i.startedAt,endedAt:i.endedAt,skew:0,answer:M=>{var O;return(O=g.current)==null?void 0:O.call(g,M)},done:j!=null&&j.done?{ms:31400,outcome:"completed",fading:!1}:!j&&T?{ms:i.endedAt-i.startedAt,outcome:"completed",fading:b>=i.recapUntil-Yb}:null},motion:k,fast:j?!!j.fast:(S==null?void 0:S.kind)==="write"||(S==null?void 0:S.kind)==="run",mood:(j==null?void 0:j.mood)??N??s,shake:i.shake,canRecap:!j&&i.endedAt!==null&&!T,showRecap:()=>r(M=>({...M,recapUntil:Date.now()+Gb}))},controls:{pose:j,baseMood:s,setBaseMood:u,replay:()=>{p(null),f(M=>M+1)},hold:M=>{p(M),r(O=>{var _;return{...Np,shake:O.shake+((_=S0.find(I=>I.key===M))!=null&&_.shake?1:0)}})}}}}const JI=4e3,Kb={turn:null,last:null,skew:0};function WI(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(p=>p.id===s.id),d=i[u];if(!d)continue;const f=(d.text??"")+s.append,m=Math.max(0,f.length-JI);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 eP(e){const[a,i]=w.useState(Kb);return w.useEffect(()=>{if(i(Kb),!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:WI(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 Tp=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),zi=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",Ap=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",tP=e=>{const a=(e??"").split(`
|
|
796
|
+
`)[0].trim();return a.length>40?`${a.slice(0,39)}…`:a},Xb=e=>e.type==="channel"?`#${e.title}`:e.title;function Mp(e){return e?e.omitted?`${e.head}
|
|
797
|
+
${x("npc.live.omitted",{count:Hi(e.omitted)})}
|
|
798
|
+
${e.tail}`:e.head+e.tail:""}const Qb=e=>e.omitted?`${x("npc.live.omitted",{count:Hi(e.omitted)})}
|
|
799
|
+
`:"";function _p(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 nP(e,a,i){const r={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:a},s=(m,p,y)=>({...r,look:"action",icon:m,title:p,detail:y});switch(e.kind){case"thinking":return{...r,look:"thought",icon:"think",title:x("npc.step.think"),line:e.text??"",detail:Qb(e)+(e.text??"")};case"text":return{...r,look:"mutter",icon:"mutter",title:x("npc.step.mutter"),line:e.text??"",detail:Qb(e)+(e.text??"")};case"compaction":return s("compact",x(`npc.live.compact.${zi(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?x("npc.live.tokens",{before:Hi(e.tokensBefore),after:Hi(e.tokensAfter)}):Mp(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.${zi(e)}`),Mp(e.output))}const u=e.input??{},d=Mp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
|
|
800
|
+
|
|
801
|
+
`);switch(e.tool){case"read":return s("read",x(`npc.live.read.${zi(e)}`,{target:Ap(u.path)}),f);case"edit":return s("write",x(`npc.live.edit.${zi(e)}`,{target:Ap(u.path)}),f);case"write":return s("write",x(`npc.live.write.${zi(e)}`,{target:Ap(u.path)}),f);case"bash":return s("run",x(`npc.live.run.${zi(e)}`,{target:tP(u.command)}),f);case"codemode":return s("script",x(`npc.live.script.${zi(e)}`),f);case"chat":return aP(e,r,i,d);default:return s("tool",x(`npc.live.tool.${zi(e)}`,{tool:e.tool??""}),f)}}function aP(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)?Xb(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(`
|
|
802
|
+
|
|
803
|
+
`),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=iP(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(`
|
|
804
|
+
`),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.${zi(e)}`),detail:r};const m=d?Xb(d):"",p=Tp.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.${zi(e)}`,{tool:u||"chat"});return{...a,look:"action",icon:Tp.has(u)?"chat":"tool",title:e.state==="failed"&&Tp.has(u)?x("npc.live.tool.failed",{tool:u}):p,detail:r}}function iP(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 Zb(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=>nP(s,r(s),a))}function Ad(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 rP=4e3,Jb=1500;function Wb(e,a,i,r){var b;const s=S=>S-i;let u=null;for(const S of e)S.state==="running"&&(!u||S.startedAt>=u.startedAt)&&(u=S);const d=[];for(const S of e.filter(k=>k.state!=="running"&&k.endedAt!==null&&Ad(k).firm).sort((k,N)=>k.endedAt-N.endedAt)){const k=s(S.endedAt),N=d.at(-1);N&&S.look==="speech"&&(N.end=Math.min(N.end,Math.max(N.start+Jb,k)));const T=Math.max(k,(N==null?void 0:N.end)??0);T-k>rP||d.push({step:S,start:T,end:T+Ad(S).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const S=s(f.startedAt);for(let k=d.length-1;k>=0;k--){const N=d[k];N.start>=S&&N.start>a?d.splice(k,1):N.end>S&&(N.end=Math.max(N.start+Jb,S))}}let m=null;for(const S of e){if(S.state==="running"||S.endedAt===null||!Ad(S).light)continue;const k=s(S.endedAt)+Ad(S).light;k>a&&(!m||S.endedAt>=m.step.endedAt)&&(m={step:S,end:k})}const p=d.find(S=>S.start<=a&&a<S.end),y=(p==null?void 0:p.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),g=y??f??u??(r?e.at(-1)??null:null),j=[...d.flatMap(S=>[S.start,S.end]),(m==null?void 0:m.end)??0].filter(S=>S>a);return{shown:g,lingering:!!y,next:j.length?Math.min(...j):0,wordsEnd:((b=d.at(-1))==null?void 0:b.end)??0}}const ej=6e3,tj=500,nj=2200,lP=2e4,oP=10*6e4,aj=3e4,sP=2e4,cP=2800;function uP(e,a,i,r,s){var H;const{turn:u,last:d,skew:f}=eP(e),[m,p]=w.useState(null),[y,g]=w.useState(0),[j,b]=w.useState(0),[,S]=w.useState(0),k=w.useRef(new Set),N=w.useRef(Date.now()),T=w.useMemo(()=>u?Zb(u,a):d?Zb(d,a):[],[u,d,a]);w.useEffect(()=>{for(const q of(u==null?void 0:u.steps)??[])q.state==="failed"&&!k.current.has(q.id)&&(k.current.add(q.id),g(Z=>Z+1),p({mood:"dizzy",until:Date.now()+2600}))},[u]),w.useEffect(()=>{d&&(k.current.clear(),N.current=Date.now(),b(Math.max(Date.now(),Wb(T,Date.now(),f,!1).wordsEnd)+ej),d.outcome==="completed"&&d.endedAt-d.startedAt>lP&&p({mood:"happy",until:Date.now()+3200}))},[d]),w.useEffect(()=>{u&&(N.current=Date.now())},[u!==null]);const A=Date.now(),C=Wb(T,A,f,u!==null),M=C.shown,O=T.filter(q=>q.state==="running").sort((q,Z)=>Z.startedAt-q.startedAt)[0],_=!u&&(d==null?void 0:d.outcome)==="completed"&&A+f-d.endedAt<nj,I=A-N.current,V=!u&&(i==null?void 0:i.status)==="idle"&&I>aj&&(I-aj)%sP<cP,X=O&&O.look!=="thought"?_p(O):C.lingering&&M?_p(M):O?_p(O):u?{motion:"think",fast:!1}:_?{motion:"stretch",fast:!1}:V?{motion:"groom",fast:!1}:s,L=!u&&!M&&d!==null&&A<j;return w.useEffect(()=>{const q=[(m==null?void 0:m.until)??0,j-tj,j,((d==null?void 0:d.endedAt)??0)-f+nj,C.next].filter($=>$>Date.now()),Z=setTimeout(()=>S($=>$+1),q.length?Math.min(...q)-Date.now()+20:1e3);return()=>clearTimeout(Z)}),{view:{steps:T,shown:M,skew:f,startedAt:((H=u??d)==null?void 0:H.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:L?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:A>=j-tj}:null},motion:X.motion,fast:X.fast,mood:m&&m.until>A?m.mood:r,shake:y,canRecap:!u&&d!==null&&!L&&A+f-d.endedAt<oP,showRecap:()=>b(Date.now()+ej)}}const sk="jarvy-floating-bot",ls=10,dP=4,Md=new URLSearchParams(location.search).get("npc")==="demo",fP={zz:o.jsxs(o.Fragment,{children:[o.jsx("i",{children:"z"}),o.jsx("i",{children:"Z"})]}),ask:"?",sweat:o.jsxs("svg",{viewBox:"0 0 20 28",children:[o.jsx("path",{d:"M10 1C10 1 2 13 2 18.5a8 8 0 0 0 16 0C18 13 10 1 10 1Z"}),o.jsx("ellipse",{cx:"7",cy:"18",rx:"1.8",ry:"3"})]}),sparkle:o.jsx("svg",{viewBox:"0 0 100 100",children:[[14,22,9],[86,18,7],[90,46,4.5]].map(([e,a,i])=>o.jsx("path",{d:`M${e} ${a-i}Q${e} ${a} ${e+i} ${a}Q${e} ${a} ${e} ${a+i}Q${e} ${a} ${e-i} ${a}Q${e} ${a} ${e} ${a-i}Z`},e))})};function hP(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 mP(){try{const e=JSON.parse(localStorage.getItem(sk)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function pP({bot:e,chatId:a,status:i,area:r,avoid:s,onOpen:u}){const d=w.useRef(null),f=w.useRef(null),m=w.useRef(mP()),p=w.useRef(null),y=w.useRef(!1),g=w.useRef(null),j=w.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),b=w.useRef(null),[S,k]=w.useState(!1),N=w.useRef(null),T=ZI(Md,e.mood),A=uP(Md?null:e.id,a,i,e.mood,hP(i)),C=Md?T:A;j.current.motion=C.motion,j.current.fast=C.fast,j.current.mood=C.mood;const M=RI[C.motion];function O(){const H=r.current.getBoundingClientRect(),q=d.current.offsetWidth,Z=s.current?s.current.getBoundingClientRect().top-H.top:H.height,$=Math.max(ls,H.width-q-ls),F=Math.max(ls,Z-q-ls);return{minX:ls,minY:ls,maxX:$,maxY:F}}function _(){var $;const H=($=r.current)==null?void 0:$.getBoundingClientRect(),q=d.current;if(!H||!q)return 0;const Z=H.width/2-q.offsetWidth/2;return Z>0?Math.max(-1,Math.min(1,(Z-q.offsetLeft)/Z)):0}function I(){var Z;if(!d.current||!r.current)return;const H=O(),q=d.current;q.style.left=`${H.minX+m.current.x*(H.maxX-H.minX)}px`,q.style.top=`${H.minY+m.current.y*(H.maxY-H.minY)}px`,(Z=N.current)==null||Z.call(N)}w.useLayoutEffect(()=>{I();const H=new ResizeObserver(I);for(const q of[r.current,s.current,d.current])q&&H.observe(q);return()=>H.disconnect()},[]);const V=i!=null&&i.error?`${i.runId??""}:${i.error}`:null;w.useEffect(()=>{var H;(V||C.shake)&&((H=b.current)==null||H.shake())},[V,C.shake]),w.useEffect(()=>{const H=$=>{($.pointerType==="mouse"||$.type==="pointerdown")&&(g.current={x:$.clientX,y:$.clientY})},q=$=>{$.relatedTarget||(g.current=null)},Z=$=>{const F=$.target;if(F.id!=="jarvy-composer")return;const K=F.getBoundingClientRect();g.current={x:K.left+K.width/2,y:K.top+K.height/2}};return window.addEventListener("pointermove",H),window.addEventListener("pointerdown",H),document.addEventListener("pointerout",q),document.addEventListener("input",Z),document.addEventListener("focusin",Z),()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerdown",H),document.removeEventListener("pointerout",q),document.removeEventListener("input",Z),document.removeEventListener("focusin",Z)}},[]);const X=w.useRef((ui[e.color]??ui.gray).hex),L=w.useRef(e.agent);return w.useEffect(()=>{X.current=(ui[e.color]??ui.gray).hex},[e.color]),w.useEffect(()=>{L.current=e.agent},[e.agent]),w.useEffect(()=>{const H=f.current,q=H==null?void 0:H.getContext("2d");let Z;try{Z=mS()}catch{}if(!H||!q||!Z)return;const $=Z,F=new DI,K=matchMedia("(prefers-reduced-motion: reduce)");let U=0;b.current={shake:()=>F.shake()};const P=z=>{var re;const ne=d.current;if(ne!=null&&ne.offsetWidth){const R=Math.round(ne.offsetWidth*Math.min(2,devicePixelRatio||1)),B=ne.getBoundingClientRect(),W=g.current;j.current.lookX=W?Math.max(-1,Math.min(1,(W.x-B.left-B.width/2)/320)):0,j.current.lookY=W?Math.max(-1,Math.min(1,(W.y-B.top-B.height/2)/320)):0,j.current.reduced=K.matches;const fe=j.current.motion,me=!!((re=p.current)!=null&&re.moved)&&(fe==="idle"||fe==="groom"||fe==="stretch");(j.current.faceX===void 0||!(me||fe==="sleep"))&&(j.current.faceX=_());const pe=F.frame(z,j.current),Ce=.86;H.width!==R?H.width=H.height=R:q.clearRect(0,0,R,R),$.paint(q,R,X.current,pe,{zoom:Ce}),L.current&&gS(q,R,hS(pe,Ce))}U=requestAnimationFrame(P)},ie=()=>{cancelAnimationFrame(U),document.hidden||(U=requestAnimationFrame(P))};return document.addEventListener("visibilitychange",ie),ie(),k(!0),()=>{document.removeEventListener("visibilitychange",ie),cancelAnimationFrame(U),b.current=null,$.dispose()}},[]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":S||void 0,"data-motion":C.motion,title:e.name,"aria-label":x("avatar.openInfo",{name:e.name}),onPointerDown:H=>{if(H.button!==0)return;const q=H.currentTarget;q.setPointerCapture(H.pointerId),p.current={id:H.pointerId,x:H.clientX,y:H.clientY,left:q.offsetLeft,top:q.offsetTop,moved:!1}},onPointerMove:H=>{const q=p.current;if(!q||q.id!==H.pointerId)return;const Z=H.clientX-q.x,$=H.clientY-q.y;if(!q.moved&&Math.hypot(Z,$)<dP)return;q.moved=!0;const F=O(),K=Math.min(F.maxX,Math.max(F.minX,q.left+Z)),U=Math.min(F.maxY,Math.max(F.minY,q.top+$));m.current={x:F.maxX>F.minX?(K-F.minX)/(F.maxX-F.minX):0,y:F.maxY>F.minY?(U-F.minY)/(F.maxY-F.minY):0},I()},onPointerUp:H=>{const q=p.current;!q||q.id!==H.pointerId||(p.current=null,y.current=q.moved,q.moved&&localStorage.setItem(sk,JSON.stringify(m.current)))},onPointerCancel:()=>{p.current=null},onClick:()=>{if(y.current){y.current=!1;return}C.canRecap?C.showRecap():u()},style:{"--jv-avatar-size":"100%"},children:[o.jsx("canvas",{ref:f,"aria-hidden":"true"}),!S&&o.jsx(fo,{color:e.color,mood:e.mood,size:88,crown:e.agent}),S&&M&&o.jsx("span",{className:"jv-figure-mark","data-mark":M,"aria-hidden":"true",children:fP[M]})]}),o.jsx(HI,{view:C.view,name:e.name,cat:d,area:r,avoid:s,layout:N,facing:_,toolbar:Md?(H,q)=>o.jsx($I,{controls:T.controls,toolbar:H,onReplay:()=>{q(),T.controls.replay()}}):void 0})]})}function gP({className:e,...a}){return o.jsx("div",{"data-slot":"card",className:gn("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...a})}function vP({className:e,...a}){return o.jsx("div",{"data-slot":"card-header",className:gn("grid gap-1 px-5",e),...a})}function yP({className:e,...a}){return o.jsx("div",{"data-slot":"card-title",className:gn("font-semibold leading-none",e),...a})}function xP({className:e,...a}){return o.jsx("div",{"data-slot":"card-content",className:gn("px-5",e),...a})}function bP({bot:e,connections:a,onSaved:i,onManage:r}){return o.jsxs(gP,{className:"jarvy-model-picker jv-ui",children:[o.jsx(vP,{children:o.jsx(yP,{children:x("botModel.pickFor",{name:e.name})})}),o.jsx(xP,{children:o.jsx(vS,{bot:e,connections:a,onSaved:i,onManage:r})})]})}function jP({chat:e,inChannel:a,bots:i,members:r,meId:s,drafts:u,composeReady:d,botName:f,activeBot:m,status:p,connections:y,activity:g,history:j,divider:b,activeQuestion:S,pane:k,onPane:N,onToggleInfo:T,find:A,onNav:C,onBot:M,hasBotDirects:O,onInvite:_,onQuote:I,onReply:V,onReact:X,onFold:L,onJump:H,onSettled:q,onSend:Z,onPreview:$,onSaveNote:F,notice:K,createBot:U,creating:P,updateBot:ie,onManageModels:z,error:ne,chatArea:re,transcript:R,composeWrap:B,hidden:W,onOpenThread:fe}){const{messages:me,loading:pe,hasOlder:Ce,loadingOlder:Ae,top:xe,away:oe,unseen:Ee,toLatest:Xe}=j;return o.jsxs("main",{className:"ui-chat","aria-label":x("chat.area"),ref:re,hidden:W,children:[!a&&o.jsx(gt,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:x("common.openNav"),onClick:C}),!a&&O&&o.jsx(gt,{icon:"people",className:"jv-floating-dms",label:x("chat.botDms",{name:f}),"aria-pressed":(k==null?void 0:k.kind)==="botdms",onClick:()=>N((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(lI,{chat:e,members:hi(r),bots:i,onNav:C,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:()=>N((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"?N(null):A.search(e)}):m&&o.jsx(pP,{bot:m,chatId:e.id,status:p,area:re,avoid:B,onOpen:()=>M(m.id)}),a&&o.jsx(oI,{chat:e,onSave:F}),o.jsxs("div",{className:`ui-transcript jarvy-transcript${a?" jv-channel-transcript":""}`,ref:R,"aria-label":x("chat.transcript"),role:"log",children:[!a&&!(m!=null&&m.connectionId)&&m&&o.jsx("div",{className:"jarvy-model-onboarding",children:o.jsx(bP,{bot:m,connections:y,onSaved:ie,onManage:z})}),pe?o.jsx("p",{className:"jarvy-empty-text",children:x("chat.loading")}):me.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:[Ce&&o.jsx("div",{ref:xe,className:"jv-history-more","aria-live":"polite",children:Ae?x("chat.loadingOlder"):""}),a?o.jsx(ef,{messages:me,members:r,bots:i,me:s,divider:b,activeQuestion:S,onSettled:q,onPreview:$,onReply:V,onOpenThread:fe,onQuote:I,onReact:X,onFold:L,onJump:H,onError:ne}):o.jsx(_I,{messages:me,members:r,me:s,activeQuestion:S,bot:m,onSettled:q,onPreview:$,onQuote:I,onReact:X,onFold:L,onJump:H,onError:ne})]}),oe&&me.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button",onClick:Xe,"aria-label":x("chat.toLatest"),children:[Ee>0&&o.jsx("span",{children:x("chat.unseen",{count:Ee})}),o.jsx(Ue,{name:"chevron-down"})]})})]}),o.jsx(rk,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:B,scrollRef:R,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:hi(r).filter(Be=>Be.id!==s&&e.memberIds.includes(Be.id)),outside:hi(r).filter(Be=>!e.memberIds.includes(Be.id)),onInvite:Be=>_(e.id,Be)}:void 0,onSend:Z,onError:ne,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:U,disabled:P,children:[o.jsx(Ue,{name:"person-add"}),x("sidebar.newBot")]})}),e&&o.jsx(BS,{container:R,drafts:u,chatId:e.id,source:Be=>me.find(at=>at.id===Be),members:r,onNotice:K})]})}class wP{constructor(){Jt(this,"listeners",new Set)}emit(a){for(const i of this.listeners)i(a)}on(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}}function ck(e,a){const i=w.useRef(a);i.current=a,w.useEffect(()=>e.on(r=>i.current(r)),[e])}const Xc=(e,a)=>e.some(i=>i.id===a.id)?e.map(i=>i.id===a.id?a:i):e;function Sf(e,a){if(e.some(r=>r.id===a.id))return Xc(e,a);if(e[0]&&a.sequence<e[0].sequence)return e;const i=e.findIndex(r=>r.sequence>a.sequence);return i<0?[...e,a]:[...e.slice(0,i),a,...e.slice(i)]}const Ig=(e,a)=>e.sequence>a+1;function uk(e,a,i){var s;const r=((s=a.at(-1))==null?void 0:s.sequence)??i;return[...e.filter(u=>u.sequence<=i),...a,...e.filter(u=>u.sequence>r)]}const SP=e=>na(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function kP(e,a){const[i,r]=w.useState([]);return w.useEffect(()=>{if(r([]),!e)return;let s=!0;return he.botDirects(e).then(u=>{s&&r(u.chats)}).catch(()=>{}),()=>{s=!1}},[e,a]),i}function CP({bot:e,chats:a,members:i,bots:r,me:s,live:u,onClose:d,onPreview:f,onError:m}){const[p,y]=w.useState(null),[g,j]=w.useState(null);w.useEffect(()=>{if(j(null),!p)return;let k=!0;return he.messages(p).then(N=>{k&&j(N.messages)}).catch(N=>{k&&m(N)}),()=>{k=!1}},[p]),ck(u,k=>{if(k.kind==="chat"||k.message.chatId!==p)return;const N=k.message;j(T=>T&&(k.kind==="message"?Sf(T,N):Xc(T,N)))});const b=k=>i.find(N=>N.id!==e.id&&k.memberIds.includes(N.id)),S=a.find(k=>k.id===p);return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("chat.botDms",{name:e.name}),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[S&&o.jsx(gt,{icon:"chevron-left",label:x("directs.back"),onClick:()=>y(null)}),o.jsx("strong",{children:S?x("directs.between",{name:e.name,other:$i(b(S))}):x("chat.botDms",{name:e.name})}),o.jsx("span",{className:"jv-spacer"}),o.jsx(gt,{icon:"close",label:x("common.close"),onClick:d})]}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ui-pane-body jv-pane-body",children: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(ef,{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 N=b(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:N,bots:r,size:20}),o.jsx("strong",{children:$i(N)}),o.jsx("span",{className:"jv-muted",children:SP(k.updatedAt)})]}),k.lastMessage&&o.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Cs(k.lastMessage)})]},k.id)})})]})}function NP(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:OS(a.activity),tone:"busy"}:{label:x((a==null?void 0:a.status)==="idle"?"activity.idle":"activity.stopped")}:{label:x("activity.noModel")}}function EP({channel:e,members:a,bots:i,statuses:r,me:s,onAdd:u,onBot:d,onChanged:f,onError:m}){const[p,y]=w.useState(null),g=a.filter(k=>e.memberIds.includes(k.id)),j=g.filter(k=>k.kind!=="bot").sort((k,N)=>+(N.id===s)-+(k.id===s)),b=g.filter(k=>k.kind==="bot"),S=k=>{const N=k.kind==="bot"?i.find(M=>M.id===k.id):void 0,T=r[k.id],A=k.kind==="bot"?NP(N,T):void 0,C=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")})]}),A&&o.jsx("span",{className:"jv-member-state","data-tone":A.tone,children:A.label})]});return o.jsxs("div",{className:"jv-member-row",children:[N?o.jsx("button",{type:"button",className:"jv-member-main","aria-label":x("members.view",{name:k.name}),onClick:()=>d(k.id),children:C}):o.jsx("div",{className:"jv-member-main",children:C}),k.id!==s&&o.jsx(gt,{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(Ue,{name:"person-add"}),x("common.add")]})]}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",x("members.people"),j],["bots","Bot",b]].map(([k,N,T])=>T.length>0&&o.jsxs("section",{className:"jv-member-group","aria-label":N,children:[o.jsxs("h3",{children:[N," · ",T.length]}),T.map(S)]},k))}),p&&o.jsx(QS,{title:x("members.removeTitle",{name:p.name,channel:e.title}),body:x("members.removeBody"),confirm:x("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{f(await he.removeMember(e.id,p.id)),y(null)}catch(k){m(k)}}})]})}function ij({label:e,value:a,empty:i,maxLength:r,required:s=!1,onSave:u}){const d=w.useId(),[f,m]=w.useState(null),[p,y]=w.useState(!1);w.useEffect(()=>m(null),[a]);const g=async()=>{if(!(f===null||p||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(gt,{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:j=>m(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g()),j.key==="Escape"&&(j.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:p||s&&!f.trim(),onClick:()=>void g(),children:x("common.save")})]})]})}function TP({channel:e,page:a,sections:i,members:r,bots:s,statuses:u,me:d,onPage:f,onPin:m,onMute:p,onAdd:y,onBot:g,onDelete:j,onChanged:b,onClose:S,onError:k}){const N=w.useId(),T=async C=>{try{b(await he.updateChannel(e.id,C))}catch(M){throw k(M),M}},A=r.filter(C=>e.memberIds.includes(C.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(gt,{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(gt,{icon:"close",label:x("common.close"),onClick:S})]}),a==="members"?o.jsx(EP,{channel:e,members:r,bots:s,statuses:u,me:d,onAdd:y,onBot:g,onChanged:b,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(Ue,{name:"pin"}),x("entry.pin")]}),o.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:p,children:[o.jsx(Ue,{name:e.muted?"bell-slash":"bell"}),x("entry.mute")]}),o.jsxs("button",{type:"button",onClick:y,children:[o.jsx(Ue,{name:"person-add"}),x("info.addMembers")]})]}),o.jsx(ij,{label:x("info.name"),value:e.title,empty:x("info.newChannel"),maxLength:80,required:!0,onSave:C=>T({name:C})}),o.jsx(ij,{label:x("info.topic"),value:e.topic,empty:x("info.noTopic"),maxLength:200,onSave:C=>T({topic:C})}),o.jsxs("div",{className:"jv-info-field",children:[o.jsx("div",{className:"jv-info-label",children:o.jsx("label",{htmlFor:N,children:x("info.section")})}),o.jsx(jS,{id:N,value:e.sectionId,sections:i,onChange:C=>void T({sectionId:C}).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(Ue,{name:"people"}),o.jsx("span",{className:"ui-menu-copy",children:x("channel.members")}),o.jsx("span",{className:"jv-muted",children:A}),o.jsx(Ue,{name:"chevron-right"})]}),o.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:j,children:[o.jsx(Ue,{name:"trash"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})]})]})}function AP({chat:e,chats:a,members:i,focusKey:r,onOpenMessage:s,onClose:u,onError:d}){const[f,m]=w.useState(""),p=w.useRef(null);w.useEffect(()=>{var b,S;(b=p.current)==null||b.focus(),(S=p.current)==null||S.select()},[r,e.id]);const{result:y,loading:g}=ZS(f,e.id,d),j=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:j}),o.jsx("span",{className:"jv-spacer"}),o.jsx(gt,{icon:"close",label:x("search.close"),onClick:u})]}),o.jsx("div",{className:"jv-pane-search",children:o.jsx("input",{ref:p,type:"search",value:f,placeholder:x(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":x("search.placeholder"),onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Escape"&&(b.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:b,chat:S})=>o.jsx(ek,{message:b,chat:S,chats:a,members:i,query:f,showPlace:S.id!==e.id,onOpen:s},b.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 MP=e=>na(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function _P({chat:e,channelName:a,expanded:i=!1,onTitle:r,onStatus:s,onSummary:u,onConclude:d}){var C;const[f,m]=w.useState(null),[p,y]=w.useState(null),[g,j]=w.useState(!1),[b,S]=w.useState(i);w.useEffect(()=>{m(null),y(null),S(i)},[e.id,i]);const k=async(M,O)=>{j(!0);try{await M(),O()}catch{}finally{j(!1)}},N=e.status==="done",T=e.note,A=((C=T==null?void 0:T.text.split(`
|
|
805
|
+
`).find(M=>M.trim()&&!M.startsWith("#")))==null?void 0:C.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-thread-meta","data-open":b||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(gt,{icon:"pencil",label:x("thread.rename"),onClick:()=>m(e.title)})]}):o.jsxs("form",{className:"jv-inline-edit",onSubmit:M=>{M.preventDefault(),f.trim()&&k(()=>r(f.trim()),()=>m(null))},children:[o.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":x("thread.title"),onChange:M=>m(M.target.value),onKeyDown:M=>{M.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":N||void 0,disabled:g,title:x("thread.toggleStatus"),onClick:()=>void k(()=>s(N?"open":"done"),()=>{}),children:N?o.jsxs(o.Fragment,{children:[o.jsx(Ue,{name:"check"}),x("channel.threadDone")]}):x("threads.open")})]}),p!==null?o.jsxs("div",{className:"jv-summary","data-editing":!0,children:[o.jsx("textarea",{className:"jv-notice-input",value:p,autoFocus:!0,"aria-label":x("thread.summary"),onChange:M=>y(M.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||!p.trim(),onClick:()=>void k(()=>u(p.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":b,onClick:()=>S(!b),children:[o.jsx("strong",{children:x("thread.summary")}),!b&&o.jsx("span",{className:"jv-summary-first",children:A}),o.jsx(Ue,{name:b?"chevron-down":"chevron-right"})]}),b&&o.jsxs("span",{className:"jv-muted jv-summary-meta",children:[T.updatedBy.name," · ",MP(T.updatedAt)," · ",x("notice.version",{version:T.version})]}),o.jsx(gt,{icon:"pencil",label:x("thread.editSummary"),onClick:()=>y(T.text)})]}),b&&o.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:o.jsx(Yc,{text:T.text})}),b&&!N&&o.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:g,onClick:()=>void k(d,()=>{}),children:[o.jsx(Ue,{name:"check"}),x("thread.conclude",{channel:a})]})]}):o.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>y(""),children:[o.jsx(Ue,{name:"add"}),x("thread.addSummary")]})]})}const RP=20,rj=500;class OP{constructor(){Jt(this,"kept",new Map)}take(a){const i=this.kept.get(a);return this.kept.delete(a),i}keep(a,i){if(this.kept.delete(a),!(i.messages.length>rj)){this.kept.set(a,i);for(const r of this.kept.keys()){if(this.kept.size<=RP)break;this.kept.delete(r)}}}removed(a){var i;for(const[r,s]of this.kept)(r===a||((i=s.chat)==null?void 0:i.parentId)===a)&&this.kept.delete(r)}clear(){this.kept.clear()}heard(a){var u;if(a.kind==="chat"){const d=this.kept.get(a.chat.id);d!=null&&d.chat&&(d.chat=a.chat);return}const i=a.message;for(const d of this.kept.values())((u=d.root)==null?void 0:u.id)===i.id&&(d.root=i);const r=this.kept.get(i.chatId);if(!r)return;if(a.kind==="updated"||r.messages.some(d=>d.id===i.id)){r.messages=Xc(r.messages,i);return}const s=r.messages.at(-1);if(s&&Ig(i,s.sequence)||r.messages.length>=rj){this.kept.delete(i.chatId);return}r.messages=Sf(r.messages,i)}}function dk(e,a){if(e.scrollHeight-e.scrollTop-e.clientHeight<a)return{bottom:!0};const i=e.getBoundingClientRect();let r;for(const s of e.querySelectorAll("[data-message]")){const u=s.getBoundingClientRect();if(u.bottom<=i.top)continue;const d={bottom:!1,id:s.dataset.message,offset:u.top-i.top};if(u.top>=i.top&&u.top<i.bottom)return d;if(r??(r=d),u.top>=i.bottom)break}return r??{bottom:!0}}function Pg(e,a){if(a.bottom)return!1;const i=e.querySelector(`[data-message="${a.id}"]`);return i?(e.scrollTo({top:e.scrollTop+i.getBoundingClientRect().top-e.getBoundingClientRect().top-a.offset,behavior:"instant"}),!0):!1}class fk{constructor(){Jt(this,"stop")}get on(){return this.stop!==void 0}start(a,i){this.release();const r=new ResizeObserver(()=>Pg(a,i));for(const d of a.children)r.observe(d);const s=["wheel","touchstart","pointerdown","keydown"],u=()=>this.release();for(const d of s)a.addEventListener(d,u,{passive:!0});this.stop=()=>{r.disconnect();for(const d of s)a.removeEventListener(d,u)}}release(){var a;(a=this.stop)==null||a.call(this),this.stop=void 0}}const Rp=50;function lj({threadId:e,mode:a,showSummary:i=!1,focus:r,onSearch:s,channel:u,drafts:d,members:f,bots:m,me:p,live:y,memory:g,onClose:j,onToggleMode:b,onNav:S,onChanged:k,onInvite:N,onPreview:T,onError:A,onNotice:C}){var Xt;const[M,O]=w.useState(null),[_,I]=w.useState(null),[V,X]=w.useState([]),[L,H]=w.useState(null),[q,Z]=w.useState(!1),[$,F]=w.useState(!1),K=w.useRef(V),U=w.useRef(q),P=w.useRef(null),ie=w.useRef(null),z=w.useRef(!1);K.current=V,U.current=q;const ne=w.useRef(null),re=w.useRef(null),R=w.useRef(null),B=w.useRef(!1),W=w.useRef(!0),[fe,me]=w.useState(!1),pe=w.useRef(0),Ce=w.useRef(0),Ae=w.useRef(0),xe=w.useRef({bottom:!0}),oe=w.useRef(null),Ee=w.useRef(M),Xe=w.useRef(_),[Be]=w.useState(()=>new fk);Ee.current=M,Xe.current=_,w.useEffect(()=>{O(null),I(null),X([]),Z(!1),H(null),B.current=!1,W.current=!0,me(!1),pe.current=0,Ce.current=0,Ae.current=0},[e]);const at=async de=>{const _e=await he.message(de).catch(()=>null);if(!_e||_e.chatId!==e)return null;const Re=Math.max(0,_e.sequence-1-Rp/2);return{...await he.messages(e,Re),hasOlder:Re>0}},Qe=async()=>{const de=K.current[0];return(de==null?void 0:de.chatId)===e?{...await he.messages(e,de.sequence-1),after:de.sequence-1}:(r&&R.current!==e?await at(r.id):null)??await he.latestMessages(e,Rp)},We=de=>{const _e=de.after;X(Re=>_e===void 0?de.messages:uk(Re.filter(Ie=>Ie.chatId===e),de.messages,_e)),de.hasOlder!==void 0&&Z(de.hasOlder)},Pt=de=>{const _e=K.current,Re=_e.at(-1),Ie=Math.max((Re==null?void 0:Re.chatId)===e?Re.sequence:0,Ae.current);if(Ig(de,Ie)&&!_e.some(Fe=>Fe.id===de.id)){Qe().then(We).catch(A);return}Ae.current=Math.max(Ae.current,de.sequence),X(Fe=>Sf(Fe,de))};ck(y,de=>{if(de.kind==="chat"){const Re=de.chat;Re.id===e&&O(Ie=>Ie&&{...Re,readSequence:Math.max(Ie.readSequence,Re.readSequence)});return}const _e=de.message;_e.id===(_==null?void 0:_.id)?I(_e):_e.chatId===e&&(de.kind==="message"?Pt(_e):X(Re=>Xc(Re,_e)))});const vn=async()=>{var Re;const de=K.current[0],_e=ne.current;if(!(!de||!U.current||z.current)){z.current=!0,F(!0);try{const Ie=await he.olderMessages(e,de.sequence,Rp);if(((Re=K.current[0])==null?void 0:Re.id)!==de.id)return;ie.current=_e?_e.scrollHeight-_e.scrollTop:null,X(Fe=>{var it;return((it=Fe[0])==null?void 0:it.id)===de.id?[...Ie.messages,...Fe]:Fe}),Z(Ie.hasOlder)}catch(Ie){A(Ie)}finally{z.current=!1,F(!1)}}};w.useEffect(()=>{let de=!0;xe.current={bottom:!0},oe.current=null;const _e=()=>{de=!1,Be.release();const Ie=Ee.current;B.current&&(Ie==null?void 0:Ie.id)===e&&g.keep(e,{messages:K.current.filter(Fe=>Fe.chatId===e),hasOlder:U.current,place:xe.current,seen:pe.current,chat:Ie,root:Xe.current})},Re=r?void 0:g.take(e);return Re!=null&&Re.chat?(oe.current=Re.place,pe.current=Re.seen,O(Re.chat),I(Re.root??null),X(Re.messages),Z(Re.hasOlder),R.current!==e&&(R.current=e,H(Re.chat.readSequence)),_e):(Promise.all([he.chat(e),Qe()]).then(async([Ie,Fe])=>{if(de&&(O(Ie),We(Fe),R.current!==e&&(R.current=e,H(Ie.readSequence)),Ie.rootMessageId)){const it=await he.message(Ie.rootMessageId);de&&I(it)}}).catch(Ie=>{de&&A(Ie)}),_e)},[e]),w.useLayoutEffect(()=>{const de=ne.current;if(!de||!M)return;if(ie.current!==null){de.scrollTo({top:de.scrollHeight-ie.current,behavior:"instant"}),ie.current=null;return}const _e=()=>de.scrollTo({top:de.scrollHeight,behavior:"instant"}),Re=V.at(-1),Ie=(Re==null?void 0:Re.senderId)===p&&Re.sequence>Ce.current;if(Ce.current=Math.max(Ce.current,(Re==null?void 0:Re.sequence)??0),B.current)(W.current||Ie)&&(Be.release(),de.scrollTo({top:de.scrollHeight,behavior:"smooth"}));else{if(!V.length&&!_)return;B.current=!0;const Fe=r?de.querySelector(`[data-message="${r.id}"]`):null;if(Fe){if(W.current=!1,Fe.scrollIntoView({block:"center"}),r!=null&&r.passage&&LS(Fe,r.passage))return;Fe.classList.add("jv-jump"),setTimeout(()=>Fe.classList.remove("jv-jump"),1600);return}const it=oe.current;if(oe.current=null,it&&Pg(de,it)){W.current=!1,xe.current=it,Be.start(de,it),me(!0);return}_e(),requestAnimationFrame(_e)}(W.current||Ie)&&(pe.current=(Re==null?void 0:Re.sequence)??0)},[V,_,M]),w.useEffect(()=>{B.current&&r&&An(r.id,r.passage)},[r]),w.useEffect(()=>{const de=ne.current,_e=P.current;if(!de||!_e||!q||!B.current)return;const Re=new IntersectionObserver(Ie=>{var Fe;(Fe=Ie[0])!=null&&Fe.isIntersecting&&B.current&&vn()},{root:de,rootMargin:"400px 0px 0px 0px"});return Re.observe(_e),()=>Re.disconnect()},[q,V,e,M]),w.useEffect(()=>{const de=ne.current,_e=re.current;if(!de||!_e)return;let Re=0;const Ie=()=>{cancelAnimationFrame(Re),Re=requestAnimationFrame(()=>{B.current&&de.clientHeight&&!Be.on&&(xe.current=dk(de,120))})},Fe=new ResizeObserver(()=>{Ie(),!(!B.current||!W.current)&&(de.scrollHeight-de.scrollTop-de.clientHeight<8||de.scrollTo({top:de.scrollHeight,behavior:"instant"}))});Fe.observe(_e);const it=()=>{var Gt;Be.on||(W.current=de.scrollHeight-de.scrollTop-de.clientHeight<120,W.current&&(pe.current=Math.max(pe.current,((Gt=K.current.at(-1))==null?void 0:Gt.sequence)??0)),me(!W.current),Ie())};return it(),de.addEventListener("scroll",it,{passive:!0}),()=>{Fe.disconnect(),de.removeEventListener("scroll",it),cancelAnimationFrame(Re)}},[ne.current,e,M]),w.useEffect(()=>{const de=V.at(-1);if(!M||!de||de.chatId!==M.id)return;const _e=()=>{if(document.visibilityState!=="visible"||M.readSequence>=de.sequence)return;const Re={...M,readSequence:de.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};O(Re),he.markRead(M.id,de.sequence).then(()=>k(Re)).catch(A)};return _e(),document.addEventListener("visibilitychange",_e),()=>document.removeEventListener("visibilitychange",_e)},[V,M]);const en=async de=>{try{const _e=await de();O(_e),k(_e)}catch(_e){throw A(_e),_e}},cn=async(de,_e,Re)=>{try{const Ie=await he.react(de.id,_e,Re),Fe=it=>it.id===Ie.id?{...it,reactions:Ie.reactions}:it;X(it=>it.map(Fe)),I(it=>it&&Fe(it))}catch(Ie){A(Ie)}},$n=async(de,_e)=>{try{const Re=await he.fold(de.id,_e),Ie=Fe=>Fe.id===Re.id?{...Fe,folded:Re.folded}:Fe;X(Fe=>Fe.map(Ie)),I(Fe=>Fe&&Ie(Fe))}catch(Re){A(Re)}},An=(de,_e)=>{Be.release();const Re=()=>{var Fe;return de?(Fe=ne.current)==null?void 0:Fe.querySelector(`[data-message="${de}"]`):null},Ie=Re();if(Ie){b0(Ie,_e);return}if(!de){C(x("app.sourceGone"));return}at(de).then(Fe=>{if(!Fe){C(x("thread.sourceElsewhere"));return}We(Fe),requestAnimationFrame(()=>{const it=Re();it&&b0(it,_e)})})},Za={onQuote:de=>ik(d,de,f),onReact:cn,onFold:$n,onJump:An,onError:A},ge=async(de,_e,Re,Ie,Fe=[],it=!1)=>{const Gt=await he.send(e,de,_e,Re,it,Ie,Fe),za=u?[...new Set(Dg(de,hi(f)).filter(Gn=>!u.memberIds.includes(Gn.member.id)).map(Gn=>Gn.member.name))]:[];za.length&&C(x("app.notInChannel",{names:za.join(x("common.listSeparator")),count:za.length})),Pt(Gt)},ke=(u==null?void 0:u.title)??x("search.channel"),Ye=f.find(de=>de.id===(_==null?void 0:_.senderId)),Ke=fe?V.filter(de=>de.sequence>pe.current&&de.senderId!==p).length:0,ct=a==="pane"?"aside":a==="embed"?"section":"main",At=new Set([..._?[_.senderId,..._.mentions]:[],...V.flatMap(de=>[de.senderId,...de.mentions])]);return At.delete(p),o.jsxs(ct,{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:de=>{M&&s&&(de.ctrlKey||de.metaKey)&&de.key.toLowerCase()==="f"&&(de.preventDefault(),s(M))},children:[o.jsxs("header",{className:a==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[a==="full"&&o.jsx(gt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:S}),a==="embed"&&o.jsx(gt,{icon:"chevron-left",className:"ui-mobile-only",label:x("thread.backToList"),onClick:j}),a==="full"?o.jsxs("button",{type:"button",className:"jv-crumb",onClick:j,children:[o.jsx(Ue,{name:"chevron-left"}),o.jsx("span",{className:"jv-hash",children:"#"}),ke]}):a==="embed"?o.jsxs("button",{type:"button",className:"jv-crumb",title:x("thread.inChannel"),onClick:b,children:[o.jsx("span",{className:"jv-hash",children:"#"}),ke]}):o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:x("thread.label")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",ke]})]}),o.jsx("span",{className:"jv-spacer"}),M&&s&&o.jsx(gt,{icon:"search",label:x("thread.search"),onClick:()=>s(M)}),M&&o.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":M.following||void 0,title:x(M.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void en(()=>he.follow(e,!M.following)).catch(()=>{}),children:[o.jsx(Ue,{name:"bell"}),x(M.following?"threads.following":"thread.follow")]}),a!=="embed"&&o.jsx(gt,{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(gt,{icon:"close",label:x("thread.close"),onClick:j})]}),M&&o.jsx("div",{className:a==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:o.jsx(_P,{chat:M,channelName:ke,expanded:i,onTitle:de=>en(()=>he.updateThread(e,{title:de})),onStatus:de=>en(()=>he.updateThread(e,{status:de})),onSummary:de=>en(()=>he.setNote(e,de)),onConclude:async()=>{var de;try{await ge(`${x("thread.conclusion")}
|
|
806
|
+
|
|
807
|
+
${((de=M.note)==null?void 0:de.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),_e=>_e.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await en(()=>he.updateThread(e,{status:"done"})),C(x("thread.concluded",{channel:ke}))}catch(_e){throw A(_e),_e}}})}),o.jsxs("div",{ref:ne,className:a==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[o.jsxs("div",{ref:re,children:[_&&o.jsx(ef,{messages:[{..._,thread:null}],members:f,bots:m,me:p,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:T,onReact:cn,onFold:$n,onJump:An,onError:A}),o.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:o.jsx("span",{children:V.length?x("channel.replies",{count:((Xt=_==null?void 0:_.thread)==null?void 0:Xt.replies)??V.length}):x("thread.noReplies")})}),q&&o.jsx("div",{ref:P,className:"jv-history-more","aria-live":"polite",children:$?x("chat.loadingOlder"):""}),o.jsx(ef,{messages:V,members:f,bots:m,me:p,divider:L??Number.MAX_SAFE_INTEGER,before:_==null?void 0:_.createdAt,onSettled:de=>X(_e=>_e.map(Re=>Re.id===de.id?de:Re)),onPreview:T,...Za})]}),fe&&V.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button","aria-label":x("thread.toLatest"),onClick:()=>{var de;return(de=ne.current)==null?void 0:de.scrollTo({top:ne.current.scrollHeight,behavior:"smooth"})},children:[Ke>0&&o.jsx("span",{children:x("chat.unseen",{count:Ke})}),o.jsx(Ue,{name:"chevron-down"})]})})]}),o.jsx(rk,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:x("thread.reply"),scrollRef:ne,disabled:!M,initialText:V.length===0&&_&&_.senderId!==p&&Ye&&!Ye.deleted?`@${Ye.name} `:void 0,mention:{bots:m,inside:hi(f).filter(de=>de.id!==p&&!!(u!=null&&u.memberIds.includes(de.id))),outside:hi(f).filter(de=>!(u!=null&&u.memberIds.includes(de.id))),onInvite:N,participants:At},onSend:ge,onError:A,onNotice:C}),o.jsx(BS,{container:ne,drafts:d,chatId:e,members:f,onNotice:C,source:de=>de===(_==null?void 0:_.id)?_:V.find(_e=>_e.id===de)})]})}function oj(e,a){const i=e.lastReplyAt??e.createdAt;return a==="created"?[0,-e.createdAt,e.id]:a==="status"?[e.status==="done"?1:0,-i,e.id]:[0,-i,e.id]}function zP(e,a){return e[0]-a[0]||e[1]-a[1]||(e[2]<a[2]?-1:e[2]>a[2]?1:0)}const nf=e=>(a,i)=>zP(oj(a,e),oj(i,e)),Op={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},DP=(e,a)=>[...e].sort(nf(a));function hk(e){const a=`jarvy-thread-sort-${e}`,[i,r]=w.useState(()=>{const s=localStorage.getItem(a);return s==="created"||s==="status"?s:"updated"});return[i,s=>{r(s),localStorage.setItem(a,s)}]}function mk({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(Op[e])}),title:x("threadSort.title"),children:[o.jsx(n7,{}),o.jsx(vr,{})]}),o.jsx(xr,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(Op).map(i=>o.jsx(fa,{value:i,children:x(Op[i])},i))})]})}const sj={epoch:0,unlisted:0,counts:{}},LP=(e,a,i)=>({epoch:e.epoch,unlisted:e.unlisted+(i?1:0),counts:{...e.counts,[a]:(e.counts[a]??0)+1}}),BP=e=>({...e,epoch:e.epoch+1}),IP=(e,a)=>`${e.epoch}:${a?e.counts[a]??0:0}`,PP=e=>`${e.epoch}:${e.unlisted}`,HP=e=>na(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function qP({channel:e,members:a,bots:i,changes:r,onOpen:s,onClose:u,onError:d}){const[f,m]=w.useState(null),[p,y]=w.useState("open"),[g,j]=hk("channel");w.useEffect(()=>{let k=!0;return he.channelThreads(e.id).then(N=>{k&&m(N.threads)}).catch(N=>{k&&d(N)}),()=>{k=!1}},[e.id,IP(r,e.id)]);const b=DP((f??[]).filter(k=>p==="all"||k.status===p),g),S=k=>(f??[]).filter(N=>N.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(mk,{value:g,onChange:j}),o.jsx(gt,{icon:"close",label:x("threads.closeList"),onClick:u})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.byStatus"),children:[["open",x("threads.openCount",{count:S("open")})],["done",x("threads.doneCount",{count:S("done")})],["all",x("threads.all")]].map(([k,N])=>o.jsx("button",{type:"button",role:"tab","aria-selected":p===k,onClick:()=>y(k),children:N},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")}):b.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("threads.none")}):b.map(k=>{const N=a.find(T=>{var A;return T.id===((A=k.root)==null?void 0:A.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:N,bots:i,size:16}),o.jsx("span",{children:Cs(k.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[x("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${HP(k.lastReplyAt)}`:"",k.following?` · ${x("threads.following")}`:""]})]},k.id)})})]})}class UP{constructor(){Jt(this,"listeners",new Set)}emit(a){for(const i of this.listeners)i(a)}on(a){return this.listeners.add(a),()=>{this.listeners.delete(a)}}}const zp=(e,a)=>a==="all"||(a==="unread"?e.unread>0:e.status===a),_d=(e,a)=>[...new Map(e.map(i=>[i.id,i])).values()].sort(nf(a));function FP(e,a,i){const[r,s]=w.useState({items:[],next:null,ready:!1}),[u,d]=w.useState(!1),[f,m]=w.useState(!1),p=w.useRef({filter:a,sort:i,generation:0}),y=w.useRef(r),g=w.useRef(new Map);y.current=r;const j=C=>{y.current=C,s(C)};async function b(C){const M=p.current.generation;d(!0),m(!1);try{const O=await he.followedThreads({filter:a,sort:i,cursor:C});if(M!==p.current.generation)return;const _=y.current,I=O.next?O.threads.at(-1):void 0,V=[...g.current.values()].filter(X=>zp(X,a)&&(!I||nf(i)(X,I)<=0));j({items:_d([...C?_.items:[],...O.threads,...V],i),next:O.next,ready:!0})}catch{M===p.current.generation&&m(!0)}finally{M===p.current.generation&&d(!1)}}w.useEffect(()=>{p.current={filter:a,sort:i,generation:p.current.generation+1},j({items:[],next:null,ready:!1}),b()},[a,i]);const S=w.useRef(new Map);function k(C){if(S.current.has(C)){S.current.set(C,!0);return}S.current.set(C,!1);const M=p.current.generation;he.followedThread(C).then(O=>N(O,M),O=>{O instanceof qi&&O.status===404&&M===p.current.generation&&j({...y.current,items:y.current.items.filter(_=>_.id!==C)})}).finally(()=>{const O=S.current.get(C);S.current.delete(C),O&&k(C)})}function N(C,M){if(M!==p.current.generation)return;T(C);const O=y.current,_=O.items.some(X=>X.id===C.id),I=O.items.at(-1),V=C.following&&zp(C,p.current.filter)&&(O.next===null||!I||nf(p.current.sort)(C,I)<0);(_||O.ready&&V)&&j({...O,items:_d([...O.items,C],p.current.sort)})}w.useEffect(()=>e.on(C=>{if(C.kind==="changed")k(C.id);else if(C.kind==="reconnected")A();else{const M=C.chat,O=y.current,_=O.items.find(V=>V.id===M.id);if(!_){M.following&&k(M.id);return}const I={..._,title:M.title,status:M.status??_.status,unread:M.unread,mentions:M.mentions,alerts:M.alerts,following:M.following};T(I),j({...O,items:_d([...O.items,I],p.current.sort)})}}),[e]);function T(C){C.following?g.current.delete(C.id):y.current.items.some(M=>M.id===C.id)&&g.current.set(C.id,C)}async function A(){const C=p.current.generation,M=await he.followedThreads({filter:p.current.filter,sort:p.current.sort}).catch(()=>null);if(!M||C!==p.current.generation)return;const O=y.current,_=O.items.length>M.threads.length;j({items:_d([...O.items,...M.threads],p.current.sort),next:_?O.next:M.next,ready:!0})}return{items:r.items.filter(C=>zp(C,a)),find:C=>r.items.find(M=>M.id===C),ready:r.ready,more:r.next!==null,loading:u,failed:f,loadMore:()=>{r.next&&!u&&b(r.next)},retry:()=>void b(r.next??void 0)}}const VP=e=>na(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}),$P={all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"};function GP({events:e,summary:a,chats:i,members:r,bots:s,onNav:u,renderThread:d}){const[f,m]=w.useState(null),[p,y]=w.useState("all"),[g,j]=hk("followed"),b=FP(e,p,g),S=f?b.find(f.id)??f:void 0,k=w.useRef(null),N=w.useRef(null);w.useEffect(()=>{if(!k.current||!N.current||!b.more||b.loading||b.failed)return;const A=new IntersectionObserver(C=>{var M;(M=C[0])!=null&&M.isIntersecting&&b.loadMore()},{root:k.current,rootMargin:"0px 0px 400px 0px"});return A.observe(N.current),()=>A.disconnect()},[b.more,b.loading,b.failed,b.items]);const T=[["all",x("threads.all")],["unread",a!=null&&a.unreadThreads?x("threads.unreadCount",{count:a.unreadThreads}):x("threads.unread")],["open",x("threads.openCount",{count:(a==null?void 0:a.open)??0})],["done",x("threads.doneCount",{count:(a==null?void 0:a.done)??0})]];return o.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":x("sidebar.followed"),"data-open":S?"":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(gt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:u}),o.jsx("strong",{className:"jv-channel-title",children:x("sidebar.followed")})]}),o.jsx(mk,{value:g,onChange:j})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.filter"),children:T.map(([A,C])=>o.jsx("button",{type:"button",role:"tab","aria-selected":p===A,onClick:()=>y(A),children:C},A))}),o.jsxs("div",{className:"jv-followed-items",ref:k,children:[b.ready&&b.items.length===0&&!b.more?o.jsx("p",{className:"jv-picker-empty",children:x($P[p])}):b.items.map(A=>{const C=r.find(O=>{var _;return O.id===((_=A.root)==null?void 0:_.senderId)}),M=i.find(O=>O.id===A.parentId);return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":A.unread>0||void 0,"aria-current":A.id===(f==null?void 0:f.id)||void 0,onClick:()=>m(A),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:A.title}),A.alerts>0?o.jsx("span",{className:"jv-badge",children:A.alerts}):A.unread>0&&o.jsx("span",{className:"jv-count",children:A.unread}),o.jsx("span",{className:"jv-thread-status","data-done":A.status==="done"||void 0,children:x(A.status==="done"?"channel.threadDone":"threads.open")})]}),A.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(Cr,{member:C,bots:s,size:16}),o.jsx("span",{children:Cs(A.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(M==null?void 0:M.title)??""," · ",x("channel.replies",{count:A.replies}),A.lastReplyAt?` · ${VP(A.lastReplyAt)}`:"",A.following?"":` · ${x("threads.notFollowing")}`]})]},A.id)}),o.jsx("div",{ref:N,className:"jv-followed-end",children:b.failed?o.jsxs(o.Fragment,{children:[o.jsx("p",{role:"alert",children:x("threads.loadFailed")}),o.jsx(Te,{variant:"outline",size:"sm",onClick:b.retry,children:x("common.retry")})]}):(b.loading||!b.ready)&&o.jsx("p",{role:"status",children:x("threads.loading")})})]})]}),S?d(S,()=>m(null)):o.jsx("div",{className:"jv-followed-empty",children:o.jsx("p",{children:x("threads.pick")})})]})}function YP({pane:e,followedView:a,threadEvents:i,followed:r,chats:s,sections:u,members:d,bots:f,statuses:m,meId:p,drafts:y,changes:g,live:j,memory:b,paneChannel:S,activeBot:k,botDirects:N,find:T,onPane:A,onNav:C,onBackToChannel:M,onAddMembers:O,onOpenBot:_,onPin:I,onMute:V,onDeleteChannel:X,onChannelSaved:L,onThreadChanged:H,onInvite:q,onPreview:Z,onNotice:$,onError:F,paneWidth:K,onResize:U}){var ne,re;const P=(e==null?void 0:e.kind)==="thread"?e:null,ie=(P==null?void 0:P.mode)==="full",z=()=>A(null);return o.jsxs(o.Fragment,{children:[a&&!ie&&o.jsx(GP,{events:i,summary:r,chats:s,members:d,bots:f,onNav:C,renderThread:(R,B)=>o.jsx(lj,{threadId:R.id,mode:"embed",channel:s.find(W=>W.id===R.parentId),drafts:y,members:d,bots:f,me:p,live:j,memory:b,onNav:C,onChanged:H,onClose:B,onToggleMode:()=>M({id:R.id,parentId:R.parentId},!0),onInvite:W=>q(R.parentId,W),onPreview:Z,onError:F,onNotice:$},R.id)}),P&&o.jsx(lj,{threadId:P.id,mode:P.mode,showSummary:P.summary,focus:P.focus,onSearch:T.search,channel:s.find(R=>R.id===P.parentId),drafts:y,members:d,bots:f,me:p,live:j,memory:b,onNav:C,onChanged:H,onClose:()=>ie?M(P,!1):z(),onToggleMode:()=>ie?M(P,!0):A({...P,mode:"full"}),onInvite:R=>q(P.parentId,R),onPreview:Z,onError:F,onNotice:$},`${P.id}:${((ne=P.focus)==null?void 0:ne.id)??""}:${((re=P.focus)==null?void 0:re.passage)??""}`),(e==null?void 0:e.kind)==="search"&&o.jsx(AP,{chat:e.chat,chats:s,members:d,focusKey:T.focusKey,onOpenMessage:T.openMessage,onClose:z,onError:F}),(e==null?void 0:e.kind)==="threads"&&S&&o.jsx(qP,{channel:S,members:d,bots:f,changes:g,onOpen:R=>A({kind:"thread",id:R,parentId:S.id,mode:"pane"}),onClose:z,onError:F}),(e==null?void 0:e.kind)==="info"&&S&&o.jsx(TP,{channel:S,page:e.page,sections:u,members:hi(d),bots:f,statuses:m,me:p,onPage:R=>A({kind:"info",page:R}),onPin:()=>I(S),onMute:()=>V(S),onAdd:()=>O(S),onBot:_,onDelete:()=>X(S),onChanged:L,onClose:z,onError:F}),(e==null?void 0:e.kind)==="botdms"&&k&&!S&&o.jsx(CP,{bot:k,chats:N,members:d,bots:f,me:p,live:j,onClose:z,onPreview:Z,onError:F}),e&&!ie&&o.jsx("div",{className:"jv-resize",style:{right:K-4},onPointerDown:U,role:"separator","aria-orientation":"vertical","aria-label":x("app.resizePane")})]})}const cj="@goodfish/jarvy",pk="0.12.1",KP={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},XP="Apache-2.0",k0=KP.url.replace(/^git\+/,"").replace(/\.git$/,""),uj=`${k0}/blob/v${pk}`,QP=[{label:"about.source",detail:k0.replace(/^https:\/\//,""),href:k0},{label:"about.package",detail:cj,href:`https://www.npmjs.com/package/${cj}`},{label:"about.license",detail:XP,href:`${uj}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${uj}/THIRD_PARTY_NOTICE.md`}];function ZP(){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:pk})})]}),QP.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(qp,{"aria-hidden":"true"})]},e.label))]})]})}function JP(){const[e,a]=w.useState(document.documentElement.classList.contains("dark")),i=s=>{Wd(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(ma,{"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:jj.map(s=>r(s,Ip(s,"name"),sl()===s,()=>kj(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 WP=`<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>
|
|
808
|
+
`,eH=`<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>
|
|
809
|
+
`,tH=`<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>
|
|
810
|
+
`,nH=`<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>
|
|
811
|
+
`,aH=`<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>
|
|
812
|
+
`,iH=`<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>
|
|
813
|
+
`,rH=`<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>
|
|
814
|
+
`,lH=`<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>
|
|
815
|
+
`,oH=`<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>
|
|
816
|
+
`,sH=`<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>
|
|
817
|
+
`,cH=`<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>
|
|
818
|
+
`,uH=`<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>
|
|
819
|
+
`,dH=`<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>
|
|
820
|
+
`,fH=`<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>
|
|
821
|
+
`,hH=`<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>
|
|
822
|
+
`,mH=`<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>
|
|
823
|
+
`,pH=`<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>
|
|
824
|
+
`,gH=`<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>
|
|
825
|
+
`,vH=`<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>
|
|
826
|
+
`,yH=`<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>
|
|
827
|
+
`,xH=`<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>
|
|
828
|
+
`,bH=`<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>
|
|
829
|
+
`,jH=`<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>
|
|
830
|
+
`,wH=`<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>
|
|
831
|
+
`,SH=`<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>
|
|
832
|
+
`,kH=`<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>
|
|
833
|
+
`,CH=`<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>
|
|
834
|
+
`,NH=`<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>
|
|
835
|
+
`,EH=`<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>
|
|
836
|
+
`,TH=Object.assign({"./antgroup.svg":WP,"./anthropic.svg":eH,"./azure.svg":tH,"./baseten.svg":nH,"./bedrock.svg":aH,"./cerebras.svg":iH,"./cloudflare.svg":rH,"./deepseek.svg":lH,"./fireworks.svg":oH,"./githubcopilot.svg":sH,"./google.svg":cH,"./groq.svg":uH,"./huggingface.svg":dH,"./kimi.svg":fH,"./meta.svg":hH,"./minimax.svg":mH,"./mistral.svg":pH,"./moonshot.svg":gH,"./nvidia.svg":vH,"./openai.svg":yH,"./opencode.svg":xH,"./openrouter.svg":bH,"./qwen.svg":jH,"./together.svg":wH,"./vercel.svg":SH,"./vertexai.svg":kH,"./xai.svg":CH,"./xiaomimimo.svg":NH,"./zai.svg":EH}),dj={"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"},AH=e=>e&&dj[e]?TH[`./${dj[e]}.svg`]:void 0;function Hg({name:e,provider:a}){var r;const i=AH(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 gk(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 vk=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],yk=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",MH={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function _H({onBack:e,onSelect:a}){const[i,r]=w.useState([]),[s,u]=w.useState(""),[d,f]=w.useState(""),[m,p]=w.useState(!0),[y,g]=w.useState(0);w.useEffect(()=>{let S=!0;return p(!0),f(""),he.modelProviders().then(k=>{S&&r(k.providers)}).catch(k=>{S&&f(Wt(k,"picker.loadFailed"))}).finally(()=>{S&&p(!1)}),()=>{S=!1}},[y]);const j=[MH,...i].filter(S=>`${S.name} ${S.id}`.toLowerCase().includes(s.toLowerCase())),b=S=>yk({authType:S.authType,custom:S.id==="custom"});return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx(Te,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":x("picker.back"),children:o.jsx(af,{})}),o.jsx("h2",{children:x("models.add")})]}),o.jsxs("label",{className:"jv-search",children:[o.jsx(gs,{}),o.jsx("input",{autoFocus:!0,"aria-label":x("picker.search"),placeholder:x("picker.searchPlaceholder"),value:s,onChange:S=>u(S.target.value)})]}),vk.filter(S=>j.some(k=>b(k)===S.id)).map(({id:S,label:k})=>o.jsxs("section",{className:"jv-section","aria-label":x(k),children:[o.jsx("h3",{className:"jv-section-title",children:x(k)}),o.jsx("div",{className:"jv-list",children:j.filter(N=>b(N)===S).map(N=>o.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>a(N),children:[o.jsx(Hg,{name:N.id==="custom"?"+":N.name,provider:N.id}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:N.name}),N.id!=="custom"&&N.authType!=="oauth"&&o.jsx("span",{children:x("picker.keyHint",{count:N.modelCount})})]}),o.jsx(Ii,{className:"jv-row-chevron"})]},`${N.id}:${N.authType}`))})]},S)),m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("picker.loading")}),d&&o.jsxs("div",{className:"jv-empty",role:"alert",children:[o.jsx("strong",{children:d}),o.jsx(Te,{variant:"outline",onClick:()=>g(S=>S+1),children:x("picker.retry")})]}),!m&&!d&&!j.length&&o.jsx("div",{className:"jv-empty",children:o.jsx("strong",{children:x("picker.noMatch")})})]})}const RH=B0("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 OH({className:e,variant:a,...i}){return o.jsx("span",{"data-slot":"badge",className:gn(RH({variant:a}),e),...i})}function xk({className:e,...a}){return o.jsx(PT,{"data-slot":"label",className:gn("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}function zH({connection:e,providerName:a,authType:i,ensureConnection:r,onChanged:s}){var q,Z;const[u,d]=w.useState({phase:"idle"}),[f,m]=w.useState(""),{busy:p,error:y,setError:g,run:j}=Tn(),[b,S]=w.useState(0),k=w.useRef(void 0),N=e==null?void 0:e.id,T=w.useRef(s);T.current=s;const A=w.useRef(u.phase);A.current=u.phase,w.useEffect(()=>{if(!N)return;const $=N;let F=!0,K;async function U(){var P;try{let ie=await he.authStatus($);if(!F)return;if(k.current&&((P=ie.prompt)==null?void 0:P.type)==="select"){const ne=k.current;if(k.current=void 0,ie=await he.authInput($,ie.prompt.id,ne),!F)return}const z=A.current==="running"&&ie.phase!=="running";A.current=ie.phase,d(ie),z&&await T.current(),ie.phase==="running"&&F&&(K=setTimeout(()=>void U(),750))}catch(ie){F&&g(Wt(ie,"auth.statusFailed"))}}return U(),()=>{F=!1,clearTimeout(K)}},[N,u.phase,b]),w.useEffect(()=>m(""),[(q=u.prompt)==null?void 0:q.id]);async function C($){await j("act",async()=>{const F=await $();d(F),F.phase!=="running"&&await s()},"common.failed")}function M($){k.current=$,C(async()=>{const F=N??await r();return he.authStart(F)})}const O=a==="openai-codex"&&i==="oauth",_=a==="openai"&&i==="oauth",I=u.phase==="running",V=u.prompt,X=u.event,L=(X==null?void 0:X.type)==="auth_url"?X.url:(X==null?void 0:X.type)==="device_code"?X.verificationUri:null,H=$=>{V&&N&&C(()=>he.authInput(N,V.id,$))};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(OH,{variant:"outline","data-state":I?"running":e!=null&&e.configured?"connected":"disconnected",children:x(I?"auth.running":e!=null&&e.configured?i==="oauth"?"status.signedIn":"status.configured":i==="oauth"?"status.signedOut":"status.notConfigured")})]}),I?o.jsxs("div",{className:"jv-auth-flow",children:[L&&o.jsx(Te,{asChild:!0,variant:"outline",children:o.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:L,target:"_blank",rel:"noopener noreferrer",children:x("auth.openPage")})}),(X==null?void 0:X.type)==="device_code"&&o.jsx("p",{children:x("auth.code",{code:X.userCode})}),(V==null?void 0:V.type)==="select"&&o.jsx("div",{className:"flex flex-wrap gap-2",children:(Z=V.options)==null?void 0:Z.map($=>o.jsx(Te,{type:"button",variant:"outline",disabled:p,onClick:()=>H($.id),children:O&&$.id==="browser"?x("auth.browser"):O&&$.id==="device_code"?x("auth.deviceCode"):$.label},$.id))}),V&&V.type!=="select"&&o.jsxs("div",{className:"jv-auth-input",children:[o.jsx(xk,{htmlFor:`oauth-input-${N??a}`,children:V.type==="manual_code"?x(_?"auth.redirectFull":"auth.redirectOrCode"):V.message}),V.type==="manual_code"&&o.jsx("p",{className:"jv-auth-note",children:x("auth.manualNote")}),o.jsx(xt,{id:`oauth-input-${N??a}`,type:V.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:p,onChange:$=>m($.target.value),onKeyDown:$=>{$.key==="Enter"&&($.preventDefault(),H(f))}}),o.jsx(Te,{type:"button",variant:"outline",disabled:p||!f.trim(),onClick:()=>H(f),children:x("common.continue")})]}),!V&&o.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:x("auth.waiting")}),(X==null?void 0:X.type)==="info"&&o.jsx("p",{className:"text-sm",children:X.message}),o.jsx(Te,{type:"button",variant:"ghost",disabled:p,onClick:()=>void C(()=>he.authCancel(N)),children:x("auth.cancel")})]}):o.jsxs("div",{className:"flex flex-wrap gap-2",children:[O?o.jsxs(o.Fragment,{children:[o.jsx(Te,{type:"button",variant:"outline",disabled:p,onClick:()=>M("browser"),children:x("auth.browser")}),o.jsx(Te,{type:"button",variant:"outline",disabled:p,onClick:()=>M("device_code"),children:x("auth.deviceCode")})]}):o.jsx(Te,{type:"button",variant:"outline",disabled:p,onClick:()=>M(),children:x(i==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&o.jsx(Te,{type:"button",variant:"outline",disabled:p,onClick:()=>void C(async()=>(await he.authLogout(N),{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(Te,{type:"button",variant:"link",disabled:p,onClick:()=>{g(""),S($=>$+1)},children:x("auth.refresh")})]})}async function DH(e,a,i){try{return await he.autoconfigModel({modelId:e.id,api:e.api||a,...i?{choice:i}:{}})}catch(r){return{status:"error",message:Wt(r,"auto.failed")}}}function LH(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 bk=e=>`${e.provider} / ${e.modelId}`;function fj({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:bk(i)}),i.official&&o.jsx("em",{children:x("auto.official")}),o.jsx("small",{children:i.api})]},`${i.provider}/${i.modelId}`))})}function BH({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(Te,{type:"button",variant:"outline",size:"sm",disabled:!a.trim()||s,onClick:()=>i(),children:[o.jsx(nw,{}),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:A0("auto.matched",{source:o.jsx("strong",{className:"jv-mono",children:bk(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(fj,{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(fj,{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 Dp=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],jk=[["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"]],wk=e=>e==="xhigh"||e==="max";function Sk(e,a){const i=e[a];return i===null||i===void 0&&wk(a)?"unsupported":i===void 0?"default":"custom"}function IH(e){return e.reasoning?jk.filter(([a])=>Sk(e.thinkingLevelMap,a)!=="unsupported").map(([,a])=>x(a)):[x("thinking.level.off")]}function PH({model:e,api:a,onChange:i}){const r=e.thinkingLevelMap,s=(f,m,p)=>{const y={...r};m==="default"?delete y[f]:m==="unsupported"?y[f]=null:y[f]=p??(typeof r[f]=="string"?r[f]:f),i({thinkingLevelMap:y})},u=a==="openai-completions",d=e.thinkingFormat&&!Dp.includes(e.thinkingFormat)?[...Dp,e.thinkingFormat]:Dp;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(fa,{value:"default",children:x("thinking.protocolDefault")}),d.map(f=>o.jsx(fa,{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:jk.map(([f,m])=>{const p=Sk(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:p,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:[!wk(f)&&o.jsx(fa,{value:"default",children:x("thinking.supportedDefault")}),o.jsx(fa,{value:"unsupported",children:x("thinking.unsupported")}),o.jsx(fa,{value:"custom",children:x("thinking.supportedCustom")})]})]}),p==="custom"?o.jsx(xt,{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:IH(e).join(" · ")})})]})}const Lp=[{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"}],HH=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function C0({value:e,onChange:a,allowDefault:i=!1}){const r=Lp.some(s=>s.id===e)||!e?Lp:[...Lp,{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(fa,{value:"default",children:x("card.defaultProtocol")}),r.map(s=>o.jsx(fa,{value:s.id,children:s.label},s.id))]})]})}const qH=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),hj={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function UH({value:e,onChange:a}){const i=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[r,s]=w.useState(()=>i(e)),[u,d]=w.useState(""),f=w.useRef(null);return w.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(r||"{}"))===JSON.stringify(e))return}catch{}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(ps,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,r.split(`
|
|
837
|
+
`).length)),placeholder:"{}",value:r,onChange:m=>{s(m.target.value);try{const p=JSON.parse(m.target.value||"{}");if(!p||typeof p!="object"||Array.isArray(p))throw new Error;a(p),d(""),m.currentTarget.setCustomValidity("")}catch{d(x("card.jsonObject")),m.currentTarget.setCustomValidity(x("card.jsonObject"))}}}),u&&o.jsx("small",{role:"alert",children:u})]})}function FH({draft:e,protocol:a,onChange:i,onRemove:r,onAutoconfig:s}){const{model:u}=e,[d,f]=w.useState(!u.id),[m,p]=w.useState(!1),[y,g]=w.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),j=k=>i({...e,model:{...u,...k}}),b=(k,N)=>o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:k}),N]}),S=(k,N,T)=>{const A=y.map((M,O)=>O===k?{...M,[N]:T}:M);g(A);const C={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==A[k].name&&(C[y[k].name]=null);for(const M of A)M.name&&(M.value||!M.saved)&&(C[M.name]=M.value);j({headerUpdates:C})};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:qH(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&&hj[e.auto.status]&&o.jsx("span",{className:"jv-chip jv-chip-warn",children:x(hj[e.auto.status])})]}),o.jsx(cl,{className:"jv-expand-icon"})]}),o.jsx(Te,{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(Ud,{})})]}),d&&o.jsxs("div",{className:"jv-model-fields",children:[o.jsxs("div",{className:"jv-field-grid",children:[b(x("card.modelId"),o.jsx(xt,{className:"jv-mono",required:!0,value:u.id,onChange:k=>j({id:k.target.value}),placeholder:"model-id"})),b(x("card.modelName"),o.jsx(xt,{value:u.name,onChange:k=>j({name:k.target.value}),placeholder:x("card.optional")}))]}),o.jsx(BH,{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=>j({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=>j({input:k.target.checked?["text","image"]:["text"]})}),x("card.imageInput")]})]})]}),u.reasoning&&o.jsx(PH,{model:u,api:u.api||a,onChange:j}),o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h4",{children:x("card.specs")}),o.jsx(Te,{type:"button",variant:"link",size:"sm",onClick:()=>p(!m),children:x(m?"card.hidePrices":"card.editPrices")})]}),o.jsxs("div",{className:"jv-field-grid",children:[b(x("card.context"),o.jsx(xt,{type:"number",min:1,value:u.contextWindow??"",placeholder:x("card.notProvided"),onChange:k=>j({contextWindow:k.target.value?Number(k.target.value):null})})),b(x("card.maxOutput"),o.jsx(xt,{type:"number",min:1,value:u.maxTokens??"",placeholder:x("card.notProvided"),onChange:k=>j({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,N])=>{var T,A;return o.jsxs("div",{children:[o.jsx(xk,{children:x(N)}),m?o.jsx(xt,{type:"number",step:"any",min:0,value:((T=u.cost)==null?void 0:T[k])??"",onChange:C=>j({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(C.target.value)}})}):o.jsx("span",{children:((A=u.cost)==null?void 0:A[k])??x("card.notProvided")})]},k)})})]}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[x("card.advanced"),o.jsx(cl,{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(C0,{allowDefault:!0,value:u.api??"",onChange:k=>j({api:k,baseUrl:void 0})})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.headers")}),y.map((k,N)=>o.jsxs("div",{className:"jv-header-row",children:[o.jsx(xt,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:k.saved,value:k.name,onChange:T=>S(N,"name",T.target.value)}),o.jsx(xt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?x("card.headerSaved"):"value",value:k.value,onChange:T=>S(N,"value",T.target.value)}),o.jsx(Te,{type:"button",size:"icon-sm",variant:"ghost","aria-label":x("card.removeHeader"),onClick:()=>{g(y.filter((T,A)=>A!==N)),k.name&&j({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:o.jsx(Ud,{})})]},N)),o.jsxs(Te,{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(UH,{value:u.compat,onChange:k=>j({compat:k})})]})]})]})]})}let VH=0;const Rd=(e,a,i=!1)=>({key:`draft-${++VH}`,model:e,selected:a,...i?{originalId:e.id}:{}});function $H({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",p=(e==null?void 0:e.authType)??a.authType,[y,g]=w.useState(e?m?e.providerName:e.displayName:m?"":i),[j,b]=w.useState((e==null?void 0:e.baseUrl)??""),[S,k]=w.useState((e==null?void 0:e.api)??a.api),[N,T]=w.useState(""),[A,C]=w.useState(()=>((e==null?void 0:e.models)??[]).map(oe=>Rd(oe,!0,!0))),[M,O]=w.useState([]),[_,I]=w.useState(""),{busy:V,error:X,setError:L,run:H}=Tn(),[q,Z]=w.useState(!1),[$,F]=w.useState(r?x("editor.saved"):""),[K,U]=w.useState(null),P=w.useRef(e==null?void 0:e.id);function ie(oe){C(Ee=>{const Xe=new Set(Ee.map(Be=>Be.model.id));return[...Ee,...oe.filter(Be=>!Xe.has(Be.id)).map(Be=>Rd(Be,!1))]})}w.useEffect(()=>{if(m)return;let oe=!0;return Z(!0),(e?he.modelCatalog(e.id):he.providerModels(a.id)).then(Xe=>{oe&&ie(Xe.models)}).catch(Xe=>{oe&&L(Wt(Xe,"editor.fetchFailed"))}).finally(()=>{oe&&Z(!1)}),()=>{oe=!1}},[e==null?void 0:e.id,a==null?void 0:a.id,m]);async function z(){Z(!0),L(""),F("");try{const oe=await he.discoverModels({connectionId:P.current,baseUrl:j,api:S,...N.trim()?{apiKey:N}:{}});ie(oe.models),F(oe.models.length?x("editor.fetched",{count:oe.models.length}):x("editor.noneReturned"))}catch(oe){L(Wt(oe,"editor.fetchFailed"))}finally{Z(!1)}}async function ne(oe,Ee){const Xe=A.filter(at=>oe.includes(at.key)&&at.model.id.trim());if(!Xe.length)return;L(""),F(""),C(at=>at.map(Qe=>Xe.some(We=>We.key===Qe.key)?{...Qe,auto:{status:"pending"}}:Qe));const Be={matched:0,choose:0,none:0,error:0};for(const at of Xe){const Qe=await DH(at.model,S,Ee);Be[Qe.status]++,C(We=>We.map(Pt=>Pt.key===at.key?LH(Pt,Qe):Pt))}Xe.length>1&&F(x("editor.autoSummary",{parts:[x("editor.autoMatched",{count:Be.matched}),Be.choose&&x("editor.autoChoose",{count:Be.choose}),Be.none&&x("editor.autoNone",{count:Be.none}),Be.error&&x("editor.autoFailed",{count:Be.error})].filter(Boolean).join(x("common.listSeparator"))}))}async function re(){if(!P.current){const oe=await he.createModelConnection({providerName:a.id,displayName:y,kind:"builtin",authType:p,baseUrl:j,api:S});P.current=oe.id}return await d(P.current),P.current}async function R(oe){oe.preventDefault(),F(""),await H("save",async()=>{let Ee;P.current?(Ee=await he.updateModelConnection(P.current,{displayName:y,...m?{providerName:y}:{},baseUrl:j,api:S}),m&&N.trim()&&await he.saveModelCredential(Ee.id,N)):(Ee=await he.createModelConnection({providerName:m?y:a.id,displayName:y,kind:m?"custom":"builtin",authType:p,baseUrl:j,api:S,...m&&N.trim()?{apiKey:N}:{}}),P.current=Ee.id);for(const Xe of A)Xe.selected&&await he.saveConnectionModel(Ee.id,Xe.model,Xe.originalId);for(const Xe of new Set([...M,...A.filter(Be=>Be.originalId&&!Be.selected).map(Be=>Be.originalId)]))await he.deleteConnectionModel(Ee.id,Xe);T(""),await u(Ee.id),F(x("editor.saved"))},"editor.saveFailed")}async function B(){F(""),await H("reset",async()=>U(await he.modelResetPlan(e.id)),"editor.resetFailed")}async function W(){F(""),await H("reset",async()=>{const Ee=await he.resetModelConnection(e.id);U(null),O([]),b(Ee.baseUrl),k(Ee.api),C(Ee.models.map(Xe=>Rd(Xe,!0,!0))),ie((await he.modelCatalog(Ee.id)).models),await f()},"editor.resetFailed")&&F(x("editor.resetDone"))}async function fe(){!e||!confirm(x("editor.confirmDelete",{name:e.displayName}))||await H("delete",async()=>{await he.deleteModelConnection(e.id),await f(),s()},"editor.deleteFailed")}const me=A.filter(oe=>`${oe.model.id} ${oe.model.name}`.toLowerCase().includes(_.toLowerCase())),pe=A.filter(oe=>oe.selected).length,Ce=m?(e==null?void 0:e.displayName)??x("group.custom"):(e==null?void 0:e.displayName)??a.name,Ae=e?gk(e):null,xe=A.some(oe=>{var Ee;return((Ee=oe.auto)==null?void 0:Ee.status)==="pending"});return o.jsxs("form",{className:"jv-editor",onChange:()=>F(""),onSubmit:oe=>void R(oe),children:[o.jsxs("header",{className:"jv-editor-header",children:[o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:V,onClick:s,"aria-label":x("editor.back"),children:o.jsx(af,{})}),o.jsx(Hg,{name:Ce,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:Ce}),o.jsx("span",{children:m?"OpenAI / Anthropic compatible":x(p==="oauth"?"group.subscription":"group.apiKey")})]}),Ae&&o.jsx("span",{className:"jv-status","data-ok":Ae.ok||void 0,children:Ae.label}),e&&o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:V,onClick:()=>void fe(),"aria-label":x("editor.delete"),children:o.jsx(Ud,{})})]}),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(xt,{className:"jv-mono",required:!0,maxLength:80,"aria-label":x("editor.providerName"),placeholder:"my-provider",value:y,onChange:oe=>g(oe.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("editor.protocol")}),o.jsx(C0,{value:S,onChange:k})]})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.url")}),o.jsx(xt,{required:!0,type:"url","aria-label":x("editor.url"),value:j,placeholder:"https://api.example.com/v1",onChange:oe=>b(oe.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.key")}),o.jsx(xt,{type:"password",autoComplete:"new-password","aria-label":x("editor.key"),placeholder:x(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:N,onChange:oe=>T(oe.target.value)})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.name")}),o.jsx(xt,{required:!0,maxLength:100,"aria-label":x("editor.name"),value:y,onChange:oe=>g(oe.target.value)})]}),o.jsx(zH,{connection:e,providerName:(e==null?void 0:e.providerName)??a.id,authType:p,ensureConnection:re,onChanged:f}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[o.jsx(cl,{}),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(xt,{className:"jv-mono",value:j,placeholder:x("editor.defaultUrl"),onChange:oe=>b(oe.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:"API Protocol"}),o.jsx(C0,{value:S,onChange:k})]})]})]})]})})]}),o.jsxs("section",{className:"jv-section","aria-label":x("editor.models"),children:[o.jsxs("div",{className:"jv-section-head",children:[o.jsxs("h3",{className:"jv-section-title",children:[x("settings.models")," ",o.jsx("span",{children:x("editor.selected",{selected:pe,total:A.length})})]}),o.jsxs("div",{className:"jv-section-actions",children:[m&&o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",disabled:V||q||!j.trim()||!(N.trim()||e!=null&&e.configured),onClick:()=>void z(),children:[o.jsx(M0,{}),x(q?"editor.fetching":"editor.fetch")]}),pe>0&&o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",disabled:V||xe,onClick:()=>void ne(A.filter(oe=>oe.selected).map(oe=>oe.key)),children:[o.jsx(nw,{}),x("editor.autoSelected")]}),o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>C([...A,Rd(HH(),!0)]),children:[o.jsx(br,{}),x("editor.addManually")]}),e&&!m&&o.jsxs(Te,{type:"button",variant:"ghost",size:"sm",disabled:V||q||!!K,onClick:()=>void B(),children:[o.jsx(G4,{}),x("editor.reset")]})]})]}),K&&o.jsx(GH,{plan:K,busy:V,onCancel:()=>U(null),onConfirm:()=>void W()}),A.length>6&&o.jsxs("div",{className:"jv-models-filter",children:[o.jsxs("label",{className:"jv-search",children:[o.jsx(gs,{}),o.jsx("input",{"aria-label":x("editor.filter"),placeholder:x("editor.filterPlaceholder"),value:_,onChange:oe=>I(oe.target.value)})]}),o.jsx(Te,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(oe=>oe.map(Ee=>me.includes(Ee)?{...Ee,selected:!0}:Ee)),children:x("editor.selectVisible")})]}),q&&!m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("editor.loadingCatalog")}),o.jsx("div",{className:"jv-model-cards",children:me.map(oe=>o.jsx(FH,{draft:oe,protocol:S,onAutoconfig:Ee=>void ne([oe.key],Ee),onChange:Ee=>C(Xe=>Xe.map(Be=>Be.key===oe.key?Ee:Be)),onRemove:()=>{oe.originalId&&O(Ee=>[...Ee,oe.originalId]),C(Ee=>Ee.filter(Xe=>Xe.key!==oe.key))}},oe.key))}),!q&&!A.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:X?o.jsx("p",{role:"alert",children:X}):$?o.jsx("p",{role:"status",children:$}):null}),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:V||q||xe,children:x(V?"editor.saving":"editor.save")})]})]})}function GH({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(Te,{type:"button",variant:"ghost",size:"sm",onClick:i,children:x("common.cancel")}),o.jsx(Te,{type:"button",className:"jv-primary",size:"sm",disabled:a,onClick:r,children:x("editor.resetConfirm")})]})]})}function YH({connections:e,onChanged:a}){const[i,r]=w.useState("list"),[s,u]=w.useState(),[d,f]=w.useState(),[m,p]=w.useState(0),y=()=>{r("list"),f(void 0),u(void 0),p(0)},g=b=>yk({authType:b.authType,custom:b.kind==="custom"});let j=(s==null?void 0:s.name)??"";if(s){let b=2;for(;e.some(S=>S.displayName===j);)j=`${s.name} ${b++}`}return i==="choose"?o.jsx(_H,{onBack:y,onSelect:b=>{u(b),f(void 0),r("editor")}}):i==="editor"?o.jsx($H,{connection:e.find(b=>b.id===d),preset:s,defaultName:j,saved:m>0,onBack:y,onChanged:a,onConnected:async b=>{await a(),f(b),u(void 0)},onSaved:async b=>{await a(),f(b),u(void 0),p(S=>S+1)}},m):o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx("h2",{children:x("settings.models")}),o.jsxs(Te,{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")})}),vk.filter(b=>e.some(S=>g(S)===b.id)).map(({id:b,label:S})=>o.jsxs("section",{className:"jv-section","aria-label":x(S),children:[o.jsx("h3",{className:"jv-section-title",children:x(S)}),o.jsx("div",{className:"jv-list",children:e.filter(k=>g(k)===b).map(k=>{const N=gk(k);return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(k.id),u(void 0),r("editor")},children:[o.jsx(Hg,{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":N.ok||void 0,children:N.label}),o.jsx(Ii,{className:"jv-row-chevron"})]},k.id)})})]},b))]})}function KH({info:e,onSaved:a}){const[i,r]=w.useState(String(e.ports.from)),[s,u]=w.useState(String(e.ports.to)),[d,f]=w.useState(null),[m,p]=w.useState(!1),y=i!==String(e.ports.from)||s!==String(e.ports.to),g=async j=>{j.preventDefault(),p(!0),f(null);try{const b=await he.setPortRange({from:Number(i),to:Number(s)});a(b),r(String(b.ports.from)),u(String(b.ports.to)),f({error:!1,text:x("ports.rangeSaved")})}catch(b){f({error:!0,text:Wt(b)})}finally{p(!1)}};return o.jsxs("section",{className:"jv-section","aria-labelledby":"network-ports",children:[o.jsx("h3",{id:"network-ports",className:"jv-section-title",children:x("ports.range")}),o.jsxs("form",{className:"jv-panel jv-conn-ports",onSubmit:j=>void g(j),children:[o.jsxs("div",{className:"jv-conn-range",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("ports.rangeFrom")}),o.jsx(xt,{type:"number",inputMode:"numeric",min:1024,max:65535,required:!0,value:i,onChange:j=>{r(j.target.value),f(null)}})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("ports.rangeTo")}),o.jsx(xt,{type:"number",inputMode:"numeric",min:1024,max:65535,required:!0,value:s,onChange:j=>{u(j.target.value),f(null)}})]})]}),o.jsx("small",{className:"jv-hint",children:x("ports.rangeHint")}),o.jsxs("div",{className:"jv-form-footer",children:[d?o.jsx("p",{className:d.error?"jv-note-error":"jv-hint",role:d.error?"alert":"status",children:d.text}):o.jsx("span",{}),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:m||!y,children:x("common.save")})]})]})]})}function XH(){var j;const[e,a]=w.useState(null),[i,r]=w.useState(null),[s,u]=w.useState(!1),[d,f]=w.useState(!1),[m,p]=w.useState(!1);w.useEffect(()=>{he.connection().then(a).catch(()=>p(!0))},[]);const y=b=>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")}),b]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:x("common.failed")}),e&&o.jsx(KH,{info:e,onSaved:a})]});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:A0("connection.localOnlyHint",{flag:o.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const g=async()=>{f(!0),p(!1);try{a(await he.setConnection(!e.allowHttp))}catch{p(!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(b=>o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("code",{children:b})}),o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(i===b?"ui.copied":"connection.copy"),onClick:()=>void ks(b).then(S=>r(S?b:null)),children:i===b?o.jsx(ma,{}):o.jsx(Ic,{})})]},b))}),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(Te,{asChild:!0,variant:"outline",size:"sm",children:o.jsxs("a",{href:"/api/connection/root.crt",children:[o.jsx(M0,{}),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:(j=e.fingerprint)==null?void 0:j.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(cl,{"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 kf({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(xt,{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(Te,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(a?"secrets.hideValue":"secrets.showValue"),onClick:()=>r(!a),children:a?o.jsx(_0,{}):o.jsx(R0,{})})]}),d&&e.length>0&&e.length<8&&o.jsx("span",{className:"jv-field-hint jv-secret-short",children:x("secrets.shortValue")})]})}function QH({secret:e,bots:a,onChanged:i}){return o.jsx(kk,{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 he.grantSecret(e.id,d,s);i(u)}})}function kk({grantedIds:e,onceIds:a,bots:i,onGrant:r}){const[s,u]=w.useState(!1),[d,f]=w.useState(""),[m,p]=w.useState([]),{busy:y,error:g,run:j}=Tn(),b=e.map(O=>i.find(_=>_.id===O)).filter(O=>!!O),S=a??new Set,k=i.filter(O=>!e.includes(O.id)),N=k.filter(O=>O.name.toLowerCase().includes(d.trim().toLowerCase())),T=()=>{u(!1),f(""),p([])},A=O=>p(_=>_.includes(O)?_.filter(I=>I!==O):[..._,O]),C=O=>j("grant",O),M=()=>C(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"),b.length>0&&o.jsxs("span",{children:[" · ",b.length]})]}),!s&&o.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:y,onClick:()=>u(!0),children:[o.jsx(br,{}),x("secrets.addBots")]})]}),b.length>0?o.jsx("ul",{className:"jv-secret-granted",children:b.map(O=>o.jsxs("li",{children:[o.jsx(fo,{color:O.color,mood:O.mood,size:20,crown:O.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:O.name}),S.has(O.id)&&o.jsx("span",{className:"jv-secret-once",children:x("secrets.onceTag")}),o.jsx(Te,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:y,"aria-label":x("secrets.revoke",{name:O.name}),onClick:()=>void C(()=>r([O.id],!1)),children:o.jsx(vs,{})})]},O.id))}):!s&&o.jsx("p",{className:"jv-hint",children:x("secrets.noGrants")}),s&&o.jsxs("div",{className:"jv-secret-picker",children:[o.jsx(xt,{type:"search",autoFocus:!0,value:d,placeholder:x("secrets.searchBots"),"aria-label":x("secrets.searchBots"),onChange:O=>f(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),N.length===1&&A(N[0].id))}}),o.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":x("secrets.addBots"),children:[N.map(O=>o.jsxs("button",{type:"button",role:"option","aria-selected":m.includes(O.id),className:"jv-secret-option",onClick:()=>A(O.id),children:[o.jsx(fo,{color:O.color,mood:O.mood,size:24,crown:O.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:O.name}),m.includes(O.id)&&o.jsx(ma,{"aria-hidden":"true"})]},O.id)),N.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(Te,{type:"button",variant:"ghost",size:"sm",onClick:T,children:x("common.cancel")}),o.jsx(Te,{type:"button",className:"jv-primary",size:"sm",disabled:y||!m.length,onClick:()=>void M(),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 Ck({id:e,open:a,onToggle:i,text:r,meta:s,busy:u,error:d,remove:f,confirming:m,onAskRemove:p,onCancel:y,onConfirm:g,children:j}){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(cl,{className:"jv-row-chevron","aria-hidden":"true"})]}),a&&o.jsxs("div",{id:e,className:"jv-list-row jv-static-row jv-secret-details",children:[j,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(Te,{type:"button",variant:"ghost",size:"sm",onClick:y,children:x("common.cancel")}),o.jsx(Te,{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(Te,{type:"button",variant:"ghost",size:"sm",disabled:u,onClick:p,children:f})}),d&&o.jsx("p",{className:"jv-note-error",role:"alert",children:d})]})]})}const mj=e=>na(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function ZH({secret:e,bots:a,open:i,onToggle:r,onChanged:s,onDeleted:u}){const[d,f]=w.useState(null),[m,p]=w.useState(e.description),[y,g]=w.useState(""),[j,b]=w.useState(!1),[S,k]=w.useState(!1),{busy:N,error:T,run:A}=Tn();w.useEffect(()=>{i&&he.secretUses(e.id).then(I=>f(I.uses)).catch(()=>f([]))},[i,e.id,e.uses]);const C=I=>{I.preventDefault(),A("save",async()=>{s(await he.updateSecret(e.id,{description:m.trim(),...y?{value:y}:{}})),g(""),b(!1)})},M=new Set(e.grants.map(I=>I.botId)),O=I=>{var V;return((V=a.find(X=>X.id===I))==null?void 0:V.name)??x("secrets.deletedBot")},_=m.trim()!==e.description||!!y;return o.jsxs(Ck,{id:`secret-${e.id}`,open:i,onToggle:r,busy:N,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:M.size?x("secrets.grantCount",{count:M.size}):x("secrets.notGranted")}):o.jsx("span",{className:"jv-status","data-busy":"",children:x("secrets.unreadable")}),remove:x("secrets.delete"),confirming:S?{title:x("secrets.deleteTitle",{name:e.name}),body:x("secrets.deleteBody"),confirm:x("secrets.deleteConfirm")}:null,onAskRemove:()=>k(!0),onCancel:()=>k(!1),onConfirm:()=>void A("delete",async()=>{await he.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:mj(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(QH,{secret:e,bots:a,onChanged:s}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:C,"aria-label":x("secrets.edit"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(xt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:m,onChange:I=>p(I.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.newValue")}),o.jsx(kf,{value:y,visible:j,onChange:g,onVisible:b,placeholder:x("secrets.newValuePlaceholder")})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Te,{type:"submit",variant:"outline",size:"sm",disabled:N||!_,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(I=>o.jsxs("li",{children:[o.jsxs("span",{children:[O(I.botId)," · ",mj(I.at)," · ",x(I.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),I.detail&&o.jsx("code",{children:I.detail})]},I.id))}):o.jsx("p",{className:"jv-hint",children:x("secrets.noUses")})]})}const pj=(e,a)=>e.name.localeCompare(a.name);function JH(){const[e,a]=w.useState(null),[i,r]=w.useState(""),[s,u]=w.useState([]),[d,f]=w.useState(!1),[m,p]=w.useState(null),[y,g]=w.useState(null);w.useEffect(()=>{he.secrets().then(b=>{a([...b.secrets].sort(pj)),r(b.keyLocation)}).catch(b=>g(Wt(b))),he.bots().then(b=>u(b.bots)).catch(()=>u([]))},[]);const j=b=>a(S=>S&&S.map(k=>k.id===b.id?b: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(Te,{className:"jv-primary",onClick:()=>f(!0),children:[o.jsx(br,{}),x("secrets.add")]})]}),d&&o.jsx(WH,{onCancel:()=>f(!1),onSaved:b=>{f(!1),a(S=>[...S??[],b].sort(pj)),p(b.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(b=>o.jsx(ZH,{secret:b,bots:s,open:m===b.id,onToggle:()=>p(m===b.id?null:b.id),onChanged:j,onDeleted:()=>{p(null),a(S=>S&&S.filter(k=>k.id!==b.id))}},b.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 WH({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[s,u]=w.useState(""),[d,f]=w.useState(""),[m,p]=w.useState(!1),{busy:y,error:g,run:j}=Tn(),b=async S=>{S.preventDefault(),await j("add",async()=>a(await he.createSecret({name:i.trim(),description:s.trim(),value:d})))};return o.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:S=>void b(S),"aria-label":x("secrets.add"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.name")}),o.jsx(xt,{className:"jv-mono",required:!0,autoFocus:!0,maxLength:64,placeholder:"GITHUB_TOKEN",value:i,onChange:S=>r(S.target.value.toUpperCase())})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(xt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:s,onChange:S=>u(S.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.value")}),o.jsx(kf,{value:d,visible:m,onChange:f,onVisible:p,required:!0})]}),g&&o.jsx("p",{className:"jv-note-error",role:"alert",children:g}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Te,{type:"button",variant:"ghost",onClick:e,children:x("common.cancel")}),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:y||!i.trim()||!d,children:x("common.save")})]})]})}function eq({machine:e,bots:a,open:i,onToggle:r,onChanged:s,onDeleted:u}){const[d,f]=w.useState(e.name),[m,p]=w.useState(e.directory),[y,g]=w.useState(e.description),[j,b]=w.useState(null),[S,k]=w.useState(null),{busy:N,doing:T,error:A,setError:C,run:M}=Tn(),[O,_]=w.useState(""),[I,V]=w.useState(!1),[X,L]=w.useState(null),H=`${e.user}@${e.host}${e.port===22?"":`:${e.port}`}`,q=K=>{K.preventDefault(),M("save",async()=>{const U=await he.updateMachine(e.id,{name:d.trim(),directory:m.trim(),description:y.trim()});s(U),f(U.name),p(U.directory),g(U.description)})},Z=K=>void M("delete",async()=>{try{await he.deleteMachine(e.id,K),u()}catch(U){throw!K&&U instanceof qi&&U.code!=="machine_missing"&&k("force"),U}}),$=d.trim()!==e.name||m.trim()!==e.directory||y.trim()!==e.description,F=S==="force";return o.jsxs(Ck,{id:`machine-${e.id}`,open:i,onToggle:r,busy:N,error:A,text:o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:e.name}),o.jsx("span",{className:"jv-mono",children:H})]}),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:S&&{title:x(F?"machines.forceTitle":"machines.deleteTitle",{name:e.name}),body:F?x("machines.forceBody",{comment:`jarvy-${e.id}`}):x("machines.deleteBody"),confirm:x(F?"machines.forceConfirm":"machines.deleteConfirm")},onAskRemove:()=>k("delete"),onCancel:()=>{k(null),C("")},onConfirm:()=>Z(F),children:[o.jsxs("form",{className:"jv-secret-edit jv-machine-edit",onSubmit:q,"aria-label":e.name,children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(xt,{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(xt,{className:"jv-mono",required:!0,maxLength:1e3,spellCheck:!1,value:m,onChange:K=>p(K.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-description",children:[o.jsx("span",{children:x("machines.description")}),o.jsx(ps,{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(Te,{type:"submit",variant:"outline",size:"sm",disabled:N||!$||!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:(j!=null&&j.changed?j.hostKeys.fingerprints:e.fingerprints).map(K=>o.jsx("code",{"data-new":(j==null?void 0:j.changed)||void 0,children:K},K))}),j!=null&&j.changed?o.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:N,onClick:()=>void M("trust",async()=>{s(await he.trustMachine(e.id,j.hostKeys.fingerprints)),b(null)}),children:x("machines.trust")}):o.jsx("button",{type:"button",className:"ui-button jv-machine-copy",disabled:N,onClick:()=>void M("check",async()=>{const K=await he.checkMachine(e.id);b(K),s(K.machine)}),children:x(T==="check"?"machines.checking":"machines.check")})]}),j&&o.jsx("p",{className:"jv-hint","data-warn":j.changed||void 0,children:x(j.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(zg,{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(),M("password",async()=>{s(await he.setMachinePassword(e.id,O)),_(""),L(x("machines.passwordUpdated"))})},children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.newPassword")}),o.jsx(kf,{value:O,visible:I,onChange:_,onVisible:V,required:!0,warnShort:!1})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Te,{type:"button",variant:"outline",size:"sm",disabled:N,onClick:()=>void M("key",async()=>{const K=await he.checkMachine(e.id);b(K),s(K.machine),L(x(K.machine.login==="key"?"machines.usingKey":"machines.stillPassword"))}),children:x("machines.useKey")}),o.jsx(Te,{type:"submit",variant:"outline",size:"sm",disabled:N||!O,children:x("machines.updatePassword")})]})]})]}),X&&o.jsx("p",{className:"jv-hint",children:X})]})]}),o.jsx("div",{className:"jv-machine-part",children:o.jsx(kk,{grantedIds:e.botIds,bots:a,onGrant:async(K,U)=>{let P=e;for(const ie of K)P=await he.grantMachine(e.id,ie,U);s(P)}})})]})}function tq({adding:e=!1}){const[a,i]=w.useState(null),[r,s]=w.useState([]),[u,d]=w.useState(e),[f,m]=w.useState(null),[p,y]=w.useState(null);w.useEffect(()=>{he.machines().then(j=>i(j.machines)).catch(j=>y(Wt(j))),he.bots().then(j=>s(j.bots)).catch(()=>s([]))},[]);const g=j=>i(b=>b&&b.map(S=>S.id===j.id?j:S));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(Te,{className:"jv-primary",onClick:()=>d(!0),children:[o.jsx(br,{}),x("machines.add")]})]}),u&&o.jsx(nq,{onCancel:()=>d(!1),onSaved:j=>{d(!1),i(b=>[...b??[],j]),m(j.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(j=>o.jsx(eq,{machine:j,bots:r,open:f===j.id,onToggle:()=>m(f===j.id?null:j.id),onChanged:g,onDeleted:()=>{m(null),i(b=>b&&b.filter(S=>S.id!==j.id))}},j.id))})}),p&&o.jsx("p",{className:"jv-note-error",role:"alert",children:p})]})}function nq({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[s,u]=w.useState("22"),[d,f]=w.useState(""),[m,p]=w.useState(""),[y,g]=w.useState(""),[j,b]=w.useState(""),[S,k]=w.useState(null),[N,T]=w.useState(""),[A,C]=w.useState(!1),[M,O]=w.useState("password"),{busy:_,error:I,setError:V,run:X}=Tn(),L=_S(!!S&&M==="key"),H={host:i.trim(),port:Number(s)||22,user:d.trim()},q=F=>X("add",async()=>{try{await F()}catch(K){throw K instanceof qi&&K.code==="ssh_key_expired"&&L.renew(),K}}),Z=F=>{F.preventDefault(),q(S?async()=>a(await he.addMachine({...H,name:m.trim(),directory:y.trim(),description:j.trim(),hostKeys:S,...M==="key"?{keyId:L.key.keyId}:{password:N}})):async()=>k(await he.scanMachine(H)))},$=H.user&&H.host?`${H.user}@${H.host}`:"";return o.jsxs("form",{className:"jv-panel jv-machine-form",autoComplete:"off",onSubmit:Z,"aria-label":x("machines.add"),"aria-busy":_||void 0,children:[S?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:[H.user,"@",H.host,H.port===22?"":`:${H.port}`]})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:S.fingerprints.map(F=>o.jsx("code",{children:F},F))}),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(F=>o.jsx("button",{type:"button",role:"radio","aria-checked":M===F,disabled:_,onClick:()=>{O(F),V("")},children:x(F==="password"?"machines.byPassword":"machines.byKey")},F))}),M==="password"?o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.password")}),o.jsx(kf,{value:N,visible:A,onChange:T,onVisible:C,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")}),L.key?o.jsx(zg,{publicKey:L.key.publicKey}):L.error?o.jsx("p",{className:"jv-note-error",role:"alert",children:L.error}):o.jsx("p",{className:"jv-hint",children:"…"}),o.jsx("span",{className:"jv-field-hint",children:x("machines.keyHint",{user:H.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(xt,{required:!0,autoFocus:!0,maxLength:253,spellCheck:!1,placeholder:x("machines.hostPlaceholder"),value:i,onChange:F=>r(F.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-port",children:[o.jsx("span",{children:x("machines.port")}),o.jsx(xt,{required:!0,inputMode:"numeric",maxLength:5,value:s,onChange:F=>u(F.target.value.replace(/\D/g,""))})]})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.user")}),o.jsx(xt,{required:!0,maxLength:64,spellCheck:!1,autoCapitalize:"off",value:d,onChange:F=>f(F.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(xt,{maxLength:40,placeholder:$,value:m,onChange:F=>p(F.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-wide",children:[o.jsx("span",{children:x("machines.directory")}),o.jsx(xt,{className:"jv-mono",maxLength:1e3,spellCheck:!1,placeholder:x("machines.directoryPlaceholder"),value:y,onChange:F=>g(F.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-wide",children:[o.jsx("span",{children:x("machines.description")}),o.jsx(ps,{maxLength:2e3,rows:3,placeholder:x("machines.descriptionPlaceholder"),value:j,onChange:F=>b(F.target.value)})]})]}),I&&o.jsx("p",{className:"jv-note-error",role:"alert",children:I}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Te,{type:"button",variant:"ghost",disabled:_,onClick:()=>{S?(k(null),T(""),V("")):e()},children:x(S?"machines.back":"common.cancel")}),o.jsx(Te,{type:"submit",className:"jv-primary",disabled:_||!H.host||!H.user||!!S&&(M==="key"?!L.key:!N),children:x(S?M==="key"?_?"machines.verifying":"machines.verify":_?"machines.connecting":"machines.connect":_?"machines.scanning":"machines.next")})]})]})}const aq=[{id:"general",label:"settings.general",icon:Y7},{id:"models",label:"settings.models",icon:d7},{id:"machines",label:"settings.machines",icon:X4},{id:"secrets",label:"settings.secrets",icon:g4},{id:"network",label:"settings.network",icon:w7},{id:"about",label:"settings.about",icon:O0}];function iq({connections:e,onChanged:a,onClose:i,initialTab:r="general"}){const[s,u]=w.useState(r==="addMachine"?"machines":r),d=w.useRef(null);return w.useEffect(()=>{var f;(f=d.current)==null||f.scrollIntoView({block:"nearest",inline:"nearest"})},[s]),o.jsx(uS,{open:!0,onOpenChange:f=>{f||i()},children:o.jsxs(dS,{className:"jv-settings-shell","aria-describedby":void 0,children:[o.jsxs("nav",{className:"jv-settings-nav","aria-label":x("settings.sections"),children:[o.jsx(wf,{className:"jv-settings-title",children:x("settings.title")}),o.jsx("div",{className:"jv-settings-tabs",children:aq.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(JP,{}):s==="models"?o.jsx(YH,{connections:e,onChanged:a}):s==="machines"?o.jsx(tq,{adding:r==="addMachine"}):s==="secrets"?o.jsx(JH,{}):s==="network"?o.jsx(XH,{}):o.jsx(ZP,{})})]})})}const gj="Jarvy";let vj=null,Li=null,Ql=null;function rq(){return document.querySelector('link[rel="icon"][type="image/png"]')}function lq(e){if(!(Li!=null&&Li.complete)||!Li.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(Li,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 yj(e){document.title=e>0?`(${e>99?"99+":e}) ${gj}`:gj;const a=rq();if(!a)return;if(vj??(vj=a.href),Ql??(Ql=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){a.href=vj,Ql&&!Ql.isConnected&&document.head.prepend(Ql);return}const i=lq(e);i&&(a.href=i,Ql==null||Ql.remove())}function oq(e){w.useEffect(()=>{Li||(Li=new Image,Li.src="/favicon.svg"),Li.complete?yj(e):Li.onload=()=>yj(e)},[e])}const Od=50;function sq({chatId:e,ready:a,scroller:i,me:r,memory:s,onError:u}){const[d,f]=w.useState([]),[m,p]=w.useState(!1),[y,g]=w.useState(!1),[j,b]=w.useState(!1),S=w.useRef(d),k=w.useRef(e),N=w.useRef(0),T=w.useRef(!1),A=w.useRef(!1),C=w.useRef(0);S.current=d,k.current=e,A.current=y;const M=w.useRef(null),O=w.useRef(!1),_=w.useRef(void 0),I=w.useRef(!0),V=w.useRef(!1),X=w.useRef(null),[L,H]=w.useState(!1),q=w.useRef(0),Z=w.useRef({bottom:!0}),$=w.useRef(null),[F]=w.useState(()=>new fk);w.useEffect(()=>{if(f([]),g(!1),V.current=!1,I.current=!0,C.current=0,Z.current={bottom:!0},$.current=null,!a||!e)return;let R=!0;const B=++N.current;H(!1),q.current=0;const W=()=>{var me;R=!1,F.release(),V.current&&((me=S.current[0])==null?void 0:me.chatId)===e&&s.keep(e,{messages:S.current,hasOlder:A.current,place:Z.current,seen:q.current})},fe=s.take(e);return fe?(O.current=!0,$.current=fe.place,q.current=fe.seen,f(fe.messages),g(fe.hasOlder),p(!1),W):(p(!0),he.latestMessages(e,Od).then(me=>{!R||B!==N.current||(O.current=!0,f(me.messages),g(me.hasOlder),p(!1))}).catch(me=>{R&&(p(!1),u(me))}),W)},[e,a]);function K(R,B){var me;if(R.chatId!==k.current)return;if(!B){f(pe=>Xc(pe,R));return}const W=S.current,fe=Math.max(((me=W.at(-1))==null?void 0:me.chatId)===R.chatId?W.at(-1).sequence:0,C.current);if(Ig(R,fe)&&!W.some(pe=>pe.id===R.id)){U(R.chatId).catch(u);return}C.current=Math.max(C.current,R.sequence),f(pe=>Sf(pe,R))}async function U(R){const B=S.current[0],W=++N.current;if(!B||B.chatId!==R){const pe=await he.latestMessages(R,Od);k.current===R&&W===N.current&&(O.current=!0,f(pe.messages),g(pe.hasOlder),p(!1));return}const fe=B.sequence-1,me=await he.messages(R,fe);k.current!==R||W!==N.current||(f(pe=>uk(pe.filter(Ce=>Ce.chatId===R),me.messages,fe)),p(!1))}async function P(){const R=S.current[0],B=i.current;if(!(!R||!A.current||T.current)){T.current=!0,b(!0);try{const W=await he.olderMessages(R.chatId,R.sequence,Od);if(k.current!==R.chatId)return;M.current=B?B.scrollHeight-B.scrollTop:null,f(fe=>{var me;return((me=fe[0])==null?void 0:me.id)===R.id?[...W.messages,...fe]:fe}),g(W.hasOlder)}catch(W){u(W)}finally{T.current=!1,b(!1)}}}w.useEffect(()=>{const R=i.current;if(!R)return;let B=0;const W=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(()=>{V.current&&R.clientHeight&&!F.on&&(Z.current=dk(R,160))})},fe=new ResizeObserver(()=>{W(),!(!V.current||!I.current)&&(R.scrollHeight-R.scrollTop-R.clientHeight<8||R.scrollTo({top:R.scrollHeight,behavior:"instant"}))}),me=()=>{fe.disconnect(),fe.observe(R);for(const Ae of R.children)fe.observe(Ae)};me();const pe=new MutationObserver(me);pe.observe(R,{childList:!0});const Ce=()=>{var Ae;if(!V.current){I.current=!0,H(!1);return}F.on||(I.current=R.scrollHeight-R.scrollTop-R.clientHeight<160,H(!I.current),I.current&&(q.current=((Ae=S.current.at(-1))==null?void 0:Ae.sequence)??0),W())};return Ce(),R.addEventListener("scroll",Ce,{passive:!0}),()=>{fe.disconnect(),pe.disconnect(),R.removeEventListener("scroll",Ce),cancelAnimationFrame(B)}},[i.current,e]),w.useLayoutEffect(()=>{const R=i.current,B=d.at(-1);if(R){if(M.current!==null)R.scrollTo({top:R.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if($.current&&d.length&&Pg(R,$.current))Z.current=$.current,F.start(R,$.current),$.current=null,O.current=!1,V.current=!0,I.current=!1,H(!0);else if(O.current&&d.length){$.current=null;const W=()=>R.scrollTo({top:R.scrollHeight,behavior:"instant"});W(),requestAnimationFrame(W),O.current=!1,V.current=!0,I.current=!0}else B&&B.id!==_.current&&(I.current||B.senderId===r)&&(F.release(),R.scrollTo({top:R.scrollHeight,behavior:"smooth"}));_.current=B==null?void 0:B.id,I.current&&(q.current=(B==null?void 0:B.sequence)??0)}},[d]),w.useEffect(()=>{const R=i.current,B=X.current;if(!R||!B||!y||!V.current)return;const W=new IntersectionObserver(fe=>{var me;(me=fe[0])!=null&&me.isIntersecting&&V.current&&P()},{root:R,rootMargin:"400px 0px 0px 0px"});return W.observe(B),()=>W.disconnect()},[y,d,e,m]);async function ie(R,B){if(F.release(),S.current.some(Ce=>Ce.id===R)){z(R,B);return}const fe=k.current,me=await he.message(R);if(me.chatId!==fe)return me.chatId;const pe=await he.olderMessages(me.chatId,me.sequence+1,Od);k.current===me.chatId&&(O.current=!0,C.current=0,f([...pe.messages,me]),g(pe.hasOlder),requestAnimationFrame(()=>z(R,B)))}function z(R,B){var fe;F.release();const W=(fe=i.current)==null?void 0:fe.querySelector(`[data-message="${R}"]`);W&&b0(W,B)}const ne=L?d.filter(R=>R.sequence>q.current&&R.senderId!==r).length:0;return{messages:d,setMessages:f,loading:m,hasOlder:y,loadingOlder:j,refresh:U,heard:K,top:X,away:L,unseen:ne,toLatest:()=>{F.release();const R=i.current;R==null||R.scrollTo({top:R.scrollHeight,behavior:"smooth"})},toMessage:ie,cancel:()=>{N.current++}}}function cq({ready:e,selected:a,messages:i,chats:r,chatList:s,setChats:u,onError:d}){const f=r.find(m=>m.id===a);w.useEffect(()=>{const m=a,p=i.at(-1);if(!e||!m||!p||p.chatId!==m)return;const y=()=>{const g=s.current.find(j=>j.id===m);document.visibilityState!=="visible"||((g==null?void 0:g.readSequence)??0)>=p.sequence&&!(g!=null&&g.hint)&&!(g!=null&&g.alerts)||(u(j=>j.map(b=>b.id===m?{...b,readSequence:Math.max(b.readSequence,p.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:b)),he.markRead(m,p.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 uq({onLogin:e}){const[a,i]=w.useState(""),[r,s]=w.useState(""),[u,d]=w.useState(!1),[f,m]=w.useState(!1),[p,y]=w.useState(null),[g,j]=w.useState(document.documentElement.classList.contains("dark"));async function b(S){if(S.preventDefault(),!f){m(!0),y(null);try{const k=await he.login(a.trim(),r);s(""),e(k.username)}catch(k){y(k instanceof qi&&k.status===401?"login.wrong":k instanceof qi&&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:jj.map(S=>o.jsx("button",{type:"button",lang:S,"aria-pressed":sl()===S,title:Ip(S,"name"),onClick:()=>kj(S),children:Ip(S,"short")},S))}),o.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Wd(g?"light":"dark"),j(!g)},"aria-label":x(g?"login.themeLight":"login.themeDark"),children:o.jsx(Ue,{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:S=>void b(S),"aria-label":x("login.form"),"aria-busy":f,children:[o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-username",children:x("login.username")}),o.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:a,onChange:S=>i(S.target.value)})]}),o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-password",children:x("login.password")}),o.jsxs("div",{className:"jv-login-password",children:[o.jsx("input",{id:"login-password",type:u?"text":"password",autoComplete:"current-password",required:!0,disabled:f,value:r,onChange:S=>s(S.target.value)}),o.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":x(u?"login.hidePassword":"login.showPassword"),onClick:()=>d(!u),children:o.jsx(Ue,{name:u?"eye-slash":"eye"})})]})]}),p&&o.jsx("p",{className:"jv-login-error",role:"alert",children:x(p)}),o.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:x(f?"login.submitting":"login.submit")})]})]})})]})}function dq({selected:e,chats:a,transcript:i,openChat:r,setPane:s,paneRef:u,blocked:d}){const[f,m]=w.useState(null),[p,y]=w.useState(0);w.useEffect(()=>{var b;!f||e!==f.chatId||i.loading||((b=i.messages[0])==null?void 0:b.chatId)!==f.chatId||(i.toMessage(f.id,f.passage),m(null))},[f,e,i.loading,i.messages]);function g(b,S,k){var T;if(b.type==="thread"){const A=a.find(C=>C.id===b.parentId);A&&r(A),s({kind:"thread",id:b.id,parentId:b.parentId,mode:"pane",focus:{id:S,passage:k}});return}((T=u.current)==null?void 0:T.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&s(null);const N=b.id===e;r(b),N?i.toMessage(S,k):m({chatId:b.id,id:S,passage:k})}function j(b){s({kind:"search",chat:b}),y(S=>S+1)}return w.useEffect(()=>{const b=S=>{var N,T;if(d||S.defaultPrevented||!(S.ctrlKey||S.metaKey)||S.key.toLowerCase()!=="f")return;const k=a.find(A=>A.id===e);k&&(((N=u.current)==null?void 0:N.kind)==="search"&&((T=document.activeElement)!=null&&T.closest(".jv-search-pane"))||(S.preventDefault(),j(k)))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[d,a,e]),{openMessage:g,search:j,focusKey:p}}const fq=45e3,hq=25e3;function mq(e,a,i){let r,s=Date.now(),u="";const d=()=>{r==null||r.close(),s=Date.now();const y=new EventSource(u?`${e}?after=${encodeURIComponent(u)}`:e);y.addEventListener("heartbeat",()=>{s=Date.now()});for(const[g,j]of Object.entries(a))y.addEventListener(g,b=>{s=Date.now();const S=b;S.lastEventId&&(u=S.lastEventId),j(S)});y.onerror=i,r=y},f=y=>{Date.now()-s>y&&d()},m=setInterval(()=>f(fq),1e4),p=()=>{document.visibilityState==="visible"&&f(hq)};return window.addEventListener("online",d),document.addEventListener("visibilitychange",p),window.addEventListener("pageshow",p),d(),()=>{clearInterval(m),window.removeEventListener("online",d),document.removeEventListener("visibilitychange",p),window.removeEventListener("pageshow",p),r==null||r.close()}}function pq(e,a){let i=null,r=Promise.resolve();return()=>i??(i=new Promise((s,u)=>setTimeout(()=>{r=r.then(()=>{i=null;const d=e();return d.then(s,u),d.catch(()=>{})})},a)))}const gq=null;function xj(){var bi,se,be,je,Ve,et;const[e,a]=w.useState("loading"),[i,r]=w.useState(""),[s,u]=w.useState([]),[d,f]=w.useState({}),m=w.useRef(new Map),[p,y]=w.useState([]),[g,j]=w.useState([]),[b,S]=w.useState([]),[k,N]=w.useState(null),[T,A]=w.useState({}),[C,M]=w.useState(null),[O,_]=w.useState(null),[I,V]=w.useState(null),[X,L]=w.useState([]),[H,q]=w.useState(null),[Z,$]=w.useState(!1),[F,K]=w.useState(!1),[U,P]=w.useState(!1),[ie,z]=w.useState(""),[ne,re]=w.useState(!1),[R,B]=w.useState(null),[W,fe]=w.useState(!1),[me,pe]=w.useState(420),[Ce,Ae]=w.useState(sj),[xe,oe]=w.useState(null),[Ee]=w.useState(()=>new UP),[Xe]=w.useState(()=>new wP),[Be]=w.useState(()=>new OP);w.useEffect(()=>Xe.on(G=>Be.heard(G)),[Xe,Be]);const[at,Qe]=w.useState(""),We=w.useRef(null),Pt=w.useRef(null),vn=w.useRef(null),[en,cn]=w.useState(null),[$n,An]=w.useState(null),[Za,ge]=w.useState(null),ke=w.useRef(C);ke.current=C;const Ye=w.useRef(0),Ke=w.useRef(p);Ke.current=p;const ct=w.useRef(R);ct.current=R;const At=w.useMemo(()=>new TI(AI(i)),[i]);w.useEffect(()=>{const G=()=>At.save();return window.addEventListener("pagehide",G),()=>window.removeEventListener("pagehide",G)},[At]);const Xt=((bi=b.find(G=>G.kind==="user"&&G.name===i))==null?void 0:bi.id)??"",de=w.useRef(Xt);de.current=Xt;const _e=sq({chatId:C,ready:e==="ready",scroller:We,me:Xt,memory:Be,onError:St}),{messages:Re,setMessages:Ie}=_e,Fe=dq({selected:C,chats:p,transcript:_e,openChat:ga,setPane:B,paneRef:ct,blocked:!!I||!!H}),it=((se=p.find(G=>G.id===C))==null?void 0:se.botId)??O??((be=s[0])==null?void 0:be.id);async function Gt(G){const ue=(m.current.get(G)??0)+1;m.current.set(G,ue);const we=await he.botStatus(G);m.current.get(G)===ue&&f(He=>({...He,[G]:we}))}w.useEffect(()=>{e==="ready"&&it&&Gt(it).catch(St)},[e,it]);const za=((je=p.find(G=>G.id===C&&G.type==="channel"))==null?void 0:je.memberIds.filter(G=>s.some(ue=>ue.id===G)).join(","))??"";w.useEffect(()=>{if(e==="ready"&&za)for(const G of za.split(","))Gt(G).catch(St)},[e,za]);async function Gn(G){var Le,dt;const[ue,we,He,ze,$e]=await Promise.all([he.bots(),he.chats(),he.modelConnections(),he.sections(),he.members()]);r(G),u(ue.bots),y(we.chats),L(He.connections),j(ze.sections),S($e.members),oe(we.followed);const De=we.chats.find(lt=>lt.type!=="thread");M((De==null?void 0:De.id)??null),De&&A({[De.id]:De.readSequence}),_(((Le=we.chats[0])==null?void 0:Le.botId)??((dt=ue.bots[0])==null?void 0:dt.id)??null),a("ready")}w.useEffect(()=>{Wd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),he.me().then(G=>Gn(G.username)).catch(()=>a("login"))},[]),w.useEffect(()=>{if(e!=="ready")return;let G=!0;const ue=De=>{G&&St(De)},we=async()=>{const De=ke.current;G&&De&&await _e.refresh(De)},He=()=>void he.sections().then(De=>{G&&j(De.sections)}).catch(De=>{G&&St(De)}),ze=({chat:De,parent:Le,followed:dt,message:lt},an)=>{const Ct=Nt=>Nt.type!=="thread"&&Nt.memberIds.includes(de.current);for(const Nt of Le?[De,Le]:[De])Ct(Nt)&&Ht(Nt);dt&&oe(dt),De.type==="thread"&&Ee.emit({kind:"changed",id:De.id}),Ae(Nt=>LP(Nt,De.id,De.type==="dm"&&!Ct(De))),lt&&an?(_e.heard(lt,an==="message"),Xe.emit({kind:an,message:lt})):Xe.emit({kind:"chat",chat:De})},$e=mq("/api/events",{ready:De=>{JSON.parse(De.data).resumed||(Be.clear(),Ae(BP),yn().catch(ue),we().catch(ue),He(),Ee.emit({kind:"reconnected"}),he.bots().then(Le=>{if(G){u(Le.bots);for(const dt of Le.bots)Gt(dt.id).catch(lt=>{G&&St(lt)})}}).catch(Le=>{G&&St(Le)}))},sections:He,bots:()=>{he.bots().then(De=>{G&&u(De.bots)}).catch(ue),yn().catch(ue)},message:De=>ze(JSON.parse(De.data),"message"),"message.updated":De=>ze(JSON.parse(De.data),"updated"),chat:De=>ze(JSON.parse(De.data)),"chat.removed":De=>{var lt;const{chatId:Le,followed:dt}=JSON.parse(De.data);y(an=>an.filter(Ct=>Ct.id!==Le)),oe(dt),Be.removed(Le),ke.current===Le&&M(null),((lt=ct.current)==null?void 0:lt.kind)==="thread"&&ct.current.parentId===Le&&B(null),Ee.emit({kind:"reconnected"})},bot:De=>{var an;const{botId:Le,status:dt,bot:lt}=JSON.parse(De.data);m.current.set(Le,(m.current.get(Le)??0)+1),f(Ct=>({...Ct,[Le]:dt})),dt.error&&((an=Ke.current.find(Ct=>Ct.id===ke.current))==null?void 0:an.botId)===dt.botId&&Qe($L(dt)),lt&&u(Ct=>Ct.map(Nt=>Nt.id===lt.id?lt:Nt))}},()=>{he.me().catch(De=>{G&&De instanceof qi&&De.status===401&&a("login")})});return()=>{G=!1,$e(),_e.cancel(),Ye.current++}},[e]),cq({ready:e==="ready",selected:C,messages:Re,chats:p,chatList:Ke,setChats:y,onError:St}),oq(e==="ready"?p.reduce((G,ue)=>G+ue.alerts,0):0),w.useEffect(()=>{if(!at)return;const G=setTimeout(()=>Qe(""),4800);return()=>clearTimeout(G)},[at]),w.useEffect(()=>{const G=ue=>{ue.defaultPrevented||I||H||(ue.key==="Escape"&&($(!1),K(!1),P(!1)),(ue.ctrlKey||ue.metaKey)&&ue.key.toLowerCase()==="k"&&(ue.preventDefault(),P(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var we;return(we=document.querySelector("#jarvy-search"))==null?void 0:we.focus()})))};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[I,H]),w.useEffect(()=>{const G=window.matchMedia("(max-width: 620px)"),ue=()=>{G.matches||P(!1)};return G.addEventListener("change",ue),()=>G.removeEventListener("change",ue)},[]);function St(G){if(G instanceof qi&&G.status===401){a("login");return}Qe(Wt(G,"common.failed"))}const[yn]=w.useState(()=>pq(async()=>{const G=++Ye.current,ue=await he.chats();return G===Ye.current&&(y(ue.chats),oe(ue.followed)),ue.chats},100));async function go(){const[G,ue]=await Promise.all([he.modelConnections(),he.bots()]);L(G.connections),u(ue.bots)}const Xi=()=>void he.members().then(G=>S(G.members)).catch(St);function yl(G){u(ue=>ue.map(we=>we.id===G.id?G:we)),Xi()}function ga(G){var we;const ue=kI(G);ue?B({kind:"thread",id:ue,parentId:G.id,mode:"pane",summary:((we=G.hint)==null?void 0:we.kind)==="note"}):G.id!==ke.current&&B(null),fe(!1),A(He=>({...He,[G.id]:G.readSequence})),M(G.id),G.botId&&_(G.botId),P(!1),$(!1),K(!1)}const gi=G=>B((R==null?void 0:R.kind)==="info"&&R.page===G?null:{kind:"info",page:G});function Ht(G){y(ue=>ue.some(we=>we.id===G.id)?ue.map(we=>we.id===G.id?G:we):[G,...ue])}async function tn(G){if(!ne){re(!0);try{const ue=await he.createChat(G);Ht(ue),ga(ue),requestAnimationFrame(()=>{var we;return(we=document.querySelector("#jarvy-composer"))==null?void 0:we.focus()})}catch(ue){St(ue)}finally{re(!1)}}}async function on(){if(!ne){re(!0);try{const G=await he.createBot(HB(hi(b).map(we=>we.name))),ue=await he.createChat(G.id);u(we=>[...we,G]),Ht(ue),Xi(),ga(ue)}catch(G){St(G)}finally{re(!1)}}}async function vi(G){try{await he.deleteChat(G.id),await yn(),ke.current===G.id&&M(null),Qe(x("app.channelDeleted"))}catch(ue){St(ue)}}async function Ja(G,ue){try{Ht(await he.pin(G.id,ue))}catch(we){St(we)}}async function Wa(G,ue){try{Ht(await he.mute(G.id,ue))}catch(we){St(we)}}async function ei(G,ue){try{await he.deleteBot(G.id,ue);const we=new Set(p.filter(He=>He.type==="dm"&&He.botId===G.id).map(He=>He.id));y(He=>He.filter(ze=>!we.has(ze.id)).map(ze=>ze.memberIds.includes(G.id)?{...ze,memberIds:ze.memberIds.filter($e=>$e!==G.id)}:ze)),u(He=>He.filter(ze=>ze.id!==G.id)),Xi(),ke.current&&we.has(ke.current)&&M(null),I===G.id&&V(null),Qe(x("app.botDeleted",{name:G.name}))}catch(we){St(we)}}async function Da(G,ue,we,He,ze){const $e=C,De=await he.send($e,G,ue,we,!1,He,ze),Le=Ke.current.find(lt=>lt.id===$e),dt=(Le==null?void 0:Le.type)==="channel"?[...new Set(Dg(G,hi(b)).filter(lt=>!Le.memberIds.includes(lt.member.id)).map(lt=>lt.member.name))]:[];dt.length&&Qe(x("app.notInChannel",{names:dt.join(x("common.listSeparator")),count:dt.length})),_e.heard(De,!0)}function aa(G,ue){he.addMember(G,ue.id).then(we=>{Ht(we),Qe(x("app.memberAdded",{name:ue.name,channel:we.title}))}).catch(St)}async function ti(G){try{const ue=await he.openThread(G.id);B({kind:"thread",id:ue.id,parentId:G.chatId,mode:"pane"})}catch(ue){St(ue)}}function va(G,ue){const we=p.find(He=>He.id===G.parentId);we&&ga(we),B(ue?{kind:"thread",id:G.id,parentId:G.parentId,mode:"pane"}:null)}function ia(G){V(null);const ue=p.find(we=>we.id===(G.type==="thread"?G.parentId:G.id));ue&&ga(ue),G.type==="thread"&&B({kind:"thread",id:G.id,parentId:G.parentId,mode:"pane"})}async function yi(G,ue,we){try{const He=await he.react(G.id,ue,we);Ie(ze=>ze.map($e=>$e.id===He.id?{...$e,reactions:He.reactions}:$e))}catch(He){St(He)}}async function xl(G,ue){try{const we=await he.fold(G.id,ue);Ie(He=>He.map(ze=>ze.id===we.id?{...ze,folded:we.folded}:ze))}catch(we){St(we)}}function ya(G){ik(At,G,b)}const Nr=(G,ue)=>G?void _e.toMessage(G,ue).then(async we=>{we&&Fe.openMessage(await he.chat(we),G,ue)}).catch(()=>Qe(x("app.sourceGone"))):Qe(x("app.sourceGone"));function ni(G){Ee.emit({kind:"chat",chat:G})}function Er(G){G.preventDefault();const ue=He=>pe(Math.min(Math.max(340,window.innerWidth-He.clientX),Math.round(window.innerWidth*.6))),we=()=>{window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",we),document.body.style.cursor=""};window.addEventListener("pointermove",ue),window.addEventListener("pointerup",we),document.body.style.cursor="col-resize"}async function xa(){try{await At.clear(G=>he.removeAttachment(G)),await he.logout(),a("login"),$(!1),q(null),m.current.clear(),f({}),B(null),oe(null),Ae(sj),Be.clear(),r(""),M(null),y([]),u([]),L([]),Ie([])}catch(G){St(G)}}const Tr=e==="ready"&&p.some(G=>G.id===C);w.useEffect(()=>{const G=We.current;if(!G)return;let ue=0,we=G.clientHeight;const He=()=>{ue=G.scrollHeight-G.scrollTop-G.clientHeight},ze=new ResizeObserver(()=>{G.clientHeight!==we&&(we=G.clientHeight,G.scrollTo({top:G.scrollHeight-G.clientHeight-ue,behavior:"instant"}))}),$e=new MutationObserver(He);return He(),G.addEventListener("scroll",He,{passive:!0}),ze.observe(G),$e.observe(G,{childList:!0,subtree:!0,characterData:!0}),()=>{ze.disconnect(),$e.disconnect(),G.removeEventListener("scroll",He)}},[Tr]);const La=p.find(G=>G.id===C),Ba=(La==null?void 0:La.type)==="channel",Yn=kP(e==="ready"?((Ve=p.find(G=>G.id===C&&G.type==="dm"))==null?void 0:Ve.botId)??void 0:void 0,PP(Ce));if(e==="loading")return o.jsx("div",{className:"jarvy-loading",children:x("app.connecting")});if(e==="login")return o.jsx(uq,{onLogin:G=>void Gn(G).catch(St)});const Ft=p.find(G=>G.id===C),jn=s.find(G=>G.id===((Ft==null?void 0:Ft.botId)??O))??s[0],Qt=!!(jn!=null&&jn.connectionId),Vt=Ba||Qt,xn=(jn==null?void 0:jn.name)??"Jarvy",nn=jn?d[jn.id]:void 0,bl=nn!=null&&nn.error?x("activity.error"):(nn==null?void 0:nn.status)==="running"?OS(nn.activity):"",Ar=(et=[...Re].reverse().find(G=>{var ue;return((ue=G.question)==null?void 0:ue.state)==="pending"}))==null?void 0:et.id,xi=(R==null?void 0:R.kind)==="thread"?R:null,Ia=(xi==null?void 0:xi.mode)==="full",Qi=Ba?La:void 0,Mr=s.find(G=>G.id===I),_r=new Set(Object.values(d).filter(G=>G.status==="running"&&G.activity!=="asking").map(G=>G.botId)),ba=new Set(Object.values(d).filter(G=>G.activity==="asking").map(G=>G.botId));return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ui-app","data-nav":U?"":void 0,"data-pane":R&&!Ia?"":void 0,style:{"--ui-pane":`${me}px`},children:[o.jsx(NI,{username:i,chats:p,sections:g,bots:s,members:b,followed:xe,followedOpen:W&&!Ia,working:_r,asking:ba,selected:W?null:C,filter:ie,creating:ne,createMenu:F,accountMenu:Z,onFilterChange:z,onOpenFollowed:()=>{fe(!0),B(null),P(!1)},onOpenChat:ga,onOpenBot:G=>void tn(G.id),onOpenMenu:(G,ue)=>An({target:G,at:ue}),onEditSection:G=>N({kind:"section",section:G}),onCreate:G=>{if(G==="bot")return void on();N({kind:G}),K(!1)},onFind:Fe.openMessage,onOpenFound:ia,onError:St,onToggleCreate:G=>{K(G),$(!1)},onToggleAccount:G=>{$(G),K(!1)},onSettings:()=>{$(!1),q("general")},onToggleTheme:()=>{Wd(document.documentElement.classList.contains("dark")?"light":"dark"),$(!1)},onLogOut:()=>void xa()}),o.jsx(jP,{chat:Ft,inChannel:Ba,bots:s,members:b,meId:Xt,drafts:At,composeReady:Vt,botName:xn,activeBot:jn,status:nn,connections:X,activity:bl,history:_e,divider:T[(Ft==null?void 0:Ft.id)??""]??(Ft==null?void 0:Ft.readSequence)??0,activeQuestion:Ar,pane:R,onPane:B,onToggleInfo:gi,find:Fe,onNav:()=>P(!0),onBot:G=>V(G),hasBotDirects:Yn.length>0,onInvite:aa,onQuote:ya,onReply:G=>void ti(G),onReact:(G,ue,we)=>void yi(G,ue,we),onFold:(G,ue)=>void xl(G,ue),onJump:Nr,onSettled:G=>Ie(ue=>ue.map(we=>we.id===G.id?G:we)),onPreview:(G,ue)=>cn({files:G,index:ue}),onSend:Da,notice:Qe,onSaveNote:async G=>{try{Ht(await he.setNote(Ft.id,G))}catch(ue){throw St(ue),ue}},createBot:()=>void on(),creating:ne,updateBot:yl,onManageModels:()=>q("models"),error:St,chatArea:Pt,transcript:We,composeWrap:vn,hidden:Ia||W,onOpenThread:G=>B({kind:"thread",id:G,parentId:Ft.id,mode:"pane"})}),o.jsx(YP,{pane:R,followedView:W,threadEvents:Ee,followed:xe,chats:p,sections:g,members:b,bots:s,statuses:d,meId:Xt,drafts:At,changes:Ce,live:Xe,memory:Be,paneChannel:Qi,activeBot:jn,botDirects:Yn,find:Fe,onPane:B,onNav:()=>P(!0),onBackToChannel:va,onAddMembers:G=>N({kind:"members",chat:G}),onOpenBot:V,onPin:G=>void Ja(G,!G.pinned),onMute:G=>void Wa(G,!G.muted),onDeleteChannel:G=>ge({kind:"chat",chat:G}),onChannelSaved:Ht,onThreadChanged:ni,onInvite:aa,onPreview:(G,ue)=>cn({files:G,index:ue}),onNotice:Qe,onError:St,paneWidth:me,onResize:Er})]}),U&&o.jsx("div",{className:"ui-nav-scrim",onClick:()=>P(!1),role:"presentation"}),H&&o.jsx(iq,{connections:X,initialTab:H,onChanged:go,onClose:()=>q(null)}),o.jsx(mI,{dialog:k,entryMenu:$n,confirm:Za,preview:en,infoBot:Mr,bots:s,statuses:d,chats:p,sections:g,members:b,connections:X,meId:Xt,onDialog:N,onEntryMenu:An,onConfirm:ge,onPreview:cn,onInfoBot:V,onSettings:q,onChannelInfo:G=>{ga(G),B({kind:"info",page:"main"})},onOpenChatId:G=>{M(G),P(!1)},chatSaved:Ht,openChat:ga,onSectionSaved:G=>{j(ue=>ue.some(we=>we.id===G.id)?ue.map(we=>we.id===G.id?G:we):[...ue,G]),N(null)},onSectionDeleted:G=>{N(null),j(ue=>ue.filter(we=>we.id!==G)),yn().catch(St)},updateBot:yl,openAnywhere:ia,removeChannel:vi,deleteBot:ei,pinChat:Ja,muteChat:Wa}),at&&o.jsx("div",{className:"ui-toast",role:"status",children:at}),gq]})}function vq(){const e=`https://${location.host}${location.pathname}${location.search}`;return o.jsxs("div",{className:"jv-insecure",role:"status",children:[o.jsx($7,{"aria-hidden":"true"}),o.jsx("span",{children:x("connection.insecure")}),o.jsx("a",{href:e,children:x("connection.useHttps")})]})}function yq(){return Cj(),window.isSecureContext?o.jsx(xj,{}):o.jsxs("div",{className:"jv-insecure-shell",children:[o.jsx(vq,{}),o.jsx(xj,{})]})}hC.createRoot(document.getElementById("root")).render(o.jsx(w.StrictMode,{children:o.jsx(yq,{})}));
|