@goodfish/jarvy 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/server/cli.js +1543 -277
- package/dist/web/assets/index-Cl_aFSP0.js +594 -0
- package/dist/web/assets/index-CxbCVrx3.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/skills/dev-team/SKILL.md +1 -1
- package/dist/web/assets/index-BgQn9NWS.js +0 -586
- package/dist/web/assets/index-DeyQgcnD.css +0 -1
|
@@ -1,586 +0,0 @@
|
|
|
1
|
-
var Ik=Object.defineProperty;var my=e=>{throw TypeError(e)};var Hk=(e,i,a)=>i in e?Ik(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a;var rc=(e,i,a)=>Hk(e,typeof i!="symbol"?i+"":i,a),py=(e,i,a)=>i.has(e)||my("Cannot "+a);var Bn=(e,i,a)=>(py(e,i,"read from private field"),a?a.call(e):i.get(e)),gy=(e,i,a)=>i.has(e)?my("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,a),Tm=(e,i,a,l)=>(py(e,i,"write to private field"),l?l.call(e,a):i.set(e,a),a);function Pk(e,i){for(var a=0;a<i.length;a++){const l=i[a];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in e)){const u=Object.getOwnPropertyDescriptor(l,c);u&&Object.defineProperty(e,c,u.get?u:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(c){if(c.ep)return;c.ep=!0;const u=a(c);fetch(c.href,u)}})();function u0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Am={exports:{}},lc={};/**
|
|
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 vy;function Uk(){if(vy)return lc;vy=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(l,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var f in c)f!=="key"&&(u[f]=c[f])}else u=c;return c=u.ref,{$$typeof:e,type:l,key:d,ref:c!==void 0?c:null,props:u}}return lc.Fragment=i,lc.jsx=a,lc.jsxs=a,lc}var yy;function qk(){return yy||(yy=1,Am.exports=Uk()),Am.exports}var o=qk(),_m={exports:{}},Ge={};/**
|
|
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 xy;function Fk(){if(xy)return Ge;xy=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),j=Symbol.iterator;function S(G){return G===null||typeof G!="object"?null:(G=j&&G[j]||G["@@iterator"],typeof G=="function"?G:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function M(G,fe,ye){this.props=G,this.context=fe,this.refs=E,this.updater=ye||k}M.prototype.isReactComponent={},M.prototype.setState=function(G,fe){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,fe,"setState")},M.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function T(){}T.prototype=M.prototype;function _(G,fe,ye){this.props=G,this.context=fe,this.refs=E,this.updater=ye||k}var D=_.prototype=new T;D.constructor=_,C(D,M.prototype),D.isPureReactComponent=!0;var A=Array.isArray;function I(){}var U={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function O(G,fe,ye){var je=ye.ref;return{$$typeof:e,type:G,key:fe,ref:je!==void 0?je:null,props:ye}}function V(G,fe){return O(G.type,fe,G.props)}function q(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function ee(G){var fe={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(ye){return fe[ye]})}var Y=/\/+/g;function H(G,fe){return typeof G=="object"&&G!==null&&G.key!=null?ee(""+G.key):fe.toString(36)}function K(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(I,I):(G.status="pending",G.then(function(fe){G.status==="pending"&&(G.status="fulfilled",G.value=fe)},function(fe){G.status==="pending"&&(G.status="rejected",G.reason=fe)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function R(G,fe,ye,je,re){var xe=typeof G;(xe==="undefined"||xe==="boolean")&&(G=null);var oe=!1;if(G===null)oe=!0;else switch(xe){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(G.$$typeof){case e:case i:oe=!0;break;case y:return oe=G._init,R(oe(G._payload),fe,ye,je,re)}}if(oe)return re=re(G),oe=je===""?"."+H(G,0):je,A(re)?(ye="",oe!=null&&(ye=oe.replace(Y,"$&/")+"/"),R(re,fe,ye,"",function(Ne){return Ne})):re!=null&&(q(re)&&(re=V(re,ye+(re.key==null||G&&G.key===re.key?"":(""+re.key).replace(Y,"$&/")+"/")+oe)),fe.push(re)),1;oe=0;var ce=je===""?".":je+":";if(A(G))for(var me=0;me<G.length;me++)je=G[me],xe=ce+H(je,me),oe+=R(je,fe,ye,xe,re);else if(me=S(G),typeof me=="function")for(G=me.call(G),me=0;!(je=G.next()).done;)je=je.value,xe=ce+H(je,me++),oe+=R(je,fe,ye,xe,re);else if(xe==="object"){if(typeof G.then=="function")return R(K(G),fe,ye,je,re);throw fe=String(G),Error("Objects are not valid as a React child (found: "+(fe==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":fe)+"). If you meant to render a collection of children, use an array instead.")}return oe}function F(G,fe,ye){if(G==null)return G;var je=[],re=0;return R(G,je,"","",function(xe){return fe.call(ye,xe,re++)}),je}function ne(G){if(G._status===-1){var fe=G._result,ye=fe();ye.then(function(je){(G._status===0||G._status===-1)&&(G._status=1,G._result=je,ye.status===void 0&&(ye.status="fulfilled",ye.value=je))},function(je){(G._status===0||G._status===-1)&&(G._status=2,G._result=je,ye.status===void 0&&(ye.status="rejected",ye.reason=je))}),G._status===-1&&(G._status=0,G._result=ye)}if(G._status===1)return G._result.default;throw G._result}var L=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var fe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(fe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function J(G){var fe=U.T,ye={};ye.types=fe!==null?fe.types:null,U.T=ye;try{var je=G(),re=U.S;re!==null&&re(ye,je),typeof je=="object"&&je!==null&&typeof je.then=="function"&&je.then(I,L)}catch(xe){L(xe)}finally{fe!==null&&ye.types!==null&&(fe.types=ye.types),U.T=fe}}function W(G){var fe=U.T;if(fe!==null){var ye=fe.types;ye===null?fe.types=[G]:ye.indexOf(G)===-1&&ye.push(G)}else J(W.bind(null,G))}var P={map:F,forEach:function(G,fe,ye){F(G,function(){fe.apply(this,arguments)},ye)},count:function(G){var fe=0;return F(G,function(){fe++}),fe},toArray:function(G){return F(G,function(fe){return fe})||[]},only:function(G){if(!q(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return Ge.Activity=p,Ge.Children=P,Ge.Component=M,Ge.Fragment=a,Ge.Profiler=c,Ge.PureComponent=_,Ge.StrictMode=l,Ge.Suspense=m,Ge.ViewTransition=b,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(G){return U.H.useMemoCache(G)}},Ge.addTransitionType=W,Ge.cache=function(G){return function(){return G.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(G,fe,ye){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var je=C({},G.props),re=G.key;if(fe!=null)for(xe in fe.key!==void 0&&(re=""+fe.key),fe)!$.call(fe,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&fe.ref===void 0||(je[xe]=fe[xe]);var xe=arguments.length-2;if(xe===1)je.children=ye;else if(1<xe){for(var oe=Array(xe),ce=0;ce<xe;ce++)oe[ce]=arguments[ce+2];je.children=oe}return O(G.type,re,je)},Ge.createContext=function(G){return G={$$typeof:d,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:u,_context:G},G},Ge.createElement=function(G,fe,ye){var je,re={},xe=null;if(fe!=null)for(je in fe.key!==void 0&&(xe=""+fe.key),fe)$.call(fe,je)&&je!=="key"&&je!=="__self"&&je!=="__source"&&(re[je]=fe[je]);var oe=arguments.length-2;if(oe===1)re.children=ye;else if(1<oe){for(var ce=Array(oe),me=0;me<oe;me++)ce[me]=arguments[me+2];re.children=ce}if(G&&G.defaultProps)for(je in oe=G.defaultProps,oe)re[je]===void 0&&(re[je]=oe[je]);return O(G,xe,re)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(G){return{$$typeof:f,render:G}},Ge.isValidElement=q,Ge.lazy=function(G){return{$$typeof:y,_payload:{_status:-1,_result:G},_init:ne}},Ge.memo=function(G,fe){return{$$typeof:v,type:G,compare:fe===void 0?null:fe}},Ge.startTransition=J,Ge.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ge.use=function(G){return U.H.use(G)},Ge.useActionState=function(G,fe,ye){return U.H.useActionState(G,fe,ye)},Ge.useCallback=function(G,fe){return U.H.useCallback(G,fe)},Ge.useContext=function(G){return U.H.useContext(G)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(G,fe){return U.H.useDeferredValue(G,fe)},Ge.useEffect=function(G,fe){return U.H.useEffect(G,fe)},Ge.useEffectEvent=function(G){return U.H.useEffectEvent(G)},Ge.useId=function(){return U.H.useId()},Ge.useImperativeHandle=function(G,fe,ye){return U.H.useImperativeHandle(G,fe,ye)},Ge.useInsertionEffect=function(G,fe){return U.H.useInsertionEffect(G,fe)},Ge.useLayoutEffect=function(G,fe){return U.H.useLayoutEffect(G,fe)},Ge.useMemo=function(G,fe){return U.H.useMemo(G,fe)},Ge.useOptimistic=function(G,fe){return U.H.useOptimistic(G,fe)},Ge.useReducer=function(G,fe,ye){return U.H.useReducer(G,fe,ye)},Ge.useRef=function(G){return U.H.useRef(G)},Ge.useState=function(G){return U.H.useState(G)},Ge.useSyncExternalStore=function(G,fe,ye){return U.H.useSyncExternalStore(G,fe,ye)},Ge.useTransition=function(){return U.H.useTransition()},Ge.version="19.3.0",Ge}var by;function d0(){return by||(by=1,_m.exports=Fk()),_m.exports}var w=d0();const Vk=u0(w),Cc=Pk({__proto__:null,default:Vk},[w]);var Mm={exports:{}},oc={},Rm={exports:{}},Om={};/**
|
|
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 jy;function $k(){return jy||(jy=1,(function(e){function i(K,R){var F=K.length;K.push(R);e:for(;0<F;){var ne=F-1>>>1,L=K[ne];if(0<c(L,R))K[ne]=R,K[F]=L,F=ne;else break e}}function a(K){return K.length===0?null:K[0]}function l(K){if(K.length===0)return null;var R=K[0],F=K.pop();if(F!==R){K[0]=F;e:for(var ne=0,L=K.length,J=L>>>1;ne<J;){var W=2*(ne+1)-1,P=K[W],G=W+1,fe=K[G];if(0>c(P,F))G<L&&0>c(fe,P)?(K[ne]=fe,K[G]=F,ne=G):(K[ne]=P,K[W]=F,ne=W);else if(G<L&&0>c(fe,F))K[ne]=fe,K[G]=F,ne=G;else break e}}return R}function c(K,R){var F=K.sortIndex-R.sortIndex;return F!==0?F:K.id-R.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],v=[],y=1,p=null,b=3,j=!1,S=!1,k=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function _(K){for(var R=a(v);R!==null;){if(R.callback===null)l(v);else if(R.startTime<=K)l(v),R.sortIndex=R.expirationTime,i(m,R);else break;R=a(v)}}function D(K){if(k=!1,_(K),!S)if(a(m)!==null)S=!0,A||(A=!0,q());else{var R=a(v);R!==null&&H(D,R.startTime-K)}}var A=!1,I=-1,U=5,$=-1;function O(){return C?!0:!(e.unstable_now()-$<U)}function V(){if(C=!1,A){var K=e.unstable_now();$=K;var R=!0;try{e:{S=!1,k&&(k=!1,M(I),I=-1),j=!0;var F=b;try{t:{for(_(K),p=a(m);p!==null&&!(p.expirationTime>K&&O());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,b=p.priorityLevel;var L=ne(p.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){p.callback=L,_(K),R=!0;break t}p===a(m)&&l(m),_(K)}else l(m);p=a(m)}if(p!==null)R=!0;else{var J=a(v);J!==null&&H(D,J.startTime-K),R=!1}}break e}finally{p=null,b=F,j=!1}R=void 0}}finally{R?q():A=!1}}}var q;if(typeof T=="function")q=function(){T(V)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,Y=ee.port2;ee.port1.onmessage=V,q=function(){Y.postMessage(null)}}else q=function(){E(V,0)};function H(K,R){I=E(function(){K(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var R=3;break;default:R=b}var F=b;b=R;try{return K()}finally{b=F}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(K,R){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var F=b;b=K;try{return R()}finally{b=F}},e.unstable_scheduleCallback=function(K,R,F){var ne=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ne+F:ne):F=ne,K){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=F+L,K={id:y++,callback:R,priorityLevel:K,startTime:F,expirationTime:L,sortIndex:-1},F>ne?(K.sortIndex=F,i(v,K),a(m)===null&&K===a(v)&&(k?(M(I),I=-1):k=!0,H(D,F-ne))):(K.sortIndex=L,i(m,K),S||j||(S=!0,A||(A=!0,q()))),K},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(K){var R=b;return function(){var F=b;b=R;try{return K.apply(this,arguments)}finally{b=F}}}})(Om)),Om}var wy;function Gk(){return wy||(wy=1,Rm.exports=$k()),Rm.exports}var zm={exports:{}},An={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Sy;function Yk(){if(Sy)return An;Sy=1;var e=d0();function i(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},c=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(y,p,b){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:j==null?null:j===d?d:""+j,children:y,containerInfo:p,implementation:b}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,An.browser=function(y){return{$$typeof:u,_reason:y}},An.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(y,p,null,b)},An.flushSync=function(y){var p=m.T,b=l.p;try{if(m.T=null,l.p=2,y)return y()}finally{m.T=p,l.p=b,l.d.f()}},An.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(y,p))},An.prefetchDNS=function(y){typeof y=="string"&&l.d.D(y)},An.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,k=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:j,integrity:S,fetchPriority:k}):b==="script"&&l.d.X(y,{crossOrigin:j,integrity:S,fetchPriority:k,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},An.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=v(p.as,p.crossOrigin);l.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&l.d.M(y)},An.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin);l.d.L(y,b,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},An.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=v(p.as,p.crossOrigin);l.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else l.d.m(y)},An.requestFormReset=function(y){l.d.r(y)},An.unstable_batchedUpdates=function(y,p){return y(p)},An.useFormState=function(y,p,b){return m.H.useFormState(y,p,b)},An.useFormStatus=function(){return m.H.useHostTransitionStatus()},An.version="19.3.0",An}var ky;function Ib(){if(ky)return zm.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(i){console.error(i)}}return e(),zm.exports=Yk(),zm.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 Cy;function Xk(){if(Cy)return oc;Cy=1;var e=Gk(),i=d0(),a=Ib();function l(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var n=t,r=n;r&&!r.alternate;)n=r,(n.flags&4098)!==0&&(t=n.return),r=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(l(188))}function v(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(l(188));return n!==t?null:t}for(var r=t,s=n;;){var h=r.return;if(h===null)break;var g=h.alternate;if(g===null){if(s=h.return,s!==null){r=s;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===r)return m(h),t;if(g===s)return m(h),n;g=g.sibling}throw Error(l(188))}if(r.return!==s.return)r=h,s=g;else{for(var N=!1,z=h.child;z;){if(z===r){N=!0,r=h,s=g;break}if(z===s){N=!0,s=h,r=g;break}z=z.sibling}if(!N){for(z=g.child;z;){if(z===r){N=!0,r=g,s=h;break}if(z===s){N=!0,s=g,r=h;break}z=z.sibling}if(!N)throw Error(l(189))}}if(r.alternate!==s)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?t:n}function y(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=y(t),n!==null)return n;t=t.sibling}return null}function p(t,n,r,s,h,g){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&r(t,s,h,g)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&p(t.child,n,r,s,h,g))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function j(t){var n=!1;for(t=t.return;t!==null&&(t.tag===4&&(n=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return n}function S(t){var n=[null,null],r=b(t);return r===null||k(n,t,r.child,{foundSelf:!1}),n}function k(t,n,r,s){for(;r!==null;){if(r===n)s.foundSelf=!0;else if(r.tag===5||r.tag===27||r.tag===6){if(s.foundSelf)return t[1]=r,!0;t[0]=r}else if((r.tag!==22||r.memoizedState===null)&&k(t,n,r.child,s))return!0;r=r.sibling}return!1}function C(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(l(559))}}var E=null,M=null;function T(t,n,r){return t===r?!0:t===n?(E=t,!0):!1}function _(t,n,r){return t===r?(M=t,!1):t===n?(M!==null&&(E=t),!0):!1}function D(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function A(t,n,r){for(var s=0,h=t;h;h=r(h))s++;h=0;for(var g=n;g;g=r(g))h++;for(;0<s-h;)t=r(t),s--;for(;0<h-s;)n=r(n),h--;for(;s--;){if(t===n||n!==null&&t===n.alternate)return t;t=r(t),n=r(n)}return null}var I=Object.assign,U=Symbol.for("react.element"),$=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),H=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),W=Symbol.for("react.legacy_hidden"),P=Symbol.for("react.memo_cache_sentinel"),G=Symbol.for("react.view_transition"),fe=Symbol.for("react.recoverable"),ye=Symbol.iterator;function je(t){return t===null||typeof t!="object"?null:(t=ye&&t[ye]||t["@@iterator"],typeof t=="function"?t:null)}var re=Symbol.for("react.client.reference");function xe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===re?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case V:return"Fragment";case ee:return"Profiler";case q:return"StrictMode";case R:return"Suspense";case F:return"SuspenseList";case J:return"Activity";case G:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case O:return"Portal";case H:return t.displayName||"Context";case Y:return(t._context.displayName||"Context")+".Consumer";case K:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ne:return n=t.displayName||null,n!==null?n:xe(t.type)||"Memo";case L:n=t._payload,t=t._init;try{return xe(t(n))}catch{}}return null}var oe=Array.isArray,ce=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ne={pending:!1,data:null,method:null,action:null},Le=[],Ve=-1;function mt(t){return{current:t}}function ot(t){0>Ve||(t.current=Le[Ve],Le[Ve]=null,Ve--)}function Je(t,n){Ve++,Le[Ve]=t.current,t.current=n}var _t=mt(null),vn=mt(null),yn=mt(null),Pn=mt(null);function di(t,n){switch(Je(yn,n),Je(vn,t),Je(_t,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?S2(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=S2(n),t=k2(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ot(_t),Je(_t,t)}function rn(){ot(_t),ot(vn),ot(yn)}function Yi(t){var n=t.memoizedState;n!==null&&(Vo._currentValue=n.memoizedState,Je(Pn,t)),n=_t.current;var r=k2(n,t.type);n!==r&&(Je(vn,t),Je(_t,r))}function pe(t){vn.current===t&&(ot(_t),ot(vn)),Pn.current===t&&(ot(Pn),Vo._currentValue=Ne)}var ke,He;function qe(t){if(ke===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);ke=n&&n[1]||"",He=-1<r.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ke+t+He}var We=!1;function Pt(t,n){if(!t||We)return"";We=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(Ce){var te=Ce}Reflect.construct(t,[],ve)}else{try{ve.call()}catch(Ce){te=Ce}ve=!1;try{var se=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ve=!0,new t}finally{ve&&(se!==void 0?Object.defineProperty(t.prototype,"props",se):delete t.prototype.props)}}}else{try{throw Error()}catch(Ce){te=Ce}(ve=t())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(Ce){if(Ce&&te&&typeof Ce.stack=="string")return[Ce.stack,te.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),N=g[0],z=g[1];if(N&&z){var X=N.split(`
|
|
44
|
-
`),ae=z.split(`
|
|
45
|
-
`);for(h=s=0;s<X.length&&!X[s].includes("DetermineComponentFrameRoot");)s++;for(;h<ae.length&&!ae[h].includes("DetermineComponentFrameRoot");)h++;if(s===X.length||h===ae.length)for(s=X.length-1,h=ae.length-1;1<=s&&0<=h&&X[s]!==ae[h];)h--;for(;1<=s&&0<=h;s--,h--)if(X[s]!==ae[h]){if(s!==1||h!==1)do if(s--,h--,0>h||X[s]!==ae[h]){var de=`
|
|
46
|
-
`+X[s].replace(" at new "," at ");return t.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",t.displayName)),de}while(1<=s&&0<=h);break}}}finally{We=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?qe(r):""}function xn(t,n){switch(t.tag){case 26:case 27:case 5:return qe(t.type);case 16:return qe("Lazy");case 13:return t.child!==n&&n!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return Pt(t.type,!1);case 11:return Pt(t.type.render,!1);case 1:return Pt(t.type,!0);case 31:return qe("Activity");case 30:return qe("ViewTransition");default:return""}}function Ut(t){try{var n="",r=null;do n+=xn(t,r),r=t,t=t.return;while(t);return n}catch(s){return`
|
|
47
|
-
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Rn=Object.prototype.hasOwnProperty,Un=e.unstable_scheduleCallback,Ot=e.unstable_cancelCallback,On=e.unstable_shouldYield,Xe=e.unstable_requestPaint,Xt=e.unstable_now,ol=e.unstable_getCurrentPriorityLevel,ua=e.unstable_ImmediatePriority,da=e.unstable_UserBlockingPriority,bn=e.unstable_NormalPriority,fi=e.unstable_LowPriority,sl=e.unstable_IdlePriority,hi=e.log,lo=e.unstable_setDisableYieldValue,Xi=null,cn=null;function Lt(t){if(typeof hi=="function"&&lo(t),cn&&typeof cn.setStrictMode=="function")try{cn.setStrictMode(Xi,t)}catch{}}var Vt=Math.clz32?Math.clz32:Ki,fa=Math.log,ha=Math.LN2;function Ki(t){return t>>>=0,t===0?32:31-(fa(t)/ha|0)|0}var Qi=256,Ri=262144,Qn=4194304;function Zi(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 mi(t,n,r){var s=t.pendingLanes;if(s===0)return 0;var h=0,g=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var z=s&134217727;return z!==0?(s=z&~g,s!==0?h=Zi(s):(N&=z,N!==0?h=Zi(N):r||(r=z&~t,r!==0&&(h=Zi(r))))):(z=s&~g,z!==0?h=Zi(z):N!==0?h=Zi(N):r||(r=s&~t,r!==0&&(h=Zi(r)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,r=n&-n,g>=r||g===32&&(r&4194048)!==0)?n:h}function pi(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function ma(t,n){(n&8)!==0&&(n|=n&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=n;0<r;){var s=31-Vt(r),h=1<<s;n|=t[s],r&=~h}return n}function cl(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 gi(){var t=Qn;return Qn<<=1,(Qn&62914560)===0&&(Qn=4194304),t}function xr(t){for(var n=[],r=0;31>r;r++)n.push(t);return n}function Zn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function pa(t,n,r,s,h,g){var N=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var z=t.entanglements,X=t.expirationTimes,ae=t.hiddenUpdates;for(r=N&~r;0<r;){var de=31-Vt(r),ve=1<<de;z[de]=0,X[de]=-1;var te=ae[de];if(te!==null)for(ae[de]=null,de=0;de<te.length;de++){var se=te[de];se!==null&&(se.lane&=-536870913)}r&=~ve}s!==0&&Jn(t,s,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(N&~n))}function Jn(t,n,r){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-Vt(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|r&261930}function ln(t,n){var r=t.entangledLanes|=n;for(t=t.entanglements;r;){var s=31-Vt(r),h=1<<s;h&n|t[s]&n&&(t[s]|=n),r&=~h}}function un(t,n){var r=n&-n;return r=(r&42)!==0?1:ga(r),(r&(t.suspendedLanes|n))!==0?0:r}function ga(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 Wn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ei(){var t=me.p;return t!==0?t:(t=window.event,t===void 0?32:oy(t.type))}function zn(t,n){var r=me.p;try{return me.p=t,n()}finally{me.p=r}}var Bt=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Bt,$t="__reactProps$"+Bt,jn="__reactContainer$"+Bt,ul="__reactEvents$"+Bt,br="__reactListeners$"+Bt,jr="__reactHandles$"+Bt,va="__reactResources$"+Bt,ya="__reactMarker$"+Bt,Ga="__reactLoad$"+Bt;function Ya(t){delete t[Mt],delete t[$t],delete t[br],delete t[jr]}function ti(t){var n;if(n=t[Mt])return n;for(var r=t.parentNode;r;){if(n=r[jn]||r[Mt]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(t=U2(t);t!==null;){if(r=t[Mt])return r;t=U2(t)}return n}t=r,r=t.parentNode}return null}function xa(t){if(t=t[Mt]||t[jn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ue(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(l(33))}function B(t){var n=t[va];return n||(n=t[va]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Q(t){t[ya]=!0}function he(t){t[Ga]=void 0}var Ee=new Set,Se={};function _e(t,n){Be(t,n),Be(t+"Capture",n)}function Be(t,n){for(Se[t]=n,t=0;t<n.length;t++)Ee.add(n[t])}var Ke=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]*$"),Me={},$e={};function st(t){return Rn.call($e,t)?!0:Rn.call(Me,t)?!1:Ke.test(t)?$e[t]=!0:(Me[t]=!0,!1)}var Pe=!1;function on(){var t=Pe;return Pe=!1,t}function It(t,n,r){if(st(n))if(r===null)t.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,r)}}function vi(t,n,r){if(r===null)t.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,r)}}function Kt(t,n,r,s){if(s===null)t.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttributeNS(n,r,s)}}function Qt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function oo(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ms(t,n,r){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var h=s.get,g=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(N){r=""+N,g.call(this,N)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(N){r=""+N},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Xa(t){if(!t._valueTracker){var n=oo(t)?"checked":"value";t._valueTracker=ms(t,n,""+t[n])}}function so(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var r=n.getValue(),s="";return t&&(s=oo(t)?t.checked?"true":"false":t.value),t=s,t!==r?(n.setValue(t),!0):!1}var Ic=/[\n"\\]/g;function Rt(t){return t.replace(Ic,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Dn(t,n,r,s,h,g,N,z){t.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.type=N:t.removeAttribute("type"),n!=null?N==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Qt(n)):t.value!==""+Qt(n)&&(t.value=""+Qt(n)):N!=="submit"&&N!=="reset"||t.removeAttribute("value"),n!=null?N==="number"&&t.value==n?co(t,Qt(t.value)):co(t,Qt(n)):r!=null?co(t,Qt(r)):s!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?t.name=""+Qt(z):t.removeAttribute("name")}function wr(t,n,r,s,h,g,N,z){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||r!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Xa(t);return}r=r!=null?""+Qt(r):"",n=n!=null?""+Qt(n):r,z||n===t.value||(t.value=n),t.defaultValue=n}s=s??h,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=z?t.checked:!!s,t.defaultChecked=!!s,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Xa(t)}function co(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function ni(t,n,r,s){if(t=t.options,n){n={};for(var h=0;h<r.length;h++)n["$"+r[h]]=!0;for(r=0;r<t.length;r++)h=n.hasOwnProperty("$"+t[r].value),t[r].selected!==h&&(t[r].selected=h),h&&s&&(t[r].defaultSelected=!0)}else{for(r=""+Qt(r),n=null,h=0;h<t.length;h++){if(t[h].value===r){t[h].selected=!0,s&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function uo(t,n,r){if(n!=null&&(n=""+Qt(n),n!==t.value&&(t.value=n),r==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=r!=null?""+Qt(r):""}function yi(t,n,r,s){if(n==null){if(s!=null){if(r!=null)throw Error(l(92));if(oe(s)){if(1<s.length)throw Error(l(93));s=s[0]}r=s}r==null&&(r=""),n=r}r=Qt(n),t.defaultValue=r,s=t.textContent,s===r&&s!==""&&s!==null&&(t.value=s),Xa(t)}function qn(t,n){if(n){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=n;return}}t.textContent=n}var Sr=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 ps(t,n,r){var s=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,r):typeof r!="number"||r===0||Sr.has(n)?n==="float"?t.cssFloat=r:t[n]=(""+r).trim():t[n]=r+"px"}function xi(t,n,r){if(n!=null&&typeof n!="object")throw Error(l(62));if(t=t.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="",Pe=!0);for(var h in n)s=n[h],n.hasOwnProperty(h)&&r[h]!==s&&(ps(t,h,s),Pe=!0)}else for(var g in n)n.hasOwnProperty(g)&&ps(t,g,n[g])}function dl(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 gs=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"]]),vs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(t){return vs.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fn(){}var fl=null;function hl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var dt=null,dn=null;function Oi(t){var n=xa(t);if(n&&(t=n.stateNode)){var r=t[$t]||null;e:switch(t=n.stateNode,n.type){case"input":if(Dn(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Rt(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var s=r[n];if(s!==t&&s.form===t.form){var h=s[$t]||null;if(!h)throw Error(l(90));Dn(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<r.length;n++)s=r[n],s.form===t.form&&so(s)}break e;case"textarea":uo(t,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&ni(t,!!r.multiple,n,!1)}}}var bi=!1;function ml(t,n,r){if(bi)return t(n,r);bi=!0;try{var s=t(n);return s}finally{if(bi=!1,(dt!==null||dn!==null)&&(Iu(),dt&&(n=dt,t=dn,dn=dt=null,Oi(n),t)))for(n=0;n<t.length;n++)Oi(t[n])}}function Ka(t,n){var r=t.stateNode;if(r===null)return null;var s=r[$t]||null;if(s===null)return null;r=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(l(231,n,typeof r));return r}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pl=!1;if(Sn)try{var ys={};Object.defineProperty(ys,"passive",{get:function(){pl=!0}}),window.addEventListener("test",ys,ys),window.removeEventListener("test",ys,ys)}catch{pl=!1}var kr=null,ff=null,Hc=null;function xg(){if(Hc)return Hc;var t,n=ff,r=n.length,s,h="value"in kr?kr.value:kr.textContent,g=h.length;for(t=0;t<r&&n[t]===h[t];t++);var N=r-t;for(s=1;s<=N&&n[r-s]===h[g-s];s++);return Hc=h.slice(t,1<s?1-s:void 0)}function Pc(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 Uc(){return!0}function bg(){return!1}function Vn(t){function n(r,s,h,g,N){this._reactName=r,this._targetInst=h,this.type=s,this.nativeEvent=g,this.target=N,this.currentTarget=null;for(var z in t)t.hasOwnProperty(z)&&(r=t[z],this[z]=r?r(g):g[z]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Uc:bg,this.isPropagationStopped=bg,this}return I(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),n}var Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qc=Vn(Cr),xs=I({},Cr,{view:0,detail:0}),cS=Vn(xs),hf,mf,bs,Fc=I({},xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gf,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!==bs&&(bs&&t.type==="mousemove"?(hf=t.screenX-bs.screenX,mf=t.screenY-bs.screenY):mf=hf=0,bs=t),hf)},movementY:function(t){return"movementY"in t?t.movementY:mf}}),jg=Vn(Fc),uS=I({},Fc,{dataTransfer:0}),dS=Vn(uS),fS=I({},xs,{relatedTarget:0}),pf=Vn(fS),hS=I({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),mS=Vn(hS),pS=I({},Cr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),gS=Vn(pS),vS=I({},Cr,{data:0}),wg=Vn(vS),yS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xS={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"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jS(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=bS[t])?!!n[t]:!1}function gf(){return jS}var wS=I({},xs,{key:function(t){if(t.key){var n=yS[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Pc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?xS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gf,charCode:function(t){return t.type==="keypress"?Pc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Pc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),SS=Vn(wS),kS=I({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sg=Vn(kS),CS=I({},Cr,{submitter:0}),NS=Vn(CS),ES=I({},xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gf}),TS=Vn(ES),AS=I({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),_S=Vn(AS),MS=I({},Fc,{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}),RS=Vn(MS),OS=I({},Cr,{newState:0,oldState:0,source:0}),zS=Vn(OS),DS=[9,13,27,32],vf=Sn&&"CompositionEvent"in window,js=null;Sn&&"documentMode"in document&&(js=document.documentMode);var LS=Sn&&"TextEvent"in window&&!js,kg=Sn&&(!vf||js&&8<js&&11>=js),Cg=" ",Ng=!1;function Eg(t,n){switch(t){case"keyup":return DS.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fo=!1;function BS(t,n){switch(t){case"compositionend":return Tg(n);case"keypress":return n.which!==32?null:(Ng=!0,Cg);case"textInput":return t=n.data,t===Cg&&Ng?null:t;default:return null}}function IS(t,n){if(fo)return t==="compositionend"||!vf&&Eg(t,n)?(t=xg(),Hc=ff=kr=null,fo=!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 kg&&n.locale!=="ko"?null:n.data;default:return null}}var HS={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 Ag(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!HS[t.type]:n==="textarea"}function _g(t,n,r,s){dt?dn?dn.push(s):dn=[s]:dt=s,n=Vu(n,"onChange"),0<n.length&&(r=new qc("onChange","change",null,r,s),t.push({event:r,listeners:n}))}var ws=null,Ss=null;function PS(t){v2(t,0)}function Vc(t){var n=ue(t);if(so(n))return t}function Mg(t,n){if(t==="change")return n}var Rg=!1;if(Sn){var yf;if(Sn){var xf="oninput"in document;if(!xf){var Og=document.createElement("div");Og.setAttribute("oninput","return;"),xf=typeof Og.oninput=="function"}yf=xf}else yf=!1;Rg=yf&&(!document.documentMode||9<document.documentMode)}function zg(){ws&&(ws.detachEvent("onpropertychange",Dg),Ss=ws=null)}function Dg(t){if(t.propertyName==="value"&&Vc(Ss)){var n=[];_g(n,Ss,t,hl(t)),ml(PS,n)}}function US(t,n,r){t==="focusin"?(zg(),ws=n,Ss=r,ws.attachEvent("onpropertychange",Dg)):t==="focusout"&&zg()}function qS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Vc(Ss)}function FS(t,n){if(t==="click")return Vc(n)}function VS(t,n){if(t==="input"||t==="change")return Vc(n)}function $S(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var ji=typeof Object.is=="function"?Object.is:$S;function ks(t,n){if(ji(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var r=Object.keys(t),s=Object.keys(n);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var h=r[s];if(!Rn.call(n,h)||!ji(t[h],n[h]))return!1}return!0}function bf(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 Lg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Bg(t,n){var r=Lg(t);t=0;for(var s;r;){if(r.nodeType===3){if(s=t+r.textContent.length,t<=n&&s>=n)return{node:r,offset:n-t};t=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Lg(r)}}function Ig(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Ig(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Hg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=bf(t.document);n instanceof t.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)t=n.contentWindow;else break;n=bf(t.document)}return n}function jf(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 GS=Sn&&"documentMode"in document&&11>=document.documentMode,ho=null,wf=null,Cs=null,Sf=!1;function Pg(t,n,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Sf||ho==null||ho!==bf(s)||(s=ho,"selectionStart"in s&&jf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Cs&&ks(Cs,s)||(Cs=s,s=Vu(wf,"onSelect"),0<s.length&&(n=new qc("onSelect","select",null,n,r),t.push({event:n,listeners:s}),n.target=ho)))}function gl(t,n){var r={};return r[t.toLowerCase()]=n.toLowerCase(),r["Webkit"+t]="webkit"+n,r["Moz"+t]="moz"+n,r}var mo={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},kf={},Ug={};Sn&&(Ug=document.createElement("div").style,"AnimationEvent"in window||(delete mo.animationend.animation,delete mo.animationiteration.animation,delete mo.animationstart.animation),"TransitionEvent"in window||delete mo.transitionend.transition);function vl(t){if(kf[t])return kf[t];if(!mo[t])return t;var n=mo[t],r;for(r in n)if(n.hasOwnProperty(r)&&r in Ug)return kf[t]=n[r];return t}var qg=vl("animationend"),Fg=vl("animationiteration"),Vg=vl("animationstart"),YS=vl("transitionrun"),XS=vl("transitionstart"),KS=vl("transitioncancel"),$g=vl("transitionend"),Gg=new Map,Cf="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(" ");Cf.push("scrollEnd");function Ji(t,n){Gg.set(t,n),_e(n,[t])}var QS=0;function Qa(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=na.identifierPrefix;var r=QS++;return t="_"+t+"t_"+r.toString(32)+"_",n.autoName=t}function Yg(t){if(t==null||typeof t=="string")return t;var n=null,r=zo;if(r!==null)for(var s=0;s<r.length;s++){var h=t[r[s]];if(h!=null){if(h==="none")return"none";n=n==null?h:n+(" "+h)}}return n??t.default}function Za(t,n){return t=Yg(t),n=Yg(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var $c=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)},zi=[],po=0,Nf=0;function Gc(){for(var t=po,n=Nf=po=0;n<t;){var r=zi[n];zi[n++]=null;var s=zi[n];zi[n++]=null;var h=zi[n];zi[n++]=null;var g=zi[n];if(zi[n++]=null,s!==null&&h!==null){var N=s.pending;N===null?h.next=h:(h.next=N.next,N.next=h),s.pending=h}g!==0&&Xg(r,h,g)}}function Yc(t,n,r,s){zi[po++]=t,zi[po++]=n,zi[po++]=r,zi[po++]=s,Nf|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Ef(t,n,r,s){return Yc(t,n,r,s),Xc(t)}function yl(t,n){return Yc(t,null,null,n),Xc(t)}function Xg(t,n,r){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r);for(var h=!1,g=t.return;g!==null;)g.childLanes|=r,s=g.alternate,s!==null&&(s.childLanes|=r),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-Vt(r),t=g.hiddenUpdates,s=t[h],s===null?t[h]=[n]:s.push(n),n.lane=r|536870912),g):null}function Xc(t){if(50<Ys)throw Ys=0,Bu=null,Error(l(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var go={};function ZS(t,n,r,s){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(t,n,r,s){return new ZS(t,n,r,s)}function Tf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ja(t,n){var r=t.alternate;return r===null?(r=ii(t.tag,n,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=n,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&1206910976,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,n=t.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r}function Kg(t,n){t.flags&=1206910978;var r=t.alternate;return r===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=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,n=r.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Kc(t,n,r,s,h,g){var N=0;if(s=t,typeof s=="function")Tf(s)&&(N=1);else if(typeof s=="string")N=Ck(t,r,_t.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(s){case J:return t=ii(31,r,n,h),t.elementType=J,t.lanes=g,t;case V:return xl(r.children,h,g,n);case q:N=8,h|=24;break;case ee:return t=ii(12,r,n,h|2),t.elementType=ee,t.lanes=g,t;case R:return t=ii(13,r,n,h),t.elementType=R,t.lanes=g,t;case F:return t=ii(19,r,n,h),t.elementType=F,t.lanes=g,t;case W:case G:return t=h|32,t=ii(30,r,n,t),t.elementType=G,t.lanes=g,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case H:N=10;break e;case Y:N=9;break e;case K:N=11;break e;case ne:N=14;break e;case L:N=16,s=null;break e}N=29,r=Error(l(130,t===null?"null":typeof t,"")),s=null}return n=ii(N,r,n,h),n.elementType=t,n.type=s,n.lanes=g,n}function xl(t,n,r,s){return t=ii(7,t,s,n),t.lanes=r,t}function Af(t,n,r){return t=ii(6,t,null,n),t.lanes=r,t}function Qg(t){var n=ii(18,null,null,0);return n.stateNode=t,n}function _f(t,n,r){return n=ii(4,t.children!==null?t.children:[],t.key,n),n.lanes=r,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Zg=new WeakMap;function Di(t,n){if(typeof t=="object"&&t!==null){var r=Zg.get(t);return r!==void 0?r:(n={value:t,source:n,stack:Ut(n)},Zg.set(t,n),n)}return{value:t,source:n,stack:Ut(n)}}var vo=[],yo=0,Qc=null,Ns=0,Li=[],Bi=0,Nr=null,ba=1,ja="";function Wa(t,n){vo[yo++]=Ns,vo[yo++]=Qc,Qc=t,Ns=n}function Jg(t,n,r){Li[Bi++]=ba,Li[Bi++]=ja,Li[Bi++]=Nr,Nr=t;var s=ba;t=ja;var h=32-Vt(s)-1;s&=~(1<<h),r+=1;var g=32-Vt(n)+h;if(30<g){var N=h-h%5;g=(s&(1<<N)-1).toString(32),s>>=N,h-=N,ba=1<<32-Vt(n)+h|r<<h|s,ja=g+t}else ba=1<<g|r<<h|s,ja=t}function Zc(t){t.return!==null&&(Wa(t,1),Jg(t,1,0))}function Mf(t){for(;t===Qc;)Qc=vo[--yo],vo[yo]=null,Ns=vo[--yo],vo[yo]=null;for(;t===Nr;)Nr=Li[--Bi],Li[Bi]=null,ja=Li[--Bi],Li[Bi]=null,ba=Li[--Bi],Li[Bi]=null}function Wg(t,n){Li[Bi++]=ba,Li[Bi++]=ja,Li[Bi++]=Nr,ba=n.id,ja=n.overflow,Nr=t}var fn=null,Tt=null,et=!1,Er=null,Ii=!1,Rf=Error(l(519));function Tr(t){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Es(Di(n,t)),Rf}function e1(t){var n=t.stateNode,r=t.type,s=t.memoizedProps;switch(n[Mt]=t,n[$t]=s,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(r=0;r<Ks.length;r++)nt(Ks[r],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":nt("invalid",n),wr(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":nt("invalid",n);break;case"textarea":nt("invalid",n),yi(n,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||s.suppressHydrationWarning===!0||j2(n.textContent,r)?(s.popover!=null&&(nt("beforetoggle",n),nt("toggle",n)),s.onScroll!=null&&nt("scroll",n),s.onScrollEnd!=null&&nt("scrollend",n),s.onClick!=null&&(n.onclick=Fn),n=!0):n=!1,n||Tr(t,!0)}function Jc(t){for(fn=t.return;fn;)switch(fn.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:fn=fn.return}}function xo(t){if(t!==fn)return!1;if(!et)return Jc(t),et=!0,!1;var n=t.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||sm(t.type,t.memoizedProps)),r=!r),r&&Tt&&Tr(t),Jc(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));Tt=P2(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));Tt=P2(t)}else n===27?(n=Tt,Vr(t.type)?(t=vm,vm=null,Tt=t):Tt=n):Tt=fn?Pi(t.stateNode.nextSibling):null;return!0}function bl(){Tt=fn=null,et=!1}function Of(){var t=Er;return t!==null&&(li===null?li=t:li.push.apply(li,t),Er=null),t}function Es(t){Er===null?Er=[t]:Er.push(t)}var zf=mt(null),jl=null,er=null;function Ar(t,n,r){Je(zf,n._currentValue),n._currentValue=r}function tr(t){t._currentValue=zf.current,ot(zf)}function Wc(t,n,r){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===r)break;t=t.return}}function Df(t,n,r,s){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var N=h.child;g=g.firstContext;e:for(;g!==null;){var z=g;g=h;for(var X=0;X<n.length;X++)if(z.context===n[X]){g.lanes|=r,z=g.alternate,z!==null&&(z.lanes|=r),Wc(g.return,r,t),s||(N=null);break e}g=z.next}}else if(h.tag===18){if(N=h.return,N===null)throw Error(l(341));N.lanes|=r,g=N.alternate,g!==null&&(g.lanes|=r),Wc(N,r,t),N=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=r,N=h.alternate,N!==null&&(N.lanes|=r),Wc(h.return,r,t),N=h.child,N=N!==null?N.sibling:null):N=h.child;if(N!==null)N.return=h;else for(N=h;N!==null;){if(N===t){N=null;break}if(h=N.sibling,h!==null){h.return=N.return,N=h;break}N=N.return}h=N}}function wl(t,n,r,s){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var N=h.alternate;if(N===null)throw Error(l(387));if(N=N.memoizedProps,N!==null){var z=h.type;ji(h.pendingProps.value,N.value)||(t!==null?t.push(z):t=[z])}}else if(h===Pn.current){if(N=h.alternate,N===null)throw Error(l(387));N.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Vo):t=[Vo])}h=h.return}return t!==null&&Df(n,t,r,s),n.flags|=262144,t!==null}function eu(t){for(t=t.firstContext;t!==null;){if(!ji(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Sl(t){jl=t,er=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kn(t){return t1(jl,t)}function tu(t,n){return jl===null&&Sl(t),t1(t,n)}function t1(t,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},er===null){if(t===null)throw Error(l(308));er=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else er=er.next=n;return r}var JS=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(r,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(r){return r()})}},WS=e.unstable_scheduleCallback,e6=e.unstable_NormalPriority,Zt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lf(){return{controller:new JS,data:new Map,refCount:0}}function Ts(t){t.refCount--,t.refCount===0&&WS(e6,function(){t.controller.abort()})}function n1(t,n){if((t.pendingLanes&4194048)!==0){var r=t.transitionTypes;for(r===null&&(r=t.transitionTypes=[]),t=0;t<n.length;t++){var s=n[t];r.indexOf(s)===-1&&r.push(s)}}}var As=null;function t6(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var _s=null,Bf=0,kl=0,bo=null;function n6(t,n){if(_s===null){var r=_s=[];Bf=0,kl=Wh(),bo={status:"pending",value:void 0,then:function(s){r.push(s)}}}return Bf++,n.then(i1,i1),n}function i1(){if(--Bf===0&&(As=null,_s!==null)){bo!==null&&(bo.status="fulfilled");var t=_s;_s=null,kl=0,bo=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function i6(t,n){var r=[],s={status:"pending",value:null,reason:null,then:function(h){r.push(h)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var h=0;h<r.length;h++)(0,r[h])(n)},function(h){for(s.status="rejected",s.reason=h,h=0;h<r.length;h++)(0,r[h])(void 0)}),s}var a1=ce.S;ce.S=function(t,n){if(Qv=Xt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n6(t,n),As!==null)for(var r=Io;r!==null;)n1(r,As),r=r.next;if(r=t.types,r!==null){for(var s=Io;s!==null;)n1(s,r),s=s.next;if(kl!==0){s=As,s===null&&(s=As=[]);for(var h=0;h<r.length;h++){var g=r[h];s.indexOf(g)===-1&&s.push(g)}}}a1!==null&&a1(t,n)};var Cl=mt(null);function If(){var t=Cl.current;return t!==null?t:Ct.pooledCache}function nu(t,n){n===null?Je(Cl,Cl.current):Je(Cl,n.pool)}function r1(){var t=If();return t===null?null:{parent:Zt._currentValue,pool:t}}var jo=Error(l(460)),Hf=Error(l(474)),iu=Error(l(542)),au={then:function(){}};function l1(t){return t=t.status,t==="fulfilled"||t==="rejected"}function o1(t,n,r){switch(r=t[r],r===void 0?t.push(n):r!==n&&(n.then(Fn,Fn),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,c1(t),t===void 0&&!("reason"in n)?Error(l(600)):t;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(t=Ct,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=s}},function(s){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,c1(t),t}throw El=n,jo}}function Nl(t){try{var n=t._init;return n(t._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(El=r,jo):r}}var El=null;function s1(){if(El===null)throw Error(l(459));var t=El;return El=null,t}function c1(t){if(t===jo||t===iu)throw Error(l(483))}var wo=null,Ms=0;function ru(t){var n=Ms;return Ms+=1,wo===null&&(wo=[]),o1(wo,t,n)}function _r(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function lu(t,n){throw n.$$typeof===U?Error(l(525)):(t=Object.prototype.toString.call(n),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function u1(t){function n(ie,Z){if(t){var le=ie.deletions;le===null?(ie.deletions=[Z],ie.flags|=16):le.push(Z)}}function r(ie,Z){if(!t)return null;for(;Z!==null;)n(ie,Z),Z=Z.sibling;return null}function s(ie){for(var Z=new Map;ie!==null;)ie.key===null?Z.set(ie.index,ie):Z.set(ie.key,ie),ie=ie.sibling;return Z}function h(ie,Z){return ie=Ja(ie,Z),ie.index=0,ie.sibling=null,ie}function g(ie,Z,le){return ie.index=le,t?(le=ie.alternate,le!==null?(le=le.index,le<Z?(ie.flags|=2,Z):le):(ie.flags|=134217730,Z)):(ie.flags|=1048576,Z)}function N(ie){return t&&ie.alternate===null&&(ie.flags|=134217730),ie}function z(ie,Z,le,ge){return Z===null||Z.tag!==6?(Z=Af(le,ie.mode,ge),Z.return=ie,Z):(Z=h(Z,le),Z.return=ie,Z)}function X(ie,Z,le,ge){var Re=le.type;return Re===V?(ie=de(ie,Z,le.props.children,ge,le.key),_r(ie,le),ie):Z!==null&&(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===L&&Nl(Re)===Z.type)?(Z=h(Z,le.props),_r(Z,le),Z.return=ie,Z):(Z=Kc(le.type,le.key,le.props,null,ie.mode,ge),_r(Z,le),Z.return=ie,Z)}function ae(ie,Z,le,ge){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==le.containerInfo||Z.stateNode.implementation!==le.implementation?(Z=_f(le,ie.mode,ge),Z.return=ie,Z):(Z=h(Z,le.children||[]),Z.return=ie,Z)}function de(ie,Z,le,ge,Re){return Z===null||Z.tag!==7?(Z=xl(le,ie.mode,ge,Re),Z.return=ie,Z):(Z=h(Z,le),Z.return=ie,Z)}function ve(ie,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Af(""+Z,ie.mode,le),Z.return=ie,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case $:return le=Kc(Z.type,Z.key,Z.props,null,ie.mode,le),_r(le,Z),le.return=ie,le;case O:return Z=_f(Z,ie.mode,le),Z.return=ie,Z;case L:return Z=Nl(Z),ve(ie,Z,le)}if(oe(Z)||je(Z))return Z=xl(Z,ie.mode,le,null),Z.return=ie,Z;if(typeof Z.then=="function")return ve(ie,ru(Z),le);if(Z.$$typeof===H)return ve(ie,tu(ie,Z),le);lu(ie,Z)}return null}function te(ie,Z,le,ge){var Re=Z!==null?Z.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Re!==null?null:z(ie,Z,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return le.key===Re?X(ie,Z,le,ge):null;case O:return le.key===Re?ae(ie,Z,le,ge):null;case L:return le=Nl(le),te(ie,Z,le,ge)}if(oe(le)||je(le))return Re!==null?null:de(ie,Z,le,ge,null);if(typeof le.then=="function")return te(ie,Z,ru(le),ge);if(le.$$typeof===H)return te(ie,Z,tu(ie,le),ge);lu(ie,le)}return null}function se(ie,Z,le,ge,Re){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ie=ie.get(le)||null,z(Z,ie,""+ge,Re);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case $:return ie=ie.get(ge.key===null?le:ge.key)||null,X(Z,ie,ge,Re);case O:return ie=ie.get(ge.key===null?le:ge.key)||null,ae(Z,ie,ge,Re);case L:return ge=Nl(ge),se(ie,Z,le,ge,Re)}if(oe(ge)||je(ge))return ie=ie.get(le)||null,de(Z,ie,ge,Re,null);if(typeof ge.then=="function")return se(ie,Z,le,ru(ge),Re);if(ge.$$typeof===H)return se(ie,Z,le,tu(Z,ge),Re);lu(Z,ge)}return null}function Ce(ie,Z,le,ge){for(var Re=null,lt=null,Ie=Z,Fe=Z=0,en=null;Ie!==null&&Fe<le.length;Fe++){Ie.index>Fe?(en=Ie,Ie=null):en=Ie.sibling;var ft=te(ie,Ie,le[Fe],ge);if(ft===null){Ie===null&&(Ie=en);break}t&&Ie&&ft.alternate===null&&n(ie,Ie),Z=g(ft,Z,Fe),lt===null?Re=ft:lt.sibling=ft,lt=ft,Ie=en}if(Fe===le.length)return r(ie,Ie),et&&Wa(ie,Fe),Re;if(Ie===null){for(;Fe<le.length;Fe++)Ie=ve(ie,le[Fe],ge),Ie!==null&&(Z=g(Ie,Z,Fe),lt===null?Re=Ie:lt.sibling=Ie,lt=Ie);return et&&Wa(ie,Fe),Re}for(Ie=s(Ie);Fe<le.length;Fe++)en=se(Ie,ie,Fe,le[Fe],ge),en!==null&&(t&&(ft=en.alternate,ft!==null&&Ie.delete(ft.key===null?Fe:ft.key)),Z=g(en,Z,Fe),lt===null?Re=en:lt.sibling=en,lt=en);return t&&Ie.forEach(function(Kr){return n(ie,Kr)}),et&&Wa(ie,Fe),Re}function ze(ie,Z,le,ge){if(le==null)throw Error(l(151));for(var Re=null,lt=null,Ie=Z,Fe=Z=0,en=null,ft=le.next();Ie!==null&&!ft.done;Fe++,ft=le.next()){Ie.index>Fe?(en=Ie,Ie=null):en=Ie.sibling;var Kr=te(ie,Ie,ft.value,ge);if(Kr===null){Ie===null&&(Ie=en);break}t&&Ie&&Kr.alternate===null&&n(ie,Ie),Z=g(Kr,Z,Fe),lt===null?Re=Kr:lt.sibling=Kr,lt=Kr,Ie=en}if(ft.done)return r(ie,Ie),et&&Wa(ie,Fe),Re;if(Ie===null){for(;!ft.done;Fe++,ft=le.next())ft=ve(ie,ft.value,ge),ft!==null&&(Z=g(ft,Z,Fe),lt===null?Re=ft:lt.sibling=ft,lt=ft);return et&&Wa(ie,Fe),Re}for(Ie=s(Ie);!ft.done;Fe++,ft=le.next())ft=se(Ie,ie,Fe,ft.value,ge),ft!==null&&(t&&(en=ft.alternate,en!==null&&Ie.delete(en.key===null?Fe:en.key)),Z=g(ft,Z,Fe),lt===null?Re=ft:lt.sibling=ft,lt=ft);return t&&Ie.forEach(function(Bk){return n(ie,Bk)}),et&&Wa(ie,Fe),Re}function Ze(ie,Z,le,ge){if(typeof le=="object"&&le!==null&&le.type===V&&le.key===null&&le.props.ref===void 0&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case $:e:{for(var Re=le.key;Z!==null;){if(Z.key===Re){if(Re=le.type,Re===V){if(Z.tag===7){r(ie,Z.sibling),ge=h(Z,le.props.children),_r(ge,le),ge.return=ie,ie=ge;break e}}else if(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===L&&Nl(Re)===Z.type){r(ie,Z.sibling),ge=h(Z,le.props),_r(ge,le),ge.return=ie,ie=ge;break e}r(ie,Z);break}else n(ie,Z);Z=Z.sibling}le.type===V?(ge=xl(le.props.children,ie.mode,ge,le.key),_r(ge,le),ge.return=ie,ie=ge):(ge=Kc(le.type,le.key,le.props,null,ie.mode,ge),_r(ge,le),ge.return=ie,ie=ge)}return N(ie);case O:e:{for(Re=le.key;Z!==null;){if(Z.key===Re)if(Z.tag===4&&Z.stateNode.containerInfo===le.containerInfo&&Z.stateNode.implementation===le.implementation){r(ie,Z.sibling),ge=h(Z,le.children||[]),ge.return=ie,ie=ge;break e}else{r(ie,Z);break}else n(ie,Z);Z=Z.sibling}ge=_f(le,ie.mode,ge),ge.return=ie,ie=ge}return N(ie);case L:return le=Nl(le),Ze(ie,Z,le,ge)}if(oe(le))return Ce(ie,Z,le,ge);if(je(le)){if(Re=je(le),typeof Re!="function")throw Error(l(150));return le=Re.call(le),ze(ie,Z,le,ge)}if(typeof le.then=="function")return Ze(ie,Z,ru(le),ge);if(le.$$typeof===H)return Ze(ie,Z,tu(ie,le),ge);lu(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,Z!==null&&Z.tag===6?(r(ie,Z.sibling),ge=h(Z,le),ge.return=ie,ie=ge):(r(ie,Z),ge=Af(le,ie.mode,ge),ge.return=ie,ie=ge),N(ie)):r(ie,Z)}return function(ie,Z,le,ge){try{Ms=0;var Re=Ze(ie,Z,le,ge);return wo=null,Re}catch(Ie){if(Ie===jo||Ie===iu)throw Ie;var lt=ii(29,Ie,null,ie.mode);return lt.lanes=ge,lt.return=ie,lt}finally{}}}var Tl=u1(!0),d1=u1(!1),Mr=!1;function Pf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uf(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 Rr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Or(t,n,r){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(gt&2)!==0){var h=s.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),s.pending=n,n=Xc(t),Xg(t,null,r),n}return Yc(t,s,n,r),Xc(t)}function Rs(t,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,r|=s,n.lanes=r,ln(t,r)}}function qf(t,n){var r=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var h=null,g=null;if(r=r.firstBaseUpdate,r!==null){do{var N={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};g===null?h=g=N:g=g.next=N,r=r.next}while(r!==null);g===null?h=g=n:g=g.next=n}else h=g=n;r={baseState:s.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=n:t.next=n,r.lastBaseUpdate=n}var Ff=!1;function Os(){if(Ff){var t=bo;if(t!==null)throw t}}function zs(t,n,r,s){Ff=!1;var h=t.updateQueue;Mr=!1;var g=h.firstBaseUpdate,N=h.lastBaseUpdate,z=h.shared.pending;if(z!==null){h.shared.pending=null;var X=z,ae=X.next;X.next=null,N===null?g=ae:N.next=ae,N=X;var de=t.alternate;de!==null&&(de=de.updateQueue,z=de.lastBaseUpdate,z!==N&&(z===null?de.firstBaseUpdate=ae:z.next=ae,de.lastBaseUpdate=X))}if(g!==null){var ve=h.baseState;N=0,de=ae=X=null,z=g;do{var te=z.lane&-536870913,se=te!==z.lane;if(se?(rt&te)===te:(s&te)===te){te!==0&&te===kl&&(Ff=!0),de!==null&&(de=de.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Ce=t,ze=z;te=n;var Ze=r;switch(ze.tag){case 1:if(Ce=ze.payload,typeof Ce=="function"){ve=Ce.call(Ze,ve,te);break e}ve=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ze.payload,te=typeof Ce=="function"?Ce.call(Ze,ve,te):Ce,te==null)break e;ve=I({},ve,te);break e;case 2:Mr=!0}}te=z.callback,te!==null&&(t.flags|=64,se&&(t.flags|=8192),se=h.callbacks,se===null?h.callbacks=[te]:se.push(te))}else se={lane:te,tag:z.tag,payload:z.payload,callback:z.callback,next:null},de===null?(ae=de=se,X=ve):de=de.next=se,N|=te;if(z=z.next,z===null){if(z=h.shared.pending,z===null)break;se=z,z=se.next,se.next=null,h.lastBaseUpdate=se,h.shared.pending=null}}while(!0);de===null&&(X=ve),h.baseState=X,h.firstBaseUpdate=ae,h.lastBaseUpdate=de,g===null&&(h.shared.lanes=0),Pr|=N,t.lanes=N,t.memoizedState=ve}}function f1(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function h1(t,n){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)f1(r[t],n)}var zr=mt(null),ou=mt(0);function m1(t,n){t=lr,Je(ou,t),Je(zr,n),lr=t|n.baseLanes}function Vf(){Je(ou,lr),Je(zr,zr.current)}function $f(){lr=ou.current,ot(zr),ot(ou)}var Cn=mt(null),Ln=null;function Dr(t){var n=t.alternate;Je(Nn,Nn.current&1),Je(Cn,t),Ln===null&&(n===null||zr.current!==null||n.memoizedState!==null)&&(Ln=t)}function Gf(t){Je(Nn,Nn.current),Je(Cn,t),Ln===null&&(Ln=t)}function p1(t){t.tag===22?(Je(Nn,Nn.current),Je(Cn,t),Ln===null&&(Ln=t)):Lr()}function Lr(){Je(Nn,Nn.current),Je(Cn,Cn.current)}function wi(t){ot(Cn),Ln===t&&(Ln=null),ot(Nn)}var Nn=mt(0);function Ds(t,n){Je(Cn,Cn.current),Je(Nn,n)}function Yf(t){ot(Nn),ot(Cn),Ln===t&&(Ln=null)}function su(t){for(var n=t;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||pm(r)||gm(r)))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 nr=0,Qe=null,St=null,Jt=null,cu=!1,So=!1,Al=!1,uu=0,Ls=0,ko=null,a6=0;function qt(){throw Error(l(321))}function Xf(t,n){if(n===null)return!1;for(var r=0;r<n.length&&r<t.length;r++)if(!ji(t[r],n[r]))return!1;return!0}function Kf(t,n,r,s,h,g){return nr=g,Qe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ce.H=t===null||t.memoizedState===null?J1:W1,Al=!1,g=r(s,h),Al=!1,So&&(g=v1(n,r,s,h)),g1(t),g}function g1(t){ce.H=vu;var n=St!==null&&St.next!==null;if(nr=0,Jt=St=Qe=null,cu=!1,Ls=0,ko=null,n)throw Error(l(300));t===null||Wt||(t=t.dependencies,t!==null&&eu(t)&&(Wt=!0))}function v1(t,n,r,s){Qe=t;var h=0;do{if(So&&(ko=null),Ls=0,So=!1,25<=h)throw Error(l(301));if(h+=1,Jt=St=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}ce.H=f6,g=n(r,s)}while(So);return g}function r6(){var t=ce.H,n=t.useState()[0];return n=typeof n.then=="function"?Bs(n):n,t=t.useState()[0],(St!==null?St.memoizedState:null)!==t&&(Qe.flags|=1024),n}function Qf(){var t=uu!==0;return uu=0,t}function Zf(t,n,r){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~r}function Jf(t){if(cu){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}cu=!1}nr=0,Jt=St=Qe=null,So=!1,Ls=uu=0,ko=null}function $n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Qe.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Gt(){if(St===null){var t=Qe.alternate;t=t!==null?t.memoizedState:null}else t=St.next;var n=Jt===null?Qe.memoizedState:Jt.next;if(n!==null)Jt=n,St=t;else{if(t===null)throw Qe.alternate===null?Error(l(467)):Error(l(310));St=t,t={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Jt===null?Qe.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bs(t){var n=Ls;return Ls+=1,ko===null&&(ko=[]),t=o1(ko,t,n),n=Qe,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,ce.H=n===null||n.memoizedState===null?J1:W1),t}function fu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Bs(t);if(t.$$typeof===fe)return;if(t.$$typeof===H)return kn(t)}throw Error(l(438,String(t)))}function Wf(t){var n=null,r=Qe.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var s=Qe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=du(),Qe.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(t),s=0;s<t;s++)r[s]=P;return n.index++,r}function ir(t,n){return typeof n=="function"?n(t):n}function hu(t){var n=Gt();return eh(n,St,t)}function eh(t,n,r){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=r;var h=t.baseQueue,g=s.pending;if(g!==null){if(h!==null){var N=h.next;h.next=g.next,g.next=N}n.baseQueue=h=g,s.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var z=N=null,X=null,ae=n,de=!1;do{var ve=ae.lane&-536870913;if(ve!==ae.lane?(rt&ve)===ve:(nr&ve)===ve){var te=ae.revertLane;if(te===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ve===kl&&(de=!0);else if((nr&te)===te){ae=ae.next,te===kl&&(de=!0);continue}else ve={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(z=X=ve,N=g):X=X.next=ve,Qe.lanes|=te,Pr|=te;ve=ae.action,Al&&r(g,ve),g=ae.hasEagerState?ae.eagerState:r(g,ve)}else te={lane:ve,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(z=X=te,N=g):X=X.next=te,Qe.lanes|=ve,Pr|=ve;ae=ae.next}while(ae!==null&&ae!==n);if(X===null?N=g:X.next=z,!ji(g,t.memoizedState)&&(Wt=!0,de&&(r=bo,r!==null)))throw r;t.memoizedState=g,t.baseState=N,t.baseQueue=X,s.lastRenderedState=g}return h===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function th(t){var n=Gt(),r=n.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=t;var s=r.dispatch,h=r.pending,g=n.memoizedState;if(h!==null){r.pending=null;var N=h=h.next;do g=t(g,N.action),N=N.next;while(N!==h);ji(g,n.memoizedState)||(Wt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),r.lastRenderedState=g}return[g,s]}function y1(t,n,r){var s=Qe,h=Gt(),g=et;if(g){if(r===void 0)throw Error(l(407));r=r()}else r=n();var N=!ji((St||h).memoizedState,r);if(N&&(h.memoizedState=r,Wt=!0),h=h.queue,ah(j1.bind(null,s,h,t),[t]),t=h.getSnapshot!==n||N||Jt!==null&&(Jt.memoizedState.tag&1)!==0,Co(t?9:8,{destroy:void 0},b1.bind(null,s,h,r,n),null),t){if(s.flags|=2048,Ct===null)throw Error(l(349));g||(nr&127)!==0||x1(s,n,r)}return r}function x1(t,n,r){t.flags|=16384,t={getSnapshot:n,value:r},n=Qe.updateQueue,n===null?(n=du(),Qe.updateQueue=n,n.stores=[t]):(r=n.stores,r===null?n.stores=[t]:r.push(t))}function b1(t,n,r,s){n.value=r,n.getSnapshot=s,w1(n)&&S1(t)}function j1(t,n,r){return r(function(){w1(n)&&S1(t)})}function w1(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!ji(t,r)}catch{return!0}}function S1(t){var n=yl(t,2);n!==null&&oi(n,t,2)}function nh(t){var n=$n();if(typeof t=="function"){var r=t;if(t=r(),Al){Lt(!0);try{r()}finally{Lt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:t},n}function k1(t,n,r,s){return t.baseState=r,eh(t,St,typeof s=="function"?s:ir)}function l6(t,n,r,s,h){if(gu(t))throw Error(l(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){g.listeners.push(N)}};ce.T!==null?r(!0):g.isTransition=!1,s(g),r=n.pending,r===null?(g.next=n.pending=g,C1(n,g)):(g.next=r.next,n.pending=r.next=g)}}function C1(t,n){var r=n.action,s=n.payload,h=t.state;if(n.isTransition){var g=ce.T,N={};N.types=g!==null?g.types:null,ce.T=N;try{var z=r(h,s),X=ce.S;X!==null&&X(N,z),N1(t,n,z)}catch(ae){ih(t,n,ae)}finally{g!==null&&N.types!==null&&(g.types=N.types),ce.T=g}}else try{g=r(h,s),N1(t,n,g)}catch(ae){ih(t,n,ae)}}function N1(t,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){E1(t,n,s)},function(s){return ih(t,n,s)}):E1(t,n,r)}function E1(t,n,r){n.status="fulfilled",n.value=r,T1(n),t.state=r,n=t.pending,n!==null&&(r=n.next,r===n?t.pending=null:(r=r.next,n.next=r,C1(t,r)))}function ih(t,n,r){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=r,T1(n),n=n.next;while(n!==s)}t.action=null}function T1(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function A1(t,n){return n}function _1(t,n){if(et){var r=Ct.formState;if(r!==null){e:{var s=Qe;if(et){if(Tt){t:{for(var h=Tt,g=Ii;h.nodeType!==8;){if(!g){h=null;break t}if(h=Pi(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){Tt=Pi(h.nextSibling),s=h.data==="F!";break e}}Tr(s)}s=!1}s&&(n=r[0])}}return r=$n(),r.memoizedState=r.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A1,lastRenderedState:n},r.queue=s,r=K1.bind(null,Qe,s),s.dispatch=r,s=nh(!1),g=ch.bind(null,Qe,!1,s.queue),s=$n(),h={state:n,dispatch:null,action:t,pending:null},s.queue=h,r=l6.bind(null,Qe,h,g,r),h.dispatch=r,s.memoizedState=t,[n,r,!1]}function M1(t){var n=Gt();return R1(n,St,t)}function R1(t,n,r){if(n=eh(t,n,A1)[0],t=hu(ir)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=Bs(n)}catch(N){throw N===jo?iu:N}else s=n;n=Gt();var h=n.queue,g=h.dispatch;return r!==n.memoizedState&&(Qe.flags|=2048,Co(9,{destroy:void 0},o6.bind(null,h,r),null)),[s,g,t]}function o6(t,n){t.action=n}function O1(t){var n=Gt(),r=St;if(r!==null)return R1(n,r,t);Gt(),n=n.memoizedState,r=Gt();var s=r.queue.dispatch;return r.memoizedState=t,[n,s,!1]}function Co(t,n,r,s){return t={tag:t,create:r,deps:s,inst:n,next:null},n=Qe.updateQueue,n===null&&(n=du(),Qe.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=t.next=t:(s=r.next,r.next=t,t.next=s,n.lastEffect=t),t}function z1(){return Gt().memoizedState}function mu(t,n,r,s){var h=$n();Qe.flags|=t,h.memoizedState=Co(1|n,{destroy:void 0},r,s===void 0?null:s)}function pu(t,n,r,s){var h=Gt();s=s===void 0?null:s;var g=h.memoizedState.inst;St!==null&&s!==null&&Xf(s,St.memoizedState.deps)?h.memoizedState=Co(n,g,r,s):(Qe.flags|=t,h.memoizedState=Co(1|n,g,r,s))}function D1(t,n){mu(8390656,8,t,n)}function ah(t,n){pu(2048,8,t,n)}function s6(t){Qe.flags|=4;var n=Qe.updateQueue;if(n===null)n=du(),Qe.updateQueue=n,n.events=[t];else{var r=n.events;r===null?n.events=[t]:r.push(t)}}function L1(t){var n=Gt().memoizedState;return s6({ref:n,nextImpl:t}),function(){if((gt&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function B1(t,n){return pu(4,2,t,n)}function I1(t,n){return pu(4,4,t,n)}function H1(t,n){if(typeof n=="function"){t=t();var r=n(t);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function P1(t,n,r){r=r!=null?r.concat([t]):null,pu(4,4,H1.bind(null,n,t),r)}function rh(){}function U1(t,n){var r=Gt();n=n===void 0?null:n;var s=r.memoizedState;return n!==null&&Xf(n,s[1])?s[0]:(r.memoizedState=[t,n],t)}function q1(t,n){var r=Gt();n=n===void 0?null:n;var s=r.memoizedState;if(n!==null&&Xf(n,s[1]))return s[0];if(s=t(),Al){Lt(!0);try{t()}finally{Lt(!1)}}return r.memoizedState=[s,n],s}function lh(t,n,r){return r===void 0||(nr&1073741824)!==0&&(rt&261930)===0?t.memoizedState=n:(t.memoizedState=r,t=Jv(),Qe.lanes|=t,Pr|=t,r)}function F1(t,n,r,s){return ji(r,n)?r:zr.current!==null?(t=lh(t,r,s),ji(t,n)||(Wt=!0),t):(nr&106)===0||(nr&1073741824)!==0&&(rt&261930)===0?(Wt=!0,t.memoizedState=r):(t=Jv(),Qe.lanes|=t,Pr|=t,n)}function V1(t,n,r,s,h){var g=me.p;me.p=g!==0&&8>g?g:8;var N=ce.T,z={};z.types=N!==null?N.types:null,ce.T=z,ch(t,!1,n,r);try{var X=h(),ae=ce.S;if(ae!==null&&ae(z,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=i6(X,s);Is(t,n,de,Ni(t))}else Is(t,n,s,Ni(t))}catch(ve){Is(t,n,{then:function(){},status:"rejected",reason:ve},Ni())}finally{me.p=g,N!==null&&z.types!==null&&(N.types=z.types),ce.T=N}}function c6(){}function oh(t,n,r,s){if(t.tag!==5)throw Error(l(476));var h=$1(t).queue;V1(t,h,n,Ne,r===null?c6:function(){return G1(t),r(s)})}function $1(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Ne,baseState:Ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:Ne},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:r},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function G1(t){var n=$1(t);n.next===null&&(n=t.alternate.memoizedState),Is(t,n.next.queue,{},Ni())}function sh(){return kn(Vo)}function Y1(){return Gt().memoizedState}function X1(){return Gt().memoizedState}function u6(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var r=Ni();t=Rr(r);var s=Or(n,t,r);s!==null&&(oi(s,n,r),Rs(s,n,r)),n={cache:Lf()},t.payload=n;return}n=n.return}}function d6(t,n,r){var s=Ni();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gu(t)?Q1(n,r):(r=Ef(t,n,r,s),r!==null&&(oi(r,t,s),Z1(r,n,s)))}function K1(t,n,r){var s=Ni();Is(t,n,r,s)}function Is(t,n,r,s){var h={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(gu(t))Q1(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var N=n.lastRenderedState,z=g(N,r);if(h.hasEagerState=!0,h.eagerState=z,ji(z,N))return Yc(t,n,h,0),Ct===null&&Gc(),!1}catch{}finally{}if(r=Ef(t,n,h,s),r!==null)return oi(r,t,s),Z1(r,n,s),!0}return!1}function ch(t,n,r,s){if(s={lane:2,revertLane:Wh(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},gu(t)){if(n)throw Error(l(479))}else n=Ef(t,r,s,2),n!==null&&oi(n,t,2)}function gu(t){var n=t.alternate;return t===Qe||n!==null&&n===Qe}function Q1(t,n){So=cu=!0;var r=t.pending;r===null?n.next=n:(n.next=r.next,r.next=n),t.pending=n}function Z1(t,n,r){if((r&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,r|=s,n.lanes=r,ln(t,r)}}var vu={readContext:kn,use:fu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt,useEffectEvent:qt},J1={readContext:kn,use:fu,useCallback:function(t,n){return $n().memoizedState=[t,n===void 0?null:n],t},useContext:kn,useEffect:D1,useImperativeHandle:function(t,n,r){r=r!=null?r.concat([t]):null,mu(4194308,4,H1.bind(null,n,t),r)},useLayoutEffect:function(t,n){return mu(4194308,4,t,n)},useInsertionEffect:function(t,n){mu(4,2,t,n)},useMemo:function(t,n){var r=$n();n=n===void 0?null:n;var s=t();if(Al){Lt(!0);try{t()}finally{Lt(!1)}}return r.memoizedState=[s,n],s},useReducer:function(t,n,r){var s=$n();if(r!==void 0){var h=r(n);if(Al){Lt(!0);try{r(n)}finally{Lt(!1)}}}else h=n;return s.memoizedState=s.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},s.queue=t,t=t.dispatch=d6.bind(null,Qe,t),[s.memoizedState,t]},useRef:function(t){var n=$n();return t={current:t},n.memoizedState=t},useState:function(t){t=nh(t);var n=t.queue,r=K1.bind(null,Qe,n);return n.dispatch=r,[t.memoizedState,r]},useDebugValue:rh,useDeferredValue:function(t,n){var r=$n();return lh(r,t,n)},useTransition:function(){var t=nh(!1);return t=V1.bind(null,Qe,t.queue,!0,!1),$n().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,r){var s=Qe,h=$n();if(et){if(r===void 0)throw Error(l(407));r=r()}else{if(r=n(),Ct===null)throw Error(l(349));(rt&127)!==0||x1(s,n,r)}h.memoizedState=r;var g={value:r,getSnapshot:n};return h.queue=g,D1(j1.bind(null,s,g,t),[t]),s.flags|=2048,Co(9,{destroy:void 0},b1.bind(null,s,g,r,n),null),r},useId:function(){var t=$n(),n=Ct.identifierPrefix;if(et){var r=ja,s=ba;r=(s&~(1<<32-Vt(s)-1)).toString(32)+r,n="_"+n+"R_"+r,r=uu++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=a6++,n="_"+n+"r_"+r.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:sh,useFormState:_1,useActionState:_1,useOptimistic:function(t){var n=$n();n.memoizedState=n.baseState=t;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=ch.bind(null,Qe,!0,r),r.dispatch=n,[t,n]},useMemoCache:Wf,useCacheRefresh:function(){return $n().memoizedState=u6.bind(null,Qe)},useEffectEvent:function(t){var n=$n(),r={impl:t};return n.memoizedState=r,function(){if((gt&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},W1={readContext:kn,use:fu,useCallback:U1,useContext:kn,useEffect:ah,useImperativeHandle:P1,useInsertionEffect:B1,useLayoutEffect:I1,useMemo:q1,useReducer:hu,useRef:z1,useState:function(){return hu(ir)},useDebugValue:rh,useDeferredValue:function(t,n){var r=Gt();return F1(r,St.memoizedState,t,n)},useTransition:function(){var t=hu(ir)[0],n=Gt().memoizedState;return[typeof t=="boolean"?t:Bs(t),n]},useSyncExternalStore:y1,useId:Y1,useHostTransitionStatus:sh,useFormState:M1,useActionState:M1,useOptimistic:function(t,n){var r=Gt();return k1(r,St,t,n)},useMemoCache:Wf,useCacheRefresh:X1,useEffectEvent:L1},f6={readContext:kn,use:fu,useCallback:U1,useContext:kn,useEffect:ah,useImperativeHandle:P1,useInsertionEffect:B1,useLayoutEffect:I1,useMemo:q1,useReducer:th,useRef:z1,useState:function(){return th(ir)},useDebugValue:rh,useDeferredValue:function(t,n){var r=Gt();return St===null?lh(r,t,n):F1(r,St.memoizedState,t,n)},useTransition:function(){var t=th(ir)[0],n=Gt().memoizedState;return[typeof t=="boolean"?t:Bs(t),n]},useSyncExternalStore:y1,useId:Y1,useHostTransitionStatus:sh,useFormState:O1,useActionState:O1,useOptimistic:function(t,n){var r=Gt();return St!==null?k1(r,St,t,n):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:Wf,useCacheRefresh:X1,useEffectEvent:L1};function uh(t,n,r,s){n=t.memoizedState,r=r(s,n),r=r==null?n:I({},n,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var dh={enqueueSetState:function(t,n,r){t=t._reactInternals;var s=Ni(),h=Rr(s);h.payload=n,r!=null&&(h.callback=r),n=Or(t,h,s),n!==null&&(oi(n,t,s),Rs(n,t,s))},enqueueReplaceState:function(t,n,r){t=t._reactInternals;var s=Ni(),h=Rr(s);h.tag=1,h.payload=n,r!=null&&(h.callback=r),n=Or(t,h,s),n!==null&&(oi(n,t,s),Rs(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var r=Ni(),s=Rr(r);s.tag=2,n!=null&&(s.callback=n),n=Or(t,s,r),n!==null&&(oi(n,t,r),Rs(n,t,r))}};function ev(t,n,r,s,h,g,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,g,N):n.prototype&&n.prototype.isPureReactComponent?!ks(r,s)||!ks(h,g):!0}function tv(t,n,r,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,s),n.state!==t&&dh.enqueueReplaceState(n,n.state,null)}function _l(t,n){var r=n;if("ref"in n){r={};for(var s in n)s!=="ref"&&(r[s]=n[s])}if(t=t.defaultProps){r===n&&(r=I({},r));for(var h in t)r[h]===void 0&&(r[h]=t[h])}return r}function nv(t){$c(t)}function iv(t){console.error(t)}function av(t){$c(t)}function yu(t,n){try{var r=t.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function rv(t,n,r){try{var s=t.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function fh(t,n,r){return r=Rr(r),r.tag=3,r.payload={element:null},r.callback=function(){yu(t,n)},r}function lv(t){return t=Rr(t),t.tag=3,t}function ov(t,n,r,s){var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;t.payload=function(){return h(g)},t.callback=function(){rv(n,r,s)}}var N=r.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){rv(n,r,s),typeof h!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var z=s.stack;this.componentDidCatch(s.value,{componentStack:z!==null?z:""})})}function h6(t,n,r,s,h){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=r.alternate,n!==null&&wl(n,r,h,!0),r=Cn.current,r!==null){switch(r.tag){case 31:case 13:case 19:return Ln===null?Hu():r.alternate===null&&Ft===0&&(Ft=3),r.flags&=-257,r.flags|=65536,r.lanes=h,s===au?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([s]):n.add(s),Qh(t,s,h)),!1;case 22:return r.flags|=65536,s===au?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([s]):r.add(s)),Qh(t,s,h)),!1}throw Error(l(435,r.tag))}return Qh(t,s,h),Hu(),!1}if(et)return n=Cn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,s!==Rf&&(t=Error(l(422),{cause:s}),Es(Di(t,r)))):(s!==Rf&&(n=Error(l(423),{cause:s}),Es(Di(n,r))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,s=Di(s,r),h=fh(t.stateNode,s,h),qf(t,h),Ft!==4&&(Ft=2)),!1;var g=Error(l(520),{cause:s});if(g=Di(g,r),Gs===null?Gs=[g]:Gs.push(g),Ft!==4&&(Ft=2),n===null)return!0;s=Di(s,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,t=h&-h,r.lanes|=t,t=fh(r.stateNode,s,t),qf(r,t),!1;case 1:if(n=r.type,g=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ur===null||!Ur.has(g))))return r.flags|=65536,h&=-h,r.lanes|=h,h=lv(h),ov(h,t,r,s),qf(r,h),!1;break;case 22:if(r.memoizedState!==null)return r.flags|=65536,!1}r=r.return}while(r!==null);return!1}var hh=Error(l(461)),Wt=!1;function sn(t,n,r,s){n.child=t===null?d1(n,null,r,s):Tl(n,t.child,r,s)}function sv(t,n,r,s,h){r=r.render;var g=n.ref;if("ref"in s){var N={};for(var z in s)z!=="ref"&&(N[z]=s[z])}else N=s;return Sl(n),s=Kf(t,n,r,N,g,h),z=Qf(),t!==null&&!Wt?(Zf(t,n,h),ar(t,n,h)):(et&&z&&Zc(n),n.flags|=1,sn(t,n,s,h),n.child)}function cv(t,n,r,s,h){if(t===null){var g=r.type;return typeof g=="function"&&!Tf(g)&&g.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=g,uv(t,n,g,s,h)):(t=Kc(r.type,null,s,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!jh(t,h)){var N=g.memoizedProps;if(r=r.compare,r=r!==null?r:ks,r(N,s)&&t.ref===n.ref)return ar(t,n,h)}return n.flags|=1,t=Ja(g,s),t.ref=n.ref,t.return=n,n.child=t}function uv(t,n,r,s,h){if(t!==null){var g=t.memoizedProps;if(ks(g,s)&&t.ref===n.ref)if(Wt=!1,n.pendingProps=s=g,jh(t,h))(t.flags&131072)!==0&&(Wt=!0);else return n.lanes=t.lanes,ar(t,n,h)}return mh(t,n,r,s,h)}function dv(t,n,r,s){var h=s.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|r:r,t!==null){for(s=n.child=t.child,h=0;s!==null;)h=h|s.lanes|s.childLanes,s=s.sibling;s=h&~g}else s=0,n.child=null;return fv(t,n,g,r,s)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&nu(n,g!==null?g.cachePool:null),g!==null?m1(n,g):Vf(),p1(n);else return s=n.lanes=536870912,fv(t,n,g!==null?g.baseLanes|r:r,r,s)}else g!==null?(nu(n,g.cachePool),m1(n,g),Lr(),n.memoizedState=null):(t!==null&&nu(n,null),Vf(),Lr());return sn(t,n,h,r),n.child}function Hs(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function fv(t,n,r,s,h){var g=If();return g=g===null?null:{parent:Zt._currentValue,pool:g},n.memoizedState={baseLanes:r,cachePool:g},t!==null&&nu(n,null),Vf(),p1(n),t!==null&&wl(t,n,s,!0),n.childLanes=h,null}function xu(t,n){return n=bu({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function hv(t,n,r){return Tl(n,t.child,null,r),t=xu(n,n.pendingProps),t.flags|=2,wi(n),n.memoizedState=null,t}function m6(t,n,r){var s=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(et){if(s.mode==="hidden")return t=xu(n,s),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Hs(null,t);if(Gf(n),(t=Tt)?(t=H2(t,Ii),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Nr!==null?{id:ba,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},r=Qg(t),r.return=n,n.child=r,fn=n,Tt=null)):t=null,t===null)throw Tr(n);return n.lanes=536870912,null}return xu(n,s)}var g=t.memoizedState;if(g!==null){var N=g.dehydrated;if(Gf(n),h)if(n.flags&256)n.flags&=-257,n=hv(t,n,r);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(l(558));else if(Wt||wl(t,n,r,!1),h=(r&t.childLanes)!==0,Wt||h){if(zr.current===null){if(s=Ct,s!==null&&(N=un(s,r),N!==0&&N!==g.retryLane))throw g.retryLane=N,yl(t,N),oi(s,t,N),hh;Hu()}n=hv(t,n,r)}else t=g.treeContext,Tt=Pi(N.nextSibling),fn=n,et=!0,Er=null,Ii=!1,t!==null&&Wg(n,t),n=xu(n,s),n.flags|=134221824;return n}return t=Ja(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function No(t,n){var r=n.ref;if(r===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(t===null||t.ref!==r)&&(n.flags|=4194816)}}function mh(t,n,r,s,h){return Sl(n),r=Kf(t,n,r,s,void 0,h),s=Qf(),t!==null&&!Wt?(Zf(t,n,h),ar(t,n,h)):(et&&s&&Zc(n),n.flags|=1,sn(t,n,r,h),n.child)}function mv(t,n,r,s,h,g){return Sl(n),n.updateQueue=null,r=v1(n,s,r,h),g1(t),s=Qf(),t!==null&&!Wt?(Zf(t,n,g),ar(t,n,g)):(et&&s&&Zc(n),n.flags|=1,sn(t,n,r,g),n.child)}function pv(t,n,r,s,h){if(Sl(n),n.stateNode===null){var g=go,N=r.contextType;typeof N=="object"&&N!==null&&(g=kn(N)),g=new r(s,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=dh,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=s,g.state=n.memoizedState,g.refs={},Pf(n),N=r.contextType,g.context=typeof N=="object"&&N!==null?kn(N):go,g.state=n.memoizedState,N=r.getDerivedStateFromProps,typeof N=="function"&&(uh(n,r,N,s),g.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(N=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),N!==g.state&&dh.enqueueReplaceState(g,g.state,null),zs(n,s,g,h),Os(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){g=n.stateNode;var z=n.memoizedProps,X=_l(r,z);g.props=X;var ae=g.context,de=r.contextType;N=go,typeof de=="object"&&de!==null&&(N=kn(de));var ve=r.getDerivedStateFromProps;de=typeof ve=="function"||typeof g.getSnapshotBeforeUpdate=="function",z=n.pendingProps!==z,de||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(z||ae!==N)&&tv(n,g,s,N),Mr=!1;var te=n.memoizedState;g.state=te,zs(n,s,g,h),Os(),ae=n.memoizedState,z||te!==ae||Mr?(typeof ve=="function"&&(uh(n,r,ve,s),ae=n.memoizedState),(X=Mr||ev(n,r,X,s,te,ae,N))?(de||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=ae),g.props=s,g.state=ae,g.context=N,s=X):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{g=n.stateNode,Uf(t,n),N=n.memoizedProps,de=_l(r,N),g.props=de,ve=n.pendingProps,te=g.context,ae=r.contextType,X=go,typeof ae=="object"&&ae!==null&&(X=kn(ae)),z=r.getDerivedStateFromProps,(ae=typeof z=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(N!==ve||te!==X)&&tv(n,g,s,X),Mr=!1,te=n.memoizedState,g.state=te,zs(n,s,g,h),Os();var se=n.memoizedState;N!==ve||te!==se||Mr||t!==null&&t.dependencies!==null&&eu(t.dependencies)?(typeof z=="function"&&(uh(n,r,z,s),se=n.memoizedState),(de=Mr||ev(n,r,de,s,te,se,X)||t!==null&&t.dependencies!==null&&eu(t.dependencies))?(ae||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,se,X),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,se,X)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=se),g.props=s,g.state=se,g.context=X,s=de):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),s=!1)}return g=s,No(t,n),s=(n.flags&128)!==0,g||s?(g=n.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&s?(n.child=Tl(n,t.child,null,h),n.child=Tl(n,null,r,h)):sn(t,n,r,h),n.memoizedState=g.state,t=n.child):t=ar(t,n,h),t}function gv(t,n,r,s){return bl(),n.flags|=256,sn(t,n,r,s),n.child}var ph={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gh(t){return{baseLanes:t,cachePool:r1()}}function vh(t,n,r){return t=t!==null?t.childLanes&~r:0,n&&(t|=Ci),t}function vv(t,n,r){var s=n.pendingProps,h=!1,g=(n.flags&128)!==0,N;if((N=g)||(N=t!==null&&t.memoizedState===null?!1:(Nn.current&2)!==0),N&&(h=!0,n.flags&=-129),N=(n.flags&32)!==0,n.flags&=-33,t===null){if(et){if(h?Dr(n):Lr(),(t=Tt)?(t=H2(t,Ii),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Nr!==null?{id:ba,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},r=Qg(t),r.return=n,n.child=r,fn=n,Tt=null)):t=null,t===null)throw Tr(n);return gm(t)?n.lanes=32:n.lanes=536870912,null}return g=s.children,s=s.fallback,h?(Lr(),h=n.mode,g=bu({mode:"hidden",children:g},h),s=xl(s,h,r,null),g.return=n,s.return=n,g.sibling=s,n.child=g,s=n.child,s.memoizedState=gh(r),s.childLanes=vh(t,N,r),n.memoizedState=ph,Hs(null,s)):(Dr(n),yh(n,g))}var z=t.memoizedState;if(z!==null){var X=z.dehydrated;if(X!==null)return p6(t,n,g,N,s,X,z,r)}return h?(Lr(),h=s.fallback,g=n.mode,z=t.child,X=z.sibling,s=Ja(z,{mode:"hidden",children:s.children}),s.subtreeFlags=z.subtreeFlags&1206910976,X!==null?h=Ja(X,h):(h=xl(h,g,r,null),h.flags|=2),h.return=n,s.return=n,s.sibling=h,n.child=s,Hs(null,s),s=n.child,h=t.child.memoizedState,h===null?h=gh(r):(g=h.cachePool,g!==null?(z=Zt._currentValue,g=g.parent!==z?{parent:z,pool:z}:g):g=r1(),h={baseLanes:h.baseLanes|r,cachePool:g}),s.memoizedState=h,s.childLanes=vh(t,N,r),n.memoizedState=ph,Hs(t.child,s)):(Dr(n),r=t.child,t=r.sibling,r=Ja(r,{mode:"visible",children:s.children}),r.return=n,r.sibling=null,t!==null&&(N=n.deletions,N===null?(n.deletions=[t],n.flags|=16):N.push(t)),n.child=r,n.memoizedState=null,r)}function yh(t,n){return n=bu({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function bu(t,n){return t=ii(22,t,null,n),t.lanes=0,t}function ju(t,n,r){return Tl(n,t.child,null,r),t=yh(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function p6(t,n,r,s,h,g,N,z){if(r)return n.flags&256?(Dr(n),n.flags&=-257,ju(t,n,z)):n.memoizedState!==null?(Lr(),n.child=t.child,n.flags|=128,null):(Lr(),g=h.fallback,N=n.mode,h=bu({mode:"visible",children:h.children},N),g=xl(g,N,z,null),g.flags|=2,h.return=n,g.return=n,h.sibling=g,n.child=h,Tl(n,t.child,null,z),h=n.child,h.memoizedState=gh(z),h.childLanes=vh(t,s,z),n.memoizedState=ph,Hs(null,h));if(Dr(n),gm(g)){if(s=g.nextSibling&&g.nextSibling.dataset,s)var X=s.dgst;return s=X,s!==""&&(h=Error(l(419)),h.stack="",h.digest=s,Es({value:h,source:null,stack:null})),ju(t,n,z)}if(Wt||wl(t,n,z,!1),s=(z&t.childLanes)!==0,Wt||s){if(zr.current!==null)return ju(t,n,z);if(s=Ct,s!==null&&(h=un(s,z),h!==0&&h!==N.retryLane))throw N.retryLane=h,yl(t,h),oi(s,t,h),hh;return pm(g)||Hu(),ju(t,n,z)}return pm(g)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,Tt=Pi(g.nextSibling),fn=n,et=!0,Er=null,Ii=!1,t!==null&&Wg(n,t),n=yh(n,h.children),n.flags|=134221824,n)}function yv(t,n,r){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),Wc(t.return,n,r)}function xv(t){for(var n=null;t!==null;){var r=t.alternate;r!==null&&su(r)===null&&(n=t),t=t.sibling}return n}function wu(t,n,r,s,h,g){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:h,treeForkCount:g}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=s,N.tail=r,N.tailMode=h,N.treeForkCount=g)}function xh(t){var n=t.child;for(t.child=null;n!==null;){var r=n.sibling;n.sibling=t.child,t.child=n,n=r}}function bh(t,n,r){var s=n.pendingProps,h=s.revealOrder,g=s.tail;s=s.children;var N=Nn.current;if(n.flags&128)return Ds(n,N),null;var z=(N&2)!==0;if(z?(N=N&1|2,n.flags|=128):N&=1,Ds(n,N),h==="backwards"&&t!==null?(xh(t),sn(t,n,s,r),xh(t)):sn(t,n,s,r),s=et?Ns:0,!z&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&yv(t,r,n);else if(t.tag===19)yv(t,r,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":r=xv(n.child),r===null?(h=n.child,n.child=null):(h=r.sibling,r.sibling=null,xh(n)),wu(n,!0,h,null,g,s);break;case"unstable_legacy-backwards":for(r=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&su(t)===null){n.child=h;break}t=h.sibling,h.sibling=r,r=h,h=t}wu(n,!0,r,null,g,s);break;case"together":wu(n,!1,null,null,void 0,s);break;case"independent":n.memoizedState=null;break;default:r=xv(n.child),r===null?(h=n.child,n.child=null):(h=r.sibling,r.sibling=null),wu(n,!1,h,r,g,s)}return n.child}function bv(t,n,r){var s=n.pendingProps;return Ar(n,n.type,s.value),sn(t,n,s.children,r),n.child}function ar(t,n,r){if(t!==null&&(n.dependencies=t.dependencies),Pr|=n.lanes,(r&n.childLanes)===0)if(t!==null){if(wl(t,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(l(153));if(n.child!==null){for(t=n.child,r=Ja(t,t.pendingProps),n.child=r,r.return=n;t.sibling!==null;)t=t.sibling,r=r.sibling=Ja(t,t.pendingProps),r.return=n;r.sibling=null}return n.child}function jh(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&eu(t)))}function g6(t,n,r){switch(n.tag){case 3:di(n,n.stateNode.containerInfo),Ar(n,Zt,t.memoizedState.cache),bl();break;case 27:case 5:Yi(n);break;case 4:di(n,n.stateNode.containerInfo);break;case 10:Ar(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Gf(n),null;break;case 13:var s=n.memoizedState;if(s!==null){if(s.dehydrated!==null)return Dr(n),n.flags|=128,null;s=wl(t,n,r,!1);var h=n.child.childLanes;return s||(r&h)!==0?vv(t,n,r):(Dr(n),t=ar(t,n,r),t!==null?t.sibling:null)}Dr(n);break;case 19:if(n.flags&128)return bh(t,n,r);if(h=(t.flags&128)!==0,s=(r&n.childLanes)!==0,s||(wl(t,n,r,!1),s=(r&n.childLanes)!==0),h){if(s)return bh(t,n,r);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ds(n,Nn.current),s)break;return null;case 22:return n.lanes=0,dv(t,n,r,n.pendingProps);case 24:Ar(n,Zt,t.memoizedState.cache)}return ar(t,n,r)}function jv(t,n,r){if(t!==null)if(t.memoizedProps!==n.pendingProps)Wt=!0;else{if(!jh(t,r)&&(n.flags&128)===0)return Wt=!1,g6(t,n,r);Wt=(t.flags&131072)!==0}else Wt=!1,et&&(n.flags&1048576)!==0&&Jg(n,Ns,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=Nl(n.elementType),n.type=t,typeof t=="function")Tf(t)?(s=_l(t,s),n.tag=1,n=pv(null,n,t,s,r)):(n.tag=0,n=mh(null,n,t,s,r));else{if(t!=null){var h=t.$$typeof;if(h===K){n.tag=11,n=sv(null,n,t,s,r);break e}else if(h===ne){n.tag=14,n=cv(null,n,t,s,r);break e}else if(h===H){n.tag=10,n.type=t,n=bv(null,n,r);break e}}throw n=xe(t)||t,Error(l(306,n,""))}}return n;case 0:return mh(t,n,n.type,n.pendingProps,r);case 1:return s=n.type,h=_l(s,n.pendingProps),pv(t,n,s,h,r);case 3:e:{if(di(n,n.stateNode.containerInfo),t===null)throw Error(l(387));s=n.pendingProps;var g=n.memoizedState;h=g.element,Uf(t,n),zs(n,s,null,r);var N=n.memoizedState;if(s=N.cache,Ar(n,Zt,s),s!==g.cache&&Df(n,[Zt],r,!0),Os(),s=N.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=gv(t,n,s,r);break e}else if(s!==h){h=Di(Error(l(424)),n),Es(h),n=gv(t,n,s,r);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(Tt=Pi(t.firstChild),fn=n,et=!0,Er=null,Ii=!0,r=d1(n,null,s,r),n.child=r;r;)r.flags=r.flags&-3|134221824,r=r.sibling}else{if(bl(),s===h){n=ar(t,n,r);break e}sn(t,n,s,r)}n=n.child}return n;case 26:return No(t,n),t===null?(r=G2(n.type,null,n.pendingProps,null))?n.memoizedState=r:et||(n.stateNode=C2(n.type,n.pendingProps,yn.current,n)):n.memoizedState=G2(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Yi(n),t===null&&et&&(s=n.stateNode=q2(n.type,n.pendingProps,yn.current),fn=n,Ii=!0,h=Tt,Vr(n.type)?(vm=h,Tt=Pi(s.firstChild)):Tt=h),sn(t,n,n.pendingProps.children,r),No(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&et&&((h=s=Tt)&&(s=uk(s,n.type,n.pendingProps,Ii),s!==null?(n.stateNode=s,fn=n,Tt=Pi(s.firstChild),Ii=!1,h=!0):h=!1),h||Tr(n)),Yi(n),h=n.type,g=n.pendingProps,N=t!==null?t.memoizedProps:null,s=g.children,sm(h,g)?s=null:N!==null&&sm(h,N)&&(n.flags|=32),n.memoizedState!==null&&(h=Kf(t,n,r6,null,null,r),Vo._currentValue=h),No(t,n),sn(t,n,s,r),n.child;case 6:return t===null&&et&&((t=r=Tt)&&(r=dk(r,n.pendingProps,Ii),r!==null?(n.stateNode=r,fn=n,Tt=null,t=!0):t=!1),t||Tr(n)),null;case 13:return vv(t,n,r);case 4:return di(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Tl(n,null,s,r):sn(t,n,s,r),n.child;case 11:return sv(t,n,n.type,n.pendingProps,r);case 7:return s=n.pendingProps,No(t,n),sn(t,n,s,r),n.child;case 8:return sn(t,n,n.pendingProps.children,r),n.child;case 12:return sn(t,n,n.pendingProps.children,r),n.child;case 10:return bv(t,n,r);case 9:return h=n.type._context,s=n.pendingProps.children,Sl(n),h=kn(h),s=s(h),n.flags|=1,sn(t,n,s,r),n.child;case 14:return cv(t,n,n.type,n.pendingProps,r);case 15:return uv(t,n,n.type,n.pendingProps,r);case 19:return bh(t,n,r);case 31:return m6(t,n,r);case 22:return dv(t,n,r,n.pendingProps);case 24:return Sl(n),s=kn(Zt),t===null?(h=If(),h===null&&(h=Ct,g=Lf(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=r),h=g),n.memoizedState={parent:s,cache:h},Pf(n),Ar(n,Zt,h)):((t.lanes&r)!==0&&(Uf(t,n),zs(n,null,null,r),Os()),h=t.memoizedState,g=n.memoizedState,h.parent!==s?(h={parent:s,cache:s},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Ar(n,Zt,s)):(s=g.cache,Ar(n,Zt,s),s!==h.cache&&Df(n,[Zt],r,!0))),sn(t,n,n.pendingProps.children,r),n.child;case 30:return n.stateNode===null&&(n.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=n.pendingProps,s.name!=null&&s.name!=="auto"?n.flags|=t===null?18882560:18874368:et&&Zc(n),t!==null&&t.memoizedProps.name!==s.name?n.flags|=4194816:No(t,n),sn(t,n,s.children,r),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function rr(t){t.flags|=4}function wh(t,n,r,s,h){var g;if((g=(t.mode&32)!==0)&&(g=r===null?Q2(n,s):Q2(n,s)&&(s.src!==r.src||s.srcSet!==r.srcSet)),g){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(n2())t.flags|=8192;else throw El=au,Hf}else t.flags&=-16777217}function wv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Z2(n))if(n2())t.flags|=8192;else throw El=au,Hf}function Su(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?gi():536870912,t.lanes|=n,Mo|=n)}function Ps(t,n){if(!et)switch(t.tailMode){case"visible":break;case"collapsed":for(var r=t.tail,s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null;break;default:for(n=t.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t.tail=null:r.sibling=null}}function At(t){var n=t.alternate!==null&&t.alternate.child===t.child,r=0,s=0;if(n)for(var h=t.child;h!==null;)r|=h.lanes|h.childLanes,s|=h.subtreeFlags&1206910976,s|=h.flags&1206910976,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)r|=h.lanes|h.childLanes,s|=h.subtreeFlags,s|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=s,t.childLanes=r,n}function v6(t,n,r){var s=n.pendingProps;switch(Mf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(n),null;case 1:return At(n),null;case 3:return r=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),tr(Zt),rn(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(xo(n)?rr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Of())),At(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(rr(n),g!==null?(At(n),wv(n,g)):(At(n),wh(n,h,null,s,r))):g?g!==t.memoizedState?(rr(n),At(n),wv(n,g)):(At(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&rr(n),At(n),wh(n,h,t,s,r)),null;case 27:if(pe(n),r=yn.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&rr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return At(n),n.subtreeFlags&=-33554433,null}t=_t.current,xo(n)?e1(n):(t=q2(h,s,r),n.stateNode=t,rr(n))}return At(n),n.subtreeFlags&=-33554433,null;case 5:if(pe(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&rr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return At(n),n.subtreeFlags&=-33554433,null}if(g=_t.current,xo(n))e1(n);else{var N=Zs(yn.current);switch(g){case 1:g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=N.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?N.createElement("select",{is:s.is}):N.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?N.createElement(h,{is:s.is}):N.createElement(h)}}g[Mt]=n,g[$t]=s;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)g.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===n)break e;for(;N.sibling===null;){if(N.return===null||N.return===n)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}n.stateNode=g;e:switch(Tn(g,h,s),h){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&rr(n)}}return At(n),n.subtreeFlags&=-33554433,wh(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,r),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&rr(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(l(166));if(t=yn.current,xo(n)){if(t=n.stateNode,r=n.memoizedProps,s=null,h=fn,h!==null)switch(h.tag){case 27:case 5:s=h.memoizedProps}t[Mt]=n,t=!!(t.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||j2(t.nodeValue,r)),t||Tr(n,!0)}else t=Zs(t).createTextNode(s),t[Mt]=n,n.stateNode=t}return At(n),null;case 31:if(r=n.memoizedState,t===null||t.memoizedState!==null){if(s=xo(n),r!==null){if(t===null){if(!s)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Mt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;At(n),t=!1}else r=Of(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return n.flags&256?(wi(n),n):(wi(n),null);if((n.flags&128)!==0)throw Error(l(558))}return At(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=xo(n),s!==null&&s.dehydrated!==null){if(t===null){if(!h)throw Error(l(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[Mt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;At(n),h=!1}else h=Of(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(wi(n),n):(wi(n),null)}return wi(n),(n.flags&128)!==0?(n.lanes=r,n):(r=s!==null,t=t!==null&&t.memoizedState!==null,r&&(s=n.child,h=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(h=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==h&&(s.flags|=2048)),r!==t&&r&&(n.child.flags|=8192),Su(n,n.updateQueue),At(n),null);case 4:return rn(),t===null&&im(n.stateNode.containerInfo),n.flags|=67108864,At(n),null;case 10:return tr(n.type),At(n),null;case 19:if(Yf(n),s=n.memoizedState,s===null)return At(n),null;if(h=(n.flags&128)!==0,g=s.rendering,g===null)if(h)Ps(s,!1);else{if(Ft!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=su(t),g!==null){for(n.flags|=128,Ps(s,!1),t=g.updateQueue,n.updateQueue=t,Su(n,t),n.subtreeFlags=0,t=r,r=n.child;r!==null;)Kg(r,t),r=r.sibling;return Ds(n,Nn.current&1|2),et&&Wa(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Xt()>Du&&(n.flags|=128,h=!0,Ps(s,!1),n.lanes=4194304)}else{if(!h)if(t=su(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Su(n,t),Ps(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!g.alternate&&!et)return At(n),null}else 2*Xt()-s.renderingStartTime>Du&&r!==536870912&&(n.flags|=128,h=!0,Ps(s,!1),n.lanes=4194304);s.isBackwards?(g.sibling=n.child,n.child=g):(t=s.last,t!==null?t.sibling=g:n.child=g,s.last=g)}if(s.tail!==null){t=s.tail;e:{for(r=t;r!==null;){if(r.alternate!==null){r=!1;break e}r=r.sibling}r=!0}return s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xt(),t.sibling=null,g=Nn.current,g=h?g&1|2:g&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!r||et?Ds(n,g):(r=g,Je(Cn,n),Je(Nn,r),Ln===null&&(Ln=n)),et&&Wa(n,s.treeForkCount),t}return At(n),null;case 22:case 23:return wi(n),$f(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(r&536870912)!==0&&(n.flags&128)===0&&(At(n),n.subtreeFlags&6&&(n.flags|=8192)):At(n),r=n.updateQueue,r!==null&&Su(n,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==r&&(n.flags|=2048),t!==null&&ot(Cl),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),tr(Zt),At(n),null;case 25:return null;case 30:return n.flags|=33554432,At(n),null}throw Error(l(156,n.tag))}function y6(t,n){switch(Mf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return tr(Zt),rn(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return pe(n),null;case 31:if(n.memoizedState!==null){if(wi(n),n.alternate===null)throw Error(l(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(wi(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Yf(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 rn(),null;case 10:return tr(n.type),null;case 22:case 23:return wi(n),$f(),t!==null&&ot(Cl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return tr(Zt),null;case 25:return null;default:return null}}function Sv(t,n){switch(Mf(n),n.tag){case 3:tr(Zt),rn();break;case 26:case 27:case 5:pe(n);break;case 4:rn();break;case 31:n.memoizedState!==null&&wi(n);break;case 13:wi(n);break;case 19:Yf(n);break;case 10:tr(n.type);break;case 22:case 23:wi(n),$f(),t!==null&&ot(Cl);break;case 24:tr(Zt)}}function Us(t,n){try{var r=n.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var h=s.next;r=h;do{if((r.tag&t)===t){s=void 0;var g=r.create,N=r.inst;s=g(),N.destroy=s}r=r.next}while(r!==h)}}catch(z){bt(n,n.return,z)}}function Br(t,n,r){try{var s=n.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var g=h.next;s=g;do{if((s.tag&t)===t){var N=s.inst,z=N.destroy;if(z!==void 0){N.destroy=void 0,h=n;var X=r,ae=z;try{ae()}catch(de){bt(h,X,de)}}}s=s.next}while(s!==g)}}catch(de){bt(n,n.return,de)}}function kv(t){var n=t.updateQueue;if(n!==null){var r=t.stateNode;try{h1(n,r)}catch(s){bt(t,t.return,s)}}}function Cv(t,n,r){r.props=_l(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(s){bt(t,n,s)}}function wa(t,n){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:var h=t.stateNode,g=Qa(t.memoizedProps,h);(h.ref===null||h.ref.name!==g)&&(h.ref=R2(g)),s=h.ref;break;case 7:if(t.stateNode===null){var N=new Ei(t);p(t.child,!1,sk,N,void 0,void 0),t.stateNode=N}s=t.stateNode;break;default:s=t.stateNode}typeof r=="function"?t.refCleanup=r(s):r.current=s}}catch(z){bt(t,n,z)}}function En(t,n){var r=t.ref,s=t.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(h){bt(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(h){bt(t,n,h)}else r.current=null}function ku(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var r=0;r<n.length;r++)I2(t.stateNode,n[r])}function Nv(t){for(var n=t.return;n!==null&&(kh(n)&&I2(t.stateNode,n.stateNode),!Sh(n));)n=n.return}function qs(t){for(var n=t.return;n!==null&&(kh(n)&&ck(t.stateNode,n.stateNode),!Sh(n));)n=n.return}function Sh(t){return t.tag===5||t.tag===3||t.tag===27}function kh(t){return t&&t.tag===7&&t.stateNode!==null}function Ch(t){var n=t.type,r=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(h){bt(t,t.return,h)}}function Nh(t,n,r){try{var s=t.stateNode;V6(s,t.type,r,n),s[$t]=n}catch(h){bt(t,t.return,h)}}function Ev(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Vr(t.type)||t.tag===4}function Eh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ev(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&&Vr(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 Th(t,n,r,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(h,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(h),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Fn)),ku(t,s),Pe=!0;else if(h!==4&&(h===27&&(ku(t,s),s=null,Vr(t.type)&&(r=t.stateNode,n=null)),t=t.child,t!==null))for(Th(t,n,r,s),t=t.sibling;t!==null;)Th(t,n,r,s),t=t.sibling}function Cu(t,n,r,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?r.insertBefore(h,n):r.appendChild(h),ku(t,s),Pe=!0;else if(h!==4&&(h===27&&(ku(t,s),s=null,Vr(t.type)&&(r=t.stateNode)),t=t.child,t!==null))for(Cu(t,n,r,s),t=t.sibling;t!==null;)Cu(t,n,r,s),t=t.sibling}function Tv(t){var n=t.stateNode,r=t.memoizedProps;try{for(var s=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Tn(n,s,r),n[Mt]=t,n[$t]=r}catch(g){bt(t,t.return,g)}}var Nu=!1,Si=null;function Av(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Nu=!0)}var Sa=null;function _v(){var t=Sa;return Sa=null,t}var ai=0;function Eo(t,n,r,s,h){return ai=0,Mv(t.child,n,r,s,h)}function Mv(t,n,r,s,h){for(var g=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(s!==null){var z=dm(N);s.push(z),z.view&&(g=!0)}else g||dm(N).view&&(g=!0);Nu=!0,_2(N,ai===0?n:n+"_"+ai,r),ai++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h||Mv(t.child,n,r,s,h)&&(g=!0));t=t.sibling}return g}function ka(t,n){for(;t!==null;)t.tag===5?M2(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||ka(t.child,n)),t=t.sibling}function Eu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Eu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var n=t.memoizedProps;if(n.name==null||n.name==="auto")throw Error(l(544));var r=n.name;n=Za(n.default,n.share),n!=="none"&&(Eo(t,r,n,null,!1)||ka(t.child,!1))}t=t.sibling}}function Ah(t,n){if(t.tag===30){var r=t.stateNode,s=t.memoizedProps,h=Qa(s,r),g=Za(s.default,r.paired?s.share:s.enter);g!=="none"?Eo(t,h,g,null,!1)?(Eu(t),r.paired||n||Do(t,s.onEnter)):ka(t.child,!1):Eu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ah(t,n),t=t.sibling;else Eu(t)}function _h(t){if(Si!==null&&Si.size!==0){var n=Si;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 r=t.memoizedProps,s=r.name;if(s!=null&&s!=="auto"){var h=n.get(s);if(h!==void 0){var g=Za(r.default,r.share);if(g!=="none"&&(Eo(t,s,g,null,!1)?(g=t.stateNode,h.paired=g,g.paired=h,Do(t,r.onShare)):ka(t.child,!1)),n.delete(s),n.size===0)break}}}_h(t)}t=t.sibling}}}function Mh(t){if(t.tag===30){var n=t.memoizedProps,r=Qa(n,t.stateNode),s=Si!==null?Si.get(r):void 0,h=Za(n.default,s!==void 0?n.share:n.exit);h!=="none"&&(Eo(t,r,h,null,!1)?s!==void 0?(h=t.stateNode,s.paired=h,h.paired=s,Si.delete(r),Do(t,n.onShare)):Do(t,n.onExit):ka(t.child,!1)),Si!==null&&_h(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Mh(t),t=t.sibling;else Si!==null&&_h(t)}function Rv(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,r=Qa(n,t.stateNode);n=Za(n.default,n.update),t.flags&=-5,n!=="none"&&Eo(t,r,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Rv(t);t=t.sibling}}function Rh(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,ka(t.child,!1))}Rh(t)}t=t.sibling}}function Tu(t){if(t.tag===30)t.stateNode.paired=null,ka(t.child,!1),Rh(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Tu(t),t=t.sibling;else Rh(t)}function Ov(t){for(t=t.child;t!==null;)t.tag===30?ka(t.child,!1):(t.subtreeFlags&33554432)!==0&&Ov(t),t=t.sibling}function Oh(t,n,r,s,h,g,N){for(var z=!1;n!==null;){if(n.tag===5){var X=n.stateNode;if(g!==null&&ai<g.length){var ae=g[ai],de=dm(X);(ae.view||de.view)&&(z=!0);var ve;if(ve=(t.flags&4)===0)if(de.clip)ve=!0;else{ve=ae.rect;var te=de.rect;ve=ve.y!==te.y||ve.x!==te.x||ve.height!==te.height||ve.width!==te.width}ve&&(t.flags|=4),de.abs?de=!ae.abs:(ae=ae.rect,de=de.rect,de=ae.height!==de.height||ae.width!==de.width),de&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&_2(X,ai===0?r:r+"_"+ai,h),z&&(t.flags&4)!==0||(Sa===null&&(Sa=[]),Sa.push(X,ai===0?s:s+"_"+ai,n.memoizedProps)),ai++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&N?t.flags|=n.flags&32:Oh(t,n.child,r,s,h,g,N)&&(z=!0));n=n.sibling}return z}function zv(t,n){for(t=t.child;t!==null;){if(t.tag===30){var r=t.memoizedProps,s=t.stateNode,h=Qa(r,s),g=Za(r.default,r.update),N;N=t.memoizedState,t.memoizedState=null,s=t;var z=t.child;ai=0,h=Oh(s,z,h,h,g,N,!1),(t.flags&4)!==0&&h&&Do(t,r.onUpdate)}else(t.subtreeFlags&33554432)!==0&&zv(t);t=t.sibling}}var hn=!1,vt=!1,Ca=!1,zh=!1,Dv=typeof WeakSet=="function"?WeakSet:Set,mn=null,Na=!1,Fs=!1,Au=!1,Dh=!1;function x6(t,n,r){if(t=t.containerInfo,lm=$o,t=Hg(t),jf(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var h=s.getSelection&&s.getSelection();if(h&&h.rangeCount!==0){s=h.anchorNode;var g=h.anchorOffset,N=h.focusNode;h=h.focusOffset;try{s.nodeType,N.nodeType}catch{s=null;break e}var z=0,X=-1,ae=-1,de=0,ve=0,te=t,se=null;t:for(;;){for(var Ce;te!==s||g!==0&&te.nodeType!==3||(X=z+g),te!==N||h!==0&&te.nodeType!==3||(ae=z+h),te.nodeType===3&&(z+=te.nodeValue.length),(Ce=te.firstChild)!==null;)se=te,te=Ce;for(;;){if(te===t)break t;if(se===s&&++de===g&&(X=z),se===N&&++ve===h&&(ae=z),(Ce=te.nextSibling)!==null)break;te=se,se=te.parentNode}te=Ce}s=X===-1||ae===-1?null:{start:X,end:ae}}else s=null}s=s||{start:0,end:0}}else s=null;for(om={focusedElem:t,selectionRange:s},$o=!1,r=(r&335544064)===r,mn=n,n=r?9270:1024;mn!==null;){if(t=mn,r&&(s=t.deletions,s!==null))for(g=0;g<s.length;g++)r&&Mh(s[g]);if(t.alternate===null&&(t.flags&2)!==0)r&&Av(t),_u(r);else{if(t.tag===22){if(s=t.alternate,t.memoizedState!==null){s!==null&&s.memoizedState===null&&r&&Mh(s),_u(r);continue}else if(s!==null&&s.memoizedState!==null){r&&Av(t),_u(r);continue}}s=t.child,(t.subtreeFlags&n)!==0&&s!==null?(s.return=t,mn=s):(r&&Rv(t),_u(r))}}Si=null}function _u(t){for(;mn!==null;){var n=mn,r=t,s=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&s!==null){r=void 0,h=s.memoizedProps,s=s.memoizedState;var g=n.stateNode;try{var N=_l(n.type,h);r=g.getSnapshotBeforeUpdate(N,s),g.__reactInternalSnapshotBeforeUpdate=r}catch(z){bt(n,n.return,z)}}break;case 3:if((h&1024)!==0){if(s=n.stateNode.containerInfo,r=s.nodeType,r===9)mm(s);else if(r===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":mm(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:r&&s!==null&&(r=Qa(s.memoizedProps,s.stateNode),h=n.memoizedProps,h=Za(h.default,h.update),h!=="none"&&Eo(s,r,h,s.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(l(163))}if(s=n.sibling,s!==null){s.return=n.return,mn=s;break}mn=n.return}}function Lv(t,n,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:Ea(t,r),s&4&&Us(5,r);break;case 1:if(Ea(t,r),s&4)if(t=r.stateNode,n===null)try{t.componentDidMount()}catch(N){bt(r,r.return,N)}else{var h=_l(r.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){bt(r,r.return,N)}}s&64&&kv(r),s&512&&wa(r,r.return);break;case 3:if(Ea(t,r),s&64&&(t=r.updateQueue,t!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{h1(t,n)}catch(N){bt(r,r.return,N)}}break;case 27:n===null&&s&4&&Tv(r);case 26:case 5:Ea(t,r),n===null&&s&4&&Ch(r),s&512&&wa(r,r.return);break;case 12:Ea(t,r);break;case 31:Ea(t,r),s&4&&Pv(t,r);break;case 13:Ea(t,r),s&4&&Uv(t,r),s&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=M6.bind(null,r),fk(t,r))));break;case 22:if(s=r.memoizedState!==null||hn,!s){var g=n!==null&&n.memoizedState!==null||vt;n=hn,h=vt,hn=s,(vt=g)&&!h?(s=2,(r.subtreeFlags&8772)!==0&&(s|=1),ta(t,r,s)):Ea(t,r),hn=n,vt=h}break;case 30:Ea(t,r),s&512&&wa(r,r.return);break;case 7:s&512&&wa(r,r.return);default:Ea(t,r)}}function Lh(t,n){for(t=t.child;t!==null;)Bv(t,n),t=t.sibling}function Bv(t,n){switch(t.tag){case 5:case 26:try{var r=t.stateNode;if(n){var s=r.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var h=t.stateNode,g=t.memoizedProps.style,N=g!=null&&g.hasOwnProperty("display")?g.display:null;h.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(X){bt(t,t.return,X)}Bh(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,Pe=!0}catch(X){bt(t,t.return,X)}break;case 18:try{var z=t.stateNode;n?A2(z,!0):A2(t.stateNode,!1)}catch(X){bt(t,t.return,X)}break;case 22:case 23:t.memoizedState===null&&Lh(t,n);break;default:Lh(t,n)}}function Bh(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var r=t,s=n;switch(r.tag){case 4:Bv(r,s);break e;case 22:r.memoizedState===null&&Bh(r,s);break e;default:Bh(r,s)}}t=t.sibling}}function Iv(t){var n=t.alternate;n!==null&&(t.alternate=null,Iv(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ya(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var zt=null,ri=!1;function Wi(t,n,r){for(r=r.child;r!==null;)Hv(t,n,r),r=r.sibling}function Hv(t,n,r){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Xi,r)}catch{}switch(r.tag){case 26:vt||En(r,n),Wi(t,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&!vt&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:vt||En(r,n),qs(r);var s=zt,h=ri;Vr(r.type)&&(zt=r.stateNode,ri=!1),Wi(t,n,r),F2(r.stateNode,r.type,r.memoizedProps),zt=s,ri=h;break;case 5:vt||En(r,n),qs(r);case 6:if(r.tag===6&&qs(r),s=zt,h=ri,zt=null,Wi(t,n,r),zt=s,ri=h,zt!==null)if(ri)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(r.stateNode),Pe=!0}catch(g){bt(r,n,g)}else try{zt.removeChild(r.stateNode),Pe=!0}catch(g){bt(r,n,g)}break;case 18:zt!==null&&(ri?(t=zt,T2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),Go(t)):T2(zt,r.stateNode));break;case 4:s=zt,h=ri,zt=r.stateNode.containerInfo,ri=!0,Wi(t,n,r),zt=s,ri=h;break;case 0:case 11:case 14:case 15:Br(2,r,n),vt||Br(4,r,n),Wi(t,n,r);break;case 1:vt||(En(r,n),s=r.stateNode,typeof s.componentWillUnmount=="function"&&Cv(r,n,s)),Wi(t,n,r);break;case 21:Wi(t,n,r);break;case 22:vt=(s=vt)||r.memoizedState!==null,Wi(t,n,r),vt=s;break;case 30:En(r,n),Wi(t,n,r);break;case 7:vt||En(r,n),Wi(t,n,r);break;default:Wi(t,n,r)}}function Pv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Go(t)}catch(r){bt(n,n.return,r)}}}function Uv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Go(t)}catch(r){bt(n,n.return,r)}}function b6(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Dv),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Dv),n;default:throw Error(l(435,t.tag))}}function Mu(t,n){var r=b6(t);n.forEach(function(s){if(!r.has(s)){r.add(s);var h=R6.bind(null,t,s);s.then(h,h)}})}function Gn(t,n,r){var s=n.deletions;if(s!==null)for(var h=0;h<s.length;h++){var g=s[h],N=t,z=n,X=z;e:for(;X!==null;){switch(X.tag){case 27:if(Vr(X.type)){zt=X.stateNode,ri=!1;break e}break;case 5:zt=X.stateNode,ri=!1;break e;case 3:case 4:zt=X.stateNode.containerInfo,ri=!0;break e}X=X.return}if(zt===null)throw Error(l(160));Hv(N,z,g),zt=null,ri=!1,N=g.alternate,N!==null&&(N.return=null),g.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)qv(n,t,r),n=n.sibling}var ea=null;function qv(t,n,r){var s=t.alternate,h=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(h&4&&(s=t.updateQueue,s=s!==null?s.events:null,s!==null))for(var g=0;g<s.length;g++){var N=s[g];N.ref.impl=N.nextImpl}Gn(n,t,r),Yn(t),h&4&&(Br(3,t,t.return),Us(3,t),Br(5,t,t.return));break;case 1:Gn(n,t,r),Yn(t),h&512&&(vt||s===null||En(s,s.return)),h&64&&hn&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:if(g=ea,Gn(n,t,r),Yn(t),h&512&&(vt||s===null||En(s,s.return)),h&4)if(h=s!==null?s.memoizedState:null,r=t.memoizedState,s===null)if(r===null)if(t.stateNode===null)if(hn)t.stateNode=C2(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,r=t.memoizedProps,h=g.ownerDocument||g;t:switch(n){case"title":s=h.getElementsByTagName("title")[0],(!s||s[ya]||s[Mt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=h.createElement(n),h.head.insertBefore(s,h.querySelector("head > title"))),Tn(s,n,r),s[Mt]=t,Q(s),n=s;break e;case"link":if(g=K2("link","href",h).get(n+(r.href||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&s.getAttribute("rel")===(r.rel==null?null:r.rel)&&s.getAttribute("title")===(r.title==null?null:r.title)&&s.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,r),h.head.appendChild(s);break;case"meta":if(g=K2("meta","content",h).get(n+(r.content||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("content")===(r.content==null?null:""+r.content)&&s.getAttribute("name")===(r.name==null?null:r.name)&&s.getAttribute("property")===(r.property==null?null:r.property)&&s.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&s.getAttribute("charset")===(r.charSet==null?null:r.charSet)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,r),h.head.appendChild(s);break;default:throw Error(l(468,n))}s[Mt]=t,Q(s),n=s}t.stateNode=n}else hn||jm(g,t.type,t.stateNode);else t.stateNode=X2(g,r,t.memoizedProps);else h!==r?(h===null?(n=s.stateNode,n===null||vt||n.parentNode.removeChild(n)):h.count--,r===null?hn||jm(g,t.type,t.stateNode):X2(g,r,t.memoizedProps)):r===null&&t.stateNode!==null&&Nh(t,t.memoizedProps,s.memoizedProps);break;case 27:Gn(n,t,r),Yn(t),h&512&&(vt||s===null||En(s,s.return)),s!==null&&h&4&&Nh(t,t.memoizedProps,s.memoizedProps);break;case 5:if(g=Ca,Ca=!1,Gn(n,t,r),Ca=g,Yn(t),h&512&&(vt||s===null||En(s,s.return)),t.flags&32){n=t.stateNode;try{qn(n,""),Pe=!0}catch(de){bt(t,t.return,de)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,Nh(t,n,s!==null?s.memoizedProps:n)),h&1024&&(zh=!0);break;case 6:if(Gn(n,t,r),Yn(t),h&4){if(t.stateNode===null)throw Error(l(162));n=t.memoizedProps,r=t.stateNode;try{r.nodeValue=n,Pe=!0}catch(de){bt(t,t.return,de)}}break;case 3:if(Pe=!1,Gu=null,g=ea,ea=Js(n.containerInfo),Gn(n,t,r),ea=g,Yn(t),h&4&&s!==null&&s.memoizedState.isDehydrated)try{Go(n.containerInfo)}catch(de){bt(t,t.return,de)}zh&&(zh=!1,Fv(t)),Pe=!1;break;case 4:h=Ca,Ca=hn,s=on(),g=ea,ea=Js(t.stateNode.containerInfo),Gn(n,t,r),Yn(t),ea=g,Pe&&Fs&&(Au=!0),Pe=s,Ca=h;break;case 12:Gn(n,t,r),Yn(t);break;case 31:Gn(n,t,r),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 13:Gn(n,t,r),Yn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(zu=Xt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 22:g=t.memoizedState!==null,N=s!==null&&s.memoizedState!==null;var z=hn,X=vt,ae=Ca;hn=z||g,Ca=ae||g,vt=X||N,Gn(n,t,r),vt=X,Ca=ae,hn=z,Yn(t),h&8192&&(n=t.stateNode,n._visibility=g?n._visibility&-2:n._visibility|1,!g||s===null||N||hn||vt||(n=N||vt,r=hn,s=vt,hn=g||hn,vt=n,Ir(t,2),hn=r,vt=s),!g&&Ca||Lh(t,g)),h&4&&(n=t.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,Mu(t,r))));break;case 19:Gn(n,t,r),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 30:h&512&&(vt||s===null||En(s,s.return)),h=on(),g=Fs,N=(r&335544064)===r,z=t.memoizedProps,Fs=N&&Za(z.default,z.update)!=="none",Gn(n,t,r),Yn(t),N&&s!==null&&Pe&&(t.flags|=4),Fs=g,Pe=h;break;case 21:break;case 7:h&512&&(vt||s===null||En(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=t);default:Gn(n,t,r),Yn(t)}}function Yn(t){var n=t.flags;if(n&2){try{for(var r,s=t.return;s!==null;){if(Ev(s)){r=s;break}s=s.return}s=null;for(var h=t.return;h!==null;){if(kh(h)){var g=h.stateNode;s===null?s=[g]:s.push(g)}if(Sh(h))break;h=h.return}var N=s;if(r==null)throw Error(l(160));switch(r.tag){case 27:var z=r.stateNode,X=Eh(t);Cu(t,X,z,N);break;case 5:var ae=r.stateNode;r.flags&32&&(qn(ae,""),r.flags&=-33);var de=Eh(t);Cu(t,de,ae,N);break;case 3:case 4:var ve=r.stateNode.containerInfo,te=Eh(t);Th(t,te,ve,N);break;default:throw Error(l(161))}}catch(se){bt(t,t.return,se)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Fv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Fv(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,$o=!0,n.reset(),$o=!1),t=t.sibling}}function To(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)Vv(n,t),n=n.sibling;else zv(n)}function Vv(t,n){var r=t.alternate;if(r===null)Ah(t,!1);else switch(t.tag){case 3:if(Dh=Na=!1,_v(),To(n,t),!Na&&!Au){if(t=Sa,t!==null)for(var s=0;s<t.length;s+=3){r=t[s];var h=t[s+1];M2(r,t[s+2]),r=r.ownerDocument.documentElement,r!==null&&r.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"})),Dh=!0}Sa=null;break;case 5:To(n,t);break;case 4:s=Na,Na=!1,To(n,t),Na&&(Au=!0),Na=s;break;case 22:t.memoizedState===null&&(r.memoizedState!==null?Ah(t,!1):To(n,t));break;case 30:s=Na,h=_v(),Na=!1,To(n,t),Na&&(t.flags|=4);var g=t.memoizedProps,N=t.stateNode;n=Qa(g,N),N=Qa(r.memoizedProps,N);var z=Za(g.default,g.update);z==="none"?n=!1:(g=r.memoizedState,r.memoizedState=null,r=t.child,ai=0,n=Oh(t,r,n,N,z,g,!0),ai!==(g===null?0:g.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Do(t,t.memoizedProps.onUpdate),Sa=h):h!==null&&(h.push.apply(h,Sa),Sa=h),Na=(t.flags&32)!==0?!0:s;break;default:To(n,t)}}function Ea(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Lv(t,n.alternate,n),n=n.sibling}function Ir(t,n){for(t=t.child;t!==null;){var r=t,s=n;switch(r.tag){case 0:case 11:case 14:case 15:Br(4,r,r.return),Ir(r,s);break;case 1:En(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&Cv(r,r.return,h),Ir(r,s);break;case 27:(s&2)!==0&&F2(r.stateNode,r.type,r.memoizedProps);case 5:En(r,r.return),r.tag!==5&&r.tag!==27||qs(r),Ir(r,s);break;case 6:qs(r);break;case 26:En(r,r.return),h=r.stateNode,r.memoizedState!==null||h===null||vt||h.parentNode.removeChild(h),Ir(r,s);break;case 22:r.memoizedState===null&&Ir(r,s);break;case 30:En(r,r.return),Ir(r,s);break;case 7:En(r,r.return);default:Ir(r,s)}t=t.sibling}}function ta(t,n,r){for(r=(n.subtreeFlags&8772)!==0?r:r&-2,n=n.child;n!==null;){var s=n.alternate,h=t,g=n,N=g.flags,z=(r&1)!==0;switch(g.tag){case 0:case 11:case 15:ta(h,g,r),Us(4,g);break;case 1:if(ta(h,g,r),s=g,h=s.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(de){bt(s,s.return,de)}if(s=g,h=s.updateQueue,h!==null){var X=s.stateNode;try{var ae=h.shared.hiddenCallbacks;if(ae!==null)for(h.shared.hiddenCallbacks=null,h=0;h<ae.length;h++)f1(ae[h],X)}catch(de){bt(s,s.return,de)}}z&&N&64&&kv(g),wa(g,g.return);break;case 27:(r&2)!==0&&Tv(g);case 5:g.tag!==5&&g.tag!==27||Nv(g),ta(h,g,r),z&&s===null&&N&4&&Ch(g),wa(g,g.return);break;case 6:Nv(g);break;case 26:X=g.stateNode,g.memoizedState!==null||X===null||hn||jm(Js(X.ownerDocument),g.type,X),ta(h,g,r),z&&s===null&&N&4&&Ch(g),wa(g,g.return);break;case 12:ta(h,g,r);break;case 31:ta(h,g,r),z&&N&4&&Pv(h,g);break;case 13:ta(h,g,r),z&&N&4&&Uv(h,g);break;case 22:g.memoizedState===null&&ta(h,g,r),wa(g,g.return);break;case 30:ta(h,g,r),wa(g,g.return);break;case 7:wa(g,g.return);default:ta(h,g,r)}n=n.sibling}}function Ih(t,n){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==r&&(t!=null&&t.refCount++,r!=null&&Ts(r))}function Hh(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ts(t))}function Hi(t,n,r,s){var h=(r&335544064)===r;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)$v(t,n,r,s),n=n.sibling;else h&&Ov(n)}function $v(t,n,r,s){var h=(r&335544064)===r;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Tu(n);var g=n.flags;switch(n.tag){case 0:case 11:case 15:Hi(t,n,r,s),g&2048&&Us(9,n);break;case 1:Hi(t,n,r,s);break;case 3:Hi(t,n,r,s),h&&Dh&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),g&2048&&(g=null,n.alternate!==null&&(g=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==g&&(n.refCount++,g!=null&&Ts(g)));break;case 12:if(g&2048){Hi(t,n,r,s),g=n.stateNode;try{var N=n.memoizedProps,z=N.id,X=N.onPostCommit;typeof X=="function"&&X(z,n.alternate===null?"mount":"update",g.passiveEffectDuration,-0)}catch(ae){bt(n,n.return,ae)}}else Hi(t,n,r,s);break;case 31:Hi(t,n,r,s);break;case 13:Hi(t,n,r,s);break;case 23:break;case 22:N=n.stateNode,z=n.alternate,n.memoizedState!==null?(h&&z!==null&&z.memoizedState===null&&Tu(z),N._visibility&2?Hi(t,n,r,s):Vs(t,n)):(h&&z!==null&&z.memoizedState!==null&&Tu(n),N._visibility&2?Hi(t,n,r,s):(N._visibility|=2,Ao(t,n,r,s,(n.subtreeFlags&10256)!==0||!1))),g&2048&&Ih(z,n);break;case 24:Hi(t,n,r,s),g&2048&&Hh(n.alternate,n);break;case 30:h&&(g=n.alternate,g!==null&&(ka(g.child,!0),ka(n.child,!0))),Hi(t,n,r,s);break;default:Hi(t,n,r,s)}}function Ao(t,n,r,s,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,N=n,z=r,X=s,ae=N.flags;switch(N.tag){case 0:case 11:case 15:Ao(g,N,z,X,h),Us(8,N);break;case 23:break;case 22:var de=N.stateNode;N.memoizedState!==null?de._visibility&2?Ao(g,N,z,X,h):Vs(g,N):(de._visibility|=2,Ao(g,N,z,X,h)),h&&ae&2048&&Ih(N.alternate,N);break;case 24:Ao(g,N,z,X,h),h&&ae&2048&&Hh(N.alternate,N);break;default:Ao(g,N,z,X,h)}n=n.sibling}}function Vs(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=t,s=n,h=s.flags;switch(s.tag){case 22:Vs(r,s),h&2048&&Ih(s.alternate,s);break;case 24:Vs(r,s),h&2048&&Hh(s.alternate,s);break;default:Vs(r,s)}n=n.sibling}}var Ml=8192;function Rl(t,n,r){if(t.subtreeFlags&Ml)for(t=t.child;t!==null;)Gv(t,n,r),t=t.sibling}function Gv(t,n,r){switch(t.tag){case 26:Rl(t,n,r),t.flags&Ml&&(t.memoizedState!==null?Nk(r,ea,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&W2(r,t)));break;case 5:Rl(t,n,r),t.flags&Ml&&(t=t.stateNode,(n&335544128)===n&&W2(r,t));break;case 3:case 4:var s=ea;ea=Js(t.stateNode.containerInfo),Rl(t,n,r),ea=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Ml,Ml=16777216,Rl(t,n,r),Ml=s):Rl(t,n,r));break;case 30:if((t.flags&Ml)!==0&&(s=t.memoizedProps.name,s!=null&&s!=="auto")){var h=t.stateNode;h.paired=null,Si===null&&(Si=new Map),Si.set(s,h)}Rl(t,n,r);break;default:Rl(t,n,r)}}function Yv(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 $s(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];mn=s,Kv(s,t)}Yv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xv(t),t=t.sibling}function Xv(t){switch(t.tag){case 0:case 11:case 15:$s(t),t.flags&2048&&Br(9,t,t.return);break;case 3:$s(t);break;case 12:$s(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Ru(t)):$s(t);break;default:$s(t)}}function Ru(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];mn=s,Kv(s,t)}Yv(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Br(8,n,n.return),Ru(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,Ru(n));break;default:Ru(n)}t=t.sibling}}function Kv(t,n){for(;mn!==null;){var r=mn;switch(r.tag){case 0:case 11:case 15:Br(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ts(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,mn=s;else e:for(r=t;mn!==null;){s=mn;var h=s.sibling,g=s.return;if(Iv(s),s===r){mn=null;break e}if(h!==null){h.return=g,mn=h;break e}mn=g}}}var j6={getCacheForType:function(t){var n=kn(Zt),r=n.data.get(t);return r===void 0&&(r=t(),n.data.set(t,r)),r},cacheSignal:function(){return kn(Zt).controller.signal}},w6=typeof WeakMap=="function"?WeakMap:Map,gt=0,Ct=null,tt=null,rt=0,xt=0,ki=null,Hr=!1,_o=!1,Ph=!1,lr=0,Ft=0,Pr=0,Ol=0,Ou=0,Ci=0,Mo=0,Gs=null,li=null,Uh=!1,zu=0,Qv=0,Du=1/0,Lu=null,Ur=null,Ht=0,na=null,zl=null,Ta=0,qh=0,Fh=null,Zv=null,Ro=null,Oo=null,zo=null,Ys=0,Bu=null;function Ni(){return(gt&2)!==0&&rt!==0?rt&-rt:ce.T!==null?Wh():ei()}function Jv(){if(Ci===0)if((rt&536870912)===0||et){var t=Ri;Ri<<=1,(Ri&3932160)===0&&(Ri=262144),Ci=t}else Ci=536870912;return t=Cn.current,t!==null&&(t.flags|=32),Ci}function Do(t,n){if(n!=null){var r=t.stateNode,s=r.ref;s===null&&(s=r.ref=R2(Qa(t.memoizedProps,r))),Oo===null&&(Oo=[]),Oo.push(n.bind(null,s))}}function oi(t,n,r){(t===Ct&&(xt===2||xt===9)||t.cancelPendingCommit!==null)&&(Lo(t,0),qr(t,rt,Ci,!1)),Zn(t,r),((gt&2)===0||t!==Ct)&&(t===Ct&&((gt&2)===0&&(Ol|=r),Ft===4&&qr(t,rt,Ci,!1)),Aa(t))}function Wv(t,n,r){if((gt&6)!==0)throw Error(l(327));var s=!r&&(n&127)===0&&(n&t.expiredLanes)===0||pi(t,n),h=s?C6(t,n):$h(t,n,!0),g=s;do{if(h===0){_o&&!s&&qr(t,n,0,!1);break}else{if(r=t.current.alternate,g&&!S6(r)){h=$h(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var z=t;h=Gs;var X=z.current.memoizedState.isDehydrated;if(X&&(Lo(z,N).flags|=256),N=$h(z,N,!1),N!==2&&N!==6){if(Ph&&!X){z.errorRecoveryDisabledLanes|=g,Ol|=g,h=4;break e}g=li,li=h,g!==null&&(li===null?li=g:li.push.apply(li,g))}h=N}if(g=!1,h!==2)continue}}if(h===1){Lo(t,0),qr(t,n,0,!0);break}e:{switch(s=t,g=h,g){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:qr(s,n,Ci,!Hr);break e;case 2:li=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(h=zu+300-Xt(),10<h)){if(qr(s,n,Ci,!Hr),mi(s,0,!0)!==0)break e;Ta=n,s.timeoutHandle=um(e2.bind(null,s,r,li,Lu,Uh,n,Ci,Ol,Mo,Hr,g,"Throttled",-0,0),h);break e}e2(s,r,li,Lu,Uh,n,Ci,Ol,Mo,Hr,g,null,-0,0)}}break}while(!0);Aa(t)}function e2(t,n,r,s,h,g,N,z,X,ae,de,ve,te,se){t.timeoutHandle=-1;var Ce=n.subtreeFlags,ze=(g&335544064)===g;if(ve=null,(ze||Ce&8192||(Ce&16785408)===16785408)&&(ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Si=null,Gv(n,g,ve),ze&&(Ce=ve,ze=t.containerInfo,ze=(ze.nodeType===9?ze:ze.ownerDocument).__reactViewTransition,ze!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=tc.bind(Ce),ze.finished.then(Ce,Ce))),Ce=(g&62914560)===g?zu-Xt():(g&4194048)===g?Qv-Xt():0,Ce=Ek(ve,Ce),Ce!==null)){Ta=g,t.cancelPendingCommit=Ce(s2.bind(null,t,n,g,r,s,h,N,z,X,ae,de,ve,null,te,se)),qr(t,g,N,!ae);return}s2(t,n,g,r,s,h,N,z,X,ae,de,ve)}function S6(t){for(var n=t;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var h=r[s],g=h.getSnapshot;h=h.value;try{if(!ji(g(),h))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;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 qr(t,n,r,s){n=ma(t,n),n&=~Ou,n&=~Ol,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var h=n;0<h;){var g=31-Vt(h),N=1<<g;s[g]=-1,h&=~N}r!==0&&Jn(t,r,n)}function Iu(){return(gt&6)===0?(Xs(0),!1):!0}function Vh(){if(tt!==null){if(xt===0)var t=tt.return;else t=tt,er=jl=null,Jf(t),wo=null,Ms=0,t=tt;for(;t!==null;)Sv(t.alternate,t),t=t.return;tt=null}}function Lo(t,n){var r=t.timeoutHandle;return r!==-1&&(t.timeoutHandle=-1,Y6(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),Ta=0,Vh(),Ct=t,tt=r=Ja(t.current,null),rt=n,xt=0,ki=null,Hr=!1,_o=pi(t,n),Ph=!1,Mo=Ci=Ou=Ol=Pr=Ft=0,li=Gs=null,Uh=!1,lr=ma(t,n),Gc(),r}function t2(t,n){Qe=null,ce.H=vu,n===jo||n===iu?(n=s1(),xt=3):n===Hf?(n=s1(),xt=4):xt=n===hh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ki=n,tt===null&&(Ft=1,yu(t,Di(n,t.current)))}function n2(){var t=Cn.current;return t===null?!0:(rt&4194048)===rt?Ln===null:(rt&62914560)===rt||(rt&536870912)!==0?t===Ln:!1}function i2(){var t=ce.H;return ce.H=vu,t===null?vu:t}function a2(){var t=ce.A;return ce.A=j6,t}function Hu(){Ft=4,Hr||(rt&4194048)!==rt&&Cn.current!==null||(_o=!0),(Pr&134217727)===0&&(Ol&134217727)===0||Ct===null||qr(Ct,rt,Ci,!1)}function $h(t,n,r){var s=gt;gt|=2;var h=i2(),g=a2();(Ct!==t||rt!==n)&&(Lu=null,Lo(t,n)),n=!1;var N=Ft;e:do try{if(xt!==0&&tt!==null){var z=tt,X=ki;switch(xt){case 8:Vh(),N=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(n=!0);var ae=xt;if(xt=0,ki=null,Bo(t,z,X,ae),r&&_o){N=0;break e}break;default:ae=xt,xt=0,ki=null,Bo(t,z,X,ae)}}k6(),N=Ft;break}catch(de){t2(t,de)}while(!0);return n&&t.shellSuspendCounter++,er=jl=null,gt=s,ce.H=h,ce.A=g,tt===null&&(Ct=null,rt=0,Gc()),N}function k6(){for(;tt!==null;)r2(tt)}function C6(t,n){var r=gt;gt|=2;var s=i2(),h=a2();Ct!==t||rt!==n?(Lu=null,Du=Xt()+500,Lo(t,n)):_o=pi(t,n);e:do try{if(xt!==0&&tt!==null){n=tt;var g=ki;t:switch(xt){case 1:xt=0,ki=null,Bo(t,n,g,1);break;case 2:case 9:if(l1(g)){xt=0,ki=null,l2(n);break}n=function(){xt!==2&&xt!==9||Ct!==t||(xt=7),Aa(t)},g.then(n,n);break e;case 3:xt=7;break e;case 4:xt=5;break e;case 7:l1(g)?(xt=0,ki=null,l2(n)):(xt=0,ki=null,Bo(t,n,g,7));break;case 5:var N=null;switch(tt.tag){case 26:N=tt.memoizedState;case 5:case 27:var z=tt;if(N?Z2(N):z.stateNode.complete){xt=0,ki=null;var X=z.sibling;if(X!==null)tt=X;else{var ae=z.return;ae!==null?(tt=ae,Pu(ae)):tt=null}break t}}xt=0,ki=null,Bo(t,n,g,5);break;case 6:xt=0,ki=null,Bo(t,n,g,6);break;case 8:Vh(),Ft=6;break e;default:throw Error(l(462))}}N6();break}catch(de){t2(t,de)}while(!0);return er=jl=null,ce.H=s,ce.A=h,gt=r,tt!==null?0:(Ct=null,rt=0,Gc(),Ft)}function N6(){for(;tt!==null&&!On();)r2(tt)}function r2(t){var n=jv(t.alternate,t,lr);t.memoizedProps=t.pendingProps,n===null?Pu(t):tt=n}function l2(t){var n=t,r=n.alternate;switch(n.tag){case 15:case 0:n=mv(r,n,n.pendingProps,n.type,void 0,rt);break;case 11:n=mv(r,n,n.pendingProps,n.type.render,n.ref,rt);break;case 5:Jf(n);var s=n;s===fn&&(et?(Jc(s),s.tag===5&&s.stateNode!=null&&(Tt=s.stateNode)):(Jc(s),et=!0));default:Sv(r,n),n=tt=Kg(n,lr),n=jv(r,n,lr)}t.memoizedProps=t.pendingProps,n===null?Pu(t):tt=n}function Bo(t,n,r,s){er=jl=null,Jf(n),wo=null,Ms=0;var h=n.return;try{if(h6(t,h,n,r,rt)){Ft=1,yu(t,Di(r,t.current)),tt=null;return}}catch(g){if(h!==null)throw tt=h,g;Ft=1,yu(t,Di(r,t.current)),tt=null;return}n.flags&32768?(et||s===1?t=!0:_o||(rt&536870912)!==0?t=!1:(Hr=t=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),o2(n,t)):Pu(n)}function Pu(t){var n=t;do{if((n.flags&32768)!==0){o2(n,Hr);return}t=n.return;var r=v6(n.alternate,n,lr);if(r!==null){tt=r;return}if(n=n.sibling,n!==null){tt=n;return}tt=n=t}while(n!==null);Ft===0&&(Ft=5)}function o2(t,n){do{var r=y6(t.alternate,t);if(r!==null){r.flags&=32767,tt=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(t=t.sibling,t!==null)){tt=t;return}tt=t=r}while(t!==null);Ft=6,tt=null}function s2(t,n,r,s,h,g,N,z,X,ae,de,ve){t.cancelPendingCommit=null;do Uu();while(Ht!==0);if((gt&6)!==0)throw Error(l(327));if(n!==null){if(n===t.current)throw Error(l(177));t===Ct&&(tt=Ct=null,rt=0),zl=n,na=t,Ta=r,Fh=h,Zv=s,E6(t,n,r,N,z,X,ve)}}function E6(t,n,r,s,h,g,N){var z=n.lanes|n.childLanes;if(qh=z,z|=Nf,pa(t,r,z,s,h,g),Oo=null,(r&335544064)===r?(zo=t6(t),s=10262):(zo=null,s=10256),(n.subtreeFlags&s)!==0||(n.flags&s)!==0?(t.callbackNode=null,t.callbackPriority=0,O6(bn,function(){return Kh(),null})):(t.callbackNode=null,t.callbackPriority=0),Nu=!1,s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=ce.T,ce.T=null,h=me.p,me.p=2,g=gt,gt|=4;try{x6(t,n,r)}finally{gt=g,me.p=h,ce.T=s}}Ht=1,Nu?Ro=W6(N,t.containerInfo,zo,Gh,Yh,A6,Xh,Kh,T6):(Gh(),Yh(),Xh())}function T6(t){if(Ht!==0){var n=na.onRecoverableError;n(t,{componentStack:null})}}function A6(){Ht===3&&(Ht=0,Vv(zl,na),Ht=4)}function Gh(){if(Ht===1){Ht=0;var t=na,n=zl,r=Ta,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=ce.T,ce.T=null;var h=me.p;me.p=2;var g=gt;gt|=4;try{Fs=Au=!1,qv(n,t,r),r=om;var N=Hg(t.containerInfo),z=r.focusedElem,X=r.selectionRange;if(N!==z&&z&&z.ownerDocument&&Ig(z.ownerDocument.documentElement,z)){if(X!==null&&jf(z)){var ae=X.start,de=X.end;if(de===void 0&&(de=ae),"selectionStart"in z)z.selectionStart=ae,z.selectionEnd=Math.min(de,z.value.length);else{var ve=z.ownerDocument||document,te=ve&&ve.defaultView||window;if(te.getSelection){var se=te.getSelection(),Ce=z.textContent.length,ze=Math.min(X.start,Ce),Ze=X.end===void 0?ze:Math.min(X.end,Ce);!se.extend&&ze>Ze&&(N=Ze,Ze=ze,ze=N);var ie=Bg(z,ze),Z=Bg(z,Ze);if(ie&&Z&&(se.rangeCount!==1||se.anchorNode!==ie.node||se.anchorOffset!==ie.offset||se.focusNode!==Z.node||se.focusOffset!==Z.offset)){var le=ve.createRange();le.setStart(ie.node,ie.offset),se.removeAllRanges(),ze>Ze?(se.addRange(le),se.extend(Z.node,Z.offset)):(le.setEnd(Z.node,Z.offset),se.addRange(le))}}}}for(ve=[],se=z;se=se.parentNode;)se.nodeType===1&&ve.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ve.length;z++){var ge=ve[z];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}$o=!!lm,om=lm=null}finally{gt=g,me.p=h,ce.T=s}}t.current=n,Ht=2}}function Yh(){if(Ht===2){Ht=0;var t=na,n=zl,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=ce.T,ce.T=null;var s=me.p;me.p=2;var h=gt;gt|=4;try{Lv(t,n.alternate,n)}finally{gt=h,me.p=s,ce.T=r}}Ht=3}}function Xh(){if(Ht===4||Ht===3){Ht=0;var t=Ro;Ro=null,Xe();var n=na,r=zl,s=Ta,h=Zv,g=(s&335544064)===s?10262:10256;if((r.subtreeFlags&g)!==0||(r.flags&g)!==0?Ht=5:(Ht=0,zl=na=null,c2(n,n.pendingLanes)),g=n.pendingLanes,g===0&&(Ur=null),Wn(s),r=r.stateNode,cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(Xi,r,void 0,(r.current.flags&128)===128)}catch{}if(h!==null){r=ce.T,g=me.p,me.p=2,ce.T=null;try{for(var N=n.onRecoverableError,z=0;z<h.length;z++){var X=h[z];N(X.value,{componentStack:X.stack})}}finally{ce.T=r,me.p=g}}if(h=Oo,N=zo,zo=null,h!==null&&(Oo=null,N===null&&(N=[]),t!==null))for(X=0;X<h.length;X++)r=(0,h[X])(N),r!==void 0&&t.finished.finally(r);(Ta&3)!==0&&Uu(),Aa(n),g=n.pendingLanes,(s&261930)!==0&&(g&42)!==0?n===Bu?Ys++:(Ys=0,Bu=n):(Ys=0,Bu=null),Xs(0)}}function c2(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ts(n)))}function Uu(){return Ro!==null&&(Ro.skipTransition(),Ro=null),Gh(),Yh(),Xh(),Kh()}function Kh(){if(Ht!==5)return!1;var t=na,n=qh;qh=0;var r=Wn(Ta),s=ce.T,h=me.p;try{me.p=32>r?32:r,ce.T=null,r=Fh,Fh=null;var g=na,N=Ta;if(Ht=0,zl=na=null,Ta=0,(gt&6)!==0)throw Error(l(331));var z=gt;if(gt|=4,Xv(g.current),$v(g,g.current,N,r),gt=z,Xs(0,!1),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(Xi,g)}catch{}return!0}finally{me.p=h,ce.T=s,c2(t,n)}}function u2(t,n,r){n=Di(r,n),n=fh(t.stateNode,n,2),t=Or(t,n,2),t!==null&&(Zn(t,2),Aa(t))}function bt(t,n,r){if(t.tag===3)u2(t,t,r);else for(;n!==null;){if(n.tag===3){u2(n,t,r);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ur===null||!Ur.has(s))){t=Di(r,t),r=lv(2),s=Or(n,r,2),s!==null&&(ov(r,s,n,t),Zn(s,2),Aa(s));break}}n=n.return}}function Qh(t,n,r){var s=t.pingCache;if(s===null){s=t.pingCache=new w6;var h=new Set;s.set(n,h)}else h=s.get(n),h===void 0&&(h=new Set,s.set(n,h));h.has(r)||(Ph=!0,h.add(r),t=_6.bind(null,t,n,r),n.then(t,t))}function _6(t,n,r){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,Ct===t&&(rt&r)===r&&((Ft===4||Ft===3&&(rt&62914560)===rt&&300>Xt()-zu)&&(gt&2)===0?Lo(t,0):Ou|=r,Mo===rt&&(Mo=0)),Aa(t)}function d2(t,n){n===0&&(n=gi()),t=yl(t,n),t!==null&&(Zn(t,n),Aa(t))}function M6(t){var n=t.memoizedState,r=0;n!==null&&(r=n.retryLane),d2(t,r)}function R6(t,n){var r=0;switch(t.tag){case 31:case 13:var s=t.stateNode,h=t.memoizedState;h!==null&&(r=h.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(n),d2(t,r)}function O6(t,n){return Un(t,n)}var Io=null,Ho=null,Zh=!1,qu=!1,Jh=!1,Fr=0;function Aa(t){t!==Ho&&t.next===null&&(Ho===null?Io=Ho=t:Ho=Ho.next=t),qu=!0,Zh||(Zh=!0,D6())}function Xs(t,n){if(!Jh&&qu){Jh=!0;do for(var r=!1,s=Io;s!==null;){if(t!==0){var h=s.pendingLanes;if(h===0)var g=0;else{var N=s.suspendedLanes,z=s.pingedLanes;g=(1<<31-Vt(42|t)+1)-1,g&=h&~(N&~z),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(r=!0,p2(s,g))}else g=rt,g=mi(s,s===Ct?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||pi(s,g)||(r=!0,p2(s,g));s=s.next}while(r);Jh=!1}}function z6(){f2()}function f2(){qu=Zh=!1;var t=0;Fr!==0&&G6()&&(t=Fr);for(var n=Xt(),r=null,s=Io;s!==null;){var h=s.next,g=h2(s,n);g===0?(s.next=null,r===null?Io=h:r.next=h,h===null&&(Ho=r)):(r=s,(t!==0||(g&3)!==0)&&(qu=!0)),s=h}Ht!==0&&Ht!==5||Xs(t),Fr!==0&&(Fr=0)}function h2(t,n){for(var r=t.suspendedLanes,s=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var N=31-Vt(g),z=1<<N,X=h[N];X===-1?((z&r)===0||(z&s)!==0)&&(h[N]=cl(z,n)):X<=n&&(t.expiredLanes|=z),g&=~z}if(n=Ct,r=rt,r=mi(t,t===n?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,r===0||t===n&&(xt===2||xt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Ot(s),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||pi(t,r)){if(n=r&-r,n===t.callbackPriority)return n;switch(s!==null&&Ot(s),Wn(r)){case 2:case 8:r=da;break;case 32:r=bn;break;case 268435456:r=sl;break;default:r=bn}return s=m2.bind(null,t),r=Un(r,s),t.callbackPriority=n,t.callbackNode=r,n}return s!==null&&s!==null&&Ot(s),t.callbackPriority=2,t.callbackNode=null,2}function m2(t,n){if(Ht!==0&&Ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(Uu()&&t.callbackNode!==r)return null;var s=rt;return s=mi(t,t===Ct?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Wv(t,s,n),h2(t,Xt()),t.callbackNode!=null&&t.callbackNode===r?m2.bind(null,t):null)}function p2(t,n){if(Uu())return null;Wv(t,n,!0)}function D6(){X6(function(){(gt&6)!==0?Un(ua,z6):f2()})}function Wh(){if(Fr===0){var t=kl;t===0&&(t=Qi,Qi<<=1,(Qi&261888)===0&&(Qi=256)),Fr=t}return Fr}function g2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wn(t)}function L6(t,n,r,s,h){if(n==="submit"&&r&&r.stateNode===h){var g=g2((h[$t]||null).action),N=s.submitter;N&&(n=(n=N[$t]||null)?g2(n.formAction):N.getAttribute("formAction"),n!==null&&(g=n,N=null));var z=new qc("action","action",null,s,h);t.push({event:z,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Fr!==0){var X=new FormData(h,N);oh(r,{pending:!0,data:X,method:h.method,action:g},null,X)}}else typeof g=="function"&&(z.preventDefault(),X=new FormData(h,N),oh(r,{pending:!0,data:X,method:h.method,action:g},g,X))},currentTarget:h}]})}}for(var em=0;em<Cf.length;em++){var tm=Cf[em],B6=tm.toLowerCase(),I6=tm[0].toUpperCase()+tm.slice(1);Ji(B6,"on"+I6)}Ji(qg,"onAnimationEnd"),Ji(Fg,"onAnimationIteration"),Ji(Vg,"onAnimationStart"),Ji("dblclick","onDoubleClick"),Ji("focusin","onFocus"),Ji("focusout","onBlur"),Ji(YS,"onTransitionRun"),Ji(XS,"onTransitionStart"),Ji(KS,"onTransitionCancel"),Ji($g,"onTransitionEnd"),Be("onMouseEnter",["mouseout","mouseover"]),Be("onMouseLeave",["mouseout","mouseover"]),Be("onPointerEnter",["pointerout","pointerover"]),Be("onPointerLeave",["pointerout","pointerover"]),_e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_e("onBeforeInput",["compositionend","keypress","textInput","paste"]),_e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="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(" "),H6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ks));function v2(t,n){n=(n&4)!==0;for(var r=0;r<t.length;r++){var s=t[r],h=s.event;s=s.listeners;e:{var g=void 0;if(n)for(var N=s.length-1;0<=N;N--){var z=s[N],X=z.instance,ae=z.currentTarget;if(z=z.listener,X!==g&&h.isPropagationStopped())break e;g=z,h.currentTarget=ae;try{g(h)}catch(de){$c(de)}h.currentTarget=null,g=X}else for(N=0;N<s.length;N++){if(z=s[N],X=z.instance,ae=z.currentTarget,z=z.listener,X!==g&&h.isPropagationStopped())break e;g=z,h.currentTarget=ae;try{g(h)}catch(de){$c(de)}h.currentTarget=null,g=X}}}}function nt(t,n){var r=n[ul];r===void 0&&(r=n[ul]=new Set);var s=t+"__bubble";r.has(s)||(y2(n,t,2,!1),r.add(s))}function nm(t,n,r){var s=0;n&&(s|=4),y2(r,t,s,n)}var Fu="_reactListening"+Math.random().toString(36).slice(2);function im(t){if(!t[Fu]){t[Fu]=!0,Ee.forEach(function(r){r!=="selectionchange"&&(H6.has(r)||nm(r,!1,t),nm(r,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Fu]||(n[Fu]=!0,nm("selectionchange",!1,n))}}function y2(t,n,r,s){switch(oy(n)){case 2:var h=Mk;break;case 8:h=Rk;break;default:h=Sm}r=h.bind(null,n,r,t),h=void 0,!pl||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),s?h!==void 0?t.addEventListener(n,r,{capture:!0,passive:h}):t.addEventListener(n,r,!0):h!==void 0?t.addEventListener(n,r,{passive:h}):t.addEventListener(n,r,!1)}function am(t,n,r,s,h){var g=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var N=s.tag;if(N===3||N===4){var z=s.stateNode.containerInfo;if(z===h)break;if(N===4)for(N=s.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===h)return;N=N.return}for(;z!==null;){if(N=ti(z),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){s=g=N;continue e}z=z.parentNode}}s=s.return}ml(function(){var ae=g,de=hl(r),ve=[];e:{var te=Gg.get(t);if(te!==void 0){var se=qc,Ce=t;switch(t){case"keypress":if(Pc(r)===0)break e;case"keydown":case"keyup":se=SS;break;case"focusin":Ce="focus",se=pf;break;case"focusout":Ce="blur",se=pf;break;case"beforeblur":case"afterblur":se=pf;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=dS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=TS;break;case qg:case Fg:case Vg:se=mS;break;case $g:se=_S;break;case"scroll":case"scrollend":se=cS;break;case"wheel":se=RS;break;case"copy":case"cut":case"paste":se=gS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=Sg;break;case"submit":se=NS;break;case"toggle":case"beforetoggle":se=zS}var ze=(n&4)!==0,Ze=!ze&&(t==="scroll"||t==="scrollend"),ie=ze?te!==null?te+"Capture":null:te;ze=[];for(var Z=ae,le;Z!==null;){var ge=Z;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||ie===null||(ge=Ka(Z,ie),ge!=null&&ze.push(Qs(Z,ge,le))),Ze)break;Z=Z.return}0<ze.length&&(te=new se(te,Ce,null,r,de),ve.push({event:te,listeners:ze}))}}if((n&7)===0){e:{if(se=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",se&&r!==fl&&(Ce=r.relatedTarget||r.fromElement)&&(ti(Ce)||Ce[jn]))break e;(te||se)&&(Ce=de.window===de?de:(se=de.ownerDocument)?se.defaultView||se.parentWindow:window,te?(se=r.relatedTarget||r.toElement,te=ae,se=se?ti(se):null,se!==null&&(Ze=u(se),ze=se.tag,se!==Ze||ze!==5&&ze!==27&&ze!==6)&&(se=null)):(te=null,se=ae),te!==se&&(ze=jg,ge="onMouseLeave",ie="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(ze=Sg,ge="onPointerLeave",ie="onPointerEnter",Z="pointer"),Ze=te==null?Ce:ue(te),le=se==null?Ce:ue(se),Ce=new ze(ge,Z+"leave",te,r,de),Ce.target=Ze,Ce.relatedTarget=le,ge=null,ti(de)===ae&&(ze=new ze(ie,Z+"enter",se,r,de),ze.target=le,ze.relatedTarget=Ze,ge=ze),Ze=ge,ze=te&&se?A(te,se,P6):null,te!==null&&x2(ve,Ce,te,ze,!1),se!==null&&Ze!==null&&x2(ve,Ze,se,ze,!0)))}e:{if(te=ae?ue(ae):window,se=te.nodeName&&te.nodeName.toLowerCase(),se==="select"||se==="input"&&te.type==="file")var Re=Mg;else if(Ag(te))if(Rg)Re=VS;else{Re=qS;var lt=US}else se=te.nodeName,!se||se.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ae&&dl(ae.elementType)&&(Re=Mg):Re=FS;if(Re&&(Re=Re(t,ae))){_g(ve,Re,r,de);break e}lt&<(t,te,ae)}switch(lt=ae?ue(ae):window,t){case"focusin":(Ag(lt)||lt.contentEditable==="true")&&(ho=lt,wf=ae,Cs=null);break;case"focusout":Cs=wf=ho=null;break;case"mousedown":Sf=!0;break;case"contextmenu":case"mouseup":case"dragend":Sf=!1,Pg(ve,r,de);break;case"selectionchange":if(GS)break;case"keydown":case"keyup":Pg(ve,r,de)}var Ie;if(vf)e:{switch(t){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else fo?Eg(t,r)&&(Fe="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(Fe="onCompositionStart");Fe&&(kg&&r.locale!=="ko"&&(fo||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&fo&&(Ie=xg()):(kr=de,ff="value"in kr?kr.value:kr.textContent,fo=!0)),lt=Vu(ae,Fe),0<lt.length&&(Fe=new wg(Fe,t,null,r,de),ve.push({event:Fe,listeners:lt}),Ie?Fe.data=Ie:(Ie=Tg(r),Ie!==null&&(Fe.data=Ie)))),(Ie=LS?BS(t,r):IS(t,r))&&(Fe=Vu(ae,"onBeforeInput"),0<Fe.length&&(lt=new wg("onBeforeInput","beforeinput",null,r,de),ve.push({event:lt,listeners:Fe}),lt.data=Ie)),L6(ve,t,ae,r,de)}v2(ve,n)})}function Qs(t,n,r){return{instance:t,listener:n,currentTarget:r}}function Vu(t,n){for(var r=n+"Capture",s=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Ka(t,r),h!=null&&s.unshift(Qs(t,h,g)),h=Ka(t,n),h!=null&&s.push(Qs(t,h,g))),t.tag===3)return s;t=t.return}return[]}function P6(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function x2(t,n,r,s,h){for(var g=n._reactName,N=[];r!==null&&r!==s;){var z=r,X=z.alternate,ae=z.stateNode;if(z=z.tag,X!==null&&X===s)break;z!==5&&z!==26&&z!==27||ae===null||(X=ae,h?(ae=Ka(r,g),ae!=null&&N.unshift(Qs(r,ae,X))):h||(ae=Ka(r,g),ae!=null&&N.push(Qs(r,ae,X)))),r=r.return}N.length!==0&&t.push({event:n,listeners:N})}var U6=/\r\n?/g,q6=/\u0000|\uFFFD/g;function b2(t){return(typeof t=="string"?t:""+t).replace(U6,`
|
|
49
|
-
`).replace(q6,"")}function j2(t,n){return n=b2(n),b2(t)===n}function jt(t,n,r,s,h,g){switch(r){case"children":if(typeof s=="string")n==="body"||n==="textarea"&&s===""||qn(t,s);else if(typeof s=="number"||typeof s=="bigint")n!=="body"&&qn(t,""+s);else return;break;case"className":vi(t,"class",s);break;case"tabIndex":vi(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":vi(t,r,s);break;case"style":xi(t,s,g);return;case"data":if(n!=="object"){vi(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||r!=="href")){t.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(r);break}s=wn(s),t.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(r==="formAction"?(n!=="input"&&jt(t,n,"name",h.name,h,null),jt(t,n,"formEncType",h.formEncType,h,null),jt(t,n,"formMethod",h.formMethod,h,null),jt(t,n,"formTarget",h.formTarget,h,null)):(jt(t,n,"encType",h.encType,h,null),jt(t,n,"method",h.method,h,null),jt(t,n,"target",h.target,h,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(r);break}s=wn(s),t.setAttribute(r,s);break;case"onClick":s!=null&&(t.onclick=Fn);return;case"onScroll":s!=null&&nt("scroll",t);return;case"onScrollEnd":s!=null&&nt("scrollend",t);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(h.children!=null)throw Error(l(60));(g!=null?g.__html:void 0)!==r&&(t.innerHTML=r)}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}r=wn(s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,s):t.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,""):t.removeAttribute(r);break;case"capture":case"download":s===!0?t.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,s):t.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(r,s):t.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(r):t.setAttribute(r,s);break;case"popover":nt("beforetoggle",t),nt("toggle",t),It(t,"popover",s);break;case"xlinkActuate":Kt(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Kt(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Kt(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Kt(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Kt(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Kt(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":It(t,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")r=gs.get(r)||r,It(t,r,s);else return}Pe=!0}function rm(t,n,r,s,h,g){switch(r){case"style":xi(t,s,g);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(h.children!=null)throw Error(l(60));(g!=null?g.__html:void 0)!==r&&(t.innerHTML=r)}}break;case"children":if(typeof s=="string")qn(t,s);else if(typeof s=="number"||typeof s=="bigint")qn(t,""+s);else return;break;case"onScroll":s!=null&&nt("scroll",t);return;case"onScrollEnd":s!=null&&nt("scrollend",t);return;case"onClick":s!=null&&(t.onclick=Fn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Se.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(h=r.endsWith("Capture"),g=r.slice(2,h?r.length-7:void 0),n=t[$t]||null,n=n!=null?n[r]:null,typeof n=="function"&&t.removeEventListener(g,n,h),typeof s=="function")){typeof n!="function"&&n!==null&&(r in t?t[r]=null:t.hasAttribute(r)&&t.removeAttribute(r)),t.addEventListener(g,s,h);break e}Pe=!0,r in t?t[r]=s:s===!0?t.setAttribute(r,""):It(t,r,s)}return}Pe=!0}function Tn(t,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",t),nt("load",t);var s=!1,h=!1,g;for(g in r)if(r.hasOwnProperty(g)){var N=r[g];if(N!=null)switch(g){case"src":s=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:jt(t,n,g,N,r,null)}}h&&jt(t,n,"srcSet",r.srcSet,r,null),s&&jt(t,n,"src",r.src,r,null);return;case"input":nt("invalid",t);var z=g=N=h=null,X=null,ae=null;for(s in r)if(r.hasOwnProperty(s)){var de=r[s];if(de!=null)switch(s){case"name":h=de;break;case"type":N=de;break;case"checked":X=de;break;case"defaultChecked":ae=de;break;case"value":g=de;break;case"defaultValue":z=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(l(137,n));break;default:jt(t,n,s,de,r,null)}}wr(t,g,z,X,ae,N,h,!1);return;case"select":nt("invalid",t),s=N=g=null;for(h in r)if(r.hasOwnProperty(h)&&(z=r[h],z!=null))switch(h){case"value":g=z;break;case"defaultValue":N=z;break;case"multiple":s=z;default:jt(t,n,h,z,r,null)}n=g,r=N,t.multiple=!!s,n!=null?ni(t,!!s,n,!1):r!=null&&ni(t,!!s,r,!0);return;case"textarea":nt("invalid",t),g=h=s=null;for(N in r)if(r.hasOwnProperty(N)&&(z=r[N],z!=null))switch(N){case"value":s=z;break;case"defaultValue":h=z;break;case"children":g=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(l(91));break;default:jt(t,n,N,z,r,null)}yi(t,s,h,g);return;case"option":for(X in r)if(r.hasOwnProperty(X)&&(s=r[X],s!=null))switch(X){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:jt(t,n,X,s,r,null)}return;case"dialog":nt("beforetoggle",t),nt("toggle",t),nt("cancel",t),nt("close",t);break;case"iframe":case"object":nt("load",t);break;case"video":case"audio":for(s=0;s<Ks.length;s++)nt(Ks[s],t);break;case"image":nt("error",t),nt("load",t);break;case"details":nt("toggle",t);break;case"embed":case"source":case"link":nt("error",t),nt("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(ae in r)if(r.hasOwnProperty(ae)&&(s=r[ae],s!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:jt(t,n,ae,s,r,null)}return;default:if(dl(n)){for(de in r)r.hasOwnProperty(de)&&(s=r[de],s!==void 0&&rm(t,n,de,s,r,void 0));return}}for(z in r)r.hasOwnProperty(z)&&(s=r[z],s!=null&&jt(t,n,z,s,r,null))}var F6={};function V6(t,n,r,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,N=null,z=null,X=null,ae=null,de=null;for(se in r){var ve=r[se];if(r.hasOwnProperty(se)&&ve!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":X=ve;default:s.hasOwnProperty(se)||jt(t,n,se,null,s,ve)}}for(var te in s){var se=s[te];if(ve=r[te],s.hasOwnProperty(te)&&(se!=null||ve!=null))switch(te){case"type":se!==ve&&(Pe=!0),g=se;break;case"name":se!==ve&&(Pe=!0),h=se;break;case"checked":se!==ve&&(Pe=!0),ae=se;break;case"defaultChecked":se!==ve&&(Pe=!0),de=se;break;case"value":se!==ve&&(Pe=!0),N=se;break;case"defaultValue":se!==ve&&(Pe=!0),z=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(l(137,n));break;default:se!==ve&&jt(t,n,te,se,s,ve)}}Dn(t,N,z,X,ae,de,g,h);return;case"select":se=N=z=te=null;for(g in r)if(X=r[g],r.hasOwnProperty(g)&&X!=null)switch(g){case"value":break;case"multiple":se=X;default:s.hasOwnProperty(g)||jt(t,n,g,null,s,X)}for(h in s)if(g=s[h],X=r[h],s.hasOwnProperty(h)&&(g!=null||X!=null))switch(h){case"value":g!==X&&(Pe=!0),te=g;break;case"defaultValue":g!==X&&(Pe=!0),z=g;break;case"multiple":g!==X&&(Pe=!0),N=g;default:g!==X&&jt(t,n,h,g,s,X)}n=z,r=N,s=se,te!=null?ni(t,!!r,te,!1):!!s!=!!r&&(n!=null?ni(t,!!r,n,!0):ni(t,!!r,r?[]:"",!1));return;case"textarea":se=te=null;for(z in r)if(h=r[z],r.hasOwnProperty(z)&&h!=null&&!s.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:jt(t,n,z,null,s,h)}for(N in s)if(h=s[N],g=r[N],s.hasOwnProperty(N)&&(h!=null||g!=null))switch(N){case"value":h!==g&&(Pe=!0),te=h;break;case"defaultValue":h!==g&&(Pe=!0),se=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(l(91));break;default:h!==g&&jt(t,n,N,h,s,g)}uo(t,te,se);return;case"option":for(var Ce in r)if(te=r[Ce],r.hasOwnProperty(Ce)&&te!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":t.selected=!1;break;default:jt(t,n,Ce,null,s,te)}for(X in s)if(te=s[X],se=r[X],s.hasOwnProperty(X)&&te!==se&&(te!=null||se!=null))switch(X){case"selected":te!==se&&(Pe=!0),t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:jt(t,n,X,te,s,se)}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 ze in r)te=r[ze],r.hasOwnProperty(ze)&&te!=null&&!s.hasOwnProperty(ze)&&jt(t,n,ze,null,s,te);for(ae in s)if(te=s[ae],se=r[ae],s.hasOwnProperty(ae)&&te!==se&&(te!=null||se!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(l(137,n));break;default:jt(t,n,ae,te,s,se)}return;default:if(dl(n)){for(var Ze in r)te=r[Ze],r.hasOwnProperty(Ze)&&te!==void 0&&!s.hasOwnProperty(Ze)&&rm(t,n,Ze,void 0,s,te);for(de in s)te=s[de],se=r[de],!s.hasOwnProperty(de)||te===se||te===void 0&&se===void 0||rm(t,n,de,te,s,se);return}}for(var ie in r)te=r[ie],r.hasOwnProperty(ie)&&te!=null&&!s.hasOwnProperty(ie)&&jt(t,n,ie,null,s,te);for(ve in s)te=s[ve],se=r[ve],!s.hasOwnProperty(ve)||te===se||te==null&&se==null||jt(t,n,ve,te,s,se)}function w2(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $6(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var h=r[s],g=h.transferSize,N=h.initiatorType,z=h.duration;if(g&&z&&w2(N)){for(N=0,z=h.responseEnd,s+=1;s<r.length;s++){var X=r[s],ae=X.startTime;if(ae>z)break;var de=X.transferSize,ve=X.initiatorType;de&&w2(ve)&&(X=X.responseEnd,N+=de*(X<z?1:(z-ae)/(X-ae)))}if(--s,n+=8*(g+N)/(h.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var lm=null,om=null;function Zs(t){return t.nodeType===9?t:t.ownerDocument}function S2(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 k2(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 C2(t,n,r,s){return r=Zs(r).createElement(t),r[Mt]=s,r[$t]=n,Tn(r,t,n),Q(r),r}function sm(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 cm=null;function G6(){var t=window.event;return t&&t.type==="popstate"?t===cm?!1:(cm=t,!0):(cm=null,!1)}var um=typeof setTimeout=="function"?setTimeout:void 0,Y6=typeof clearTimeout=="function"?clearTimeout:void 0,N2=typeof Promise=="function"?Promise:void 0,E2=typeof requestAnimationFrame=="function"?requestAnimationFrame:um,X6=typeof queueMicrotask=="function"?queueMicrotask:typeof N2<"u"?function(t){return N2.resolve(null).then(t).catch(K6)}:um;function K6(t){setTimeout(function(){throw t})}function Vr(t){return t==="head"}function T2(t,n){var r=n,s=0;do{var h=r.nextSibling;if(t.removeChild(r),h&&h.nodeType===8)if(r=h.data,r==="/$"||r==="/&"){if(s===0){t.removeChild(h),Go(n);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")ym(t.ownerDocument.documentElement);else if(r==="head"){r=t.ownerDocument.head,ym(r);for(var g=r.firstChild;g;){var N=g.nextSibling,z=g.nodeName;g[ya]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&g.rel.toLowerCase()==="stylesheet"||r.removeChild(g),g=N}}else r==="body"&&ym(t.ownerDocument.body);r=h}while(r);Go(n)}function A2(t,n){var r=t;t=0;do{var s=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(t===0)break;t--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||t++;r=s}while(r)}function _2(t,n,r){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,t.style.viewTransitionName=n,r!=null&&(t.style.viewTransitionClass=r),r=getComputedStyle(t),r.display==="inline"){if(n=t.getClientRects(),n.length===1)var s=1;else for(var h=s=0;h<n.length;h++){var g=n[h];0<g.width&&0<g.height&&s++}s===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+r.paddingTop,t.marginBottom="-"+r.paddingBottom)}}function M2(t,n){t=t.style,n=n.style;var r=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;t.viewTransitionName=r==null||typeof r=="boolean"?"":(""+r).trim(),r=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,t.viewTransitionClass=r==null||typeof r=="boolean"?"":(""+r).trim(),t.display==="inline-block"&&(n==null?t.display=t.margin="":(r=n.display,t.display=r==null||typeof r=="boolean"?"":r,r=n.margin,r!=null?t.margin=r:(r=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],t.marginTop=r==null||typeof r=="boolean"?"":r,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],t.marginBottom=n==null||typeof n=="boolean"?"":n)))}function Q6(t,n,r){return r=r.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<=r.innerHeight&&t.left<=r.innerWidth}}function dm(t){var n=t.getBoundingClientRect(),r=getComputedStyle(t);return Q6(n,r,t)}function Z6(t){return t.documentElement.clientHeight}function J6(t){this.addEventListener("load",t),this.addEventListener("error",t)}function W6(t,n,r,s,h,g,N,z,X){var ae=n.nodeType===9?n:n.ownerDocument;try{var de=ae.startViewTransition({update:function(){var te=ae.defaultView,se=te.navigation&&te.navigation.transition,Ce=ae.fonts.status;s();var ze=[];if(Ce==="loaded"&&(Z6(ae),ae.fonts.status==="loading"&&ze.push(ae.fonts.ready)),Ce=ze.length,t!==null)for(var Ze=t.suspenseyImages,ie=0,Z=0;Z<Ze.length;Z++){var le=Ze[Z];if(!le.complete){var ge=le.getBoundingClientRect();if(0<ge.bottom&&0<ge.right&&ge.top<te.innerHeight&&ge.left<te.innerWidth){if(ie+=J2(le),ie>Yu){ze.length=Ce;break}le=new Promise(J6.bind(le)),ze.push(le)}}}if(0<ze.length)return te=Promise.race([Promise.all(ze),new Promise(function(Re){return setTimeout(Re,500)})]).then(h,h),(se?Promise.allSettled([se.finished,te]):te).then(g,g);if(h(),se)return se.finished.then(g,g);g()},types:r});ae.__reactViewTransition=de;var ve=[];return de.ready.then(function(){for(var te=ae.documentElement.getAnimations({subtree:!0}),se=0;se<te.length;se++){var Ce=te[se],ze=Ce.effect,Ze=ze.pseudoElement;if(Ze!=null&&Ze.startsWith("::view-transition")){ve.push(Ce),Ce=ze.getKeyframes();for(var ie=Ze=void 0,Z=!0,le=0;le<Ce.length;le++){var ge=Ce[le],Re=ge.width;if(Ze===void 0)Ze=Re;else if(Ze!==Re){Z=!1;break}if(Re=ge.height,ie===void 0)ie=Re;else if(ie!==Re){Z=!1;break}delete ge.width,delete ge.height,ge.transform==="none"&&delete ge.transform}Z&&Ze!==void 0&&ie!==void 0&&(ze.setKeyframes(Ce),Z=getComputedStyle(ze.target,ze.pseudoElement),Z.width!==Ze||Z.height!==ie)&&(Z=Ce[0],Z.width=Ze,Z.height=ie,Z=Ce[Ce.length-1],Z.width=Ze,Z.height=ie,ze.setKeyframes(Ce))}}N()},function(te){ae.__reactViewTransition===de&&(ae.__reactViewTransition=null);try{if(typeof te=="object"&&te!==null)switch(te.name){case"InvalidStateError":(te.message==="View transition was skipped because document visibility state is hidden."||te.message==="Skipping view transition because document visibility state has become hidden."||te.message==="Skipping view transition because viewport size changed."||te.message==="Transition was aborted because of invalid state")&&(te=null)}te!==null&&X(te)}finally{s(),h(),N()}}),de.finished.finally(function(){for(var te=0;te<ve.length;te++)ve[te].cancel();ae.__reactViewTransition===de&&(ae.__reactViewTransition=null),z()}),de}catch{return s(),h(),N(),null}}function Dl(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}Dl.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:I({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},Dl.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,r=t.getAnimations({subtree:!0}),s=[],h=0;h<r.length;h++){var g=r[h].effect;g!==null&&g.target===t&&g.pseudoElement===n&&s.push(r[h])}return s},Dl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function R2(t){return{name:t,group:new Dl("group",t),imagePair:new Dl("image-pair",t),old:new Dl("old",t),new:new Dl("new",t)}}function Ei(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ei.prototype.addEventListener=function(t,n,r){var s=null,h=null;if(!(r!=null&&typeof r!="boolean"&&(s=r.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var g=this._eventListeners;if(z2(g,t,n,r)===-1){var N=this,z=n;r!=null&&typeof r!="boolean"&&r.once===!0&&(z=function(X){N.removeEventListener(t,n,r),typeof n=="function"?n.call(this,X):n.handleEvent(X)}),s!==null&&(h=N.removeEventListener.bind(N,t,n,r),s.addEventListener("abort",h,{once:!0}),h=s.removeEventListener.bind(s,"abort",h)),s=Po(r),g.push({type:t,listener:n,optionsOrUseCapture:r,attachedListener:z,cleanup:h}),p(this._fragmentFiber.child,!1,ek,t,z,s)}this._eventListeners=g}};function ek(t,n,r,s){return C(t).addEventListener(n,r,s),!1}Ei.prototype.removeEventListener=function(t,n,r){var s=this._eventListeners;if(s!==null&&(n=z2(s,t,n,r),n!==-1)){var h=s[n];r=h.attachedListener;var g=h.cleanup;h=Po(h.optionsOrUseCapture),p(this._fragmentFiber.child,!1,tk,t,r,h),s.splice(n,1),g!==null&&g()}};function tk(t,n,r,s){return C(t).removeEventListener(n,r,s),!1}function Po(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function O2(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function z2(t,n,r,s){if(t.length===0)return-1;s=O2(s);for(var h=0;h<t.length;h++){var g=t[h];if(g.type===n&&g.listener===r&&O2(g.optionsOrUseCapture)===s)return h}return-1}Ei.prototype.dispatchEvent=function(t){var n=b(this._fragmentFiber);if(n===null)return!0;n=C(n);var r=this._eventListeners;if(r!==null&&0<r.length||!t.bubbles){var s=n.nodeType===9?n.createComment(""):document.createTextNode("");if(r)for(var h=0;h<r.length;h++){var g=r[h];s.addEventListener(g.type,g.attachedListener,Po(g.optionsOrUseCapture))}if(n.appendChild(s),t=s.dispatchEvent(t),r)for(h=0;h<r.length;h++)g=r[h],s.removeEventListener(g.type,g.attachedListener,Po(g.optionsOrUseCapture));return n.removeChild(s),t}return n.dispatchEvent(t)},Ei.prototype.focus=function(t){p(this._fragmentFiber.child,!0,D2,t,void 0,void 0)};function D2(t,n){return t.tag===6?!1:(t=C(t),hk(t,n))}Ei.prototype.focusLast=function(t){var n=[];p(this._fragmentFiber.child,!0,fm,n,void 0,void 0);for(var r=n.length-1;0<=r&&!D2(n[r],t);r--);};function fm(t,n){return n.push(t),!1}Ei.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=C(t),t=Zs(t).activeElement,t!==null&&p(this._fragmentFiber.child,!1,nk,t,void 0,void 0))};function nk(t,n){return t.tag===6?!1:(t=C(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Ei.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),p(this._fragmentFiber.child,!1,ik,t,void 0,void 0)};function ik(t,n){return t.tag===6||(t=C(t),n.observe(t)),!1}Ei.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),p(this._fragmentFiber.child,!1,ak,t,void 0,void 0);for(var r=n=0;r<ia.length;r++){var s=ia[r];s.fragmentInstance===this&&s.observer===t?t.unobserve(s.instance):ia[n++]=s}ia.length=n}};function ak(t,n){return t.tag===6||(t=C(t),n.unobserve(t)),!1}var ia=[],hm=!1;function rk(t,n,r){ia.push({fragmentInstance:t,observer:n,instance:r}),hm||(hm=!0,mk(function(){hm=!1;var s=ia;ia=[];for(var h=0;h<s.length;h++){var g=s[h];g.observer.unobserve(g.instance)}}))}Ei.prototype.getClientRects=function(){var t=[];return p(this._fragmentFiber.child,!1,lk,t,void 0,void 0),t};function lk(t,n){if(t.tag===6){t=t.stateNode;var r=t.ownerDocument.createRange();r.selectNodeContents(t),n.push.apply(n,r.getClientRects())}else t=C(t),n.push.apply(n,t.getClientRects());return!1}Ei.prototype.getRootNode=function(t){var n=b(this._fragmentFiber);return n===null?this:C(n).getRootNode(t)},Ei.prototype.compareDocumentPosition=function(t){var n=b(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var r=[];p(this._fragmentFiber.child,!1,fm,r,void 0,void 0);var s=C(n);if(r.length===0){if(r=s,j(this._fragmentFiber)){e:{for(n=this._fragmentFiber.return;n!==null;){if(n.tag===4){n=n.stateNode.containerInfo;break e}if(n.tag===3||n.tag===5||n.tag===27)break;n=n.return}n=null}n!=null&&(r=n)}n=this._fragmentFiber;var h=s=r.compareDocumentPosition(t);return r===t?h=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(r=S(n)[1],r===null?h=Node.DOCUMENT_POSITION_PRECEDING:(t=C(r).compareDocumentPosition(t),h=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),h|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}n=C(r[0]),h=C(r[r.length-1]);var g=j(this._fragmentFiber)?n.parentElement:s;if(g==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=g.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,g=g.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),z=h.compareDocumentPosition(t),X=N&Node.DOCUMENT_POSITION_CONTAINED_BY||z&Node.DOCUMENT_POSITION_CONTAINED_BY;return z=s&&g&&N&Node.DOCUMENT_POSITION_FOLLOWING&&z&Node.DOCUMENT_POSITION_PRECEDING,n=s&&n===t||g&&h===t||X||z?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&n===t||!g&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||ok(n,this._fragmentFiber,r[0],r[r.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function ok(t,n,r,s,h){var g=ti(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(r=!!g)e:{for(;g!==null;){if(g.tag===7&&(g===n||g.alternate===n)){r=!0;break e}g=g.return}r=!1}return r}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(g===null)return g=h.ownerDocument,h===g||h===g.documentElement||h===g.body;e:{for(g=n,n=b(n);g!==null;){if(!(g.tag!==5&&g.tag!==3&&g.tag!==27||g!==n&&g.alternate!==n)){g=!0;break e}g=g.return}g=!1}return g}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!g)&&!(n=g===r)&&(n=A(r,g,D),n===null?n=!1:(p(n,!0,T,g,r),g=E,E=null,n=g!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!g)&&!(n=g===s)&&(n=A(s,g,D),n===null?n=!1:(p(n,!0,_,g,s),g=E,M=E=null,n=g!==null)),n):!1}function L2(t,n){var r=t.ownerDocument.createRange();r.selectNodeContents(t),t=r.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,n?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ei.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(l(566));var n=[];p(this._fragmentFiber.child,!1,fm,n,void 0,void 0);var r=t!==!1;if(n.length===0){var s=S(this._fragmentFiber);if(s=r?s[1]||s[0]||b(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){t=C(s),L2(t,r);return}if(s=C(s),s.nodeType!==9){if(s.nodeType===11){r="host"in s?s.host:null,r!==null&&r.scrollIntoView(t);return}s.scrollIntoView(t)}}for(s=r?n.length-1:0;s!==(r?-1:n.length);){var h=n[s];h.tag===6?(h=C(h),L2(h,r)):C(h).scrollIntoView(t),s+=r?-1:1}};function sk(t,n){return t=C(t),B2(t,n),!1}function B2(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function I2(t,n){var r=n._eventListeners;if(r!==null)for(var s=0;s<r.length;s++){var h=r[s];t.addEventListener(h.type,h.attachedListener,Po(h.optionsOrUseCapture))}t.nodeType!==3&&(r=n._observers,r!==null&&r.forEach(function(g){for(var N=0,z=0;z<ia.length;z++){var X=ia[z];(X.fragmentInstance!==n||X.observer!==g||X.instance!==t)&&(ia[N++]=X)}ia.length=N,g.observe(t)}),B2(t,n))}function ck(t,n){var r=n._eventListeners;if(r!==null)for(var s=0;s<r.length;s++){var h=r[s];t.removeEventListener(h.type,h.attachedListener,Po(h.optionsOrUseCapture))}t.nodeType!==3&&(r=n._observers,r!==null&&r.forEach(function(g){typeof g.rootMargin=="string"?rk(n,g,t):g.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function mm(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":mm(r),Ya(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function uk(t,n,r,s){for(;t.nodeType===1;){var h=r;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[ya])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Pi(t.nextSibling),t===null)break}return null}function dk(t,n,r){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Pi(t.nextSibling),t===null))return null;return t}function H2(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Pi(t.nextSibling),t===null))return null;return t}function pm(t){return t.data==="$?"||t.data==="$~"}function gm(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function fk(t,n){var r=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||r.readyState!=="loading")n();else{var s=function(){n(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Pi(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 vm=null;function P2(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"||r==="/&"){if(n===0)return Pi(t.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}t=t.nextSibling}return null}function U2(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return t;n--}else r!=="/$"&&r!=="/&"||n++}t=t.previousSibling}return null}function hk(t,n){function r(){s=!0}if(t.ownerDocument.activeElement===t)return!0;var s=!1;try{t.ownerDocument.addEventListener("focus",r,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",r,!0)}return s}function mk(t){E2(function(){E2(function(n){return t(n)})})}function q2(t,n,r){switch(n=Zs(r),t){case"html":if(t=n.documentElement,!t)throw Error(l(452));return t;case"head":if(t=n.head,!t)throw Error(l(453));return t;case"body":if(t=n.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function F2(t,n,r){for(var s in r){var h=r[s];r.hasOwnProperty(s)&&h!=null&&jt(t,n,s,null,F6,h)}r.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Fn&&(t.onclick=null),Ya(t)}function ym(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ya(t)}var Ui=new Map,V2=new Set;function Js(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 or=me.d;me.d={f:pk,r:gk,D:vk,C:yk,L:xk,m:bk,X:wk,S:jk,M:Sk};function pk(){var t=or.f(),n=Iu();return t||n}function gk(t){var n=xa(t);n!==null&&n.tag===5&&n.type==="form"?G1(n):or.r(t)}var Uo=typeof document>"u"?null:document;function $2(t,n,r){var s=Uo;if(s&&typeof n=="string"&&n){var h=Rt(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof r=="string"&&(h+='[crossorigin="'+r+'"]'),V2.has(h)||(V2.add(h),t={rel:t,crossOrigin:r,href:n},s.querySelector(h)===null&&(n=s.createElement("link"),Tn(n,"link",t),Q(n),s.head.appendChild(n)))}}function vk(t){or.D(t),$2("dns-prefetch",t,null)}function yk(t,n){or.C(t,n),$2("preconnect",t,n)}function xk(t,n,r){or.L(t,n,r);var s=Uo;if(s&&t&&n){var h='link[rel="preload"][as="'+Rt(n)+'"]';n==="image"&&r&&r.imageSrcSet?(h+='[imagesrcset="'+Rt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(h+='[imagesizes="'+Rt(r.imageSizes)+'"]')):h+='[href="'+Rt(t)+'"]';var g=h;switch(n){case"style":g=qo(t);break;case"script":g=Fo(t)}if(!(Ui.has(g)||(t=I({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:t,as:n},r),Ui.set(g,t),s.querySelector(h)!==null||n==="style"&&s.querySelector(Ws(g))||n==="script"&&s.querySelector(ec(g))))){var N=s.createElement("link");Tn(N,"link",t),n==="style"&&(N[Ga]=!0,N.onload=N.onerror=function(){he(N)}),Q(N),s.head.appendChild(N)}}}function bk(t,n){or.m(t,n);var r=Uo;if(r&&t){var s=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Rt(s)+'"][href="'+Rt(t)+'"]',g=h;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Fo(t)}if(!Ui.has(g)&&(t=I({rel:"modulepreload",href:t},n),Ui.set(g,t),r.querySelector(h)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ec(g)))return}s=r.createElement("link"),Tn(s,"link",t),Q(s),r.head.appendChild(s)}}}function jk(t,n,r){or.S(t,n,r);var s=Uo;if(s&&t){var h=B(s).hoistableStyles,g=qo(t);n=n||"default";var N=h.get(g);if(!N){var z={loading:0,preload:null};if(N=s.querySelector(Ws(g)))z.loading=5;else{t=I({rel:"stylesheet",href:t,"data-precedence":n},r),(r=Ui.get(g))&&xm(t,r);var X=N=s.createElement("link");Q(X),Tn(X,"link",t),X._p=new Promise(function(ae,de){X.onload=ae,X.onerror=de}),X.addEventListener("load",function(){z.loading|=1}),X.addEventListener("error",function(){z.loading|=2}),z.loading|=4,$u(N,n,s)}N={type:"stylesheet",instance:N,count:1,state:z},h.set(g,N)}}}function wk(t,n){or.X(t,n);var r=Uo;if(r&&t){var s=B(r).hoistableScripts,h=Fo(t),g=s.get(h);g||(g=r.querySelector(ec(h)),g||(t=I({src:t,async:!0},n),(n=Ui.get(h))&&bm(t,n),g=r.createElement("script"),Q(g),Tn(g,"link",t),r.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function Sk(t,n){or.M(t,n);var r=Uo;if(r&&t){var s=B(r).hoistableScripts,h=Fo(t),g=s.get(h);g||(g=r.querySelector(ec(h)),g||(t=I({src:t,async:!0,type:"module"},n),(n=Ui.get(h))&&bm(t,n),g=r.createElement("script"),Q(g),Tn(g,"link",t),r.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function G2(t,n,r,s){var h=(h=yn.current)?Js(h):null;if(!h)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(r=qo(r.href),n=B(h).hoistableStyles,s=n.get(r),s||(s={type:"style",instance:null,count:0,state:null},n.set(r,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=qo(r.href);var g=B(h).hoistableStyles,N=g.get(t);if(N||(h=h.ownerDocument||h,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,N),(g=h.querySelector(Ws(t)))?g._p||(N.instance=g,N.state.loading=5):(g=Ui.get(t),g||(g={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Ui.set(t,g)),kk(h,t,g,N.state))),n&&s===null)throw Error(l(528,""));return N}if(n&&s!==null)throw Error(l(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(r=Fo(r),n=B(h).hoistableScripts,s=n.get(r),s||(s={type:"script",instance:null,count:0,state:null},n.set(r,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function qo(t){return'href="'+Rt(t)+'"'}function Ws(t){return'link[rel="stylesheet"]['+t+"]"}function Y2(t){return I({},t,{"data-precedence":t.precedence,precedence:null})}function kk(t,n,r,s){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Ga]!==!0){s.loading=1;return}}else n=t.createElement("link"),n[Ga]=!0,n.onload=n.onerror=he.bind(null,n),Tn(n,"link",r),Q(n),t.head.appendChild(n);s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2})}function Fo(t){return'[src="'+Rt(t)+'"]'}function ec(t){return"script[async]"+t}function X2(t,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+Rt(r.href)+'"]');if(s)return n.instance=s,Q(s),s;var h=I({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Q(s),Tn(s,"style",h),$u(s,r.precedence,t),n.instance=s;case"stylesheet":h=qo(r.href);var g=t.querySelector(Ws(h));if(g)return n.state.loading|=4,n.instance=g,Q(g),g;s=Y2(r),(h=Ui.get(h))&&xm(s,h),g=(t.ownerDocument||t).createElement("link"),Q(g);var N=g;return N._p=new Promise(function(z,X){N.onload=z,N.onerror=X}),Tn(g,"link",s),n.state.loading|=4,$u(g,r.precedence,t),n.instance=g;case"script":return g=Fo(r.src),(h=t.querySelector(ec(g)))?(n.instance=h,Q(h),h):(s=r,(h=Ui.get(g))&&(s=I({},r),bm(s,h)),t=t.ownerDocument||t,h=t.createElement("script"),Q(h),Tn(h,"link",s),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,$u(s,r.precedence,t));return n.instance}function $u(t,n,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=s.length?s[s.length-1]:null,g=h,N=0;N<s.length;N++){var z=s[N];if(z.dataset.precedence===n)g=z;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(t,n.firstChild))}function xm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function bm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var Gu=null;function K2(t,n,r){if(Gu===null){var s=new Map,h=Gu=new Map;h.set(r,s)}else h=Gu,s=h.get(r),s||(s=new Map,h.set(r,s));if(s.has(t))return s;for(s.set(t,null),r=r.getElementsByTagName(t),h=0;h<r.length;h++){var g=r[h];if(!(g[ya]||g[Mt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var N=g.getAttribute(n)||"";N=t+N;var z=s.get(N);z?z.push(g):s.set(N,[g])}}return s}function jm(t,n,r){t=t.ownerDocument||t,t.head.insertBefore(r,n==="title"?t.querySelector("head > title"):null)}function Ck(t,n,r){if(r===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 Q2(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Z2(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function J2(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function W2(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=J2(n),t.suspenseyImages.push(n)),t=Tk.bind(t),n.decode().then(t,t))}function Nk(t,n,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=qo(s.href),g=n.querySelector(Ws(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=tc.bind(t),n.then(t,t)),r.state.loading|=4,r.instance=g,Q(g);return}g=n.ownerDocument||n,s=Y2(s),(h=Ui.get(h))&&xm(s,h),g=g.createElement("link"),Q(g);var N=g;N._p=new Promise(function(z,X){N.onload=z,N.onerror=X}),Tn(g,"link",s),r.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=tc.bind(t),n.addEventListener("load",r),n.addEventListener("error",r))}}var Yu=0;function Ek(t,n){return t.stylesheets&&t.count===0&&Ku(t,t.stylesheets),0<t.count||0<t.imgCount?function(r){var s=setTimeout(function(){if(t.stylesheets&&Ku(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Yu===0&&(Yu=62500*$6());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ku(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Yu?50:800)+n);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(h)}}:null}function ey(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Ku(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function tc(){this.count--,ey(this)}function Tk(){this.imgCount--,ey(this)}var Xu=null;function Ku(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Xu=new Map,n.forEach(Ak,t),Xu=null,tc.call(t))}function Ak(t,n){if(!(n.state.loading&4)){var r=Xu.get(t);if(r)var s=r.get(null);else{r=new Map,Xu.set(t,r);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var N=h[g];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(r.set(N.dataset.precedence,N),s=N)}s&&r.set(null,s)}h=n.instance,N=h.getAttribute("data-precedence"),g=r.get(N)||s,g===s&&r.set(null,h),r.set(N,h),this.count++,s=tc.bind(this),h.addEventListener("load",s),h.addEventListener("error",s),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Vo={$$typeof:H,Provider:null,Consumer:null,_currentValue:Ne,_currentValue2:Ne,_threadCount:0};function _k(t,n,r,s,h,g,N,z,X){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xr(0),this.hiddenUpdates=xr(null),this.identifierPrefix=s,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function ty(t,n,r,s,h,g,N,z,X,ae,de,ve){return t=new _k(t,n,r,N,X,ae,de,ve,z),n=1,g===!0&&(n|=24),g=ii(3,null,null,n),t.current=g,g.stateNode=t,n=Lf(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:s,isDehydrated:r,cache:n},Pf(g),t}function ny(t){return t?(t=go,t):go}function iy(t,n,r,s,h,g){h=ny(h),s.context===null?s.context=h:s.pendingContext=h,s=Rr(n),s.payload={element:r},g=g===void 0?null:g,g!==null&&(s.callback=g),r=Or(t,s,n),r!==null&&(oi(r,t,n),Rs(r,t,n))}function ay(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<n?r:n}}function wm(t,n){ay(t,n),(t=t.alternate)&&ay(t,n)}function ry(t){if(t.tag===13||t.tag===31){var n=yl(t,67108864);n!==null&&oi(n,t,67108864),wm(t,67108864)}}function ly(t){if(t.tag===13||t.tag===31){var n=Ni();n=ga(n);var r=yl(t,n);r!==null&&oi(r,t,n),wm(t,n)}}var $o=!0;function Mk(t,n,r,s){var h=ce.T;ce.T=null;var g=me.p;try{me.p=2,Sm(t,n,r,s)}finally{me.p=g,ce.T=h}}function Rk(t,n,r,s){var h=ce.T;ce.T=null;var g=me.p;try{me.p=8,Sm(t,n,r,s)}finally{me.p=g,ce.T=h}}function Sm(t,n,r,s){if($o){var h=km(s);if(h===null)am(t,n,s,Qu,r),sy(t,s);else if(zk(h,t,n,r,s))s.stopPropagation();else if(sy(t,s),n&4&&-1<Ok.indexOf(t)){for(;h!==null;){var g=xa(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var N=Zi(g.pendingLanes);if(N!==0){var z=g;for(z.pendingLanes|=2,z.entangledLanes|=2;N;){var X=1<<31-Vt(N);z.entanglements[1]|=X,N&=~X}Aa(g),(gt&6)===0&&(Du=Xt()+500,Xs(0))}}break;case 31:case 13:z=yl(g,2),z!==null&&oi(z,g,2),Iu(),wm(g,2)}if(g=km(s),g===null&&am(t,n,s,Qu,r),g===h)break;h=g}h!==null&&s.stopPropagation()}else am(t,n,s,null,r)}}function km(t){return t=hl(t),Cm(t)}var Qu=null;function Cm(t){if(Qu=null,t=ti(t),t!==null){var n=u(t);if(n===null)t=null;else{var r=n.tag;if(r===13){if(t=d(n),t!==null)return t;t=null}else if(r===31){if(t=f(n),t!==null)return t;t=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Qu=t,null}function oy(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(ol()){case ua:return 2;case da:return 8;case bn:case fi:return 32;case sl:return 268435456;default:return 32}default:return 32}}var Nm=!1,$r=null,Gr=null,Yr=null,nc=new Map,ic=new Map,Xr=[],Ok="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 sy(t,n){switch(t){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Yr=null;break;case"pointerover":case"pointerout":nc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ic.delete(n.pointerId)}}function ac(t,n,r,s,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:r,eventSystemFlags:s,nativeEvent:g,targetContainers:[h]},n!==null&&(n=xa(n),n!==null&&ry(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function zk(t,n,r,s,h){switch(n){case"focusin":return $r=ac($r,t,n,r,s,h),!0;case"dragenter":return Gr=ac(Gr,t,n,r,s,h),!0;case"mouseover":return Yr=ac(Yr,t,n,r,s,h),!0;case"pointerover":var g=h.pointerId;return nc.set(g,ac(nc.get(g)||null,t,n,r,s,h)),!0;case"gotpointercapture":return g=h.pointerId,ic.set(g,ac(ic.get(g)||null,t,n,r,s,h)),!0}return!1}function cy(t){var n=ti(t.target);if(n!==null){var r=u(n);if(r!==null){if(n=r.tag,n===13){if(n=d(r),n!==null){t.blockedOn=n,zn(t.priority,function(){ly(r)});return}}else if(n===31){if(n=f(r),n!==null){t.blockedOn=n,zn(t.priority,function(){ly(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zu(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var r=km(t.nativeEvent);if(r===null){r=t.nativeEvent;var s=new r.constructor(r.type,r);fl=s,r.target.dispatchEvent(s),fl=null}else return n=xa(r),n!==null&&ry(n),t.blockedOn=r,!1;n.shift()}return!0}function uy(t,n,r){Zu(t)&&r.delete(n)}function Dk(){Nm=!1,$r!==null&&Zu($r)&&($r=null),Gr!==null&&Zu(Gr)&&(Gr=null),Yr!==null&&Zu(Yr)&&(Yr=null),nc.forEach(uy),ic.forEach(uy)}function Ju(t,n){t.blockedOn===n&&(t.blockedOn=null,Nm||(Nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dk)))}var Wu=null;function dy(t){Wu!==t&&(Wu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wu===t&&(Wu=null);for(var n=0;n<t.length;n+=3){var r=t[n],s=t[n+1],h=t[n+2];if(typeof s!="function"){if(Cm(s||r)===null)continue;break}var g=xa(r);g!==null&&(t.splice(n,3),n-=3,oh(g,{pending:!0,data:h,method:r.method,action:s},s,h))}}))}function Go(t){function n(X){return Ju(X,t)}$r!==null&&Ju($r,t),Gr!==null&&Ju(Gr,t),Yr!==null&&Ju(Yr,t),nc.forEach(n),ic.forEach(n);for(var r=0;r<Xr.length;r++){var s=Xr[r];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Xr.length&&(r=Xr[0],r.blockedOn===null);)cy(r),r.blockedOn===null&&Xr.shift();if(r=(t.ownerDocument||t).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var h=r[s],g=r[s+1],N=h[$t]||null;if(typeof g=="function")N||dy(r);else if(N){var z=null;if(g&&g.hasAttribute("formAction")){if(h=g,N=g[$t]||null)z=N.formAction;else if(Cm(h)!==null)continue}else z=N.action;typeof z=="function"?r[s+1]=z:(r.splice(s,3),s-=3),dy(r)}}}function fy(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(N){return h=N})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function Em(t){this._internalRoot=t}ed.prototype.render=Em.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(l(409));var r=n.current,s=Ni();iy(r,s,t,n,null,null)},ed.prototype.unmount=Em.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;iy(t.current,2,null,t,null,null),Iu(),n[jn]=null}};function ed(t){this._internalRoot=t}ed.prototype.unstable_scheduleHydration=function(t){if(t){var n=ei();t={blockedOn:null,target:t,priority:n};for(var r=0;r<Xr.length&&n!==0&&n<Xr[r].priority;r++);Xr.splice(r,0,t),r===0&&cy(t)}};var hy=i.version;if(hy!=="19.3.0")throw Error(l(527,hy,"19.3.0"));me.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=v(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var Lk={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!td.isDisabled&&td.supportsFiber)try{Xi=td.inject(Lk),cn=td}catch{}}return oc.createRoot=function(t,n){if(!c(t))throw Error(l(299));var r=!1,s="",h=nv,g=iv,N=av;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=ty(t,1,!1,null,null,r,s,null,h,g,N,fy),t[jn]=n.current,im(t),new Em(n)},oc.hydrateRoot=function(t,n,r){if(!c(t))throw Error(l(299));var s=!1,h="",g=nv,N=iv,z=av,X=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onUncaughtError!==void 0&&(g=r.onUncaughtError),r.onCaughtError!==void 0&&(N=r.onCaughtError),r.onRecoverableError!==void 0&&(z=r.onRecoverableError),r.formState!==void 0&&(X=r.formState)),n=ty(t,1,!0,n,r??null,s,h,X,g,N,z,fy),n.context=ny(null),r=n.current,s=Ni(),s=ga(s),h=Rr(s),h.callback=null,Or(r,h,s),r=s,n.current.lanes=r,Zn(n,r),Aa(n),t[jn]=n.current,im(t),new ed(n)},oc.version="19.3.0",oc}var Ny;function Kk(){if(Ny)return Mm.exports;Ny=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(i){console.error(i)}}return e(),Mm.exports=Xk(),Mm.exports}var Qk=Kk();const Zk={"locale.name":"English","locale.short":"EN","common.close":"Close","common.continue":"Continue","common.failed":"Something went wrong. Please try again.","common.listSeparator":", ","login.subtitle":"Sign in to continue","login.form":"Sign in","login.username":"Username","login.password":"Password","login.showPassword":"Show password","login.hidePassword":"Hide password","login.submit":"Sign in","login.submitting":"Signing in…","login.wrong":"Wrong username or password.","login.tooMany":"Too many attempts. Please try again later.","login.offline":"Can't connect to Jarvy. Check your network and try again.","login.themeLight":"Switch to the light theme","login.themeDark":"Switch to the dark theme","general.language":"Language","general.theme":"Theme","general.light":"Light","general.dark":"Dark","about.tagline":"A group chat where you and your AI Bots work side by side, running entirely on your own machine.","about.version":"Version {version}","about.source":"Source","about.package":"npm package","about.license":"License","about.notices":"Third-party notices","status.signedIn":"Signed in","status.signedOut":"Signed out","status.configured":"Ready","status.notConfigured":"Not set up","account.menu":"Account menu","account.menuFor":"Account menu for {name}","account.toggleTheme":"Switch theme","account.signOut":"Sign out","entry.menu":"Chat actions","entry.pin":"Pin","entry.unpin":"Unpin","entry.mute":"Mute","entry.unmute":"Unmute","entry.botInfo":"Bot info","entry.channelInfo":"Channel info","entry.deleteBot":"Delete Bot","entry.deleteChannel":"Delete channel","hint.reaction":"{actor} reacted {emoji} to your message","hint.reactionInThread":"{actor} reacted {emoji} to your message in “{title}”","hint.threadSummary":"{actor} updated the summary of “{title}”","hint.summary":"{actor} updated the thread summary","hint.notice":"{actor} updated the notice","app.connecting":"Connecting to Jarvy…","app.channelDeleted":"Channel deleted","app.botDeleted":"{name} deleted","app.notInChannel":{one:"{names} isn't in this channel, so wasn't notified",other:"{names} aren't in this channel, so weren't notified"},"app.memberAdded":"{name} joined #{channel}","app.sourceGone":"The original message no longer exists","ui.closeNamed":"Close {name}","ui.copied":"Copied","ui.copyFailed":"Couldn't copy","ui.copyCode":"Copy code","ui.image":"[Image: {alt}]","ui.imageHidden":"external image hidden","app.deleteChannelTitle":"Delete channel #{name}","app.deleteChannelBody":"Its messages, threads and attachments will be deleted. This can't be undone.","app.resizePane":"Drag to resize the side panel","common.cancel":"Cancel","common.save":"Save","common.create":"Create","common.delete":"Delete","common.retry":"Retry","common.back":"Back","common.add":"Add","common.saveFailed":"Couldn't save","common.openNav":"Open the chat list","common.you":"You","common.member":"Member","common.noMatch":"No matching members","common.searchMembers":"Search members","common.attachment":"[Attachment]","actions.reply":"Reply to this message","actions.react":"Add a reaction","actions.pickEmoji":"Pick an emoji","actions.more":"More","dialogs.candidates":"Members you can add","dialogs.allInside":"Everyone is already in this channel","dialogs.addCount":"Add ({count})","dialogs.addFailed":"Couldn't add members","dialogs.optional":"Optional","dialogs.deleteSection":"Delete the group “{name}”? Its channels move under Channels.","dialogs.deleteFailed":"Couldn't delete. Please try again.","dialogs.editSection":"Edit channel group","dialogs.sectionName":"Group name","dialogs.newSection":"New group","api.offline":"Can't connect to Jarvy. Check your network and try again.","api.historyFailed":"Couldn't load the messages. Please try again.","error.autoconfigModel":"Enter the model ID.","error.autoconfigSource":"The selected setup source isn't valid. Choose another one.","error.botMissing":"Can't find this Bot. It may have been deleted.","error.agentUndeletable":"The agent Bot can't be deleted. You can rename or stop it.","error.chatAccessChanged":"Your access to this chat has changed. Refresh and try again.","error.computerFailed":"The sandbox couldn't start.","error.computerMissing":"This Bot has no sandbox.","error.dockerUnavailable":"Docker isn't available on the computer running Jarvy.","error.connectionMissing":"Can't find this model connection. It may have been deleted.","error.credentialChanged":"The credential changed. Please try again.","error.credentialScope":"The credential belongs to another connection.","error.credentialsMissing":"Set up this connection's credential first.","error.dataLocked":"Jarvy is already running, or another program is using its data directory.","error.discoveryFormat":"This address didn't return a model list for the selected protocol. Check the API URL and protocol.","error.discoveryHttp":"Couldn't fetch the models: HTTP {status}.","error.discoveryKey":"Enter the API key.","error.discoveryProtocol":"The selected protocol can't list models. Add models manually.","error.discoveryUrl":"The API URL isn't valid.","error.discoveryUrlMissing":"Enter the API URL.","error.historyMissing":"Can't find this History record.","error.invalidCredential":"The credential format isn't valid.","error.invalidRun":"The Bot's state just changed. Refresh and try again.","error.loginInput":"Enter the authorization code or the redirect URL.","error.loginOption":"Pick a sign-in method.","error.loginStep":"The sign-in step has changed. Please start again.","error.loginFailed":"Sign-in failed. Refresh and try again.","error.messageMissing":"Can't find this message. It may have been deleted.","error.modelIncomplete":"Fill in the model's context window and max output.","error.modelMissing":"Can't find this model. It may have been removed.","error.modelRequestFailed":"Model request failed: {detail}","error.modelRequired":"Pick a model for the Bot first.","error.modelSwitchUncertain":"The model switch didn't finish. Pick the model again.","error.nameTaken":"Another member already has this name.","error.providerNameTaken":"A provider with this name already exists.","error.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"},Jk={"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.intro":"Connect model services; each Bot picks its model from these.","models.add":"Add a provider","models.empty":"No model connection yet","models.emptyHint":"Add a provider, then a Bot can pick one of its models.","models.count":{one:"{count} model",other:"{count} models"},"models.none":"No models yet","picker.intro":"Pick the kind of service; next you enter its credentials and models.","picker.back":"Back to the model page","picker.search":"Search providers","picker.searchPlaceholder":"Search providers…","picker.customHint":"Any OpenAI / Anthropic / Gemini compatible endpoint","picker.oauthHint":"Sign in with your account","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","picker.noMatchHint":"Try another word.","editor.back":"Back to the provider list","editor.delete":"Delete this provider","editor.connection":"Connection","editor.providerName":"Provider name","editor.name":"Connection name","editor.protocol":"API protocol","editor.url":"API URL","editor.defaultUrl":"The provider's own address","editor.key":"API key","editor.keyPlaceholder":"Enter the API key","editor.keySaved":"Saved. Leave empty to keep it.","editor.settings":"Connection settings","editor.models":"Model list","editor.selected":"{selected} of {total} selected","editor.fetch":"Get the model list","editor.fetching":"Getting…","editor.fetched":{one:"Got {count} model",other:"Got {count} models"},"editor.noneReturned":"This endpoint returned no models","editor.fetchFailed":"Couldn't get the model list","editor.loadingCatalog":"Loading the model catalog…","editor.autoSelected":"Autoconfigure selected","editor.addManually":"Add manually","editor.filter":"Filter models","editor.filterPlaceholder":"Filter models…","editor.selectVisible":"Select everything shown","editor.empty":"No models yet","editor.emptyCustom":"Get the model list, or add a model by hand.","editor.emptyBuiltin":"You can add a model by hand.","editor.autoSummary":"{parts}; saved with the form","editor.autoMatched":{one:"{count} configured",other:"{count} configured"},"editor.autoChoose":{one:"{count} needs a source",other:"{count} need a source"},"editor.autoNone":{one:"{count} not in the catalog",other:"{count} not in the catalog"},"editor.autoFailed":{one:"{count} failed",other:"{count} failed"},"editor.confirmDelete":'Delete "{name}" and its models?',"editor.deleteFailed":"Could not delete","editor.saveFailed":"Could not save","editor.saved":"Saved","editor.saving":"Saving…","editor.save":"Save","editor.footer":"Ticked models appear in the Bots' model menu once saved.","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"},Wk={"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","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.outside":"Not in this channel","mention.outsideList":"Members not in this channel","mention.searchOutside":"Search members not in this channel","mention.invites":"Choosing someone adds them to this channel","quote.inline":"“{text}”","quote.by":"{name}:","quote.remove":"Remove quote: {text}","quote.tooMany":"A message can quote up to {count} passages","quote.selection":"Selected text","quote.copy":"Copy","quote.quote":"Quote in reply","composer.busy":"Still uploading. Add more once it's done.","composer.tooMany":"A message can have up to {count} attachments.","composer.size":"Attachments can't be empty or larger than 10 MB.","composer.pasted":"pasted-image","composer.removeFile":"Remove attachment: {name}","composer.uploading":"Uploading: {name}","composer.replying":"Replying to","composer.cancelReply":"Cancel reply","composer.drop":"Drop to attach","composer.attach":"Attach files","composer.input":"Message","composer.send":"Send","files.preview":"Preview {name}","files.download":"Download {name}","files.gone":"This attachment doesn't exist or was deleted","files.readFailed":"Couldn't open the file ({status})","files.readError":"Couldn't open the file","files.kindImage":"Image","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"Text","files.kindFile":"File","files.downloadFile":"Download","files.showPreview":"Preview","files.showSource":"Source","files.showText":"Plain text","files.openTab":"Open in a new tab (isolated)","files.narrow":"Shrink the preview","files.widen":"Widen the preview","files.closePreview":"Close the preview","files.running":"Scripts are running in isolation: they can reach the network but can't read Jarvy's data.","files.scripts":{one:"This HTML has {count} script{hosts}. It isn't running. Once run, it can reach the network but can't read Jarvy's data.",other:"This HTML has {count} scripts{hosts}. They aren't running. Once run, they can reach the network but can't read Jarvy's data."},"files.scriptHosts":" (loading {hosts})","files.andMore":" and more","files.stop":"Stop scripts","files.run":"Run scripts","files.downloadToView":"Download this file to view it","files.tooLarge":"This file is over 1 MB, too large to preview here.","files.unsupported":"This file can't be previewed here.","files.reading":"Reading the file…","files.runningTitle":"{name} (running)","files.previous":"Previous attachment","files.choose":"Pick a file to preview","files.next":"Next attachment","question.failed":"Couldn't send the answer","question.dismissed":"Dismissed","question.chose":"Chose: {answer}","question.dismissLabel":"Close the question without answering","question.dismiss":"Skip","question.multiple":"Pick one or more","question.note":"Add a note (optional)","question.own":"Or write your own…","question.ownLabel":"Your own answer","question.confirmCount":"OK ({count})","question.confirm":"OK","question.send":"Send","directs.back":"Back to the list","directs.between":"{name} and {other}","directs.readOnly":"Read only","files.kindVideo":"Video","files.kindAudio":"Audio","files.cantPlay":"This browser can't play it","files.cantPlayHint":"Download it and open it in a player."},e8={"threadSort.title":"Sort","threadSort.current":"Sort: {order}","threadSort.updated":"Last updated","threadSort.created":"Created","threadSort.status":"Status","threads.list":"Thread list","threads.closeList":"Close the thread list","threads.byStatus":"Filter by status","threads.openCount":"Open {count}","threads.doneCount":"Done {count}","threads.all":"All","threads.loading":"Loading…","threads.none":"No threads yet","threads.following":"Following","threads.filter":"Filter","threads.unreadCount":"Unread {count}","threads.unread":"Unread","threads.noneUnread":"No unread threads","threads.noneOpen":"No open threads","threads.noneDone":"No finished threads","threads.notFollowing":"Not following","threads.pick":"Pick a thread","threads.open":"Open","thread.rename":"Rename","thread.title":"Thread title","thread.toggleStatus":"Switch status","thread.summary":"Summary","thread.editSummary":"Edit the summary","thread.conclude":"Mark done and post the summary to #{channel}","thread.addSummary":"Add a summary","thread.sourceElsewhere":"The original message isn't in this thread","thread.label":"Thread","thread.backToList":"Back to the thread list","thread.inChannel":"View in channel","thread.search":"Search thread messages (Ctrl+F)","thread.followingHint":"New replies count as unread","thread.notFollowingHint":"New replies don't count as unread","thread.follow":"Follow","thread.expand":"Expand","thread.collapse":"Back to the side panel","thread.close":"Close the thread panel","thread.conclusion":"Conclusion:","thread.concluded":"Marked done; the summary was posted to #{channel}","thread.noReplies":"No replies yet","thread.toLatest":"Jump to the latest reply","thread.reply":"Reply in thread"},t8={"usage.title":"Usage","usage.back":"Back to Bot info","usage.range":"Time range","usage.today":"Today","usage.days":"{count} days","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.note":"Input, output and cache are counted in tokens.","usage.notePartial":"Input, output and cache are counted in tokens; 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.noDescription":"No description yet","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":"Goes into the Bot's system prompt and 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","agent.note":"The agent Bot can't be deleted, but you can rename or stop it. Model connections and keys stay with you, in Settings.","bot.status":"Status","bot.statusHint":"Stopping keeps the conversation; once started, the Bot works when a new message arrives","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.activityHint":"Messages and History records","bot.usageHint":"Tokens and cost per model","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.emptyHint":"Chat messages and History show up here","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}"},n8={"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}"},i8={"environment.title":"Work environment","environment.computer":"Sandbox","environment.computerHint":"A Linux container that Jarvy makes and manages, used only by this Bot, with its workspace inside. Recommended.","environment.noDocker":"Needs Docker on the computer running Jarvy.","environment.host":"Your computer","environment.hostHint":"The computer running Jarvy, where it can access your files.","environment.default":"Default","environment.defaultHint":"Where it runs commands and works on files.","environment.awayHost":"Now on your computer (the Bot switched there itself).","environment.awayComputer":"Now in its sandbox (the Bot switched there itself).","environment.details":"Sandbox details","environment.sandboxAbout":"A Linux container only this Bot uses, with its workspace as its home directory.","environment.external":"External environments it may use","environment.hostAbout":"The computer running Jarvy","environment.externalHint":"When on, the Bot can switch there itself when it needs to. Turning it off while the Bot is there switches it back to its sandbox.","environment.accessFailed":"Couldn't change the environments it may use","environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Error","environment.state.unavailable":"No Docker","environment.hint.preparing":"Creating the first sandbox takes a few minutes while the image is built on this machine.","environment.hint.running":"Keeps running until you stop it.","environment.hint.stopped":"Starts automatically when the Bot needs it.","environment.hint.failed":"Couldn't start. Please try again.","environment.hint.unavailable":"Docker isn't available on the computer running Jarvy.","environment.start":"Start","environment.starting":"Starting…","environment.stop":"Stop","environment.stopping":"Stopping…","environment.stopTitle":"Stop {name}'s sandbox?","environment.stopBody":"Programs running in the sandbox, such as background services, will be closed. Installed software and workspace files are kept, and it starts automatically when next needed.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in the sandbox will be removed, returning it to its initial state. Workspace files are kept.","environment.resetConfirm":"Reset","environment.changeFailed":"Couldn't change the work environment"},a8={"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.lanHint":"Other devices on your local network can open Jarvy at these addresses.","connection.addresses":"Addresses","connection.copy":"Copy address","connection.root":"Security certificate","connection.rootHint":"Install it on your other devices so their browsers trust Jarvy without security warnings.","connection.download":"Download certificate","connection.fingerprint":"SHA-256 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.","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.allowHttp":"Allow HTTP access","connection.allowHttpHint":"Lets other devices connect over unencrypted HTTP. Passwords and conversations travel in plain text and others on the same network could see them, so 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"},r8={"secrets.intro":"Tokens and passwords your Bots need for their work. Values are encrypted and aren't shown again after saving. A Bot you grant a secret uses it through a placeholder and never sees the value.","secrets.add":"Add secret","secrets.empty":"No secrets yet","secrets.emptyHint":"Add a token or password, then choose which Bots can use it.","secrets.name":"Name","secrets.nameHint":"Capital letters, digits and underscores, starting with a letter. Bots refer to the secret by this name.","secrets.description":"Description","secrets.descriptionPlaceholder":"Optional, such as what it's for","secrets.value":"Value","secrets.newValue":"New value","secrets.newValuePlaceholder":"Leave empty to keep the current value","secrets.showValue":"Show value","secrets.hideValue":"Hide value","secrets.shortValue":"This value is shorter than 8 characters and may not be hidden when it appears in what Bots see.","secrets.noDescription":"No description","secrets.grantCount":{one:"{count} Bot",other:"{count} Bots"},"secrets.notGranted":"Not granted","secrets.unreadable":"Can't decrypt","secrets.unreadableHint":"This value was encrypted with a different master key and can't be read. Enter it again.","secrets.fingerprint":"Fingerprint","secrets.updated":"Updated {time}","secrets.usedCount":{one:"Used {count} time",other:"Used {count} times"},"secrets.neverUsed":"Never used","secrets.grants":"Bots that can use it","secrets.noBots":"No Bots yet.","secrets.addBots":"Add Bots","secrets.noGrants":"No Bot can use it yet.","secrets.searchBots":"Search Bots","secrets.noMatch":"No matching Bots","secrets.allGranted":"Every Bot can already use it.","secrets.revoke":"Remove {name}","secrets.onceTag":"This time only","secrets.edit":"Edit secret","secrets.uses":"Recent uses","secrets.noUses":"No uses yet.","secrets.deletedBot":"Deleted Bot","secrets.useCommand":"Command","secrets.useSsh":"SSH signature","secrets.delete":"Delete secret","secrets.deleteTitle":"Delete {name}?","secrets.deleteBody":"Bots that were granted it can no longer use it. Its use history is kept.","secrets.deleteConfirm":"Delete","secrets.masterKey":"Master key","secrets.keyFile":"Location","secrets.keyHint":"Secrets, model API keys and the HTTPS certificate are encrypted with the master key. It isn't in the data directory, so copy this file too when you back up or move Jarvy. Without it, secrets and API keys must be entered again, and a new HTTPS certificate is made that your other devices need to install 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."},l8={...Zk,...Jk,...Wk,...e8,...t8,...n8,...i8,...a8,...r8},o8={"locale.name":"中文","locale.short":"中","common.close":"关闭","common.continue":"继续","common.failed":"操作失败,请重试。","common.listSeparator":",","login.subtitle":"登录以继续","login.form":"登录","login.username":"用户名","login.password":"密码","login.showPassword":"显示密码","login.hidePassword":"隐藏密码","login.submit":"登录","login.submitting":"正在登录…","login.wrong":"用户名或密码不正确。","login.tooMany":"尝试次数过多,请稍后再试。","login.offline":"无法连接到 Jarvy,请检查网络后重试。","login.themeLight":"切换为浅色主题","login.themeDark":"切换为深色主题","general.language":"语言","general.theme":"主题","general.light":"浅色","general.dark":"深色","about.tagline":"你和 AI Bot 一起工作的群聊,完整运行在你自己的电脑上。","about.version":"版本 {version}","about.source":"源代码","about.package":"npm 包","about.license":"许可证","about.notices":"第三方声明","status.signedIn":"已登录","status.signedOut":"未登录","status.configured":"已配置","status.notConfigured":"未配置","account.menu":"账户菜单","account.menuFor":"{name} 的账户菜单","account.toggleTheme":"切换主题","account.signOut":"退出登录","entry.menu":"会话操作","entry.pin":"置顶","entry.unpin":"取消置顶","entry.mute":"免打扰","entry.unmute":"取消免打扰","entry.botInfo":"Bot 信息","entry.channelInfo":"频道信息","entry.deleteBot":"删除 Bot","entry.deleteChannel":"删除频道","hint.reaction":"{actor} 用 {emoji} 回应了你的消息","hint.reactionInThread":"{actor} 用 {emoji} 回应了你在「{title}」中的消息","hint.threadSummary":"{actor} 更新了线程「{title}」的摘要","hint.summary":"{actor} 更新了线程摘要","hint.notice":"{actor} 更新了公告","app.connecting":"正在连接 Jarvy…","app.channelDeleted":"频道已删除","app.botDeleted":"{name} 已删除","app.notInChannel":{one:"{names} 不在本频道,没有收到通知",other:"{names} 不在本频道,没有收到通知"},"app.memberAdded":"{name} 已加入 #{channel}","app.sourceGone":"原消息已不存在","ui.closeNamed":"关闭{name}","ui.copied":"已复制","ui.copyFailed":"复制失败","ui.copyCode":"复制代码","ui.image":"[图片:{alt}]","ui.imageHidden":"外部图片已隐藏","app.deleteChannelTitle":"删除频道 #{name}","app.deleteChannelBody":"频道里的消息、线程和附件都会被删除,且无法恢复。","app.resizePane":"拖动调整侧栏宽度","common.cancel":"取消","common.save":"保存","common.create":"创建","common.delete":"删除","common.retry":"重试","common.back":"返回","common.add":"添加","common.saveFailed":"保存失败","common.openNav":"打开会话列表","common.you":"你","common.member":"成员","common.noMatch":"没有匹配的成员","common.searchMembers":"搜索成员","common.attachment":"[附件]","actions.reply":"回复这条消息","actions.react":"添加表情回应","actions.pickEmoji":"选择表情","actions.more":"更多","dialogs.candidates":"可添加的成员","dialogs.allInside":"所有成员都已在频道中","dialogs.addCount":"添加({count})","dialogs.addFailed":"添加成员失败","dialogs.optional":"可选","dialogs.deleteSection":"删除分组「{name}」?其中的频道会移到「频道」下。","dialogs.deleteFailed":"删除失败,请重试","dialogs.editSection":"编辑频道分组","dialogs.sectionName":"分组名称","dialogs.newSection":"新分组","api.offline":"无法连接到 Jarvy,请检查网络后重试。","api.historyFailed":"无法加载聊天记录,请重试。","error.autoconfigModel":"请填写模型 ID。","error.autoconfigSource":"所选的配置来源无效,请重新选择。","error.botMissing":"找不到这个 Bot,它可能已被删除。","error.agentUndeletable":"主 Bot 不能删除,但可以改名或停止。","error.chatAccessChanged":"你在这个聊天中的权限已变化,请刷新后重试。","error.computerFailed":"沙箱启动失败。","error.computerMissing":"这个 Bot 没有沙箱。","error.dockerUnavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","error.connectionMissing":"找不到这个模型连接,它可能已被删除。","error.credentialChanged":"凭证已更改,请重试。","error.credentialScope":"凭证连接不匹配。","error.credentialsMissing":"请先配置此模型连接的凭证。","error.dataLocked":"Jarvy 已经在运行,或数据目录被其他程序占用。","error.discoveryFormat":"这个地址返回的不是所选协议的模型列表,请检查 API URL 和协议。","error.discoveryHttp":"获取模型失败:HTTP {status}。","error.discoveryKey":"请填写 API Key。","error.discoveryProtocol":"所选协议不支持获取模型列表,请手动添加模型。","error.discoveryUrl":"API URL 无效。","error.discoveryUrlMissing":"请填写 API URL。","error.historyMissing":"找不到这条 History 记录。","error.invalidCredential":"凭证格式无效。","error.invalidRun":"Bot 的状态刚刚变化,请刷新后重试。","error.loginInput":"请填写授权码或回调地址。","error.loginOption":"请选择登录方式。","error.loginStep":"登录步骤已变化,请重新开始。","error.loginFailed":"登录操作失败,请刷新后重试。","error.messageMissing":"找不到这条消息,它可能已被删除。","error.modelIncomplete":"请补全模型的上下文窗口和最大输出。","error.modelMissing":"找不到这个模型,它可能已被移除。","error.modelRequestFailed":"模型请求失败:{detail}","error.modelRequired":"请先为 Bot 选择模型。","error.modelSwitchUncertain":"模型切换未完成,请重新选择模型。","error.nameTaken":"名称已被其他成员使用。","error.providerNameTaken":"已有同名的 Provider。","error.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 信息"},s8={"settings.title":"设置","settings.sections":"设置分类","settings.general":"通用","settings.models":"模型","settings.network":"网络","settings.secrets":"密钥","settings.about":"关于","group.custom":"自定义 API","group.subscription":"订阅服务","group.apiKey":"API Key","models.intro":"连接模型服务,Bot 从这里选择模型。","models.add":"添加 Provider","models.empty":"还没有模型连接","models.emptyHint":"添加一个 Provider 后,就能为 Bot 选择模型。","models.count":{one:"{count} 个模型",other:"{count} 个模型"},"models.none":"尚未添加模型","picker.intro":"选择服务类型,下一步填写凭证与模型。","picker.back":"返回模型页面","picker.search":"搜索 Provider","picker.searchPlaceholder":"搜索 Provider…","picker.customHint":"任意 OpenAI / Anthropic / Gemini 兼容端点","picker.oauthHint":"账号登录","picker.keyHint":{one:"API Key · {count} 个模型",other:"API Key · {count} 个模型"},"picker.loading":"正在加载 Provider…","picker.retry":"重试","picker.noMatch":"没有匹配的 Provider","picker.noMatchHint":"换个关键词试试。","editor.back":"返回 Provider 列表","editor.delete":"删除 Provider","editor.connection":"连接","editor.providerName":"Provider 名称","editor.name":"连接名称","editor.protocol":"API 协议","editor.url":"API URL","editor.defaultUrl":"使用 Provider 默认地址","editor.key":"API Key","editor.keyPlaceholder":"输入 API Key","editor.keySaved":"已保存,留空则不修改","editor.settings":"连接设置","editor.models":"模型列表","editor.selected":"已选 {selected} / {total}","editor.fetch":"获取模型列表","editor.fetching":"正在获取…","editor.fetched":{one:"获取到 {count} 个模型",other:"获取到 {count} 个模型"},"editor.noneReturned":"此端点没有返回模型","editor.fetchFailed":"获取模型列表失败","editor.loadingCatalog":"正在加载模型目录…","editor.autoSelected":"自动配置已选","editor.addManually":"手动添加","editor.filter":"筛选模型","editor.filterPlaceholder":"筛选模型…","editor.selectVisible":"全选当前结果","editor.empty":"还没有模型","editor.emptyCustom":"获取模型列表,或手动添加模型。","editor.emptyBuiltin":"可以手动添加模型。","editor.autoSummary":"{parts};保存后生效","editor.autoMatched":{one:"已配置 {count} 个",other:"已配置 {count} 个"},"editor.autoChoose":{one:"{count} 个需选择来源",other:"{count} 个需选择来源"},"editor.autoNone":{one:"{count} 个在目录中未找到",other:"{count} 个在目录中未找到"},"editor.autoFailed":{one:"{count} 个失败",other:"{count} 个失败"},"editor.confirmDelete":"删除「{name}」及其模型?","editor.deleteFailed":"删除失败","editor.saveFailed":"保存未完成","editor.saved":"已保存","editor.saving":"正在保存…","editor.save":"保存","editor.footer":"勾选的模型会在保存后出现在 Bot 的模型列表中。","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 列表"},c8={"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":"以下为新消息","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.outside":"不在本频道中","mention.outsideList":"不在本频道中的成员","mention.searchOutside":"搜索不在本频道中的成员","mention.invites":"选择后会把对方加入本频道","quote.inline":"「{text}」","quote.by":"{name}:","quote.remove":"移除引用:{text}","quote.tooMany":"一条消息最多引用 {count} 段","quote.selection":"选中的文字","quote.copy":"复制","quote.quote":"在回复中引用","composer.busy":"附件上传中,请稍后再添加。","composer.tooMany":"每条消息最多添加 {count} 个附件。","composer.size":"附件不能为空,也不能超过 10 MB。","composer.pasted":"粘贴图片","composer.removeFile":"移除附件:{name}","composer.uploading":"正在上传:{name}","composer.replying":"回复","composer.cancelReply":"取消回复","composer.drop":"松开以添加附件","composer.attach":"添加附件","composer.input":"输入消息","composer.send":"发送消息","files.preview":"预览 {name}","files.download":"下载 {name}","files.gone":"附件不存在或已被删除","files.readFailed":"无法打开文件({status})","files.readError":"无法打开文件","files.kindImage":"图片","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"文本","files.kindFile":"文件","files.downloadFile":"下载文件","files.showPreview":"预览","files.showSource":"源码","files.showText":"原文","files.openTab":"在新标签页中打开(隔离运行)","files.narrow":"收起预览","files.widen":"扩大预览","files.closePreview":"关闭附件预览","files.running":"脚本正在隔离环境中运行:可以联网,但无法读取 Jarvy 的数据。","files.scripts":{one:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。",other:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。"},"files.scriptHosts":"(引用 {hosts})","files.andMore":" 等","files.stop":"停止脚本","files.run":"运行脚本","files.downloadToView":"此文件请下载后查看","files.tooLarge":"文件超过 1 MB,无法在页面内预览。","files.unsupported":"此文件不支持在页面内预览。","files.reading":"正在读取文件…","files.runningTitle":"{name}(运行中)","files.previous":"上一个附件","files.choose":"选择预览文件","files.next":"下一个附件","question.failed":"提交失败","question.dismissed":"已忽略","question.chose":"已选:{answer}","question.dismissLabel":"关闭问题,不回答","question.dismiss":"跳过","question.multiple":"可多选","question.note":"补充说明(可选)","question.own":"或者自己填写…","question.ownLabel":"自己填写回答","question.confirmCount":"确定({count})","question.confirm":"确定","question.send":"发送","directs.back":"返回列表","directs.between":"{name} 与 {other}","directs.readOnly":"只读","files.kindVideo":"视频","files.kindAudio":"音频","files.cantPlay":"当前浏览器无法播放","files.cantPlayHint":"下载后用播放器打开。"},u8={"threadSort.title":"排序","threadSort.current":"排序:{order}","threadSort.updated":"最近更新","threadSort.created":"创建时间","threadSort.status":"状态","threads.list":"线程列表","threads.closeList":"关闭线程列表","threads.byStatus":"按状态筛选","threads.openCount":"进行中 {count}","threads.doneCount":"已完成 {count}","threads.all":"全部","threads.loading":"正在加载…","threads.none":"暂无线程","threads.following":"已关注","threads.filter":"筛选","threads.unreadCount":"未读 {count}","threads.unread":"未读","threads.noneUnread":"暂无未读线程","threads.noneOpen":"暂无进行中的线程","threads.noneDone":"暂无已完成的线程","threads.notFollowing":"未关注","threads.pick":"选择一个线程","threads.open":"进行中","thread.rename":"修改标题","thread.title":"线程标题","thread.toggleStatus":"切换状态","thread.summary":"摘要","thread.editSummary":"编辑摘要","thread.conclude":"完成并把摘要发到 #{channel}","thread.addSummary":"添加摘要","thread.sourceElsewhere":"原消息不在这个线程里","thread.label":"线程","thread.backToList":"返回线程列表","thread.inChannel":"在频道中查看","thread.search":"搜索线程消息(Ctrl+F)","thread.followingHint":"新回复会计入未读","thread.notFollowingHint":"新回复不会计入未读","thread.follow":"关注","thread.expand":"展开","thread.collapse":"收起到侧栏","thread.close":"关闭线程","thread.conclusion":"结论:","thread.concluded":"已完成,摘要已发到 #{channel}","thread.noReplies":"暂无回复","thread.toLatest":"回到最新回复","thread.reply":"回复线程"},d8={"usage.title":"用量","usage.back":"返回 Bot 信息","usage.range":"时间范围","usage.today":"今天","usage.days":"{count} 天","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.note":"输入、输出和缓存均以 token 计。","usage.notePartial":"输入、输出和缓存均以 token 计;合计费用不含未设置价格的模型。","activity.error":"运行出错","activity.running":"运行中","activity.reasoning":"思考中","activity.texting":"回复中","activity.toolCalling":"使用工具","activity.asking":"等你回答","activity.noModel":"未设置模型","activity.idle":"空闲","activity.stopped":"未运行","bot.saved":"已保存","bot.changeFailed":"修改失败","bot.noDescription":"还没有描述","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 的系统提示词,从它下一次开始工作时生效。","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、频道、频道分组,或把成员移出频道,每次都先弹卡片请你确认","agent.note":"主 Bot 不能删除,但可以改名或停止。模型连接和密钥仍由你在设置里添加。","bot.status":"状态","bot.statusHint":"停止后对话记录会保留;启动后,Bot 收到新消息才会开始工作","bot.aborting":"正在中断…","bot.abort":"中断当前任务","bot.starting":"正在启动…","bot.stopping":"正在停止…","bot.start":"启动","bot.stop":"停止","bot.workspace":"工作区","bot.copyWorkspace":"复制工作区路径","bot.activity":"活动历史","bot.activityHint":"消息和 History 记录","bot.usageHint":"按模型统计 token 和费用","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.emptyHint":"聊天发言与 History 会显示在这里","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}"},f8={"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}"},h8={"environment.title":"工作环境","environment.computer":"沙箱","environment.computerHint":"由 Jarvy 创建和管理、只供这个 Bot 使用的 Linux 容器,工作区就在其中。推荐。","environment.noDocker":"需要运行 Jarvy 的电脑装有 Docker。","environment.host":"你的电脑","environment.hostHint":"运行 Jarvy 的这台电脑,可以访问你的文件。","environment.default":"默认环境","environment.defaultHint":"它平时在这里运行命令、读写文件。","environment.awayHost":"当前在你的电脑上(由 Bot 自行切换)。","environment.awayComputer":"当前在它的沙箱里(由 Bot 自行切换)。","environment.details":"沙箱详情","environment.sandboxAbout":"只供这个 Bot 使用的 Linux 容器,工作区是它在其中的主目录。","environment.external":"可以使用的外部环境","environment.hostAbout":"运行 Jarvy 的这台电脑","environment.externalHint":"开启后,Bot 可以在需要时自行切换过去;关闭时如果它正在使用,会被切回沙箱。","environment.accessFailed":"无法修改可使用的环境","environment.state.preparing":"准备中","environment.state.running":"运行中","environment.state.stopped":"已停止","environment.state.failed":"出错","environment.state.unavailable":"没有 Docker","environment.hint.preparing":"首次创建沙箱需要几分钟,用于在本机构建镜像。","environment.hint.running":"会一直运行,直到你停止。","environment.hint.stopped":"Bot 需要时会自动启动。","environment.hint.failed":"启动失败,请重试。","environment.hint.unavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","environment.start":"启动","environment.starting":"正在启动…","environment.stop":"停止","environment.stopping":"正在停止…","environment.stopTitle":"停止 {name} 的沙箱?","environment.stopBody":"沙箱里正在运行的程序(如后台服务)会被关闭。已安装的软件和工作区文件都会保留,下次需要时会自动启动。","environment.stopConfirm":"停止","environment.reset":"重置…","environment.resetTitle":"重置 {name} 的沙箱?","environment.resetBody":"沙箱里安装的软件会被清除,恢复到初始状态。工作区文件会保留。","environment.resetConfirm":"重置","environment.changeFailed":"无法切换工作环境"},m8={"connection.lan":"局域网访问","connection.localOnly":"仅限本机","connection.localOnlyHint":"Jarvy 目前只接受这台电脑上的访问。如需在局域网内的其他设备上使用,请用 {flag} 重新启动 Jarvy。","connection.lanHint":"局域网内的其他设备可以通过以下地址访问 Jarvy。","connection.addresses":"访问地址","connection.copy":"复制地址","connection.root":"安全证书","connection.rootHint":"在其他设备上安装后,浏览器会信任与 Jarvy 的连接,不再显示安全警告。","connection.download":"下载证书","connection.fingerprint":"SHA-256 指纹","connection.howTo":"安装说明","connection.howMac":"Mac:打开证书将它添加到「钥匙串访问」,双击该证书,在「信任」中将「使用此证书时」设为「始终信任」。","connection.howWindows":"Windows:打开证书,点「安装证书」,选择「将所有的证书都放入下列存储」,再选「受信任的根证书颁发机构」。","connection.howIos":"iPhone 和 iPad:在 Safari 中下载证书,前往「设置 › 通用 › VPN与设备管理」安装,再在「设置 › 通用 › 关于本机 › 证书信任设置」中针对它启用完全信任。","connection.howAndroid":"Android:下载证书后,在「设置」中搜索「CA 证书」并安装。不同手机的位置不同,通常在「安全」或「加密与凭据」里。","connection.allowHttp":"允许 HTTP 访问","connection.allowHttpHint":"允许其他设备通过未加密的 HTTP 访问。密码和对话内容会以明文传输,可能被同一网络中的他人看到,只建议在可信的网络中开启。","connection.insecure":"当前连接未加密,密码和对话内容可能被同一网络中的他人看到。","connection.useHttps":"切换到 HTTPS"},p8={"secrets.intro":"Bot 工作时需要的 token 和密码。值经过加密保存,保存后不再显示。获得授权的 Bot 通过占位符使用,看不到明文。","secrets.add":"添加密钥","secrets.empty":"还没有密钥","secrets.emptyHint":"添加 token 或密码后,再选择哪些 Bot 可以使用。","secrets.name":"名称","secrets.nameHint":"大写字母、数字和下划线,以字母开头。Bot 通过这个名称引用它。","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":"密钥、模型 API key 和 HTTPS 证书都用主密钥加密。它不在数据目录里,备份或迁移 Jarvy 时请把这个文件一起复制。丢失后,密钥和 API key 需要重新输入,HTTPS 证书会重新生成,其他设备上要重新安装。","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 无法解密,请在「设置 › 模型」中重新输入。"},g8={...o8,...s8,...c8,...u8,...d8,...f8,...h8,...m8,...p8},Hb=["en","zh"],Pb={en:l8,zh:g8},Nc={en:"en",zh:"zh-CN"},Ub="jarvy-locale";function v8(){var a;const e=localStorage.getItem(Ub);if(e==="en"||e==="zh")return e;const i=((a=navigator.languages)!=null&&a.length?navigator.languages:[navigator.language]).map(l=>l.toLowerCase()).find(l=>/^(en|zh)\b/.test(l));return i!=null&&i.startsWith("zh")?"zh":"en"}let Ba=v8();document.documentElement.lang=Nc[Ba];const Sp=new Set,Fd=()=>Ba;function qb(e){if(e!==Ba){Ba=e,localStorage.setItem(Ub,e),document.documentElement.lang=Nc[e];for(const i of Sp)i()}}function Fb(){return w.useSyncExternalStore(e=>(Sp.add(e),()=>{Sp.delete(e)}),Fd)}const kp=(e,i)=>Pb[e][i==="name"?"locale.name":"locale.short"];function Vb(e,i){const a=Pb[Ba][e];return typeof a=="string"?a:new Intl.PluralRules(Nc[Ba]).select(Number(i))==="one"?a.one:a.other}function x(e,i){const a=Vb(e,i==null?void 0:i.count);return i?a.replace(/\{(\w+)\}/g,(l,c)=>c in i?String(i[c]):l):a}const oa=(e,i)=>new Date(e).toLocaleString(Nc[Ba],i),fc=e=>oa(e,{hour:Ba==="zh"?"2-digit":"numeric",minute:"2-digit"}),y8=e=>{const i=new Date(e).getFullYear()===new Date().getFullYear();return oa(e,{year:i?void 0:"numeric",month:Ba==="zh"?"numeric":"short",day:"numeric"})},Ia=(e,i)=>new Intl.NumberFormat(Nc[Ba],i).format(e);function f0(e,i){return Vb(e,i.count).split(/\{(\w+)\}/).map((a,l)=>o.jsx(w.Fragment,{children:l%2?i[a]??`{${a}}`:a},l))}class ns extends Error{constructor(i,a,l,c){super(a),this.status=i,this.code=l,this.params=c}}async function Te(e,i={}){let a;try{a=await fetch(`/api${e}`,{...i,credentials:"same-origin",headers:{...i.body&&!(i.body instanceof Blob)?{"Content-Type":"application/json"}:{},...i.headers}})}catch{throw new Error(x("api.offline"))}const l=await a.json().catch(()=>({}));if(!a.ok)throw $b(a.status,l);return l}const $b=(e,i)=>{const a=typeof i=="object"&&i!==null?i:{};return new ns(e,a.error===void 0?`HTTP ${e}`:String(a.error),typeof a.code=="string"?a.code:void 0,a.params)};function x8(e,i,a){return new Promise((l,c)=>{const u=new XMLHttpRequest;u.open("POST",`/api/chats/${e}/attachments`),u.setRequestHeader("Content-Type",i.type||"application/octet-stream"),u.setRequestHeader("X-File-Name",encodeURIComponent(i.name)),u.upload.onprogress=d=>{d.lengthComputable&&(a==null||a(d.loaded/d.total))},u.onerror=()=>c(new Error(x("api.offline"))),u.onload=()=>{let d={};try{d=JSON.parse(u.responseText)}catch{}u.status>=200&&u.status<300?l(d):c($b(u.status,d))},u.send(i)})}async function b8(e,i=0){const a=[];let l=i;for(;;){const c=await Te(`/chats/${e}/messages?after=${l}&limit=1000`);if(a.push(...c.messages),!c.hasMore)return{messages:a};if(c.nextSequence<=l)throw new Error(x("api.historyFailed"));l=c.nextSequence}}const ct=e=>JSON.stringify(e),be={me:()=>Te("/me"),search:(e,i)=>Te(`/search?q=${encodeURIComponent(e)}${i?`&in=${i}`:""}&limit=60`),login:(e,i)=>Te("/login",{method:"POST",body:ct({username:e,password:i})}),logout:()=>Te("/logout",{method:"POST"}),bots:()=>Te("/bots"),createBot:e=>Te("/bots",{method:"POST",body:ct({name:e})}),saveBot:(e,i)=>Te(`/bots/${e}`,{method:"PUT",body:ct(i)}),modelOptions:()=>Te("/model-options"),selectBotModel:(e,i,a,l,c)=>Te(`/bots/${e}/model`,{method:"PUT",body:ct({connectionId:i,modelId:a,thinkingLevel:l,language:c})}),answerQuestion:(e,i,a)=>Te(`/chats/${e}/questions/${i}`,{method:"POST",body:ct(a)}),setBotColor:(e,i)=>Te(`/bots/${e}/color`,{method:"PUT",body:ct({color:i})}),chats:()=>Te("/chats"),createChat:e=>Te("/chats",{method:"POST",body:ct({botId:e})}),deleteChat:e=>Te(`/chats/${e}`,{method:"DELETE"}),members:()=>Te("/members"),sections:()=>Te("/sections"),createSection:e=>Te("/sections",{method:"POST",body:ct(e)}),updateSection:(e,i)=>Te(`/sections/${e}`,{method:"PATCH",body:ct(i)}),deleteSection:e=>Te(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>Te("/channels",{method:"POST",body:ct(e)}),updateChannel:(e,i)=>Te(`/chats/${e}`,{method:"PATCH",body:ct(i)}),addMember:(e,i)=>Te(`/chats/${e}/members`,{method:"POST",body:ct({memberId:i})}),removeMember:(e,i)=>Te(`/chats/${e}/members/${i}`,{method:"DELETE"}),setNote:(e,i)=>Te(`/chats/${e}/note`,{method:"PUT",body:ct({text:i})}),markRead:(e,i)=>Te(`/chats/${e}/read`,{method:"POST",body:ct({sequence:i})}),messages:b8,latestMessages:(e,i)=>Te(`/chats/${e}/messages?tail=${i}`),olderMessages:(e,i,a)=>Te(`/chats/${e}/messages?before=${i}&limit=${a}`),send:(e,i,a,l,c=!1,u,d=[])=>Te(`/chats/${e}/messages`,{method:"POST",body:ct({content:i,attachmentIds:a,clientMessageId:l,...c?{alsoToChannel:c}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),react:(e,i,a)=>Te(`/messages/${e}/reaction`,{method:"PUT",body:ct({emoji:i,on:a})}),pin:(e,i)=>Te(`/chats/${e}/pin`,{method:"PUT",body:ct({pinned:i})}),mute:(e,i)=>Te(`/chats/${e}/mute`,{method:"PUT",body:ct({muted:i})}),deleteBot:(e,i)=>Te(`/bots/${e}${i?"?files=delete":""}`,{method:"DELETE"}),chat:e=>Te(`/chats/${e}`),message:e=>Te(`/messages/${e}`),openThread:e=>Te(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>Te(`/chats/${e}/threads`),followedThreads:()=>Te("/threads"),updateThread:(e,i)=>Te(`/chats/${e}`,{method:"PATCH",body:ct(i)}),follow:(e,i)=>Te(`/chats/${e}/follow`,{method:"PUT",body:ct({following:i})}),botDirects:e=>Te(`/members/${e}/dms`),botSubscriptions:e=>Te(`/members/${e}/subscriptions`),controlBot:(e,i)=>Te(`/bots/${e}/${i}`,{method:"POST"}),setBotEnvironment:(e,i)=>Te(`/bots/${e}/environment`,{method:"PUT",body:ct({home:i})}),grantHost:(e,i)=>Te(`/bots/${e}/environment`,{method:"PUT",body:ct({hostGranted:i})}),computer:(e,i)=>Te(`/bots/${e}/computer/${i}`,{method:"POST"}),connection:()=>Te("/connection"),setConnection:e=>Te("/connection",{method:"PUT",body:ct({allowHttp:e})}),secrets:()=>Te("/secrets"),createSecret:e=>Te("/secrets",{method:"POST",body:ct(e)}),updateSecret:(e,i)=>Te(`/secrets/${e}`,{method:"PUT",body:ct(i)}),deleteSecret:e=>Te(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,i,a)=>Te(`/secrets/${e}/grants/${i}`,{method:"PUT",body:ct({granted:a})}),secretUses:e=>Te(`/secrets/${e}/uses`),fulfilSecret:(e,i,a)=>Te(`/secrets/requests/${e}/${i}`,{method:"POST",body:ct(a)}),botStatus:e=>Te(`/bots/${e}/status`),uploadAttachment:x8,removeAttachment:e=>Te(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>Te(`/model-connections/${e}/auth`),authStart:e=>Te(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>Te(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,i,a)=>Te(`/model-connections/${e}/auth/input`,{method:"POST",body:ct({promptId:i,value:a})}),authLogout:e=>Te(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>Te(`/model-connections/${e}/catalog`),providerModels:e=>Te(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>Te("/model-providers"),autoconfigModel:e=>Te("/model-autoconfig",{method:"POST",body:ct(e)}),discoverModels:e=>Te("/model-discovery",{method:"POST",body:ct(e)}),modelConnections:()=>Te("/model-connections"),createModelConnection:e=>Te("/model-connections",{method:"POST",body:ct(e)}),updateModelConnection:(e,i)=>Te(`/model-connections/${e}`,{method:"PUT",body:ct(i)}),deleteModelConnection:e=>Te(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,i,a=!1)=>Te(`/model-connections/${e}/credential`,{method:"PUT",body:ct({apiKey:i,remove:a})}),saveConnectionModel:(e,i,a)=>Te(`/model-connections/${e}/models`,{method:a?"PUT":"POST",body:ct({model:i,originalId:a})}),deleteConnectionModel:(e,i)=>Te(`/model-connections/${e}/models`,{method:"DELETE",body:ct({modelId:i})})};/**
|
|
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 j8=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 w8(e,i,a=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:j8(e),size:24,node:i,...a.length>0?{aliases:a}:{}}}/**
|
|
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 S8=e=>{let i="",a=!1;for(const l of e){if(l==="-"||l==="_"||l<=" "){a=i.length>0;continue}i.length===0?i+=l.toLowerCase():i+=a?l.toUpperCase():l,a=!1}return i};/**
|
|
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 k8=e=>{const i=S8(e);return i.charAt(0).toUpperCase()+i.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 Cp=(...e)=>e.filter((i,a,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===a).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 Ll={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 Dm(e){return e!=null}function C8(e,i={}){var b,j;const a=i.attributeNames??{},l=S=>a[S]??S,c=e.size??e.width??Ll.width,u=e.size??e.height??Ll.height,d=((b=e.aliases)==null?void 0:b.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((j=i.className)==null?void 0:j.split(" ").filter(Boolean))??[],v=i.includeDefaultClasses===!1?Cp(...m):Cp("lucide",...f,...m),y=i.absoluteStrokeWidth?Number(i.strokeWidth??Ll["stroke-width"])*Number(e.size??e.width??Ll.width)/Number(i.size??i.width??Ll.width):i.strokeWidth??Ll["stroke-width"];return["svg",{...Object.entries(Ll).reduce((S,[k,C])=>(S[l(k)]=C,S),{}),..."color"in i&&i.color&&{[l("stroke")]:i.color},..."size"in i&&Dm(i.size)&&{[l("width")]:i.size,[l("height")]:i.size},..."width"in i&&Dm(i.width)&&{[l("width")]:i.width},..."height"in i&&Dm(i.height)&&{[l("height")]:i.height},[l("stroke-width")]:y,...v&&{[l("class")]:v},[l("viewBox")]:`0 0 ${c} ${u}`,...i.hasA11yProp===!1?{[l("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},e.node.map(S=>{const[k,C,E]=S,M=i.nonScalingStroke?{[l("vector-effect")]:"non-scaling-stroke",...C}:C;return E?[k,M,E]:[k,M]})]}/**
|
|
85
|
-
* @license lucide-react v1.47.0 - ISC
|
|
86
|
-
*
|
|
87
|
-
* This source code is licensed under the ISC license.
|
|
88
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/function N8(e,i={}){return C8(e,{...i,attributeNames:{...i.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 E8=e=>{for(const i in e)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},T8=w.createContext({}),A8=()=>w.useContext(T8),_8=w.forwardRef(({color:e,size:i,width:a,height:l,strokeWidth:c,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...p},b)=>{const{size:j=24,strokeWidth:S=2,absoluteStrokeWidth:k=!1,nonScalingStroke:C=!1,color:E="currentColor",className:M=""}=A8()??{},T=!!m||E8(p),[_,D,A=[]]=N8(y,{color:e??E,width:a??i??j,height:l??i??j,strokeWidth:c??S,absoluteStrokeWidth:u??k,nonScalingStroke:d??C,className:Cp(M,f),hasA11yProp:T,attributes:p});return w.createElement(_,{ref:b,...D},[...A.map(([I,U])=>w.createElement(I,U)),...Array.isArray(m)?m:[m]])});/**
|
|
95
|
-
* @license lucide-react v1.47.0 - ISC
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the ISC license.
|
|
98
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/function Ae(e,i=[],a=[]){const l=typeof e=="string"?w8(e,i,a):e,c=w.forwardRef(({className:u,...d},f)=>w.createElement(_8,{ref:f,icon:l,className:u,...d}));return l.name&&(c.displayName=k8(l.name)),c}/**
|
|
100
|
-
* @license lucide-react v1.47.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const Gb={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"}]]};Gb.node;const M8=Ae(Gb);/**
|
|
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 Yb={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"}]]};Yb.node;const R8=Ae(Yb);/**
|
|
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 Xb={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"}]]};Xb.node;const O8=Ae(Xb);/**
|
|
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 Kb={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};Kb.node;const Vd=Ae(Kb);/**
|
|
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 Qb={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};Qb.node;const Np=Ae(Qb);/**
|
|
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 Zb={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Zb.node;const z8=Ae(Zb);/**
|
|
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 Jb={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"}]]};Jb.node;const D8=Ae(Jb);/**
|
|
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 Wb={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"}]]};Wb.node;const L8=Ae(Wb);/**
|
|
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 e4={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"}]]};e4.node;const B8=Ae(e4);/**
|
|
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 t4={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"]};t4.node;const I8=Ae(t4);/**
|
|
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 n4={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};n4.node;const Mi=Ae(n4);/**
|
|
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 i4={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};i4.node;const dr=Ae(i4);/**
|
|
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 a4={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a4.node;const r4=Ae(a4);/**
|
|
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 l4={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};l4.node;const Zr=Ae(l4);/**
|
|
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 o4={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"]};o4.node;const H8=Ae(o4);/**
|
|
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 s4={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"}]]};s4.node;const h0=Ae(s4);/**
|
|
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 c4={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"}]]};c4.node;const P8=Ae(c4);/**
|
|
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 u4={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"}]]};u4.node;const m0=Ae(u4);/**
|
|
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 d4={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"]};d4.node;const Ey=Ae(d4);/**
|
|
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 f4={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"}]]};f4.node;const U8=Ae(f4);/**
|
|
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 h4={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"}]]};h4.node;const q8=Ae(h4);/**
|
|
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 m4={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"}]]};m4.node;const p0=Ae(m4);/**
|
|
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 p4={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"}]]};p4.node;const g0=Ae(p4);/**
|
|
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 g4={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"]};g4.node;const F8=Ae(g4);/**
|
|
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 v4={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"]};v4.node;const V8=Ae(v4);/**
|
|
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 y4={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"]};y4.node;const $8=Ae(y4);/**
|
|
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 x4={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"}]]};x4.node;const G8=Ae(x4);/**
|
|
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 b4={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"}]]};b4.node;const Y8=Ae(b4);/**
|
|
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 j4={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"}]]};j4.node;const X8=Ae(j4);/**
|
|
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 w4={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"}]]};w4.node;const K8=Ae(w4);/**
|
|
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 S4={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"}]]};S4.node;const Q8=Ae(S4);/**
|
|
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 k4={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"}]]};k4.node;const Z8=Ae(k4);/**
|
|
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 C4={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"}]]};C4.node;const v0=Ae(C4);/**
|
|
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 N4={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"}]]};N4.node;const E4=Ae(N4);/**
|
|
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 T4={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"}]]};T4.node;const J8=Ae(T4);/**
|
|
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 A4={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};A4.node;const _4=Ae(A4);/**
|
|
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 M4={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"}]]};M4.node;const W8=Ae(M4);/**
|
|
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 R4={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"}]]};R4.node;const e7=Ae(R4);/**
|
|
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 O4={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"]};O4.node;const z4=Ae(O4);/**
|
|
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 D4={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"}]]};D4.node;const t7=Ae(D4);/**
|
|
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 L4={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"}]]};L4.node;const n7=Ae(L4);/**
|
|
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 B4={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"}]]};B4.node;const i7=Ae(B4);/**
|
|
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 I4={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"}]]};I4.node;const H4=Ae(I4);/**
|
|
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 P4={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"}]]};P4.node;const a7=Ae(P4);/**
|
|
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 U4={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};U4.node;const q4=Ae(U4);/**
|
|
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 F4={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"}]]};F4.node;const r7=Ae(F4);/**
|
|
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 V4={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"]};V4.node;const l7=Ae(V4);/**
|
|
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 $4={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"}]]};$4.node;const y0=Ae($4);/**
|
|
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 G4={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"}]]};G4.node;const o7=Ae(G4);/**
|
|
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 Y4={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"}]]};Y4.node;const s7=Ae(Y4);/**
|
|
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 X4={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"}]]};X4.node;const Ep=Ae(X4);/**
|
|
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 K4={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};K4.node;const ls=Ae(K4);/**
|
|
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 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 c7=Ae(Q4);/**
|
|
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 Z4={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"}]]};Z4.node;const x0=Ae(Z4);/**
|
|
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 J4={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"}]]};J4.node;const u7=Ae(J4);/**
|
|
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 W4={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"]};W4.node;const d7=Ae(W4);/**
|
|
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 e3={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"}]]};e3.node;const f7=Ae(e3);/**
|
|
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 t3={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t3.node;const Ec=Ae(t3);/**
|
|
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 n3={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"}]]};n3.node;const h7=Ae(n3);/**
|
|
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 i3={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"}]]};i3.node;const m7=Ae(i3);/**
|
|
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 a3={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"}]]};a3.node;const p7=Ae(a3);/**
|
|
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 r3={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"}]]};r3.node;const g7=Ae(r3);/**
|
|
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 l3={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"}]]};l3.node;const v7=Ae(l3);/**
|
|
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 o3={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"]};o3.node;const s3=Ae(o3);/**
|
|
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 c3={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"}]]};c3.node;const y7=Ae(c3);/**
|
|
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 u3={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"]};u3.node;const x7=Ae(u3);/**
|
|
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 d3={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"}]]};d3.node;const b7=Ae(d3);/**
|
|
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 f3={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"]};f3.node;const Td=Ae(f3);/**
|
|
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 h3={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"]};h3.node;const m3=Ae(h3);/**
|
|
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 p3={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"}]]};p3.node;const j7=Ae(p3);/**
|
|
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 g3={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"}]]};g3.node;const w7=Ae(g3);/**
|
|
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 v3={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"}]]};v3.node;const S7=Ae(v3);/**
|
|
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 y3={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};y3.node;const os=Ae(y3),x3={list:(e,i)=>Te(`/bots/${e}/activity${i===void 0?"":`?before=${encodeURIComponent(i)}`}`),message:(e,i)=>Te(`/bots/${e}/activity/messages/${i}`)};function b3(e){var i,a,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(i=0;i<c;i++)e[i]&&(a=b3(e[i]))&&(l&&(l+=" "),l+=a)}else for(a in e)e[a]&&(l&&(l+=" "),l+=a);return l}function k7(){for(var e,i,a=0,l="",c=arguments.length;a<c;a++)(e=arguments[a])&&(i=b3(e))&&(l&&(l+=" "),l+=i);return l}const Ty=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ay=k7,b0=(e,i)=>a=>{var l;if((i==null?void 0:i.variants)==null)return Ay(e,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:c,defaultVariants:u}=i,d=Object.keys(c).map(v=>{const y=a==null?void 0:a[v],p=u==null?void 0:u[v];if(y===null)return null;const b=Ty(y)||Ty(p);return c[v][b]}),f=a&&Object.entries(a).reduce((v,y)=>{let[p,b]=y;return b===void 0||(v[p]=b),v},{}),m=i==null||(l=i.compoundVariants)===null||l===void 0?void 0:l.reduce((v,y)=>{let{class:p,className:b,...j}=y;return Object.entries(j).every(S=>{let[k,C]=S;return Array.isArray(C)?C.includes({...u,...f}[k]):{...u,...f}[k]===C})?[...v,p,b]:v},[]);return Ay(e,d,m,a==null?void 0:a.class,a==null?void 0:a.className)},j3=48,Fa=(e,i=0)=>{const a=new Int32Array(e.length);for(let l=0;l<e.length;l++)a[l]=e.charCodeAt(l)-j3-i;return a},$d=e=>{const i=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)i[a+1]=i[a]+e[a];return i},Wr=e=>{const i=new Int32Array(e.length);let a=0;for(let l=0;l<e.length;l++){const c=e.charCodeAt(l)-j3;a+=c>>>1^-(c&1),i[l]=a}return i},C7=384,N7=[],Ul=$d(Fa("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),E7=$d(Fa(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),T7="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",A7=(()=>{const e=Ul.length-1,i=new Int32Array(e);for(let c=e-1;c>=0;c--){let u=1,d=c+1;for(let f=Ul[c];f<Ul[c+1];f++)u+=i[d],d+=i[d];i[c]=u}const a=new Int32Array(Ul[e]);let l=0;for(let c=0;c<e;c++){let u=c+1;for(let d=Ul[c];d<Ul[c+1];d++)a[l++]=u,u+=i[u]}return a})(),_7=Fa("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),M7=$d(Fa("123333359346463635126536711576")),R7=Fa("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),O7=Fa("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),z7=Wr("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),D7=(()=>{const e=new Int32Array(319).fill(-1),i=Wr("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Wr("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let l=0;l<i.length;l++)e[i[l]]=a[l];return e})(),L7="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 i=e.split(" "),a=i.shift();for(let l=0;l<i.length;l++)i[l]=a+i[l];return i}),_y=Wr("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),B7=Wr("ɠ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"),I7=Wr("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),w3=new Int32Array(995),S3=new Int32Array(995),k3=new Int32Array(995);let Tp="";const Ap=new Int32Array(1038);{const e=new Map;let i=0,a=0;for(let l=0;l<_y.length;l++)for(const c of L7[I7[l]]){let u=e.get(c);u===void 0&&(u=i++,e.set(c,u),Ap[u*2]=Tp.length,Ap[u*2+1]=c.length,Tp+=c),w3[a]=_y[l],S3[a]=B7[l],k3[a]=u,a++}}const H7=Wr("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),P7=$d(Fa("1::24444432:442:44:44>222222:44:4421322511111311111114")),U7=Wr("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"),q7=Fa("ij"),F7=Fa(""),V7=Fa("1"),$7="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var G7={GROUP_COUNT:C7,customValidatorNames:N7,edgeStart:Ul,labelStart:E7,labelText:T7,edgeTarget:A7,nodeGroup:_7,nodeVlist:D7,vlistPat:M7,vlistOps:R7,vlistRef:O7,vlistGroup:z7,litAnchor:w3,litGroup:S3,litPool:k3,poolOffsets:Ap,poolText:Tp,adjGid:H7,adjStart:P7,adjTgt:U7,patGid:q7,patTgt:F7,postfixLookupGroups:V7,orderSensitiveModifiers:$7};const Y7="line"in new Error,_a=-1,Bl=-1,Lm=(e,i,a)=>{let l=2166136261;for(let c=i;c<a;c++)l=Math.imul(l^e.charCodeAt(c),16777619);return l},bd=(e,i,a)=>{const l=a-i;let c=Math.imul(l,2654435761)^e.charCodeAt(i);if(l>3){const u=l>>2,d=l>>1;c=Math.imul(c^e.charCodeAt(i+1)<<8^e.charCodeAt(i+2)<<16^e.charCodeAt(i+u),2246822507),c=Math.imul(c^e.charCodeAt(i+d)<<8^e.charCodeAt(i+d+u)<<16^e.charCodeAt(a-3),3266489909),c^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let f=i+3,m=a-4;f<i+8&&f<m;f++,m--)c=Math.imul(c^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return c^c>>>15|0},X7=(e,i,a={})=>{const{GROUP_COUNT:l,edgeStart:c,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:p,vlistRef:b,vlistGroup:j,litAnchor:S,litGroup:k,litPool:C,poolOffsets:E,poolText:M,adjGid:T,adjStart:_,adjTgt:D,patGid:A,patTgt:I,postfixLookupGroups:U,customValidatorNames:$,orderSensitiveModifiers:O}=e,V=new Int32Array(l).fill(-1);for(let ue=0;ue<T.length;ue++)V[T[ue]]=ue;let q=0;for(let ue=0;ue+1<_.length;ue++){const B=_[ue+1]-_[ue];B>q&&(q=B)}let ee=32;for(;ee<2*(1+q+A.length);)ee<<=1;const Y=new Int32Array(b.length+1);for(let ue=0;ue<b.length;ue++)Y[ue+1]=Y[ue]+y[b[ue]+1]-y[b[ue]];const H=new Uint8Array(l);for(let ue=0;ue<U.length;ue++)H[U[ue]]=1;const K=c.length-1,R=new Uint8Array(K);let F=0,ne=!0;for(let ue=0;ue<S.length;ue++){R[S[ue]]=1;const B=E[C[ue]*2+1];B>F&&(F=B);const Q=M.charCodeAt(E[C[ue]*2]);(Q===91||Q===40)&&(ne=!1)}let L=1;for(;L<S.length*2;)L<<=1;const J=new Int32Array(L).fill(-1);for(let ue=0;ue<S.length;ue++){const B=E[C[ue]*2];let Q=(Lm(M,B,B+E[C[ue]*2+1])^Math.imul(S[ue],2654435761)|0)&L-1;for(;J[Q]!==-1;)Q=Q+1&L-1;J[Q]=ue}const W=(ue,B,Q,he)=>{let Ee=(Lm(B,Q,he)^Math.imul(ue,2654435761)|0)&L-1;const Se=he-Q;for(;;){const _e=J[Ee];if(_e===-1)return-1;if(S[_e]===ue&&E[C[_e]*2+1]===Se){const Be=E[C[_e]*2];let Ke=!0;for(let Me=0;Me<Se;Me++)if(M.charCodeAt(Be+Me)!==B.charCodeAt(Q+Me)){Ke=!1;break}if(Ke)return k[_e]}Ee=Ee+1&L-1}},P=a.cacheSize??8192,G=a.prefix??e.prefix??"",fe=G===""?"":G+":",ye=fe.length,je=($??[]).map(ue=>{throw new Error("cn: missing validator "+ue)}),re=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let me=0,Ne=-1,Le=-1,Ve=-1,mt=-1;const ot=ue=>ue>=97&&ue<=122||ue>=65&&ue<=90||ue>=48&&ue<=57||ue===95,Je=ue=>/\s/.test(String.fromCharCode(ue)),_t=(ue,B,Q)=>{if(me=0,Ne=-1,Q-B<3)return;const he=ue.charCodeAt(B),Ee=ue.charCodeAt(Q-1);if(he===91&&Ee===93)me=1;else if(he===40&&Ee===41)me=2;else return;Ve=B+1,mt=Q-1;let Se=B+1;if(ot(ue.charCodeAt(Se))){for(Se++;Se<Q-1;){const _e=ue.charCodeAt(Se);if(!ot(_e)&&_e!==45)break;Se++}Se<Q-2&&ue.charCodeAt(Se)===58&&(Ne=B+1,Le=Se,Ve=Se+1)}},vn=(ue,B,Q,he)=>{if(Q-B!==he.length)return!1;for(let Ee=0;Ee<he.length;Ee++)if(ue.charCodeAt(B+Ee)!==he.charCodeAt(Ee))return!1;return!0},yn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,di=ue=>!!ue&&!Number.isNaN(Number(ue)),rn=(ue,B,Q)=>{if(Q-B<11||!vn(ue,B,B+10,"@container"))return!1;if(ue.charCodeAt(B+10)===47)return Q-B>=12;const he=ue.charCodeAt(B+11);return he===115&&Q-B>=17&&vn(ue,B+10,B+16,"-size/")||he===110&&Q-B>=19&&vn(ue,B+10,B+18,"-normal/")},Yi=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],pe="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(ue=>ue.split(" ")),ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],He=(ue,B,Q,he)=>{if(ue>=10){if(ue>=25)return je[ue-25](B.slice(Q,he));const Ee=ue-10;if(me!==Yi[Ee])return!1;if(Ne>=0){for(const Se of pe[Ee])if(vn(B,Ne,Le,Se))return!0;return!1}switch(ke[Ee]){case 0:return!1;case 1:return!0;case 2:{const Se=B.slice(Ve,mt);return re.test(Se)&&!xe.test(Se)}case 3:return di(B.slice(Ve,mt));case 4:return ce.test(B.slice(Ve,mt));default:return oe.test(B.slice(Ve,mt))}}switch(ue){case 0:return!0;case 1:return me===0;case 2:return me===1;case 3:return me===2;case 4:return yn.test(B.slice(Q,he));case 5:return di(B.slice(Q,he));case 6:{const Ee=B.slice(Q,he);return!!Ee&&Number.isInteger(Number(Ee))}case 7:return he>Q&&B.charCodeAt(he-1)===37&&di(B.slice(Q,he-1));case 8:return Pn.test(B.slice(Q,he));default:return rn(B,Q,he)}},qe=new Set(typeof O=="string"?O.split(" "):O),We=(ue,B,Q,he,Ee,Se)=>{const _e=Lm(B,Q,he)^(Ee?2654435769:0)|0;let Be=ue.get(_e);if(Be!==void 0)e:for(let $e=0;$e<Be.length;$e++){const st=Be[$e];if(!(st.imp!==Ee||st.k.length!==he-Q)){for(let Pe=0;Pe<st.k.length;Pe++)if(st.k.charCodeAt(Pe)!==B.charCodeAt(Q+Pe))continue e;return st.id}}else ue.set(_e,Be=[]);const Ke=B.slice(Q,he),Me=Se(Ke);return Be.push({k:Ke,imp:Ee,id:Me}),Me};let Pt=new Map,xn=new Map,Ut=2;const Rn=4096,Un=(ue,B)=>{const Q=[];let he=0,Ee=0,Se=0;for(let Me=0;Me<ue.length;Me++){const $e=ue.charCodeAt(Me);he===0&&Ee===0&&$e===58?(Q.push(ue.slice(Se,Me)),Se=Me+1):$e===91?he++:$e===93?he--:$e===40?Ee++:$e===41&&Ee--}Q.push(ue.slice(Se));let _e=Q[0];if(Q.length>1){const Me=[];let $e=[];for(const st of Q)st.charCodeAt(0)===91||qe.has(st)?($e.length&&(Me.push(...$e.sort()),$e=[]),Me.push(st)):$e.push(st);$e.length&&Me.push(...$e.sort()),_e=Me.join(":")}const Be=B?_e+" !":_e;let Ke=xn.get(Be);return Ke===void 0&&xn.set(Be,Ke=Ut++),Ke};let Ot=new Map,On=l;const Xe=l+4096,Xt=()=>On++,ol=2097152,ua=8192,da=new Int32Array(ua),bn=new Array(ua).fill(null),fi=new Int32Array(ua),sl=new Int32Array(ua),hi=new Uint8Array(ua);let lo=0;const Xi=(ue,B,Q,he,Ee,Se,_e,Be)=>{let Ke=ue;if(bn[ue]!==null)if(bn[ue|1]===null)Ke=ue|1;else if((lo++&3)===0)Ke=ue|lo>>2&1;else return;bn[Ke]=B.slice(Q,he),da[Ke]=Ee,fi[Ke]=Se,sl[Ke]=_e,hi[Ke]=Be},cn=()=>bn.fill(null);let Lt=256,Vt=[new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt)],[fa,ha,Ki,Qi]=Vt,Ri=new Uint8Array(Lt),Qn=new Uint8Array(Lt);const Zi=()=>{Lt*=2,Vt=Vt.map(B=>{const Q=new Int32Array(Lt);return Q.set(B),Q}),[fa,ha,Ki,Qi]=Vt;const ue=new Uint8Array(Lt);ue.set(Ri),Ri=ue,Qn=new Uint8Array(Lt)};let mi=64,pi=new Int32Array(mi),ma=new Int32Array(mi);const cl=new Int32Array(l);let gi=2048,xr=21,Zn=new Float64Array(gi),pa=new Int32Array(gi),Jn=0;const ln=(ue,B)=>{if(ue===0&&B<l)return cl[B]===Jn?1:(cl[B]=Jn,0);const Q=ue*2097152+B+1;let he=Math.imul(Q,2654435761)>>>xr;for(;pa[he]===Jn;){if(Zn[he]===Q)return 1;he=he+1&gi-1}return Zn[he]=Q,pa[he]=Jn,0},un=(ue,B,Q,he,Ee)=>{if(Q-B>=2&&ue.charCodeAt(B)===91&&ue.charCodeAt(Q-1)===93){let Se=-1;for(let _e=B+1;_e<Q-1;_e++)if(ue.charCodeAt(_e)===58){Se=_e;break}return Se===-1||Se===B+1?_a:We(Ot,ue,B+1,Se,0,Xt)}if(he>=0&&m[he]>=0)return m[he];for(let Se=Ee-1;Se>=0;Se--){const _e=ma[Se];if(_e>Q)continue;const Be=pi[Se],Ke=Q-_e;if(R[Be]===1&&Ke>0&&Ke<=F){const It=ue.charCodeAt(_e);if(ne===!1||It!==91&&It!==40){const vi=W(Be,ue,_e,Q);if(vi>=0)return vi}}const Me=v[Be];if(Me<0)continue;const $e=b[Me],st=y[$e],Pe=y[$e+1];if(st===Pe)continue;_t(ue,_e,Q);const on=Y[Me]-st;for(let It=st;It<Pe;It++)if(He(p[It],ue,_e,Q))return j[on+It]}return _a},ga=ue=>{const B=ue.length;let Q=0,he=0,Ee=!1;(Ut>Rn||Pt.size>Rn)&&(Pt=new Map,xn=new Map,Ut=2,cn()),On>Xe&&(Ot=new Map,On=l,cn());let Se=0;for(;Se<B;){let Me=ue.charCodeAt(Se);if(Me===32||Me>=9&&Me<=13||Me>=160&&Je(Me)){Me!==32&&(Ee=!0),Se++;continue}const $e=Se;let st=0;for(;Se<B;){if(Me=ue.charCodeAt(Se),Me<=32){if(Me===32)break;if(Me>=9&&Me<=13){Ee=!0;break}}else if(Me>=160&&Je(Me)){Ee=!0;break}st=Math.imul(st^Me,16777619),Se++}const Pe=Se,on=Pe-$e;Q===Lt&&Zi();const It=Q++;fa[It]=$e,ha[It]=Pe,he+=on,st^=Math.imul(on,2654435761);const vi=st^st>>>15|0,Kt=vi&8190;{let dt=-1;if(da[Kt]===vi&&bn[Kt]!==null&&bn[Kt].length===on?dt=Kt:da[Kt|1]===vi&&bn[Kt|1]!==null&&bn[Kt|1].length===on&&(dt=Kt|1),dt>=0){const dn=bn[dt];let Oi=!0;for(let bi=0;bi<on;bi++)if(dn.charCodeAt(bi)!==ue.charCodeAt($e+bi)){Oi=!1;break}if(Oi){Ki[It]=fi[dt],Qi[It]=sl[dt],Ri[It]=hi[dt];continue}}}let Qt=$e;if(ye!==0){if(Pe-$e<=ye||!ue.startsWith(fe,$e)){Ki[It]=_a,Xi(Kt,ue,$e,Pe,vi,_a,0,0);continue}Qt=$e+ye}let oo=0,ms=0,Xa=-1,so=-1;for(let dt=Qt;dt<Pe;dt++){const dn=ue.charCodeAt(dt);if(oo===0&&ms===0){if(dn===58){Xa=dt;continue}if(dn===47){so=dt;continue}}dn===91?oo++:dn===93?oo--:dn===40?ms++:dn===41&&ms--}const Ic=Xa>=Qt?Xa+1:Qt;let Rt=Ic,Dn=Pe,wr=!1,co=0;Dn>Rt&&ue.charCodeAt(Dn-1)===33?(wr=!0,Dn--):Dn>Rt&&ue.charCodeAt(Rt)===33&&(wr=!0,Rt++,co=1);let ni=-1;so>Ic&&(ni=so+co,ni>=Dn&&(ni=-1));let uo=Rt;Dn-Rt>1&&ue.charCodeAt(Rt)===45&&(uo=Rt+1);let yi=0,qn=0,Sr=0,ps=-1,xi=0;(v[0]>=0||R[0]===1)&&(pi[0]=0,ma[0]=uo,xi=1);let dl=Bl,gs=0;for(let dt=uo;dt<Dn;dt++)if(dt===ni&&(dl=qn<Sr?Bl:yi,gs=xi),yi!==Bl){const dn=ue.charCodeAt(dt);let Oi=-1;if(qn<Sr)d.charCodeAt(qn)===dn?(qn++,qn===Sr&&(Oi=yi=ps)):yi=Bl;else{const bi=c[yi],ml=c[yi+1];let Ka=Bl;for(let Sn=bi;Sn<ml;Sn++){const pl=u[Sn];if(d.charCodeAt(pl)===dn){u[Sn+1]-pl===1?Oi=Ka=f[Sn]:(qn=pl+1,Sr=u[Sn+1],ps=f[Sn],Ka=yi);break}}yi=Ka}if(Oi>=0&&(v[Oi]>=0||R[Oi]===1)&&dt+1<Dn&&ue.charCodeAt(dt+1)===45){if(xi===mi){mi*=2;const bi=new Int32Array(mi);bi.set(pi),pi=bi;const ml=new Int32Array(mi);ml.set(ma),ma=ml}pi[xi]=Oi,ma[xi]=dt+2,xi++}}ni===Dn&&(dl=qn<Sr?Bl:yi,gs=xi);const vs=qn<Sr?Bl:yi;let wn,Fn=!1;if(ni>=0)if(Fn=!0,wn=un(ue,Rt,ni,dl,gs),wn!==_a&&wn<l&&H[wn]){const dt=un(ue,Rt,Dn,vs,xi);dt!==_a&&dt!==wn&&(wn=dt,Fn=!1)}else wn===_a&&(wn=un(ue,Rt,Dn,vs,xi),Fn=!1);else wn=un(ue,Rt,Dn,vs,xi);let fl=0,hl=0;wn===_a?Ki[It]=_a:(hl=Fn?1:0,fl=Qt>=Xa?wr?1:0:We(Pt,ue,Qt,Xa,wr?1:0,dt=>Un(dt,wr)),Ki[It]=wn,Ri[It]=hl,Qi[It]=fl),Xi(Kt,ue,$e,Pe,vi,wn,fl,hl)}if(Q===0)return"";if(Q===1)return fa[0]===0&&ha[0]===B?ue:ue.slice(fa[0],ha[0]);if(Q*ee>gi){for(;Q*ee>gi;)gi<<=1,xr--;Zn=new Float64Array(gi),pa=new Int32Array(gi)}if(Ut>=ol||On>=ol)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(cl.fill(0),pa.fill(0),Jn=1);let _e=!1;for(let Me=Q-1;Me>=0;Me--){const $e=Ki[Me];if($e===_a){Qn[Me]=1;continue}const st=Qi[Me];if(ln(st,$e)===1){Qn[Me]=0,_e=!0;continue}if(Qn[Me]=1,$e<l){const Pe=V[$e];if(Pe>=0)for(let on=_[Pe];on<_[Pe+1];on++)ln(st,D[on]);if(Ri[Me]&1)for(let on=0;on<A.length;on++)A[on]===$e&&ln(st,I[on])}}if(!_e&&!Ee&&B===he+Q-1)return ue;let Be="",Ke=0;for(;Ke<Q;){if(!Qn[Ke]){Ke++;continue}const Me=fa[Ke];let $e=ha[Ke],st=Ke+1;for(;st<Q&&Qn[st]&&fa[st]===$e+1&&ue.charCodeAt($e)===32;)$e=ha[st],st++;Be.length>0&&(Be+=" "),Be+=ue.slice(Me,$e),Ke=st}return Be},Wn=16384,ei=new Int32Array(Wn*2);let zn=0,Bt=1,Mt=Object.create(null),$t=Object.create(null),jn=new Map,ul=new Map,br=0,jr=0;const va=()=>{zn^=Wn,Bt=Bt+1|0,jr=0},ya=ue=>{let B=Mt[ue];if(B!==void 0)return B;const Q=bd(ue,0,ue.length),he=(Q&16383)+zn,Ee=ei[he]===(Q^Bt)||ei[he^Wn]===(Q^Bt-1);return Ee&&(B=$t[ue],B!==void 0)?(Mt[ue]=B,B):(B=ga(ue),Ee?(Mt[ue]=B,++br>P&&(br=0,$t=Mt,Mt=Object.create(null),va())):(ei[he]=Q^Bt,++jr>Wn&&va()),B)},Ga=ue=>{let B=jn.get(ue);if(B!==void 0)return B;const Q=bd(ue,0,ue.length),he=(Q&16383)+zn,Ee=ei[he]===(Q^Bt)||ei[he^Wn]===(Q^Bt-1);return Ee&&(B=ul.get(ue),B!==void 0)?(jn.set(ue,B),B):(B=ga(ue),Ee?(jn.set(ue,B),++br>P&&(br=0,ul=jn,jn=new Map,va())):(ei[he]=Q^Bt,++jr>Wn&&va()),B)},Ya=ue=>{const B=bd(ue,0,ue.length),Q=(B&16383)+zn;return ei[Q]===(B^Bt)||ei[Q^Wn]===(B^Bt-1)?!0:(ei[Q]=B^Bt,++jr>Wn&&va(),!1)},ti=P===0?ga:Y7?ue=>{const B=jn.get(ue);return B!==void 0?B:Ga(ue)}:ya;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ti(arguments[0]):ti(Q7.apply(null,arguments))},mergeString:ti,seenBefore:P===0?()=>!1:Ya,mergeUncached:ga}},Ad=(e,i)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!i||Array.isArray(e))){const l=e;for(let c=0;c<l.length;c++){const u=l[c];if(!u)continue;const d=typeof u=="string"?u:Ad(u,i);d&&(a&&(a+=" "),a+=d)}return a}if(i){if(typeof e=="number")return""+e;if(typeof e=="object")for(const l in e)e[l]&&(a&&(a+=" "),a+=l)}return a},K7=(e,i)=>{let a="";for(let l=0;l<e.length;l++){const c=e[l];if(!c)continue;const u=typeof c=="string"?c:Ad(c,i);u&&(a&&(a+=" "),a+=u)}return a},Q7=function(){return K7(arguments,!1)},Z7=256,My=16,J7=1024,Bm=4096,W7=(e,i)=>{const a=i===void 0?()=>!0:i.seenBefore,l=i===void 0?e:i.mergeUncached;let c=new Map,u=new Map,d=0,f=null,m=null,v=[],y=[],p=0;const b=(E,M,T)=>{m===null&&(m=new Array(Bm).fill(""),v=new Array(Bm).fill(""),y=new Array(Bm).fill(""));const _=bd(E,0,E.length)&4094;if(m[_]===E&&v[_]===M)return y[_];if(m[_|1]===E&&v[_|1]===M)return y[_|1];const D=e(T?M+" "+E:E),A=m[_]===""?_:_|(m[_|1]===""?1:p++&1);return m[A]=E,v[A]=M,y[A]=D,D},j=(E,M,T,_)=>{let D=0;if(M){if(M!==E.a0)return!1;D=1}if(T){if(T!==(D===0?E.a0:E.a1))return!1;D++}if(_){if(_!==(D===0?E.a0:D===1?E.a1:E.a2))return!1;D++}return D===E.t},S=(E,M)=>{const T=E.a;let _=0;for(let D=0;D<M.length;D++){const A=M[D];if(A){if(A!==T[_])return!1;_++}}return _===E.t},k=(E,M)=>{const T=E.length,_=f===null?null:f.n;if(!M){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let D="",A=-1,I=0,U=!1;for(let V=0;V<T;V++){let q=E[V];if(q){if(typeof q!="string"){if(q=E[V]=Ad(q,!0),!q)continue;U=!0}A<0&&(D=q,A=V),I++}}if(I===0)return"";if(I===1)return e(D);if(U){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let $=c.get(D);$===void 0&&($=u.get(D),$!==void 0&&c.set(D,$));let O=null;if($!==void 0){if($.skip>0){$.skip--,f=null;let q=D;for(let ee=A+1;ee<T;ee++){const Y=E[ee];Y&&(q+=" "+Y)}return b(q,"",!1)}const V=$.e;e:for(let q=0;q<V.length;q++){const ee=V[q];if(ee.t!==I)continue;const Y=ee.a;let H=1;for(let K=A+1;K<T;K++){const R=E[K];if(R&&R!==Y[H++])continue e}O=ee;break}O!==null&&($.miss=0)}if(O===null){let V=D;const q=[D];for(let Y=A+1;Y<T;Y++){const H=E[Y];H&&(V+=" "+H,q.push(H))}if(!a(V))return l(V);O={r:e(V),t:q.length,a0:q[0],a1:q[1],a2:q[2]??"",a:q,n:null},$===void 0?c.set(D,$={e:[],miss:0,skip:0,at:0}):++$.miss>My&&($.miss=My,$.skip=J7,$.e.length=0,$.at=0);const ee=$.e;ee.length<Z7?ee.push(O):(ee[$.at]=O,$.at=$.at+1&255),++d>1e3&&(d=0,u=c,c=new Map)}return f!==null&&f!==O&&(f.n=O),f=O,O.r},C=E=>Array.isArray(E)?k(E.slice(),!1):e(Ad(E,!0));return function(E,M,T){const _=arguments.length;if((_|1)===3){const I=f;if(I!==null){const U=I.n;if(U!==null&&j(U,E,M,T))return f=U,U.r;if(I!==U&&j(I,E,M,T))return I.r}if(_===2&&typeof M=="string"&&M!==""){const U=c.get(E);if(U!==void 0&&U.skip>0)return U.skip--,f=null,b(M,E,!0)}return k([E,M,T],!0)}if(_===1)return typeof E=="string"?e(E):C(E);const D=f;if(D!==null){const I=D.n;if(I!==null){const U=I.a;let $=0,O=!0;for(let V=0;V<_;V++){const q=arguments[V];if(q){if(q!==U[$]){O=!1;break}$++}}if(O&&$===I.t)return f=I,I.r}if(D!==I){const U=D.a;let $=0,O=!0;for(let V=0;V<_;V++){const q=arguments[V];if(q){if(q!==U[$]){O=!1;break}$++}}if(O&&$===D.t)return D.r}}const A=[];for(let I=0;I<_;I++)A.push(arguments[I]);return k(A,!0)}},Ry=X7(G7),an=W7(Ry.mergeString,Ry);var io=Ib(),eC=Object.defineProperty,j0=(e,i)=>eC(e,"name",{value:i,configurable:!0});function _p(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}j0(_p,"setRef");function C3(...e){return i=>{let a=!1;const l=e.map(c=>{const u=_p(c,i);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let c=0;c<l.length;c++){const u=l[c];typeof u=="function"?u():_p(e[c],null)}}}}j0(C3,"composeRefs");function wt(...e){return w.useCallback(C3(...e),e)}j0(wt,"useComposedRefs");var tC=Object.defineProperty,sa=(e,i)=>tC(e,"name",{value:i,configurable:!0});function Ha(e){const i=w.forwardRef((a,l)=>{let{children:c,...u}=a,d=null,f=!1;const m=[];Mp(c)&&typeof nd=="function"&&(c=nd(c._payload)),w.Children.forEach(c,b=>{var j;if(A3(b)){f=!0;const S=b;let k="child"in S.props?S.props.child:S.props.children;Mp(k)&&typeof nd=="function"&&(k=nd(k._payload)),d=aC(S,k),m.push((j=d==null?void 0:d.props)==null?void 0:j.children)}else m.push(b)}),d?d=w.cloneElement(d,void 0,m):!f&&w.Children.count(c)===1&&w.isValidElement(c)&&(d=c);const v=d?T3(d):void 0,y=wt(l,v);if(!d){if(c||c===0)throw new Error(f?oC(e):lC(e));return c}const p=E3(u,d.props??{});return d.type!==w.Fragment&&(p.ref=l?y:v),w.cloneElement(d,p)});return i.displayName=`${e}.Slot`,i}sa(Ha,"createSlot");var nC=Ha("Slot"),N3=Symbol.for("radix.slottable");function iC(e){const i=sa(a=>"child"in a?a.children(a.child):a.children,"Slottable");return i.displayName=`${e}.Slottable`,i.__radixId=N3,i}sa(iC,"createSlottable");var aC=sa((e,i)=>{if("child"in e.props){const a=e.props.child;return w.isValidElement(a)?w.cloneElement(a,void 0,e.props.children(a.props.children)):null}return w.isValidElement(i)?i:null},"getSlottableElementFromSlottable");function E3(e,i){const a={...i};for(const l in i){const c=e[l],u=i[l];/^on[A-Z]/.test(l)?c&&u?a[l]=(...f)=>{const m=u(...f);return c(...f),m}:c&&(a[l]=c):l==="style"?a[l]={...c,...u}:l==="className"&&(a[l]=[c,u].filter(Boolean).join(" "))}return{...e,...a}}sa(E3,"mergeProps");function T3(e){var l,c;let i=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?e.ref:(i=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}sa(T3,"getElementRef");function A3(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===N3}sa(A3,"isSlottable");var rC=Symbol.for("react.lazy");function Mp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rC&&"_payload"in e&&_3(e._payload)}sa(Mp,"isLazyComponent");function _3(e){return typeof e=="object"&&e!==null&&"then"in e}sa(_3,"isPromiseLike");var lC=sa(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),oC=sa(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),nd=Cc[" use ".trim().toString()],sC=Object.defineProperty,cC=(e,i)=>sC(e,"name",{value:i,configurable:!0}),uC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=uC.reduce((e,i)=>{const a=Ha(`Primitive.${i}`),l=w.forwardRef((c,u)=>{const{asChild:d,...f}=c,m=d?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(m,{...f,ref:u})});return l.displayName=`Primitive.${i}`,{...e,[i]:l}},{});function M3(e,i){e&&io.flushSync(()=>e.dispatchEvent(i))}cC(M3,"dispatchDiscreteCustomEvent");var dC=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"}),fC=Object.defineProperty,Fi=(e,i)=>fC(e,"name",{value:i,configurable:!0});function hC(e,i){const a=w.createContext(i);a.displayName=e+"Context";const l=Fi(u=>{const{children:d,...f}=u,m=w.useMemo(()=>f,Object.values(f));return o.jsx(a.Provider,{value:m,children:d})},"Provider");l.displayName=e+"Provider";function c(u,d={}){const{optional:f=!1}=d,m=w.useContext(a);if(m)return m;if(i!==void 0)return i;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Fi(c,"useContext"),[l,c]}Fi(hC,"createContext");function nl(e,i=[]){let a=[];function l(u,d){const f=w.createContext(d);f.displayName=u+"Context";const m=a.length;a=[...a,d];const v=Fi(p=>{var E;const{scope:b,children:j,...S}=p,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useMemo(()=>S,Object.values(S));return o.jsx(k.Provider,{value:C,children:j})},"Provider");v.displayName=u+"Provider";function y(p,b,j={}){var E;const{optional:S=!1}=j,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useContext(k);if(C)return C;if(d!==void 0)return d;if(!S)throw new Error(`\`${p}\` must be used within \`${u}\``)}return Fi(y,"useContext"),[v,y]}Fi(l,"createContext");const c=Fi(()=>{const u=a.map(d=>w.createContext(d));return Fi(function(f){const m=(f==null?void 0:f[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return c.scopeName=e,[l,R3(c,...i)]}Fi(nl,"createContextScope");function R3(...e){const i=e[0];if(e.length===1)return i;const a=Fi(()=>{const l=e.map(c=>({useScope:c(),scopeName:c.scopeName}));return Fi(function(u){const d=l.reduce((f,{useScope:m,scopeName:v})=>{const p=m(u)[`__scope${v}`];return{...f,...p}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return a.scopeName=i.scopeName,a}Fi(R3,"composeContextScopes");var mC=Object.defineProperty,gn=(e,i)=>mC(e,"name",{value:i,configurable:!0});function O3(e){const i=e+"CollectionProvider",[a,l]=nl(i),[c,u]=a(i,{collectionRef:{current:null},itemMap:new Map}),d=gn(k=>{const{scope:C,children:E}=k,M=w.useRef(null),T=w.useRef(new Map).current;return o.jsx(c,{scope:C,itemMap:T,collectionRef:M,children:E})},"CollectionProvider");d.displayName=i;const f=e+"CollectionSlot",m=Ha(f),v=w.forwardRef((k,C)=>{const{scope:E,children:M}=k,T=u(f,E),_=wt(C,T.collectionRef);return o.jsx(m,{ref:_,children:M})});v.displayName=f;const y=e+"CollectionItemSlot",p="data-radix-collection-item",b=Ha(y),j=w.forwardRef((k,C)=>{const{scope:E,children:M,...T}=k,_=w.useRef(null),D=wt(C,_),A=u(y,E);return w.useEffect(()=>(A.itemMap.set(_,{ref:_,...T}),()=>void A.itemMap.delete(_))),o.jsx(b,{[p]:"",ref:D,children:M})});j.displayName=y;function S(k){const C=u(e+"CollectionConsumer",k);return w.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const T=Array.from(M.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((A,I)=>T.indexOf(A.ref.current)-T.indexOf(I.ref.current))},[C.collectionRef,C.itemMap])}return gn(S,"useCollection"),[{Provider:d,Slot:v,ItemSlot:j},S,l]}gn(O3,"createCollection");var Oy=new WeakMap,tn,Ai,Im=(Ai=class extends Map{constructor(a){super(a);gy(this,tn);Tm(this,tn,[...super.keys()]),Oy.set(this,!0)}set(a,l){return Oy.get(this)&&(this.has(a)?Bn(this,tn)[Bn(this,tn).indexOf(a)]=a:Bn(this,tn).push(a)),super.set(a,l),this}insert(a,l,c){const u=this.has(l),d=Bn(this,tn).length,f=w0(a);let m=f>=0?f:d+f;const v=m<0||m>=d?-1:m;if(v===this.size||u&&v===this.size-1||v===-1)return this.set(l,c),this;const y=this.size+(u?0:1);f<0&&m++;const p=[...Bn(this,tn)];let b,j=!1;for(let S=m;S<y;S++)if(m===S){let k=p[S];p[S]===l&&(k=p[S+1]),u&&this.delete(l),b=this.get(k),this.set(l,c)}else{!j&&p[S-1]===l&&(j=!0);const k=p[j?S:S-1],C=b;b=this.get(k),this.delete(k),this.set(k,C)}return this}with(a,l,c){const u=new Ai(this);return u.insert(a,l,c),u}before(a){const l=Bn(this,tn).indexOf(a)-1;if(!(l<0))return this.entryAt(l)}setBefore(a,l,c){const u=Bn(this,tn).indexOf(a);return u===-1?this:this.insert(u,l,c)}after(a){let l=Bn(this,tn).indexOf(a);if(l=l===-1||l===this.size-1?-1:l+1,l!==-1)return this.entryAt(l)}setAfter(a,l,c){const u=Bn(this,tn).indexOf(a);return u===-1?this:this.insert(u+1,l,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Tm(this,tn,[]),super.clear()}delete(a){const l=super.delete(a);return l&&Bn(this,tn).splice(Bn(this,tn).indexOf(a),1),l}deleteAt(a){const l=this.keyAt(a);return l!==void 0?this.delete(l):!1}at(a){const l=jd(Bn(this,tn),a);if(l!==void 0)return this.get(l)}entryAt(a){const l=jd(Bn(this,tn),a);if(l!==void 0)return[l,this.get(l)]}indexOf(a){return Bn(this,tn).indexOf(a)}keyAt(a){return jd(Bn(this,tn),a)}from(a,l){const c=this.indexOf(a);if(c===-1)return;let u=c+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(a,l){const c=this.indexOf(a);if(c===-1)return;let u=c+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(a,l){let c=0;for(const u of this){if(Reflect.apply(a,l,[u,c,this]))return u;c++}}findIndex(a,l){let c=0;for(const u of this){if(Reflect.apply(a,l,[u,c,this]))return c;c++}return-1}filter(a,l){const c=[];let u=0;for(const d of this)Reflect.apply(a,l,[d,u,this])&&c.push(d),u++;return new Ai(c)}map(a,l){const c=[];let u=0;for(const d of this)c.push([d[0],Reflect.apply(a,l,[d,u,this])]),u++;return new Ai(c)}reduce(...a){const[l,c]=a;let u=0,d=c??this.at(0);for(const f of this)u===0&&a.length===1?d=f:d=Reflect.apply(l,this,[d,f,u,this]),u++;return d}reduceRight(...a){const[l,c]=a;let u=c??this.at(-1);for(let d=this.size-1;d>=0;d--){const f=this.at(d);d===this.size-1&&a.length===1?u=f:u=Reflect.apply(l,this,[u,f,d,this])}return u}toSorted(a){const l=[...this.entries()].sort(a);return new Ai(l)}toReversed(){const a=new Ai;for(let l=this.size-1;l>=0;l--){const c=this.keyAt(l),u=this.get(c);a.set(c,u)}return a}toSpliced(...a){const l=[...this.entries()];return l.splice(...a),new Ai(l)}slice(a,l){const c=new Ai;let u=this.size-1;if(a===void 0)return c;a<0&&(a=a+this.size),l!==void 0&&l>0&&(u=l-1);for(let d=a;d<=u;d++){const f=this.keyAt(d),m=this.get(f);c.set(f,m)}return c}every(a,l){let c=0;for(const u of this){if(!Reflect.apply(a,l,[u,c,this]))return!1;c++}return!0}some(a,l){let c=0;for(const u of this){if(Reflect.apply(a,l,[u,c,this]))return!0;c++}return!1}},tn=new WeakMap,gn(Ai,"OrderedDict"),Ai);function jd(e,i){if("at"in Array.prototype)return Array.prototype.at.call(e,i);const a=z3(e,i);return a===-1?void 0:e[a]}gn(jd,"at");function z3(e,i){const a=e.length,l=w0(i),c=l>=0?l:a+l;return c<0||c>=a?-1:c}gn(z3,"toSafeIndex");function w0(e){return e!==e||e===0?0:Math.trunc(e)}gn(w0,"toSafeInteger");function pC(e){const i=e+"CollectionProvider",[a,l]=nl(i),[c,u]=a(i,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Im,setItemMap:gn(()=>{},"setItemMap")}),d=gn(({state:T,..._})=>T?o.jsx(m,{..._,state:T}):o.jsx(f,{..._}),"CollectionProvider");d.displayName=i;const f=gn(T=>{const _=C();return o.jsx(m,{...T,state:_})},"CollectionInit");f.displayName=i+"Init";const m=gn(T=>{const{scope:_,children:D,state:A}=T,I=w.useRef(null),[U,$]=w.useState(null),O=wt(I,$),[V,q]=A;return w.useEffect(()=>{if(!U)return;const ee=B3(()=>{});return ee.observe(U,{childList:!0,subtree:!0}),()=>{ee.disconnect()}},[U]),o.jsx(c,{scope:_,itemMap:V,setItemMap:q,collectionRef:O,collectionRefObject:I,collectionElement:U,children:D})},"CollectionProviderImpl");m.displayName=i+"Impl";const v=e+"CollectionSlot",y=Ha(v),p=w.forwardRef((T,_)=>{const{scope:D,children:A}=T,I=u(v,D),U=wt(_,I.collectionRef);return o.jsx(y,{ref:U,children:A})});p.displayName=v;const b=e+"CollectionItemSlot",j="data-radix-collection-item",S=Ha(b),k=w.forwardRef((T,_)=>{const{scope:D,children:A,...I}=T,U=w.useRef(null),[$,O]=w.useState(null),V=wt(_,U,O),q=u(b,D),{setItemMap:ee}=q,Y=w.useRef(I);D3(Y.current,I)||(Y.current=I);const H=Y.current;return w.useEffect(()=>{const K=H;return ee(R=>$?R.has($)?R.set($,{...K,element:$}).toSorted(Rp):(R.set($,{...K,element:$}),R.toSorted(Rp)):R),()=>{ee(R=>!$||!R.has($)?R:(R.delete($),new Im(R)))}},[$,H,ee]),o.jsx(S,{[j]:"",ref:V,children:A})});k.displayName=b;function C(){return w.useState(new Im)}gn(C,"useInitCollection");function E(T){const{itemMap:_}=u(e+"CollectionConsumer",T);return _}return gn(E,"useCollection"),[{Provider:d,Slot:p,ItemSlot:k},{createCollectionScope:l,useCollection:E,useInitCollection:C}]}gn(pC,"createCollection");function D3(e,i){if(e===i)return!0;if(typeof e!="object"||typeof i!="object"||e==null||i==null)return!1;const a=Object.keys(e),l=Object.keys(i);if(a.length!==l.length)return!1;for(const c of a)if(!Object.prototype.hasOwnProperty.call(i,c)||e[c]!==i[c])return!1;return!0}gn(D3,"shallowEqual");function L3(e,i){return!!(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}gn(L3,"isElementPreceding");function Rp(e,i){return!e[1].element||!i[1].element?0:L3(e[1].element,i[1].element)?-1:1}gn(Rp,"sortByDocumentPosition");function B3(e){return new MutationObserver(a=>{for(const l of a)if(l.type==="childList"){e();return}})}gn(B3,"getChildListObserver");var gC=Object.defineProperty,ss=(e,i)=>gC(e,"name",{value:i,configurable:!0}),I3=!!(typeof window<"u"&&window.document&&window.document.createElement);function pt(e,i,{checkForDefaultPrevented:a=!0}={}){return ss(function(c){if(e==null||e(c),a===!1||!c||!c.defaultPrevented)return i==null?void 0:i(c)},"handleEvent")}ss(pt,"composeEventHandlers");function vC(e){var i;if(!I3)throw new Error("Cannot access window outside of the DOM");return((i=e==null?void 0:e.ownerDocument)==null?void 0:i.defaultView)??window}ss(vC,"getOwnerWindow");function Op(e){if(!I3)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}ss(Op,"getOwnerDocument");function H3(e,i=!1){const{activeElement:a}=Op(e);if(!(a!=null&&a.nodeName))return null;if(P3(a)&&a.contentDocument)return H3(a.contentDocument.body,i);if(i){const l=a.getAttribute("aria-activedescendant");if(l){const c=Op(a).getElementById(l);if(c)return c}}return a}ss(H3,"getActiveElement");function P3(e){return e.tagName==="IFRAME"}ss(P3,"isFrame");var Mn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},yC=Object.defineProperty,xC=(e,i)=>yC(e,"name",{value:i,configurable:!0}),zy=Cc[" useEffectEvent ".trim().toString()],Dy=Cc[" useInsertionEffect ".trim().toString()];function U3(e){if(typeof zy=="function")return zy(e);const i=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Dy=="function"?Dy(()=>{i.current=e}):Mn(()=>{i.current=e}),w.useMemo(()=>((...a)=>{var l;return(l=i.current)==null?void 0:l.call(i,...a)}),[])}xC(U3,"useEffectEvent");var bC=Object.defineProperty,Tc=(e,i)=>bC(e,"name",{value:i,configurable:!0}),jC=Cc[" useInsertionEffect ".trim().toString()]||Mn;function vc({prop:e,defaultProp:i,onChange:a=Tc(()=>{},"onChange"),caller:l}){const[c,u,d]=q3({defaultProp:i,onChange:a}),f=e!==void 0,m=f?e:c,v=w.useCallback(y=>{var p;if(f){const b=F3(y)?y(e):y;b!==e&&((p=d.current)==null||p.call(d,b))}else u(y)},[f,e,u,d]);return[m,v]}Tc(vc,"useControllableState");function q3({defaultProp:e,onChange:i}){const[a,l]=w.useState(e),c=w.useRef(a),u=w.useRef(i);return jC(()=>{u.current=i},[i]),w.useEffect(()=>{var d;c.current!==a&&((d=u.current)==null||d.call(u,a),c.current=a)},[a,c]),[a,l,u]}Tc(q3,"useUncontrolledState");function F3(e){return typeof e=="function"}Tc(F3,"isFunction");var Ly=Symbol("RADIX:SYNC_STATE");function wC(e,i,a,l){const{prop:c,defaultProp:u,onChange:d,caller:f}=i,m=c!==void 0,v=U3(d),y=[{...a,state:u}];l&&y.push(l);const[p,b]=w.useReducer((C,E)=>{if(E.type===Ly)return{...C,state:E.state};const M=e(C,E);return m&&!Object.is(M.state,C.state)&&v(M.state),M},...y),j=p.state,S=w.useRef(j);w.useEffect(()=>{S.current!==j&&(S.current=j,m||v(j))},[j,S,m]);const k=w.useMemo(()=>c!==void 0?{...p,state:c}:p,[p,c]);return w.useEffect(()=>{m&&!Object.is(c,p.state)&&b({type:Ly,state:c})},[c,p.state,m]),[k,b]}Tc(wC,"useControllableStateReducer");var SC=Object.defineProperty,fr=(e,i)=>SC(e,"name",{value:i,configurable:!0});function V3(e,i){return w.useReducer((a,l)=>i[a][l]??a,e)}fr(V3,"useStateMachine");var Va=fr(e=>{const{present:i,children:a}=e,l=$3(i),c=typeof a=="function"?a({present:l.isPresent}):w.Children.only(a),u=G3(l.ref,Y3(c));return typeof a=="function"||l.isPresent?w.cloneElement(c,{ref:u}):null},"Presence");function $3(e){const[i,a]=w.useState(),l=w.useRef(null),c=w.useRef(e),u=w.useRef("none"),d=w.useRef(void 0),f=e?"mounted":"unmounted",[m,v]=V3(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??Jo(l.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=l.current,p=c.current;if(p!==e){const j=u.current,S=Jo(y);e?(d.current=S,v("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(p&&j!==S?"ANIMATION_OUT":"UNMOUNT"),c.current=e}},[e,v]),Mn(()=>{if(i){let y;const p=i.ownerDocument.defaultView??window,b=fr(S=>{const C=Jo(l.current).includes(CSS.escape(S.animationName));if(S.target===i&&C&&(v("ANIMATION_END"),!c.current)){const E=i.style.animationFillMode;i.style.animationFillMode="forwards",y=p.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=E)})}},"handleAnimationEnd"),j=fr(S=>{S.target===i&&(u.current=Jo(l.current))},"handleAnimationStart");return i.addEventListener("animationstart",j),i.addEventListener("animationcancel",b),i.addEventListener("animationend",b),()=>{p.clearTimeout(y),i.removeEventListener("animationstart",j),i.removeEventListener("animationcancel",b),i.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[i,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{if(y){const p=getComputedStyle(y);l.current=p,d.current=Jo(p)}else l.current=null;a(y)},[])}}fr($3,"usePresence");function zp(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}fr(zp,"setRef");function G3(...e){const i=w.useRef(e);return i.current=e,w.useCallback(a=>{const l=i.current;let c=!1;const u=l.map(d=>{const f=zp(d,a);return!c&&typeof f=="function"&&(c=!0),f});if(c)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():zp(l[d],null)}}},[])}fr(G3,"useStableComposedRefs");function Jo(e){return(e==null?void 0:e.animationName)||"none"}fr(Jo,"getAnimationName");function Y3(e){var l,c;let i=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?e.ref:(i=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}fr(Y3,"getElementRef");var kC=Object.defineProperty,CC=(e,i)=>kC(e,"name",{value:i,configurable:!0}),NC=Cc[" useId ".trim().toString()]||(()=>{}),EC=0;function $l(e){const[i,a]=w.useState(NC());return Mn(()=>{e||a(l=>l??String(EC++))},[e]),e||(i?`radix-${i}`:"")}CC($l,"useId");var TC=Object.defineProperty,AC=(e,i)=>TC(e,"name",{value:i,configurable:!0}),_C=w.createContext(void 0);function S0(e){const i=w.useContext(_C);return e||i||"ltr"}AC(S0,"useDirection");var MC=Object.defineProperty,RC=(e,i)=>MC(e,"name",{value:i,configurable:!0});function _n(e){const i=w.useRef(e);return w.useEffect(()=>{i.current=e}),w.useMemo(()=>((...a)=>{var l;return(l=i.current)==null?void 0:l.call(i,...a)}),[])}RC(_n,"useCallbackRef");var OC=Object.defineProperty,pn=(e,i)=>OC(e,"name",{value:i,configurable:!0}),Dp="dismissableLayer.update",zC="dismissableLayer.pointerDownOutside",DC="dismissableLayer.focusOutside",By,X3=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),k0=w.forwardRef(pn(function(i,a){const{disableOutsidePointerEvents:l=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,...y}=i,p=w.useContext(X3),[b,j]=w.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=w.useState({}),C=wt(a,j),E=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),T=M?E.indexOf(M):-1,_=b?E.indexOf(b):-1,D=p.layersWithOutsidePointerEventsDisabled.size>0,A=_>=T,I=w.useRef(!1),U=Q3(q=>{d==null||d(q),m==null||m(q),q.defaultPrevented||v==null||v()},{ownerDocument:S,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(q=>{if(!(q instanceof Node))return!1;const ee=[...p.branches].some(Y=>Y.contains(q));return A&&!ee},[p.branches,A])}),$=Z3(q=>{if(c&&I.current)return;const ee=q.target;[...p.branches].some(H=>H.contains(ee))||(f==null||f(q),m==null||m(q),q.defaultPrevented||v==null||v())},S),O=b?_===E.length-1:!1,V=_n(q=>{q.key==="Escape"&&(u==null||u(q),!q.defaultPrevented&&v&&(q.preventDefault(),v()))});return w.useEffect(()=>{if(O)return S.addEventListener("keydown",V,{capture:!0}),()=>S.removeEventListener("keydown",V,{capture:!0})},[S,O,V]),w.useEffect(()=>{if(b)return l&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(By=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),Lp(),()=>{l&&(p.layersWithOutsidePointerEventsDisabled.delete(b),p.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=By))}},[b,S,l,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),Lp())},[b,p]),w.useEffect(()=>{const q=pn(()=>k({}),"handleUpdate");return document.addEventListener(Dp,q),()=>document.removeEventListener(Dp,q)},[]),o.jsx(Dt.div,{...y,ref:C,style:{pointerEvents:D?A?"auto":"none":void 0,...i.style},onFocusCapture:pt(i.onFocusCapture,$.onFocusCapture),onBlurCapture:pt(i.onBlurCapture,$.onBlurCapture),onPointerDownCapture:pt(i.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function K3(){const e=w.useContext(X3),[i,a]=w.useState(null);return w.useEffect(()=>{if(i)return e.dismissableSurfaces.add(i),()=>{e.dismissableSurfaces.delete(i)}},[i,e.dismissableSurfaces]),a}pn(K3,"useDismissableLayerSurface");var LC=pn(()=>!0,"IS_TRUE");function Q3(e,i){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:l=!1,isDeferredPointerDownOutsideRef:c,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=LC}=i,f=_n(e),m=w.useRef(!1),v=w.useRef(!1),y=w.useRef(new Map),p=w.useRef(()=>{});return w.useEffect(()=>{function b(){v.current=!1,c.current=!1,y.current.clear()}pn(b,"resetOutsideInteraction");function j(){return Array.from(y.current.values()).some(Boolean)}pn(j,"isOutsideInteractionIntercepted");function S(T){if(!v.current)return;const _=T.target;_ instanceof Node&&[...u].some(A=>A.contains(_))||y.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{v.current&&p.current()},0)}pn(S,"handleInteractionCapture");function k(T){v.current&&y.current.set(T.type,!1)}pn(k,"handleInteractionBubble");const C=pn(T=>{if(T.target&&!m.current){let _=function(){a.removeEventListener("click",p.current);const A=j();b(),A||C0(zC,f,D,{discrete:!0})};if(pn(_,"handleAndDispatchPointerDownOutsideEvent"),!d(T.target)){a.removeEventListener("click",p.current),b(),m.current=!1;return}const D={originalEvent:T};v.current=!0,c.current=l&&T.button===0,y.current.clear(),!l||T.button!==0?_():(a.removeEventListener("click",p.current),p.current=_,a.addEventListener("click",p.current,{once:!0}))}else a.removeEventListener("click",p.current),b();m.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of E)a.addEventListener(T,S,!0),a.addEventListener(T,k);const M=window.setTimeout(()=>{a.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),a.removeEventListener("pointerdown",C),a.removeEventListener("click",p.current);for(const T of E)a.removeEventListener(T,S,!0),a.removeEventListener(T,k)}},[a,f,l,c,u,d]),{onPointerDownCapture:pn(()=>m.current=!0,"onPointerDownCapture")}}pn(Q3,"usePointerDownOutside");function Z3(e,i=globalThis==null?void 0:globalThis.document){const a=_n(e),l=w.useRef(!1);return w.useEffect(()=>{const c=pn(u=>{u.target&&!l.current&&C0(DC,a,{originalEvent:u},{discrete:!1})},"handleFocus");return i.addEventListener("focusin",c),()=>i.removeEventListener("focusin",c)},[i,a]),{onFocusCapture:pn(()=>l.current=!0,"onFocusCapture"),onBlurCapture:pn(()=>l.current=!1,"onBlurCapture")}}pn(Z3,"useFocusOutside");function Lp(){const e=new CustomEvent(Dp);document.dispatchEvent(e)}pn(Lp,"dispatchUpdate");function C0(e,i,a,{discrete:l}){const c=a.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});i&&c.addEventListener(e,i,{once:!0}),l?M3(c,u):c.dispatchEvent(u)}pn(C0,"handleAndDispatchCustomEvent");var BC=Object.defineProperty,Kn=(e,i)=>BC(e,"name",{value:i,configurable:!0}),Hm="focusScope.autoFocusOnMount",Pm="focusScope.autoFocusOnUnmount",Iy={bubbles:!1,cancelable:!0},N0=w.forwardRef(Kn(function(i,a){const{loop:l=!1,trapped:c=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=i,[m,v]=w.useState(null),y=_n(u),p=_n(d),b=w.useRef(null),j=wt(a,v),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(c){let C=function(_){if(S.paused||!m)return;const D=_.target;m.contains(D)?b.current=D:sr(b.current,{select:!0})},E=function(_){if(S.paused||!m)return;const D=_.relatedTarget;D!==null&&(m.contains(D)||sr(b.current,{select:!0}))},M=function(_){if(document.activeElement===document.body)for(const A of _)A.removedNodes.length>0&&sr(m)};Kn(C,"handleFocusIn"),Kn(E,"handleFocusOut"),Kn(M,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",E);const T=new MutationObserver(M);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),T.disconnect()}}},[c,m,S.paused]),w.useEffect(()=>{if(m){Hy.add(S);const C=document.activeElement;if(!m.contains(C)){const M=new CustomEvent(Hm,Iy);m.addEventListener(Hm,y),m.dispatchEvent(M),M.defaultPrevented||(J3(ij(E0(m)),{select:!0}),document.activeElement===C&&sr(m))}return()=>{m.removeEventListener(Hm,y),setTimeout(()=>{const M=new CustomEvent(Pm,Iy);m.addEventListener(Pm,p),m.dispatchEvent(M),M.defaultPrevented||sr(C??document.body,{select:!0}),m.removeEventListener(Pm,p),Hy.remove(S)},0)}}},[m,y,p,S]);const k=w.useCallback(C=>{if(!l&&!c||S.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(E&&M){const T=C.currentTarget,[_,D]=W3(T);_&&D?!C.shiftKey&&M===D?(C.preventDefault(),l&&sr(_,{select:!0})):C.shiftKey&&M===_&&(C.preventDefault(),l&&sr(D,{select:!0})):M===T&&C.preventDefault()}},[l,c,S.paused]);return o.jsx(Dt.div,{tabIndex:-1,...f,ref:j,onKeyDown:k})},"FocusScope"));function J3(e,{select:i=!1}={}){const a=document.activeElement;for(const l of e)if(sr(l,{select:i}),document.activeElement!==a)return}Kn(J3,"focusFirst");function W3(e){const i=E0(e),a=Bp(i,e),l=Bp(i.reverse(),e);return[a,l]}Kn(W3,"getTabbableEdges");function E0(e){const i=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Kn(l=>{const c=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||c?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)i.push(a.currentNode);return i}Kn(E0,"getTabbableCandidates");function Bp(e,i){const a=typeof i.checkVisibility=="function"&&i.checkVisibility({checkVisibilityCSS:!0});for(const l of e)if(!(a?!l.checkVisibility({checkVisibilityCSS:!0}):ej(l,{upTo:i})))return l}Kn(Bp,"findVisible");function ej(e,{upTo:i}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(i!==void 0&&e===i)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Kn(ej,"isHidden");function tj(e){return e instanceof HTMLInputElement&&"select"in e}Kn(tj,"isSelectableInput");function sr(e,{select:i=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&tj(e)&&i&&e.select()}}Kn(sr,"focus");var Hy=nj();function nj(){let e=[];return{add(i){const a=e[0];i!==a&&(a==null||a.pause()),e=Ip(e,i),e.unshift(i)},remove(i){var a;e=Ip(e,i),(a=e[0])==null||a.resume()}}}Kn(nj,"createFocusScopesStack");function Ip(e,i){const a=[...e],l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}Kn(Ip,"arrayRemove");function ij(e){return e.filter(i=>i.tagName!=="A")}Kn(ij,"removeLinks");var IC=Object.defineProperty,HC=(e,i)=>IC(e,"name",{value:i,configurable:!0}),T0=w.forwardRef(HC(function(i,a){var m;const{container:l,...c}=i,[u,d]=w.useState(!1);Mn(()=>d(!0),[]);const f=l||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?io.createPortal(o.jsx(Dt.div,{...c,ref:a}),f):null},"Portal")),PC=Object.defineProperty,A0=(e,i)=>PC(e,"name",{value:i,configurable:!0}),id=0,Ma=null;function UC(e){return Ac(),e.children}A0(UC,"FocusGuards");function Ac(){w.useEffect(()=>{Ma||(Ma={start:Hp(),end:Hp()});const{start:e,end:i}=Ma;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==i&&document.body.insertAdjacentElement("beforeend",i),id++,()=>{id===1&&(Ma==null||Ma.start.remove(),Ma==null||Ma.end.remove(),Ma=null),id=Math.max(0,id-1)}},[])}A0(Ac,"useFocusGuards");function Hp(){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}A0(Hp,"createFocusGuard");var za=function(){return za=Object.assign||function(i){for(var a,l=1,c=arguments.length;l<c;l++){a=arguments[l];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},za.apply(this,arguments)};function aj(e,i){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&i.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(e);c<l.length;c++)i.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(e,l[c])&&(a[l[c]]=e[l[c]]);return a}function qC(e,i,a){if(a||arguments.length===2)for(var l=0,c=i.length,u;l<c;l++)(u||!(l in i))&&(u||(u=Array.prototype.slice.call(i,0,l)),u[l]=i[l]);return e.concat(u||Array.prototype.slice.call(i))}var wd="right-scroll-bar-position",Sd="width-before-scroll-bar",FC="with-scroll-bars-hidden",VC="--removed-body-scroll-bar-size";function Um(e,i){return typeof e=="function"?e(i):e&&(e.current=i),e}function $C(e,i){var a=w.useState(function(){return{value:e,callback:i,facade:{get current(){return a.value},set current(l){var c=a.value;c!==l&&(a.value=l,a.callback(l,c))}}}})[0];return a.callback=i,a.facade}var GC=typeof window<"u"?w.useLayoutEffect:w.useEffect,Py=new WeakMap;function YC(e,i){var a=$C(null,function(l){return e.forEach(function(c){return Um(c,l)})});return GC(function(){var l=Py.get(a);if(l){var c=new Set(l),u=new Set(e),d=a.current;c.forEach(function(f){u.has(f)||Um(f,null)}),u.forEach(function(f){c.has(f)||Um(f,d)})}Py.set(a,e)},[e]),a}function XC(e){return e}function KC(e,i){i===void 0&&(i=XC);var a=[],l=!1,c={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(u){var d=i(u,l);return a.push(d),function(){a=a.filter(function(f){return f!==d})}},assignSyncMedium:function(u){for(l=!0;a.length;){var d=a;a=[],d.forEach(u)}a={push:function(f){return u(f)},filter:function(){return a}}},assignMedium:function(u){l=!0;var d=[];if(a.length){var f=a;a=[],f.forEach(u),d=a}var m=function(){var y=d;d=[],y.forEach(u)},v=function(){return Promise.resolve().then(m)};v(),a={push:function(y){d.push(y),v()},filter:function(y){return d=d.filter(y),a}}}};return c}function QC(e){e===void 0&&(e={});var i=KC(null);return i.options=za({async:!0,ssr:!1},e),i}var rj=function(e){var i=e.sideCar,a=aj(e,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=i.read();if(!l)throw new Error("Sidecar medium not found");return w.createElement(l,za({},a))};rj.isSideCarExport=!0;function ZC(e,i){return e.useMedium(i),rj}var lj=QC(),qm=function(){},Gd=w.forwardRef(function(e,i){var a=w.useRef(null),l=w.useState({onScrollCapture:qm,onWheelCapture:qm,onTouchMoveCapture:qm}),c=l[0],u=l[1],d=e.forwardProps,f=e.children,m=e.className,v=e.removeScrollBar,y=e.enabled,p=e.shards,b=e.sideCar,j=e.noRelative,S=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,T=e.gapMode,_=aj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,A=YC([a,i]),I=za(za({},_),c);return w.createElement(w.Fragment,null,y&&w.createElement(D,{sideCar:lj,removeScrollBar:v,shards:p,noRelative:j,noIsolation:S,inert:k,setCallbacks:u,allowPinchZoom:!!C,lockRef:a,gapMode:T}),d?w.cloneElement(w.Children.only(f),za(za({},I),{ref:A})):w.createElement(M,za({},I,{className:m,ref:A}),f))});Gd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gd.classNames={fullWidth:Sd,zeroRight:wd};var JC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var i=JC();return i&&e.setAttribute("nonce",i),e}function e9(e,i){e.styleSheet?e.styleSheet.cssText=i:e.appendChild(document.createTextNode(i))}function t9(e){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(e)}var n9=function(){var e=0,i=null;return{add:function(a){e==0&&(i=WC())&&(e9(i,a),t9(i)),e++},remove:function(){e--,!e&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},i9=function(){var e=n9();return function(i,a){w.useEffect(function(){return e.add(i),function(){e.remove()}},[i&&a])}},oj=function(){var e=i9(),i=function(a){var l=a.styles,c=a.dynamic;return e(l,c),null};return i},a9={left:0,top:0,right:0,gap:0},Fm=function(e){return parseInt(e||"",10)||0},r9=function(e){var i=window.getComputedStyle(document.body),a=i[e==="padding"?"paddingLeft":"marginLeft"],l=i[e==="padding"?"paddingTop":"marginTop"],c=i[e==="padding"?"paddingRight":"marginRight"];return[Fm(a),Fm(l),Fm(c)]},l9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return a9;var i=r9(e),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,l-a+i[2]-i[0])}},o9=oj(),es="data-scroll-locked",s9=function(e,i,a,l){var c=e.left,u=e.top,d=e.right,f=e.gap;return a===void 0&&(a="margin"),`
|
|
465
|
-
.`.concat(FC,` {
|
|
466
|
-
overflow: hidden `).concat(l,`;
|
|
467
|
-
padding-right: `).concat(f,"px ").concat(l,`;
|
|
468
|
-
}
|
|
469
|
-
body[`).concat(es,`] {
|
|
470
|
-
overflow: hidden `).concat(l,`;
|
|
471
|
-
overscroll-behavior: contain;
|
|
472
|
-
`).concat([i&&"position: relative ".concat(l,";"),a==="margin"&&`
|
|
473
|
-
padding-left: `.concat(c,`px;
|
|
474
|
-
padding-top: `).concat(u,`px;
|
|
475
|
-
padding-right: `).concat(d,`px;
|
|
476
|
-
margin-left:0;
|
|
477
|
-
margin-top:0;
|
|
478
|
-
margin-right: `).concat(f,"px ").concat(l,`;
|
|
479
|
-
`),a==="padding"&&"padding-right: ".concat(f,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.`).concat(wd,` {
|
|
483
|
-
right: `).concat(f,"px ").concat(l,`;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.`).concat(Sd,` {
|
|
487
|
-
margin-right: `).concat(f,"px ").concat(l,`;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.`).concat(wd," .").concat(wd,` {
|
|
491
|
-
right: 0 `).concat(l,`;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.`).concat(Sd," .").concat(Sd,` {
|
|
495
|
-
margin-right: 0 `).concat(l,`;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
body[`).concat(es,`] {
|
|
499
|
-
`).concat(VC,": ").concat(f,`px;
|
|
500
|
-
}
|
|
501
|
-
`)},Uy=function(){var e=parseInt(document.body.getAttribute(es)||"0",10);return isFinite(e)?e:0},c9=function(){w.useEffect(function(){return document.body.setAttribute(es,(Uy()+1).toString()),function(){var e=Uy()-1;e<=0?document.body.removeAttribute(es):document.body.setAttribute(es,e.toString())}},[])},u9=function(e){var i=e.noRelative,a=e.noImportant,l=e.gapMode,c=l===void 0?"margin":l;c9();var u=w.useMemo(function(){return l9(c)},[c]);return w.createElement(o9,{styles:s9(u,!i,c,a?"":"!important")})},Pp=!1;if(typeof window<"u")try{var ad=Object.defineProperty({},"passive",{get:function(){return Pp=!0,!0}});window.addEventListener("test",ad,ad),window.removeEventListener("test",ad,ad)}catch{Pp=!1}var Yo=Pp?{passive:!1}:!1,d9=function(e){return e.tagName==="TEXTAREA"},sj=function(e,i){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[i]!=="hidden"&&!(a.overflowY===a.overflowX&&!d9(e)&&a[i]==="visible")},f9=function(e){return sj(e,"overflowY")},h9=function(e){return sj(e,"overflowX")},qy=function(e,i){var a=i.ownerDocument,l=i;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var c=cj(e,l);if(c){var u=uj(e,l),d=u[1],f=u[2];if(d>f)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},m9=function(e){var i=e.scrollTop,a=e.scrollHeight,l=e.clientHeight;return[i,a,l]},p9=function(e){var i=e.scrollLeft,a=e.scrollWidth,l=e.clientWidth;return[i,a,l]},cj=function(e,i){return e==="v"?f9(i):h9(i)},uj=function(e,i){return e==="v"?m9(i):p9(i)},g9=function(e,i){return e==="h"&&i==="rtl"?-1:1},v9=function(e,i,a,l,c){var u=g9(e,window.getComputedStyle(i).direction),d=u*l,f=a.target,m=i.contains(f),v=!1,y=d>0,p=0,b=0;do{if(!f)break;var j=uj(e,f),S=j[0],k=j[1],C=j[2],E=k-C-u*S;(S||E)&&cj(e,f)&&(p+=E,b+=S);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&f!==document.body||m&&(i.contains(f)||i===f));return(y&&Math.abs(p)<1||!y&&Math.abs(b)<1)&&(v=!0),v},rd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fy=function(e){return[e.deltaX,e.deltaY]},Vy=function(e){return e&&"current"in e?e.current:e},y9=function(e,i){return e[0]===i[0]&&e[1]===i[1]},x9=function(e){return`
|
|
502
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
503
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
504
|
-
`)},b9=0,Xo=[];function j9(e){var i=w.useRef([]),a=w.useRef([0,0]),l=w.useRef(),c=w.useState(b9++)[0],u=w.useState(oj)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(c));var k=qC([e.lockRef.current],(e.shards||[]).map(Vy),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(c))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var E=rd(k),M=a.current,T="deltaX"in k?k.deltaX:M[0]-E[0],_="deltaY"in k?k.deltaY:M[1]-E[1],D,A=k.target,I=Math.abs(T)>Math.abs(_)?"h":"v";if("touches"in k&&I==="h"&&A.type==="range")return!1;var U=window.getSelection(),$=U&&U.anchorNode,O=$?$===A||$.contains(A):!1;if(O)return!1;var V=qy(I,A);if(!V)return!0;if(V?D=I:(D=I==="v"?"h":"v",V=qy(I,A)),!V)return!1;if(!l.current&&"changedTouches"in k&&(T||_)&&(l.current=D),!D)return!0;var q=l.current||D;return v9(q,C,k,q==="h"?T:_)},[]),m=w.useCallback(function(k){var C=k;if(!(!Xo.length||Xo[Xo.length-1]!==u)){var E="deltaY"in C?Fy(C):rd(C),M=i.current.filter(function(D){return D.name===C.type&&(D.target===C.target||C.target===D.shadowParent)&&y9(D.delta,E)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var T=(d.current.shards||[]).map(Vy).filter(Boolean).filter(function(D){return D.contains(C.target)}),_=T.length>0?f(C,T[0]):!d.current.noIsolation;_&&C.cancelable&&C.preventDefault()}}},[]),v=w.useCallback(function(k,C,E,M){var T={name:k,delta:C,target:E,should:M,shadowParent:w9(E)};i.current.push(T),setTimeout(function(){i.current=i.current.filter(function(_){return _!==T})},1)},[]),y=w.useCallback(function(k){a.current=rd(k),l.current=void 0},[]),p=w.useCallback(function(k){v(k.type,Fy(k),k.target,f(k,e.lockRef.current))},[]),b=w.useCallback(function(k){v(k.type,rd(k),k.target,f(k,e.lockRef.current))},[]);w.useEffect(function(){return Xo.push(u),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",m,Yo),document.addEventListener("touchmove",m,Yo),document.addEventListener("touchstart",y,Yo),function(){Xo=Xo.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,Yo),document.removeEventListener("touchmove",m,Yo),document.removeEventListener("touchstart",y,Yo)}},[]);var j=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:x9(c)}):null,j?w.createElement(u9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function w9(e){for(var i=null;e!==null;)e instanceof ShadowRoot&&(i=e.host,e=e.host),e=e.parentNode;return i}const S9=ZC(lj,j9);var Yd=w.forwardRef(function(e,i){return w.createElement(Gd,za({},e,{ref:i,sideCar:S9}))});Yd.classNames=Gd.classNames;var k9=function(e){if(typeof document>"u")return null;var i=Array.isArray(e)?e[0]:e;return i.ownerDocument.body},Ko=new WeakMap,ld=new WeakMap,od={},Vm=0,dj=function(e){return e&&(e.host||dj(e.parentNode))},C9=function(e,i){return i.map(function(a){if(e.contains(a))return a;var l=dj(a);return l&&e.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},N9=function(e,i,a,l){var c=C9(i,Array.isArray(e)?e:[e]);od[a]||(od[a]=new WeakMap);var u=od[a],d=[],f=new Set,m=new Set(c),v=function(p){!p||f.has(p)||(f.add(p),v(p.parentNode))};c.forEach(v);var y=function(p){!p||m.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))y(b);else try{var j=b.getAttribute(l),S=j!==null&&j!=="false",k=(Ko.get(b)||0)+1,C=(u.get(b)||0)+1;Ko.set(b,k),u.set(b,C),d.push(b),k===1&&S&&ld.set(b,!0),C===1&&b.setAttribute(a,"true"),S||b.setAttribute(l,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(i),f.clear(),Vm++,function(){d.forEach(function(p){var b=Ko.get(p)-1,j=u.get(p)-1;Ko.set(p,b),u.set(p,j),b||(ld.has(p)||p.removeAttribute(l),ld.delete(p)),j||p.removeAttribute(a)}),Vm--,Vm||(Ko=new WeakMap,Ko=new WeakMap,ld=new WeakMap,od={})}},_0=function(e,i,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),c=k9(e);return c?(l.push.apply(l,Array.from(c.querySelectorAll("[aria-live], script"))),N9(l,c,a,"aria-hidden")):function(){return null}},E9=Object.defineProperty,ca=(e,i)=>E9(e,"name",{value:i,configurable:!0}),M0="Dialog",[fj,RI]=nl(M0),[T9,mr]=fj(M0),A9=ca(e=>{const{__scopeDialog:i,children:a,open:l,defaultOpen:c,onOpenChange:u,modal:d=!0}=e,f=w.useRef(null),m=w.useRef(null),[v,y]=vc({prop:l,defaultProp:c??!1,onChange:u,caller:M0}),[p,b]=w.useState(0),[j,S]=w.useState(0);return o.jsx(T9,{scope:i,triggerRef:f,contentRef:m,contentId:$l(),titleId:$l(),descriptionId:$l(),titlePresent:p>0,descriptionPresent:j>0,setTitleCount:b,setDescriptionCount:S,open:v,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(k=>!k),[y]),modal:d,children:a})},"Dialog"),hj="DialogPortal",[_9,mj]=fj(hj,{forceMount:void 0}),M9=ca(e=>{const{__scopeDialog:i,forceMount:a,children:l,container:c}=e,u=mr(hj,i);return o.jsx(_9,{scope:i,forceMount:a,children:w.Children.map(l,d=>o.jsx(Va,{present:a||u.open,children:o.jsx(T0,{asChild:!0,container:c,children:d})}))})},"DialogPortal"),Up="DialogOverlay",R9=w.forwardRef(ca(function(i,a){const l=mj(Up,i.__scopeDialog),{forceMount:c=l.forceMount,...u}=i,d=mr(Up,i.__scopeDialog);return d.modal?o.jsx(Va,{present:c||d.open,children:o.jsx(z9,{...u,ref:a})}):null},"DialogOverlay")),O9=Ha("DialogOverlay.RemoveScroll"),z9=w.forwardRef(ca(function(i,a){const{__scopeDialog:l,...c}=i,u=mr(Up,l),d=K3(),f=wt(a,d);return o.jsx(Yd,{as:O9,allowPinchZoom:!0,shards:[u.contentRef],children:o.jsx(Dt.div,{"data-state":R0(u.open),...c,ref:f,style:{pointerEvents:"auto",...c.style}})})},"DialogOverlayImpl")),yc="DialogContent",D9=w.forwardRef(ca(function(i,a){const l=mj(yc,i.__scopeDialog),{forceMount:c=l.forceMount,...u}=i,d=mr(yc,i.__scopeDialog);return o.jsx(Va,{present:c||d.open,children:d.modal?o.jsx(L9,{...u,ref:a}):o.jsx(B9,{...u,ref:a})})},"DialogContent")),L9=w.forwardRef(ca(function(i,a){const l=mr(yc,i.__scopeDialog),c=w.useRef(null),u=wt(a,l.contentRef,c);return w.useEffect(()=>{const d=c.current;if(d)return _0(d)},[]),o.jsx(pj,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:l.open,onCloseAutoFocus:pt(i.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:pt(i.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:pt(i.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),B9=w.forwardRef(ca(function(i,a){const l=mr(yc,i.__scopeDialog),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(pj,{...i,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=i.onCloseAutoFocus)==null||f.call(i,d),d.defaultPrevented||(c.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=i.onInteractOutside)==null||v.call(i,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"DialogContentNonModal")),pj=w.forwardRef(ca(function(i,a){const{__scopeDialog:l,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=i,m=mr(yc,l);return Ac(),o.jsx(o.Fragment,{children:o.jsx(N0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(k0,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":R0(m.open),...f,ref:a,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),I9="DialogTitle",H9=w.forwardRef(ca(function(i,a){const{__scopeDialog:l,...c}=i,u=mr(I9,l),{setTitleCount:d}=u;return Mn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),o.jsx(Dt.h2,{id:u.titleId,...c,ref:a})},"DialogTitle")),P9="DialogClose",U9=w.forwardRef(ca(function(i,a){const{__scopeDialog:l,...c}=i,u=mr(P9,l);return o.jsx(Dt.button,{type:"button",...c,ref:a,onClick:pt(i.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function R0(e){return e?"open":"closed"}ca(R0,"getState");var q9=Object.defineProperty,F9=(e,i)=>q9(e,"name",{value:i,configurable:!0});function gj(e){const[i,a]=w.useState(void 0);return Mn(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const l=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,f;if("borderBoxSize"in u){const m=u.borderBoxSize,v=Array.isArray(m)?m[0]:m;d=v.inlineSize,f=v.blockSize}else d=e.offsetWidth,f=e.offsetHeight;a({width:d,height:f})});return l.observe(e,{box:"border-box"}),()=>l.unobserve(e)}else a(void 0)},[e]),i}F9(gj,"useSize");const V9=["top","right","bottom","left"],el=Math.min,cr=Math.max,_d=Math.round,sd=Math.floor,ur=e=>({x:e,y:e}),$9={left:"right",right:"left",bottom:"top",top:"bottom"};function vj(e,i,a){return cr(e,el(i,a))}function hr(e,i){return typeof e=="function"?e(i):e}function tl(e){return e.split("-")[0]}function cs(e){return e.split("-")[1]}function O0(e){return e==="x"?"y":"x"}function z0(e){return e==="y"?"height":"width"}function La(e){const i=e[0];return i==="t"||i==="b"?"y":"x"}function D0(e){return O0(La(e))}function G9(e,i,a){a===void 0&&(a=!1);const l=cs(e),c=D0(e),u=z0(c);let d=c==="x"?l===(a?"end":"start")?"right":"left":l==="start"?"bottom":"top";return i.reference[u]>i.floating[u]&&(d=Md(d)),[d,Md(d)]}function Y9(e){const i=Md(e);return[qp(e),i,qp(i)]}function qp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const $y=["left","right"],Gy=["right","left"],X9=["top","bottom"],K9=["bottom","top"];function Q9(e,i,a){switch(e){case"top":case"bottom":return a?i?Gy:$y:i?$y:Gy;case"left":case"right":return i?X9:K9;default:return[]}}function Z9(e,i,a,l){const c=cs(e);let u=Q9(tl(e),a==="start",l);return c&&(u=u.map(d=>d+"-"+c),i&&(u=u.concat(u.map(qp)))),u}function Md(e){const i=tl(e);return $9[i]+e.slice(i.length)}function J9(e){var i,a,l,c;return{top:(i=e.top)!=null?i:0,right:(a=e.right)!=null?a:0,bottom:(l=e.bottom)!=null?l:0,left:(c=e.left)!=null?c:0}}function yj(e){return typeof e!="number"?J9(e):{top:e,right:e,bottom:e,left:e}}function Rd(e){const{x:i,y:a,width:l,height:c}=e;return{width:l,height:c,top:a,left:i,right:i+l,bottom:a+c,x:i,y:a}}function Yy(e,i,a){let{reference:l,floating:c}=e;const u=La(i),d=D0(i),f=z0(d),m=tl(i),v=u==="y",y=l.x+l.width/2-c.width/2,p=l.y+l.height/2-c.height/2,b=l[f]/2-c[f]/2;let j;switch(m){case"top":j={x:y,y:l.y-c.height};break;case"bottom":j={x:y,y:l.y+l.height};break;case"right":j={x:l.x+l.width,y:p};break;case"left":j={x:l.x-c.width,y:p};break;default:j={x:l.x,y:l.y}}const S=cs(i);return S&&(j[d]+=b*(S==="end"?1:-1)*(a&&v?-1:1)),j}async function W9(e,i){var a;i===void 0&&(i={});const{x:l,y:c,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:p="floating",altBoundary:b=!1,padding:j=0}=hr(i,e),S=yj(j),C=f[b?p==="floating"?"reference":"floating":p],E=Rd(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(C)))==null||a?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:v,rootBoundary:y,strategy:m})),M=p==="floating"?{x:l,y:c,width:d.floating.width,height:d.floating.height}:d.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),_=await(u.isElement==null?void 0:u.isElement(T))&&await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1},D=Rd(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:T,strategy:m}):M);return{top:(E.top-D.top+S.top)/_.y,bottom:(D.bottom-E.bottom+S.bottom)/_.y,left:(E.left-D.left+S.left)/_.x,right:(D.right-E.right+S.right)/_.x}}const eN=50,tN=async(e,i,a)=>{const{placement:l="bottom",strategy:c="absolute",middleware:u=[],platform:d}=a,f=d.detectOverflow?d:{...d,detectOverflow:W9},m=await(d.isRTL==null?void 0:d.isRTL(i));let v=await d.getElementRects({reference:e,floating:i,strategy:c}),{x:y,y:p}=Yy(v,l,m),b=l,j=0;const S={};for(let k=0;k<u.length;k++){const C=u[k];if(!C)continue;const{name:E,fn:M}=C,{x:T,y:_,data:D,reset:A}=await M({x:y,y:p,initialPlacement:l,placement:b,strategy:c,middlewareData:S,rects:v,platform:f,elements:{reference:e,floating:i}});y=T??y,p=_??p,S[E]={...S[E],...D},A&&j<eN&&(j++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(v=A.rects===!0?await d.getElementRects({reference:e,floating:i,strategy:c}):A.rects),{x:y,y:p}=Yy(v,b,m)),k=-1)}return{x:y,y:p,placement:b,strategy:c,middlewareData:S}},nN=e=>({name:"arrow",options:e,async fn(i){const{x:a,y:l,placement:c,rects:u,platform:d,elements:f,middlewareData:m}=i,{element:v,padding:y=0}=hr(e,i)||{};if(v==null)return{};const p=yj(y),b={x:a,y:l},j=D0(c),S=z0(j),k=await d.getDimensions(v),C=j==="y",E=C?"top":"left",M=C?"bottom":"right",T=C?"clientHeight":"clientWidth",_=u.reference[S]+u.reference[j]-b[j]-u.floating[S],D=b[j]-u.reference[j],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let I=A?A[T]:0;(!I||!await(d.isElement==null?void 0:d.isElement(A)))&&(I=f.floating[T]||u.floating[S]);const U=_/2-D/2,$=I/2-k[S]/2-1,O=el(p[E],$),V=el(p[M],$),q=I-k[S]-V,ee=I/2-k[S]/2+U,Y=vj(O,ee,q),H=!m.arrow&&cs(c)!=null&&ee!==Y&&u.reference[S]/2-(ee<O?O:V)-k[S]/2<0,K=H?ee<O?ee-O:ee-q:0;return{[j]:b[j]+K,data:{[j]:Y,centerOffset:ee-Y-K,...H&&{alignmentOffset:K}},reset:H}}}),iN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(i){var a,l;const{placement:c,middlewareData:u,rects:d,initialPlacement:f,platform:m,elements:v}=i,{mainAxis:y=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...C}=hr(e,i);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const E=tl(c),M=La(f),T=tl(f)===f,_=await(m.isRTL==null?void 0:m.isRTL(v.floating)),D=b||(T||!k?[Md(f)]:Y9(f)),A=S!=="none";!b&&A&&D.push(...Z9(f,k,S,_));const I=[f,...D],U=await m.detectOverflow(i,C),$=[];let O=((l=u.flip)==null?void 0:l.overflows)||[];if(y&&$.push(U[E]),p){const Y=G9(c,d,_);$.push(U[Y[0]],U[Y[1]])}if(O=[...O,{placement:c,overflows:$}],!$.every(Y=>Y<=0)){var V,q;const Y=(((V=u.flip)==null?void 0:V.index)||0)+1,H=I[Y];if(H&&(!(p==="alignment"?M!==La(H):!1)||O.every(F=>La(F.placement)===M?F.overflows[0]>0:!0)))return{data:{index:Y,overflows:O},reset:{placement:H}};let K=(q=O.filter(R=>R.overflows[0]<=0).sort((R,F)=>R.overflows[1]-F.overflows[1])[0])==null?void 0:q.placement;if(!K)switch(j){case"bestFit":{var ee;const R=(ee=O.filter(F=>{if(A){const ne=La(F.placement);return ne===M||ne==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ne=>ne>0).reduce((ne,L)=>ne+L,0)]).sort((F,ne)=>F[1]-ne[1])[0])==null?void 0:ee[0];R&&(K=R);break}case"initialPlacement":K=f;break}if(c!==K)return{reset:{placement:K}}}return{}}}};function Xy(e,i){return{top:e.top-i.height,right:e.right-i.width,bottom:e.bottom-i.height,left:e.left-i.width}}function Ky(e){return V9.some(i=>e[i]>=0)}const aN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(i){const{rects:a,platform:l}=i,{strategy:c="referenceHidden",...u}=hr(e,i);switch(c){case"referenceHidden":{const d=await l.detectOverflow(i,{...u,elementContext:"reference"}),f=Xy(d,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Ky(f)}}}case"escaped":{const d=await l.detectOverflow(i,{...u,altBoundary:!0}),f=Xy(d,a.floating);return{data:{escapedOffsets:f,escaped:Ky(f)}}}default:return{}}}}},xj=new Set(["left","top"]);async function rN(e,i){const{placement:a,platform:l,elements:c}=e,u=await(l.isRTL==null?void 0:l.isRTL(c.floating)),d=tl(a),f=cs(a),m=La(a)==="y",v=xj.has(d)?-1:1,y=u&&m?-1:1,p=hr(i,e);let{mainAxis:b,crossAxis:j,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof S=="number"&&(j=f==="end"?S*-1:S),m?{x:j*y,y:b*v}:{x:b*v,y:j*y}}const lN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(i){var a,l;const{x:c,y:u,placement:d,middlewareData:f}=i,m=await rN(i,e);return d===((a=f.offset)==null?void 0:a.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:c+m.x,y:u+m.y,data:{...m,placement:d}}}}},oN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(i){const{x:a,y:l,placement:c,platform:u}=i,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:T,y:_}=M;return{x:T,y:_}}},...v}=hr(e,i),y={x:a,y:l},p=await u.detectOverflow(i,v),b=La(c),j=O0(b);let S=y[j],k=y[b];const C=(M,T)=>vj(T+p[M==="y"?"top":"left"],T,T-p[M==="y"?"bottom":"right"]);d&&(S=C(j,S)),f&&(k=C(b,k));const E=m.fn({...i,[j]:S,[b]:k});return{...E,data:{x:E.x-a,y:E.y-l,enabled:{[j]:d,[b]:f}}}}}},sN=function(e){return e===void 0&&(e={}),{options:e,fn(i){var a,l;const{x:c,y:u,placement:d,rects:f,middlewareData:m}=i,{offset:v=0,mainAxis:y=!0,crossAxis:p=!0}=hr(e,i),b={x:c,y:u},j=La(d),S=O0(j);let k=b[S],C=b[j];const E=hr(v,i),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(a=E.mainAxis)!=null?a:0,crossAxis:(l=E.crossAxis)!=null?l:0};if(y){const D=S==="y"?"height":"width",A=f.reference[S]-f.floating[D]+M.mainAxis,I=f.reference[S]+f.reference[D]-M.mainAxis;k<A?k=A:k>I&&(k=I)}if(p){var T,_;const D=S==="y"?"width":"height",A=xj.has(tl(d)),I=f.reference[j]-f.floating[D]+(A&&((T=m.offset)==null?void 0:T[j])||0)+(A?0:M.crossAxis),U=f.reference[j]+f.reference[D]+(A?0:((_=m.offset)==null?void 0:_[j])||0)-(A?M.crossAxis:0);C<I?C=I:C>U&&(C=U)}return{[S]:k,[j]:C}}}},cN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(i){const{placement:a,rects:l,platform:c,elements:u}=i,{apply:d=()=>{},...f}=hr(e,i),m=await c.detectOverflow(i,f),v=tl(a),y=cs(a),p=La(a)==="y",{width:b,height:j}=l.floating;let S,k;v==="top"||v==="bottom"?(S=v,k=y===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,S=y==="end"?"top":"bottom");const C=j-m.top-m.bottom,E=b-m.left-m.right,M=el(j-m[S],C),T=el(b-m[k],E),_=i.middlewareData.shift,D=!_;let A=M,I=T;_!=null&&_.enabled.x&&(I=E),_!=null&&_.enabled.y&&(A=C),D&&!y&&(p?I=b-2*cr(m.left,m.right):A=j-2*cr(m.top,m.bottom)),await d({...i,availableWidth:I,availableHeight:A});const U=await c.getDimensions(u.floating);return b!==U.width||j!==U.height?{reset:{rects:!0}}:{}}}};function Xd(){return typeof window<"u"}function us(e){return bj(e)?(e.nodeName||"").toLowerCase():"#document"}function ci(e){var i;return(e==null||(i=e.ownerDocument)==null?void 0:i.defaultView)||window}function pr(e){var i;return(i=(bj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:i.documentElement}function bj(e){return Xd()?e instanceof Node||e instanceof ci(e).Node:!1}function Pa(e){return Xd()?e instanceof Element||e instanceof ci(e).Element:!1}function il(e){return Xd()?e instanceof HTMLElement||e instanceof ci(e).HTMLElement:!1}function Qy(e){return!Xd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ci(e).ShadowRoot}function Kd(e){const{overflow:i,overflowX:a,overflowY:l,display:c}=Ua(e);return/auto|scroll|overlay|hidden|clip/.test(i+l+a)&&c!=="inline"&&c!=="contents"}function uN(e){return/^(table|td|th)$/.test(us(e))}function Qd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const dN=/transform|translate|scale|rotate|perspective|filter/,fN=/paint|layout|strict|content/,Il=e=>!!e&&e!=="none";let $m;function L0(e){const i=Pa(e)?Ua(e):e;return Il(i.transform)||Il(i.translate)||Il(i.scale)||Il(i.rotate)||Il(i.perspective)||!B0()&&(Il(i.backdropFilter)||Il(i.filter))||dN.test(i.willChange||"")||fN.test(i.contain||"")}function hN(e){let i=Yl(e);for(;il(i)&&!xc(i);){if(L0(i))return i;if(Qd(i))return null;i=Yl(i)}return null}function B0(){return $m==null&&($m=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$m}function xc(e){return/^(html|body|#document)$/.test(us(e))}function Ua(e){return ci(e).getComputedStyle(e)}function Zd(e){return Pa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yl(e){if(us(e)==="html")return e;const i=e.assignedSlot||e.parentNode||Qy(e)&&e.host||pr(e);return Qy(i)?i.host:i}function jj(e){const i=Yl(e);return xc(i)?(e.ownerDocument||e).body:il(i)&&Kd(i)?i:jj(i)}function bc(e,i,a){var l;i===void 0&&(i=[]),a===void 0&&(a=!0);const c=jj(e),u=c===((l=e.ownerDocument)==null?void 0:l.body),d=ci(c);if(u){const f=Fp(d);return i.concat(d,d.visualViewport||[],Kd(c)?c:[],f&&a?bc(f):[])}else return i.concat(c,bc(c,[],a))}function Fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wj(e){const i=Ua(e);let a=parseFloat(i.width)||0,l=parseFloat(i.height)||0;const c=il(e),u=c?e.offsetWidth:a,d=c?e.offsetHeight:l,f=_d(a)!==u||_d(l)!==d;return f&&(a=u,l=d),{width:a,height:l,$:f}}function I0(e){return Pa(e)?e:e.contextElement}function ts(e){const i=I0(e);if(!il(i))return ur(1);const a=i.getBoundingClientRect(),{width:l,height:c,$:u}=wj(i);let d=(u?_d(a.width):a.width)/l,f=(u?_d(a.height):a.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const mN=ur(0);function Sj(e){const i=ci(e);return!B0()||!i.visualViewport?mN:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function pN(e,i,a){return i===void 0&&(i=!1),!!a&&i&&a===ci(e)}function Xl(e,i,a,l){i===void 0&&(i=!1),a===void 0&&(a=!1);const c=e.getBoundingClientRect(),u=I0(e);let d=ur(1);i&&(l?Pa(l)&&(d=ts(l)):d=ts(e));const f=pN(u,a,l)?Sj(u):ur(0);let m=(c.left+f.x)/d.x,v=(c.top+f.y)/d.y,y=c.width/d.x,p=c.height/d.y;if(u&&l){const b=ci(u),j=Pa(l)?ci(l):l;let S=b,k=Fp(S);for(;k&&j!==S;){const C=ts(k),E=k.getBoundingClientRect(),M=Ua(k),T=E.left+(k.clientLeft+parseFloat(M.paddingLeft))*C.x,_=E.top+(k.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,v*=C.y,y*=C.x,p*=C.y,m+=T,v+=_,S=ci(k),k=Fp(S)}}return Rd({width:y,height:p,x:m,y:v})}function Jd(e,i){const a=Zd(e).scrollLeft;return i?i.left+a:Xl(pr(e)).left+a}function kj(e,i){const a=e.getBoundingClientRect(),l=a.left+i.scrollLeft-Jd(e,a),c=a.top+i.scrollTop;return{x:l,y:c}}function gN(e){let{elements:i,rect:a,offsetParent:l,strategy:c}=e;const u=c==="fixed",d=pr(l),f=i?Qd(i.floating):!1;if(l===d||f&&u)return a;let m={scrollLeft:0,scrollTop:0},v=ur(1);const y=ur(0),p=il(l);if((p||!u)&&((us(l)!=="body"||Kd(d))&&(m=Zd(l)),p)){const j=Xl(l);v=ts(l),y.x=j.x+l.clientLeft,y.y=j.y+l.clientTop}const b=d&&!p&&!u?kj(d,m):ur(0);return{width:a.width*v.x,height:a.height*v.y,x:a.x*v.x-m.scrollLeft*v.x+y.x+b.x,y:a.y*v.y-m.scrollTop*v.y+y.y+b.y}}function vN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function yN(e){const i=Zd(e),a=e.ownerDocument.body,l=cr(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),c=cr(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let u=-i.scrollLeft+Jd(e);const d=-i.scrollTop;return Ua(a).direction==="rtl"&&(u+=cr(e.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}const xN=25;function bN(e,i,a){a===void 0&&(a="viewport");const l=a==="layoutViewport",c=ci(e),u=pr(e),d=c.visualViewport;let f=u.clientWidth,m=u.clientHeight,v=0,y=0;if(d){const b=!B0()||i==="fixed";l?b||(v=-d.offsetLeft,y=-d.offsetTop):(f=d.width,m=d.height,b&&(v=d.offsetLeft,y=d.offsetTop))}if(Jd(u)<=0){const b=u.ownerDocument,j=b.body,S=getComputedStyle(j),k=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(u.clientWidth-j.clientWidth-k),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?C/2:C;E<=xN&&(f-=E)}return{width:f,height:m,x:v,y}}function jN(e,i){const a=Xl(e,!0,i==="fixed"),l=a.top+e.clientTop,c=a.left+e.clientLeft,u=ts(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=c*u.x,v=l*u.y;return{width:d,height:f,x:m,y:v}}function Zy(e,i,a){let l;if(i==="viewport"||i==="layoutViewport")l=bN(e,a,i);else if(i==="document")l=yN(pr(e));else if(Pa(i))l=jN(i,a);else{const c=Sj(e);l={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return Rd(l)}function wN(e,i){const a=i.get(e);if(a)return a;let l=bc(e,[],!1).filter(f=>Pa(f)&&us(f)!=="body"),c=null;const u=Ua(e).position==="fixed";let d=u?Yl(e):e;for(;Pa(d)&&!xc(d);){const f=Ua(d),m=L0(d),v=c?c.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&f.position==="static")?l=l.filter(p=>p!==d):c=f,d=Yl(d)}return i.set(e,l),l}function SN(e){let{element:i,boundary:a,rootBoundary:l,strategy:c}=e;const d=[...a==="clippingAncestors"?Qd(i)?[]:wN(i,this._c):[].concat(a),l],f=Zy(i,d[0],c);let m=f.top,v=f.right,y=f.bottom,p=f.left;for(let b=1;b<d.length;b++){const j=Zy(i,d[b],c);m=cr(j.top,m),v=el(j.right,v),y=el(j.bottom,y),p=cr(j.left,p)}return{width:v-p,height:y-m,x:p,y:m}}function kN(e){const{width:i,height:a}=wj(e);return{width:i,height:a}}function CN(e,i,a){const l=il(i),c=pr(i),u=a==="fixed",d=Xl(e,!0,u,i);let f={scrollLeft:0,scrollTop:0};const m=ur(0);if((l||!u)&&((us(i)!=="body"||Kd(c))&&(f=Zd(i)),l)){const b=Xl(i,!0,u,i);m.x=b.x+i.clientLeft,m.y=b.y+i.clientTop}!l&&c&&(m.x=Jd(c));const v=c&&!l&&!u?kj(c,f):ur(0),y=d.left+f.scrollLeft-m.x-v.x,p=d.top+f.scrollTop-m.y-v.y;return{x:y,y:p,width:d.width,height:d.height}}function Gm(e){return Ua(e).position==="static"}function Jy(e,i){if(!il(e)||Ua(e).position==="fixed")return null;if(i)return i(e);let a=e.offsetParent;return pr(e)===a&&(a=a.ownerDocument.body),a}function Cj(e,i){const a=ci(e);if(Qd(e))return a;if(!il(e)){let c=Yl(e);for(;c&&!xc(c);){if(Pa(c)&&!Gm(c))return c;c=Yl(c)}return a}let l=Jy(e,i);for(;l&&uN(l)&&Gm(l);)l=Jy(l,i);return l&&xc(l)&&Gm(l)&&!L0(l)?a:l||hN(e)||a}const NN=async function(e){const i=this.getOffsetParent||Cj,a=this.getDimensions,l=await a(e.floating);return{reference:CN(e.reference,await i(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function EN(e){return Ua(e).direction==="rtl"}const TN={convertOffsetParentRelativeRectToViewportRelativeRect:gN,getDocumentElement:pr,getClippingRect:SN,getOffsetParent:Cj,getElementRects:NN,getClientRects:vN,getDimensions:kN,getScale:ts,isElement:Pa,isRTL:EN};function Nj(e,i){return e.x===i.x&&e.y===i.y&&e.width===i.width&&e.height===i.height}function AN(e,i,a){let l=null,c;const u=pr(e);function d(){var y;clearTimeout(c),(y=l)==null||y.disconnect(),l=null}function f(y,p){y===void 0&&(y=!1),p===void 0&&(p=1),d();const b=e.getBoundingClientRect(),{left:j,top:S,width:k,height:C}=b;if(y||i(),!k||!C)return;const E=sd(S),M=sd(u.clientWidth-(j+k)),T=sd(u.clientHeight-(S+C)),_=sd(j),A={rootMargin:-E+"px "+-M+"px "+-T+"px "+-_+"px",threshold:cr(0,el(1,p))||1};let I=!0;function U($){const O=$[0].intersectionRatio;if(!Nj(b,e.getBoundingClientRect()))return f();if(O!==p){if(!I)return f();O?f(!1,O):c=setTimeout(()=>{f(!1,1e-7)},1e3)}I=!1}try{l=new IntersectionObserver(U,{...A,root:u.ownerDocument})}catch{l=new IntersectionObserver(U,A)}l.observe(e)}const m=ci(e),v=()=>f(a);return m.addEventListener("resize",v),f(!0),()=>{m.removeEventListener("resize",v),d()}}function _N(e,i,a,l){l===void 0&&(l={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=l,v=I0(e),y=c||u?[...v?bc(v):[],...i?bc(i):[]]:[];y.forEach(E=>{c&&E.addEventListener("scroll",a),u&&E.addEventListener("resize",a)});const p=v&&f?AN(v,a,u):null;let b=-1,j=null;d&&(j=new ResizeObserver(E=>{let[M]=E;M&&M.target===v&&j&&i&&(j.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var T;(T=j)==null||T.observe(i)})),a()}),v&&!m&&j.observe(v),i&&j.observe(i));let S,k=m?Xl(e):null;m&&C();function C(){const E=Xl(e);k&&!Nj(k,E)&&a(),k=E,S=requestAnimationFrame(C)}return a(),()=>{var E;y.forEach(M=>{c&&M.removeEventListener("scroll",a),u&&M.removeEventListener("resize",a)}),p==null||p(),(E=j)==null||E.disconnect(),j=null,m&&cancelAnimationFrame(S)}}const MN=lN,RN=oN,ON=iN,zN=cN,DN=aN,Wy=nN,LN=sN,BN=(e,i,a)=>{const l=new Map,c=a??{},u={...TN,...c.platform,_c:l};return tN(e,i,{...c,platform:u})};var IN=typeof document<"u",HN=function(){},kd=IN?w.useLayoutEffect:HN;function Od(e,i){if(e===i)return!0;if(typeof e!=typeof i)return!1;if(typeof e=="function"&&e.toString()===i.toString())return!0;let a,l,c;if(e&&i&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==i.length)return!1;for(l=a;l--!==0;)if(!Od(e[l],i[l]))return!1;return!0}if(c=Object.keys(e),a=c.length,a!==Object.keys(i).length)return!1;for(l=a;l--!==0;)if(!{}.hasOwnProperty.call(i,c[l]))return!1;for(l=a;l--!==0;){const u=c[l];if(!(u==="_owner"&&e.$$typeof)&&!Od(e[u],i[u]))return!1}return!0}return e!==e&&i!==i}function Ej(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ex(e,i){const a=Ej(e);return Math.round(i*a)/a}function Ym(e){const i=w.useRef(e);return kd(()=>{i.current=e}),i}function PN(e){e===void 0&&(e={});const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:c,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:m,open:v}=e,[y,p]=w.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[b,j]=w.useState(l);Od(b,l)||j(l);const[S,k]=w.useState(null),[C,E]=w.useState(null),M=w.useCallback(F=>{F!==A.current&&(A.current=F,k(F))},[]),T=w.useCallback(F=>{F!==I.current&&(I.current=F,E(F))},[]),_=u||S,D=d||C,A=w.useRef(null),I=w.useRef(null),U=w.useRef(y),$=m!=null,O=Ym(m),V=Ym(c),q=Ym(v),ee=w.useCallback(()=>{if(!A.current||!I.current)return;const F={placement:i,strategy:a,middleware:b};V.current&&(F.platform=V.current),BN(A.current,I.current,F).then(ne=>{const L={...ne,isPositioned:q.current!==!1};Y.current&&!Od(U.current,L)&&(U.current=L,io.flushSync(()=>{p(L)}))})},[b,i,a,V,q]);kd(()=>{v===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[v]);const Y=w.useRef(!1);kd(()=>(Y.current=!0,()=>{Y.current=!1}),[]),kd(()=>{if(_&&(A.current=_),D&&(I.current=D),_&&D){if(O.current)return O.current(_,D,ee);ee()}},[_,D,ee,O,$]);const H=w.useMemo(()=>({reference:A,floating:I,setReference:M,setFloating:T}),[M,T]),K=w.useMemo(()=>({reference:_,floating:D}),[_,D]),R=w.useMemo(()=>{const F={position:a,left:0,top:0};if(!K.floating)return F;const ne=ex(K.floating,y.x),L=ex(K.floating,y.y);return f?{...F,transform:"translate("+ne+"px, "+L+"px)",...Ej(K.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:ne,top:L}},[a,f,K.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:ee,refs:H,elements:K,floatingStyles:R}),[y,ee,H,K,R])}const UN=e=>{function i(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:l,padding:c}=typeof e=="function"?e(a):e;return l&&i(l)?l.current!=null?Wy({element:l.current,padding:c}).fn(a):{}:l?Wy({element:l,padding:c}).fn(a):{}}}},qN=(e,i)=>{const a=MN(e);return{name:a.name,fn:a.fn,options:[e,i]}},FN=(e,i)=>{const a=RN(e);return{name:a.name,fn:a.fn,options:[e,i]}},VN=(e,i)=>({fn:LN(e).fn,options:[e,i]}),$N=(e,i)=>{const a=ON(e);return{name:a.name,fn:a.fn,options:[e,i]}},GN=(e,i)=>{const a=zN(e);return{name:a.name,fn:a.fn,options:[e,i]}},YN=(e,i)=>{const a=DN(e);return{name:a.name,fn:a.fn,options:[e,i]}},XN=(e,i)=>{const a=UN(e);return{name:a.name,fn:a.fn,options:[e,i]}};var KN=Object.defineProperty,Jr=(e,i)=>KN(e,"name",{value:i,configurable:!0}),Tj="Popper",[Aj,Wd]=nl(Tj),[QN,_j]=Aj(Tj),ZN=Jr(e=>{const{__scopePopper:i,children:a}=e,[l,c]=w.useState(null),[u,d]=w.useState(void 0);return o.jsx(QN,{scope:i,anchor:l,onAnchorChange:c,placementState:u,setPlacementState:d,children:a})},"Popper"),JN="PopperAnchor",WN=w.forwardRef(Jr(function(i,a){const{__scopePopper:l,virtualRef:c,...u}=i,d=_j(JN,l),f=w.useRef(null),m=d.onAnchorChange,v=w.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=wt(a,v),p=w.useRef(null);w.useEffect(()=>{if(!c)return;const k=p.current;p.current=c.current,k!==p.current&&m(p.current)});const b=d.placementState&&ef(d.placementState),j=b==null?void 0:b[0],S=b==null?void 0:b[1];return c?null:o.jsx(Dt.div,{"data-radix-popper-side":j,"data-radix-popper-align":S,...u,ref:y})},"PopperAnchor")),Mj="PopperContent",[eE,OI]=Aj(Mj),tE=w.forwardRef(Jr(function(i,a){var xe,oe,ce,me,Ne,Le,Ve;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:p=0,sticky:b="partial",hideWhenDetached:j=!1,updatePositionStrategy:S="optimized",onPlaced:k,...C}=i,E=_j(Mj,l),[M,T]=w.useState(null),_=wt(a,T),[D,A]=w.useState(null),I=gj(D),U=(I==null?void 0:I.width)??0,$=(I==null?void 0:I.height)??0,O=c+(d!=="center"?"-"+d:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},q=Array.isArray(y)?y:[y],ee=q.length>0,Y={padding:V,boundary:q.filter(Rj),altBoundary:ee},{refs:H,floatingStyles:K,placement:R,isPositioned:F,middlewareData:ne}=PN({strategy:"fixed",placement:O,whileElementsMounted:Jr((...mt)=>_N(...mt,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[qN({mainAxis:u+$,alignmentAxis:f}),v&&FN({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?VN():void 0,...Y}),v&&$N({...Y}),GN({...Y,apply:Jr(({elements:mt,rects:ot,availableWidth:Je,availableHeight:_t})=>{const{width:vn,height:yn}=ot.reference,Pn=mt.floating.style;Pn.setProperty("--radix-popper-available-width",`${Je}px`),Pn.setProperty("--radix-popper-available-height",`${_t}px`),Pn.setProperty("--radix-popper-anchor-width",`${vn}px`),Pn.setProperty("--radix-popper-anchor-height",`${yn}px`)},"apply")}),D&&XN({element:D,padding:m}),nE({arrowWidth:U,arrowHeight:$}),j&&YN({strategy:"referenceHidden",...Y,boundary:ee?Y.boundary:void 0})]}),L=E.setPlacementState;Mn(()=>(L(R),()=>{L(void 0)}),[R,L]);const[J,W]=ef(R),P=_n(k);Mn(()=>{F&&(P==null||P())},[F,P]);const G=(xe=ne.arrow)==null?void 0:xe.x,fe=(oe=ne.arrow)==null?void 0:oe.y,ye=((ce=ne.arrow)==null?void 0:ce.centerOffset)!==0,[je,re]=w.useState();return Mn(()=>{M&&re(window.getComputedStyle(M).zIndex)},[M]),o.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:F?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(me=ne.transformOrigin)==null?void 0:me.x,(Ne=ne.transformOrigin)==null?void 0:Ne.y].join(" "),...((Le=ne.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:i.dir,children:o.jsx(eE,{scope:l,placedSide:J,placedAlign:W,onArrowChange:A,arrowX:G,arrowY:fe,shouldHideArrow:ye,children:o.jsx(Dt.div,{"data-side":J,"data-align":W,...C,ref:_,style:{...C.style,animation:F?(Ve=C.style)==null?void 0:Ve.animation:"none"}})})})},"PopperContent"));function Rj(e){return e!==null}Jr(Rj,"isNotNull");var nE=Jr(e=>({name:"transformOrigin",options:e,fn(i){var C,E,M;const{placement:a,rects:l,middlewareData:c}=i,d=((C=c.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[v,y]=ef(a),p={start:"0%",center:"50%",end:"100%"}[y],b=(((E=c.arrow)==null?void 0:E.x)??0)+f/2,j=(((M=c.arrow)==null?void 0:M.y)??0)+m/2;let S="",k="";return v==="bottom"?(S=d?p:`${b}px`,k=`${-m}px`):v==="top"?(S=d?p:`${b}px`,k=`${l.floating.height+m}px`):v==="right"?(S=`${-m}px`,k=d?p:`${j}px`):v==="left"&&(S=`${l.floating.width+m}px`,k=d?p:`${j}px`),{data:{x:S,y:k}}}}),"transformOrigin");function ef(e){const[i,a="center"]=e.split("-");return[i,a]}Jr(ef,"getSideAndAlignFromPlacement");var Oj=ZN,zj=WN,Dj=tE,iE=Object.defineProperty,aE=(e,i)=>iE(e,"name",{value:i,configurable:!0}),rE=w.forwardRef(aE(function(i,a){return o.jsx(Dt.label,{...i,ref:a,onMouseDown:l=>{var u;l.target.closest("button, input, select, textarea")||((u=i.onMouseDown)==null||u.call(i,l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}})},"Label")),lE=rE,oE=Object.defineProperty,sE=(e,i)=>oE(e,"name",{value:i,configurable:!0});function Lj(e){const i=w.useRef({value:e,previous:e});return w.useMemo(()=>(i.current.value!==e&&(i.current.previous=i.current.value,i.current.value=e),i.current.previous),[e])}sE(Lj,"usePrevious");var cE=Object.defineProperty,uE=(e,i)=>cE(e,"name",{value:i,configurable:!0});function zd(e,[i,a]){return Math.min(a,Math.max(i,e))}uE(zd,"clamp");var dE=Object.defineProperty,al=(e,i)=>dE(e,"name",{value:i,configurable:!0}),H0="Popover",[Bj,zI]=nl(H0,[Wd]),P0=Wd(),[fE,ds]=Bj(H0),hE=al(e=>{const{__scopePopover:i,children:a,open:l,defaultOpen:c,onOpenChange:u,modal:d=!1}=e,f=P0(i),m=w.useRef(null),[v,y]=w.useState(!1),[p,b]=vc({prop:l,defaultProp:c??!1,onChange:u,caller:H0});return o.jsx(Oj,{...f,children:o.jsx(fE,{scope:i,contentId:$l(),triggerRef:m,open:p,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(j=>!j),[b]),hasCustomAnchor:v,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:d,children:a})})},"Popover"),mE="PopoverTrigger",pE=w.forwardRef(al(function(i,a){const{__scopePopover:l,...c}=i,u=ds(mE,l),d=P0(l),f=wt(a,u.triggerRef),m=o.jsx(Dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":U0(u.open),...c,ref:f,onClick:pt(i.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:o.jsx(zj,{asChild:!0,...d,children:m})},"PopoverTrigger")),Ij="PopoverPortal",[gE,vE]=Bj(Ij,{forceMount:void 0}),yE=al(e=>{const{__scopePopover:i,forceMount:a,children:l,container:c}=e,u=ds(Ij,i);return o.jsx(gE,{scope:i,forceMount:a,children:o.jsx(Va,{present:a||u.open,children:o.jsx(T0,{asChild:!0,container:c,children:l})})})},"PopoverPortal"),jc="PopoverContent",xE=w.forwardRef(al(function(i,a){const l=vE(jc,i.__scopePopover),{forceMount:c=l.forceMount,...u}=i,d=ds(jc,i.__scopePopover);return o.jsx(Va,{present:c||d.open,children:d.modal?o.jsx(jE,{...u,ref:a}):o.jsx(wE,{...u,ref:a})})},"PopoverContent")),bE=Ha("PopoverContent.RemoveScroll"),jE=w.forwardRef(al(function(i,a){const l=ds(jc,i.__scopePopover),c=w.useRef(null),u=wt(a,c),d=w.useRef(!1);return w.useEffect(()=>{const f=c.current;if(f)return _0(f)},[]),o.jsx(Yd,{as:bE,allowPinchZoom:!0,children:o.jsx(Hj,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(i.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=l.triggerRef.current)==null||m.focus()}),onPointerDownOutside:pt(i.onPointerDownOutside,f=>{const m=f.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;d.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:pt(i.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),wE=w.forwardRef(al(function(i,a){const l=ds(jc,i.__scopePopover),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(Hj,{...i,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=i.onCloseAutoFocus)==null||f.call(i,d),d.defaultPrevented||(c.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=i.onInteractOutside)==null||v.call(i,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"PopoverContentNonModal")),Hj=w.forwardRef(al(function(i,a){const{__scopePopover:l,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:p,...b}=i,j=ds(jc,l),S=P0(l);return Ac(),o.jsx(N0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(k0,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>j.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(Dj,{"data-state":U0(j.open),role:"dialog",id:j.contentId,...S,...b,ref:a,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function U0(e){return e?"open":"closed"}al(U0,"getState");var Pj=hE,Uj=pE,qj=yE,Fj=xE,SE=Object.defineProperty,at=(e,i)=>SE(e,"name",{value:i,configurable:!0});function Vj(e,i){return w.useReducer((a,l)=>i[a][l]??a,e)}at(Vj,"useStateMachine");var $j="ScrollArea",[Gj,DI]=nl($j),[kE,Gi]=Gj($j),CE=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,type:c="hover",dir:u,scrollHideDelay:d=600,...f}=i,[m,v]=w.useState(null),[y,p]=w.useState(null),[b,j]=w.useState(null),[S,k]=w.useState(null),[C,E]=w.useState(null),[M,T]=w.useState(0),[_,D]=w.useState(0),[A,I]=w.useState(!1),[U,$]=w.useState(!1),O=wt(a,v),V=S0(u);return o.jsx(kE,{scope:l,type:c,dir:V,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:p,content:b,onContentChange:j,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:A,onScrollbarXEnabledChange:I,scrollbarY:C,onScrollbarYChange:E,scrollbarYEnabled:U,onScrollbarYEnabledChange:$,onCornerWidthChange:T,onCornerHeightChange:D,children:o.jsx(Dt.div,{dir:V,...f,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":_+"px",...i.style}})})},"ScrollArea")),NE="ScrollAreaViewport",EE=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,children:c,nonce:u,...d}=i,f=Gi(NE,l),m=w.useRef(null),v=wt(a,m,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(TE,{nonce:u}),o.jsx(Dt.div,{"data-radix-scroll-area-viewport":"",...d,ref:v,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...i.style},children:o.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:c})})]})},"ScrollAreaViewport")),TE=w.memo(at(function({nonce:i}){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:i})},"ScrollAreaViewportStyle"),(e,i)=>e.nonce===i.nonce),gr="ScrollAreaScrollbar",AE=w.forwardRef(at(function(i,a){const{forceMount:l,...c}=i,u=Gi(gr,i.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=i.orientation==="horizontal";return w.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?o.jsx(_E,{...c,ref:a,forceMount:l}):u.type==="scroll"?o.jsx(ME,{...c,ref:a,forceMount:l}):u.type==="auto"?o.jsx(Yj,{...c,ref:a,forceMount:l}):u.type==="always"?o.jsx(q0,{...c,ref:a,"data-state":"visible"}):null},"ScrollAreaScrollbar")),_E=w.forwardRef(at(function(i,a){const{forceMount:l,...c}=i,u=Gi(gr,i.__scopeScrollArea),[d,f]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=at(()=>{window.clearTimeout(v),f(!0)},"handlePointerEnter"),p=at(()=>{v=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",p),()=>{window.clearTimeout(v),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",p)}}},[u.scrollArea,u.scrollHideDelay]),o.jsx(Va,{present:l||d,children:o.jsx(Yj,{"data-state":d?"visible":"hidden",...c,ref:a})})},"ScrollAreaScrollbarHover")),ME=w.forwardRef(at(function(i,a){const{forceMount:l,...c}=i,u=Gi(gr,i.__scopeScrollArea),d=i.orientation==="horizontal",f=Mc(()=>v("SCROLL_END"),100),[m,v]=Vj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),w.useEffect(()=>{const y=u.viewport,p=d?"scrollLeft":"scrollTop";if(y){let b=y[p];const j=at(()=>{const S=y[p];b!==S&&(v("SCROLL"),f()),b=S},"handleScroll");return y.addEventListener("scroll",j),()=>y.removeEventListener("scroll",j)}},[u.viewport,d,v,f]),o.jsx(Va,{present:l||m!=="hidden",children:o.jsx(q0,{"data-state":m==="hidden"?"hidden":"visible",...c,ref:a,onPointerEnter:pt(i.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:pt(i.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Yj=w.forwardRef(at(function(i,a){const l=Gi(gr,i.__scopeScrollArea),{forceMount:c,...u}=i,[d,f]=w.useState(!1),m=i.orientation==="horizontal",v=Mc(()=>{if(l.viewport){const y=l.viewport.offsetWidth<l.viewport.scrollWidth,p=l.viewport.offsetHeight<l.viewport.scrollHeight;f(m?y:p)}},10);return Kl(l.viewport,v),Kl(l.content,v),o.jsx(Va,{present:c||d,children:o.jsx(q0,{"data-state":d?"visible":"hidden",...u,ref:a})})},"ScrollAreaScrollbarAuto")),q0=w.forwardRef(at(function(i,a){const{orientation:l="vertical",...c}=i,u=Gi(gr,i.__scopeScrollArea),d=w.useRef(null),f=w.useRef(0),[m,v]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=F0(m.viewport,m.content),p={...c,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:at(j=>d.current=j,"onThumbChange"),onThumbPointerUp:at(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:at(j=>f.current=j,"onThumbPointerDown")};function b(j,S){return Zj(j,f.current,m,S)}return at(b,"getScrollPosition"),l==="horizontal"?o.jsx(RE,{...p,ref:a,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollLeft,S=$p(j,m,u.dir);d.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollLeft=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollLeft=b(j,u.dir))}}):l==="vertical"?o.jsx(OE,{...p,ref:a,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollTop,S=$p(j,m);d.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollTop=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollTop=b(j))}}):null},"ScrollAreaScrollbarVisible")),RE=w.forwardRef(at(function(i,a){const{sizes:l,onSizesChange:c,...u}=i,d=Gi(gr,i.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=wt(a,v,d.onScrollbarXChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(Kj,{"data-orientation":"horizontal",...u,ref:y,sizes:l,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":_c(l)+"px",...i.style},onThumbPointerDown:p=>i.onThumbPointerDown(p.x),onDragScroll:p=>i.onDragScroll(p.x),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollLeft+p.deltaX;i.onWheelScroll(j),$0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:wc(f.paddingLeft),paddingEnd:wc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),OE=w.forwardRef(at(function(i,a){const{sizes:l,onSizesChange:c,...u}=i,d=Gi(gr,i.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=wt(a,v,d.onScrollbarYChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(Kj,{"data-orientation":"vertical",...u,ref:y,sizes:l,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":_c(l)+"px",...i.style},onThumbPointerDown:p=>i.onThumbPointerDown(p.y),onDragScroll:p=>i.onDragScroll(p.y),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollTop+p.deltaY;i.onWheelScroll(j),$0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:wc(f.paddingTop),paddingEnd:wc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[zE,Xj]=Gj(gr),Kj=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,sizes:c,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:p,onResize:b,...j}=i,S=Gi(gr,l),[k,C]=w.useState(null),E=wt(a,C),M=w.useRef(null),T=w.useRef(""),_=S.viewport,D=c.content-c.viewport,A=_n(p),I=_n(v),U=Mc(b,10);function $(O){if(M.current){const V=O.clientX-M.current.left,q=O.clientY-M.current.top;y({x:V,y:q})}}return at($,"handleDragScroll"),w.useEffect(()=>{const O=at(V=>{const q=V.target;(k==null?void 0:k.contains(q))&&A(V,D)},"handleWheel");return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[_,k,D,A]),w.useEffect(I,[c,I]),Kl(k,U),Kl(S.content,U),o.jsx(zE,{scope:l,scrollbar:k,hasThumb:u,onThumbChange:_n(d),onThumbPointerUp:_n(f),onThumbPositionChange:I,onThumbPointerDown:_n(m),children:o.jsx(Dt.div,{...j,ref:E,style:{position:"absolute",...j.style},onPointerDown:pt(i.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),M.current=k.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),$(O))}),onPointerMove:pt(i.onPointerMove,$),onPointerUp:pt(i.onPointerUp,O=>{const V=O.target;V.hasPointerCapture(O.pointerId)&&V.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=T.current,S.viewport&&(S.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),Vp="ScrollAreaThumb",DE=w.forwardRef(at(function(i,a){const{forceMount:l,...c}=i,u=Xj(Vp,i.__scopeScrollArea);return o.jsx(Va,{present:l||u.hasThumb,children:o.jsx(LE,{ref:a,...c})})},"ScrollAreaThumb")),LE=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,style:c,...u}=i,d=Gi(Vp,l),f=Xj(Vp,l),{onThumbPositionChange:m}=f,v=wt(a,f.onThumbChange),y=w.useRef(void 0),p=Mc(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const b=d.viewport;if(b){const j=at(()=>{if(p(),!y.current){const S=HE(b,m);y.current=S,m()}},"handleScroll");return m(),b.addEventListener("scroll",j),()=>b.removeEventListener("scroll",j)}},[d.viewport,p,m]),o.jsx(Dt.div,{"data-state":f.hasThumb?"visible":"hidden",...u,ref:v,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...c},onPointerDownCapture:pt(i.onPointerDownCapture,b=>{const S=b.target.getBoundingClientRect(),k=b.clientX-S.left,C=b.clientY-S.top;f.onThumbPointerDown({x:k,y:C})}),onPointerUp:pt(i.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Qj="ScrollAreaCorner",BE=w.forwardRef(at(function(i,a){const l=Gi(Qj,i.__scopeScrollArea),c=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&c?o.jsx(IE,{...i,ref:a}):null},"ScrollAreaCorner")),IE=w.forwardRef(at(function(i,a){const{__scopeScrollArea:l,...c}=i,u=Gi(Qj,l),[d,f]=w.useState(0),[m,v]=w.useState(0),y=!!(d&&m),{onCornerWidthChange:p,onCornerHeightChange:b}=u;return Kl(u.scrollbarX,()=>{var S;const j=((S=u.scrollbarX)==null?void 0:S.offsetHeight)||0;u.onCornerHeightChange(j),v(j)}),Kl(u.scrollbarY,()=>{var S;const j=((S=u.scrollbarY)==null?void 0:S.offsetWidth)||0;u.onCornerWidthChange(j),f(j)}),w.useEffect(()=>()=>{p(0),b(0)},[p,b]),y?o.jsx(Dt.div,{...c,ref:a,style:{width:d,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...i.style}}):null},"ScrollAreaCornerImpl"));function wc(e){return e?parseInt(e,10):0}at(wc,"toInt");function F0(e,i){const a=e/i;return isNaN(a)?0:a}at(F0,"getThumbRatio");function _c(e){const i=F0(e.viewport,e.content),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=(e.scrollbar.size-a)*i;return Math.max(l,18)}at(_c,"getThumbSize");function Zj(e,i,a,l="ltr"){const c=_c(a),u=c/2,d=i||u,f=c-d,m=a.scrollbar.paddingStart+d,v=a.scrollbar.size-a.scrollbar.paddingEnd-f,y=a.content-a.viewport,p=l==="ltr"?[0,y]:[y*-1,0];return V0([m,v],p)(e)}at(Zj,"getScrollPositionFromPointer");function $p(e,i,a="ltr"){const l=_c(i),c=i.scrollbar.paddingStart+i.scrollbar.paddingEnd,u=i.scrollbar.size-c,d=i.content-i.viewport,f=u-l,m=a==="ltr"?[0,d]:[d*-1,0],v=zd(e,m);return V0([0,d],[0,f])(v)}at($p,"getThumbOffsetFromScroll");function V0(e,i){return a=>{if(e[0]===e[1]||i[0]===i[1])return i[0];const l=(i[1]-i[0])/(e[1]-e[0]);return i[0]+l*(a-e[0])}}at(V0,"linearScale");function $0(e,i){return e>0&&e<i}at($0,"isScrollingWithinScrollbarBounds");var HE=at((e,i=()=>{})=>{let a={left:e.scrollLeft,top:e.scrollTop},l=0;return at((function c(){const u={left:e.scrollLeft,top:e.scrollTop},d=a.left!==u.left,f=a.top!==u.top;(d||f)&&i(),a=u,l=window.requestAnimationFrame(c)}),"loop")(),()=>window.cancelAnimationFrame(l)},"addUnlinkedScrollListener");function Mc(e,i){const a=_n(e),l=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(l.current),[]),w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(a,i)},[a,i])}at(Mc,"useDebounceCallback");function Kl(e,i){const a=_n(i);Mn(()=>{let l=0;if(e){const c=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(a)});return c.observe(e),()=>{window.cancelAnimationFrame(l),c.unobserve(e)}}},[e,a])}at(Kl,"useResizeObserver");var PE=CE,UE=EE,qE=BE,FE=Object.defineProperty,kt=(e,i)=>FE(e,"name",{value:i,configurable:!0}),VE=[" ","Enter","ArrowUp","ArrowDown"],$E=[" ","Enter"],is="Select",[tf,G0,GE]=O3(is),[ao,LI]=nl(is,[GE,Wd]),Y0=Wd(),[YE,rl]=ao(is),[XE,KE]=ao(is);function Jj(e){const{__scopeSelect:i,children:a,open:l,defaultOpen:c,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:v,name:y,autoComplete:p,disabled:b,required:j,form:S,internal_do_not_use_render:k}=e,C=Y0(i),[E,M]=w.useState(null),[T,_]=w.useState(null),[D,A]=w.useState(!1),I=S0(v),[U,$]=vc({prop:l,defaultProp:c??!1,onChange:u,caller:is}),[O,V]=vc({prop:d,defaultProp:f,onChange:m,caller:is}),q=w.useRef(null),ee=w.useRef(O);w.useEffect(()=>{const W=S?E==null?void 0:E.ownerDocument.getElementById(S):E==null?void 0:E.form;if(W instanceof HTMLFormElement){const P=kt(()=>V(ee.current),"reset");return W.addEventListener("reset",P),()=>W.removeEventListener("reset",P)}},[S,E,V]);const Y=E?!!S||!!E.closest("form"):!0,[H,K]=w.useState(new Set),R=$l(),F=Array.from(H).map(W=>W.props.value).join(";"),ne=w.useCallback(W=>{K(P=>new Set(P).add(W))},[]),L=w.useCallback(W=>{K(P=>{const G=new Set(P);return G.delete(W),G})},[]),J={required:j,trigger:E,onTriggerChange:M,valueNode:T,onValueNodeChange:_,valueNodeHasChildren:D,onValueNodeHasChildrenChange:A,contentId:R,value:O,onValueChange:V,open:U,onOpenChange:$,dir:I,triggerPointerDownPosRef:q,disabled:b,name:y,autoComplete:p,form:S,nativeOptions:H,nativeSelectKey:F,isFormControl:Y};return o.jsx(Oj,{...C,children:o.jsx(YE,{scope:i,...J,children:o.jsx(tf.Provider,{scope:i,children:o.jsx(XE,{scope:i,onNativeOptionAdd:ne,onNativeOptionRemove:L,children:tw(k)?k(J):a})})})})}kt(Jj,"SelectProvider");var QE=kt(e=>{const{__scopeSelect:i,children:a,...l}=e;return o.jsx(Jj,{__scopeSelect:i,...l,internal_do_not_use_render:({isFormControl:c})=>o.jsxs(o.Fragment,{children:[a,c?o.jsx(jT,{__scopeSelect:i}):null]})})},"Select"),ZE="SelectTrigger",JE=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,disabled:c=!1,...u}=i,d=Y0(l),f=rl(ZE,l),m=f.disabled||c,v=wt(a,f.onTriggerChange),y=G0(l),p=w.useRef("touch"),[b,j,S]=X0(C=>{const E=y().filter(_=>!_.disabled),M=E.find(_=>_.value===f.value),T=K0(E,C,M);T!==void 0&&f.onValueChange(T.value)}),k=kt(C=>{m||(f.onOpenChange(!0),S()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return o.jsx(zj,{asChild:!0,...d,children:o.jsx(Dt.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":Rc(f.value)?"":void 0,...u,ref:v,onClick:pt(u.onClick,C=>{C.currentTarget.focus(),p.current!=="mouse"&&k(C)}),onPointerDown:pt(u.onPointerDown,C=>{p.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(k(C),C.preventDefault())}),onKeyDown:pt(u.onKeyDown,C=>{const E=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&j(C.key),!(E&&C.key===" ")&&VE.includes(C.key)&&(k(),C.preventDefault())})})})},"SelectTrigger")),WE="SelectValue",eT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,className:c,style:u,children:d,placeholder:f="",...m}=i,v=rl(WE,l),{onValueNodeHasChildrenChange:y}=v,p=d!==void 0,b=wt(a,v.onValueNodeChange);Mn(()=>{y(p)},[y,p]);const j=Rc(v.value);return o.jsx(Dt.span,{...m,asChild:j?!1:m.asChild,ref:b,style:{pointerEvents:"none"},children:o.jsx(w.Fragment,{children:j?f:d},j?"placeholder":"value")})},"SelectValue")),tT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,children:c,...u}=i;return o.jsx(Dt.span,{"aria-hidden":!0,...u,ref:a,children:c||"▼"})},"SelectIcon")),nT="SelectPortal",[iT,aT]=ao(nT,{forceMount:void 0}),rT=kt(e=>{const{__scopeSelect:i,forceMount:a,...l}=e;return o.jsx(iT,{scope:e.__scopeSelect,forceMount:a,children:o.jsx(T0,{asChild:!0,...l})})},"SelectPortal"),Ql="SelectContent",lT=w.forwardRef(kt(function(i,a){const l=aT(Ql,i.__scopeSelect),{forceMount:c=l.forceMount,...u}=i,d=rl(Ql,i.__scopeSelect),[f,m]=w.useState();return Mn(()=>{m(new DocumentFragment)},[]),o.jsx(Va,{present:c||d.open,children:({present:v})=>v?o.jsx(cT,{...u,ref:a}):o.jsx(oT,{...u,fragment:f})})},"SelectContent")),oT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,children:c,fragment:u}=i;return u?io.createPortal(o.jsx(Wj,{scope:l,children:o.jsx(tf.Slot,{scope:l,children:o.jsx("div",{ref:a,children:c})})}),u):null},"SelectContentFragment")),aa=10,[Wj,nf]=ao(Ql),sT=Ha("SelectContent.RemoveScroll"),cT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l}=i,{position:c="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E,...M}=i,T=rl(Ql,l),[_,D]=w.useState(null),[A,I]=w.useState(null),U=wt(a,D),[$,O]=w.useState(null),[V,q]=w.useState(null),ee=G0(l),[Y,H]=w.useState(!1),K=w.useRef(!1);w.useEffect(()=>{if(_)return _0(_)},[_]),Ac();const R=w.useCallback(re=>{const[xe,...oe]=ee().map(Ne=>Ne.ref.current),[ce]=oe.slice(-1),me=document.activeElement;for(const Ne of re)if(Ne===me||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===xe&&A&&(A.scrollTop=0),Ne===ce&&A&&(A.scrollTop=A.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==me))return},[ee,A]),F=w.useCallback(()=>R([$,_]),[R,$,_]);w.useEffect(()=>{Y&&F()},[Y,F]);const{onOpenChange:ne,triggerPointerDownPosRef:L}=T;w.useEffect(()=>{if(_){let re={x:0,y:0};const xe=kt(ce=>{var me,Ne;re={x:Math.abs(Math.round(ce.pageX)-(((me=L.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ce.pageY)-(((Ne=L.current)==null?void 0:Ne.y)??0))}},"handlePointerMove"),oe=kt(ce=>{re.x<=10&&re.y<=10?ce.preventDefault():ce.composedPath().includes(_)||ne(!1),document.removeEventListener("pointermove",xe),L.current=null},"handlePointerUp");return L.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",oe,{capture:!0})}}},[_,ne,L]),w.useEffect(()=>{const re=kt(()=>ne(!1),"close");return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[ne]);const[J,W]=X0(re=>{const xe=ee().filter(me=>!me.disabled),oe=xe.find(me=>me.ref.current===document.activeElement),ce=K0(xe,re,oe);ce&&setTimeout(()=>{var me;return(me=ce.ref.current)==null?void 0:me.focus()})}),P=w.useCallback((re,xe,oe)=>{const ce=!K.current&&!oe;(T.value!==void 0&&T.value===xe||ce)&&(O(re),ce&&(K.current=!0))},[T.value]),G=w.useCallback(()=>_==null?void 0:_.focus(),[_]),fe=w.useCallback((re,xe,oe)=>{const ce=!K.current&&!oe;(T.value!==void 0&&T.value===xe||ce)&&q(re)},[T.value]),ye=c==="popper"?tx:uT,je=ye===tx?{side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E}:{};return o.jsx(Wj,{scope:l,content:_,viewport:A,onViewportChange:I,itemRefCallback:P,selectedItem:$,onItemLeave:G,itemTextRefCallback:fe,focusSelectedItem:F,selectedItemText:V,position:c,isPositioned:Y,searchRef:J,children:o.jsx(Yd,{as:sT,allowPinchZoom:!0,children:o.jsx(N0,{asChild:!0,trapped:T.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:pt(u,re=>{var xe;(xe=T.trigger)==null||xe.focus({preventScroll:!0}),re.preventDefault()}),children:o.jsx(k0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:o.jsx(ye,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:re=>re.preventDefault(),...M,...je,onPlaced:()=>H(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:pt(M.onKeyDown,re=>{const xe=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!xe&&re.key.length===1&&W(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let ce=ee().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(re.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const me=re.target,Ne=ce.indexOf(me);ce=ce.slice(Ne+1)}setTimeout(()=>R(ce)),re.preventDefault()}})})})})})})},"SelectContentImpl")),uT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,onPlaced:c,...u}=i,d=rl(Ql,l),f=nf(Ql,l),[m,v]=w.useState(null),[y,p]=w.useState(null),b=wt(a,p),j=G0(l),S=w.useRef(!1),k=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:M,focusSelectedItem:T}=f,_=w.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&C&&E&&M){const U=d.trigger.getBoundingClientRect(),$=y.getBoundingClientRect(),O=d.valueNode.getBoundingClientRect(),V=M.getBoundingClientRect();if(d.dir!=="rtl"){const me=V.left-$.left,Ne=O.left-me,Le=U.left-Ne,Ve=U.width+Le,mt=Math.max(Ve,$.width),ot=window.innerWidth-aa,Je=zd(Ne,[aa,Math.max(aa,ot-mt)]);m.style.minWidth=Ve+"px",m.style.left=Je+"px"}else{const me=$.right-V.right,Ne=window.innerWidth-O.right-me,Le=window.innerWidth-U.right-Ne,Ve=U.width+Le,mt=Math.max(Ve,$.width),ot=window.innerWidth-aa,Je=zd(Ne,[aa,Math.max(aa,ot-mt)]);m.style.minWidth=Ve+"px",m.style.right=Je+"px"}const q=j(),ee=window.innerHeight-aa*2,Y=C.scrollHeight,H=window.getComputedStyle(y),K=parseInt(H.borderTopWidth,10),R=parseInt(H.paddingTop,10),F=parseInt(H.borderBottomWidth,10),ne=parseInt(H.paddingBottom,10),L=K+R+Y+ne+F,J=Math.min(E.offsetHeight*5,L),W=window.getComputedStyle(C),P=parseInt(W.paddingTop,10),G=parseInt(W.paddingBottom,10),fe=U.top+U.height/2-aa,ye=ee-fe,je=E.offsetHeight/2,re=E.offsetTop+je,xe=K+R+re,oe=L-xe;if(xe<=fe){const me=q.length>0&&E===q[q.length-1].ref.current;m.style.bottom="0px";const Ne=y.clientHeight-C.offsetTop-C.offsetHeight,Le=Math.max(ye,je+(me?G:0)+Ne+F),Ve=xe+Le;m.style.height=Ve+"px"}else{const me=q.length>0&&E===q[0].ref.current;m.style.top="0px";const Le=Math.max(fe,K+C.offsetTop+(me?P:0)+je)+oe;m.style.height=Le+"px",C.scrollTop=xe-fe+C.offsetTop}m.style.margin=`${aa}px 0`,m.style.minHeight=J+"px",m.style.maxHeight=ee+"px",c==null||c(),requestAnimationFrame(()=>S.current=!0)}},[j,d.trigger,d.valueNode,m,y,C,E,M,d.dir,c]);Mn(()=>_(),[_]);const[D,A]=w.useState();Mn(()=>{y&&A(window.getComputedStyle(y).zIndex)},[y]);const I=w.useCallback(U=>{U&&k.current===!0&&(_(),T==null||T(),k.current=!1)},[_,T]);return o.jsx(dT,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:I,children:o.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:o.jsx(Dt.div,{...u,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),tx=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,align:c="start",collisionPadding:u=aa,...d}=i,f=Y0(l);return o.jsx(Dj,{...f,...d,ref:a,align:c,collisionPadding:u,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[dT,fT]=ao(Ql,{}),nx="SelectViewport",hT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,nonce:c,...u}=i,d=nf(nx,l),f=fT(nx,l),m=wt(a,d.onViewportChange),v=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),o.jsx(tf.Slot,{scope:l,children:o.jsx(Dt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:pt(u.onScroll,y=>{const p=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:j}=f;if(j!=null&&j.current&&b){const S=Math.abs(v.current-p.scrollTop);if(S>0){const k=window.innerHeight-aa*2,C=parseFloat(b.style.minHeight),E=parseFloat(b.style.height),M=Math.max(C,E);if(M<k){const T=M+S,_=Math.min(k,T),D=T-_;b.style.height=_+"px",b.style.bottom==="0px"&&(p.scrollTop=D>0?D:0,b.style.justifyContent="flex-end")}}}v.current=p.scrollTop})})})]})},"SelectViewport")),mT="SelectGroup",[BI,II]=ao(mT),Gp="SelectItem",[pT,ew]=ao(Gp),gT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,value:c,disabled:u=!1,textValue:d,...f}=i,m=rl(Gp,l),v=nf(Gp,l),y=m.value===c,[p,b]=w.useState(d??""),[j,S]=w.useState(!1),k=_n(_=>{var D;return(D=v.itemRefCallback)==null?void 0:D.call(v,_,c,u)}),C=wt(a,k),E=$l(),M=w.useRef("touch"),T=kt(()=>{u||(m.onValueChange(c),m.onOpenChange(!1))},"handleSelect");return o.jsx(pT,{scope:l,value:c,disabled:u,textId:E,isSelected:y,onItemTextChange:w.useCallback(_=>{b(D=>D||((_==null?void 0:_.textContent)??"").trim())},[]),children:o.jsx(tf.ItemSlot,{scope:l,value:c,disabled:u,textValue:p,children:o.jsx(Dt.div,{role:"option","aria-labelledby":E,"data-highlighted":j?"":void 0,"aria-selected":y&&j,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:C,onFocus:pt(f.onFocus,()=>S(!0)),onBlur:pt(f.onBlur,()=>S(!1)),onClick:pt(f.onClick,()=>{M.current!=="mouse"&&T()}),onPointerUp:pt(f.onPointerUp,()=>{M.current==="mouse"&&T()}),onPointerDown:pt(f.onPointerDown,_=>{M.current=_.pointerType}),onPointerMove:pt(f.onPointerMove,_=>{var D;M.current=_.pointerType,u?(D=v.onItemLeave)==null||D.call(v):M.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pt(f.onPointerLeave,_=>{var D;_.currentTarget===document.activeElement&&((D=v.onItemLeave)==null||D.call(v))}),onKeyDown:pt(f.onKeyDown,_=>{var A;u||_.target!==_.currentTarget||((A=v.searchRef)==null?void 0:A.current)!==""&&_.key===" "||($E.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})},"SelectItem")),cd="SelectItemText",vT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,className:c,style:u,...d}=i,f=rl(cd,l),m=nf(cd,l),v=ew(cd,l),y=KE(cd,l),[p,b]=w.useState(null),j=_n(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,v.value,v.disabled)}),S=wt(a,b,v.onItemTextChange,j),k=p==null?void 0:p.textContent,C=w.useMemo(()=>o.jsx("option",{value:v.value,disabled:v.disabled,children:k},v.value),[v.disabled,v.value,k]),{onNativeOptionAdd:E,onNativeOptionRemove:M}=y;return Mn(()=>(E(C),()=>M(C)),[E,M,C]),o.jsxs(o.Fragment,{children:[o.jsx(Dt.span,{id:v.textId,...d,ref:S}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Rc(f.value)?io.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),yT="SelectItemIndicator",xT=w.forwardRef(kt(function(i,a){const{__scopeSelect:l,...c}=i;return ew(yT,l).isSelected?o.jsx(Dt.span,{"aria-hidden":!0,...c,ref:a}):null},"SelectItemIndicator")),bT="SelectBubbleInput",jT=w.forwardRef(kt(function({__scopeSelect:i,...a},l){const c=rl(bT,i),{value:u,onValueChange:d,required:f,disabled:m,name:v,autoComplete:y,form:p}=c,{nativeOptions:b,nativeSelectKey:j}=c,S=w.useRef(null),k=wt(l,S),C=u??"",E=Lj(C),M=Array.from(b).some(T=>(T.props.value??"")==="");return w.useEffect(()=>{const T=S.current;if(!T)return;const _=window.HTMLSelectElement.prototype,A=Object.getOwnPropertyDescriptor(_,"value").set;if(E!==C&&A){const I=new Event("change",{bubbles:!0});A.call(T,C),T.dispatchEvent(I)}},[E,C]),o.jsxs(Dt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:p,onChange:T=>d(T.target.value),...a,style:{...dC,...a.style},ref:k,defaultValue:C,children:[Rc(u)&&!M?o.jsx("option",{value:""}):null,Array.from(b)]},j)},"SelectBubbleInput"));function tw(e){return typeof e=="function"}kt(tw,"isFunction");function Rc(e){return e===""||e===void 0}kt(Rc,"shouldShowPlaceholder");function X0(e){const i=_n(e),a=w.useRef(""),l=w.useRef(0),c=w.useCallback(d=>{const f=a.current+d;i(f),kt((function m(v){a.current=v,window.clearTimeout(l.current),v!==""&&(l.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[i]),u=w.useCallback(()=>{a.current="",window.clearTimeout(l.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(l.current),[]),[a,c,u]}kt(X0,"useTypeaheadSearch");function K0(e,i,a){const c=i.length>1&&Array.from(i).every(v=>v===i[0])?i[0]:i,u=a?e.indexOf(a):-1;let d=nw(e,Math.max(u,0));c.length===1&&(d=d.filter(v=>v!==a));const m=d.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return m!==a?m:void 0}kt(K0,"findNextItem");function nw(e,i){return e.map((a,l)=>e[(i+l)%e.length])}kt(nw,"wrapArray");const wT=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 Oe({className:e,variant:i="default",size:a="default",asChild:l=!1,...c}){const u=l?nC:"button";return o.jsx(u,{"data-slot":"button","data-variant":i,"data-size":a,className:an(wT({variant:i,size:a,className:e})),...c})}const Q0=e=>oa(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Fl({value:e}){return o.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function iw({blocks:e,links:i,onSelect:a}){return o.jsx(o.Fragment,{children:e.map((l,c)=>{if(l.type==="text"||l.type==="reasoning")return o.jsxs("section",{className:"jv-history-block",children:[o.jsx("h4",{children:x(l.type==="reasoning"?"history.reasoning":"history.text")}),o.jsx("pre",{className:"jv-history-text",children:l.text||x("history.empty")})]},c);if(l.type==="image")return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x("files.kindImage")," · ",l.mime_type]}),o.jsx("img",{className:"jv-history-image",src:`data:${l.mime_type};base64,${l.data}`,alt:x("history.image")})]},c);if(l.type==="tool_call"||l.type==="tool_result"){const u=i.filter(d=>d.tool_call_id===l.tool_call_id);return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x(l.type==="tool_call"?"history.toolCall":"history.toolResult")," · ",o.jsx("strong",{children:l.name}),l.type==="tool_result"&&l.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:l.tool_call_id}),u.map(d=>o.jsxs("button",{type:"button",onClick:()=>a(d.id),"aria-label":x("history.related",{id:d.id}),children:[x(d.role==="tool"?"history.result":"history.call")," #",d.id]},d.id))]}),l.type==="tool_call"?o.jsx(Fl,{value:l.arguments}):o.jsxs(o.Fragment,{children:[o.jsx(iw,{blocks:l.result.content,links:[],onSelect:a}),l.result.details!==void 0&&o.jsxs("details",{children:[o.jsx("summary",{children:x("history.details")}),o.jsx(Fl,{value:l.result.details})]})]})]},c)}})})}function ST({detail:e,onSelect:i}){const[a,l]=w.useState("content"),{record:c,links:u}=e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-history-detail-head",children:[o.jsxs("div",{children:[o.jsxs("h3",{children:["#",c.id," ",o.jsx("span",{children:c.role})]}),o.jsx("p",{children:Q0(c.timestamp)})]}),o.jsxs("div",{role:"tablist","aria-label":x("history.view"),children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":a==="content",onClick:()=>l("content"),children:x("history.content")}),o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":a==="json",onClick:()=>l("json"),children:x("history.json")})]})]}),o.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":x(a==="content"?"history.contentLabel":"history.json"),children:a==="json"?o.jsx(Fl,{value:c}):o.jsxs(o.Fragment,{children:[c.model&&o.jsxs("div",{className:"jv-history-model",children:[o.jsx("span",{children:x("usage.model")}),o.jsx("strong",{children:c.model.id}),o.jsx("small",{children:c.model.provider})]}),o.jsx(iw,{blocks:c.message.content,links:u,onSelect:i}),c.message.tools&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsxs("summary",{children:[x("history.tools")," · ",c.message.tools.length]}),o.jsx(Fl,{value:c.message.tools})]}),c.message.tools_removed!==void 0&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:x("history.toolsRemoved")}),o.jsx(Fl,{value:c.message.tools_removed})]}),c.message.stop_reason&&o.jsxs("p",{className:"jv-history-note",children:[x("history.stopReason")," · ",c.message.stop_reason]}),c.message.error&&o.jsx("pre",{className:"jv-history-failure",children:c.message.error}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Usage"}),o.jsx(Fl,{value:c.usage})]}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Extra"}),o.jsx(Fl,{value:c.extra})]})]})})]})}const ix={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},ax=e=>oa(e,{year:"numeric",month:"long",day:"numeric"}),kT=e=>[e.preview,...e.tools.map(i=>x(i.kind==="call"?"activity.toolCall":i.error?"activity.toolFailed":"activity.toolResult",{name:i.name})),e.images?x("activity.images",{count:e.images}):""].filter(Boolean).join(" "),CT=e=>oa(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function NT({items:e,onSelect:i}){return o.jsx("ol",{className:"jv-activity-timeline","aria-label":x("activity.timeline"),children:e.map((a,l)=>{const{record:c}=a,u=ax(c.timestamp);return o.jsxs(w.Fragment,{children:[(l===0||ax(e[l-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-${a.kind}`,"data-kind":a.kind,children:[o.jsxs("div",{className:"jv-activity-time",children:[o.jsx("time",{dateTime:new Date(c.timestamp).toISOString(),title:`${Q0(c.timestamp)}.${String(c.timestamp%1e3).padStart(3,"0")}`,children:CT(c.timestamp)}),o.jsx("span",{className:"jv-activity-dot"})]}),a.kind==="chat"?o.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":x("activity.chatMessage",{id:a.record.id}),children:[o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"chat",id:a.record.id}),"aria-label":x("activity.viewMessage",{sequence:a.record.sequence,chat:a.record.chatTitle}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx(i7,{}),o.jsx("strong",{title:a.record.chatTitle,children:a.record.chatTitle}),o.jsxs("span",{children:["#",a.record.sequence]})]}),o.jsx("span",{className:"jv-activity-preview",children:a.record.preview||x("activity.attachmentOnly")}),a.record.attachmentCount>0&&o.jsxs("span",{className:"jv-activity-attachment",children:[o.jsx(y0,{}),x("activity.attachments",{count:a.record.attachmentCount})]})]}),a.record.source&&o.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>i({kind:"history",id:a.record.source.historyId}),"aria-label":x("activity.viewSentBy",{id:a.record.source.historyId}),children:[x("activity.sentBy",{id:a.record.source.historyId}),o.jsx(Np,{})]})]}):o.jsx("article",{className:"jv-activity-card jv-activity-history","aria-label":x("activity.historyRecord",{id:a.record.id}),children:o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"history",id:a.record.id}),"aria-label":x("activity.viewHistory",{id:a.record.id,role:a.record.role}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx("strong",{children:ix[a.record.role]?x(ix[a.record.role]):a.record.role}),o.jsxs("span",{children:["#",a.record.id]})]}),o.jsx("span",{className:"jv-activity-preview",children:kT(a.record)||x("activity.emptyMessage")})]})})]})]},`${a.kind}:${c.id}`)})})}const ET={read:(e,i)=>Te(`/bots/${e}/history/${i}`)};function TT(e,i){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const AT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MT={};function rx(e,i){return(MT.jsx?_T:AT).test(e)}const RT=/[ \t\n\f\r]/g;function OT(e){return typeof e=="object"?e.type==="text"?lx(e.value):!1:lx(e)}function lx(e){return e.replace(RT,"")===""}class Oc{constructor(i,a,l){this.normal=a,this.property=i,l&&(this.space=l)}}Oc.prototype.normal={};Oc.prototype.property={};Oc.prototype.space=void 0;function aw(e,i){const a={},l={};for(const c of e)Object.assign(a,c.property),Object.assign(l,c.normal);return new Oc(a,l,i)}function Yp(e){return e.toLowerCase()}class ui{constructor(i,a){this.attribute=a,this.property=i}}ui.prototype.attribute="";ui.prototype.booleanish=!1;ui.prototype.boolean=!1;ui.prototype.commaOrSpaceSeparated=!1;ui.prototype.commaSeparated=!1;ui.prototype.defined=!1;ui.prototype.mustUseProperty=!1;ui.prototype.number=!1;ui.prototype.overloadedBoolean=!1;ui.prototype.property="";ui.prototype.spaceSeparated=!1;ui.prototype.space=void 0;let zT=0;const Ye=ro(),nn=ro(),Xp=ro(),we=ro(),Nt=ro(),Gl=ro(),Ti=ro();function ro(){return 2**++zT}const Kp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:nn,commaOrSpaceSeparated:Ti,commaSeparated:Gl,number:we,overloadedBoolean:Xp,spaceSeparated:Nt},Symbol.toStringTag,{value:"Module"})),Xm=Object.keys(Kp);class Z0 extends ui{constructor(i,a,l,c){let u=-1;if(super(i,a),ox(this,"space",c),typeof l=="number")for(;++u<Xm.length;){const d=Xm[u];ox(this,Xm[u],(l&Kp[d])===Kp[d])}}}Z0.prototype.defined=!0;function ox(e,i,a){a&&(e[i]=a)}function fs(e){const i={},a={};for(const[l,c]of Object.entries(e.properties)){const u=new Z0(l,e.transform(e.attributes||{},l),c,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),i[l]=u,a[Yp(l)]=l,a[Yp(u.attribute)]=l}return new Oc(i,a,e.space)}const rw=fs({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:Nt,ariaCurrent:null,ariaDescribedBy:Nt,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Nt,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Nt,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nt,ariaLevel:we,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Nt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Nt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:nn,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function lw(e,i){return i in e?e[i]:i}function ow(e,i){return lw(e,i.toLowerCase())}const DT=fs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gl,acceptCharset:Nt,accessKey:Nt,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alpha:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:Nt,autoFocus:Ye,autoPlay:Ye,blocking:Nt,capture:null,charSet:null,checked:Ye,cite:null,className:Nt,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:nn,controls:Ye,controlsList:Nt,coords:we|Gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:Xp,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:Nt,height:we,hidden:Xp,high:we,href:null,hrefLang:null,htmlFor:Nt,httpEquiv:Nt,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:Nt,itemRef:Nt,itemScope:Ye,itemType:Nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:we,pattern:null,ping:Nt,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:Nt,required:Ye,reversed:Ye,rows:we,rowSpan:we,sandbox:Nt,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootCustomElementRegistry:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shadowRootSerializable:Ye,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:nn,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ye,disablePictureInPicture:Ye,disableRemotePlayback:Ye,exportParts:Gl,part:Nt,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:ow}),LT=fs({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:Ti,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:Nt,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:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:Gl,g2:Gl,glyphName:Gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:Ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ti,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ti,rev:Ti,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ti,requiredFeatures:Ti,requiredFonts:Ti,requiredFormats:Ti,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:Ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ti,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ti,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lw}),sw=fs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,i){return"xlink:"+i.slice(5).toLowerCase()}}),cw=fs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ow}),uw=fs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,i){return"xml:"+i.slice(3).toLowerCase()}}),BT={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"},IT=/[A-Z]/g,sx=/-[a-z]/g,HT=/^data[-\w.:]+$/i;function PT(e,i){const a=Yp(i);let l=i,c=ui;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&HT.test(i)){if(i.charAt(4)==="-"){const u=i.slice(5).replace(sx,qT);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=i.slice(4);if(!sx.test(u)){let d=u.replace(IT,UT);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}c=Z0}return new c(l,i)}function UT(e){return"-"+e.toLowerCase()}function qT(e){return e.charAt(1).toUpperCase()}const FT=aw([rw,DT,sw,cw,uw],"html"),J0=aw([rw,LT,sw,cw,uw],"svg");function VT(e){return e.join(" ").trim()}var Qo={},Km,cx;function $T(){if(cx)return Km;cx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
505
|
-
`,v="/",y="*",p="",b="comment",j="declaration";function S(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var M=1,T=1;function _(Y){var H=Y.match(i);H&&(M+=H.length);var K=Y.lastIndexOf(m);T=~K?Y.length-K:T+Y.length}function D(){var Y={line:M,column:T};return function(H){return H.position=new A(Y),$(),H}}function A(Y){this.start=Y,this.end={line:M,column:T},this.source=E.source}A.prototype.content=C;function I(Y){var H=new Error(E.source+":"+M+":"+T+": "+Y);if(H.reason=Y,H.filename=E.source,H.line=M,H.column=T,H.source=C,!E.silent)throw H}function U(Y){var H=Y.exec(C);if(H){var K=H[0];return _(K),C=C.slice(K.length),H}}function $(){U(a)}function O(Y){var H;for(Y=Y||[];H=V();)H!==!1&&Y.push(H);return Y}function V(){var Y=D();if(!(v!=C.charAt(0)||y!=C.charAt(1))){for(var H=2;p!=C.charAt(H)&&(y!=C.charAt(H)||v!=C.charAt(H+1));)++H;if(H+=2,p===C.charAt(H-1))return I("End of comment missing");var K=C.slice(2,H-2);return T+=2,_(K),C=C.slice(H),T+=2,Y({type:b,comment:K})}}function q(){var Y=D(),H=U(l);if(H){if(V(),!U(c))return I("property missing ':'");var K=U(u),R=Y({type:j,property:k(H[0].replace(e,p)),value:K?k(K[0].replace(e,p)):p});return U(d),R}}function ee(){var Y=[];O(Y);for(var H;H=q();)H!==!1&&(Y.push(H),O(Y));return Y}return $(),ee()}function k(C){return C?C.replace(f,p):p}return Km=S,Km}var ux;function GT(){if(ux)return Qo;ux=1;var e=Qo&&Qo.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=a;const i=e($T());function a(l,c){let u=null;if(!l||typeof l!="string")return u;const d=(0,i.default)(l),f=typeof c=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;f?c(v,y,m):y&&(u=u||{},u[v]=y)}),u}return Qo}var sc={},dx;function YT(){if(dx)return sc;dx=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,u=function(v){return!v||a.test(v)||e.test(v)},d=function(v,y){return y.toUpperCase()},f=function(v,y){return"".concat(y,"-")},m=function(v,y){return y===void 0&&(y={}),u(v)?v:(v=v.toLowerCase(),y.reactCompat?v=v.replace(c,f):v=v.replace(l,f),v.replace(i,d))};return sc.camelCase=m,sc}var cc,fx;function XT(){if(fx)return cc;fx=1;var e=cc&&cc.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},i=e(GT()),a=YT();function l(c,u){var d={};return!c||typeof c!="string"||(0,i.default)(c,function(f,m){f&&m&&(d[(0,a.camelCase)(f,u)]=m)}),d}return l.default=l,cc=l,cc}var KT=XT();const QT=u0(KT),dw=fw("end"),W0=fw("start");function fw(e){return i;function i(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function ZT(e){const i=W0(e),a=dw(e);if(i&&a)return{start:i,end:a}}function hc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hx(e.position):"start"in e||"end"in e?hx(e):"line"in e||"column"in e?Qp(e):""}function Qp(e){return mx(e&&e.line)+":"+mx(e&&e.column)}function hx(e){return Qp(e&&e.start)+"-"+Qp(e&&e.end)}function mx(e){return e&&typeof e=="number"?e:1}class Hn extends Error{constructor(i,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let c="",u={},d=!1;if(a&&("line"in a&&"column"in a?u={place:a}:"start"in a&&"end"in a?u={place:a}:"type"in a?u={ancestors:[a],place:a.position}:u={...a}),typeof i=="string"?c=i:!u.cause&&i&&(d=!0,c=i.message,u.cause=i),!u.ruleId&&!u.source&&typeof l=="string"){const m=l.indexOf(":");m===-1?u.ruleId=l:(u.source=l.slice(0,m),u.ruleId=l.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=f?f.line:void 0,this.name=hc(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}}Hn.prototype.file="";Hn.prototype.name="";Hn.prototype.reason="";Hn.prototype.message="";Hn.prototype.stack="";Hn.prototype.column=void 0;Hn.prototype.line=void 0;Hn.prototype.ancestors=void 0;Hn.prototype.cause=void 0;Hn.prototype.fatal=void 0;Hn.prototype.place=void 0;Hn.prototype.ruleId=void 0;Hn.prototype.source=void 0;const eg={}.hasOwnProperty,JT=new Map,WT=/[A-Z]/g,eA=new Set(["table","tbody","thead","tfoot","tr"]),tA=new Set(["td","th"]),hw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nA(e,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=i.filePath||void 0;let l;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=uA(a,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=cA(a,i.jsx,i.jsxs)}const c={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:l,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?J0:FT,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},u=mw(c,e,void 0);return u&&typeof u!="string"?u:c.create(e,c.Fragment,{children:u||void 0},void 0)}function mw(e,i,a){if(i.type==="element")return iA(e,i,a);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return aA(e,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return lA(e,i,a);if(i.type==="mdxjsEsm")return rA(e,i);if(i.type==="root")return oA(e,i,a);if(i.type==="text")return sA(e,i)}function iA(e,i,a){const l=e.schema;let c=l;i.tagName.toLowerCase()==="svg"&&l.space==="html"&&(c=J0,e.schema=c),e.ancestors.push(i);const u=gw(e,i.tagName,!1),d=dA(e,i);let f=ng(e,i);return eA.has(i.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!OT(m):!0})),pw(e,d,u,i),tg(d,f),e.ancestors.pop(),e.schema=l,e.create(i,u,d,a)}function aA(e,i){if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Sc(e,i.position)}function rA(e,i){if(i.data&&i.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(i.data.estree);Sc(e,i.position)}function lA(e,i,a){const l=e.schema;let c=l;i.name==="svg"&&l.space==="html"&&(c=J0,e.schema=c),e.ancestors.push(i);const u=i.name===null?e.Fragment:gw(e,i.name,!0),d=fA(e,i),f=ng(e,i);return pw(e,d,u,i),tg(d,f),e.ancestors.pop(),e.schema=l,e.create(i,u,d,a)}function oA(e,i,a){const l={};return tg(l,ng(e,i)),e.create(i,e.Fragment,l,a)}function sA(e,i){return i.value}function pw(e,i,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(i.node=l)}function tg(e,i){if(i.length>0){const a=i.length>1?i:i[0];a&&(e.children=a)}}function cA(e,i,a){return l;function l(c,u,d,f){const v=Array.isArray(d.children)?a:i;return f?v(u,d,f):v(u,d)}}function uA(e,i){return a;function a(l,c,u,d){const f=Array.isArray(u.children),m=W0(l);return i(c,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function dA(e,i){const a={};let l,c;for(c in i.properties)if(c!=="children"&&eg.call(i.properties,c)){const u=hA(e,c,i.properties[c]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&tA.has(i.tagName)?l=f:a[d]=f}}if(l){const u=a.style||(a.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function fA(e,i){const a={};for(const l of i.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const d=u.expression;d.type;const f=d.properties[0];f.type,Object.assign(a,e.evaluater.evaluateExpression(f.argument))}else Sc(e,i.position);else{const c=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Sc(e,i.position);else u=l.value===null?!0:l.value;a[c]=u}return a}function ng(e,i){const a=[];let l=-1;const c=e.passKeys?new Map:JT;for(;++l<i.children.length;){const u=i.children[l];let d;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const v=c.get(m)||0;d=m+"-"+v,c.set(m,v+1)}}const f=mw(e,u,d);f!==void 0&&a.push(f)}return a}function hA(e,i,a){const l=PT(e.schema,i);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?TT(a):VT(a)),l.property==="style"){let c=typeof a=="object"?a:mA(e,String(a));return e.stylePropertyNameCase==="css"&&(c=pA(c)),["style",c]}return[e.elementAttributeNameCase==="react"&&l.space?BT[l.property]||l.property:l.attribute,a]}}function mA(e,i){try{return QT(i,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,c=new Hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=e.filePath||void 0,c.url=hw+"#cannot-parse-style-attribute",c}}function gw(e,i,a){let l;if(!a)l={type:"Literal",value:i};else if(i.includes(".")){const c=i.split(".");let u=-1,d;for(;++u<c.length;){const f=rx(c[u])?{type:"Identifier",name:c[u]}:{type:"Literal",value:c[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=d}else l=rx(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(l.type==="Literal"){const c=l.value;return eg.call(e.components,c)?e.components[c]:c}if(e.evaluater)return e.evaluater.evaluateExpression(l);Sc(e)}function Sc(e,i){const a=new Hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=hw+"#cannot-handle-mdx-estrees-without-createevaluater",a}function pA(e){const i={};let a;for(a in e)eg.call(e,a)&&(i[gA(a)]=e[a]);return i}function gA(e){let i=e.replace(WT,vA);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function vA(e){return"-"+e.toLowerCase()}const Qm={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"]},yA={};function ig(e,i){const a=yA,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,c=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return vw(e,l,c)}function vw(e,i,a){if(xA(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(i&&"alt"in e&&e.alt)return e.alt;if("children"in e)return px(e.children,i,a)}return Array.isArray(e)?px(e,i,a):""}function px(e,i,a){const l=[];let c=-1;for(;++c<e.length;)l[c]=vw(e[c],i,a);return l.join("")}function xA(e){return!!(e&&typeof e=="object")}const gx=document.createElement("i");function ag(e){const i="&"+e+";";gx.innerHTML=i;const a=gx.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===i?!1:a}function _i(e,i,a,l){const c=e.length;let u=0,d;if(i<0?i=-i>c?0:c+i:i=i>c?c:i,a=a>0?a:0,l.length<1e4)d=Array.from(l),d.unshift(i,a),e.splice(...d);else for(a&&e.splice(i,a);u<l.length;)d=l.slice(u,u+1e4),d.unshift(i,0),e.splice(...d),u+=1e4,i+=1e4}function qi(e,i){return e.length>0?(_i(e,e.length,0,i),e):i}const vx={}.hasOwnProperty;function yw(e){const i={};let a=-1;for(;++a<e.length;)bA(i,e[a]);return i}function bA(e,i){let a;for(a in i){const c=(vx.call(e,a)?e[a]:void 0)||(e[a]={}),u=i[a];let d;if(u)for(d in u){vx.call(c,d)||(c[d]=[]);const f=u[d];jA(c[d],Array.isArray(f)?f:f?[f]:[])}}}function jA(e,i){let a=-1;const l=[];for(;++a<i.length;)(i[a].add==="after"?e:l).push(i[a]);_i(e,0,0,l)}function xw(e,i){const a=Number.parseInt(e,i);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=ll(/[A-Za-z]/),In=ll(/[\dA-Za-z]/),wA=ll(/[#-'*+\--9=?A-Z^-~]/);function Dd(e){return e!==null&&(e<32||e===127)}const Zp=ll(/\d/),SA=ll(/[\dA-Fa-f]/),kA=ll(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const af=ll(new RegExp("\\p{P}|\\p{S}","u")),Zl=ll(/\s/);function ll(e){return i;function i(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function hs(e){const i=[];let a=-1,l=0,c=0;for(;++a<e.length;){const u=e.charCodeAt(a);let d="";if(u===37&&In(e.charCodeAt(a+1))&&In(e.charCodeAt(a+2)))c=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(d=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(a+1);u<56320&&f>56319&&f<57344?(d=String.fromCharCode(u,f),c=1):d="�"}else d=String.fromCharCode(u);d&&(i.push(e.slice(l,a),encodeURIComponent(d)),l=a+c+1,d=""),c&&(a+=c,c=0)}return i.join("")+e.slice(l)}function ht(e,i,a,l){const c=l?l-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return it(m)?(e.enter(a),f(m)):i(m)}function f(m){return it(m)&&u++<c?(e.consume(m),f):(e.exit(a),i(m))}}const CA={tokenize:NA};function NA(e){const i=e.attempt(this.parser.constructs.contentInitial,l,c);let a;return i;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ht(e,i,"linePrefix")}function c(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=m),a=m,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ue(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const EA={tokenize:TA},yx={tokenize:AA};function TA(e){const i=this,a=[];let l=0,c,u,d;return f;function f(T){if(l<a.length){const _=a[l];return i.containerState=_[1],e.attempt(_[0].continuation,m,v)(T)}return v(T)}function m(T){if(l++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,c&&M();const _=i.events.length;let D=_,A;for(;D--;)if(i.events[D][0]==="exit"&&i.events[D][1].type==="chunkFlow"){A=i.events[D][1].end;break}E(l);let I=_;for(;I<i.events.length;)i.events[I][1].end={...A},I++;return _i(i.events,D+1,0,i.events.slice(_)),i.events.length=I,v(T)}return f(T)}function v(T){if(l===a.length){if(!c)return b(T);if(c.currentConstruct&&c.currentConstruct.concrete)return S(T);i.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(yx,y,p)(T)}function y(T){return c&&M(),E(l),b(T)}function p(T){return i.parser.lazy[i.now().line]=l!==a.length,d=i.now().offset,S(T)}function b(T){return i.containerState={},e.attempt(yx,j,S)(T)}function j(T){return l++,a.push([i.currentConstruct,i.containerState]),b(T)}function S(T){if(T===null){c&&M(),E(0),e.consume(T);return}return c=c||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return Ue(T)?(e.consume(T),C(e.exit("chunkFlow")),l=0,i.interrupt=void 0,f):(e.consume(T),k)}function C(T,_){const D=i.sliceStream(T);if(_&&D.push(null),T.previous=u,u&&(u.next=T),u=T,c.defineSkip(T.start),c.write(D),i.parser.lazy[T.start.line]){let A=c.events.length;for(;A--;)if(c.events[A][1].start.offset<d&&(!c.events[A][1].end||c.events[A][1].end.offset>d))return;const I=i.events.length;let U=I,$,O;for(;U--;)if(i.events[U][0]==="exit"&&i.events[U][1].type==="chunkFlow"){if($){O=i.events[U][1].end;break}$=!0}for(E(l),A=I;A<i.events.length;)i.events[A][1].end={...O},A++;_i(i.events,U+1,0,i.events.slice(I)),i.events.length=A}}function E(T){let _=a.length;for(;_-- >T;){const D=a[_];i.containerState=D[1],D[0].exit.call(i,e)}a.length=T}function M(){c.write([null]),u=void 0,c=void 0,i.containerState._closeFlow=void 0}}function AA(e,i,a){return ht(e,e.attempt(this.parser.constructs.document,i,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function as(e){if(e===null||Et(e)||Zl(e))return 1;if(af(e))return 2}function rf(e,i,a){const l=[];let c=-1;for(;++c<e.length;){const u=e[c].resolveAll;u&&!l.includes(u)&&(i=u(i,a),l.push(u))}return i}const Jp={name:"attention",resolveAll:_A,tokenize:MA};function _A(e,i){let a=-1,l,c,u,d,f,m,v,y;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&i.sliceSerialize(e[l][1]).charCodeAt(0)===i.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;m=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const p={...e[l][1].end},b={...e[a][1].start};xx(p,-m),xx(b,m),d={type:m>1?"strongSequence":"emphasisSequence",start:p,end:{...e[l][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:b},u={type:m>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},c={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[l][1].end={...d.start},e[a][1].start={...f.end},v=[],e[l][1].end.offset-e[l][1].start.offset&&(v=qi(v,[["enter",e[l][1],i],["exit",e[l][1],i]])),v=qi(v,[["enter",c,i],["enter",d,i],["exit",d,i],["enter",u,i]]),v=qi(v,rf(i.parser.constructs.insideSpan.null,e.slice(l+1,a),i)),v=qi(v,[["exit",u,i],["enter",f,i],["exit",f,i],["exit",c,i]]),e[a][1].end.offset-e[a][1].start.offset?(y=2,v=qi(v,[["enter",e[a][1],i],["exit",e[a][1],i]])):y=0,_i(e,l-1,a-l+3,v),a=l+v.length-y-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function MA(e,i){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,c=as(l);let u;return d;function d(m){return u=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===u)return e.consume(m),f;const v=e.exit("attentionSequence"),y=as(m),p=!y||y===2&&c||a.includes(m),b=!c||c===2&&y||a.includes(l);return v._open=!!(u===42?p:p&&(c||!b)),v._close=!!(u===42?b:b&&(y||!p)),i(m)}}function xx(e,i){e.column+=i,e.offset+=i,e._bufferIndex+=i}const RA={name:"autolink",tokenize:OA};function OA(e,i,a){let l=0;return c;function c(j){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(j){return Xn(j)?(e.consume(j),d):j===64?a(j):v(j)}function d(j){return j===43||j===45||j===46||In(j)?(l=1,f(j)):v(j)}function f(j){return j===58?(e.consume(j),l=0,m):(j===43||j===45||j===46||In(j))&&l++<32?(e.consume(j),f):(l=0,v(j))}function m(j){return j===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),i):j===null||j===32||j===60||Dd(j)?a(j):(e.consume(j),m)}function v(j){return j===64?(e.consume(j),y):wA(j)?(e.consume(j),v):a(j)}function y(j){return In(j)?p(j):a(j)}function p(j){return j===46?(e.consume(j),l=0,y):j===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),i):b(j)}function b(j){if((j===45||In(j))&&l++<63){const S=j===45?b:p;return e.consume(j),S}return a(j)}}const zc={partial:!0,tokenize:zA};function zA(e,i,a){return l;function l(u){return it(u)?ht(e,c,"linePrefix")(u):c(u)}function c(u){return u===null||Ue(u)?i(u):a(u)}}const bw={continuation:{tokenize:LA},exit:BA,name:"blockQuote",tokenize:DA};function DA(e,i,a){const l=this;return c;function c(d){if(d===62){const f=l.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 a(d)}function u(d){return it(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),i):(e.exit("blockQuotePrefix"),i(d))}}function LA(e,i,a){const l=this;return c;function c(d){return it(d)?ht(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(bw,i,a)(d)}}function BA(e){e.exit("blockQuote")}const jw={name:"characterEscape",tokenize:IA};function IA(e,i,a){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),c}function c(u){return kA(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),i):a(u)}}const ww={name:"characterReference",tokenize:HA};function HA(e,i,a){const l=this;let c=0,u,d;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),m}function m(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),v):(e.enter("characterReferenceValue"),u=31,d=In,y(p))}function v(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=SA,y):(e.enter("characterReferenceValue"),u=7,d=Zp,y(p))}function y(p){if(p===59&&c){const b=e.exit("characterReferenceValue");return d===In&&!ag(l.sliceSerialize(b))?a(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),i)}return d(p)&&c++<u?(e.consume(p),y):a(p)}}const bx={partial:!0,tokenize:UA},jx={concrete:!0,name:"codeFenced",tokenize:PA};function PA(e,i,a){const l=this,c={partial:!0,tokenize:D};let u=0,d=0,f;return m;function m(A){return v(A)}function v(A){const I=l.events[l.events.length-1];return u=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(A)}function y(A){return A===f?(d++,e.consume(A),y):d<3?a(A):(e.exit("codeFencedFenceSequence"),it(A)?ht(e,p,"whitespace")(A):p(A))}function p(A){return A===null||Ue(A)?(e.exit("codeFencedFence"),l.interrupt?i(A):e.check(bx,k,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):it(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ht(e,j,"whitespace")(A)):A===96&&A===f?a(A):(e.consume(A),b)}function j(A){return A===null||Ue(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===f?a(A):(e.consume(A),S)}function k(A){return e.attempt(c,_,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return u>0&&it(A)?ht(e,M,"linePrefix",u+1)(A):M(A)}function M(A){return A===null||Ue(A)?e.check(bx,k,_)(A):(e.enter("codeFlowValue"),T(A))}function T(A){return A===null||Ue(A)?(e.exit("codeFlowValue"),M(A)):(e.consume(A),T)}function _(A){return e.exit("codeFenced"),i(A)}function D(A,I,U){let $=0;return O;function O(H){return A.enter("lineEnding"),A.consume(H),A.exit("lineEnding"),V}function V(H){return A.enter("codeFencedFence"),it(H)?ht(A,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):q(H)}function q(H){return H===f?(A.enter("codeFencedFenceSequence"),ee(H)):U(H)}function ee(H){return H===f?($++,A.consume(H),ee):$>=d?(A.exit("codeFencedFenceSequence"),it(H)?ht(A,Y,"whitespace")(H):Y(H)):U(H)}function Y(H){return H===null||Ue(H)?(A.exit("codeFencedFence"),I(H)):U(H)}}}function UA(e,i,a){const l=this;return c;function c(d){return d===null?a(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u)}function u(d){return l.parser.lazy[l.now().line]?a(d):i(d)}}const Zm={name:"codeIndented",tokenize:FA},qA={partial:!0,tokenize:VA};function FA(e,i,a){const l=this;return c;function c(v){return e.enter("codeIndented"),ht(e,u,"linePrefix",5)(v)}function u(v){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(v):a(v)}function d(v){return v===null?m(v):Ue(v)?e.attempt(qA,d,m)(v):(e.enter("codeFlowValue"),f(v))}function f(v){return v===null||Ue(v)?(e.exit("codeFlowValue"),d(v)):(e.consume(v),f)}function m(v){return e.exit("codeIndented"),i(v)}}function VA(e,i,a){const l=this;return c;function c(d){return l.parser.lazy[l.now().line]?a(d):Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):ht(e,u,"linePrefix",5)(d)}function u(d){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):Ue(d)?c(d):a(d)}}const $A={name:"codeText",previous:YA,resolve:GA,tokenize:XA};function GA(e){let i=e.length-4,a=3,l,c;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[i][1].type==="lineEnding"||e[i][1].type==="space")){for(l=a;++l<i;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[i][1].type="codeTextPadding",a+=2,i-=2;break}}for(l=a-1,i++;++l<=i;)c===void 0?l!==i&&e[l][1].type!=="lineEnding"&&(c=l):(l===i||e[l][1].type==="lineEnding")&&(e[c][1].type="codeTextData",l!==c+2&&(e[c][1].end=e[l-1][1].end,e.splice(c+2,l-c-2),i-=l-c-2,l=c+2),c=void 0);return e}function YA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XA(e,i,a){let l=0,c,u;return d;function d(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),l++,f):(e.exit("codeTextSequence"),m(p))}function m(p){return p===null?a(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),m):p===96?(u=e.enter("codeTextSequence"),c=0,y(p)):Ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("codeTextData"),v(p))}function v(p){return p===null||p===32||p===96||Ue(p)?(e.exit("codeTextData"),m(p)):(e.consume(p),v)}function y(p){return p===96?(e.consume(p),c++,y):c===l?(e.exit("codeTextSequence"),e.exit("codeText"),i(p)):(u.type="codeTextData",v(p))}}class KA{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,a){const l=a??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(i,l):i>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(i,a,l){const c=a||0;this.setCursor(Math.trunc(i));const u=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return l&&uc(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),uc(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),uc(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const a=this.left.splice(i,Number.POSITIVE_INFINITY);uc(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);uc(this.left,a.reverse())}}}function uc(e,i){let a=0;if(i.length<1e4)e.push(...i);else for(;a<i.length;)e.push(...i.slice(a,a+1e4)),a+=1e4}function Sw(e){const i={};let a=-1,l,c,u,d,f,m,v;const y=new KA(e);for(;++a<y.length;){for(;a in i;)a=i[a];if(l=y.get(a),a&&l[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(m=l[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(l[0]==="enter")l[1].contentType&&(Object.assign(i,QA(y,a)),a=i[a],v=!0);else if(l[1]._container){for(u=a,c=void 0;u--;)if(d=y.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(c&&(y.get(c)[1].type="lineEndingBlank"),d[1].type="lineEnding",c=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;c&&(l[1].end={...y.get(c)[1].start},f=y.slice(c,a),f.unshift(l),y.splice(c,a-c+1,f))}}return _i(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function QA(e,i){const a=e.get(i)[1],l=e.get(i)[2];let c=i-1;const u=[];let d=a._tokenizer;d||(d=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],v={};let y,p,b=-1,j=a,S=0,k=0;const C=[k];for(;j;){for(;e.get(++c)[1]!==j;);u.push(c),j._tokenizer||(y=l.sliceStream(j),j.next||y.push(null),p&&d.defineSkip(j.start),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),p=j,j=j.next}for(j=a;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(k=b+1,C.push(k),j._tokenizer=void 0,j.previous=void 0,j=j.next);for(d.events=[],j?(j._tokenizer=void 0,j.previous=void 0):C.pop(),b=C.length;b--;){const E=f.slice(C[b],C[b+1]),M=u.pop();m.push([M,M+E.length-1]),e.splice(M,2,E)}for(m.reverse(),b=-1;++b<m.length;)v[S+m[b][0]]=S+m[b][1],S+=m[b][1]-m[b][0]-1;return v}const ZA={resolve:WA,tokenize:e_},JA={partial:!0,tokenize:t_};function WA(e){return Sw(e),e}function e_(e,i){let a;return l;function l(f){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),c(f)}function c(f){return f===null?u(f):Ue(f)?e.check(JA,d,u)(f):(e.consume(f),c)}function u(f){return e.exit("chunkContent"),e.exit("content"),i(f)}function d(f){return e.consume(f),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,c}}function t_(e,i,a){const l=this;return c;function c(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ht(e,u,"linePrefix")}function u(d){if(d===null||Ue(d))return a(d);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):e.interrupt(l.parser.constructs.flow,a,i)(d)}}function kw(e,i,a,l,c,u,d,f,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return p;function p(E){return E===60?(e.enter(l),e.enter(c),e.enter(u),e.consume(E),e.exit(u),b):E===null||E===32||E===41||Dd(E)?a(E):(e.enter(l),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function b(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(c),e.exit(l),i):(e.enter(f),e.enter("chunkString",{contentType:"string"}),j(E))}function j(E){return E===62?(e.exit("chunkString"),e.exit(f),b(E)):E===null||E===60||Ue(E)?a(E):(e.consume(E),E===92?S:j)}function S(E){return E===60||E===62||E===92?(e.consume(E),j):j(E)}function k(E){return!y&&(E===null||E===41||Et(E))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(l),i(E)):y<v&&E===40?(e.consume(E),y++,k):E===41?(e.consume(E),y--,k):E===null||E===32||E===40||Dd(E)?a(E):(e.consume(E),E===92?C:k)}function C(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function Cw(e,i,a,l,c,u){const d=this;let f=0,m;return v;function v(j){return e.enter(l),e.enter(c),e.consume(j),e.exit(c),e.enter(u),y}function y(j){return f>999||j===null||j===91||j===93&&!m||j===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?a(j):j===93?(e.exit(u),e.enter(c),e.consume(j),e.exit(c),e.exit(l),i):Ue(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),p(j))}function p(j){return j===null||j===91||j===93||Ue(j)||f++>999?(e.exit("chunkString"),y(j)):(e.consume(j),m||(m=!it(j)),j===92?b:p)}function b(j){return j===91||j===92||j===93?(e.consume(j),f++,p):p(j)}}function Nw(e,i,a,l,c,u){let d;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(c),e.consume(b),e.exit(c),d=b===40?41:b,m):a(b)}function m(b){return b===d?(e.enter(c),e.consume(b),e.exit(c),e.exit(l),i):(e.enter(u),v(b))}function v(b){return b===d?(e.exit(u),m(d)):b===null?a(b):Ue(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),ht(e,v,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===d||b===null||Ue(b)?(e.exit("chunkString"),v(b)):(e.consume(b),b===92?p:y)}function p(b){return b===d||b===92?(e.consume(b),y):y(b)}}function mc(e,i){let a;return l;function l(c){return Ue(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a=!0,l):it(c)?ht(e,l,a?"linePrefix":"lineSuffix")(c):i(c)}}const n_={name:"definition",tokenize:a_},i_={partial:!0,tokenize:r_};function a_(e,i,a){const l=this;let c;return u;function u(j){return e.enter("definition"),d(j)}function d(j){return Cw.call(l,e,f,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(j)}function f(j){return c=ra(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),j===58?(e.enter("definitionMarker"),e.consume(j),e.exit("definitionMarker"),m):a(j)}function m(j){return Et(j)?mc(e,v)(j):v(j)}function v(j){return kw(e,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(j)}function y(j){return e.attempt(i_,p,p)(j)}function p(j){return it(j)?ht(e,b,"whitespace")(j):b(j)}function b(j){return j===null||Ue(j)?(e.exit("definition"),l.parser.defined.push(c),i(j)):a(j)}}function r_(e,i,a){return l;function l(f){return Et(f)?mc(e,c)(f):a(f)}function c(f){return Nw(e,u,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return it(f)?ht(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Ue(f)?i(f):a(f)}}const l_={name:"hardBreakEscape",tokenize:o_};function o_(e,i,a){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),c}function c(u){return Ue(u)?(e.exit("hardBreakEscape"),i(u)):a(u)}}const s_={name:"headingAtx",resolve:c_,tokenize:u_};function c_(e,i){let a=e.length-2,l=3,c,u;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(c={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},u={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},_i(e,l,a-l+1,[["enter",c,i],["enter",u,i],["exit",u,i],["exit",c,i]])),e}function u_(e,i,a){let l=0;return c;function c(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&l++<6?(e.consume(y),d):y===null||Et(y)?(e.exit("atxHeadingSequence"),f(y)):a(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||Ue(y)?(e.exit("atxHeading"),i(y)):it(y)?ht(e,f,"whitespace")(y):(e.enter("atxHeadingText"),v(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function v(y){return y===null||y===35||Et(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),v)}}const d_=["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"],wx=["pre","script","style","textarea"],f_={concrete:!0,name:"htmlFlow",resolveTo:p_,tokenize:g_},h_={partial:!0,tokenize:y_},m_={partial:!0,tokenize:v_};function p_(e){let i=e.length;for(;i--&&!(e[i][0]==="enter"&&e[i][1].type==="htmlFlow"););return i>1&&e[i-2][1].type==="linePrefix"&&(e[i][1].start=e[i-2][1].start,e[i+1][1].start=e[i-2][1].start,e.splice(i-2,2)),e}function g_(e,i,a){const l=this;let c,u,d,f,m;return v;function v(P){return y(P)}function y(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),u=!0,k):P===63?(e.consume(P),c=3,l.interrupt?i:L):Xn(P)?(e.consume(P),d=String.fromCharCode(P),C):a(P)}function b(P){return P===45?(e.consume(P),c=2,j):P===91?(e.consume(P),c=5,f=0,S):Xn(P)?(e.consume(P),c=4,l.interrupt?i:L):a(P)}function j(P){return P===45?(e.consume(P),l.interrupt?i:L):a(P)}function S(P){const G="CDATA[";return P===G.charCodeAt(f++)?(e.consume(P),f===G.length?l.interrupt?i:q:S):a(P)}function k(P){return Xn(P)?(e.consume(P),d=String.fromCharCode(P),C):a(P)}function C(P){if(P===null||P===47||P===62||Et(P)){const G=P===47,fe=d.toLowerCase();return!G&&!u&&wx.includes(fe)?(c=1,l.interrupt?i(P):q(P)):d_.includes(d.toLowerCase())?(c=6,G?(e.consume(P),E):l.interrupt?i(P):q(P)):(c=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(P):u?M(P):T(P))}return P===45||In(P)?(e.consume(P),d+=String.fromCharCode(P),C):a(P)}function E(P){return P===62?(e.consume(P),l.interrupt?i:q):a(P)}function M(P){return it(P)?(e.consume(P),M):O(P)}function T(P){return P===47?(e.consume(P),O):P===58||P===95||Xn(P)?(e.consume(P),_):it(P)?(e.consume(P),T):O(P)}function _(P){return P===45||P===46||P===58||P===95||In(P)?(e.consume(P),_):D(P)}function D(P){return P===61?(e.consume(P),A):it(P)?(e.consume(P),D):T(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?a(P):P===34||P===39?(e.consume(P),m=P,I):it(P)?(e.consume(P),A):U(P)}function I(P){return P===m?(e.consume(P),m=null,$):P===null||Ue(P)?a(P):(e.consume(P),I)}function U(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Et(P)?D(P):(e.consume(P),U)}function $(P){return P===47||P===62||it(P)?T(P):a(P)}function O(P){return P===62?(e.consume(P),V):a(P)}function V(P){return P===null||Ue(P)?q(P):it(P)?(e.consume(P),V):a(P)}function q(P){return P===45&&c===2?(e.consume(P),K):P===60&&c===1?(e.consume(P),R):P===62&&c===4?(e.consume(P),J):P===63&&c===3?(e.consume(P),L):P===93&&c===5?(e.consume(P),ne):Ue(P)&&(c===6||c===7)?(e.exit("htmlFlowData"),e.check(h_,W,ee)(P)):P===null||Ue(P)?(e.exit("htmlFlowData"),ee(P)):(e.consume(P),q)}function ee(P){return e.check(m_,Y,W)(P)}function Y(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),H}function H(P){return P===null||Ue(P)?ee(P):(e.enter("htmlFlowData"),q(P))}function K(P){return P===45?(e.consume(P),L):q(P)}function R(P){return P===47?(e.consume(P),d="",F):q(P)}function F(P){if(P===62){const G=d.toLowerCase();return wx.includes(G)?(e.consume(P),J):q(P)}return Xn(P)&&d.length<8?(e.consume(P),d+=String.fromCharCode(P),F):q(P)}function ne(P){return P===93?(e.consume(P),L):q(P)}function L(P){return P===62?(e.consume(P),J):P===45&&c===2?(e.consume(P),L):q(P)}function J(P){return P===null||Ue(P)?(e.exit("htmlFlowData"),W(P)):(e.consume(P),J)}function W(P){return e.exit("htmlFlow"),i(P)}}function v_(e,i,a){const l=this;return c;function c(d){return Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):a(d)}function u(d){return l.parser.lazy[l.now().line]?a(d):i(d)}}function y_(e,i,a){return l;function l(c){return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),e.attempt(zc,i,a)}}const x_={name:"htmlText",tokenize:b_};function b_(e,i,a){const l=this;let c,u,d;return f;function f(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),v):L===47?(e.consume(L),D):L===63?(e.consume(L),T):Xn(L)?(e.consume(L),U):a(L)}function v(L){return L===45?(e.consume(L),y):L===91?(e.consume(L),u=0,S):Xn(L)?(e.consume(L),M):a(L)}function y(L){return L===45?(e.consume(L),j):a(L)}function p(L){return L===null?a(L):L===45?(e.consume(L),b):Ue(L)?(d=p,R(L)):(e.consume(L),p)}function b(L){return L===45?(e.consume(L),j):p(L)}function j(L){return L===62?K(L):L===45?b(L):p(L)}function S(L){const J="CDATA[";return L===J.charCodeAt(u++)?(e.consume(L),u===J.length?k:S):a(L)}function k(L){return L===null?a(L):L===93?(e.consume(L),C):Ue(L)?(d=k,R(L)):(e.consume(L),k)}function C(L){return L===93?(e.consume(L),E):k(L)}function E(L){return L===62?K(L):L===93?(e.consume(L),E):k(L)}function M(L){return L===null||L===62?K(L):Ue(L)?(d=M,R(L)):(e.consume(L),M)}function T(L){return L===null?a(L):L===63?(e.consume(L),_):Ue(L)?(d=T,R(L)):(e.consume(L),T)}function _(L){return L===62?K(L):T(L)}function D(L){return Xn(L)?(e.consume(L),A):a(L)}function A(L){return L===45||In(L)?(e.consume(L),A):I(L)}function I(L){return Ue(L)?(d=I,R(L)):it(L)?(e.consume(L),I):K(L)}function U(L){return L===45||In(L)?(e.consume(L),U):L===47||L===62||Et(L)?$(L):a(L)}function $(L){return L===47?(e.consume(L),K):L===58||L===95||Xn(L)?(e.consume(L),O):Ue(L)?(d=$,R(L)):it(L)?(e.consume(L),$):K(L)}function O(L){return L===45||L===46||L===58||L===95||In(L)?(e.consume(L),O):V(L)}function V(L){return L===61?(e.consume(L),q):Ue(L)?(d=V,R(L)):it(L)?(e.consume(L),V):$(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?a(L):L===34||L===39?(e.consume(L),c=L,ee):Ue(L)?(d=q,R(L)):it(L)?(e.consume(L),q):(e.consume(L),Y)}function ee(L){return L===c?(e.consume(L),c=void 0,H):L===null?a(L):Ue(L)?(d=ee,R(L)):(e.consume(L),ee)}function Y(L){return L===null||L===34||L===39||L===60||L===61||L===96?a(L):L===47||L===62||Et(L)?$(L):(e.consume(L),Y)}function H(L){return L===47||L===62||Et(L)?$(L):a(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),i):a(L)}function R(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),F}function F(L){return it(L)?ht(e,ne,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):ne(L)}function ne(L){return e.enter("htmlTextData"),d(L)}}const rg={name:"labelEnd",resolveAll:k_,resolveTo:C_,tokenize:N_},j_={tokenize:E_},w_={tokenize:T_},S_={tokenize:A_};function k_(e){let i=-1;const a=[];for(;++i<e.length;){const l=e[i][1];if(a.push(e[i]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const c=l.type==="labelImage"?4:2;l.type="data",i+=c}}return e.length!==a.length&&_i(e,0,e.length,a),e}function C_(e,i){let a=e.length,l=0,c,u,d,f;for(;a--;)if(c=e[a][1],u){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[a][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(d){if(e[a][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(u=a,c.type!=="labelLink")){l=2;break}}else c.type==="labelEnd"&&(d=a);const m={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},v={type:"label",start:{...e[u][1].start},end:{...e[d][1].end}},y={type:"labelText",start:{...e[u+l+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,i],["enter",v,i]],f=qi(f,e.slice(u+1,u+l+3)),f=qi(f,[["enter",y,i]]),f=qi(f,rf(i.parser.constructs.insideSpan.null,e.slice(u+l+4,d-3),i)),f=qi(f,[["exit",y,i],e[d-2],e[d-1],["exit",v,i]]),f=qi(f,e.slice(d+1)),f=qi(f,[["exit",m,i]]),_i(e,u,e.length,f),e}function N_(e,i,a){const l=this;let c=l.events.length,u,d;for(;c--;)if((l.events[c][1].type==="labelImage"||l.events[c][1].type==="labelLink")&&!l.events[c][1]._balanced){u=l.events[c][1];break}return f;function f(b){return u?u._inactive?p(b):(d=l.parser.defined.includes(ra(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),m):a(b)}function m(b){return b===40?e.attempt(j_,y,d?y:p)(b):b===91?e.attempt(w_,y,d?v:p)(b):d?y(b):p(b)}function v(b){return e.attempt(S_,y,p)(b)}function y(b){return i(b)}function p(b){return u._balanced=!0,a(b)}}function E_(e,i,a){return l;function l(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),c}function c(p){return Et(p)?mc(e,u)(p):u(p)}function u(p){return p===41?y(p):kw(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function d(p){return Et(p)?mc(e,m)(p):y(p)}function f(p){return a(p)}function m(p){return p===34||p===39||p===40?Nw(e,v,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):y(p)}function v(p){return Et(p)?mc(e,y)(p):y(p)}function y(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),i):a(p)}}function T_(e,i,a){const l=this;return c;function c(f){return Cw.call(l,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes(ra(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?i(f):a(f)}function d(f){return a(f)}}function A_(e,i,a){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),c}function c(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),i):a(u)}}const __={name:"labelStartImage",resolveAll:rg.resolveAll,tokenize:M_};function M_(e,i,a){const l=this;return c;function c(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):a(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(f):i(f)}}const R_={name:"labelStartLink",resolveAll:rg.resolveAll,tokenize:O_};function O_(e,i,a){const l=this;return c;function c(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),u}function u(d){return d===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(d):i(d)}}const Jm={name:"lineEnding",tokenize:z_};function z_(e,i){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ht(e,i,"linePrefix")}}const Cd={name:"thematicBreak",tokenize:D_};function D_(e,i,a){let l=0,c;return u;function u(v){return e.enter("thematicBreak"),d(v)}function d(v){return c=v,f(v)}function f(v){return v===c?(e.enter("thematicBreakSequence"),m(v)):l>=3&&(v===null||Ue(v))?(e.exit("thematicBreak"),i(v)):a(v)}function m(v){return v===c?(e.consume(v),l++,m):(e.exit("thematicBreakSequence"),it(v)?ht(e,f,"whitespace")(v):f(v))}}const si={continuation:{tokenize:H_},exit:U_,name:"list",tokenize:I_},L_={partial:!0,tokenize:q_},B_={partial:!0,tokenize:P_};function I_(e,i,a){const l=this,c=l.events[l.events.length-1];let u=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,d=0;return f;function f(j){const S=l.containerState.type||(j===42||j===43||j===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!l.containerState.marker||j===l.containerState.marker:Zp(j)){if(l.containerState.type||(l.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),j===42||j===45?e.check(Cd,a,v)(j):v(j);if(!l.interrupt||j===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(j)}return a(j)}function m(j){return Zp(j)&&++d<10?(e.consume(j),m):(!l.interrupt||d<2)&&(l.containerState.marker?j===l.containerState.marker:j===41||j===46)?(e.exit("listItemValue"),v(j)):a(j)}function v(j){return e.enter("listItemMarker"),e.consume(j),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||j,e.check(zc,l.interrupt?a:y,e.attempt(L_,b,p))}function y(j){return l.containerState.initialBlankLine=!0,u++,b(j)}function p(j){return it(j)?(e.enter("listItemPrefixWhitespace"),e.consume(j),e.exit("listItemPrefixWhitespace"),b):a(j)}function b(j){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,i(j)}}function H_(e,i,a){const l=this;return l.containerState._closeFlow=void 0,e.check(zc,c,u);function c(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,ht(e,i,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!it(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,d(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(B_,i,d)(f))}function d(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,ht(e,e.attempt(si,i,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function P_(e,i,a){const l=this;return ht(e,c,"listItemIndent",l.containerState.size+1);function c(u){const d=l.events[l.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===l.containerState.size?i(u):a(u)}}function U_(e){e.exit(this.containerState.type)}function q_(e,i,a){const l=this;return ht(e,c,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(u){const d=l.events[l.events.length-1];return!it(u)&&d&&d[1].type==="listItemPrefixWhitespace"?i(u):a(u)}}const Sx={name:"setextUnderline",resolveTo:F_,tokenize:V_};function F_(e,i){let a=e.length,l,c,u;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(c=a)}else e[a][1].type==="content"&&e.splice(a,1),!u&&e[a][1].type==="definition"&&(u=a);const d={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[c][1].type="setextHeadingText",u?(e.splice(c,0,["enter",d,i]),e.splice(u+1,0,["exit",e[l][1],i]),e[l][1].end={...e[u][1].end}):e[l][1]=d,e.push(["exit",d,i]),e}function V_(e,i,a){const l=this;let c;return u;function u(v){let y=l.events.length,p;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){p=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||p)?(e.enter("setextHeadingLine"),c=v,d(v)):a(v)}function d(v){return e.enter("setextHeadingLineSequence"),f(v)}function f(v){return v===c?(e.consume(v),f):(e.exit("setextHeadingLineSequence"),it(v)?ht(e,m,"lineSuffix")(v):m(v))}function m(v){return v===null||Ue(v)?(e.exit("setextHeadingLine"),i(v)):a(v)}}const $_={tokenize:G_};function G_(e){const i=this,a=e.attempt(zc,l,e.attempt(this.parser.constructs.flowInitial,c,ht(e,e.attempt(this.parser.constructs.flow,c,e.attempt(ZA,c)),"linePrefix")));return a;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),i.currentConstruct=void 0,a}function c(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i.currentConstruct=void 0,a}}const Y_={resolveAll:Tw()},X_=Ew("string"),K_=Ew("text");function Ew(e){return{resolveAll:Tw(e==="text"?Q_:void 0),tokenize:i};function i(a){const l=this,c=this.parser.constructs[e],u=a.attempt(c,d,f);return d;function d(y){return v(y)?u(y):f(y)}function f(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),m}function m(y){return v(y)?(a.exit("data"),u(y)):(a.consume(y),m)}function v(y){if(y===null)return!0;const p=c[y];let b=-1;if(p)for(;++b<p.length;){const j=p[b];if(!j.previous||j.previous.call(l,l.previous))return!0}return!1}}}function Tw(e){return i;function i(a,l){let c=-1,u;for(;++c<=a.length;)u===void 0?a[c]&&a[c][1].type==="data"&&(u=c,c++):(!a[c]||a[c][1].type!=="data")&&(c!==u+2&&(a[u][1].end=a[c-1][1].end,a.splice(u+2,c-u-2),c=u+2),u=void 0);return e?e(a,l):a}}function Q_(e,i){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const l=e[a-1][1],c=i.sliceStream(l);let u=c.length,d=-1,f=0,m;for(;u--;){const v=c[u];if(typeof v=="string"){for(d=v.length;v.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(v===-2)m=!0,f++;else if(v!==-1){u++;break}}if(i._contentTypeTextTrailing&&a===e.length&&(f=0),f){const v={type:a===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?d:l.start._bufferIndex+d,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...v.start},l.start.offset===l.end.offset?Object.assign(l,v):(e.splice(a,0,["enter",v,i],["exit",v,i]),a+=2)}a++}return e}const Z_={42:si,43:si,45:si,48:si,49:si,50:si,51:si,52:si,53:si,54:si,55:si,56:si,57:si,62:bw},J_={91:n_},W_={[-2]:Zm,[-1]:Zm,32:Zm},eM={35:s_,42:Cd,45:[Sx,Cd],60:f_,61:Sx,95:Cd,96:jx,126:jx},tM={38:ww,92:jw},nM={[-5]:Jm,[-4]:Jm,[-3]:Jm,33:__,38:ww,42:Jp,60:[RA,x_],91:R_,92:[l_,jw],93:rg,95:Jp,96:$A},iM={null:[Jp,Y_]},aM={null:[42,95]},rM={null:[]},lM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:aM,contentInitial:J_,disable:rM,document:Z_,flow:eM,flowInitial:W_,insideSpan:iM,string:tM,text:nM},Symbol.toStringTag,{value:"Module"}));function oM(e,i,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const c={},u=[];let d=[],f=[];const m={attempt:I(D),check:I(A),consume:M,enter:T,exit:_,interrupt:I(A,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:j,write:p};let y=i.tokenize.call(v,m);return i.resolveAll&&u.push(i),v;function p(V){return d=qi(d,V),C(),d[d.length-1]!==null?[]:(U(i,0),v.events=rf(u,v.events,v),v.events)}function b(V,q){return cM(j(V),q)}function j(V){return sM(d,V)}function S(){const{_bufferIndex:V,_index:q,line:ee,column:Y,offset:H}=l;return{_bufferIndex:V,_index:q,line:ee,column:Y,offset:H}}function k(V){c[V.line]=V.column,O()}function C(){let V;for(;l._index<d.length;){const q=d[l._index];if(typeof q=="string")for(V=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===V&&l._bufferIndex<q.length;)E(q.charCodeAt(l._bufferIndex));else E(q)}}function E(V){y=y(V)}function M(V){Ue(V)?(l.line++,l.column=1,l.offset+=V===-3?2:1,O()):V!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===d[l._index].length&&(l._bufferIndex=-1,l._index++)),v.previous=V}function T(V,q){const ee=q||{};return ee.type=V,ee.start=S(),v.events.push(["enter",ee,v]),f.push(ee),ee}function _(V){const q=f.pop();return q.end=S(),v.events.push(["exit",q,v]),q}function D(V,q){U(V,q.from)}function A(V,q){q.restore()}function I(V,q){return ee;function ee(Y,H,K){let R,F,ne,L;return Array.isArray(Y)?W(Y):"tokenize"in Y?W([Y]):J(Y);function J(ye){return je;function je(re){const xe=re!==null&&ye[re],oe=re!==null&&ye.null,ce=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return W(ce)(re)}}function W(ye){return R=ye,F=0,ye.length===0?K:P(ye[F])}function P(ye){return je;function je(re){return L=$(),ne=ye,ye.partial||(v.currentConstruct=ye),ye.name&&v.parser.constructs.disable.null.includes(ye.name)?fe():ye.tokenize.call(q?Object.assign(Object.create(v),q):v,m,G,fe)(re)}}function G(ye){return V(ne,L),H}function fe(ye){return L.restore(),++F<R.length?P(R[F]):K}}}function U(V,q){V.resolveAll&&!u.includes(V)&&u.push(V),V.resolve&&_i(v.events,q,v.events.length-q,V.resolve(v.events.slice(q),v)),V.resolveTo&&(v.events=V.resolveTo(v.events,v))}function $(){const V=S(),q=v.previous,ee=v.currentConstruct,Y=v.events.length,H=Array.from(f);return{from:Y,restore:K};function K(){l=V,v.previous=q,v.currentConstruct=ee,v.events.length=Y,f=H,O()}}function O(){l.line in c&&l.column<2&&(l.column=c[l.line],l.offset+=c[l.line]-1)}}function sM(e,i){const a=i.start._index,l=i.start._bufferIndex,c=i.end._index,u=i.end._bufferIndex;let d;if(a===c)d=[e[a].slice(l,u)];else{if(d=e.slice(a,c),l>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(l):d.shift()}u>0&&d.push(e[c].slice(0,u))}return d}function cM(e,i){let a=-1;const l=[];let c;for(;++a<e.length;){const u=e[a];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
|
|
506
|
-
`;break}case-3:{d=`\r
|
|
507
|
-
`;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&c)continue;d=" ";break}default:d=String.fromCharCode(u)}c=u===-2,l.push(d)}return l.join("")}function uM(e){const l={constructs:yw([lM,...(e||{}).extensions||[]]),content:c(CA),defined:[],document:c(EA),flow:c($_),lazy:{},string:c(X_),text:c(K_)};return l;function c(u){return d;function d(f){return oM(l,u,f)}}}function dM(e){for(;!Sw(e););return e}const kx=/[\0\t\n\r]/g;function fM(){let e=1,i="",a=!0,l;return c;function c(u,d,f){const m=[];let v,y,p,b,j;for(u=i+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),p=0,i="",a&&(u.charCodeAt(0)===65279&&p++,a=void 0);p<u.length;){if(kx.lastIndex=p,v=kx.exec(u),b=v&&v.index!==void 0?v.index:u.length,j=u.charCodeAt(b),!v){i=u.slice(p);break}if(j===10&&p===b&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),p<b&&(m.push(u.slice(p,b)),e+=b-p),j){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:l=!0,e=1}p=b+1}return f&&(l&&m.push(-5),i&&m.push(i),m.push(null)),m}}const hM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mM(e){return e.replace(hM,pM)}function pM(e,i,a){if(i)return i;if(a.charCodeAt(0)===35){const c=a.charCodeAt(1),u=c===120||c===88;return xw(a.slice(u?2:1),u?16:10)}return ag(a)||e}const Aw={}.hasOwnProperty;function gM(e,i,a){return i&&typeof i=="object"&&(a=i,i=void 0),vM(a)(dM(uM(a).document().write(fM()(e,i,!0))))}function vM(e){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(_t),autolinkProtocol:$,autolinkEmail:$,atxHeading:u(Ve),blockQuote:u(oe),characterEscape:$,characterReference:$,codeFenced:u(ce),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(ce,d),codeText:u(me,d),codeTextData:$,data:$,codeFlowValue:$,definition:u(Ne),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(Le),hardBreakEscape:u(mt),hardBreakTrailing:u(mt),htmlFlow:u(ot,d),htmlFlowData:$,htmlText:u(ot,d),htmlTextData:$,image:u(Je),label:d,link:u(_t),listItem:u(yn),listItemValue:b,listOrdered:u(vn,p),listUnordered:u(vn),paragraph:u(Pn),reference:P,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Ve),strong:u(di),thematicBreak:u(Yi)},exit:{atxHeading:m(),atxHeadingSequence:D,autolink:m(),autolinkEmail:xe,autolinkProtocol:re,blockQuote:m(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ye,characterReference:je,codeFenced:m(C),codeFencedFence:k,codeFencedFenceInfo:j,codeFencedFenceMeta:S,codeFlowValue:O,codeIndented:m(E),codeText:m(H),codeTextData:O,data:O,definition:m(),definitionDestinationString:_,definitionLabelString:M,definitionTitleString:T,emphasis:m(),hardBreakEscape:m(q),hardBreakTrailing:m(q),htmlFlow:m(ee),htmlFlowData:O,htmlText:m(Y),htmlTextData:O,image:m(R),label:ne,labelText:F,lineEnding:V,link:m(K),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:G,resourceDestinationString:L,resourceTitleString:J,resource:W,setextHeading:m(U),setextHeadingLineSequence:I,setextHeadingText:A,strong:m(),thematicBreak:m()}};_w(i,(e||{}).mdastExtensions||[]);const a={};return l;function l(pe){let ke={type:"root",children:[]};const He={stack:[ke],tokenStack:[],config:i,enter:f,exit:v,buffer:d,resume:y,data:a},qe=[];let We=-1;for(;++We<pe.length;)if(pe[We][1].type==="listOrdered"||pe[We][1].type==="listUnordered")if(pe[We][0]==="enter")qe.push(We);else{const Pt=qe.pop();We=c(pe,Pt,We)}for(We=-1;++We<pe.length;){const Pt=i[pe[We][0]];Aw.call(Pt,pe[We][1].type)&&Pt[pe[We][1].type].call(Object.assign({sliceSerialize:pe[We][2].sliceSerialize},He),pe[We][1])}if(He.tokenStack.length>0){const Pt=He.tokenStack[He.tokenStack.length-1];(Pt[1]||Cx).call(He,void 0,Pt[0])}for(ke.position={start:Qr(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:Qr(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<i.transforms.length;)ke=i.transforms[We](ke)||ke;return ke}function c(pe,ke,He){let qe=ke-1,We=-1,Pt=!1,xn,Ut,Rn,Un;for(;++qe<=He;){const Ot=pe[qe];switch(Ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ot[0]==="enter"?We++:We--,Un=void 0;break}case"lineEndingBlank":{Ot[0]==="enter"&&(xn&&!Un&&!We&&!Rn&&(Rn=qe),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!We&&Ot[0]==="enter"&&Ot[1].type==="listItemPrefix"||We===-1&&Ot[0]==="exit"&&(Ot[1].type==="listUnordered"||Ot[1].type==="listOrdered")){if(xn){let On=qe;for(Ut=void 0;On--;){const Xe=pe[On];if(Xe[1].type==="lineEnding"||Xe[1].type==="lineEndingBlank"){if(Xe[0]==="exit")continue;Ut&&(pe[Ut][1].type="lineEndingBlank",Pt=!0),Xe[1].type="lineEnding",Ut=On}else if(!(Xe[1].type==="linePrefix"||Xe[1].type==="blockQuotePrefix"||Xe[1].type==="blockQuotePrefixWhitespace"||Xe[1].type==="blockQuoteMarker"||Xe[1].type==="listItemIndent"))break}Rn&&(!Ut||Rn<Ut)&&(xn._spread=!0),xn.end=Object.assign({},Ut?pe[Ut][1].start:Ot[1].end),pe.splice(Ut||qe,0,["exit",xn,Ot[2]]),qe++,He++}if(Ot[1].type==="listItemPrefix"){const On={type:"listItem",_spread:!1,start:Object.assign({},Ot[1].start),end:void 0};xn=On,pe.splice(qe,0,["enter",On,Ot[2]]),qe++,He++,Rn=void 0,Un=!0}}}return pe[ke][1]._spread=Pt,He}function u(pe,ke){return He;function He(qe){f.call(this,pe(qe),qe),ke&&ke.call(this,qe)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(pe,ke,He){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([ke,He||void 0]),pe.position={start:Qr(ke.start),end:void 0}}function m(pe){return ke;function ke(He){pe&&pe.call(this,He),v.call(this,He)}}function v(pe,ke){const He=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==pe.type&&(ke?ke.call(this,pe,qe[0]):(qe[1]||Cx).call(this,pe,qe[0]));else throw new Error("Cannot close `"+pe.type+"` ("+hc({start:pe.start,end:pe.end})+"): it’s not open");He.position.end=Qr(pe.end)}function y(){return ig(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(pe){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function j(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=pe}function S(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=pe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe.replace(/(\r?\n|\r)$/g,"")}function M(pe){const ke=this.resume(),He=this.stack[this.stack.length-1];He.label=ke,He.identifier=ra(this.sliceSerialize(pe)).toLowerCase()}function T(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=pe}function _(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=pe}function D(pe){const ke=this.stack[this.stack.length-1];if(!ke.depth){const He=this.sliceSerialize(pe).length;ke.depth=He}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function I(pe){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(pe){const He=this.stack[this.stack.length-1].children;let qe=He[He.length-1];(!qe||qe.type!=="text")&&(qe=rn(),qe.position={start:Qr(pe.start),end:void 0},He.push(qe)),this.stack.push(qe)}function O(pe){const ke=this.stack.pop();ke.value+=this.sliceSerialize(pe),ke.position.end=Qr(pe.end)}function V(pe){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=ke.children[ke.children.length-1];He.position.end=Qr(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ke.type)&&($.call(this,pe),O.call(this,pe))}function q(){this.data.atHardBreak=!0}function ee(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function Y(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function H(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function K(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=ke,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function R(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=ke,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function F(pe){const ke=this.sliceSerialize(pe),He=this.stack[this.stack.length-2];He.label=mM(ke),He.identifier=ra(ke).toLowerCase()}function ne(){const pe=this.stack[this.stack.length-1],ke=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const qe=pe.children;He.children=qe}else He.alt=ke}function L(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=pe}function J(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=pe}function W(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function G(pe){const ke=this.resume(),He=this.stack[this.stack.length-1];He.label=ke,He.identifier=ra(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function fe(pe){this.data.characterReferenceType=pe.type}function ye(pe){const ke=this.sliceSerialize(pe),He=this.data.characterReferenceType;let qe;He?(qe=xw(ke,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=ag(ke);const We=this.stack[this.stack.length-1];We.value+=qe}function je(pe){const ke=this.stack.pop();ke.position.end=Qr(pe.end)}function re(pe){O.call(this,pe);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(pe)}function xe(pe){O.call(this,pe);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(pe)}function oe(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function me(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function mt(){return{type:"break"}}function ot(){return{type:"html",value:""}}function Je(){return{type:"image",title:null,url:"",alt:null}}function _t(){return{type:"link",title:null,url:"",children:[]}}function vn(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function yn(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function Pn(){return{type:"paragraph",children:[]}}function di(){return{type:"strong",children:[]}}function rn(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function Qr(e){return{line:e.line,column:e.column,offset:e.offset}}function _w(e,i){let a=-1;for(;++a<i.length;){const l=i[a];Array.isArray(l)?_w(e,l):yM(e,l)}}function yM(e,i){let a;for(a in i)if(Aw.call(i,a))switch(a){case"canContainEols":{const l=i[a];l&&e[a].push(...l);break}case"transforms":{const l=i[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=i[a];l&&Object.assign(e[a],l);break}}}function Cx(e,i){throw e?new Error("Cannot close `"+e.type+"` ("+hc({start:e.start,end:e.end})+"): a different token (`"+i.type+"`, "+hc({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+hc({start:i.start,end:i.end})+") is still open")}function xM(e){const i=this;i.parser=a;function a(l){return gM(l,{...i.data("settings"),...e,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function bM(e,i){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(i),!0)};return e.patch(i,a),e.applyData(i,a)}function jM(e,i){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(i,a),[e.applyData(i,a),{type:"text",value:`
|
|
508
|
-
`}]}function wM(e,i){const a=i.value?i.value+`
|
|
509
|
-
`:"",l={},c=i.lang?i.lang.split(/\s+/):[];c.length>0&&(l.className=["language-"+c[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return i.meta&&(u.data={meta:i.meta}),e.patch(i,u),u=e.applyData(i,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(i,u),u}function SM(e,i){const a={type:"element",tagName:"del",properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}function kM(e,i){const a={type:"element",tagName:"em",properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}function CM(e,i){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(i.identifier).toUpperCase(),c=hs(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let d,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),d=e.footnoteOrder.length):d=u+1,f+=1,e.footnoteCounts.set(l,f);const m={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+c,id:a+"fnref-"+c+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(i,m);const v={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(i,v),e.applyData(i,v)}function NM(e,i){const a={type:"element",tagName:"h"+i.depth,properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}function EM(e,i){if(e.options.allowDangerousHtml){const a={type:"raw",value:i.value};return e.patch(i,a),e.applyData(i,a)}}function Mw(e,i){const a=i.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+l}];const c=e.all(i),u=c[0];u&&u.type==="text"?u.value="["+u.value:c.unshift({type:"text",value:"["});const d=c[c.length-1];return d&&d.type==="text"?d.value+=l:c.push({type:"text",value:l}),c}function TM(e,i){const a=String(i.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return Mw(e,i);const c={src:hs(l.url||""),alt:i.alt};l.title!==null&&l.title!==void 0&&(c.title=l.title);const u={type:"element",tagName:"img",properties:c,children:[]};return e.patch(i,u),e.applyData(i,u)}function AM(e,i){const a={src:hs(i.url)};i.alt!==null&&i.alt!==void 0&&(a.alt=i.alt),i.title!==null&&i.title!==void 0&&(a.title=i.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(i,l),e.applyData(i,l)}function _M(e,i){const a={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};e.patch(i,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(i,l),e.applyData(i,l)}function MM(e,i){const a=String(i.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return Mw(e,i);const c={href:hs(l.url||"")};l.title!==null&&l.title!==void 0&&(c.title=l.title);const u={type:"element",tagName:"a",properties:c,children:e.all(i)};return e.patch(i,u),e.applyData(i,u)}function RM(e,i){const a={href:hs(i.url)};i.title!==null&&i.title!==void 0&&(a.title=i.title);const l={type:"element",tagName:"a",properties:a,children:e.all(i)};return e.patch(i,l),e.applyData(i,l)}function OM(e,i,a){const l=e.all(i),c=a?zM(a):Rw(i),u={},d=[];if(typeof i.checked=="boolean"){const y=l[0];let p;y&&y.type==="element"&&y.tagName==="p"?p=y:(p={type:"element",tagName:"p",properties:{},children:[]},l.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const y=l[f];(c||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
|
|
510
|
-
`}),y.type==="element"&&y.tagName==="p"&&!c?d.push(...y.children):d.push(y)}const m=l[l.length-1];m&&(c||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
|
|
511
|
-
`});const v={type:"element",tagName:"li",properties:u,children:d};return e.patch(i,v),e.applyData(i,v)}function zM(e){let i=!1;if(e.type==="list"){i=e.spread||!1;const a=e.children;let l=-1;for(;!i&&++l<a.length;)i=Rw(a[l])}return i}function Rw(e){const i=e.spread;return i??e.children.length>1}function DM(e,i){const a={},l=e.all(i);let c=-1;for(typeof i.start=="number"&&i.start!==1&&(a.start=i.start);++c<l.length;){const d=l[c];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const u={type:"element",tagName:i.ordered?"ol":"ul",properties:a,children:e.wrap(l,!0)};return e.patch(i,u),e.applyData(i,u)}function LM(e,i){const a={type:"element",tagName:"p",properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}function BM(e,i){const a={type:"root",children:e.wrap(e.all(i))};return e.patch(i,a),e.applyData(i,a)}function IM(e,i){const a={type:"element",tagName:"strong",properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}function HM(e,i){const a=e.all(i),l=a.shift(),c=[];if(l){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(i.children[0],d),c.push(d)}if(a.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},f=W0(i.children[1]),m=dw(i.children[i.children.length-1]);f&&m&&(d.position={start:f,end:m}),c.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(c,!0)};return e.patch(i,u),e.applyData(i,u)}function PM(e,i,a){const l=a?a.children:void 0,u=(l?l.indexOf(i):1)===0?"th":"td",d=a&&a.type==="table"?a.align:void 0,f=d?d.length:i.children.length;let m=-1;const v=[];for(;++m<f;){const p=i.children[m],b={},j=d?d[m]:void 0;j&&(b.align=j);let S={type:"element",tagName:u,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),v.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(v,!0)};return e.patch(i,y),e.applyData(i,y)}function UM(e,i){const a={type:"element",tagName:"td",properties:{},children:e.all(i)};return e.patch(i,a),e.applyData(i,a)}const Nx=9,Ex=32;function qM(e){const i=String(e),a=/\r?\n|\r/g;let l=a.exec(i),c=0;const u=[];for(;l;)u.push(Tx(i.slice(c,l.index),c>0,!0),l[0]),c=l.index+l[0].length,l=a.exec(i);return u.push(Tx(i.slice(c),c>0,!1)),u.join("")}function Tx(e,i,a){let l=0,c=e.length;if(i){let u=e.codePointAt(l);for(;u===Nx||u===Ex;)l++,u=e.codePointAt(l)}if(a){let u=e.codePointAt(c-1);for(;u===Nx||u===Ex;)c--,u=e.codePointAt(c-1)}return c>l?e.slice(l,c):""}function FM(e,i){const a={type:"text",value:qM(String(i.value))};return e.patch(i,a),e.applyData(i,a)}function VM(e,i){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(i,a),e.applyData(i,a)}const $M={blockquote:bM,break:jM,code:wM,delete:SM,emphasis:kM,footnoteReference:CM,heading:NM,html:EM,imageReference:TM,image:AM,inlineCode:_M,linkReference:MM,link:RM,listItem:OM,list:DM,paragraph:LM,root:BM,strong:IM,table:HM,tableCell:UM,tableRow:PM,text:FM,thematicBreak:VM,toml:ud,yaml:ud,definition:ud,footnoteDefinition:ud};function ud(){}const Ow=-1,lf=0,pc=1,Ld=2,lg=3,og=4,sg=5,cg=6,zw=7,Dw=8,{defineProperty:GM}=Object,Lw=typeof self=="object"?self:globalThis,Ax=(e,i)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Lw[e](i)},YM=(e,i)=>{const a=(c,u)=>(e.set(u,c),c),l=c=>{if(e.has(c))return e.get(c);const[u,d]=i[c];switch(u){case lf:case Ow:return a(d,c);case pc:{const f=a([],c);for(const m of d)f.push(l(m));return f}case Ld:{const f=a({},c);for(const[m,v]of d){const y=l(m),p=l(v);y==="__proto__"?GM(f,y,{value:p,configurable:!0,enumerable:!0,writable:!0}):f[y]=p}return f}case lg:return a(new Date(d),c);case og:{const{source:f,flags:m}=d;return a(new RegExp(f,m),c)}case sg:{const f=a(new Map,c);for(const[m,v]of d)f.set(l(m),l(v));return f}case cg:{const f=a(new Set,c);for(const m of d)f.add(l(m));return f}case zw:{const{name:f,message:m}=d;return a(typeof Lw[f]=="function"?Ax(f,m):new Error(m),c)}case Dw:return a(BigInt(d),c);case"BigInt":return a(Object(BigInt(d)),c);case"ArrayBuffer":return a(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return a(new DataView(f),d)}case"-0":return-0}return a(Ax(u,d),c)};return l},_x=e=>YM(new Map,e)(0),ql="",{toString:XM}={},{keys:KM,is:QM}=Object,dc=e=>{const i=typeof e;if(i!=="object"||!e)return[lf,i];const a=XM.call(e).slice(8,-1);switch(a){case"Array":return[pc,ql];case"Object":return[Ld,ql];case"Date":return[lg,ql];case"RegExp":return[og,ql];case"Map":return[sg,ql];case"Set":return[cg,ql];case"DataView":return[pc,a]}return a.includes("Array")?[pc,a]:e instanceof Error?[zw,e.name||"Error"]:[Ld,a]},dd=([e,i])=>e===lf&&(i==="function"||i==="symbol"),ZM=(e,i,a,l)=>{const c=(d,f)=>{const m=l.push(d)-1;return a.set(f,m),m},u=d=>{if(a.has(d))return a.get(d);let[f,m]=dc(d);switch(f){case lf:{let y=d;switch(m){case"bigint":f=Dw,y=d.toString();break;case"number":if(!d&&QM(d,-0))return l.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return c([Ow],d)}return c([f,y],d)}case pc:{if(m){let b=d;return m==="DataView"?b=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(b=new Uint8Array(d)),c([m,[...b]],d)}const y=[],p=c([f,y],d);for(const b of d)y.push(u(b));return p}case Ld:{if(m)switch(m){case"BigInt":return c([m,d.toString()],d);case"Boolean":case"Number":case"String":return c([m,d.valueOf()],d)}if(i&&"toJSON"in d)return u(d.toJSON());const y=[],p=c([f,y],d);for(const b of KM(d))(e||!dd(dc(d[b])))&&y.push([u(b),u(d[b])]);return p}case lg:return c([f,isNaN(d.getTime())?ql:d.toISOString()],d);case og:{const{source:y,flags:p}=d;return c([f,{source:y,flags:p}],d)}case sg:{const y=[],p=c([f,y],d);for(const[b,j]of d)(e||!(dd(dc(b))||dd(dc(j))))&&y.push([u(b),u(j)]);return p}case cg:{const y=[],p=c([f,y],d);for(const b of d)(e||!dd(dc(b)))&&y.push(u(b));return p}}const{message:v}=d;return c([f,{name:m,message:v}],d)};return u},Mx=(e,{json:i,lossy:a}={})=>{const l=[];return ZM(!(i||a),!!i,new Map,l)(e),l},Bd=typeof structuredClone=="function"?(e,i)=>i&&("json"in i||"lossy"in i)?_x(Mx(e,i)):structuredClone(e):(e,i)=>_x(Mx(e,i));function JM(e,i){const a=[{type:"text",value:"↩"}];return i>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),a}function WM(e,i){return"Back to reference "+(e+1)+(i>1?"-"+i:"")}function eR(e){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||JM,l=e.options.footnoteBackLabel||WM,c=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const v=e.footnoteById.get(e.footnoteOrder[m]);if(!v)continue;const y=e.all(v),p=String(v.identifier).toUpperCase(),b=hs(p.toLowerCase());let j=0;const S=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++j<=k;){S.length>0&&S.push({type:"text",value:" "});let M=typeof a=="string"?a:a(m,j);typeof M=="string"&&(M={type:"text",value:M}),S.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+b+(j>1?"-"+j:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(m,j),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=y[y.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else y.push(...S);const E={type:"element",tagName:"li",properties:{id:i+"fn-"+b},children:e.wrap(y,!0)};e.patch(v,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Bd(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
|
|
512
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
513
|
-
`}]}}const of=(function(e){if(e==null)return aR;if(typeof e=="function")return sf(e);if(typeof e=="object")return Array.isArray(e)?tR(e):nR(e);if(typeof e=="string")return iR(e);throw new Error("Expected function, string, or object as test")});function tR(e){const i=[];let a=-1;for(;++a<e.length;)i[a]=of(e[a]);return sf(l);function l(...c){let u=-1;for(;++u<i.length;)if(i[u].apply(this,c))return!0;return!1}}function nR(e){const i=e;return sf(a);function a(l){const c=l;let u;for(u in e)if(c[u]!==i[u])return!1;return!0}}function iR(e){return sf(i);function i(a){return a&&a.type===e}}function sf(e){return i;function i(a,l,c){return!!(rR(a)&&e.call(this,a,typeof l=="number"?l:void 0,c||void 0))}}function aR(){return!0}function rR(e){return e!==null&&typeof e=="object"&&"type"in e}const Bw=[],lR=!0,Wp=!1,oR="skip";function Iw(e,i,a,l){let c;typeof i=="function"&&typeof a!="function"?(l=a,a=i):c=i;const u=of(c),d=l?-1:1;f(e,void 0,[])();function f(m,v,y){const p=m&&typeof m=="object"?m:{};if(typeof p.type=="string"){const j=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(m.type+(j?"<"+j+">":""))+")"})}return b;function b(){let j=Bw,S,k,C;if((!i||u(m,v,y[y.length-1]||void 0))&&(j=sR(a(m,y)),j[0]===Wp))return j;if("children"in m&&m.children){const E=m;if(E.children&&j[0]!==oR)for(k=(l?E.children.length:-1)+d,C=y.concat(E);k>-1&&k<E.children.length;){const M=E.children[k];if(S=f(M,k,C)(),S[0]===Wp)return S;k=typeof S[1]=="number"?S[1]:k+d}}return j}}}function sR(e){return Array.isArray(e)?e:typeof e=="number"?[lR,e]:e==null?Bw:[e]}function ug(e,i,a,l){let c,u,d;typeof i=="function"&&typeof a!="function"?(u=void 0,d=i,c=a):(u=i,d=a,c=l),Iw(e,u,f,c);function f(m,v){const y=v[v.length-1],p=y?y.children.indexOf(m):void 0;return d(m,p,y)}}const e0={}.hasOwnProperty,cR={};function uR(e,i){const a=i||cR,l=new Map,c=new Map,u=new Map,d={...$M,...a.handlers},f={all:v,applyData:fR,definitionById:l,footnoteById:c,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:a,patch:dR,wrap:mR};return ug(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const p=y.type==="definition"?l:c,b=String(y.identifier).toUpperCase();p.has(b)||p.set(b,y)}}),f;function m(y,p){const b=y.type,j=f.handlers[b];if(e0.call(f.handlers,b)&&j)return j(f,y,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:k,...C}=y,E=Bd(C);return E.children=f.all(y),E}return Bd(y)}return(f.options.unknownHandler||hR)(f,y,p)}function v(y){const p=[];if("children"in y){const b=y.children;let j=-1;for(;++j<b.length;){const S=f.one(b[j],y);if(S){if(j&&b[j-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Rx(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Rx(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function dR(e,i){e.position&&(i.position=ZT(e))}function fR(e,i){let a=i;if(e&&e.data){const l=e.data.hName,c=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const d="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:d}}a.type==="element"&&u&&Object.assign(a.properties,Bd(u)),"children"in a&&a.children&&c!==null&&c!==void 0&&(a.children=c)}return a}function hR(e,i){const a=i.data||{},l="value"in i&&!(e0.call(a,"hProperties")||e0.call(a,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:e.all(i)};return e.patch(i,l),e.applyData(i,l)}function mR(e,i){const a=[];let l=-1;for(i&&a.push({type:"text",value:`
|
|
514
|
-
`});++l<e.length;)l&&a.push({type:"text",value:`
|
|
515
|
-
`}),a.push(e[l]);return i&&e.length>0&&a.push({type:"text",value:`
|
|
516
|
-
`}),a}function Rx(e){let i=0,a=e.charCodeAt(i);for(;a===9||a===32;)i++,a=e.charCodeAt(i);return e.slice(i)}function Ox(e,i){const a=uR(e,i),l=a.one(e,void 0),c=eR(a),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return c&&u.children.push({type:"text",value:`
|
|
517
|
-
`},c),u}function pR(e,i){return e&&"run"in e?async function(a,l){const c=Ox(a,{file:l,...i});await e.run(c,l)}:function(a,l){return Ox(a,{file:l,...e||i})}}function zx(e){if(e)throw e}var Wm,Dx;function gR(){if(Dx)return Wm;Dx=1;var e=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(v){return typeof Array.isArray=="function"?Array.isArray(v):i.call(v)==="[object Array]"},u=function(v){if(!v||i.call(v)!=="[object Object]")return!1;var y=e.call(v,"constructor"),p=v.constructor&&v.constructor.prototype&&e.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!p)return!1;var b;for(b in v);return typeof b>"u"||e.call(v,b)},d=function(v,y){a&&y.name==="__proto__"?a(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},f=function(v,y){if(y==="__proto__")if(e.call(v,y)){if(l)return l(v,y).value}else return;return v[y]};return Wm=function m(){var v,y,p,b,j,S,k=arguments[0],C=1,E=arguments.length,M=!1;for(typeof k=="boolean"&&(M=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<E;++C)if(v=arguments[C],v!=null)for(y in v)p=f(k,y),b=f(v,y),k!==b&&(M&&b&&(u(b)||(j=c(b)))?(j?(j=!1,S=p&&c(p)?p:[]):S=p&&u(p)?p:{},d(k,{name:y,newValue:m(M,S,b)})):typeof b<"u"&&d(k,{name:y,newValue:b}));return k},Wm}var vR=gR();const ep=u0(vR);function t0(e){if(typeof e!="object"||e===null)return!1;const i=Object.getPrototypeOf(e);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yR(){const e=[],i={run:a,use:l};return i;function a(...c){let u=-1;const d=c.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...c);function f(m,...v){const y=e[++u];let p=-1;if(m){d(m);return}for(;++p<c.length;)(v[p]===null||v[p]===void 0)&&(v[p]=c[p]);c=v,y?xR(y,f)(...v):d(null,...v)}}function l(c){if(typeof c!="function")throw new TypeError("Expected `middelware` to be a function, not "+c);return e.push(c),i}}function xR(e,i){let a;return l;function l(...d){const f=e.length>d.length;let m;f&&d.push(c);try{m=e.apply(this,d)}catch(v){const y=v;if(f&&a)throw y;return c(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,c):m instanceof Error?c(m):u(m))}function c(d,...f){a||(a=!0,i(d,...f))}function u(d){c(null,d)}}const Ra={basename:bR,dirname:jR,extname:wR,join:SR,sep:"/"};function bR(e,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Dc(e);let a=0,l=-1,c=e.length,u;if(i===void 0||i.length===0||i.length>e.length){for(;c--;)if(e.codePointAt(c)===47){if(u){a=c+1;break}}else l<0&&(u=!0,l=c+1);return l<0?"":e.slice(a,l)}if(i===e)return"";let d=-1,f=i.length-1;for(;c--;)if(e.codePointAt(c)===47){if(u){a=c+1;break}}else d<0&&(u=!0,d=c+1),f>-1&&(e.codePointAt(c)===i.codePointAt(f--)?f<0&&(l=c):(f=-1,l=d));return a===l?l=d:l<0&&(l=e.length),e.slice(a,l)}function jR(e){if(Dc(e),e.length===0)return".";let i=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){i=a;break}}else l||(l=!0);return i<0?e.codePointAt(0)===47?"/":".":i===1&&e.codePointAt(0)===47?"//":e.slice(0,i)}function wR(e){Dc(e);let i=e.length,a=-1,l=0,c=-1,u=0,d;for(;i--;){const f=e.codePointAt(i);if(f===47){if(d){l=i+1;break}continue}a<0&&(d=!0,a=i+1),f===46?c<0?c=i:u!==1&&(u=1):c>-1&&(u=-1)}return c<0||a<0||u===0||u===1&&c===a-1&&c===l+1?"":e.slice(c,a)}function SR(...e){let i=-1,a;for(;++i<e.length;)Dc(e[i]),e[i]&&(a=a===void 0?e[i]:a+"/"+e[i]);return a===void 0?".":kR(a)}function kR(e){Dc(e);const i=e.codePointAt(0)===47;let a=CR(e,!i);return a.length===0&&!i&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),i?"/"+a:a}function CR(e,i){let a="",l=0,c=-1,u=0,d=-1,f,m;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(c===d-1||u===1))if(c!==d-1&&u===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(m=a.lastIndexOf("/"),m!==a.length-1){m<0?(a="",l=0):(a=a.slice(0,m),l=a.length-1-a.lastIndexOf("/")),c=d,u=0;continue}}else if(a.length>0){a="",l=0,c=d,u=0;continue}}i&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(c+1,d):a=e.slice(c+1,d),l=d-c-1;c=d,u=0}else f===46&&u>-1?u++:u=-1}return a}function Dc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NR={cwd:ER};function ER(){return"/"}function n0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function TR(e){if(typeof e=="string")e=new URL(e);else if(!n0(e)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(e.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return AR(e)}function AR(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const i=e.pathname;let a=-1;for(;++a<i.length;)if(i.codePointAt(a)===37&&i.codePointAt(a+1)===50){const l=i.codePointAt(a+2);if(l===70||l===102){const c=new TypeError("File URL path must not include encoded / characters");throw c.code="ERR_INVALID_FILE_URL_PATH",c}}return decodeURIComponent(i)}const tp=["history","path","basename","stem","extname","dirname"];class Hw{constructor(i){let a;i?n0(i)?a={path:i}:typeof i=="string"||_R(i)?a={value:i}:a=i:a={},this.cwd="cwd"in a?"":NR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<tp.length;){const u=tp[l];u in a&&a[u]!==void 0&&a[u]!==null&&(this[u]=u==="history"?[...a[u]]:a[u])}let c;for(c in a)tp.includes(c)||(this[c]=a[c])}get basename(){return typeof this.path=="string"?Ra.basename(this.path):void 0}set basename(i){ip(i,"basename"),np(i,"basename"),this.path=Ra.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Ra.dirname(this.path):void 0}set dirname(i){Lx(this.basename,"dirname"),this.path=Ra.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Ra.extname(this.path):void 0}set extname(i){if(np(i,"extname"),Lx(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ra.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){n0(i)&&(i=TR(i)),ip(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Ra.basename(this.path,this.extname):void 0}set stem(i){ip(i,"stem"),np(i,"stem"),this.path=Ra.join(this.dirname||"",i+(this.extname||""))}fail(i,a,l){const c=this.message(i,a,l);throw c.fatal=!0,c}info(i,a,l){const c=this.message(i,a,l);return c.fatal=void 0,c}message(i,a,l){const c=new Hn(i,a,l);return this.path&&(c.name=this.path+":"+c.name,c.file=this.path),c.fatal=!1,this.messages.push(c),c}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function np(e,i){if(e&&e.includes(Ra.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Ra.sep+"`")}function ip(e,i){if(!e)throw new Error("`"+i+"` cannot be empty")}function Lx(e,i){if(!e)throw new Error("Setting `"+i+"` requires `path` to be set too")}function _R(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MR=(function(e){const l=this.constructor.prototype,c=l[e],u=function(){return c.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),RR={}.hasOwnProperty;class dg extends MR{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=yR()}copy(){const i=new dg;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];i.use(...l)}return i.data(ep(!0,{},this.namespace)),i}data(i,a){return typeof i=="string"?arguments.length===2?(lp("data",this.frozen),this.namespace[i]=a,this):RR.call(this.namespace,i)&&this.namespace[i]||void 0:i?(lp("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const c=a.call(i,...l);typeof c=="function"&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const a=fd(i),l=this.parser||this.Parser;return ap("parse",l),l(String(a),a)}process(i,a){const l=this;return this.freeze(),ap("process",this.parser||this.Parser),rp("process",this.compiler||this.Compiler),a?c(void 0,a):new Promise(c);function c(u,d){const f=fd(i),m=l.parse(f);l.run(m,f,function(y,p,b){if(y||!p||!b)return v(y);const j=p,S=l.stringify(j,b);DR(S)?b.value=S:b.result=S,v(y,b)});function v(y,p){y||!p?d(y):u?u(p):a(void 0,p)}}}processSync(i){let a=!1,l;return this.freeze(),ap("processSync",this.parser||this.Parser),rp("processSync",this.compiler||this.Compiler),this.process(i,c),Ix("processSync","process",a),l;function c(u,d){a=!0,zx(u),l=d}}run(i,a,l){Bx(i),this.freeze();const c=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?u(void 0,l):new Promise(u);function u(d,f){const m=fd(a);c.run(i,m,v);function v(y,p,b){const j=p||i;y?f(y):d?d(j):l(void 0,j,b)}}}runSync(i,a){let l=!1,c;return this.run(i,a,u),Ix("runSync","run",l),c;function u(d,f){zx(d),c=f,l=!0}}stringify(i,a){this.freeze();const l=fd(a),c=this.compiler||this.Compiler;return rp("stringify",c),Bx(i),c(i,l)}use(i,...a){const l=this.attachers,c=this.namespace;if(lp("use",this.frozen),i!=null)if(typeof i=="function")m(i,a);else if(typeof i=="object")Array.isArray(i)?f(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function u(v){if(typeof v=="function")m(v,[]);else if(typeof v=="object")if(Array.isArray(v)){const[y,...p]=v;m(y,p)}else d(v);else throw new TypeError("Expected usable value, not `"+v+"`")}function d(v){if(!("plugins"in v)&&!("settings"in v))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(v.plugins),v.settings&&(c.settings=ep(!0,c.settings,v.settings))}function f(v){let y=-1;if(v!=null)if(Array.isArray(v))for(;++y<v.length;){const p=v[y];u(p)}else throw new TypeError("Expected a list of plugins, not `"+v+"`")}function m(v,y){let p=-1,b=-1;for(;++p<l.length;)if(l[p][0]===v){b=p;break}if(b===-1)l.push([v,...y]);else if(y.length>0){let[j,...S]=y;const k=l[b][1];t0(k)&&t0(j)&&(j=ep(!0,k,j)),l[b]=[v,j,...S]}}}}const OR=new dg().freeze();function ap(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rp(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function lp(e,i){if(i)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Bx(e){if(!t0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ix(e,i,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+i+"` instead")}function fd(e){return zR(e)?e:new Hw(e)}function zR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DR(e){return typeof e=="string"||LR(e)}function LR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hx=[],Px={allowDangerousHtml:!0},IR=/^(https?|ircs?|mailto|xmpp)$/i,HR=[{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 PR(e){const i=UR(e),a=qR(e);return FR(i.runSync(i.parse(a),a),e)}function UR(e){const i=e.rehypePlugins||Hx,a=e.remarkPlugins||Hx,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Px}:Px;return OR().use(xM).use(a).use(pR,l).use(i)}function qR(e){const i=e.children||"",a=new Hw;return typeof i=="string"&&(a.value=i),a}function FR(e,i){const a=i.allowedElements,l=i.allowElement,c=i.components,u=i.disallowedElements,d=i.skipHtml,f=i.unwrapDisallowed,m=i.urlTransform||VR;for(const y of HR)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+BR+y.id,void 0);return ug(e,v),nA(e,{Fragment:o.Fragment,components:c,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function v(y,p,b){if(y.type==="raw"&&b&&typeof p=="number")return d?b.children.splice(p,1):b.children[p]={type:"text",value:y.value},p;if(y.type==="element"){let j;for(j in Qm)if(Object.hasOwn(Qm,j)&&Object.hasOwn(y.properties,j)){const S=y.properties[j],k=Qm[j];(k===null||k.includes(y.tagName))&&(y.properties[j]=m(String(S||""),j,y))}}if(y.type==="element"){let j=a?!a.includes(y.tagName):u?u.includes(y.tagName):!1;if(!j&&l&&typeof p=="number"&&(j=!l(y,p,b)),j&&b&&typeof p=="number")return f&&y.children?b.children.splice(p,1,...y.children):b.children.splice(p,1),p}}}function VR(e){const i=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),c=e.indexOf("/");return i===-1||c!==-1&&i>c||a!==-1&&i>a||l!==-1&&i>l||IR.test(e.slice(0,i))?e:""}function $R(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Pw(e,i,a){const c=of((a||{}).ignore||[]),u=GR(i);let d=-1;for(;++d<u.length;)Iw(e,"text",f);function f(v,y){let p=-1,b;for(;++p<y.length;){const j=y[p],S=b?b.children:void 0;if(c(j,S?S.indexOf(j):void 0,b))return;b=j}if(b)return m(v,y)}function m(v,y){const p=y[y.length-1],b=u[d][0],j=u[d][1];let S=0;const C=p.children.indexOf(v);let E=!1,M=[];b.lastIndex=0;let T=b.exec(v.value);for(;T;){const _=T.index,D={index:T.index,input:T.input,stack:[...y,v]};let A=j(...T,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(S!==_&&M.push({type:"text",value:v.value.slice(S,_)}),Array.isArray(A)?M.push(...A):A&&M.push(A),S=_+T[0].length,E=!0),!b.global)break;T=b.exec(v.value)}return E?(S<v.value.length&&M.push({type:"text",value:v.value.slice(S)}),p.children.splice(C,1,...M)):M=[v],C+M.length}}function GR(e){const i=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<a.length;){const c=a[l];i.push([YR(c[0]),XR(c[1])])}return i}function YR(e){return typeof e=="string"?new RegExp($R(e),"g"):e}function XR(e){return typeof e=="function"?e:function(){return e}}function KR(e){Pw(e,[/\r?\n|\r/g,QR])}function QR(){return{type:"break"}}function ZR(){return function(e){KR(e)}}const JR=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,WR=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function eO(e){var l;const i=((l=e.children)==null?void 0:l.length)===1?e.children[0]:void 0;if((i==null?void 0:i.type)!=="text"||!i.value)return;const a=i.value;return e.url===a||e.url===`http://${a}`||e.url===`mailto:${a}`?a:void 0}function Uw(e,i){return{type:"link",url:e,children:[{type:"text",value:i}]}}function tO(e){const i=[];let a=0;for(const l of e.matchAll(WR))l.index>a&&i.push({type:"text",value:e.slice(a,l.index)}),i.push(Uw(l[0],l[0])),a=l.index+l[0].length;return a<e.length&&i.push({type:"text",value:e.slice(a)}),i}function qw(e){const i=e.children;if(i)for(let a=0;a<i.length;a++){const l=i[a];if(l.type!=="link"){qw(l);continue}const c=eO(l),u=c===void 0?-1:c.search(JR);if(c===void 0||u<=0)continue;const d=c.slice(0,u),f=l.url.slice(0,l.url.length-c.length),m=tO(c.slice(u));i.splice(a,1,Uw(f+d,d),...m),a+=m.length}}function nO(){return e=>qw(e)}function Ux(e,i){const a=String(e);if(typeof i!="string")throw new TypeError("Expected character");let l=0,c=a.indexOf(i);for(;c!==-1;)l++,c=a.indexOf(i,c+i.length);return l}const op="phrasing",sp=["autolink","link","image","label"];function iO(){return{transforms:[uO],enter:{literalAutolink:rO,literalAutolinkEmail:cp,literalAutolinkHttp:cp,literalAutolinkWww:cp},exit:{literalAutolink:cO,literalAutolinkEmail:sO,literalAutolinkHttp:lO,literalAutolinkWww:oO}}}function aO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:op,notInConstruct:sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:op,notInConstruct:sp},{character:":",before:"[ps]",after:"\\/",inConstruct:op,notInConstruct:sp}]}}function rO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cp(e){this.config.enter.autolinkProtocol.call(this,e)}function lO(e){this.config.exit.autolinkProtocol.call(this,e)}function oO(e){this.config.exit.data.call(this,e);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(e)}function sO(e){this.config.exit.autolinkEmail.call(this,e)}function cO(e){this.exit(e)}function uO(e){Pw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),fO]],{ignore:["link","linkReference"]})}function dO(e,i,a,l,c){let u="";if(!Fw(c)||(/^w/i.test(i)&&(a=i+a,i="",u="http://"),!hO(a)))return!1;const d=mO(a+l);if(!d[0])return!1;const f={type:"link",title:null,url:u+i+d[0],children:[{type:"text",value:i+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function fO(e,i,a,l){return!Fw(l,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+a,children:[{type:"text",value:i+"@"+a}]}}function hO(e){const i=e.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function mO(e){const i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!i)return[e,void 0];e=e.slice(0,i.index);let a=i[0],l=a.indexOf(")");const c=Ux(e,"(");let u=Ux(e,")");for(;l!==-1&&c>u;)e+=a.slice(0,l+1),a=a.slice(l+1),l=a.indexOf(")"),u++;return[e,a]}function Fw(e,i){const a=e.input.charCodeAt(e.index-1);return(e.index===0||Zl(a)||af(a))&&(!i||a!==47)}Vw.peek=SO;function pO(){this.buffer()}function gO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vO(){this.buffer()}function yO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function xO(e){const i=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=ra(this.sliceSerialize(e)).toLowerCase(),a.label=i}function bO(e){this.exit(e)}function jO(e){const i=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=ra(this.sliceSerialize(e)).toLowerCase(),a.label=i}function wO(e){this.exit(e)}function SO(){return"["}function Vw(e,i,a,l){const c=a.createTracker(l);let u=c.move("[^");const d=a.enter("footnoteReference"),f=a.enter("reference");return u+=c.move(a.safe(a.associationId(e),{after:"]",before:u})),f(),d(),u+=c.move("]"),u}function kO(){return{enter:{gfmFootnoteCallString:pO,gfmFootnoteCall:gO,gfmFootnoteDefinitionLabelString:vO,gfmFootnoteDefinition:yO},exit:{gfmFootnoteCallString:xO,gfmFootnoteCall:bO,gfmFootnoteDefinitionLabelString:jO,gfmFootnoteDefinition:wO}}}function CO(e){let i=!1;return e&&e.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:a,footnoteReference:Vw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(l,c,u,d){const f=u.createTracker(d);let m=f.move("[^");const v=u.enter("footnoteDefinition"),y=u.enter("label");return m+=f.move(u.safe(u.associationId(l),{before:m,after:"]"})),y(),m+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),m+=f.move((i?`
|
|
518
|
-
`:" ")+u.indentLines(u.containerFlow(l,f.current()),i?$w:NO))),v(),m}}function NO(e,i,a){return i===0?e:$w(e,i,a)}function $w(e,i,a){return(a?"":" ")+e}const EO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Gw.peek=RO;function TO(){return{canContainEols:["delete"],enter:{strikethrough:_O},exit:{strikethrough:MO}}}function AO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:EO}],handlers:{delete:Gw}}}function _O(e){this.enter({type:"delete",children:[]},e)}function MO(e){this.exit(e)}function Gw(e,i,a,l){const c=a.createTracker(l),u=a.enter("strikethrough");let d=c.move("~~");return d+=a.containerPhrasing(e,{...c.current(),before:d,after:"~"}),d+=c.move("~~"),u(),d}function RO(){return"~"}function OO(e){return e.length}function zO(e,i){const a=i||{},l=(a.align||[]).concat(),c=a.stringLength||OO,u=[],d=[],f=[],m=[];let v=0,y=-1;for(;++y<e.length;){const k=[],C=[];let E=-1;for(e[y].length>v&&(v=e[y].length);++E<e[y].length;){const M=DO(e[y][E]);if(a.alignDelimiters!==!1){const T=c(M);C[E]=T,(m[E]===void 0||T>m[E])&&(m[E]=T)}k.push(M)}d[y]=k,f[y]=C}let p=-1;if(typeof l=="object"&&"length"in l)for(;++p<v;)u[p]=qx(l[p]);else{const k=qx(l);for(;++p<v;)u[p]=k}p=-1;const b=[],j=[];for(;++p<v;){const k=u[p];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let M=a.alignDelimiters===!1?1:Math.max(1,m[p]-C.length-E.length);const T=C+"-".repeat(M)+E;a.alignDelimiters!==!1&&(M=C.length+M+E.length,M>m[p]&&(m[p]=M),j[p]=M),b[p]=T}d.splice(1,0,b),f.splice(1,0,j),y=-1;const S=[];for(;++y<d.length;){const k=d[y],C=f[y];p=-1;const E=[];for(;++p<v;){const M=k[p]||"";let T="",_="";if(a.alignDelimiters!==!1){const D=m[p]-(C[p]||0),A=u[p];A===114?T=" ".repeat(D):A===99?D%2?(T=" ".repeat(D/2+.5),_=" ".repeat(D/2-.5)):(T=" ".repeat(D/2),_=T):_=" ".repeat(D)}a.delimiterStart!==!1&&!p&&E.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&M==="")&&(a.delimiterStart!==!1||p)&&E.push(" "),a.alignDelimiters!==!1&&E.push(T),E.push(M),a.alignDelimiters!==!1&&E.push(_),a.padding!==!1&&E.push(" "),(a.delimiterEnd!==!1||p!==v-1)&&E.push("|")}S.push(a.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
|
|
519
|
-
`)}function DO(e){return e==null?"":String(e)}function qx(e){const i=typeof e=="string"?e.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function LO(e,i,a,l){const c=a.enter("blockquote"),u=a.createTracker(l);u.move("> "),u.shift(2);const d=a.indentLines(a.containerFlow(e,u.current()),BO);return c(),d}function BO(e,i,a){return">"+(a?"":" ")+e}function IO(e,i){return Fx(e,i.inConstruct,!0)&&!Fx(e,i.notInConstruct,!1)}function Fx(e,i,a){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return a;let l=-1;for(;++l<i.length;)if(e.includes(i[l]))return!0;return!1}function Vx(e,i,a,l){let c=-1;for(;++c<a.unsafe.length;)if(a.unsafe[c].character===`
|
|
520
|
-
`&&IO(a.stack,a.unsafe[c]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
521
|
-
`}function HO(e,i){const a=String(e);let l=a.indexOf(i),c=l,u=0,d=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===c?++u>d&&(d=u):u=1,c=l+i.length,l=a.indexOf(i,c);return d}function PO(e,i){return!!(i.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function UO(e){const i=e.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function qO(e,i,a,l){const c=UO(a),u=e.value||"",d=c==="`"?"GraveAccent":"Tilde";if(PO(e,a)){const p=a.enter("codeIndented"),b=a.indentLines(u,FO);return p(),b}const f=a.createTracker(l),m=c.repeat(Math.max(HO(u,c)+1,3)),v=a.enter("codeFenced");let y=f.move(m);if(e.lang){const p=a.enter(`codeFencedLang${d}`);y+=f.move(a.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=a.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(a.safe(e.meta,{before:y,after:`
|
|
522
|
-
`,encode:["`"],...f.current()})),p()}return y+=f.move(`
|
|
523
|
-
`),u&&(y+=f.move(u+`
|
|
524
|
-
`)),y+=f.move(m),v(),y}function FO(e,i,a){return(a?"":" ")+e}function fg(e){const i=e.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function VO(e,i,a,l){const c=fg(a),u=c==='"'?"Quote":"Apostrophe",d=a.enter("definition");let f=a.enter("label");const m=a.createTracker(l);let v=m.move("[");return v+=m.move(a.safe(a.associationId(e),{before:v,after:"]",...m.current()})),v+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(a.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=a.enter("destinationRaw"),v+=m.move(a.safe(e.url,{before:v,after:e.title?" ":`
|
|
525
|
-
`,...m.current()}))),f(),e.title&&(f=a.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(a.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),d(),v}function $O(e){const i=e.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function kc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Id(e,i,a){const l=as(e),c=as(i);return l===void 0?c===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Yw.peek=GO;function Yw(e,i,a,l){const c=$O(a),u=a.enter("emphasis"),d=a.createTracker(l),f=d.move(c);let m=d.move(a.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=Id(l.before.charCodeAt(l.before.length-1),v,c);y.inside&&(m=kc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=Id(l.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+kc(p));const j=d.move(c);return u(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function GO(e,i,a){return a.options.emphasis||"*"}function YO(e,i){let a=!1;return ug(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return a=!0,Wp}),!!((!e.depth||e.depth<3)&&ig(e)&&(i.options.setext||a))}function XO(e,i,a,l){const c=Math.max(Math.min(6,e.depth||1),1),u=a.createTracker(l);if(YO(e,a)){const y=a.enter("headingSetext"),p=a.enter("phrasing"),b=a.containerPhrasing(e,{...u.current(),before:`
|
|
526
|
-
`,after:`
|
|
527
|
-
`});return p(),y(),b+`
|
|
528
|
-
`+(c===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
529
|
-
`))+1))}const d="#".repeat(c),f=a.enter("headingAtx"),m=a.enter("phrasing");u.move(d+" ");let v=a.containerPhrasing(e,{before:"# ",after:`
|
|
530
|
-
`,...u.current()});return/^[\t ]/.test(v)&&(v=kc(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,a.options.closeAtx&&(v+=" "+d),m(),f(),v}Xw.peek=KO;function Xw(e){return e.value||""}function KO(){return"<"}Kw.peek=QO;function Kw(e,i,a,l){const c=fg(a),u=c==='"'?"Quote":"Apostrophe",d=a.enter("image");let f=a.enter("label");const m=a.createTracker(l);let v=m.move("![");return v+=m.move(a.safe(e.alt,{before:v,after:"]",...m.current()})),v+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(a.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=a.enter("destinationRaw"),v+=m.move(a.safe(e.url,{before:v,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=a.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(a.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),v+=m.move(")"),d(),v}function QO(){return"!"}Qw.peek=ZO;function Qw(e,i,a,l){const c=e.referenceType,u=a.enter("imageReference");let d=a.enter("label");const f=a.createTracker(l);let m=f.move("![");const v=a.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=a.stack;a.stack=[],d=a.enter("reference");const p=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return d(),a.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function ZO(){return"!"}Zw.peek=JO;function Zw(e,i,a){let l=e.value||"",c="`",u=-1;for(;new RegExp("(^|[^`])"+c+"([^`]|$)").test(l);)c+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<a.unsafe.length;){const d=a.unsafe[u],f=a.compilePattern(d);let m;if(d.atBreak)for(;m=f.exec(l);){let v=m.index;l.charCodeAt(v)===10&&l.charCodeAt(v-1)===13&&v--,l=l.slice(0,v)+" "+l.slice(m.index+1)}}return c+l+c}function JO(){return"`"}function Jw(e,i){const a=ig(e);return!!(!i.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ww.peek=WO;function Ww(e,i,a,l){const c=fg(a),u=c==='"'?"Quote":"Apostrophe",d=a.createTracker(l);let f,m;if(Jw(e,a)){const y=a.stack;a.stack=[],f=a.enter("autolink");let p=d.move("<");return p+=d.move(a.containerPhrasing(e,{before:p,after:">",...d.current()})),p+=d.move(">"),f(),a.stack=y,p}f=a.enter("link"),m=a.enter("label");let v=d.move("[");return v+=d.move(a.containerPhrasing(e,{before:v,after:"](",...d.current()})),v+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=a.enter("destinationLiteral"),v+=d.move("<"),v+=d.move(a.safe(e.url,{before:v,after:">",...d.current()})),v+=d.move(">")):(m=a.enter("destinationRaw"),v+=d.move(a.safe(e.url,{before:v,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=a.enter(`title${u}`),v+=d.move(" "+c),v+=d.move(a.safe(e.title,{before:v,after:c,...d.current()})),v+=d.move(c),m()),v+=d.move(")"),f(),v}function WO(e,i,a){return Jw(e,a)?"<":"["}e5.peek=ez;function e5(e,i,a,l){const c=e.referenceType,u=a.enter("linkReference");let d=a.enter("label");const f=a.createTracker(l);let m=f.move("[");const v=a.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=a.stack;a.stack=[],d=a.enter("reference");const p=a.safe(a.associationId(e),{before:m,after:"]",...f.current()});return d(),a.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function ez(){return"["}function hg(e){const i=e.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function tz(e){const i=hg(e),a=e.options.bulletOther;if(!a)return i==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+a+"`) to be different");return a}function nz(e){const i=e.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function t5(e){const i=e.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function iz(e,i,a,l){const c=a.enter("list"),u=a.bulletCurrent;let d=e.ordered?nz(a):hg(a);const f=e.ordered?d==="."?")":".":tz(a);let m=i&&a.bulletLastUsed?d===a.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(m=!0),t5(a)===d&&y){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=f),a.bulletCurrent=d;const v=a.containerFlow(e,l);return a.bulletLastUsed=d,a.bulletCurrent=u,c(),v}function az(e){const i=e.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function rz(e,i,a,l){const c=az(a);let u=a.bulletCurrent||hg(a);i&&i.type==="list"&&i.ordered&&(u=(typeof i.start=="number"&&i.start>-1?i.start:1)+(a.options.incrementListMarker===!1?0:i.children.indexOf(e))+u);let d=u.length+1;(c==="tab"||c==="mixed"&&(i&&i.type==="list"&&i.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=a.createTracker(l);f.move(u+" ".repeat(d-u.length)),f.shift(d);const m=a.enter("listItem"),v=a.indentLines(a.containerFlow(e,f.current()),y);return m(),v;function y(p,b,j){return b?(j?"":" ".repeat(d))+p:(j?u:u+" ".repeat(d-u.length))+p}}function lz(e,i,a,l){const c=a.enter("paragraph"),u=a.enter("phrasing"),d=a.containerPhrasing(e,l);return u(),c(),d}const oz=of(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sz(e,i,a,l){return(e.children.some(function(d){return oz(d)})?a.containerPhrasing:a.containerFlow).call(a,e,l)}function cz(e){const i=e.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}n5.peek=uz;function n5(e,i,a,l){const c=cz(a),u=a.enter("strong"),d=a.createTracker(l),f=d.move(c+c);let m=d.move(a.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=Id(l.before.charCodeAt(l.before.length-1),v,c);y.inside&&(m=kc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=Id(l.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+kc(p));const j=d.move(c+c);return u(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function uz(e,i,a){return a.options.strong||"*"}function dz(e,i,a,l){return a.safe(e.value,l)}function fz(e){const i=e.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function hz(e,i,a){const l=(t5(a)+(a.options.ruleSpaces?" ":"")).repeat(fz(a));return a.options.ruleSpaces?l.slice(0,-1):l}const i5={blockquote:LO,break:Vx,code:qO,definition:VO,emphasis:Yw,hardBreak:Vx,heading:XO,html:Xw,image:Kw,imageReference:Qw,inlineCode:Zw,link:Ww,linkReference:e5,list:iz,listItem:rz,paragraph:lz,root:sz,strong:n5,text:dz,thematicBreak:hz};function mz(){return{enter:{table:pz,tableData:$x,tableHeader:$x,tableRow:vz},exit:{codeText:yz,table:gz,tableData:up,tableHeader:up,tableRow:up}}}function pz(e){const i=e._align;this.enter({type:"table",align:i.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function gz(e){this.exit(e),this.data.inTable=void 0}function vz(e){this.enter({type:"tableRow",children:[]},e)}function up(e){this.exit(e)}function $x(e){this.enter({type:"tableCell",children:[]},e)}function yz(e){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,xz));const a=this.stack[this.stack.length-1];a.type,a.value=i,this.exit(e)}function xz(e,i){return i==="|"?i:e}function bz(e){const i=e||{},a=i.tableCellPadding,l=i.tablePipeAlign,c=i.stringLength,u=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
531
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:d,tableCell:m,tableRow:f}};function d(j,S,k,C){return v(y(j,k,C),j.align)}function f(j,S,k,C){const E=p(j,k,C),M=v([E]);return M.slice(0,M.indexOf(`
|
|
532
|
-
`))}function m(j,S,k,C){const E=k.enter("tableCell"),M=k.enter("phrasing"),T=k.containerPhrasing(j,{...C,before:u,after:u});return M(),E(),T}function v(j,S){return zO(j,{align:S,alignDelimiters:l,padding:a,stringLength:c})}function y(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("table");for(;++E<C.length;)M[E]=p(C[E],S,k);return T(),M}function p(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("tableRow");for(;++E<C.length;)M[E]=m(C[E],j,S,k);return T(),M}function b(j,S,k){let C=i5.inlineCode(j,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function jz(){return{exit:{taskListCheckValueChecked:Gx,taskListCheckValueUnchecked:Gx,paragraph:Sz}}}function wz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:kz}}}function Gx(e){const i=this.stack[this.stack.length-2];i.type,i.checked=e.type==="taskListCheckValueChecked"}function Sz(e){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const l=a.children[0];if(l&&l.type==="text"){const c=i.children;let u=-1,d;for(;++u<c.length;){const f=c[u];if(f.type==="paragraph"){d=f;break}}d===a&&(l.value=l.value.slice(1),l.value.length===0?a.children.shift():a.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,a.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function kz(e,i,a,l){const c=e.children[0],u=typeof e.checked=="boolean"&&c&&c.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=a.createTracker(l);u&&f.move(d);let m=i5.listItem(e,i,a,{...l,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,v)),m;function v(y){return y+d}}function Cz(){return[iO(),kO(),TO(),mz(),jz()]}function Nz(e){return{extensions:[aO(),CO(e),AO(),bz(e),wz()]}}const Ez={tokenize:Oz,partial:!0},a5={tokenize:zz,partial:!0},r5={tokenize:Dz,partial:!0},l5={tokenize:Lz,partial:!0},Tz={tokenize:Bz,partial:!0},o5={name:"wwwAutolink",tokenize:Mz,previous:c5},s5={name:"protocolAutolink",tokenize:Rz,previous:u5},vr={name:"emailAutolink",tokenize:_z,previous:d5},$a={};function Az(){return{text:$a}}let Hl=48;for(;Hl<123;)$a[Hl]=vr,Hl++,Hl===58?Hl=65:Hl===91&&(Hl=97);$a[43]=vr;$a[45]=vr;$a[46]=vr;$a[95]=vr;$a[72]=[vr,s5];$a[104]=[vr,s5];$a[87]=[vr,o5];$a[119]=[vr,o5];function _z(e,i,a){const l=this;let c,u;return d;function d(p){return!i0(p)||!d5.call(l,l.previous)||mg(l.events)?a(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return i0(p)?(e.consume(p),f):p===64?(e.consume(p),m):a(p)}function m(p){return p===46?e.check(Tz,y,v)(p):p===45||p===95||In(p)?(u=!0,e.consume(p),m):y(p)}function v(p){return e.consume(p),c=!0,m}function y(p){return u&&c&&Xn(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),i(p)):a(p)}}function Mz(e,i,a){const l=this;return c;function c(d){return d!==87&&d!==119||!c5.call(l,l.previous)||mg(l.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ez,e.attempt(a5,e.attempt(r5,u),a),a)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),i(d)}}function Rz(e,i,a){const l=this;let c="",u=!1;return d;function d(p){return(p===72||p===104)&&u5.call(l,l.previous)&&!mg(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),c+=String.fromCodePoint(p),e.consume(p),f):a(p)}function f(p){if(Xn(p)&&c.length<5)return c+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=c.toLowerCase();if(b==="http"||b==="https")return e.consume(p),m}return a(p)}function m(p){return p===47?(e.consume(p),u?v:(u=!0,m)):a(p)}function v(p){return p===null||Dd(p)||Et(p)||Zl(p)||af(p)?a(p):e.attempt(a5,e.attempt(r5,y),a)(p)}function y(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),i(p)}}function Oz(e,i,a){let l=0;return c;function c(d){return(d===87||d===119)&&l<3?(l++,e.consume(d),c):d===46&&l===3?(e.consume(d),u):a(d)}function u(d){return d===null?a(d):i(d)}}function zz(e,i,a){let l,c,u;return d;function d(v){return v===46||v===95?e.check(l5,m,f)(v):v===null||Et(v)||Zl(v)||v!==45&&af(v)?m(v):(u=!0,e.consume(v),d)}function f(v){return v===95?l=!0:(c=l,l=void 0),e.consume(v),d}function m(v){return c||l||!u?a(v):i(v)}}function Dz(e,i){let a=0,l=0;return c;function c(d){return d===40?(a++,e.consume(d),c):d===41&&l<a?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(l5,i,u)(d):d===null||Et(d)||Zl(d)?i(d):(e.consume(d),c)}function u(d){return d===41&&l++,e.consume(d),c}}function Lz(e,i,a){return l;function l(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),l):f===38?(e.consume(f),u):f===93?(e.consume(f),c):f===60||f===null||Et(f)||Zl(f)?i(f):a(f)}function c(f){return f===null||f===40||f===91||Et(f)||Zl(f)?i(f):l(f)}function u(f){return Xn(f)?d(f):a(f)}function d(f){return f===59?(e.consume(f),l):Xn(f)?(e.consume(f),d):a(f)}}function Bz(e,i,a){return l;function l(u){return e.consume(u),c}function c(u){return In(u)?a(u):i(u)}}function c5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function u5(e){return!Xn(e)}function d5(e){return!(e===47||i0(e))}function i0(e){return e===43||e===45||e===46||e===95||In(e)}function mg(e){let i=e.length,a=!1;for(;i--;){const l=e[i][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){a=!0;break}if(l._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const Iz={tokenize:Gz,partial:!0};function Hz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Fz,continuation:{tokenize:Vz},exit:$z}},text:{91:{name:"gfmFootnoteCall",tokenize:qz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Pz,resolveTo:Uz}}}}function Pz(e,i,a){const l=this;let c=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let d;for(;c--;){const m=l.events[c][1];if(m.type==="labelImage"){d=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!d||!d._balanced)return a(m);const v=ra(l.sliceSerialize({start:d.end,end:l.now()}));return v.codePointAt(0)!==94||!u.includes(v.slice(1))?a(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),i(m))}}function Uz(e,i){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};c.end.column++,c.end.offset++,c.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},c.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[a+1],e[a+2],["enter",l,i],e[a+3],e[a+4],["enter",c,i],["exit",c,i],["enter",u,i],["enter",d,i],["exit",d,i],["exit",u,i],e[e.length-2],e[e.length-1],["exit",l,i]];return e.splice(a,e.length-a+1,...f),e}function qz(e,i,a){const l=this,c=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,d;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),m}function m(p){return p!==94?a(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",v)}function v(p){if(u>999||p===93&&!d||p===null||p===91||Et(p))return a(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return c.includes(ra(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),i):a(p)}return Et(p)||(d=!0),u++,e.consume(p),p===92?y:v}function y(p){return p===91||p===92||p===93?(e.consume(p),u++,v):v(p)}}function Fz(e,i,a){const l=this,c=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):a(S)}function y(S){if(d>999||S===93&&!f||S===null||S===91||Et(S))return a(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=ra(l.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Et(S)||(f=!0),d++,e.consume(S),S===92?p:y}function p(S){return S===91||S===92||S===93?(e.consume(S),d++,y):y(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),c.includes(u)||c.push(u),ht(e,j,"gfmFootnoteDefinitionWhitespace")):a(S)}function j(S){return i(S)}}function Vz(e,i,a){return e.check(zc,i,e.attempt(Iz,i,a))}function $z(e){e.exit("gfmFootnoteDefinition")}function Gz(e,i,a){const l=this;return ht(e,c,"gfmFootnoteDefinitionIndent",5);function c(u){const d=l.events[l.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?i(u):a(u)}}function Yz(e){let a=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:c};return a==null&&(a=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function c(d,f){let m=-1;for(;++m<d.length;)if(d[m][0]==="enter"&&d[m][1].type==="strikethroughSequenceTemporary"&&d[m][1]._close){let v=m;for(;v--;)if(d[v][0]==="exit"&&d[v][1].type==="strikethroughSequenceTemporary"&&d[v][1]._open&&d[m][1].end.offset-d[m][1].start.offset===d[v][1].end.offset-d[v][1].start.offset){d[m][1].type="strikethroughSequence",d[v][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},d[v][1].start),end:Object.assign({},d[m][1].end)},p={type:"strikethroughText",start:Object.assign({},d[v][1].end),end:Object.assign({},d[m][1].start)},b=[["enter",y,f],["enter",d[v][1],f],["exit",d[v][1],f],["enter",p,f]],j=f.parser.constructs.insideSpan.null;j&&_i(b,b.length,0,rf(j,d.slice(v+1,m),f)),_i(b,b.length,0,[["exit",p,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",y,f]]),_i(d,v-1,m-v+3,b),m=v+b.length-2;break}}for(m=-1;++m<d.length;)d[m][1].type==="strikethroughSequenceTemporary"&&(d[m][1].type="data");return d}function u(d,f,m){const v=this.previous,y=this.events;let p=0;return b;function b(S){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(S):(d.enter("strikethroughSequenceTemporary"),j(S))}function j(S){const k=as(v);if(S===126)return p>1?m(S):(d.consume(S),p++,j);if(p<2&&!a)return m(S);const C=d.exit("strikethroughSequenceTemporary"),E=as(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,f(S)}}}class Xz{constructor(){this.map=[],this.index=new Map}add(i,a,l){Kz(this,i,a,l)}consume(i){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let a=this.map.length;const l=[];for(;a>0;)a-=1,l.push(i.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),i.length=this.map[a][0];l.push(i.slice()),i.length=0;let c=l.pop();for(;c;){for(const u of c)i.push(u);c=l.pop()}this.map.length=0,this.index.clear()}}function Kz(e,i,a,l){if(a===0&&l.length===0)return;const c=e.index.get(i);if(c){c[1]+=a,c[2].push(...l);return}const u=[i,a,l];e.map.push(u),e.index.set(i,u)}function Qz(e,i){let a=!1;const l=[];for(;i<e.length;){const c=e[i];if(a){if(c[0]==="enter")c[1].type==="tableContent"&&l.push(e[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(c[1].type==="tableContent"){if(e[i-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(c[1].type==="tableDelimiterRow")break}else c[0]==="enter"&&c[1].type==="tableDelimiterRow"&&(a=!0);i+=1}return l}function Zz(){return{flow:{null:{name:"table",tokenize:Jz,resolveAll:Wz}}}}function Jz(e,i,a){const l=this;let c=0,u=0,d;return f;function f(O){let V=l.events.length-1;for(;V>-1;){const{type:Y}=l.events[V][1];if(Y==="lineEnding"||Y==="linePrefix")V--;else break}const q=V>-1?l.events[V][1].type:null,ee=q==="tableHead"||q==="tableRow"?A:m;return ee===A&&l.parser.lazy[l.now().line]?a(O):ee(O)}function m(O){return e.enter("tableHead"),e.enter("tableRow"),v(O)}function v(O){return O===124||(d=!0,u+=1),y(O)}function y(O){return O===null?a(O):Ue(O)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),j):a(O):it(O)?ht(e,y,"whitespace")(O):(u+=1,d&&(d=!1,c+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||Et(O)?(e.exit("data"),y(O)):(e.consume(O),O===92?b:p)}function b(O){return O===92||O===124?(e.consume(O),p):p(O)}function j(O){return l.interrupt=!1,l.parser.lazy[l.now().line]?a(O):(e.enter("tableDelimiterRow"),d=!1,it(O)?ht(e,S,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?C(O):O===124?(d=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):D(O)}function k(O){return it(O)?ht(e,C,"whitespace")(O):C(O)}function C(O){return O===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(u+=1,E(O)):O===null||Ue(O)?_(O):D(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),M(O)):D(O)}function M(O){return O===45?(e.consume(O),M):O===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(O))}function T(O){return it(O)?ht(e,_,"whitespace")(O):_(O)}function _(O){return O===124?S(O):O===null||Ue(O)?!d||c!==u?D(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),i(O)):D(O)}function D(O){return a(O)}function A(O){return e.enter("tableRow"),I(O)}function I(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),I):O===null||Ue(O)?(e.exit("tableRow"),i(O)):it(O)?ht(e,I,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||Et(O)?(e.exit("data"),I(O)):(e.consume(O),O===92?$:U)}function $(O){return O===92||O===124?(e.consume(O),U):U(O)}}function Wz(e,i){let a=-1,l=!0,c=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,v,y,p;const b=new Xz;for(;++a<e.length;){const j=e[a],S=j[1];j[0]==="enter"?S.type==="tableHead"?(f=!1,m!==0&&(Yx(b,i,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",v,i]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(l=!0,p=void 0,u=[0,0,0,0],d=[0,a+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(a,0,[["enter",y,i]])),c=S.type==="tableDelimiterRow"?2:y?3:1):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(l=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],p=hd(b,i,u,c,void 0,p),u=[0,0,0,0]),d[2]=a)):S.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(d[0]=d[1],p=hd(b,i,u,c,void 0,p)),u=d,d=[u[1],a,0,0])):S.type==="tableHead"?(f=!0,m=a):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=a,u[1]!==0?(d[0]=d[1],p=hd(b,i,u,c,a,p)):d[1]!==0&&(p=hd(b,i,d,c,a,p)),c=0):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(d[3]=a)}for(m!==0&&Yx(b,i,m,v,y),b.consume(i.events),a=-1;++a<i.events.length;){const j=i.events[a];j[0]==="enter"&&j[1].type==="table"&&(j[1]._align=Qz(i.events,a))}return e}function hd(e,i,a,l,c,u){const d=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";a[0]!==0&&(u.end=Object.assign({},Wo(i.events,a[0])),e.add(a[0],0,[["exit",u,i]]));const m=Wo(i.events,a[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},e.add(a[1],0,[["enter",u,i]]),a[2]!==0){const v=Wo(i.events,a[2]),y=Wo(i.events,a[3]),p={type:f,start:Object.assign({},v),end:Object.assign({},y)};if(e.add(a[2],0,[["enter",p,i]]),l!==2){const b=i.events[a[2]],j=i.events[a[3]];if(b[1].end=Object.assign({},j[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const S=a[2]+1,k=a[3]-a[2]-1;e.add(S,k,[])}}e.add(a[3]+1,0,[["exit",p,i]])}return c!==void 0&&(u.end=Object.assign({},Wo(i.events,c)),e.add(c,0,[["exit",u,i]]),u=void 0),u}function Yx(e,i,a,l,c){const u=[],d=Wo(i.events,a);c&&(c.end=Object.assign({},d),u.push(["exit",c,i])),l.end=Object.assign({},d),u.push(["exit",l,i]),e.add(a+1,0,u)}function Wo(e,i){const a=e[i],l=a[0]==="enter"?"start":"end";return a[1][l]}const eD={name:"tasklistCheck",tokenize:nD};function tD(){return{text:{91:eD}}}function nD(e,i,a){const l=this;return c;function c(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?a(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return Et(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):a(m)}function d(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):a(m)}function f(m){return Ue(m)?i(m):it(m)?e.check({tokenize:iD},i,a)(m):a(m)}}function iD(e,i,a){return ht(e,l,"whitespace");function l(c){return c===null?a(c):i(c)}}function aD(e){return yw([Az(),Hz(),Yz(e),Zz(),tD()])}const rD={};function lD(e){const i=this,a=e||rD,l=i.data(),c=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),d=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);c.push(aD(a)),u.push(Cz()),d.push(Nz(a))}function Hd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const oD={add:ls,"chat-bubble":t7,window:M8,close:os,"chevron-left":r4,"chevron-right":Zr,"chevron-down":dr,gear:h7,"person-add":j7,"arrow-bracket-to-left":W8,"arrow-up":z8,copy:h0,check:Mi,"cloud-download":m0,bell:L8,"bell-slash":D8,image:Z8,paperclip:y0,"smiley-plus":F8,info:v0,people:w7,pencil:s7,file:Y8,"file-video":$8,"file-audio":V8,folder:X8,"layout-sidebar-left":l7,sun:b7,moon:r7,"arrows-expand":U8,"arrows-contract":g7,"arrow-u-up-right":u7,"list-bullets":J8,eye:g0,"eye-slash":p0,pin:Ep,megaphone:e7,trash:Td,search:Ec,quote:c7};function De({name:e}){const i=oD[e]??v0;return o.jsx(i,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function ut({icon:e,label:i,className:a="",...l}){return o.jsx("button",{type:"button",className:`ui-iconbtn ${a}`,"aria-label":i,title:i,...l,children:o.jsx(De,{name:e})})}function rs({title:e,onClose:i,children:a,className:l=""}){const c=w.useRef(null),u=w.useId();return w.useEffect(()=>{const d=c.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),io.createPortal(o.jsxs("dialog",{ref:c,className:`ui-small-dialog ${l}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),i()},children:[o.jsx(ut,{icon:"close",label:x("ui.closeNamed",{name:e}),className:"ui-dialog-close",onClick:i}),o.jsxs("div",{className:"ui-dialog-body",children:[o.jsx("h1",{id:u,children:e}),a]})]}),document.body)}async function cf(e){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const i=document.createElement("textarea");i.value=e,i.setAttribute("readonly",""),i.style.position="fixed",i.style.opacity="0",document.body.append(i),i.select();try{return document.execCommand("copy")}finally{i.remove()}}function sD({children:e}){const i=w.useRef(null),[a,l]=w.useState("idle");w.useEffect(()=>{if(a==="idle")return;const u=setTimeout(()=>l("idle"),1500);return()=>clearTimeout(u)},[a]);const c=async()=>{var u;return l(await cf((((u=i.current)==null?void 0:u.textContent)??"").replace(/\n$/,""))?"copied":"failed")};return o.jsxs("figure",{className:"ui-code-figure",children:[o.jsx("pre",{ref:i,children:e}),o.jsx(ut,{icon:a==="copied"?"check":"copy",label:x(a==="copied"?"ui.copied":a==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void c()})]})}const cD=[lD,nO,ZR],Lc=w.memo(function({text:i,renderQuote:a}){return Fb(),o.jsx(PR,{remarkPlugins:cD,skipHtml:!0,components:{a:({href:l,children:c})=>l==="#mention"||l==="#mention-me"?o.jsx("span",{className:"jv-mention","data-me":l==="#mention-me"||void 0,children:c}):a&&(l!=null&&l.startsWith("#quote-"))?a(Number(l.slice(7))):o.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:c}),img:({alt:l})=>o.jsx("span",{children:x("ui.image",{alt:l||x("ui.imageHidden")})}),pre:({children:l})=>o.jsx(sD,{children:l})},children:i})}),uD={agent_undeletable:"error.agentUndeletable",autoconfig_model:"error.autoconfigModel",autoconfig_source:"error.autoconfigSource",bot_missing:"error.botMissing",chat_access_changed:"error.chatAccessChanged",computer_failed:"error.computerFailed",computer_missing:"error.computerMissing",docker_unavailable:"error.dockerUnavailable",connection_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",history_missing:"error.historyMissing",invalid_credential:"error.invalidCredential",invalid_run:"error.invalidRun",login_input:"error.loginInput",login_option:"error.loginOption",login_step:"error.loginStep",message_missing:"error.messageMissing",model_incomplete:"error.modelIncomplete",model_missing:"error.modelMissing",model_request_failed:"error.modelRequestFailed",model_required:"error.modelRequired",model_switch_uncertain:"error.modelSwitchUncertain",name_taken:"error.nameTaken",provider_name_taken:"error.providerNameTaken",question_closed:"error.questionClosed",question_expired:"error.questionExpired",secret_description_invalid:"error.secretDescriptionInvalid",secret_missing:"error.secretMissing",secret_name_invalid:"error.secretNameInvalid",secret_name_taken:"error.secretNameTaken",secret_value_missing:"error.secretValueMissing",secret_value_too_long:"error.secretValueTooLong",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay"},f5=(e,i)=>{const a=e?uD[e]:void 0;return a?x(a,i):null};function yt(e,i="common.failed"){return e instanceof ns?f5(e.code,e.params)??(e.status<500?e.message:x(i)):e instanceof Error&&e.message?e.message:x(i)}const dD=e=>f5(e.errorCode,e.errorParams)??e.error??"";function fD({botId:e,selected:i,onSelect:a,onOpenChat:l}){const[c,u]=w.useState(null),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0);if(w.useEffect(()=>{let S=!0;return f(!0),v(""),u(null),(i.kind==="history"?ET.read(e,i.id).then(C=>({kind:"history",data:C})):x3.message(e,i.id).then(C=>({kind:"chat",data:C}))).then(C=>{S&&u(C)}).catch(C=>{S&&v(yt(C,"activity.detailFailed"))}).finally(()=>{S&&f(!1)}),()=>{S=!1}},[e,i.kind,i.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(Oe,{variant:"outline",size:"sm",onClick:()=>p(S=>S+1),children:x("common.retry")})]});if(!c)return null;if(c.kind==="history")return o.jsx(ST,{detail:c.data,onSelect:S=>a({kind:"history",id:S})},c.data.record.id);const{chat:b,message:j}=c.data;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-activity-message-head",children:[o.jsxs("div",{children:[o.jsx("h3",{children:b.title}),o.jsx("p",{children:Q0(j.createdAt)})]}),o.jsxs(Oe,{variant:"ghost",size:"sm",onClick:()=>l(b.id),children:[x("activity.openChat"),o.jsx(Np,{})]})]}),o.jsxs("div",{className:"jv-activity-message-body",children:[j.content&&o.jsx(Lc,{text:j.content}),j.attachments.length>0&&o.jsx("div",{className:"jv-activity-message-files",children:j.attachments.map(S=>o.jsxs("a",{href:`/api/attachments/${S.id}`,download:S.name,children:[o.jsx(y0,{}),S.name]},S.id))}),j.source&&o.jsxs(Oe,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>a({kind:"history",id:j.source.historyId}),children:[x("activity.sentBy",{id:j.source.historyId}),o.jsx(Np,{})]})]})]})}const h5=A9;function m5({className:e,children:i,showCloseButton:a=!0,...l}){return o.jsxs(M9,{children:[o.jsx(R9,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),o.jsxs(D9,{"data-slot":"dialog-content",className:an("fixed top-1/2 left-1/2 z-[81] flex max-h-[calc(100dvh-24px)] w-[min(720px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-background text-foreground shadow-lg outline-none",e),...l,children:[i,a&&o.jsx(U9,{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(os,{className:"size-4"})})]})]})}function pg({className:e,...i}){return o.jsx("div",{"data-slot":"dialog-header",className:an("flex flex-col gap-2",e),...i})}function uf({className:e,...i}){return o.jsx(H9,{"data-slot":"dialog-title",className:an("text-lg font-semibold",e),...i})}function hD({botId:e,botName:i,onBack:a,onOpenChat:l}){const[c,u]=w.useState([void 0]),d=c.at(-1),[f,m]=w.useState({items:[],nextBefore:null}),[v,y]=w.useState(!0),[p,b]=w.useState(""),[j,S]=w.useState(0),[k,C]=w.useState(null),E=w.useRef(null),M=w.useRef(0),T=w.useRef(null);w.useEffect(()=>{let A=!0;return y(!0),b(""),m({items:[],nextBefore:null}),E.current&&(E.current.scrollTop=0),x3.list(e,d).then(I=>{A&&m(I)}).catch(I=>{A&&b(yt(I,"activity.loadFailed"))}).finally(()=>{A&&y(!1)}),()=>{A=!1}},[e,d,j]);const _=A=>{var I;k||(M.current=((I=E.current)==null?void 0:I.scrollTop)??0,T.current=document.activeElement),C(A)},D=()=>{if(!k){a();return}C(null),requestAnimationFrame(()=>{var A;E.current&&(E.current.scrollTop=M.current),(A=T.current)==null||A.focus({preventScroll:!0})})};return o.jsxs(o.Fragment,{children:[o.jsxs(pg,{className:"jv-bot-info-navigation",children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(k?"activity.backToTimeline":"usage.back"),onClick:D,children:o.jsx(Vd,{})}),o.jsx(uf,{children:k?k.kind==="history"?"History":x("activity.chatRecord"):x("bot.activity")}),o.jsx("span",{className:"jv-bot-page-name",children:i})]}),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(Oe,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),S(A=>A+1)},"aria-label":x("activity.refresh"),children:[o.jsx(x0,{}),x(v?"activity.reading":"usage.refresh")]})]}),o.jsxs("div",{className:"jv-activity-columns","aria-hidden":"true",children:[o.jsx("span",{children:x("activity.columnChat")}),o.jsx("span",{children:x("activity.columnTime")}),o.jsx("span",{children:"History"})]}),o.jsx("div",{className:"jv-activity-scroll",ref:E,children:v?o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.loading")}):p?o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:p}),o.jsx(Oe,{variant:"outline",size:"sm",onClick:()=>S(A=>A+1),children:x("common.retry")})]}):f.items.length?o.jsx(NT,{items:f.items,onSelect:_}):o.jsxs("div",{className:"jv-activity-state jv-activity-empty",children:[o.jsx("p",{children:x("activity.empty")}),o.jsx("span",{children:x("activity.emptyHint")})]})}),o.jsxs("div",{className:"jv-activity-pagination",children:[o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",disabled:v||c.length===1,onClick:()=>u(A=>A.slice(0,-1)),children:[o.jsx(r4,{}),x("activity.newer")]}),o.jsx("span",{children:x("activity.page",{page:c.length})}),o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",disabled:v||f.nextBefore===null,onClick:()=>u(A=>[...A,f.nextBefore]),children:[x("activity.older"),o.jsx(Zr,{})]})]})]}),k&&o.jsx("section",{className:"jv-activity-detail","aria-label":x(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:o.jsx(fD,{botId:e,selected:k,onSelect:_,onOpenChat:l})})]})]})}const mD={list:(e,i)=>Te(`/bots/${e}/usage?since=${i}`)},pD=["today","7d","30d"],gD=e=>e==="today"?x("usage.today"):x("usage.days",{count:e==="7d"?7:30}),md=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function vD(e){const i=new Date;return i.setHours(0,0,0,0),i.setDate(i.getDate()-(e==="7d"?6:e==="30d"?29:0)),i.getTime()}const Xx=e=>Ia(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),Kx=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function yD({botId:e,botName:i,onBack:a}){const[l,c]=w.useState("today"),[u,d]=w.useState(null),[f,m]=w.useState(""),[v,y]=w.useState(0);w.useEffect(()=>{let S=!0;return d(null),m(""),mD.list(e,vD(l)).then(k=>{S&&d(k.models)}).catch(k=>{S&&m(yt(k,"usage.loadFailed"))}),()=>{S=!1}},[e,l,v]);const p=(u==null?void 0:u.filter(S=>S.cost!==null))??[],b=u&&Object.fromEntries(md.map(([S])=>[S,u.reduce((k,C)=>k+C[S],0)])),j=p.length?Kx(p.reduce((S,k)=>S+k.cost,0)):x("usage.unpriced");return o.jsxs(o.Fragment,{children:[o.jsxs(pg,{className:"jv-bot-info-navigation",children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x("usage.back"),onClick:a,children:o.jsx(Vd,{})}),o.jsx(uf,{children:x("usage.title")}),o.jsx("span",{className:"jv-bot-page-name",children:i})]}),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:pD.map(S=>o.jsx("button",{type:"button",role:"tab","aria-selected":l===S,onClick:()=>c(S),children:gD(S)},S))}),o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(S=>S+1),"aria-label":x("usage.refreshLabel"),children:[o.jsx(x0,{}),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(Oe,{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")}),md.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})]})}),md.map(([k,C])=>o.jsx("td",{"data-label":x(C),title:Ia(S[k]),children:Xx(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"):Kx(S.cost)})]},`${S.provider}/${S.model}`))}),u.length>1&&b&&o.jsx("tfoot",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsx("strong",{children:x("usage.total")})}),md.map(([S,k])=>o.jsx("td",{"data-label":x(k),title:Ia(b[S]),children:Xx(b[S])},S)),o.jsx("td",{"data-label":x("usage.cost"),className:p.length?void 0:"jv-usage-unpriced",children:j})]})})]}),o.jsx("p",{className:"jv-usage-note",children:x(p.length>0&&p.length<u.length?"usage.notePartial":"usage.note")})]}):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 $i={gray:{hex:14079179,label:"color.gray"},blue:{hex:10470376,label:"color.blue"},green:{hex:11064750,label:"color.green"},amber:{hex:15778426,label:"color.amber"},rose:{hex:15642820,label:"color.rose"},violet:{hex:12759274,label:"color.violet"}},xD=["normal","happy","sad","angry","dizzy"],p5=e=>{var i;return`#${(((i=$i[e])==null?void 0:i.hex)??$i.gray.hex).toString(16).padStart(6,"0")}`},bD="modulepreload",jD=function(e){return"/"+e},Qx={},Pd=function(i,a,l){let c=Promise.resolve();if(a&&a.length>0){let d=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));c=d(a.map(v=>{if(v=jD(v),v in Qx)return;Qx[v]=!0;const y=v.endsWith(".css"),p=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${p}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":bD,y||(b.as="script"),b.crossOrigin="",b.href=v,m&&b.setAttribute("nonce",m),document.head.appendChild(b),y)return new Promise((j,S)=>{b.addEventListener("load",j),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return c.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return i().catch(u)})};let Zx;const dp=new Map;let Jx=Promise.resolve();function wD(){return Zx??(Zx=Promise.all([Pd(()=>import("./three.module-BdMZo7zQ.js"),[]),Pd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([e,i])=>{const a=new e.WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});i.configureRenderer(e,a);const{scene:l,camera:c,ground:u}=i.createStage(e),d=new i.CatFigure(e,$i.gray.hex);return l.add(d.root),i.frameCamera(c,1,3.3),{render(f,m,v,y,p){var b;return a.setSize(v,v,!1),d.setColor(((b=$i[f])==null?void 0:b.hex)??$i.gray.hex),d.setCrown(p),d.pose(m),u.visible=y,a.render(l,c),a.domElement.toDataURL("image/png")}}})),Zx}function SD(e,i,a,l=!1){const c=Math.round(a*Math.min(3,Math.max(1,window.devicePixelRatio||1))),u=`${e}:${i}:${c}:${l}`;let d=dp.get(u);return d||(d=Jx.then(()=>wD()).then(f=>f.render(e,i,c,a>=40,l)),Jx=d.catch(()=>{}),dp.set(u,d),d.catch(()=>dp.delete(u))),d}function Jl({color:e,mood:i="normal",size:a=36,badge:l,crown:c=!1}){const[u,d]=w.useState();return w.useEffect(()=>{let f=!0;return d(void 0),SD(e,i,a,c).then(m=>{f&&d(m)}).catch(()=>{}),()=>{f=!1}},[e,i,a,c]),o.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${a}px`,"--jv-avatar-color":p5(e)},"aria-hidden":"true",children:[u?o.jsx("img",{src:u,alt:""}):o.jsx("span",{className:"jv-bot-avatar-tile"}),l==="working"&&o.jsxs("span",{className:"jv-typing",title:x("avatar.working"),children:[o.jsx("i",{}),o.jsx("i",{}),o.jsx("i",{})]}),l==="asking"&&o.jsx("span",{className:"jv-typing jv-asking",title:x("activity.asking"),children:"?"})]})}const Wl=QE,eo=eT;function to({className:e,children:i,...a}){return o.jsxs(JE,{"data-slot":"select-trigger",className:an("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50",e),...a,children:[i,o.jsx(tT,{asChild:!0,children:o.jsx(dr,{className:"size-4 opacity-50"})})]})}function no({className:e,children:i,container:a,...l}){return o.jsx(rT,{container:a??void 0,children:o.jsx(lT,{"data-slot":"select-content",position:"popper",sideOffset:5,className:an("z-[100] max-h-[min(300px,70dvh)] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md border bg-popover bg-background p-1 text-foreground shadow-md",e),...l,children:o.jsx(hT,{children:i})})})}function Vi({className:e,children:i,...a}){return o.jsxs(gT,{"data-slot":"select-item",className:an("relative flex cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50",e),...a,children:[o.jsx(vT,{children:i}),o.jsx(xT,{"data-slot":"select-indicator",className:"absolute right-2",children:o.jsx(Mi,{className:"size-4"})})]})}const Wx={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},kD=(e,i)=>JSON.stringify([e,i]);function g5({bot:e,connections:i,onSaved:a,onManage:l}){const[c,u]=w.useState([]),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0),[b,j]=w.useState(!1),[S,k]=w.useState(""),[C,E]=w.useState(!1),[M,T]=w.useState(""),[_,D]=w.useState(-1),A=w.useRef(null),I=w.useRef(null),U=w.useId();w.useEffect(()=>{let J=!0;return f(!0),v(""),be.modelOptions().then(W=>{J&&u(W.connections)}).catch(W=>{J&&v(yt(W,"botModel.loadFailed"))}).finally(()=>{J&&f(!1)}),()=>{J=!1}},[i,y]);const $=c.flatMap(J=>J.models.map(W=>({...W,connectionId:J.id,connectionName:J.name,key:kD(J.id,W.id)}))).sort((J,W)=>J.name.localeCompare(W.name,void 0,{numeric:!0})),O=$.find(J=>J.connectionId===e.connectionId&&J.id===e.modelId),V=i.find(J=>J.id===e.connectionId),q=V==null?void 0:V.models.find(J=>J.id===e.modelId),ee=$.filter(J=>`${J.name} ${J.id} ${J.connectionName}`.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase())),Y=c.map(J=>({...J,models:ee.filter(W=>W.connectionId===J.id)})).filter(J=>J.models.length),H=Y.flatMap(J=>J.models),K=$.length>8,R=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function F(J){E(J),T(""),D(-1)}async function ne(J,W,P){F(!1),j(!0),k("");try{a(await be.selectBotModel(e.id,J,W,P,Fd()))}catch(G){k(yt(G,"botModel.switchFailed"))}finally{j(!1)}}function L(J){var W;if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const P=J.key==="ArrowDown"?Math.min(_+1,H.length-1):Math.max(_-1,0);D(P),(W=document.getElementById(`${U}-${P}`))==null||W.scrollIntoView({block:"nearest"})}else if(J.key==="Enter"&&H[_]){J.preventDefault();const P=H[_];ne(P.connectionId,P.id,e.thinkingLevel)}}return o.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":b||d,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(Pj,{open:C,onOpenChange:F,children:[o.jsxs(Uj,{className:"jv-model-trigger","aria-label":x("botModel.pick"),"aria-haspopup":"listbox",disabled:b||d||!!m,children:[o.jsx("span",{children:(O==null?void 0:O.name)??(q==null?void 0:q.name)??x(e.connectionId?"botModel.broken":"botModel.choose")}),b?o.jsx(_4,{className:"animate-spin"}):o.jsx(dr,{})]}),o.jsx(qj,{children:o.jsxs(Fj,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,onOpenAutoFocus:J=>{var W;J.preventDefault(),(W=K?A.current:I.current)==null||W.focus()},onKeyDown:L,children:[K&&o.jsxs("div",{className:"jv-model-search",children:[o.jsx(Ec,{}),o.jsx("input",{ref:A,role:"combobox","aria-label":x("botModel.filter"),"aria-expanded":"true","aria-controls":U,"aria-activedescendant":_>=0?`${U}-${_}`:void 0,placeholder:x("botModel.filterPlaceholder"),value:M,onChange:J=>{T(J.target.value),D(-1)},autoComplete:"off",spellCheck:!1})]}),o.jsxs("div",{ref:I,id:U,role:"listbox","aria-label":x("botModel.list"),tabIndex:-1,"aria-activedescendant":_>=0?`${U}-${_}`:void 0,className:"jv-model-options",children:[Y.map(J=>o.jsxs("div",{role:"group","aria-label":J.name,children:[o.jsx("div",{className:"jv-model-group-label",children:J.name}),J.models.map(W=>{const P=H.indexOf(W),G=W.connectionId===e.connectionId&&W.id===e.modelId;return o.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${U}-${P}`,"aria-selected":G,"data-active":P===_||void 0,title:W.id,onClick:()=>void ne(W.connectionId,W.id,e.thinkingLevel),children:[o.jsx("span",{className:"jv-option-check",children:G&&o.jsx(Mi,{})}),o.jsx("span",{children:W.name})]},W.key)})]},J.id)),!H.length&&o.jsx("p",{className:"jv-menu-empty",children:x($.length?"botModel.noMatch":"botModel.none")})]}),o.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{F(!1),l()},children:x("botModel.manage")})]})})]}),(O||V)&&o.jsx("span",{className:"jv-field-note",children:(O==null?void 0:O.connectionName)??(V==null?void 0:V.displayName)})]}),o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("botModel.thinking")}),o.jsxs(Wl,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:b||d||!O||!!m,onValueChange:J=>{e.connectionId&&ne(e.connectionId,e.modelId,J)},children:[o.jsx(to,{className:"jv-thinking-trigger","aria-label":x("botModel.pickThinking"),children:o.jsx(eo,{children:R})}),o.jsx(no,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(O==null?void 0:O.thinking.levels)??[]].map(J=>{const W=O==null?void 0:O.thinkingLevelMap[J],P=W&&W!==J?W:J;return o.jsx(Vi,{value:J,children:o.jsxs("span",{className:"jv-thinking-option",children:[o.jsxs("span",{children:[P,W&&W!==J&&o.jsxs("small",{children:[" (",J,")"]})]}),o.jsx("small",{children:Wx[J]&&x(Wx[J])})]})},J)})})]})]})]}),d&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.loading")}),b&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.switching")}),m&&o.jsxs("p",{className:"jv-model-error",role:"alert",children:[m," ",o.jsx("button",{type:"button",onClick:()=>p(J=>J+1),children:x("common.retry")})]}),S&&o.jsx("p",{className:"jv-model-error",role:"alert",children:S})]})}const CD={preparing:["environment.state.preparing","environment.hint.preparing"],running:["environment.state.running","environment.hint.running"],stopped:["environment.state.stopped","environment.hint.stopped"],failed:["environment.state.failed","environment.hint.failed"],unavailable:["environment.state.unavailable","environment.hint.unavailable"]};function ND({bot:e,onSaved:i}){const[a,l]=w.useState(!1),[c,u]=w.useState(""),{home:d,docker:f}=e.environment;async function m(y){if(!(y===d||a)){l(!0),u("");try{i(await be.setBotEnvironment(e.id,y))}catch(p){u(yt(p,"environment.changeFailed"))}finally{l(!1)}}}const v=(y,p,b,j)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d===y,disabled:a||j,className:"jv-list-row jv-choice-row jv-env-option",onClick:()=>void m(y),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:p}),o.jsx("span",{children:b})]}),d===y&&o.jsx(Mi,{"aria-hidden":"true"})]},y);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-label":x("environment.title"),children:[v("computer",x("environment.computer"),x(f?"environment.computerHint":"environment.noDocker"),!f),v("host",x("environment.host"),x("environment.hostHint"),!1)]}),c&&o.jsx("p",{className:"jv-note-error",role:"alert",children:c})]})}function ED({bot:e,onSaved:i}){const[a,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,v]=w.useState(""),y=w.useId(),{computer:p,home:b,current:j,hostGranted:S,docker:k}=e.environment;async function C(I,U,$){l(I),v("");try{i(await U())}catch(O){v(yt(O,$))}finally{l(null)}}const E=I=>{I!==b&&!a&&C("move",()=>be.setBotEnvironment(e.id,I),"environment.changeFailed")},M=I=>void C(I,()=>be.computer(e.id,I),"common.failed"),T=p==null?void 0:p.state,[_,D]=T?CD[T]:[null,null],A=j!==b?x(j==="host"?"environment.awayHost":"environment.awayComputer"):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")}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("environment.default")}),o.jsx("span",{className:A?"jv-env-away":void 0,children:A??x("environment.defaultHint")})]}),o.jsx("div",{className:"jv-env-seg",role:"radiogroup","aria-label":x("environment.default"),children:["computer","host"].map(I=>o.jsx("button",{type:"button",role:"radio","aria-checked":b===I,disabled:!!a||I==="computer"&&!k,title:I==="computer"&&!k?x("environment.noDocker"):void 0,onClick:()=>E(I),children:x(I==="computer"?"environment.computer":"environment.host")},I))})]}),b==="computer"&&T&&_&&D&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-choice-row jv-env-disclosure","aria-expanded":c,"aria-controls":y,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("environment.details")})}),o.jsx("span",{className:"jv-status","data-ok":T==="running"||void 0,"data-busy":T==="preparing"||void 0,children:x(_)}),o.jsx(dr,{"aria-hidden":"true"})]}),c&&o.jsxs("div",{id:y,className:"jv-list-row jv-static-row jv-env-details",children:[o.jsxs("p",{children:[x("environment.sandboxAbout"),x(D)]}),T!=="unavailable"&&!d&&o.jsxs("div",{className:"jv-env-actions",children:[o.jsx(Oe,{type:"button",variant:"outline",size:"sm",disabled:!!a||T==="preparing",onClick:()=>T==="running"?f("stop"):M("start"),children:x(a==="start"?"environment.starting":a==="stop"?"environment.stopping":T==="running"?"environment.stop":"environment.start")}),o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",disabled:!!a||T==="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(Oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:x("common.cancel")}),o.jsx(Oe,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const I=d;f(null),M(I)},children:x(`environment.${d}Confirm`)})]})]})]})]})]}),b==="computer"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{className:"jv-env-heading",children:x("environment.external")}),o.jsx("div",{className:"jv-list",role:"group","aria-label":x("environment.external"),children:o.jsxs("button",{type:"button",role:"switch","aria-checked":S,disabled:!!a,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void C("grant",()=>be.grantHost(e.id,!S),"environment.accessFailed"),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("environment.host")}),o.jsx("span",{children:x("environment.hostAbout")})]}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]})}),o.jsx("p",{className:"jv-hint jv-env-note",children:x("environment.externalHint")})]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function TD(){const[e,i]=w.useState(!1),a=l=>c=>{c.pointerType==="mouse"&&i(l)};return o.jsxs(Pj,{open:e,onOpenChange:i,children:[o.jsx(Uj,{className:"jv-context-stale",title:"","aria-label":x("bot.contextStale"),onPointerEnter:a(!0),onPointerLeave:a(!1),children:o.jsx(m3,{"aria-hidden":"true"})}),o.jsx(qj,{children:o.jsx(Fj,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:l=>l.preventDefault(),children:x("bot.contextStale")})})]})}function Yt({className:e,type:i,...a}){return o.jsx("input",{type:i,"data-slot":"input",className:an("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...a})}function a0({className:e,...i}){return o.jsx("textarea",{"data-slot":"textarea",className:an("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...i})}const AD={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function _D({bot:e,status:i,connections:a,chats:l,onSaved:c,onManageModels:u,onClose:d,onOpenChat:f,onOpenSubscription:m}){const[v,y]=w.useState("info"),[p,b]=w.useState(e.name),[j,S]=w.useState(e.description),[k,C]=w.useState(e.systemPrompt),[E,M]=w.useState(!1),[T,_]=w.useState(null),[D,A]=w.useState(null),[I,U]=w.useState(null),[$,O]=w.useState(""),[V,q]=w.useState(!1),[ee,Y]=w.useState(null);w.useEffect(()=>{let W=!0;return be.botSubscriptions(e.id).then(P=>{W&&Y(P.chats)}).catch(()=>{}),()=>{W=!1}},[e.id]),w.useEffect(()=>{if(!V)return;const W=setTimeout(()=>q(!1),1500);return()=>clearTimeout(W)},[V]);const H=p!==e.name||j!==e.description||k!==e.systemPrompt,K=(i==null?void 0:i.status)??"stop",R=i==null?void 0:i.context;async function F(W){U(W),O("");try{await be.controlBot(e.id,W)}catch(P){O(yt(P,"common.failed"))}finally{U(null)}}async function ne(W){W.preventDefault(),M(!0),_(null);try{c(await be.saveBot(e.id,{name:p,description:j,systemPrompt:k})),_({kind:"ok",text:x("bot.saved")})}catch(P){_({kind:"error",text:yt(P,"common.saveFailed")})}finally{M(!1)}}async function L(W){if(W!==e.color){M(!0),A(null);try{c(await be.setBotColor(e.id,W))}catch(P){A({kind:"error",text:yt(P,"bot.changeFailed")})}finally{M(!1)}}}const J=W=>W&&o.jsx("p",{className:W.kind==="error"?"jv-note-error":"jv-note-ok",role:W.kind==="error"?"alert":"status",children:W.text});return o.jsx(h5,{open:!0,onOpenChange:W=>{W||d()},children:o.jsx(m5,{className:`jv-bot-info jv-ui ${v==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:v==="activity"?o.jsx(hD,{botId:e.id,botName:e.name,onBack:()=>y("info"),onOpenChat:f}):v==="usage"?o.jsx(yD,{botId:e.id,botName:e.name,onBack:()=>y("info")}):o.jsxs(o.Fragment,{children:[o.jsx(pg,{className:"jv-dialog-header",children:o.jsx(uf,{children:x("entry.botInfo")})}),o.jsxs("div",{className:"jv-bot-scroll",children:[o.jsxs("section",{className:"jv-bot-hero",children:[o.jsx(Jl,{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}),o.jsx("span",{children:e.description||x("bot.noDescription")}),o.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":x("bot.color"),children:Object.keys($i).map(W=>o.jsx("button",{type:"button",role:"radio","aria-checked":e.color===W,"aria-label":x($i[W].label),title:x($i[W].label),disabled:E,style:{background:p5(W)},onClick:()=>void L(W)},W))}),J(D)]})]}),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(W=>o.jsx("li",{children:x(W)},W))}),o.jsx("p",{className:"jv-hint",children:x("agent.note")})]})]}),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(g5,{bot:e,connections:a,onSaved:c,onManage:u}),R&&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":R.stale&&R.tokens!==null||void 0,children:[R.stale&&R.tokens!==null&&o.jsx(TD,{}),R.tokens===null?x("bot.unknown"):x("bot.tokens",{used:Ia(R.tokens),window:Ia(R.contextWindow)})]})]}),R.tokens!==null&&o.jsx("div",{className:"jv-context-bar",children:o.jsx("span",{style:{width:`${Math.min(100,Math.max(1,R.tokens/R.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:W=>void ne(W),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("info.name")}),o.jsx(Yt,{id:"jarvy-bot-name",required:!0,maxLength:80,value:p,onChange:W=>b(W.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("bot.description")}),o.jsx(a0,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:j,onChange:W=>S(W.target.value),placeholder:x("bot.descriptionPlaceholder")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:"Persona"}),o.jsx(a0,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:k,onChange:W=>C(W.target.value),placeholder:x("bot.personaPlaceholder")}),o.jsx("small",{className:"jv-hint",children:x("bot.personaHint")})]}),o.jsxs("div",{className:"jv-form-footer",children:[J((T==null?void 0:T.kind)==="error"||!H?T:null)??(H?o.jsx("p",{className:"jv-hint",children:x("bot.unsaved")}):o.jsx("span",{})),o.jsx(Oe,{type:"submit",className:"jv-primary",disabled:E||!H,children:x(E?"bot.saving":"common.save")})]})]})]}),o.jsx(ED,{bot:e,onSaved:c}),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.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.status")}),o.jsx("span",{children:x("bot.statusHint")})]}),o.jsx("span",{className:"jv-status","data-ok":K!=="stop"||void 0,"data-busy":K==="running"||void 0,children:x(AD[K])}),K==="running"&&o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",disabled:!!I,onClick:()=>void F("abort"),children:x(I==="abort"?"bot.aborting":"bot.abort")}),o.jsx(Oe,{type:"button",variant:"outline",size:"sm",disabled:!!I||!e.connectionId,onClick:()=>void F(K==="stop"?"start":"stop"),children:x(I==="start"?"bot.starting":I==="stop"?"bot.stopping":K==="stop"?"bot.start":"bot.stop")})]}),o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.workspace")}),o.jsx("code",{title:e.workspacePath,children:e.workspacePath})]}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(V?"ui.copied":"bot.copyWorkspace"),onClick:()=>void cf(e.workspacePath).then(W=>q(W)),children:V?o.jsx(Mi,{}):o.jsx(h0,{})})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("activity"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(d7,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.activity")}),o.jsx("span",{children:x("bot.activityHint")})]}),o.jsx(Zr,{className:"jv-row-chevron"})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("usage"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(I8,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("usage.title")}),o.jsx("span",{children:x("bot.usageHint")})]}),o.jsx(Zr,{className:"jv-row-chevron"})]})]}),$&&o.jsx("p",{className:"jv-note-error",role:"alert",children:$})]}),ee&&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:ee.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")})})}):ee.map(W=>{var P;return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>m(W),children:[o.jsx("span",{className:"jv-row-icon",children:W.type==="thread"?o.jsx(H4,{}):o.jsx(Q8,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:W.title}),o.jsx("span",{children:W.type==="thread"?x("bot.threadIn",{channel:((P=l.find(G=>G.id===W.parentId))==null?void 0:P.title)??""}):x("info.menu")})]}),o.jsx(Zr,{className:"jv-row-chevron"})]},W.id)})})]})]})]})})})}function v5({id:e,value:i,sections:a,onChange:l}){const[c,u]=w.useState(null);return o.jsxs(Wl,{value:i??"none",onValueChange:d=>l(d==="none"?null:d),children:[o.jsx(to,{id:e,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:o.jsx(eo,{})}),o.jsxs(no,{className:"jv-select-menu",position:"popper",sideOffset:4,container:c,children:[o.jsx(Vi,{value:"none",children:x("info.noSection")}),a.map(d=>o.jsx(Vi,{value:d.id,children:d.name},d.id))]})]})}const MD=1024*1024,RD=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],Vl=e=>`/api/attachments/${e.id}`,y5=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function df(e){const i=y5(e),a=e.mimeType.toLowerCase();return i==="svg"||a==="image/svg+xml"?"svg":a.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(i)?"image":a.startsWith("video/")?"video":a.startsWith("audio/")?"audio":["webm","mp4","mov"].includes(i)?"video":["mp3","wav","ogg"].includes(i)?"audio":["html","htm"].includes(i)||a==="text/html"?"html":["md","markdown"].includes(i)?"markdown":a.startsWith("text/")||RD.includes(i)?"text":"download"}const gc=e=>e==="image"||e==="svg",x5=e=>e==="video"||e==="audio",b5={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 j5(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}async function w5(e,i){const a=await fetch(Vl(e),{signal:i,credentials:"same-origin"});if(!a.ok)throw new Error(a.status===404?x("files.gone"):x("files.readFailed",{status:a.status}));return a.text()}async function S5(e,i){return df(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await w5(e,i))}`:Vl(e)}const eb=e=>`/api/attachments/${e.id}/run`;function OD(e){const i=new DOMParser().parseFromString(e,"text/html");let a=i.querySelectorAll("script").length;const l=new Set;return i.querySelectorAll("*").forEach(c=>{for(const u of[...c.attributes])if(u.name.startsWith("on"))a++;else if(/^\s*javascript:/i.test(u.value)&&["href","src","action","formaction","xlink:href"].includes(u.name))a++;else if(["src","href"].includes(u.name)&&c.tagName!=="A")try{const d=new URL(u.value);(d.protocol==="http:"||d.protocol==="https:")&&l.add(d.host)}catch{}}),a?{count:a,hosts:[...l]}:null}function zD(e){const i=new DOMParser().parseFromString(e,"text/html");return i.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(a=>a.remove()),i.querySelectorAll("*").forEach(a=>{for(const l of[...a.attributes])(l.name.startsWith("on")||["href","xlink:href","srcset","action","formaction","target","autofocus","contenteditable"].includes(l.name)||l.name==="src"&&!l.value.startsWith("data:image/"))&&a.removeAttribute(l.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(a.tagName)&&a.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">${i.documentElement.outerHTML}`}function DD({file:e,onSize:i}){const[a,l]=w.useState(),[c,u]=w.useState(!1);return w.useEffect(()=>{const d=new AbortController;return u(!1),S5(e,d.signal).then(l).catch(()=>{d.signal.aborted||u(!0)}),()=>d.abort()},[e.id]),c?o.jsx("span",{className:"ui-broken-image",children:o.jsx(De,{name:"image"})}):a?o.jsx("img",{src:a,alt:e.name,loading:"lazy",onError:()=>u(!0),onLoad:d=>{const{naturalWidth:f,naturalHeight:m}=d.currentTarget;f&&m&&i({width:f,height:m})}}):o.jsx(De,{name:"image"})}function LD({file:e,onOpen:i}){const[a,l]=w.useState(),c=df(e),u=gc(c),d=x5(c),f=y5(e).toUpperCase(),m=u&&a?{"--image-w":`${a.width}px`,"--image-ratio":`${a.width/a.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:i,"aria-label":x("files.preview",{name:e.name}),children:[u?o.jsx("span",{className:"ui-image-frame",children:o.jsx(DD,{file:e,onSize:l})}):o.jsx("span",{className:"ui-file-icon","data-kind":d?c:void 0,children:o.jsx(De,{name:d?`file-${c}`:"file"})}),o.jsxs("span",{className:"ui-file-copy",children:[o.jsx("strong",{title:e.name,children:e.name}),o.jsxs("small",{children:[d?`${x(b5[c])} · `:"",f?`${f} · `:"",j5(e.size)]})]})]}),o.jsx("a",{className:"ui-iconbtn",href:Vl(e),download:e.name,"aria-label":x("files.download",{name:e.name}),title:x("files.download",{name:e.name}),children:o.jsx(De,{name:"cloud-download"})})]})}function k5({files:e,onOpen:i}){const a=e.some(l=>gc(df(l)));return o.jsx("div",{className:`ui-message-files ${a?"ui-has-images":""}`,children:e.map((l,c)=>o.jsx(LD,{file:l,onOpen:()=>i(c)},l.id))})}function BD({message:e,onSettled:i}){var D;const a=e.question,l=a.secret,[c,u]=w.useState(""),[d,f]=w.useState(!1),[m,v]=w.useState(!1),[y,p]=w.useState("always"),[b,j]=w.useState(!1),[S,k]=w.useState("");if(a.state!=="pending"){const A=((D=a.answer)==null?void 0:D.selected[0])===1?"once":"always",I=a.state==="answered"?x(A==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:l.name}):x(a.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:l.name});return o.jsxs("p",{className:"jv-question-done","data-state":a.state,title:`${I}
|
|
533
|
-
${l.purpose}`,children:[a.state==="answered"?o.jsx(Mi,{"aria-hidden":"true"}):o.jsx(q4,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:I}),o.jsx("span",{className:"jv-question-asked",children:l.purpose})]})}const C=l.needsValue||m,E=c.length>0&&c.length<8;async function M(A){if(!b){j(!0),k("");try{i(await A())}catch(I){k(yt(I,"question.failed"))}finally{j(!1)}}}const T=()=>M(()=>be.fulfilSecret(e.chatId,e.id,{scope:y,...C?{value:c}:{}})),_=()=>M(()=>be.answerQuestion(e.chatId,e.id,{action:"dismiss"}));return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":x("secretCard.title",{name:l.name}),"aria-busy":b||void 0,onSubmit:A=>{A.preventDefault(),(!C||c)&&T()},children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(E4,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:"jv-question-title jv-secret-request-name",children:l.name}),o.jsx("p",{className:"jv-question-detail",children:l.purpose})]})]}),o.jsxs("div",{className:"jv-question-body",children:[!window.isSecureContext&&o.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[o.jsx(m3,{"aria-hidden":"true"}),x("secretCard.insecure")]}),l.exists&&!l.needsValue&&o.jsxs("p",{className:"jv-secret-request-note",children:[x("secretCard.exists"),o.jsx("button",{type:"button",className:"jv-secret-request-link",onClick:()=>{v(!m),u("")},children:x(m?"secretCard.keepValue":"secretCard.replace")})]}),l.exists&&l.needsValue&&o.jsx("p",{className:"jv-secret-request-note",children:x("secretCard.unreadable")}),C&&o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:x("secretCard.value")}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:d?"text":"password",autoComplete:"new-password",spellCheck:!1,autoFocus:!0,placeholder:x("secretCard.valuePlaceholder"),value:c,disabled:b,onChange:A=>u(A.target.value)}),o.jsx("button",{type:"button","aria-label":x(d?"secrets.hideValue":"secrets.showValue"),onClick:()=>f(!d),children:d?o.jsx(p0,{}):o.jsx(g0,{})})]}),o.jsx("small",{"data-short":E||void 0,children:x(E?"secrets.shortValue":"secretCard.valueHint")})]}),o.jsxs("div",{className:"jv-secret-request-scope",children:[o.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":x("secretCard.scope"),children:["always","once"].map(A=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===A,disabled:b,onClick:()=>p(A),children:x(A==="always"?"secretCard.always":"secretCard.once")},A))}),o.jsx("small",{children:x(y==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]}),S&&o.jsx("p",{className:"jv-question-error",role:"alert",children:S})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:b,onClick:()=>void _(),children:x("secretCard.decline")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:b||C&&!c,children:x(C?"secretCard.saveAllow":"secretCard.allow")})]})]})}const tb=e=>String.fromCharCode(65+e),nb=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function C5(e){const{message:i}=e,a=i.question.secret;return a?o.jsx(BD,{message:{...i,question:{...i.question,secret:a}},onSettled:e.onSettled}):o.jsx(ID,{...e})}function ID({message:e,keyboard:i,onSettled:a}){var M,T;const l=e.question,c=l.state==="pending",u=w.useId(),[d,f]=w.useState([]),[m,v]=w.useState(""),[y,p]=w.useState(!1),[b,j]=w.useState("");async function S(_){if(!(y||!c)){p(!0),j("");try{a(await be.answerQuestion(e.chatId,e.id,_))}catch(D){j(yt(D,"question.failed"))}finally{p(!1)}}}const k=_=>{if(!l.multiple){S({action:"answer",selected:[_]});return}f(D=>D.includes(_)?D.filter(A=>A!==_):[...D,_])},C=()=>void S({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),E=()=>{m.trim()&&(l.multiple?C():S({action:"answer",selected:[],custom:m.trim()}))};if(w.useEffect(()=>{if(!i||!c)return;const _=D=>{if(D.defaultPrevented||D.metaKey||D.ctrlKey||D.altKey||D.key.length!==1||nb(D.target)||nb(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const A=D.key.toUpperCase().charCodeAt(0)-65;A<0||A>=l.options.length||(D.preventDefault(),k(A))};return document.addEventListener("keydown",_,!0),()=>document.removeEventListener("keydown",_,!0)}),!c){const _=l.state==="answered"?[...(((M=l.answer)==null?void 0:M.selected)??[]).map(D=>{var A;return((A=l.options[D])==null?void 0:A.label)??""}),...(T=l.answer)!=null&&T.custom?[l.answer.custom]:[]].filter(Boolean).join(x("common.listSeparator")):null;return o.jsxs("p",{className:"jv-question-done","data-state":l.state,title:`${l.question}
|
|
534
|
-
${_===null?x("question.dismissed"):x("question.chose",{answer:_})}`,children:[_===null?o.jsx(q4,{"aria-hidden":"true"}):o.jsx(Mi,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:_===null?x("question.dismissed"):f0("question.chose",{answer:o.jsx("strong",{children:_})})}),o.jsx("span",{className:"jv-question-asked",children:l.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(z4,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{id:u,className:"jv-question-title",children:l.question}),l.detail&&o.jsx("p",{className:"jv-question-detail",children:l.detail})]}),o.jsx("button",{type:"button",className:"jv-question-dismiss","aria-label":x("question.dismissLabel"),title:x("question.dismiss"),disabled:y,onClick:()=>void S({action:"dismiss"}),children:o.jsx(os,{"aria-hidden":"true"})})]}),o.jsxs("div",{className:"jv-question-body",children:[o.jsx("div",{className:"jv-question-options",role:l.multiple?"group":void 0,"aria-label":l.multiple?x("question.multiple"):void 0,children:l.options.map((_,D)=>{const A=d.includes(D);return o.jsxs("button",{type:"button",className:"jv-question-option","data-style":_.style,"data-on":A||void 0,"aria-pressed":l.multiple?A:void 0,"aria-keyshortcuts":i?tb(D).toLowerCase():void 0,disabled:y,onClick:()=>k(D),children:[o.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:A?o.jsx(Mi,{}):tb(D)}),o.jsxs("span",{className:"jv-question-copy",children:[o.jsx("strong",{children:_.label}),_.description&&o.jsx("small",{children:_.description})]})]},_.label)})}),b&&o.jsx("p",{className:"jv-question-error",role:"alert",children:b})]}),(l.allowCustom||l.multiple)&&o.jsxs("div",{className:"jv-question-foot",children:[l.allowCustom&&o.jsx("input",{className:"jv-question-custom",value:m,maxLength:2e3,placeholder:x(l.multiple?"question.note":"question.own"),"aria-label":x("question.ownLabel"),disabled:y,onChange:_=>v(_.target.value),onKeyDown:_=>{_.key==="Enter"&&!_.nativeEvent.isComposing&&(_.preventDefault(),E())}}),l.multiple?o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:C,children:d.length?x("question.confirmCount",{count:d.length}):x("question.confirm")}):o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!m.trim(),onClick:E,children:x("question.send")})]})]})}function qa(e){return e?e.deleted?x("member.deleted",{name:e.name}):e.name:x("member.unknown")}const HD={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},N5=e=>x(HD[e??""]??"activity.running"),la=e=>e.filter(i=>!i.deleted);function PD(e){const i=new Set(e.map(l=>l.toLowerCase()));let a=x("bot.newName");for(let l=2;i.has(a.toLowerCase());l++)a=x("bot.newNameN",{n:l});return a}const fp=/[\p{Script=Latin}\p{Nd}_]/u;function gg(e,i){const a=e.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),l=a.toLowerCase(),c=[...i].sort((d,f)=>f.name.length-d.name.length),u=[];for(let d=l.indexOf("@");d>=0;d=l.indexOf("@",d+1)){if(d>0&&fp.test(a[d-1]))continue;const f=c.find(m=>{const v=m.name.toLowerCase();if(!v||!l.startsWith(v,d+1))return!1;const y=a[d+1+v.length];return!(y&&fp.test(y)&&fp.test(v.at(-1)))});f&&(u.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return u}function UD(e,i,a){let l="",c=0;for(const u of gg(e,i))l+=e.slice(c,u.at)+`[${e.slice(u.at,u.at+u.length)}](${u.member.id===a?"#mention-me":"#mention"})`,c=u.at+u.length;return l+e.slice(c)}const E5=/\[\[q(\d+)\]\]/g,r0=(e,i=40)=>{const a=e.replace(/\s+/g," ").trim();return a.length>i?`${a.slice(0,i)}…`:a};function vg(e){return e.content.replace(E5,(i,a)=>{const l=e.quotes[Number(a)-1];return l?x("quote.inline",{text:l.text}):i})}function Bc(e){return vg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||x("common.attachment")}function T5({message:e,members:i,me:a,onJump:l}){const c=UD(e.content,i.filter(d=>e.mentions.includes(d.id)),a).replace(E5,(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=qa(i.find(v=>v.id===f.senderId));return o.jsxs("button",{type:"button",className:"jv-quote-tag",title:x("sidebar.said",{name:m,text:f.text}),"data-gone":f.messageId?void 0:"",onClick:()=>l==null?void 0:l(f.messageId,f.text),children:[o.jsx(De,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:m})}),o.jsx("span",{className:"jv-quote-text",children:r0(f.text,80)})]})};return o.jsx(Lc,{text:c,renderQuote:u})}function A5(e,i){var p;const a=i.replace(/\s+/g,"");if(!a||typeof CSS>"u"||!("highlights"in CSS))return!1;const l=e.querySelector(".ui-bubble")??e,c=document.createTreeWalker(l,NodeFilter.SHOW_TEXT),u=[];for(let b=c.nextNode();b;b=c.nextNode())if(!((p=b.parentElement)!=null&&p.closest(".jv-quote-tag, button")))for(let j=0;j<b.data.length;j++)/\s/.test(b.data[j])||u.push({node:b,offset:j});const d=u.map(b=>b.node.data[b.offset]).join(""),f=d.indexOf(a);if(f<0)return!1;const m=u[f],v=u[f+a.length-1],y=new Range;return y.setStart(m.node,m.offset),y.setEnd(v.node,v.offset+1),CSS.highlights.set("jv-passage",new Highlight(y)),setTimeout(()=>CSS.highlights.delete("jv-passage"),2400),!0}function _5(e,i){e.scrollIntoView({block:"center",behavior:"smooth"}),!(i&&A5(e,i))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function qD({quotes:e,onRemove:i}){return e.length?o.jsx("div",{className:"jv-compose-quotes",children:e.map((a,l)=>o.jsxs("span",{className:"jv-quote-tag",title:x("sidebar.said",{name:a.name,text:a.text}),children:[o.jsx(De,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:a.name})}),o.jsx("span",{className:"jv-quote-text",children:r0(a.text)}),o.jsx("button",{type:"button","aria-label":x("quote.remove",{text:r0(a.text,20)}),onClick:()=>i(l),children:"×"})]},l))}):null}function M5({container:e,drafts:i,chatId:a,source:l,members:c,onNotice:u}){const d=(y,p)=>{const b=l(y);b&&!FD(i,a,b,c,p)&&u(x("quote.tooMany",{count:10}))},[f,m]=w.useState(null);if(w.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const p=E=>{var M;return(M=E instanceof Element?E:E==null?void 0:E.parentElement)==null?void 0:M.closest(".ui-bubble")},b=()=>{var A,I;const E=getSelection(),M=(E==null?void 0:E.toString())??"";if(!E||E.isCollapsed||!M.trim()){m(null);return}const T=p(E.anchorNode),_=T==null?void 0:T.closest("[data-message]");if(!T||!_||!y.contains(T)||p(E.focusNode)!==T||(I=(A=E.anchorNode)==null?void 0:A.parentElement)!=null&&I.closest(".jv-quote-tag, button")){m(null);return}const D=E.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(D.left+D.width/2,90),innerWidth-90),y:Math.max(D.top-8,48),messageId:_.getAttribute("data-message"),text:M.trim()})},j=()=>requestAnimationFrame(b),S=()=>m(null),k=E=>{E.key==="Escape"&&S()},C=()=>{var E;(E=getSelection())!=null&&E.isCollapsed&&S()};return y.addEventListener("mouseup",j),y.addEventListener("scroll",S,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",C),()=>{y.removeEventListener("mouseup",j),y.removeEventListener("scroll",S,!0),document.removeEventListener("keydown",k),document.removeEventListener("selectionchange",C)}},[e]),!f)return null;const v=()=>{var y;m(null),(y=getSelection())==null||y.removeAllRanges()};return o.jsxs("div",{className:"ui-popover jv-selection-menu",role:"menu","aria-label":x("quote.selection"),style:{left:f.x,top:f.y},onMouseDown:y=>y.preventDefault(),children:[o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{cf(f.text),v()},children:[o.jsx(De,{name:"copy"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.copy")})]}),o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{d(f.messageId,f.text),v()},children:[o.jsx(De,{name:"quote"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.quote")})]})]})}function FD(e,i,a,l,c){if(e.get(i).passages.length>=10)return!1;const u={messageId:a.id,name:qa(l.find(d=>d.id===a.senderId)),text:c};return e.update(i,d=>({passages:[...d.passages,u]})),!0}const VD=["👍","👎","✅","❌","😄","😂","😵💫","🤔"],ib=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function R5({message:e,members:i,onJump:a}){if(!e.replyTo)return null;const l=i.find(c=>c.id===e.replyTo.senderId);return o.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>a(e.replyTo.id),children:[o.jsx("span",{className:"jv-reply-author",children:qa(l)}),o.jsx("span",{className:"jv-reply-text",children:Bc(e.replyTo)})]})}function O5({message:e,me:i,members:a,onReact:l,onError:c}){return e.reactions.length?o.jsx("div",{className:"jv-reactions",children:e.reactions.map(u=>{const d=u.memberIds.includes(i);return o.jsxs("button",{type:"button",className:"jv-reaction","data-mine":d||void 0,title:u.memberIds.map(f=>qa(a.find(m=>m.id===f))).join(x("common.listSeparator")),onClick:()=>{try{l(e,u.emoji,!d)}catch(f){c(f)}},children:[o.jsx("span",{className:"jv-reaction-emoji",children:u.emoji}),o.jsx("span",{className:"jv-reaction-count",children:u.memberIds.length})]},u.emoji)})}):null}function z5({message:e,me:i,onReply:a,onReact:l,onError:c}){const[u,d]=w.useState(!1),[f,m]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{if(!u)return;const b=j=>{var S;(S=v.current)!=null&&S.contains(j.target)||d(!1)};return document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)},[u]);const y=b=>{var S;const j=!((S=e.reactions.find(k=>k.emoji===b))!=null&&S.memberIds.includes(i));try{l(e,b,j)}catch(k){c(k)}d(!1)},p=()=>{var S,k,C;const b=(S=v.current)==null?void 0:S.getBoundingClientRect(),j=(C=(k=v.current)==null?void 0:k.closest(".ui-transcript, .ui-pane-body"))==null?void 0:C.getBoundingClientRect();m(!!b&&((j==null?void 0:j.bottom)??window.innerHeight)-b.bottom<240),d(!u)};return o.jsxs("div",{className:"jv-message-actions",ref:v,children:[a&&o.jsx(ut,{icon:"arrow-u-up-right",label:x("actions.reply"),onClick:()=>a(e)}),o.jsx(ut,{icon:"smiley-plus",label:x("actions.react"),"aria-expanded":u,onClick:p}),u&&o.jsxs("div",{className:"jv-emoji-menu",role:"menu","aria-label":x("actions.pickEmoji"),"data-up":f||void 0,children:[o.jsx("div",{className:"jv-emoji-quick",children:VD.map(b=>o.jsx("button",{type:"button",role:"menuitem",onClick:()=>y(b),children:b},b))}),o.jsxs("details",{className:"jv-emoji-more",children:[o.jsx("summary",{children:x("actions.more")}),o.jsx("div",{className:"jv-emoji-grid",children:ib.filter((b,j)=>ib.indexOf(b)===j).map(b=>o.jsx("button",{type:"button",onClick:()=>y(b),children:b},b))})]})]})]})}const D5="jarvy-notice-closed",$D=()=>{try{return JSON.parse(localStorage.getItem(D5)??"[]")}catch{return[]}};function yr({member:e,bots:i,size:a,working:l=!1}){const c=(e==null?void 0:e.kind)==="bot"?i.find(u=>u.id===e.id):void 0;return c?o.jsx(Jl,{color:c.color,mood:c.mood,size:a,badge:l?"working":void 0,crown:c.agent}):o.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:a,height:a,fontSize:Math.round(a*.38)},children:((e==null?void 0:e.name)??"?").slice(0,2).toUpperCase()})}function GD({chat:e,members:i,bots:a,infoOpen:l,membersOpen:c,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:v,onThreads:y,onSearch:p}){const b=i.filter(j=>e.memberIds.includes(j.id));return o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(ut,{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":l,onClick:m,children:[o.jsx("span",{className:"jv-hash",children:"#"}),e.title,o.jsx(De,{name:"chevron-down"})]}),e.topic&&o.jsx("span",{className:"jv-channel-topic",children:e.topic})]}),o.jsxs("div",{className:"ui-header-actions",children:[o.jsxs("button",{type:"button",className:"jv-members-button","aria-label":x("channel.membersCount",{count:b.length}),"aria-pressed":c,title:x("channel.members"),onClick:v,children:[o.jsx("span",{className:"jv-stack",children:b.slice(0,3).map(j=>o.jsx("span",{className:"jv-stack-item",children:o.jsx(yr,{member:j,bots:a,size:22})},j.id))}),o.jsx("span",{className:"jv-members-count",children:b.length})]}),o.jsx(ut,{icon:"search",label:x("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:p}),o.jsx(ut,{icon:"chat-bubble",label:x("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function YD({chat:e,onSave:i}){var j;const[a,l]=w.useState($D),[c,u]=w.useState(null),[d,f]=w.useState(!1);w.useEffect(()=>u(null),[e.id]);const m=!a.includes(e.id),v=e.note,y=()=>l(S=>{const k=m?[...S,e.id]:S.filter(C=>C!==e.id);return localStorage.setItem(D5,JSON.stringify(k)),k}),p=async()=>{if(c!=null&&c.trim()){f(!0);try{await i(c.trim()),u(null)}finally{f(!1)}}};if(c!==null)return o.jsxs("div",{className:"jv-notice","data-editing":!0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsx(De,{name:"megaphone"}),o.jsx("strong",{children:x("notice.edit")})]}),o.jsx("textarea",{className:"jv-notice-input",value:c,autoFocus:!0,"aria-label":x("notice.content"),onChange:S=>u(S.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>u(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!c.trim(),onClick:()=>void p(),children:x("common.save")})]})]});if(!v)return o.jsxs("div",{className:"jv-notice","data-empty":!0,children:[o.jsx(De,{name:"megaphone"}),o.jsx("span",{className:"jv-muted",children:x("notice.none")}),o.jsx(ut,{icon:"pencil",label:x("notice.edit"),onClick:()=>u("")})]});const b=((j=v.text.split(`
|
|
535
|
-
`).find(S=>S.trim()&&!S.startsWith("#")))==null?void 0:j.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-notice","data-open":m||void 0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsxs("button",{type:"button",className:"jv-notice-toggle","aria-expanded":m,onClick:y,children:[o.jsx(De,{name:"megaphone"}),o.jsx("strong",{children:x("notice.title")}),!m&&o.jsx("span",{className:"jv-notice-first",children:b}),o.jsx(De,{name:m?"chevron-down":"chevron-right"})]}),o.jsxs("span",{className:"jv-muted jv-notice-meta",children:[v.updatedBy.name," · ",oa(v.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",x("notice.version",{version:v.version})]}),o.jsx(ut,{icon:"pencil",label:x("notice.edit"),onClick:()=>u(v.text)})]}),m&&o.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:o.jsx(Lc,{text:v.text})})]})}function Ud({messages:e,members:i,bots:a,me:l,divider:c,activeQuestion:u,onSettled:d,onPreview:f,onReply:m,onOpenThread:v,onQuote:y,onReact:p,onJump:b,onError:j}){var k;const S=(k=e.find(C=>C.sequence>c&&C.senderId!==l))==null?void 0:k.id;return o.jsx(o.Fragment,{children:e.map((C,E)=>{const M=e[E-1],T=i.find(D=>D.id===C.senderId),_=!!M&&M.senderId===C.senderId&&C.createdAt-M.createdAt<5*6e4&&C.id!==S;return o.jsxs("div",{children:[C.id===S&&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":_||void 0,"data-mention":C.mentions.includes(l)||void 0,children:[o.jsx("div",{className:"jv-row-gutter",children:_?o.jsx("time",{className:"jv-row-time",children:fc(C.createdAt)}):o.jsx(yr,{member:T,bots:a,size:32})}),o.jsxs("div",{className:"jv-row-body",children:[!_&&o.jsxs("div",{className:"jv-row-head",children:[o.jsx("strong",{children:qa(T)}),(T==null?void 0:T.kind)==="bot"&&o.jsx("span",{className:"jv-role",children:"Bot"}),o.jsx("time",{children:fc(C.createdAt)})]}),C.echoOf&&o.jsx("button",{type:"button",className:"jv-echo",onClick:()=>v==null?void 0:v(C.echoOf.id),children:x("channel.echo",{title:C.echoOf.title})}),C.replyTo&&o.jsx(R5,{message:C,members:i,onJump:D=>b==null?void 0:b(D)}),C.question?o.jsx(C5,{message:{...C,question:C.question},keyboard:C.id===u,onSettled:d}):o.jsxs("div",{className:"ui-bubble jv-flat",children:[C.content&&o.jsx(T5,{message:C,members:i,me:l,onJump:b}),C.attachments.length>0&&o.jsx(k5,{files:C.attachments,onOpen:D=>f(C.attachments,D)})]}),p&&o.jsx(O5,{message:C,me:l,members:i,onReact:p,onError:j??(()=>{})}),C.thread&&C.thread.replies>0&&o.jsxs("button",{type:"button",className:"jv-thread-link","data-done":C.thread.status==="done"||void 0,onClick:()=>v==null?void 0:v(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:fc(C.thread.lastReplyAt)})})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[m&&!C.echoOf&&o.jsx(ut,{icon:"chat-bubble",label:x("channel.replyInThread"),onClick:()=>m(C)}),p&&o.jsx(z5,{message:C,me:l,onReply:y,onReact:p,onError:j??(()=>{})})]})]})]},C.id)})})}function L5({candidates:e,bots:i,busy:a,onCancel:l,onConfirm:c}){const[u,d]=w.useState(""),[f,m]=w.useState([]),v=e.filter(p=>p.name.toLowerCase().includes(u.trim().toLowerCase())),y=p=>m(b=>b.includes(p)?b.filter(j=>j!==p):[...b,p]);return o.jsxs("div",{className:"jv-picker",children:[o.jsx("div",{className:"ui-field",children:o.jsx("input",{type:"search",value:u,autoFocus:!0,placeholder:x("common.searchMembers"),"aria-label":x("common.searchMembers"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),v.length===1&&y(v[0].id))}})}),o.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":x("dialogs.candidates"),children:[v.map(p=>o.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(p.id),className:"jv-member-option",onClick:()=>y(p.id),children:[o.jsx(yr,{member:p,bots:i,size:24}),o.jsx("span",{className:"jv-member-name",children:p.name}),o.jsx("span",{className:"jv-muted",children:p.kind==="bot"?"Bot":x("common.member")}),o.jsx("span",{className:"jv-check",children:f.includes(p.id)&&o.jsx(De,{name:"check"})})]},p.id)),v.length===0&&o.jsx("p",{className:"jv-picker-empty",children:x(e.length?"common.noMatch":"dialogs.allInside")})]}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:l,children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:a||f.length===0,onClick:()=>c(f),children:f.length?x("dialogs.addCount",{count:f.length}):x("common.add")})]})]})}function XD({chat:e,members:i,bots:a,onClose:l,onChanged:c}){const[u,d]=w.useState(!1),[f,m]=w.useState("");async function v(y){d(!0),m("");try{let p=e;for(const b of y)p=await be.addMember(e.id,b);c(p),l()}catch(p){m(yt(p,"dialogs.addFailed"))}finally{d(!1)}}return o.jsxs(rs,{title:x("info.addMembers"),onClose:l,className:"jv-channel-dialog",children:[o.jsx(L5,{candidates:i.filter(y=>!e.memberIds.includes(y.id)),bots:a,busy:u,onCancel:l,onConfirm:y=>void v(y)}),f&&o.jsx("p",{className:"jv-form-error",role:"alert",children:f})]})}function KD({sections:e,members:i,bots:a,me:l,onClose:c,onSaved:u}){const d=w.useId(),[f,m]=w.useState(""),[v,y]=w.useState(""),[p,b]=w.useState(null),[j,S]=w.useState([l]),[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState("");async function D(I){if(I.preventDefault(),!(!f.trim()||E)){M(!0),_("");try{u(await be.createChannel({name:f.trim(),topic:v.trim(),sectionId:p,memberIds:j.filter(U=>U!==l)}))}catch(U){_(yt(U,"common.saveFailed"))}finally{M(!1)}}}const A=i.filter(I=>j.includes(I.id));return k?o.jsx(rs,{title:x("info.addMembers"),onClose:c,className:"jv-channel-dialog",children:o.jsx(L5,{candidates:i.filter(I=>!j.includes(I.id)),bots:a,busy:!1,onCancel:()=>C(!1),onConfirm:I=>{S(U=>[...U,...I]),C(!1)}})}):o.jsx(rs,{title:x("sidebar.newChannel"),onClose:c,className:"jv-channel-dialog",children:o.jsxs("form",{onSubmit:I=>void D(I),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:I=>m(I.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-topic`,children:x("info.topic")}),o.jsx("input",{id:`${d}-topic`,value:v,maxLength:200,placeholder:x("dialogs.optional"),onChange:I=>y(I.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-section`,children:x("info.section")}),o.jsx(v5,{id:`${d}-section`,value:p,sections:e,onChange:b})]}),o.jsxs("div",{className:"jv-members",children:[o.jsxs("div",{className:"jv-members-head",children:[o.jsxs("span",{children:[x("channel.members")," · ",A.length]}),o.jsxs("button",{type:"button",className:"ui-button",onClick:()=>C(!0),children:[o.jsx(De,{name:"person-add"}),x("info.addMembers")]})]}),A.map(I=>o.jsxs("div",{className:"jv-member-option",children:[o.jsx(yr,{member:I,bots:a,size:24}),o.jsx("span",{className:"jv-member-name",children:I.name}),o.jsx("span",{className:"jv-muted",children:I.id===l?x("common.you"):I.kind==="bot"?"Bot":x("common.member")}),I.id!==l&&o.jsx(ut,{icon:"close",label:x("members.remove",{name:I.name}),className:"jv-member-remove",onClick:()=>S(U=>U.filter($=>$!==I.id))})]},I.id))]}),T&&o.jsx("p",{className:"jv-form-error",role:"alert",children:T}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:c,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:E||!f.trim(),children:x("common.create")})]})]})})}function QD({section:e,onClose:i,onSaved:a,onDeleted:l}){const c=w.useId(),[u,d]=w.useState((e==null?void 0:e.name)??""),[f,m]=w.useState(!1),[v,y]=w.useState("");async function p(j){if(j.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{a(e?await be.updateSection(e.id,{name:u.trim()}):await be.createSection({name:u.trim()}))}catch(S){y(yt(S,"common.saveFailed")),m(!1)}}}async function b(){if(!(!e||!confirm(x("dialogs.deleteSection",{name:e.name})))){m(!0);try{await be.deleteSection(e.id),l==null||l(e.id)}catch(j){y(yt(j,"dialogs.deleteFailed")),m(!1)}}}return o.jsx(rs,{title:x(e?"dialogs.editSection":"sidebar.newSection"),onClose:i,children:o.jsxs("form",{onSubmit:j=>void p(j),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${c}-name`,children:x("dialogs.sectionName")}),o.jsx("input",{id:`${c}-name`,value:u,maxLength:80,autoFocus:!0,placeholder:x("dialogs.newSection"),onChange:j=>d(j.target.value)})]}),v&&o.jsx("p",{className:"jv-form-error",role:"alert",children:v}),o.jsxs("div",{className:"ui-dialog-actions",children:[e&&o.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void b(),children:x("common.delete")}),o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:i,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 ZD({bot:e,chats:i,onClose:a,onConfirm:l}){const[c,u]=w.useState(!1),[d,f]=w.useState(!1);return o.jsx(rs,{title:x("deleteBot.title",{name:e.name}),onClose:a,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:i})}),o.jsx("li",{children:x("deleteBot.messages",{name:x("member.deleted",{name:e.name})})}),o.jsx("li",{children:x("deleteBot.history")})]}),o.jsxs("label",{className:"jv-checkline",children:[o.jsx("input",{type:"checkbox",checked:c,onChange:m=>u(m.target.checked)}),o.jsx("span",{children:x("deleteBot.files")})]}),o.jsx("p",{className:"jv-hint",children:x("deleteBot.filesHint")}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Oe,{type:"button",variant:"ghost",onClick:a,children:x("common.cancel")}),o.jsx(Oe,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),l(c).finally(()=>f(!1))},children:x(d?"deleteBot.deleting":"common.delete")})]})]})})}function B5({title:e,body:i,confirm:a,onClose:l,onConfirm:c}){const[u,d]=w.useState(!1);return o.jsx(rs,{title:e,onClose:l,className:"jv-dialog",children:o.jsxs("div",{className:"jv-dialog-body",children:[o.jsx("p",{children:i}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Oe,{type:"button",variant:"ghost",onClick:l,children:x("common.cancel")}),o.jsx(Oe,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),c().finally(()=>d(!1))},children:u?x("deleteBot.working"):a})]})]})})}function JD({target:e,x:i,y:a,onClose:l,onOpenBot:c,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:v}){const y=w.useRef(null);w.useEffect(()=>{const j=k=>{var C;(C=y.current)!=null&&C.contains(k.target)||l()},S=k=>{k.key==="Escape"&&l()};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",S),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",S)}},[l]);const p=e.chat,b={left:Math.max(8,Math.min(i,window.innerWidth-200)),top:Math.max(8,Math.min(a,window.innerHeight-210))};return o.jsxs("div",{ref:y,className:"ui-popover jv-entry-menu",role:"menu","aria-label":x("entry.menu"),style:b,children:[p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(p,!p.pinned),l()},children:[o.jsx(De,{name:"pin"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.pinned?"entry.unpin":"entry.pin")})]}),p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(p,!p.muted),l()},children:[o.jsx(De,{name:p.muted?"bell":"bell-slash"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{c(e.bot),l()},children:[o.jsx(De,{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),l()},children:[o.jsx(De,{name:"info"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.channelInfo")})]}),!(e.kind==="dm"&&e.bot.agent)&&o.jsx("hr",{className:"ui-menu-divider"}),e.kind==="dm"?!e.bot.agent&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{v(e.bot),l()},children:[o.jsx(De,{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),l()},children:[o.jsx(De,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})}function WD({files:e,initialIndex:i=0,onClose:a}){const[l,c]=w.useState(i),[u,d]=w.useState("preview"),[f,m]=w.useState(!1),[v,y]=w.useState(""),[p,b]=w.useState(""),[j,S]=w.useState(""),[k,C]=w.useState(!0),[E,M]=w.useState(0),[T,_]=w.useState(!1),[D,A]=w.useState(!1),I=w.useRef(null),U=w.useRef(null),$=w.useRef(new Map),O=e[l],V=df(O),q=x5(V),ee=!q&&O.size>MD,Y=!q&&!ee&&V!=="download";w.useEffect(()=>{const J=I.current,W=document.activeElement;return J.showModal(),()=>{J.close(),W!=null&&W.isConnected&&W.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const J=new AbortController;return y(""),b(""),S(""),d("preview"),_(!1),A(!1),C(Y),Y&&(gc(V)?S5(O,J.signal).then(b):w5(O,J.signal).then(y)).then(()=>C(!1)).catch(W=>{J.signal.aborted||(S(yt(W,"files.readError")),C(!1))}),()=>J.abort()},[O.id,E]),w.useEffect(()=>{U.current&&(U.current.scrollTop=$.current.get(`${l}:${u}`)??0)},[l,u,k]);const H=()=>{var J;return $.current.set(`${l}:${u}`,((J=U.current)==null?void 0:J.scrollTop)??0)},K=J=>{H(),c(Math.max(0,Math.min(e.length-1,J)))},R=w.useMemo(()=>V==="html"&&v?OD(v):null,[V,v]),F=Y&&["markdown","html"].includes(V)&&!k&&!j,ne=gc(V)||q&&!D?"ui-image-view":V==="html"&&u==="preview"?"ui-html-view":V==="markdown"&&u==="preview"?"ui-document":"",L=o.jsxs("a",{className:"ui-button",href:Vl(O),download:O.name,children:[o.jsx(De,{name:"cloud-download"}),x("files.downloadFile")]});return io.createPortal(o.jsxs("dialog",{ref:I,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:J=>{J.preventDefault(),a()},onKeyDown:J=>{!["ArrowLeft","ArrowRight"].includes(J.key)||["SELECT","INPUT","TEXTAREA"].includes(J.target.tagName)||(J.preventDefault(),K(l+(J.key==="ArrowLeft"?-1:1)))},children:[o.jsxs("header",{className:"ui-preview-header",children:[o.jsxs("div",{className:"ui-preview-heading",children:[o.jsx("h1",{id:"jvPreviewTitle",children:O.name}),o.jsxs("small",{children:[x(b5[V])," · ",j5(O.size)]})]}),o.jsxs("div",{className:"ui-preview-actions",children:[F&&o.jsx("button",{type:"button",className:"ui-button",onClick:()=>{H(),d(u==="source"?"preview":"source")},children:x(u==="source"?"files.showPreview":V==="html"?"files.showSource":"files.showText")}),T&&o.jsx(ut,{icon:"window",label:x("files.openTab"),onClick:()=>window.open(eb(O),"_blank","noopener,noreferrer")}),o.jsx("a",{className:"ui-iconbtn",href:Vl(O),download:O.name,"aria-label":x("files.download",{name:O.name}),title:x("files.download",{name:O.name}),children:o.jsx(De,{name:"cloud-download"})}),o.jsx(ut,{icon:f?"arrows-contract":"arrows-expand",label:x(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),o.jsx(ut,{icon:"close",label:x("files.closePreview"),"data-action":"ui-close",onClick:a})]})]}),R&&u==="preview"&&!k&&!j&&o.jsxs("div",{className:"jv-run-tip",role:"status",children:[o.jsx("p",{children:T?x("files.running"):x("files.scripts",{count:R.count,hosts:R.hosts.length?x("files.scriptHosts",{hosts:R.hosts.slice(0,3).join(x("common.listSeparator"))+(R.hosts.length>3?x("files.andMore"):"")}):""})}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>_(!T),children:x(T?"files.stop":"files.run")})]}),o.jsx("div",{className:`ui-preview-body ${ne}`,ref:U,tabIndex:-1,children:q?D?o.jsxs("div",{className:"ui-fallback",children:[o.jsx(De,{name:`file-${V}`}),o.jsx("strong",{children:x("files.cantPlay")}),o.jsx("p",{children:x("files.cantPlayHint")}),L]}):V==="video"?o.jsx("video",{className:"ui-preview-video",src:Vl(O),controls:!0,preload:"metadata",playsInline:!0,onError:()=>A(!0)},O.id):o.jsx("audio",{className:"ui-preview-audio",src:Vl(O),controls:!0,preload:"metadata",onError:()=>A(!0)},O.id):Y?k?o.jsx("p",{className:"ui-unloaded",children:x("files.reading")}):j?o.jsxs("div",{className:"ui-error",role:"alert",children:[o.jsx("p",{children:j}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(J=>J+1),children:x("common.retry")})]}):gc(V)?o.jsx("img",{className:"ui-preview-image",src:p,alt:O.name}):u==="source"||V==="text"?o.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):V==="html"?T?o.jsx("iframe",{title:x("files.runningTitle",{name:O.name}),sandbox:"allow-scripts",src:eb(O),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):o.jsx("iframe",{title:O.name,sandbox:"",srcDoc:zD(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):o.jsx("article",{className:"ui-prose",children:o.jsx(Lc,{text:v})}):o.jsxs("div",{className:"ui-fallback",children:[o.jsx(De,{name:"file"}),o.jsx("strong",{children:x("files.downloadToView")}),o.jsx("p",{children:x(ee?"files.tooLarge":"files.unsupported")}),L]})}),e.length>1&&o.jsxs("footer",{className:"ui-preview-nav",children:[o.jsx(ut,{icon:"chevron-left",label:x("files.previous"),disabled:l===0,onClick:()=>K(l-1)}),o.jsx("select",{id:"ui-preview-select","aria-label":x("files.choose"),value:l,onChange:J=>K(Number(J.target.value)),children:e.map((J,W)=>o.jsx("option",{value:W,children:J.name},J.id))}),o.jsxs("span",{children:[l+1," / ",e.length]}),o.jsx(ut,{icon:"chevron-right",label:x("files.next"),disabled:l===e.length-1,onClick:()=>K(l+1)})]})]}),document.body)}function eL({dialog:e,entryMenu:i,confirm:a,preview:l,infoBot:c,bots:u,statuses:d,chats:f,sections:m,members:v,connections:y,meId:p,onDialog:b,onEntryMenu:j,onConfirm:S,onPreview:k,onInfoBot:C,onSettings:E,onChannelInfo:M,onOpenChatId:T,chatSaved:_,openChat:D,onSectionSaved:A,onSectionDeleted:I,updateBot:U,openAnywhere:$,removeChannel:O,deleteBot:V,pinChat:q,muteChat:ee}){return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&o.jsx(KD,{sections:m,members:la(v),bots:u,me:p,onClose:()=>b(null),onSaved:Y=>{_(Y),b(null),D(Y)}}),(e==null?void 0:e.kind)==="members"&&o.jsx(XD,{chat:f.find(Y=>Y.id===e.chat.id)??e.chat,members:la(v),bots:u,onClose:()=>b(null),onChanged:_}),(e==null?void 0:e.kind)==="section"&&o.jsx(QD,{section:e.section,onClose:()=>b(null),onSaved:A,onDeleted:I}),i&&o.jsx(JD,{target:i.target,x:i.at.x,y:i.at.y,onClose:()=>j(null),onOpenBot:Y=>C(Y.id),onSettings:Y=>{Y.type==="channel"&&M(Y)},onPin:(Y,H)=>void q(Y,H),onMute:(Y,H)=>void ee(Y,H),onDeleteChat:Y=>S({kind:"chat",chat:Y}),onDeleteBot:Y=>S({kind:"bot",bot:Y})}),(a==null?void 0:a.kind)==="chat"&&o.jsx(B5,{title:x("app.deleteChannelTitle",{name:a.chat.title}),confirm:x("common.delete"),onClose:()=>S(null),body:x("app.deleteChannelBody"),onConfirm:async()=>{await O(a.chat),S(null)}}),(a==null?void 0:a.kind)==="bot"&&o.jsx(ZD,{bot:a.bot,chats:f.filter(Y=>Y.type==="dm"&&Y.botId===a.bot.id).length,onClose:()=>S(null),onConfirm:async Y=>{await V(a.bot,Y),S(null)}}),c&&o.jsx(_D,{bot:c,status:d[c.id],connections:y,chats:f,onSaved:U,onOpenChat:Y=>{C(null),T(Y)},onOpenSubscription:$,onManageModels:()=>{C(null),E()},onClose:()=>C(null)},c.id),l&&o.jsx(WD,{files:l.files,initialIndex:l.index,onClose:()=>k(null)})]})}function I5(e,i,a){const[l,c]=w.useState(null),[u,d]=w.useState(!1);return w.useEffect(()=>{const f=e.trim();if(!f){c(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void be.search(f,i).then(y=>{m&&c(y)}).catch(y=>{m&&a(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[e,i]),{result:l,loading:u}}function H5(e,i,a){var l;return e.type==="thread"?`#${((l=i.find(c=>c.id===e.parentId))==null?void 0:l.title)??x("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:qa(a.find(c=>c.id===e.botId))}function P5({text:e,query:i,room:a=24}){const l=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),c=l.toLocaleLowerCase().indexOf(i.trim().toLocaleLowerCase());if(c<0||!i.trim())return o.jsx(o.Fragment,{children:l.slice(0,120)});const u=Math.max(0,c-a),d=c+i.trim().length;return o.jsxs(o.Fragment,{children:[u>0&&"…",l.slice(u,c),o.jsx("mark",{className:"jv-hit",children:l.slice(c,d)}),l.slice(d,d+120)]})}const tL=e=>new Date(e).toDateString()===new Date().toDateString()?fc(e):y8(e);function U5({message:e,chat:i,chats:a,members:l,query:c,showPlace:u=!0,onOpen:d}){return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(i,e.id),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:qa(l.find(f=>f.id===e.senderId))}),u&&o.jsx("span",{className:"jv-hit-place",children:H5(i,a,l)}),o.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:tL(e.createdAt)})]}),o.jsx("span",{className:"jv-hit-text",children:o.jsx(P5,{text:vg(e),query:c})})]})}const ab=5;function Nd({label:e,items:i,empty:a}){const[l,c]=w.useState(!1);return!i.length&&!a?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:i.length})]}),i.length?l?i:i.slice(0,ab):o.jsx("p",{className:"jv-result-empty",children:a}),!l&&i.length>ab&&o.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>c(!0),children:[x("search.showAll",{count:i.length}),o.jsx(De,{name:"chevron-down"})]})]})}function nL({query:e,shown:i,chats:a,members:l,onOpenChat:c,onOpenMessage:u,onError:d}){const{result:f,loading:m}=I5(e,void 0,d),v=((f==null?void 0:f.chats)??[]).filter(p=>!i.has(p.id)),y=p=>{var b,j;return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>c(p),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:p.type==="thread"?p.title:`#${p.title}`}),p.type==="thread"&&o.jsx("span",{className:"jv-hit-place",children:H5(p,a,l).split(" › ")[0]})]}),(((b=p.note)==null?void 0:b.text)||p.topic)&&o.jsx("span",{className:"jv-hit-text",children:o.jsx(P5,{text:((j=p.note)==null?void 0:j.text)||p.topic,query:e})})]},p.id)};return o.jsxs("div",{className:"jv-results","aria-live":"polite",children:[o.jsx(Nd,{label:x("search.threads"),items:v.filter(p=>p.type==="thread").map(y)}),o.jsx(Nd,{label:x("search.channels"),items:v.filter(p=>p.type==="channel").map(y)}),f?o.jsx(Nd,{label:x("search.messages"),empty:x("search.noMessages"),items:f.messages.map(({message:p,chat:b})=>o.jsx(U5,{message:p,chat:b,chats:a,members:l,query:e,onOpen:u},p.id))}):m&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")})]})}function iL({className:e,...i}){return o.jsx("div",{"data-slot":"input-group",role:"group",className:an("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...i})}const aL=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 rL({className:e,align:i="inline-start",...a}){return o.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":i,className:an(aL({align:i}),e),onClick:l=>{var c,u;l.target.closest("button")||(u=(c=l.currentTarget.parentElement)==null?void 0:c.querySelector("input"))==null||u.focus()},...a})}function lL({className:e,...i}){return o.jsx(Yt,{"data-slot":"input-group-control",className:an("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...i})}function oL({className:e,children:i,...a}){return o.jsxs(PE,{"data-slot":"scroll-area",className:an("relative",e),...a,children:[o.jsx(UE,{"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:i}),o.jsx(sL,{}),o.jsx(qE,{})]})}function sL({className:e,orientation:i="vertical",...a}){return o.jsx(AE,{"data-slot":"scroll-area-scrollbar",orientation:i,className:an("flex touch-none p-px transition-colors select-none",i==="vertical"&&"h-full w-2.5 border-l border-l-transparent",i==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...a,children:o.jsx(DE,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const q5="jarvy-collapsed-sections",cL=()=>{try{return JSON.parse(localStorage.getItem(q5)??"[]")}catch{return[]}};function rb({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 F5(e){const i=e.hint;if(!i||i.createdAt<e.updatedAt-1e3)return null;const a=i.chatType==="thread"&&i.chatId!==e.id,l={actor:i.actor,emoji:i.detail,title:i.title.length>16?`${i.title.slice(0,16)}…`:i.title};return i.kind==="reaction"?x(a?"hint.reactionInThread":"hint.reaction",l):x(a?"hint.threadSummary":i.chatType==="thread"?"hint.summary":"hint.notice",l)}function uL(e){var i;return e.type==="channel"&&F5(e)&&((i=e.hint)==null?void 0:i.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function lb({chat:e,channel:i}){const a=F5(e),l=e.lastMessage&&Bc(e.lastMessage),c=a??(l?i&&e.lastSender?x("sidebar.said",{name:e.lastSender,text:l}):l:i?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:a?"jv-hint-line":void 0,children:c})]})}const ob=e=>{const i=e.getBoundingClientRect();return{x:i.right-168,y:i.bottom+4}};function dL({chats:e,sections:i,bots:a,members:l,onOpenMessage:c,onOpenFound:u,onError:d,working:f,asking:m,selected:v,filter:y,followed:p,followedOpen:b,onFilterChange:j,onSelect:S,onOpenBot:k,onOpenFollowed:C,onMenu:E,onEditSection:M}){const[T,_]=w.useState(cL),D=R=>_(F=>{const ne=F.includes(R)?F.filter(L=>L!==R):[...F,R];return localStorage.setItem(q5,JSON.stringify(ne)),ne}),A=y.toLocaleLowerCase(),I=e.filter(R=>{var F;return R.type!=="thread"&&`${R.title} ${R.topic} ${((F=a.find(ne=>ne.id===R.botId))==null?void 0:F.name)??""}`.toLocaleLowerCase().includes(A)}),U=p.reduce((R,F)=>R+F.unread,0),$=p.reduce((R,F)=>R+F.mentions,0),O=I.filter(R=>R.type==="channel").sort((R,F)=>Number(F.pinned)-Number(R.pinned)||R.title.localeCompare(F.title,"zh-CN")),V=a.map(R=>({bot:R,chat:e.find(F=>F.type==="dm"&&F.botId===R.id)})).filter(({bot:R})=>R.name.toLocaleLowerCase().includes(A)).sort((R,F)=>{var ne,L,J,W;return Number(F.bot.agent)-Number(R.bot.agent)||+!!((ne=F.chat)!=null&&ne.pinned)-+!!((L=R.chat)!=null&&L.pinned)||(((J=F.chat)==null?void 0:J.updatedAt)??0)-(((W=R.chat)==null?void 0:W.updatedAt)??0)}),q=R=>o.jsxs("div",{className:"jv-side-wrap",onContextMenu:F=>{F.preventDefault(),E({kind:"channel",chat:R},{x:F.clientX,y:F.clientY})},children:[o.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===R.id||void 0,"data-unread":R.unread>0||void 0,"aria-current":v===R.id?"page":void 0,onClick:()=>S(R),children:[R.pinned?o.jsx(Ep,{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:R.title,children:R.title}),R.muted&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(De,{name:"bell-slash"})})]}),o.jsxs("span",{className:"jv-side-line",children:[o.jsx(lb,{chat:R,channel:!0}),o.jsx(rb,{chat:R})]})]})]}),o.jsx("button",{type:"button",className:"jv-side-more","aria-label":x("sidebar.more",{name:R.title}),onClick:F=>E({kind:"channel",chat:R},ob(F.currentTarget)),children:o.jsx(Ey,{"aria-hidden":"true"})})]},R.id),ee=({bot:R,chat:F})=>{const ne=m.has(R.id)?"asking":f.has(R.id)?"working":void 0,L=!!F&&v===F.id;return o.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:J=>{J.preventDefault(),E({kind:"dm",bot:R,chat:F},{x:J.clientX,y:J.clientY})},children:[o.jsxs(Oe,{type:"button",variant:"ghost","data-active":L,"aria-current":L?"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:()=>F?S(F):k(R),children:[o.jsx(Jl,{color:R.color,mood:R.mood,size:36,badge:ne,crown:R.agent}),ne&&o.jsx("span",{className:"sr-only",children:x(ne==="asking"?"sidebar.asking":"sidebar.working")}),o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${F!=null&&F.unread?"font-semibold":"font-medium"}`,title:R.name,children:R.name}),(F==null?void 0:F.muted)&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(De,{name:"bell-slash"})}),(F==null?void 0:F.pinned)&&o.jsx(Ep,{className:"jv-dm-pin shrink-0","aria-label":x("sidebar.pinned")}),F&&o.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(F.updatedAt).toISOString(),children:fc(F.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:F?o.jsx(lb,{chat:F,channel:!1}):""}),F&&o.jsx(rb,{chat:F})]})]})]}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":x("sidebar.more",{name:R.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:J=>E({kind:"dm",bot:R,chat:F},ob(J.currentTarget)),children:o.jsx(Ey,{"aria-hidden":"true"})})]},R.id)},Y=(R,F,ne,L,J)=>o.jsxs("div",{className:"jv-side-section-head",children:[o.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!ne,onClick:()=>D(R),children:[o.jsx("span",{className:"jv-side-chevron",children:o.jsx(De,{name:ne?"chevron-right":"chevron-down"})}),o.jsxs("span",{className:"jv-side-section-name",children:[F,ne&&L&&o.jsx("span",{className:"jv-dot","aria-label":x("sidebar.hasUnread")})]})]}),J&&o.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":x("sidebar.editSection",{name:F}),onClick:()=>M(J),children:o.jsx(De,{name:"pencil"})})]}),H=R=>!A&&T.includes(R),K=(R,F,ne,L)=>o.jsxs("div",{className:"jv-side-section",children:[Y(R,F,H(R),ne.some(J=>J.unread>0),L),!H(R)&&ne.map(q)]},R);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:o.jsxs(iL,{className:"h-9 bg-background",children:[o.jsx(lL,{id:"jarvy-search",type:"search",value:y,onChange:R=>j(R.target.value),placeholder:x("sidebar.search"),"aria-label":x("sidebar.search"),onKeyDown:R=>{R.key==="Escape"&&y&&(R.preventDefault(),j(""))},className:"text-sm"}),o.jsx(rL,{align:"inline-start",children:o.jsx(Ec,{"aria-hidden":"true"})})]})}),o.jsx(oL,{className:"min-h-0 flex-1",type:"auto",children:A?o.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":x("sidebar.results"),children:[o.jsx(Nd,{label:x("sidebar.chats"),items:[...O.map(q),...V.map(ee)]}),o.jsx(nL,{query:y,shown:new Set(O.map(R=>R.id)),chats:e,members:l,onOpenChat:u,onOpenMessage:c,onError:d})]}):o.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":x("sidebar.nav"),children:[p.length>0&&o.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":b||void 0,"data-unread":U>0||void 0,"aria-current":b?"page":void 0,onClick:C,children:[o.jsx(De,{name:"chat-bubble"}),o.jsx("span",{className:"jv-side-label",children:x("sidebar.followed")}),$>0?o.jsx("span",{className:"jv-badge",children:$}):U>0&&o.jsx("span",{className:"jv-count",children:U})]}),i.map(R=>K(`s:${R.id}`,R.name,O.filter(F=>F.sectionId===R.id),R)),O.some(R=>!R.sectionId||!i.some(F=>F.id===R.sectionId))&&K("channels",x("sidebar.channels"),O.filter(R=>!R.sectionId||!i.some(F=>F.id===R.sectionId))),o.jsxs("div",{className:"jv-side-section",children:[Y("dms",x("sidebar.dms"),H("dms"),V.some(({chat:R})=>!!(R!=null&&R.unread))),!H("dms")&&o.jsx("div",{className:"space-y-1",children:V.map(ee)}),!H("dms")&&V.length===0&&o.jsx("p",{className:"jv-side-empty",children:x("sidebar.noDms")})]})]})})]})}function fL({username:e,chats:i,sections:a,bots:l,members:c,followed:u,followedOpen:d,working:f,asking:m,selected:v,filter:y,creating:p,createMenu:b,accountMenu:j,onFilterChange:S,onOpenFollowed:k,onOpenChat:C,onOpenBot:E,onOpenMenu:M,onEditSection:T,onCreate:_,onFind:D,onOpenFound:A,onError:I,onToggleCreate:U,onToggleAccount:$,onSettings:O,onToggleTheme:V,onLogOut:q}){const ee=w.useRef(null),Y=w.useRef(null);return w.useEffect(()=>{if(!j&&!b)return;const H=K=>{var R,F;j&&!((R=Y.current)!=null&&R.contains(K.target))&&$(!1),b&&!((F=ee.current)!=null&&F.contains(K.target))&&U(!1)};return document.addEventListener("pointerdown",H),()=>document.removeEventListener("pointerdown",H)},[j,b]),o.jsxs(o.Fragment,{children:[o.jsxs("aside",{className:"ui-sidebar","aria-label":x("sidebar.label"),children:[o.jsx("header",{className:"ui-sidebar-header",children:o.jsxs("div",{className:"jarvy-sidebar-create",ref:ee,children:[o.jsx(ut,{icon:"add",label:x("sidebar.create"),"aria-expanded":b,"aria-haspopup":"menu",disabled:p,onClick:()=>U(!b)}),b&&o.jsxs("div",{className:"ui-popover jarvy-create-menu",role:"menu","aria-label":x("sidebar.createMenu"),children:[o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("channel"),children:[o.jsx(De,{name:"list-bullets"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newChannel")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("section"),children:[o.jsx(De,{name:"folder"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newSection")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("bot"),children:[o.jsx(De,{name:"person-add"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newBot")})]})]})]})}),o.jsx(dL,{chats:i,sections:a,bots:l,members:c,onOpenMessage:D,onOpenFound:A,onError:I,working:f,asking:m,selected:v,filter:y,onFilterChange:S,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:C,onOpenBot:E,onMenu:M,onEditSection:T}),o.jsx("footer",{className:"ui-sidebar-footer",children:o.jsxs("button",{type:"button",className:"ui-footer-entry","aria-label":x("account.menuFor",{name:e}),"aria-expanded":j,onClick:()=>$(!j),children:[o.jsx("span",{className:"ui-user-avatar",children:e.slice(0,2).toUpperCase()}),o.jsx("span",{children:e}),o.jsx(De,{name:"chevron-down"})]})})]}),j&&o.jsxs("div",{ref:Y,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":x("account.menu"),children:[o.jsx("div",{className:"ui-menu-note ui-small",children:e}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:O,children:[o.jsx(De,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("settings.title")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:V,children:[o.jsx(De,{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(De,{name:"arrow-bracket-to-left"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.signOut")})]})]})]})}function hL({textarea:e,value:i,setValue:a,inside:l,outside:c,bots:u,onInvite:d}){const[f,m]=w.useState(null),[v,y]=w.useState(0),[p,b]=w.useState(null),j=w.useRef(null),S=w.useRef(null),k=w.useRef(null);w.useLayoutEffect(()=>{k.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(k.current,k.current),k.current=null)},[i,e]);const C=(H,K)=>H.name.toLowerCase().includes(K.toLowerCase()),E=f===null?[]:l.filter(H=>C(H,f)),M=f===null?[]:c.filter(H=>C(H,f)),T=p?c.filter(H=>C(H,p.search)):[],_=E.length+(M.length?1:0),D=()=>{m(null),b(null)};function A(H=i){const K=e.current,R=K?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(H.slice(0,K.selectionStart)):null;m(R?R[1]:null),y(0),b(null)}function I(H){const K=e.current;if(!K)return;l.some(ne=>ne.id===H.id)||d(H);const R=i.slice(0,K.selectionStart).replace(/@([^\s@]*)$/u,`@${H.name} `),F=R+i.slice(K.selectionStart);k.current=R.length,a(F),D()}function U(H){p||b({search:f??"",active:0}),H&&requestAnimationFrame(()=>{var K;return(K=S.current)==null?void 0:K.focus()})}function $(){var H;b(null),(H=e.current)==null||H.focus()}function O(H){if(!_||H.nativeEvent.isComposing)return!1;const K=v===E.length;return H.key==="ArrowDown"||H.key==="ArrowUp"?(H.preventDefault(),y((v+(H.key==="ArrowDown"?1:-1)+_)%_),b(null),!0):(H.key==="Enter"||H.key==="Tab")&&!K?(H.preventDefault(),I(E[v]),!0):(H.key==="Enter"||H.key==="Tab"||H.key==="ArrowRight")&&K?(H.preventDefault(),U(!0),!0):H.key==="Escape"?(H.preventDefault(),D(),!0):!1}function V(H){!p||H.nativeEvent.isComposing||((H.key==="ArrowDown"||H.key==="ArrowUp")&&T.length?(H.preventDefault(),b({...p,active:(p.active+(H.key==="ArrowDown"?1:-1)+T.length)%T.length})):H.key==="Enter"?(H.preventDefault(),T[p.active]&&I(T[p.active])):(H.key==="Escape"||H.key==="ArrowLeft"&&!p.search)&&(H.preventDefault(),$()))}const q=H=>{var R;const K=H.relatedTarget;(!K||!((R=j.current)!=null&&R.contains(K))&&K!==e.current)&&D()},ee=(H,K)=>o.jsxs("button",{type:"button",role:"option","aria-selected":K,className:"ui-menu-item","data-active":K||void 0,onMouseDown:R=>{R.preventDefault(),I(H)},children:[o.jsx(yr,{member:H,bots:u,size:20}),o.jsx("span",{className:"ui-menu-copy",children:H.name}),o.jsx("span",{className:"jv-muted",children:H.kind==="bot"?"Bot":x("common.member")})]},H.id);return{menu:_>0?o.jsxs("div",{ref:j,className:"jv-mention-box","data-side":p?"":void 0,onBlur:q,children:[o.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":x("mention.menu"),children:[E.map((H,K)=>ee(H,K===v)),M.length>0&&o.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!p,"data-active":v===E.length||void 0,onMouseEnter:()=>{y(E.length),U(!1)},onMouseDown:H=>{H.preventDefault(),y(E.length),U(!0)},children:[o.jsx("span",{className:"ui-menu-copy",children:x("mention.outside")}),o.jsx("span",{className:"jv-muted",children:M.length}),o.jsx(De,{name:"chevron-right"})]})]}),p&&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:H=>{H.preventDefault(),$()},children:o.jsx(De,{name:"chevron-left"})}),o.jsx("input",{ref:S,type:"search",value:p.search,placeholder:x("common.searchMembers"),"aria-label":x("mention.searchOutside"),onChange:H=>b({search:H.target.value,active:0}),onKeyDown:V})]}),o.jsx("div",{className:"jv-mention-side-list",children:T.length?T.map((H,K)=>ee(H,K===p.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:A,onKeyDown:O,close:D,leaves:q}}const sb={text:null,files:[],quote:null,passages:[],key:null,signature:null,sending:!1};class mL{constructor(i){rc(this,"drafts",new Map);rc(this,"listeners",new Set);rc(this,"timer",null);rc(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));this.storageKey=i;try{const a=JSON.parse(localStorage.getItem(i)??"{}");for(const[l,c]of Object.entries(a))this.drafts.set(l,{...sb,...c,sending:!1})}catch{localStorage.removeItem(i)}}get(i){return this.drafts.get(i)??sb}update(i,a){const l=this.get(i),c=typeof a=="function"?a(l):a;this.drafts.set(i,{...l,...c}),this.listeners.forEach(d=>d());const u=Object.keys(c).every(d=>d==="text"||d==="sending");this.timer&&clearTimeout(this.timer),u?this.timer=setTimeout(()=>this.save(),300):this.save()}save(){var a;this.timer&&(clearTimeout(this.timer),this.timer=null);const i={};for(const[l,{sending:c,...u}]of this.drafts)((a=u.text)!=null&&a.trim()||u.files.length||u.quote||u.passages.length)&&(i[l]=u);Object.keys(i).length?localStorage.setItem(this.storageKey,JSON.stringify(i)):localStorage.removeItem(this.storageKey)}async clear(i){this.timer&&(clearTimeout(this.timer),this.timer=null);const a=[...this.drafts.values()].flatMap(l=>l.files);await Promise.all(a.map(l=>i(l.id).catch(c=>console.warn(`Pending attachment ${l.id} was not deleted on log-out`,c)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(l=>l())}}const pL=e=>`jarvy-drafts:${e}`;function V5(e,i,a){e.update(i.chatId,{quote:{id:i.id,name:qa(a.find(l=>l.id===i.senderId)),text:vg(i).replace(/\s+/g," ").slice(0,160)}})}function gL(e,i){return w.useSyncExternalStore(e.subscribe,()=>e.get(i))}const cb=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function $5({chatId:e,id:i,drafts:a,placeholder:l,disabled:c=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:v,onError:y,onNotice:p}){const b=gL(a,e),j=b.sending,[S,k]=w.useState([]),[C,E]=w.useState(!1),M=S.filter(R=>R.chatId===e),T=M.length>0,_=w.useRef(null),D=b.text??d??"",A=b.files,I=b.quote,U=R=>a.update(e,{text:R}),$=hL({textarea:_,value:D,setValue:U,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:R=>u==null?void 0:u.onInvite(R)});async function O(R){const F=e;if(!R.length)return;if(T){p(x("composer.busy"));return}if(A.length+R.length>5){p(x("composer.tooMany",{count:5}));return}if(R.some(W=>W.size===0||W.size>10*1024*1024)){p(x("composer.size"));return}const ne=R.map(W=>({key:cb(),chatId:F,name:W.name,done:0})),L=ne.map(W=>W.key),J=(W,P)=>k(G=>G.map(fe=>fe.key===W?{...fe,done:P}:fe));k(W=>[...W,...ne]);try{for(const[W,P]of R.entries()){const G=L[W],fe=await be.uploadAttachment(F,P,ye=>J(G,ye));a.update(F,ye=>({files:[...ye.files,fe]})),k(ye=>ye.filter(je=>je.key!==G))}}catch(W){y(W)}finally{k(W=>W.filter(P=>!L.includes(P.key)))}}async function V(R){const F=e;try{await be.removeAttachment(R),a.update(F,ne=>({files:ne.files.filter(L=>L.id!==R)}))}catch(ne){y(ne)}}function q(R){const F=[...R.clipboardData.files];if(!F.length)return;R.preventDefault();const ne=new Date().toISOString().replace(/\D/g,"").slice(0,14);O(F.map((L,J)=>L.type.startsWith("image/")&&/^image\.\w+$/.test(L.name)?new File([L],`${x("composer.pasted")}-${ne}${F.length>1?`-${J+1}`:""}.${L.name.split(".").pop()}`,{type:L.type}):L))}const ee=R=>R.dataTransfer.types.includes("Files");function Y(R){!ee(R)||c||(R.preventDefault(),R.dataTransfer.dropEffect="copy",E(!0))}function H(R){ee(R)&&(R.preventDefault(),E(!1),c||O([...R.dataTransfer.files]))}async function K(R){R==null||R.preventDefault();const F=e,ne=a.get(F),L=(ne.text??d??"").trim(),J=ne.files,W=ne.quote,P=ne.passages,fe=[P.map((re,xe)=>`[[q${xe+1}]]`).join(`
|
|
536
|
-
`),L].filter(Boolean).join(`
|
|
537
|
-
|
|
538
|
-
`);if(!fe&&!J.length||ne.sending||T||c)return;const ye=JSON.stringify([fe,J.map(re=>re.id),(W==null?void 0:W.id)??null,P]),je=ne.signature===ye&&ne.key?ne.key:cb();a.update(F,{key:je,signature:ye,sending:!0});try{await v(fe,J.map(re=>re.id),je,W==null?void 0:W.id,P.map(({messageId:re,text:xe})=>({messageId:re,text:xe}))),a.update(F,re=>{var xe;return{text:(re.text??d??"").trim()===L?"":re.text,passages:re.passages.filter(oe=>!P.includes(oe)),files:re.files.filter(oe=>!J.some(ce=>ce.id===oe.id)),quote:((xe=re.quote)==null?void 0:xe.id)===(W==null?void 0:W.id)?null:re.quote,key:null,signature:null}})}catch(re){y(re)}finally{a.update(F,{sending:!1})}}return w.useLayoutEffect(()=>{const R=()=>{const F=_.current,ne=m==null?void 0:m.current;if(!F)return;const L=ne==null?void 0:ne.scrollTop;F.style.height="auto",F.style.height=`${F.scrollHeight}px`,ne&&L!==void 0&&ne.scrollTop!==L&&ne.scrollTo({top:L,behavior:"instant"})};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[D,e,m]),o.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:R=>void K(R),onDragEnter:Y,onDragOver:Y,onDragLeave:R=>{R.currentTarget.contains(R.relatedTarget)||E(!1)},onDrop:H,children:[A.length+M.length>0&&o.jsxs("div",{className:"jarvy-pending-files",children:[A.map(R=>o.jsxs("span",{className:"jarvy-file-chip",children:[o.jsx(De,{name:"paperclip"}),o.jsx("span",{title:R.name,children:R.name}),o.jsx("button",{type:"button","aria-label":x("composer.removeFile",{name:R.name}),onClick:()=>void V(R.id),children:"×"})]},R.id)),M.map(R=>o.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[o.jsx(De,{name:"paperclip"}),o.jsx("span",{title:R.name,children:R.name}),o.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":x("composer.uploading",{name:R.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(R.done*100),children:o.jsx("span",{style:{width:`${R.done*100}%`}})})]},R.key))]}),I&&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:I.name}),o.jsx("span",{className:"jv-reply-text",children:I.text||x("common.attachment")}),o.jsx("button",{type:"button","aria-label":x("composer.cancelReply"),onClick:()=>a.update(e,{quote:null}),children:"×"})]}),o.jsx(qD,{quotes:b.passages,onRemove:R=>a.update(e,F=>({passages:F.passages.filter((ne,L)=>L!==R)}))}),o.jsxs("div",{className:"ui-composer jv-composer",children:[u&&$.menu,C&&o.jsx("span",{className:"jarvy-drop-hint",role:"status",children:x("composer.drop")}),o.jsxs("label",{className:"jarvy-attach-trigger",title:x("composer.attach"),children:[o.jsx(De,{name:"add"}),o.jsx("input",{type:"file",multiple:!0,"aria-label":x("composer.attach"),disabled:j||T||c||A.length>=5,onChange:R=>{const F=[...R.target.files??[]];R.target.value="",O(F)}})]}),o.jsx("textarea",{ref:_,id:i,rows:1,maxLength:32e3,value:D,onPaste:q,placeholder:l,disabled:c,"aria-label":x("composer.input"),onChange:R=>{U(R.target.value),u&&$.track(R.target.value)},onKeyDown:R=>{u&&$.onKeyDown(R)||R.key==="Enter"&&!R.shiftKey&&!R.nativeEvent.isComposing&&(R.preventDefault(),K())},onClick:()=>{u&&$.track()},onBlur:u?$.leaves:void 0}),o.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":x("composer.send"),disabled:j||T||c||!D.trim()&&!A.length&&!b.passages.length,children:o.jsx(De,{name:"arrow-up"})})]})]})}function vL({messages:e,members:i,me:a,activeQuestion:l,onSettled:c,onPreview:u,onQuote:d,onReact:f,onJump:m,onError:v,bot:y}){return o.jsx(o.Fragment,{children:e.map((p,b)=>{const j=e[b+1],S=p.role==="assistant"&&!!(j!=null&&j.question)&&j.senderId===p.senderId;return o.jsxs("div",{className:`ui-message-row ${p.role==="user"?"ui-user":""}`,"data-message":p.id,"data-asks":S||void 0,tabIndex:-1,children:[p.role==="assistant"&&o.jsx("span",{className:"jarvy-bubble-avatar",children:o.jsx(Jl,{color:(y==null?void 0:y.color)??"gray",mood:y==null?void 0:y.mood,size:22,crown:y==null?void 0:y.agent})}),o.jsxs("div",{className:"jv-dm-stack",children:[p.replyTo&&o.jsx(R5,{message:p,members:i,onJump:m}),p.question?o.jsx(C5,{message:{...p,question:p.question},keyboard:p.id===l,onSettled:c}):o.jsxs("div",{className:"ui-bubble",children:[p.content&&o.jsx(T5,{message:p,members:i,me:a,onJump:m}),p.attachments.length>0&&o.jsx(k5,{files:p.attachments,onOpen:k=>u(p.attachments,k)})]}),o.jsx(O5,{message:p,me:a,members:i,onReact:f,onError:v})]}),o.jsx("div",{className:"jv-row-actions",children:o.jsx(z5,{message:p,me:a,onReply:d,onReact:f,onError:v})})]},p.id)})})}function yL(e,i,a,l,c,u=0){const v=i.offsetWidth,y=i.offsetLeft,p=i.offsetTop,b=Math.max(300,Math.round(a*.4));e.style.maxHeight="";const j=e.hasAttribute("data-fit"),S=e.offsetHeight,k=R=>R==="left"||R==="right",C=R=>R==="left"?y-10-8:R==="right"?a-y-v-10-8:R==="below"?l-p-v-10-8:p-10-8,E=y+v/2>a/2,M=R=>j?k(R)?Math.min(b,Math.max(160,C(R))):Math.min(b,E?y+v-8:a-y-8):e.offsetWidth,T=R=>k(R)?M(R)<=C(R):Math.min(120,S)<=C(R),_=u>.05?"right":u<-.05?"left":null,A=(_==="left"||_===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(T)??(C("below")>=C("above")?"below":"above"),I=e.dataset.side,$=I!==void 0&&I!==A&&k(I)===k(A)&&T(I)&&C(I)+40>=C(A)?I:A,O=j&&($==="left"||!k($)&&E),V=$==="left"?y-10:$==="right"?y+v+10:E?y+v:y;e.style.width="",e.style.maxWidth=j?`${M($)}px`:"",O?(e.style.left="",e.style.right=`${a-V}px`):(e.style.right="",j&&(e.style.left=`${V}px`));const q=e.offsetWidth,ee=j?O?V-q:V:$==="left"?y-10-q:$==="right"?y+v+10:Math.min(Math.max(8,y+v-q),Math.max(8,a-q-8)),Y=c&&ee<c.right&&ee+q>c.left?c.bottom+6:0,H=Math.min(Math.max(8,Y),Math.max(8,l-140));let K;$==="below"?(K=Math.max(8,Math.min(p+v+10,l-8-Math.min(S,120))),e.style.maxHeight=`${Math.max(40,l-K-8)}px`):$==="above"?(e.style.maxHeight=`${Math.max(40,p-10-H)}px`,K=Math.max(H,p-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,l-H-8)}px`,K=Math.min(Math.max(H,p+6),Math.max(H,l-e.offsetHeight-8))),j||(e.style.left=`${ee}px`),e.style.top=`${K}px`,e.dataset.side=$,e.style.setProperty("--npc-tail",k($)?`${Math.min(e.offsetHeight-18,Math.max(18,p+v/2-K))}px`:`${Math.min(q-18,Math.max(18,y+v/2-ee))}px`)}const ub=.06,xL=matchMedia("(prefers-reduced-motion: reduce)");function pd({text:e,limit:i,streaming:a=!1}){const[,l]=w.useState(0),c=w.useRef({text:"",count:0,rate:ub,at:performance.now()}),u=performance.now(),d=c.current;d.count=Math.min(d.text.length,d.count+d.rate*(u-d.at)),d.at=u,e!==d.text&&(d.text=e,d.count=Math.min(d.count,e.length),d.rate=Math.max(ub,(e.length-d.count)/i));const f=!xL.matches&&d.count<e.length;w.useEffect(()=>{if(!f)return;const v=requestAnimationFrame(()=>l(y=>y+1));return()=>cancelAnimationFrame(v)});const m=f?e.slice(0,Math.floor(d.count)).replace(/[\uD800-\uDBFF]$/,""):e;return o.jsxs(o.Fragment,{children:[m,(f||a)&&o.jsx("i",{className:"jv-npc-caret"})]})}function bL({className:e,children:i,onReading:a}){const l=w.useRef(null),c=w.useRef(null),u=w.useRef(a),[d,f]=w.useState(!1);return u.current=a,w.useEffect(()=>{const m=l.current,v=c.current;if(!m||!v)return;let y=!0;const p=()=>{y&&(m.scrollTop=m.scrollHeight),f(m.scrollTop>1)},b=()=>{const S=m.scrollHeight-m.scrollTop-m.clientHeight<4;S!==y&&(y=S,u.current(!S)),f(m.scrollTop>1)},j=new ResizeObserver(p);return j.observe(v),j.observe(m),p(),m.addEventListener("scroll",b,{passive:!0}),()=>{j.disconnect(),m.removeEventListener("scroll",b),u.current(!1)}},[]),o.jsx("span",{ref:l,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:o.jsx("span",{ref:c,children:i})})}const G5={think:B8,mutter:y7,read:G8,write:o7,run:x7,script:H8,compact:R8,retry:x0,ask:z4,say:n7,chat:H4,tool:S7},l0=e=>x("npc.duration",{value:Ia(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),jL={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function wL({view:e,name:i,cat:a,area:l,avoid:c,layout:u,facing:d,toolbar:f}){var V,q,ee;const m=w.useRef(null),v=w.useRef(null),[y,p]=w.useState(!1),[,b]=w.useState(0);w.useLayoutEffect(()=>{u.current=()=>{var F;if(!m.current||!a.current||!l.current)return;const H=l.current.getBoundingClientRect(),K=c.current?c.current.getBoundingClientRect().top-H.top:H.height,R=(F=v.current)==null?void 0:F.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),yL(m.current,a.current,H.width,K,R?{left:R.left-H.left,right:R.right-H.left,bottom:R.bottom-H.top}:null,d())},u.current();const Y=new ResizeObserver(()=>{var H;return(H=u.current)==null?void 0:H.call(u)});for(const H of[m.current,v.current])H&&Y.observe(H);return()=>{Y.disconnect(),u.current=null}},[y]);const j=e.steps.some(Y=>Y.state==="running");w.useEffect(()=>{if(!y||!j)return;const Y=setInterval(()=>b(H=>H+1),200);return()=>clearInterval(Y)},[y,j]),w.useEffect(()=>{if(!y)return;const Y=H=>{H.key==="Escape"&&p(!1)};return addEventListener("keydown",Y),()=>removeEventListener("keydown",Y)},[y]);const S=(V=e.steps[0])==null?void 0:V.id;w.useEffect(()=>{p(!1)},[S]);const[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState(null),D=k||E;w.useEffect(()=>{var Y;_(D?((Y=e.shown)==null?void 0:Y.id)??null:null)},[D]);const A=T&&e.steps.find(Y=>Y.id===T)||e.shown,I=A?A.look:e.done?"action":null;let U=null;if((A==null?void 0:A.look)==="thought"||(A==null?void 0:A.look)==="mutter"){const Y=(A.line??"").replace(/\n\s*\n\s*/g,`
|
|
539
|
-
|
|
540
|
-
`).trim(),H=o.jsx(pd,{text:Y,limit:300,streaming:A.look==="thought"&&A.state==="running"},A.id),[K,R]=x("npc.mutter",{text:""}).split("");U=o.jsx(bL,{className:A.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:M,children:A.look==="thought"?H:o.jsxs(o.Fragment,{children:[K,H,R]})},A.id)}else if((A==null?void 0:A.look)==="speech")U=o.jsx("span",{className:"jv-npc-speech",children:o.jsx(pd,{text:A.line??"",limit:1500,streaming:A.state==="running"&&A.icon==="say"},A.id)});else if(A){const Y=G5[A.icon];U=o.jsxs("span",{className:"jv-npc-action","data-state":A.state,children:[o.jsx(Y,{}),o.jsx(pd,{text:A.title,limit:300},A.id),A.state==="running"&&o.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(U=o.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?o.jsx(Mi,{}):o.jsx(os,{}),o.jsx(pd,{text:x(jL[e.done.outcome],{duration:l0(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const $=e.steps.length>0,O=(A==null?void 0:A.icon)==="ask"&&A.state==="running";return w.useEffect(()=>{U||C(!1)},[!U]),o.jsxs(o.Fragment,{children:[f==null?void 0:f(v,()=>p(!1)),o.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:I??void 0,"data-kind":A==null?void 0:A.icon,"data-fading":!y&&!A&&((q=e.done)==null?void 0:q.fading)||void 0,hidden:!y&&!U,onPointerEnter:Y=>{Y.pointerType==="mouse"&&C(!0)},onPointerLeave:()=>C(!1),children:y?o.jsxs("section",{className:"jv-npc-panel","aria-label":x("npc.panel"),children:[o.jsxs("header",{children:[o.jsx("strong",{children:x("npc.panel")}),e.startedAt>0&&o.jsx("span",{children:l0((e.endedAt??Date.now()+e.skew)-e.startedAt)}),o.jsx("button",{type:"button",onClick:()=>p(!1),"aria-label":x("npc.collapse"),title:x("npc.collapse"),children:o.jsx(a7,{})})]}),o.jsx("ol",{children:e.steps.map(Y=>o.jsx(SL,{step:Y,skew:e.skew},Y.id))})]}):o.jsxs(o.Fragment,{children:[I==="speech"&&o.jsxs("span",{className:"jv-npc-name",children:[i,(A==null?void 0:A.to)&&o.jsx("em",{children:x("npc.to",{chat:A.to})})]}),$?o.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>p(!0),title:x("npc.expand"),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),p(!0))},children:U}):o.jsx("div",{className:"jv-npc-line",children:U}),O&&e.answer&&((ee=A.options)==null?void 0:ee.some(Y=>Y.value))&&o.jsx("div",{className:"jv-npc-options",children:A.options.map(Y=>o.jsx("button",{type:"button",onClick:()=>e.answer(Y.value),children:Y.label},Y.label))}),O&&!e.answer&&A.hint&&o.jsx("p",{className:"jv-npc-hint",children:A.hint})]})})]})}function SL({step:e,skew:i}){const[a,l]=w.useState(!1),c=G5[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?a:void 0,disabled:!u,onClick:()=>l(d=>!d),children:[o.jsx(c,{className:"jv-npc-kind"}),o.jsx("span",{className:"jv-npc-title",children:e.title}),o.jsxs("span",{className:"jv-npc-state",children:[e.state==="running"?o.jsx(_4,{}):e.state==="ok"?o.jsx(Mi,{}):o.jsx(os,{}),x(`npc.state.${e.state}`)]}),o.jsx("span",{className:"jv-npc-time",children:l0((e.endedAt??Date.now()+i)-e.startedAt)}),u&&o.jsx(Zr,{className:"jv-npc-chevron"})]}),a&&u&&o.jsx("pre",{"data-kind":e.icon,children:u})]})}const Ed="src/web/thread/ThreadPane.tsx",qd="npm run build",kL=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
|
|
541
|
-
`),CL=["> 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(`
|
|
542
|
-
`),Y5={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},NL=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:Ed,ms:2600,output:kL},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:Ed,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
|
|
543
|
-
`)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:qd,ms:3200,failed:!0,output:CL},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:Ed,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:qd,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
|
|
544
|
-
`)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...Y5},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],o0=[{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",...Y5}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:Ed}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:qd}},{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:qd,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function EL({controls:e,onReplay:i,toolbar:a}){const[l,c]=w.useState(!1);return o.jsxs("div",{ref:a,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:i,"aria-label":x("npc.replay"),title:x("npc.replay"),children:o.jsx(f7,{})}),o.jsxs(Wl,{value:e.baseMood,onValueChange:u=>e.setBaseMood(u),children:[o.jsx(to,{className:"jv-npc-mood","aria-label":x("npc.mood"),title:x("npc.mood"),children:o.jsx(eo,{})}),o.jsx(no,{className:"jv-select-menu",position:"popper",sideOffset:4,children:xD.map(u=>o.jsx(Vi,{value:u,children:x(`npc.mood.${u}`)},u))})]}),o.jsxs("button",{type:"button",className:"jv-npc-toggle","aria-expanded":l,onClick:()=>c(u=>!u),children:[o.jsx(m7,{}),x("npc.poses")]})]}),l&&o.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":x("npc.poses"),children:o0.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 TL={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},db=e=>e.text?[...x(e.text)].slice(0,e.typed).join(""):"";function AL(e){var l;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 i=e.state==="failed"&&e.kind==="run"?"failed":e.state==="running"?"running":"ok",a=e.kind==="say"&&e.to?"post":e.kind;return x(`npc.step.${a}.${i}`,{target:((l=e.target)==null?void 0:l.split("/").pop())??"",chat:e.to?`#${x(e.to)}`:""})}function fb(e){var l;const i=e.kind==="think"?"thought":e.kind==="mutter"?"mutter":e.kind==="say"||e.kind==="ask"?"speech":"action",a=e.kind==="ask"?x(e.question):db(e);return{id:String(e.id),look:i,icon:TL[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:AL(e),line:i==="action"?void 0:a,to:e.to?`#${x(e.to)}`:void 0,options:e.kind==="ask"&&e.state==="running"?(l=e.options)==null?void 0:l.map(c=>({label:x(c.label),value:c.value})):void 0,detail:e.kind==="ask"?x(e.question):e.text?db(e):e.output}}const hp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},_L=40,hb=6e3,mb=500,ML={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class mp extends Error{}const RL=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...x(e.text)].length:0});function OL(e,i){const[a,l]=w.useState(hp),[c,u]=w.useState(i),[d,f]=w.useState(0),[m,v]=w.useState(null),[,y]=w.useState(0),p=w.useRef(null);w.useEffect(()=>{if(!e||m)return;let _=!0;const D=new Set,A=O=>new Promise((V,q)=>{const ee=setTimeout(()=>{D.delete(ee),_?V():q(new mp)},O);D.add(ee)}),I=(O,V)=>l(q=>({...q,steps:q.steps.map(ee=>ee.id===O?{...ee,...V}:ee)})),U=(O,V)=>l(q=>({...q,flash:{mood:O,until:Date.now()+V}})),$=async(O,V,q)=>{const ee=[...x(V)].length,Y=q?Math.max(16,q/ee):_L;for(let H=1;H<=ee;H++)I(O,{typed:H}),await A(Y)};return(async()=>{l({...hp}),await A(700);const O=Date.now();let V="";l(ee=>({...ee,phase:"turn",startedAt:O}));for(const[ee,Y]of NL.entries()){const{ms:H,failed:K,replies:R,...F}=Y,ne=R?R[V]:Y.text;if(l(L=>({...L,steps:[...L.steps,{...F,text:ne,id:ee,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),Y.kind==="ask"){if(V=await new Promise(L=>{p.current=L}),p.current=null,!_)throw new mp;I(ee,{state:"ok",endedAt:Date.now(),answer:Y.options.find(L=>L.value===V)});continue}ne?await $(ee,ne,Y.kind==="think"?H??null:null):await A(H??1e3),(Y.kind==="mutter"||Y.kind==="say")&&await A(1100),I(ee,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(l(L=>({...L,shake:L.shake+1})),U("dizzy",2600),await A(900))}const q=Date.now();for(l(ee=>({...ee,phase:"stretch",endedAt:q,recapUntil:q+hb})),q-O>2e4&&U("happy",3200),await A(2200);;)l(ee=>({...ee,phase:"idle"})),await A(9e3),l(ee=>({...ee,phase:"groom"})),await A(2800)})().catch(O=>{if(!(O instanceof mp))throw O}),()=>{var O;_=!1;for(const V of D)clearTimeout(V);(O=p.current)==null||O.call(p,"")}},[e,d,m]),w.useEffect(()=>{var I;const _=Date.now(),D=[((I=a.flash)==null?void 0:I.until)??0,a.recapUntil-mb,a.recapUntil].filter(U=>U>_);if(!D.length)return;const A=setTimeout(()=>y(U=>U+1),Math.min(...D)-_+20);return()=>clearTimeout(A)});const b=o0.find(_=>_.key===m)??null,j=Date.now(),S=b?null:a.phase==="turn"?[...a.steps].reverse().find(_=>_.state==="running")??null:null,k=b?b.motion:S?ML[S.kind]:a.phase==="stretch"?"stretch":a.phase==="groom"?"groom":a.phase==="turn"?"think":"idle",C=a.flash&&a.flash.until>j?a.flash.mood:null,E=a.endedAt!==null&&j<a.recapUntil,M=b?b.step?RL(b.step):null:S??(a.phase==="turn"?a.steps.at(-1)??null:null);return{...{view:{steps:a.steps.map(fb),shown:M?fb(M):null,startedAt:a.startedAt,endedAt:a.endedAt,skew:0,answer:_=>{var D;return(D=p.current)==null?void 0:D.call(p,_)},done:b!=null&&b.done?{ms:31400,outcome:"completed",fading:!1}:!b&&E?{ms:a.endedAt-a.startedAt,outcome:"completed",fading:j>=a.recapUntil-mb}:null},motion:k,fast:b?!!b.fast:(S==null?void 0:S.kind)==="write"||(S==null?void 0:S.kind)==="run",mood:(b==null?void 0:b.mood)??C??c,shake:a.shake,canRecap:!b&&a.endedAt!==null&&!E,showRecap:()=>l(_=>({..._,recapUntil:Date.now()+hb}))},controls:{pose:b,baseMood:c,setBaseMood:u,replay:()=>{v(null),f(_=>_+1)},hold:_=>{v(_),l(D=>{var A;return{...hp,shake:D.shake+((A=o0.find(I=>I.key===_))!=null&&A.shake?1:0)}})}}}}const zL=4e3,pb={turn:null,last:null,skew:0};function DL(e,i){const a=[...e.steps];let l=e.dropped;for(const c of i)if(c.op==="step"){const u=a.findIndex(d=>d.id===c.step.id);u>=0?a[u]=c.step:a.push(c.step)}else if(c.op==="text"){const u=a.findIndex(v=>v.id===c.id),d=a[u];if(!d)continue;const f=(d.text??"")+c.append,m=Math.max(0,f.length-zL);a[u]={...d,text:f.slice(m),omitted:(d.omitted??0)+m}}else{const u=a.findIndex(d=>d.id===c.id);u>=0&&(a.splice(u,1),l++)}return{...e,steps:a,dropped:l}}function LL(e){const[i,a]=w.useState(pb);return w.useEffect(()=>{if(a(pb),!e)return;const l=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),c=u=>JSON.parse(u.data);return l.addEventListener("snapshot",u=>{const d=c(u);a(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),l.addEventListener("start",u=>{const{turn:d}=c(u);a(f=>({...f,turn:d}))}),l.addEventListener("patch",u=>{const{patches:d}=c(u);a(f=>f.turn?{...f,turn:DL(f.turn,d)}:f)}),l.addEventListener("end",u=>{const{outcome:d,endedAt:f}=c(u);a(m=>m.turn?{...m,turn:null,last:{...m.turn,outcome:d,endedAt:f}}:m)}),()=>l.close()},[e]),i}const pp=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),Oa=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",gp=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",BL=e=>{const i=(e??"").split(`
|
|
545
|
-
`)[0].trim();return i.length>40?`${i.slice(0,39)}…`:i},gb=e=>e.type==="channel"?`#${e.title}`:e.title;function vp(e){return e?e.omitted?`${e.head}
|
|
546
|
-
${x("npc.live.omitted",{count:Ia(e.omitted)})}
|
|
547
|
-
${e.tail}`:e.head+e.tail:""}const vb=e=>e.omitted?`${x("npc.live.omitted",{count:Ia(e.omitted)})}
|
|
548
|
-
`:"";function yp(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 IL(e,i,a){const l={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:i},c=(m,v,y)=>({...l,look:"action",icon:m,title:v,detail:y});switch(e.kind){case"thinking":return{...l,look:"thought",icon:"think",title:x("npc.step.think"),line:e.text??"",detail:vb(e)+(e.text??"")};case"text":return{...l,look:"mutter",icon:"mutter",title:x("npc.step.mutter"),line:e.text??"",detail:vb(e)+(e.text??"")};case"compaction":return c("compact",x(`npc.live.compact.${Oa(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?x("npc.live.tokens",{before:Ia(e.tokensBefore),after:Ia(e.tokensAfter)}):vp(e.output));case"retry":return c("retry",e.state==="running"?x("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):x(`npc.live.retry.${Oa(e)}`),vp(e.output))}const u=e.input??{},d=vp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
|
|
549
|
-
|
|
550
|
-
`);switch(e.tool){case"read":return c("read",x(`npc.live.read.${Oa(e)}`,{target:gp(u.path)}),f);case"edit":return c("write",x(`npc.live.edit.${Oa(e)}`,{target:gp(u.path)}),f);case"write":return c("write",x(`npc.live.write.${Oa(e)}`,{target:gp(u.path)}),f);case"bash":return c("run",x(`npc.live.run.${Oa(e)}`,{target:BL(u.command)}),f);case"codemode":return c("script",x(`npc.live.script.${Oa(e)}`),f);case"chat":return HL(e,l,a,d);default:return c("tool",x(`npc.live.tool.${Oa(e)}`,{tool:e.tool??""}),f)}}function HL(e,i,a,l){const c=e.input??{},u=c.action??"",d=c.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==a)?gb(d):void 0;if(u==="messages.send")return{...i,look:"speech",icon:"say",to:f,line:c.text??"",detail:[c.text,e.state==="failed"?l:""].filter(Boolean).join(`
|
|
551
|
-
|
|
552
|
-
`),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=PL(e);return{...i,look:"speech",icon:"ask",to:f,line:c.text??"",options:(c.options??[]).map(p=>({label:p})),hint:f?x("npc.live.answerIn",{chat:f}):x("npc.live.answerBelow"),detail:[c.text,...(c.options??[]).map(p=>`· ${p}`),l].filter(Boolean).join(`
|
|
553
|
-
`),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{...i,look:"action",icon:"tool",title:x(`npc.live.switch.${Oa(e)}`),detail:l};const m=d?gb(d):"",v=pp.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.${Oa(e)}`,{tool:u||"chat"});return{...i,look:"action",icon:pp.has(u)?"chat":"tool",title:e.state==="failed"&&pp.has(u)?x("npc.live.tool.failed",{tool:u}):v,detail:l}}function PL(e){try{const i=JSON.parse(e.output?e.output.head+e.output.tail:"");return i.status!=="answered"?null:[...(i.selected??[]).map(a=>a.label??""),i.custom??""].filter(Boolean).join(x("common.listSeparator"))}catch{return null}}function yb(e,i){const a=new Map(e.steps.map(c=>[c.id,c.parentId])),l=c=>{let u=0,d=c.parentId;for(;d&&u<4;)u++,d=a.get(d)??null;return u};return e.steps.map(c=>IL(c,l(c),i))}function gd(e){var a;const i=((a=e.line)==null?void 0:a.length)??0;if(e.look==="speech"){const l=Math.min(7e3,Math.max(2500,1500+50*i))+Math.min(1500,i/.06);return{firm:l,light:l}}return e.look==="mutter"?{firm:1500,light:Math.min(3500,Math.max(1500,800+30*i))}:e.state==="failed"?{firm:2e3,light:2e3}:{firm:0,light:e.look==="action"?900:0}}const UL=4e3,xb=1500;function bb(e,i,a,l){var j;const c=S=>S-a;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&&gd(k).firm).sort((k,C)=>k.endedAt-C.endedAt)){const k=c(S.endedAt),C=d.at(-1);C&&S.look==="speech"&&(C.end=Math.min(C.end,Math.max(C.start+xb,k)));const E=Math.max(k,(C==null?void 0:C.end)??0);E-k>UL||d.push({step:S,start:E,end:E+gd(S).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const S=c(f.startedAt);for(let k=d.length-1;k>=0;k--){const C=d[k];C.start>=S&&C.start>i?d.splice(k,1):C.end>S&&(C.end=Math.max(C.start+xb,S))}}let m=null;for(const S of e){if(S.state==="running"||S.endedAt===null||!gd(S).light)continue;const k=c(S.endedAt)+gd(S).light;k>i&&(!m||S.endedAt>=m.step.endedAt)&&(m={step:S,end:k})}const v=d.find(S=>S.start<=i&&i<S.end),y=(v==null?void 0:v.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),p=y??f??u??(l?e.at(-1)??null:null),b=[...d.flatMap(S=>[S.start,S.end]),(m==null?void 0:m.end)??0].filter(S=>S>i);return{shown:p,lingering:!!y,next:b.length?Math.min(...b):0,wordsEnd:((j=d.at(-1))==null?void 0:j.end)??0}}const jb=6e3,wb=500,Sb=2200,qL=2e4,FL=10*6e4,kb=3e4,VL=2e4,$L=2800;function GL(e,i,a,l,c){var V;const{turn:u,last:d,skew:f}=LL(e),[m,v]=w.useState(null),[y,p]=w.useState(0),[b,j]=w.useState(0),[,S]=w.useState(0),k=w.useRef(new Set),C=w.useRef(Date.now()),E=w.useMemo(()=>u?yb(u,i):d?yb(d,i):[],[u,d,i]);w.useEffect(()=>{for(const q of(u==null?void 0:u.steps)??[])q.state==="failed"&&!k.current.has(q.id)&&(k.current.add(q.id),p(ee=>ee+1),v({mood:"dizzy",until:Date.now()+2600}))},[u]),w.useEffect(()=>{d&&(k.current.clear(),C.current=Date.now(),j(Math.max(Date.now(),bb(E,Date.now(),f,!1).wordsEnd)+jb),d.outcome==="completed"&&d.endedAt-d.startedAt>qL&&v({mood:"happy",until:Date.now()+3200}))},[d]),w.useEffect(()=>{u&&(C.current=Date.now())},[u!==null]);const M=Date.now(),T=bb(E,M,f,u!==null),_=T.shown,D=E.filter(q=>q.state==="running").sort((q,ee)=>ee.startedAt-q.startedAt)[0],A=!u&&(d==null?void 0:d.outcome)==="completed"&&M+f-d.endedAt<Sb,I=M-C.current,U=!u&&(a==null?void 0:a.status)==="idle"&&I>kb&&(I-kb)%VL<$L,$=D&&D.look!=="thought"?yp(D):T.lingering&&_?yp(_):D?yp(D):u?{motion:"think",fast:!1}:A?{motion:"stretch",fast:!1}:U?{motion:"groom",fast:!1}:c,O=!u&&!_&&d!==null&&M<b;return w.useEffect(()=>{const q=[(m==null?void 0:m.until)??0,b-wb,b,((d==null?void 0:d.endedAt)??0)-f+Sb,T.next].filter(Y=>Y>Date.now()),ee=setTimeout(()=>S(Y=>Y+1),q.length?Math.min(...q)-Date.now()+20:1e3);return()=>clearTimeout(ee)}),{view:{steps:E,shown:_,skew:f,startedAt:((V=u??d)==null?void 0:V.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:O?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:M>=b-wb}:null},motion:$.motion,fast:$.fast,mood:m&&m.until>M?m.mood:l,shake:y,canRecap:!u&&d!==null&&!O&&M+f-d.endedAt<FL,showRecap:()=>j(Date.now()+jb)}}const X5="jarvy-floating-bot",Zo=10,YL=4,vd=new URLSearchParams(location.search).get("npc")==="demo";function XL(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 KL(){try{const e=JSON.parse(localStorage.getItem(X5)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function QL({bot:e,chatId:i,status:a,area:l,avoid:c,onOpen:u}){const d=w.useRef(null),f=w.useRef(null),m=w.useRef(KL()),v=w.useRef(null),y=w.useRef(!1),p=w.useRef(null),b=w.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),j=w.useRef(null),[S,k]=w.useState(!1),C=w.useRef(null),E=OL(vd,e.mood),M=GL(vd?null:e.id,i,a,e.mood,XL(a)),T=vd?E:M;b.current.motion=T.motion,b.current.fast=T.fast,b.current.mood=T.mood;function _(){const U=l.current.getBoundingClientRect(),$=d.current.offsetWidth,O=c.current?c.current.getBoundingClientRect().top-U.top:U.height,V=Math.max(Zo,U.width-$-Zo),q=Math.max(Zo,O-$-Zo);return{minX:Zo,minY:Zo,maxX:V,maxY:q}}function D(){var V;const U=(V=l.current)==null?void 0:V.getBoundingClientRect(),$=d.current;if(!U||!$)return 0;const O=U.width/2-$.offsetWidth/2;return O>0?Math.max(-1,Math.min(1,(O-$.offsetLeft)/O)):0}function A(){var O;if(!d.current||!l.current)return;const U=_(),$=d.current;$.style.left=`${U.minX+m.current.x*(U.maxX-U.minX)}px`,$.style.top=`${U.minY+m.current.y*(U.maxY-U.minY)}px`,(O=C.current)==null||O.call(C)}w.useLayoutEffect(()=>{A();const U=new ResizeObserver(A);for(const $ of[l.current,c.current,d.current])$&&U.observe($);return()=>U.disconnect()},[]),w.useEffect(()=>{var U;(U=j.current)==null||U.setColor(($i[e.color]??$i.gray).hex)},[e.color]),w.useEffect(()=>{var U;(U=j.current)==null||U.setCrown(e.agent)},[e.agent]);const I=a!=null&&a.error?`${a.runId??""}:${a.error}`:null;return w.useEffect(()=>{var U;I&&((U=j.current)==null||U.shake(performance.now()))},[I]),w.useEffect(()=>{var U;T.shake&&((U=j.current)==null||U.shake(performance.now()))},[T.shake]),w.useEffect(()=>{const U=V=>{(V.pointerType==="mouse"||V.type==="pointerdown")&&(p.current={x:V.clientX,y:V.clientY})},$=V=>{V.relatedTarget||(p.current=null)},O=V=>{const q=V.target;if(q.id!=="jarvy-composer")return;const ee=q.getBoundingClientRect();p.current={x:ee.left+ee.width/2,y:ee.top+ee.height/2}};return window.addEventListener("pointermove",U),window.addEventListener("pointerdown",U),document.addEventListener("pointerout",$),document.addEventListener("input",O),document.addEventListener("focusin",O),()=>{window.removeEventListener("pointermove",U),window.removeEventListener("pointerdown",U),document.removeEventListener("pointerout",$),document.removeEventListener("input",O),document.removeEventListener("focusin",O)}},[]),w.useEffect(()=>{let U=!0,$=0,O=()=>{};const V=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([Pd(()=>import("./three.module-BdMZo7zQ.js"),[]),Pd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([q,ee])=>{if(!U||!f.current)return;const Y=new q.WebGLRenderer({canvas:f.current,antialias:!0,alpha:!0});ee.configureRenderer(q,Y);const{scene:H,camera:K}=ee.createStage(q),R=new ee.CatFigure(q,($i[e.color]??$i.gray).hex);R.setCrown(e.agent),R.pose(b.current.mood),H.add(R.root),ee.frameCamera(K,1,3.3),j.current=R;let F=0;const ne=J=>{var P;const W=d.current;if(W){const G=Math.round(W.offsetWidth*Math.min(2,devicePixelRatio||1));G!==F&&(F=G,Y.setSize(G,G,!1));const fe=W.getBoundingClientRect(),ye=p.current;b.current.lookX=ye?Math.max(-1,Math.min(1,(ye.x-fe.left-fe.width/2)/320)):0,b.current.lookY=ye?Math.max(-1,Math.min(1,(ye.y-fe.top-fe.height/2)/320)):0,b.current.reduced=V.matches;const je=b.current.motion,re=!!((P=v.current)!=null&&P.moved)&&(je==="idle"||je==="groom"||je==="stretch");(b.current.faceX===void 0||!(re||je==="sleep"))&&(b.current.faceX=D()),R.frame(J,b.current),Y.render(H,K)}$=requestAnimationFrame(ne)},L=()=>{cancelAnimationFrame($),document.hidden||($=requestAnimationFrame(ne))};document.addEventListener("visibilitychange",L),L(),k(!0),O=()=>{document.removeEventListener("visibilitychange",L),cancelAnimationFrame($),R.dispose(),Y.dispose(),Y.forceContextLoss(),j.current=null}}).catch(()=>{}),()=>{U=!1,O()}},[]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":S||void 0,"data-motion":T.motion,title:e.name,"aria-label":x("avatar.openInfo",{name:e.name}),onPointerDown:U=>{if(U.button!==0)return;const $=U.currentTarget;$.setPointerCapture(U.pointerId),v.current={id:U.pointerId,x:U.clientX,y:U.clientY,left:$.offsetLeft,top:$.offsetTop,moved:!1}},onPointerMove:U=>{const $=v.current;if(!$||$.id!==U.pointerId)return;const O=U.clientX-$.x,V=U.clientY-$.y;if(!$.moved&&Math.hypot(O,V)<YL)return;$.moved=!0;const q=_(),ee=Math.min(q.maxX,Math.max(q.minX,$.left+O)),Y=Math.min(q.maxY,Math.max(q.minY,$.top+V));m.current={x:q.maxX>q.minX?(ee-q.minX)/(q.maxX-q.minX):0,y:q.maxY>q.minY?(Y-q.minY)/(q.maxY-q.minY):0},A()},onPointerUp:U=>{const $=v.current;!$||$.id!==U.pointerId||(v.current=null,y.current=$.moved,$.moved&&localStorage.setItem(X5,JSON.stringify(m.current)))},onPointerCancel:()=>{v.current=null},onClick:()=>{if(y.current){y.current=!1;return}T.canRecap?T.showRecap():u()},style:{"--jv-avatar-size":"100%"},children:[o.jsx("canvas",{ref:f,"aria-hidden":"true"}),!S&&o.jsx(Jl,{color:e.color,mood:e.mood,size:88,crown:e.agent})]}),o.jsx(wL,{view:T.view,name:e.name,cat:d,area:l,avoid:c,layout:C,facing:D,toolbar:vd?(U,$)=>o.jsx(EL,{controls:E.controls,toolbar:U,onReplay:()=>{$(),E.controls.replay()}}):void 0})]})}function ZL({className:e,...i}){return o.jsx("div",{"data-slot":"card",className:an("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...i})}function JL({className:e,...i}){return o.jsx("div",{"data-slot":"card-header",className:an("grid gap-1 px-5",e),...i})}function WL({className:e,...i}){return o.jsx("div",{"data-slot":"card-title",className:an("font-semibold leading-none",e),...i})}function eB({className:e,...i}){return o.jsx("div",{"data-slot":"card-content",className:an("px-5",e),...i})}function tB({bot:e,connections:i,onSaved:a,onManage:l}){return o.jsxs(ZL,{className:"jarvy-model-picker jv-ui",children:[o.jsx(JL,{children:o.jsx(WL,{children:x("botModel.pickFor",{name:e.name})})}),o.jsxs(eB,{children:[o.jsx(g5,{bot:e,connections:i,onSaved:a,onManage:l}),o.jsxs("div",{className:"jv-env-setup",children:[o.jsx("h4",{children:x("environment.title")}),o.jsx(ND,{bot:e,onSaved:a})]})]})]})}function nB({chat:e,inChannel:i,bots:a,members:l,meId:c,drafts:u,composeReady:d,botName:f,activeBot:m,status:v,connections:y,activity:p,history:b,divider:j,activeQuestion:S,pane:k,onPane:C,onToggleInfo:E,find:M,onNav:T,onBot:_,hasBotDirects:D,onInvite:A,onQuote:I,onReply:U,onReact:$,onJump:O,onSettled:V,onSend:q,onPreview:ee,onSaveNote:Y,notice:H,createBot:K,creating:R,updateBot:F,onManageModels:ne,error:L,chatArea:J,transcript:W,composeWrap:P,hidden:G,onOpenThread:fe}){const{messages:ye,loading:je,hasOlder:re,loadingOlder:xe,top:oe,away:ce,unseen:me,toLatest:Ne}=b;return o.jsxs("main",{className:"ui-chat","aria-label":x("chat.area"),ref:J,hidden:G,children:[!i&&o.jsx(ut,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:x("common.openNav"),onClick:T}),!i&&D&&o.jsx(ut,{icon:"people",className:"jv-floating-dms",label:x("chat.botDms",{name:f}),"aria-pressed":(k==null?void 0:k.kind)==="botdms",onClick:()=>C((k==null?void 0:k.kind)==="botdms"?null:{kind:"botdms"})}),o.jsx("span",{className:"sr-only",role:"status","aria-label":x("chat.botStatus"),children:i?"":p}),e?o.jsxs(o.Fragment,{children:[i?o.jsx(GD,{chat:e,members:la(l),bots:a,onNav:T,infoOpen:(k==null?void 0:k.kind)==="info"&&k.page==="main",onInfo:()=>E("main"),membersOpen:(k==null?void 0:k.kind)==="info"&&k.page==="members",onMembers:()=>E("members"),threadsOpen:(k==null?void 0:k.kind)==="threads",onThreads:()=>C((k==null?void 0:k.kind)==="threads"?null:{kind:"threads"}),searchOpen:(k==null?void 0:k.kind)==="search",onSearch:()=>(k==null?void 0:k.kind)==="search"?C(null):M.search(e)}):m&&o.jsx(QL,{bot:m,chatId:e.id,status:v,area:J,avoid:P,onOpen:()=>_(m.id)}),i&&o.jsx(YD,{chat:e,onSave:Y}),o.jsxs("div",{className:`ui-transcript jarvy-transcript${i?" jv-channel-transcript":""}`,ref:W,"aria-label":x("chat.transcript"),role:"log",children:[!i&&!(m!=null&&m.connectionId)&&m&&o.jsx("div",{className:"jarvy-model-onboarding",children:o.jsx(tB,{bot:m,connections:y,onSaved:F,onManage:ne})}),je?o.jsx("p",{className:"jarvy-empty-text",children:x("chat.loading")}):ye.length===0?i?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:[re&&o.jsx("div",{ref:oe,className:"jv-history-more","aria-live":"polite",children:xe?x("chat.loadingOlder"):""}),o.jsx("p",{className:"jarvy-date-stamp",children:oa(ye[0].createdAt,{year:"numeric",month:"long",day:"numeric"})}),i?o.jsx(Ud,{messages:ye,members:l,bots:a,me:c,divider:j,activeQuestion:S,onSettled:V,onPreview:ee,onReply:U,onOpenThread:fe,onQuote:I,onReact:$,onJump:O,onError:L}):o.jsx(vL,{messages:ye,members:l,me:c,activeQuestion:S,bot:m,onSettled:V,onPreview:ee,onQuote:I,onReact:$,onJump:O,onError:L})]}),ce&&ye.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button",onClick:Ne,"aria-label":x("chat.toLatest"),children:[me>0&&o.jsx("span",{children:x("chat.unseen",{count:me})}),o.jsx(De,{name:"chevron-down"})]})})]}),o.jsx($5,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:P,scrollRef:W,disabled:!d,placeholder:i?x("chat.toChannel",{name:e.title}):m!=null&&m.connectionId?x("chat.toBot",{name:f}):x("chat.pickModel"),mention:i?{bots:a,inside:la(l).filter(Le=>Le.id!==c&&e.memberIds.includes(Le.id)),outside:la(l).filter(Le=>!e.memberIds.includes(Le.id)),onInvite:Le=>A(e.id,Le)}:void 0,onSend:q,onError:L,onNotice:H})]}):o.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:a.length?o.jsx("p",{children:x("chat.pick")}):o.jsxs("button",{className:"ui-button ui-primary",onClick:K,disabled:R,children:[o.jsx(De,{name:"person-add"}),x("sidebar.newBot")]})}),e&&o.jsx(M5,{container:W,drafts:u,chatId:e.id,source:Le=>ye.find(Ve=>Ve.id===Le),members:l,onNotice:H})]})}const iB=e=>oa(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function aB(e,i){const[a,l]=w.useState([]);return w.useEffect(()=>{if(l([]),!e)return;let c=!0;return be.botDirects(e).then(u=>{c&&l(u.chats)}).catch(()=>{}),()=>{c=!1}},[e,i]),a}function rB({bot:e,chats:i,members:a,bots:l,me:c,tick:u,onClose:d,onPreview:f,onError:m}){const[v,y]=w.useState(null),[p,b]=w.useState(null);w.useEffect(()=>{if(b(null),!v)return;let k=!0;return be.messages(v).then(C=>{k&&b(C.messages)}).catch(C=>{k&&m(C)}),()=>{k=!1}},[v,u]);const j=k=>a.find(C=>C.id!==e.id&&k.memberIds.includes(C.id)),S=i.find(k=>k.id===v);return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("chat.botDms",{name:e.name}),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[S&&o.jsx(ut,{icon:"chevron-left",label:x("directs.back"),onClick:()=>y(null)}),o.jsx("strong",{children:S?x("directs.between",{name:e.name,other:qa(j(S))}):x("chat.botDms",{name:e.name})}),o.jsx("span",{className:"jv-spacer"}),o.jsx(ut,{icon:"close",label:x("common.close"),onClick:d})]}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ui-pane-body jv-pane-body",children:p===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):p.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("chat.empty")}):o.jsx(Ud,{messages:p,members:a,bots:l,me:c,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:f})}),o.jsx("p",{className:"jv-readonly",children:x("directs.readOnly")})]}):o.jsx("div",{className:"ui-pane-body jv-pane-body",children:i.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("sidebar.noDms")}):i.map(k=>{const C=j(k);return o.jsxs("button",{type:"button",className:"jv-thread-item",onClick:()=>y(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx(yr,{member:C,bots:l,size:20}),o.jsx("strong",{children:qa(C)}),o.jsx("span",{className:"jv-muted",children:iB(k.updatedAt)})]}),k.lastMessage&&o.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Bc(k.lastMessage)})]},k.id)})})]})}function lB(e,i){return e!=null&&e.connectionId?i!=null&&i.error?{label:x("activity.error"),tone:"error"}:(i==null?void 0:i.status)==="running"?{label:N5(i.activity),tone:"busy"}:{label:x((i==null?void 0:i.status)==="idle"?"activity.idle":"activity.stopped")}:{label:x("activity.noModel")}}function oB({channel:e,members:i,bots:a,statuses:l,me:c,onAdd:u,onBot:d,onChanged:f,onError:m}){const[v,y]=w.useState(null),p=i.filter(k=>e.memberIds.includes(k.id)),b=p.filter(k=>k.kind!=="bot").sort((k,C)=>+(C.id===c)-+(k.id===c)),j=p.filter(k=>k.kind==="bot"),S=k=>{const C=k.kind==="bot"?a.find(_=>_.id===k.id):void 0,E=l[k.id],M=k.kind==="bot"?lB(C,E):void 0,T=o.jsxs(o.Fragment,{children:[o.jsx(yr,{member:k,bots:a,size:28,working:(E==null?void 0:E.status)==="running"&&E.activity!=="asking"}),o.jsxs("span",{className:"jv-member-name",children:[k.name,k.id===c&&o.jsx("span",{className:"jv-role",children:x("common.you")})]}),M&&o.jsx("span",{className:"jv-member-state","data-tone":M.tone,children:M.label})]});return o.jsxs("div",{className:"jv-member-row",children:[C?o.jsx("button",{type:"button",className:"jv-member-main","aria-label":x("members.view",{name:k.name}),onClick:()=>d(k.id),children:T}):o.jsx("div",{className:"jv-member-main",children:T}),k.id!==c&&o.jsx(ut,{icon:"close",label:x("members.remove",{name:k.name}),className:"jv-member-remove",onClick:()=>y(k)})]},k.id)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-member-bar",children:[o.jsx("span",{children:x("members.count",{count:p.length})}),o.jsxs("button",{type:"button",className:"ui-button ui-primary jv-member-pane-add",onClick:u,children:[o.jsx(De,{name:"person-add"}),x("common.add")]})]}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",x("members.people"),b],["bots","Bot",j]].map(([k,C,E])=>E.length>0&&o.jsxs("section",{className:"jv-member-group","aria-label":C,children:[o.jsxs("h3",{children:[C," · ",E.length]}),E.map(S)]},k))}),v&&o.jsx(B5,{title:x("members.removeTitle",{name:v.name,channel:e.title}),body:x("members.removeBody"),confirm:x("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{f(await be.removeMember(e.id,v.id)),y(null)}catch(k){m(k)}}})]})}function Cb({label:e,value:i,empty:a,maxLength:l,required:c=!1,onSave:u}){const d=w.useId(),[f,m]=w.useState(null),[v,y]=w.useState(!1);w.useEffect(()=>m(null),[i]);const p=async()=>{if(!(f===null||v||c&&!f.trim())){if(f.trim()===i){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(ut,{icon:"pencil",label:x("info.edit",{name:e}),className:"jv-info-edit",onClick:()=>m(i)})]}),f===null?o.jsx("p",{className:"jv-info-value","data-empty":!i||void 0,children:i||a}):o.jsxs("div",{className:"jv-inline-edit",children:[o.jsx("input",{id:d,value:f,maxLength:l,autoFocus:!0,placeholder:a,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),p()),b.key==="Escape"&&(b.stopPropagation(),m(null))}}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>m(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:v||c&&!f.trim(),onClick:()=>void p(),children:x("common.save")})]})]})}function sB({channel:e,page:i,sections:a,members:l,bots:c,statuses:u,me:d,onPage:f,onPin:m,onMute:v,onAdd:y,onBot:p,onDelete:b,onChanged:j,onClose:S,onError:k}){const C=w.useId(),E=async T=>{try{j(await be.updateChannel(e.id,T))}catch(_){throw k(_),_}},M=l.filter(T=>e.memberIds.includes(T.id)).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x(i==="members"?"info.memberList":"entry.channelInfo"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[i==="members"&&o.jsx(ut,{icon:"chevron-left",label:x("info.back"),className:"jv-pane-back",onClick:()=>f("main")}),o.jsx("strong",{children:x(i==="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(ut,{icon:"close",label:x("common.close"),onClick:S})]}),i==="members"?o.jsx(oB,{channel:e,members:l,bots:c,statuses:u,me:d,onAdd:y,onBot:p,onChanged:j,onError:k}):o.jsxs("div",{className:"ui-pane-body jv-pane-body jv-info",children:[o.jsxs("div",{className:"jv-info-actions",children:[o.jsxs("button",{type:"button","aria-pressed":e.pinned,onClick:m,children:[o.jsx(De,{name:"pin"}),x("entry.pin")]}),o.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:v,children:[o.jsx(De,{name:e.muted?"bell-slash":"bell"}),x("entry.mute")]}),o.jsxs("button",{type:"button",onClick:y,children:[o.jsx(De,{name:"person-add"}),x("info.addMembers")]})]}),o.jsx(Cb,{label:x("info.name"),value:e.title,empty:x("info.newChannel"),maxLength:80,required:!0,onSave:T=>E({name:T})}),o.jsx(Cb,{label:x("info.topic"),value:e.topic,empty:x("info.noTopic"),maxLength:200,onSave:T=>E({topic:T})}),o.jsxs("div",{className:"jv-info-field",children:[o.jsx("div",{className:"jv-info-label",children:o.jsx("label",{htmlFor:C,children:x("info.section")})}),o.jsx(v5,{id:C,value:e.sectionId,sections:a,onChange:T=>void E({sectionId:T}).catch(()=>{})})]}),o.jsxs("nav",{className:"jv-info-menu","aria-label":x("info.menu"),children:[o.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>f("members"),children:[o.jsx(De,{name:"people"}),o.jsx("span",{className:"ui-menu-copy",children:x("channel.members")}),o.jsx("span",{className:"jv-muted",children:M}),o.jsx(De,{name:"chevron-right"})]}),o.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:b,children:[o.jsx(De,{name:"trash"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})]})]})}function cB({chat:e,chats:i,members:a,focusKey:l,onOpenMessage:c,onClose:u,onError:d}){const[f,m]=w.useState(""),v=w.useRef(null);w.useEffect(()=>{var j,S;(j=v.current)==null||j.focus(),(S=v.current)==null||S.select()},[l,e.id]);const{result:y,loading:p}=I5(f,e.id,d),b=e.type==="channel"?`#${e.title}`:x(e.type==="thread"?"search.inThread":"search.inDm");return o.jsxs("aside",{className:"ui-pane jv-pane jv-search-pane","aria-label":x("search.paneLabel"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("search.title")}),o.jsx("span",{className:"jv-muted jv-pane-sub",children:b}),o.jsx("span",{className:"jv-spacer"}),o.jsx(ut,{icon:"close",label:x("search.close"),onClick:u})]}),o.jsx("div",{className:"jv-pane-search",children:o.jsx("input",{ref:v,type:"search",value:f,placeholder:x(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":x("search.placeholder"),onChange:j=>m(j.target.value),onKeyDown:j=>{j.key==="Escape"&&(j.preventDefault(),f?m(""):u())}})}),o.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:f.trim()?y?y.messages.length?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-result-count",children:x(y.messages.length>=60?"search.countLatest":"search.count",{count:y.messages.length})}),y.messages.map(({message:j,chat:S})=>o.jsx(U5,{message:j,chat:S,chats:i,members:a,query:f,showPlace:S.id!==e.id,onOpen:c},j.id))]}):o.jsx("p",{className:"jv-result-empty",children:x("search.noMessages")}):p&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")}):o.jsx("p",{className:"jv-result-empty",children:x("search.prompt")})})]})}const uB=e=>oa(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function dB({chat:e,channelName:i,expanded:a=!1,onTitle:l,onStatus:c,onSummary:u,onConclude:d}){var T;const[f,m]=w.useState(null),[v,y]=w.useState(null),[p,b]=w.useState(!1),[j,S]=w.useState(a);w.useEffect(()=>{m(null),y(null),S(a)},[e.id,a]);const k=async(_,D)=>{b(!0);try{await _(),D()}catch{}finally{b(!1)}},C=e.status==="done",E=e.note,M=((T=E==null?void 0:E.text.split(`
|
|
554
|
-
`).find(_=>_.trim()&&!_.startsWith("#")))==null?void 0:T.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-thread-meta","data-open":j||void 0,children:[o.jsxs("div",{className:"jv-thread-title-row",children:[f===null?o.jsxs(o.Fragment,{children:[o.jsx("h2",{className:"jv-thread-title",title:e.title,children:e.title}),o.jsx(ut,{icon:"pencil",label:x("thread.rename"),onClick:()=>m(e.title)})]}):o.jsxs("form",{className:"jv-inline-edit",onSubmit:_=>{_.preventDefault(),f.trim()&&k(()=>l(f.trim()),()=>m(null))},children:[o.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":x("thread.title"),onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Escape"&&m(null)}}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:p||!f.trim(),children:x("common.save")})]}),o.jsx("button",{type:"button",className:"jv-thread-status","data-done":C||void 0,disabled:p,title:x("thread.toggleStatus"),onClick:()=>void k(()=>c(C?"open":"done"),()=>{}),children:C?o.jsxs(o.Fragment,{children:[o.jsx(De,{name:"check"}),x("channel.threadDone")]}):x("threads.open")})]}),v!==null?o.jsxs("div",{className:"jv-summary","data-editing":!0,children:[o.jsx("textarea",{className:"jv-notice-input",value:v,autoFocus:!0,"aria-label":x("thread.summary"),onChange:_=>y(_.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>y(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:p||!v.trim(),onClick:()=>void k(()=>u(v.trim()),()=>y(null)),children:x("common.save")})]})]}):E?o.jsxs("div",{className:"jv-summary",children:[o.jsxs("div",{className:"jv-summary-head",children:[o.jsxs("button",{type:"button",className:"jv-summary-toggle","aria-expanded":j,onClick:()=>S(!j),children:[o.jsx("strong",{children:x("thread.summary")}),!j&&o.jsx("span",{className:"jv-summary-first",children:M}),o.jsx(De,{name:j?"chevron-down":"chevron-right"})]}),j&&o.jsxs("span",{className:"jv-muted jv-summary-meta",children:[E.updatedBy.name," · ",uB(E.updatedAt)," · ",x("notice.version",{version:E.version})]}),o.jsx(ut,{icon:"pencil",label:x("thread.editSummary"),onClick:()=>y(E.text)})]}),j&&o.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:o.jsx(Lc,{text:E.text})}),j&&!C&&o.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:p,onClick:()=>void k(d,()=>{}),children:[o.jsx(De,{name:"check"}),x("thread.conclude",{channel:i})]})]}):o.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>y(""),children:[o.jsx(De,{name:"add"}),x("thread.addSummary")]})]})}function Nb({threadId:e,mode:i,showSummary:a=!1,focus:l,onSearch:c,channel:u,drafts:d,members:f,bots:m,me:v,tick:y,onClose:p,onToggleMode:b,onNav:j,onChanged:S,onInvite:k,onPreview:C,onError:E,onNotice:M}){const[T,_]=w.useState(null),[D,A]=w.useState(null),[I,U]=w.useState([]),[$,O]=w.useState(null),V=w.useRef(I);V.current=I;const q=w.useRef(null),ee=w.useRef(null),Y=w.useRef(null),H=w.useRef(!1),K=w.useRef(!0),[R,F]=w.useState(!1),ne=w.useRef(0),L=w.useRef(0);w.useEffect(()=>{_(null),A(null),U([]),O(null),H.current=!1,K.current=!0,F(!1),ne.current=0,L.current=0},[e]),w.useEffect(()=>{let oe=!0;return Promise.all([be.chat(e),be.messages(e)]).then(async([ce,me])=>{if(oe&&(_(ce),U(me.messages),Y.current!==e&&(Y.current=e,O(ce.readSequence)),ce.rootMessageId)){const Ne=await be.message(ce.rootMessageId);oe&&A(Ne)}}).catch(ce=>{oe&&E(ce)}),()=>{oe=!1}},[e,y]),w.useLayoutEffect(()=>{const oe=q.current;if(!oe||!T)return;const ce=()=>oe.scrollTo({top:oe.scrollHeight,behavior:"instant"}),me=I.at(-1),Ne=(me==null?void 0:me.senderId)===v&&me.sequence>L.current;if(L.current=Math.max(L.current,(me==null?void 0:me.sequence)??0),H.current)(K.current||Ne)&&oe.scrollTo({top:oe.scrollHeight,behavior:"smooth"});else{if(!I.length&&!D)return;H.current=!0;const Le=l?oe.querySelector(`[data-message="${l.id}"]`):null;if(Le){if(K.current=!1,Le.scrollIntoView({block:"center"}),l!=null&&l.passage&&A5(Le,l.passage))return;Le.classList.add("jv-jump"),setTimeout(()=>Le.classList.remove("jv-jump"),1600);return}ce(),requestAnimationFrame(ce)}(K.current||Ne)&&(ne.current=(me==null?void 0:me.sequence)??0)},[I,D,T]),w.useEffect(()=>{H.current&&l&&P(l.id,l.passage)},[l]),w.useEffect(()=>{const oe=q.current,ce=ee.current;if(!oe||!ce)return;const me=new ResizeObserver(()=>{!H.current||!K.current||oe.scrollHeight-oe.scrollTop-oe.clientHeight<8||oe.scrollTo({top:oe.scrollHeight,behavior:"instant"})});me.observe(ce);const Ne=()=>{var Le;K.current=oe.scrollHeight-oe.scrollTop-oe.clientHeight<120,K.current&&(ne.current=Math.max(ne.current,((Le=V.current.at(-1))==null?void 0:Le.sequence)??0)),F(!K.current)};return Ne(),oe.addEventListener("scroll",Ne,{passive:!0}),()=>{me.disconnect(),oe.removeEventListener("scroll",Ne)}},[q.current,e,T]),w.useEffect(()=>{const oe=I.at(-1);if(!T||!oe||oe.chatId!==T.id)return;const ce=()=>{if(document.visibilityState!=="visible"||T.readSequence>=oe.sequence)return;const me={...T,readSequence:oe.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};_(me),be.markRead(T.id,oe.sequence).then(()=>S(me)).catch(E)};return ce(),document.addEventListener("visibilitychange",ce),()=>document.removeEventListener("visibilitychange",ce)},[I,T]);const J=async oe=>{try{const ce=await oe();_(ce),S(ce)}catch(ce){throw E(ce),ce}},W=async(oe,ce,me)=>{try{const Ne=await be.react(oe.id,ce,me),Le=Ve=>Ve.id===Ne.id?{...Ve,reactions:Ne.reactions}:Ve;U(Ve=>Ve.map(Le)),A(Ve=>Ve&&Le(Ve))}catch(Ne){E(Ne)}},P=(oe,ce)=>{var Ne;const me=oe&&((Ne=q.current)==null?void 0:Ne.querySelector(`[data-message="${oe}"]`));if(!me){M(x(oe?"thread.sourceElsewhere":"app.sourceGone"));return}_5(me,ce)},G={onQuote:oe=>V5(d,oe,f),onReact:W,onJump:P,onError:E},fe=async(oe,ce,me,Ne,Le=[],Ve=!1)=>{await be.send(e,oe,ce,me,Ve,Ne,Le);const mt=u?[...new Set(gg(oe,la(f)).filter(_t=>!u.memberIds.includes(_t.member.id)).map(_t=>_t.member.name))]:[];mt.length&&M(x("app.notInChannel",{names:mt.join(x("common.listSeparator")),count:mt.length}));const[ot,Je]=await Promise.all([be.chat(e),be.messages(e)]);_(ot),U(Je.messages),S(ot)},ye=(u==null?void 0:u.title)??x("search.channel"),je=f.find(oe=>oe.id===(D==null?void 0:D.senderId)),re=R?I.filter(oe=>oe.sequence>ne.current&&oe.senderId!==v).length:0,xe=i==="pane"?"aside":i==="embed"?"section":"main";return o.jsxs(xe,{className:i==="pane"?"ui-pane jv-pane":i==="embed"?"ui-chat jv-thread-full jv-thread-embed":"ui-chat jv-thread-full","aria-label":x("thread.label"),onKeyDown:oe=>{T&&c&&(oe.ctrlKey||oe.metaKey)&&oe.key.toLowerCase()==="f"&&(oe.preventDefault(),c(T))},children:[o.jsxs("header",{className:i==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[i==="full"&&o.jsx(ut,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:j}),i==="embed"&&o.jsx(ut,{icon:"chevron-left",className:"ui-mobile-only",label:x("thread.backToList"),onClick:p}),i==="full"?o.jsxs("button",{type:"button",className:"jv-crumb",onClick:p,children:[o.jsx(De,{name:"chevron-left"}),o.jsx("span",{className:"jv-hash",children:"#"}),ye]}):i==="embed"?o.jsxs("button",{type:"button",className:"jv-crumb",title:x("thread.inChannel"),onClick:b,children:[o.jsx("span",{className:"jv-hash",children:"#"}),ye]}):o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:x("thread.label")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",ye]})]}),o.jsx("span",{className:"jv-spacer"}),T&&c&&o.jsx(ut,{icon:"search",label:x("thread.search"),onClick:()=>c(T)}),T&&o.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":T.following||void 0,title:x(T.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void J(()=>be.follow(e,!T.following)).catch(()=>{}),children:[o.jsx(De,{name:"bell"}),x(T.following?"threads.following":"thread.follow")]}),i!=="embed"&&o.jsx(ut,{icon:i==="pane"?"arrows-expand":"arrows-contract",className:"jv-desktop-only",label:x(i==="pane"?"thread.expand":"thread.collapse"),onClick:b}),i==="pane"&&o.jsx(ut,{icon:"close",label:x("thread.close"),onClick:p})]}),T&&o.jsx("div",{className:i==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:o.jsx(dB,{chat:T,channelName:ye,expanded:a,onTitle:oe=>J(()=>be.updateThread(e,{title:oe})),onStatus:oe=>J(()=>be.updateThread(e,{status:oe})),onSummary:oe=>J(()=>be.setNote(e,oe)),onConclude:async()=>{var oe;try{await fe(`${x("thread.conclusion")}
|
|
555
|
-
|
|
556
|
-
${((oe=T.note)==null?void 0:oe.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),ce=>ce.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await J(()=>be.updateThread(e,{status:"done"})),M(x("thread.concluded",{channel:ye}))}catch(ce){throw E(ce),ce}}})}),o.jsxs("div",{ref:q,className:i==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[o.jsxs("div",{ref:ee,children:[D&&o.jsx(Ud,{messages:[{...D,thread:null}],members:f,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:W,onJump:P,onError:E}),o.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:o.jsx("span",{children:I.length?x("channel.replies",{count:I.length}):x("thread.noReplies")})}),o.jsx(Ud,{messages:I,members:f,bots:m,me:v,divider:$??Number.MAX_SAFE_INTEGER,onSettled:oe=>U(ce=>ce.map(me=>me.id===oe.id?oe:me)),onPreview:C,...G})]}),R&&I.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button","aria-label":x("thread.toLatest"),onClick:()=>{var oe;return(oe=q.current)==null?void 0:oe.scrollTo({top:q.current.scrollHeight,behavior:"smooth"})},children:[re>0&&o.jsx("span",{children:x("chat.unseen",{count:re})}),o.jsx(De,{name:"chevron-down"})]})})]}),o.jsx($5,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:x("thread.reply"),scrollRef:q,disabled:!T,initialText:I.length===0&&D&&D.senderId!==v&&je&&!je.deleted?`@${je.name} `:void 0,mention:{bots:m,inside:la(f).filter(oe=>oe.id!==v&&!!(u!=null&&u.memberIds.includes(oe.id))),outside:la(f).filter(oe=>!(u!=null&&u.memberIds.includes(oe.id))),onInvite:k},onSend:fe,onError:E,onNotice:M}),o.jsx(M5,{container:q,drafts:d,chatId:e,members:f,onNotice:M,source:oe=>oe===(D==null?void 0:D.id)?D:I.find(ce=>ce.id===oe)})]})}const xp={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},yd=e=>e.lastReplyAt??e.createdAt;function K5(e,i){const a=i==="created"?(l,c)=>c.createdAt-l.createdAt:i==="status"?(l,c)=>+(l.status==="done")-+(c.status==="done")||yd(c)-yd(l):(l,c)=>yd(c)-yd(l);return[...e].sort(a)}function Q5(e){const i=`jarvy-thread-sort-${e}`,[a,l]=w.useState(()=>{const c=localStorage.getItem(i);return c==="created"||c==="status"?c:"updated"});return[a,c=>{l(c),localStorage.setItem(i,c)}]}function Z5({value:e,onChange:i}){return o.jsxs(Wl,{value:e,onValueChange:a=>i(a),children:[o.jsxs(to,{className:"jv-thread-sort","aria-label":x("threadSort.current",{order:x(xp[e])}),title:x("threadSort.title"),children:[o.jsx(O8,{}),o.jsx(eo,{})]}),o.jsx(no,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(xp).map(a=>o.jsx(Vi,{value:a,children:x(xp[a])},a))})]})}const J5=e=>oa(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function fB({channel:e,members:i,bots:a,tick:l,onOpen:c,onClose:u,onError:d}){const[f,m]=w.useState(null),[v,y]=w.useState("open"),[p,b]=Q5("channel");w.useEffect(()=>{let k=!0;return be.channelThreads(e.id).then(C=>{k&&m(C.threads)}).catch(C=>{k&&d(C)}),()=>{k=!1}},[e.id,l]);const j=K5((f??[]).filter(k=>v==="all"||k.status===v),p),S=k=>(f??[]).filter(C=>C.status===k).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("channel.threads")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),o.jsx("span",{className:"jv-spacer"}),o.jsx(Z5,{value:p,onChange:b}),o.jsx(ut,{icon:"close",label:x("threads.closeList"),onClick:u})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.byStatus"),children:[["open",x("threads.openCount",{count:S("open")})],["done",x("threads.doneCount",{count:S("done")})],["all",x("threads.all")]].map(([k,C])=>o.jsx("button",{type:"button",role:"tab","aria-selected":v===k,onClick:()=>y(k),children:C},k))}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:f===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):j.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("threads.none")}):j.map(k=>{const C=i.find(E=>{var M;return E.id===((M=k.root)==null?void 0:M.senderId)});return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":k.unread>0||void 0,onClick:()=>c(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:k.title}),k.alerts>0?o.jsx("span",{className:"jv-badge",children:k.alerts}):k.unread>0&&o.jsx("span",{className:"jv-count",children:k.unread}),o.jsx("span",{className:"jv-thread-status","data-done":k.status==="done"||void 0,children:x(k.status==="done"?"channel.threadDone":"threads.open")})]}),k.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(yr,{member:C,bots:a,size:16}),o.jsx("span",{children:Bc(k.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[x("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${J5(k.lastReplyAt)}`:"",k.following?` · ${x("threads.following")}`:""]})]},k.id)})})]})}function hB({threads:e,chats:i,members:a,bots:l,onNav:c,renderThread:u}){const[d,f]=w.useState(e),[m,v]=w.useState(null),[y,p]=w.useState("all"),[b,j]=Q5("followed");w.useEffect(()=>f(M=>[...e,...M.filter(T=>!e.some(_=>_.id===T.id)).map(T=>({...T,following:!1,unread:0,alerts:0}))]),[e]);const S=K5(d,b).filter(M=>y==="all"||(y==="unread"?M.unread>0:M.status===y)),k=d.filter(M=>M.unread>0).length,C=d.find(M=>M.id===m),E=M=>d.filter(T=>T.status===M).length;return o.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":x("sidebar.followed"),"data-open":C?"":void 0,children:[o.jsxs("section",{className:"jv-followed-list","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(ut,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:c}),o.jsx("strong",{className:"jv-channel-title",children:x("sidebar.followed")})]}),o.jsx(Z5,{value:b,onChange:j})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.filter"),children:[["all",x("threads.all")],["unread",k?x("threads.unreadCount",{count:k}):x("threads.unread")],["open",x("threads.openCount",{count:E("open")})],["done",x("threads.doneCount",{count:E("done")})]].map(([M,T])=>o.jsx("button",{type:"button",role:"tab","aria-selected":y===M,onClick:()=>p(M),children:T},M))}),o.jsx("div",{className:"jv-followed-items",children:S.length===0?o.jsx("p",{className:"jv-picker-empty",children:x({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):S.map(M=>{const T=a.find(D=>{var A;return D.id===((A=M.root)==null?void 0:A.senderId)}),_=i.find(D=>D.id===M.parentId);return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":M.unread>0||void 0,"aria-current":M.id===m||void 0,onClick:()=>v(M.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:M.title}),M.alerts>0?o.jsx("span",{className:"jv-badge",children:M.alerts}):M.unread>0&&o.jsx("span",{className:"jv-count",children:M.unread}),o.jsx("span",{className:"jv-thread-status","data-done":M.status==="done"||void 0,children:x(M.status==="done"?"channel.threadDone":"threads.open")})]}),M.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(yr,{member:T,bots:l,size:16}),o.jsx("span",{children:Bc(M.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(_==null?void 0:_.title)??""," · ",x("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${J5(M.lastReplyAt)}`:"",M.following?"":` · ${x("threads.notFollowing")}`]})]},M.id)})})]}),C?u(C,()=>v(null)):o.jsx("div",{className:"jv-followed-empty",children:o.jsx("p",{children:x("threads.pick")})})]})}function mB({pane:e,followedView:i,followed:a,chats:l,sections:c,members:u,bots:d,statuses:f,meId:m,drafts:v,tick:y,paneChannel:p,activeBot:b,botDirects:j,find:S,onPane:k,onNav:C,onBackToChannel:E,onAddMembers:M,onOpenBot:T,onPin:_,onMute:D,onDeleteChannel:A,onChannelSaved:I,onThreadChanged:U,onInvite:$,onPreview:O,onNotice:V,onError:q,paneWidth:ee,onResize:Y}){var F,ne;const H=(e==null?void 0:e.kind)==="thread"?e:null,K=(H==null?void 0:H.mode)==="full",R=()=>k(null);return o.jsxs(o.Fragment,{children:[i&&!K&&o.jsx(hB,{threads:a,chats:l,members:u,bots:d,onNav:C,renderThread:(L,J)=>o.jsx(Nb,{threadId:L.id,mode:"embed",channel:l.find(W=>W.id===L.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:J,onToggleMode:()=>E({id:L.id,parentId:L.parentId},!0),onInvite:W=>$(L.parentId,W),onPreview:O,onError:q,onNotice:V},L.id)}),H&&o.jsx(Nb,{threadId:H.id,mode:H.mode,showSummary:H.summary,focus:H.focus,onSearch:S.search,channel:l.find(L=>L.id===H.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:()=>K?E(H,!1):R(),onToggleMode:()=>K?E(H,!0):k({...H,mode:"full"}),onInvite:L=>$(H.parentId,L),onPreview:O,onError:q,onNotice:V},`${H.id}:${((F=H.focus)==null?void 0:F.id)??""}:${((ne=H.focus)==null?void 0:ne.passage)??""}`),(e==null?void 0:e.kind)==="search"&&o.jsx(cB,{chat:e.chat,chats:l,members:u,focusKey:S.focusKey,onOpenMessage:S.openMessage,onClose:R,onError:q}),(e==null?void 0:e.kind)==="threads"&&p&&o.jsx(fB,{channel:p,members:u,bots:d,tick:y,onOpen:L=>k({kind:"thread",id:L,parentId:p.id,mode:"pane"}),onClose:R,onError:q}),(e==null?void 0:e.kind)==="info"&&p&&o.jsx(sB,{channel:p,page:e.page,sections:c,members:la(u),bots:d,statuses:f,me:m,onPage:L=>k({kind:"info",page:L}),onPin:()=>_(p),onMute:()=>D(p),onAdd:()=>M(p),onBot:T,onDelete:()=>A(p),onChanged:I,onClose:R,onError:q}),(e==null?void 0:e.kind)==="botdms"&&b&&!p&&o.jsx(rB,{bot:b,chats:j,members:u,bots:d,me:m,tick:y,onClose:R,onPreview:O,onError:q}),e&&!K&&o.jsx("div",{className:"jv-resize",style:{right:ee-4},onPointerDown:Y,role:"separator","aria-orientation":"vertical","aria-label":x("app.resizePane")})]})}const Eb="@goodfish/jarvy",W5="0.7.0",pB={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},gB="Apache-2.0",s0=pB.url.replace(/^git\+/,"").replace(/\.git$/,""),Tb=`${s0}/blob/v${W5}`,vB=[{label:"about.source",detail:s0.replace(/^https:\/\//,""),href:s0},{label:"about.package",detail:Eb,href:`https://www.npmjs.com/package/${Eb}`},{label:"about.license",detail:gB,href:`${Tb}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${Tb}/THIRD_PARTY_NOTICE.md`}];function yB(){return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{children:o.jsx("h2",{children:x("settings.about")})})}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-about-intro",children:[o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:"Jarvy"}),o.jsx("span",{children:x("about.tagline")})]}),o.jsx("span",{className:"jv-row-meta",children:x("about.version",{version:W5})})]}),vB.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(q8,{"aria-hidden":"true"})]},e.label))]})]})}function xB(){const[e,i]=w.useState(document.documentElement.classList.contains("dark")),a=c=>{Hd(c?"dark":"light"),i(c)},l=(c,u,d,f,m)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:m,className:"jv-list-row jv-choice-row",onClick:f,children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:u})}),d&&o.jsx(Mi,{"aria-hidden":"true"})]},c);return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{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:Hb.map(c=>l(c,kp(c,"name"),Fd()===c,()=>qb(c),c))})]}),o.jsxs("section",{className:"jv-section","aria-labelledby":"general-theme",children:[o.jsx("h3",{id:"general-theme",className:"jv-section-title",children:x("general.theme")}),o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-theme",children:[l("light",x("general.light"),!e,()=>a(!1)),l("dark",x("general.dark"),e,()=>a(!0))]})]})]})}const bB=`<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>
|
|
557
|
-
`,jB=`<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>
|
|
558
|
-
`,wB=`<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>
|
|
559
|
-
`,SB=`<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>
|
|
560
|
-
`,kB=`<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>
|
|
561
|
-
`,CB=`<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>
|
|
562
|
-
`,NB=`<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>
|
|
563
|
-
`,EB=`<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>
|
|
564
|
-
`,TB=`<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>
|
|
565
|
-
`,AB=`<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>
|
|
566
|
-
`,_B=`<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>
|
|
567
|
-
`,MB=`<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>
|
|
568
|
-
`,RB=`<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>
|
|
569
|
-
`,OB=`<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>
|
|
570
|
-
`,zB=`<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>
|
|
571
|
-
`,DB=`<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>
|
|
572
|
-
`,LB=`<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>
|
|
573
|
-
`,BB=`<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>
|
|
574
|
-
`,IB=`<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>
|
|
575
|
-
`,HB=`<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>
|
|
576
|
-
`,PB=`<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>
|
|
577
|
-
`,UB=`<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>
|
|
578
|
-
`,qB=`<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>
|
|
579
|
-
`,FB=`<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>
|
|
580
|
-
`,VB=`<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>
|
|
581
|
-
`,$B=`<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>
|
|
582
|
-
`,GB=`<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>
|
|
583
|
-
`,YB=`<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>
|
|
584
|
-
`,XB=`<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>
|
|
585
|
-
`,KB=Object.assign({"./antgroup.svg":bB,"./anthropic.svg":jB,"./azure.svg":wB,"./baseten.svg":SB,"./bedrock.svg":kB,"./cerebras.svg":CB,"./cloudflare.svg":NB,"./deepseek.svg":EB,"./fireworks.svg":TB,"./githubcopilot.svg":AB,"./google.svg":_B,"./groq.svg":MB,"./huggingface.svg":RB,"./kimi.svg":OB,"./meta.svg":zB,"./minimax.svg":DB,"./mistral.svg":LB,"./moonshot.svg":BB,"./nvidia.svg":IB,"./openai.svg":HB,"./opencode.svg":PB,"./openrouter.svg":UB,"./qwen.svg":qB,"./together.svg":FB,"./vercel.svg":VB,"./vertexai.svg":$B,"./xai.svg":GB,"./xiaomimimo.svg":YB,"./zai.svg":XB}),Ab={"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"},QB=e=>e&&Ab[e]?KB[`./${Ab[e]}.svg`]:void 0;function yg({name:e,provider:i}){var l;const a=QB(i);return a?o.jsx("span",{className:"jv-provider-mark","data-logo":"","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a}}):o.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((l=[...e.trim()][0])==null?void 0:l.toUpperCase())??"?"})}function eS(e){const i=e.authType==="oauth";return e.configured?{ok:!0,label:x(i?"status.signedIn":"status.configured")}:{ok:!1,label:x(i?"status.signedOut":"status.notConfigured")}}const tS=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],nS=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",ZB={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function JB({onBack:e,onSelect:i}){const[a,l]=w.useState([]),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!0),[y,p]=w.useState(0);w.useEffect(()=>{let S=!0;return v(!0),f(""),be.modelProviders().then(k=>{S&&l(k.providers)}).catch(k=>{S&&f(yt(k,"picker.loadFailed"))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[y]);const b=[ZB,...a].filter(S=>`${S.name} ${S.id}`.toLowerCase().includes(c.toLowerCase())),j=S=>nS({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(Oe,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":x("picker.back"),children:o.jsx(Vd,{})}),o.jsxs("div",{children:[o.jsx("h2",{children:x("models.add")}),o.jsx("p",{children:x("picker.intro")})]})]}),o.jsxs("label",{className:"jv-search",children:[o.jsx(Ec,{}),o.jsx("input",{autoFocus:!0,"aria-label":x("picker.search"),placeholder:x("picker.searchPlaceholder"),value:c,onChange:S=>u(S.target.value)})]}),tS.filter(S=>b.some(k=>j(k)===S.id)).map(({id:S,label:k})=>o.jsxs("section",{className:"jv-section","aria-label":x(k),children:[o.jsx("h3",{className:"jv-section-title",children:x(k)}),o.jsx("div",{className:"jv-list",children:b.filter(C=>j(C)===S).map(C=>o.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>i(C),children:[o.jsx(yg,{name:C.id==="custom"?"+":C.name,provider:C.id}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:C.name}),o.jsx("span",{children:C.id==="custom"?x("picker.customHint"):C.authType==="oauth"?x("picker.oauthHint"):x("picker.keyHint",{count:C.modelCount})})]}),o.jsx(Zr,{className:"jv-row-chevron"})]},`${C.id}:${C.authType}`))})]},S)),m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("picker.loading")}),d&&o.jsxs("div",{className:"jv-empty",role:"alert",children:[o.jsx("strong",{children:d}),o.jsx(Oe,{variant:"outline",onClick:()=>p(S=>S+1),children:x("picker.retry")})]}),!m&&!d&&!b.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("picker.noMatch")}),o.jsx("span",{children:x("picker.noMatchHint")})]})]})}const WB=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 eI({className:e,variant:i,...a}){return o.jsx("span",{"data-slot":"badge",className:an(WB({variant:i}),e),...a})}function iS({className:e,...i}){return o.jsx(lE,{"data-slot":"label",className:an("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...i})}function tI({connection:e,providerName:i,authType:a,ensureConnection:l,onChanged:c}){var q,ee;const[u,d]=w.useState({phase:"idle"}),[f,m]=w.useState(""),[v,y]=w.useState(!1),[p,b]=w.useState(""),[j,S]=w.useState(0),k=w.useRef(void 0),C=e==null?void 0:e.id,E=w.useRef(c);E.current=c;const M=w.useRef(u.phase);M.current=u.phase,w.useEffect(()=>{if(!C)return;const Y=C;let H=!0,K;async function R(){var F;try{let ne=await be.authStatus(Y);if(!H)return;if(k.current&&((F=ne.prompt)==null?void 0:F.type)==="select"){const J=k.current;if(k.current=void 0,ne=await be.authInput(Y,ne.prompt.id,J),!H)return}const L=M.current==="running"&&ne.phase!=="running";M.current=ne.phase,d(ne),L&&await E.current(),ne.phase==="running"&&H&&(K=setTimeout(()=>void R(),750))}catch(ne){H&&b(yt(ne,"auth.statusFailed"))}}return R(),()=>{H=!1,clearTimeout(K)}},[C,u.phase,j]),w.useEffect(()=>m(""),[(q=u.prompt)==null?void 0:q.id]);async function T(Y){y(!0),b("");try{const H=await Y();d(H),H.phase!=="running"&&await c()}catch(H){b(yt(H,"common.failed"))}finally{y(!1)}}function _(Y){k.current=Y,T(async()=>{const H=C??await l();return be.authStart(H)})}const D=i==="openai-codex"&&a==="oauth",A=i==="openai"&&a==="oauth",I=u.phase==="running",U=u.prompt,$=u.event,O=($==null?void 0:$.type)==="auth_url"?$.url:($==null?void 0:$.type)==="device_code"?$.verificationUri:null,V=Y=>{U&&C&&T(()=>be.authInput(C,U.id,Y))};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(eI,{variant:"outline","data-state":I?"running":e!=null&&e.configured?"connected":"disconnected",children:x(I?"auth.running":e!=null&&e.configured?a==="oauth"?"status.signedIn":"status.configured":a==="oauth"?"status.signedOut":"status.notConfigured")})]}),I?o.jsxs("div",{className:"jv-auth-flow",children:[O&&o.jsx(Oe,{asChild:!0,variant:"outline",children:o.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:O,target:"_blank",rel:"noopener noreferrer",children:x("auth.openPage")})}),($==null?void 0:$.type)==="device_code"&&o.jsx("p",{children:x("auth.code",{code:$.userCode})}),(U==null?void 0:U.type)==="select"&&o.jsx("div",{className:"flex flex-wrap gap-2",children:(ee=U.options)==null?void 0:ee.map(Y=>o.jsx(Oe,{type:"button",variant:"outline",disabled:v,onClick:()=>V(Y.id),children:D&&Y.id==="browser"?x("auth.browser"):D&&Y.id==="device_code"?x("auth.deviceCode"):Y.label},Y.id))}),U&&U.type!=="select"&&o.jsxs("div",{className:"jv-auth-input",children:[o.jsx(iS,{htmlFor:`oauth-input-${C??i}`,children:U.type==="manual_code"?x(A?"auth.redirectFull":"auth.redirectOrCode"):U.message}),U.type==="manual_code"&&o.jsx("p",{className:"jv-auth-note",children:x("auth.manualNote")}),o.jsx(Yt,{id:`oauth-input-${C??i}`,type:U.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:v,onChange:Y=>m(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),V(f))}}),o.jsx(Oe,{type:"button",variant:"outline",disabled:v||!f.trim(),onClick:()=>V(f),children:x("common.continue")})]}),!U&&o.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:x("auth.waiting")}),($==null?void 0:$.type)==="info"&&o.jsx("p",{className:"text-sm",children:$.message}),o.jsx(Oe,{type:"button",variant:"ghost",disabled:v,onClick:()=>void T(()=>be.authCancel(C)),children:x("auth.cancel")})]}):o.jsxs("div",{className:"flex flex-wrap gap-2",children:[D?o.jsxs(o.Fragment,{children:[o.jsx(Oe,{type:"button",variant:"outline",disabled:v,onClick:()=>_("browser"),children:x("auth.browser")}),o.jsx(Oe,{type:"button",variant:"outline",disabled:v,onClick:()=>_("device_code"),children:x("auth.deviceCode")})]}):o.jsx(Oe,{type:"button",variant:"outline",disabled:v,onClick:()=>_(),children:x(a==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&o.jsx(Oe,{type:"button",variant:"outline",disabled:v,onClick:()=>void T(async()=>(await be.authLogout(C),{phase:"idle"})),children:x(a==="api_key"?"auth.removeCredential":"auth.signOut")})]}),(p||u.phase==="error")&&o.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:p||x("error.loginFailed")}),p&&o.jsx(Oe,{type:"button",variant:"link",disabled:v,onClick:()=>{b(""),S(Y=>Y+1)},children:x("auth.refresh")})]})}async function nI(e,i,a){try{return await be.autoconfigModel({modelId:e.id,api:e.api||i,...a?{choice:a}:{}})}catch(l){return{status:"error",message:yt(l,"auto.failed")}}}function iI(e,i){if(i.status!=="matched")return{...e,auto:i};const{fields:a,...l}=i,c=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...a,name:c?e.model.name:i.source.name||e.model.id},auto:l}}const aS=e=>`${e.provider} / ${e.modelId}`;function _b({items:e,onPick:i}){return o.jsx("div",{className:"jv-auto-sources",children:e.map(a=>o.jsxs("button",{type:"button",onClick:()=>i(a),children:[o.jsx("span",{className:"jv-mono",children:aS(a)}),a.official&&o.jsx("em",{children:x("auto.official")}),o.jsx("small",{children:a.api})]},`${a.provider}/${a.modelId}`))})}function aI({state:e,modelId:i,onRun:a}){const l=u=>a({provider:u.provider,modelId:u.modelId}),c=(e==null?void 0:e.status)==="pending";return o.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[o.jsxs(Oe,{type:"button",variant:"outline",size:"sm",disabled:!i.trim()||c,onClick:()=>a(),children:[o.jsx(s3,{}),x(c?"auto.pending":"auto.run")]}),e&&!c&&o.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:f0("auto.matched",{source:o.jsx("strong",{className:"jv-mono",children:aS(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(_b,{items:e.alternatives,onPick:l})]})]}),e.status==="choose"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:e.reason==="multiple"?x("auto.multiple"):x("auto.similar",{modelId:i})}),o.jsx(_b,{items:e.options,onPick:l})]}),e.status==="none"&&o.jsx("p",{children:x("auto.notFound")}),e.status==="error"&&o.jsx("p",{role:"alert",children:e.message})]})]})}const bp=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],rS=[["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"]],lS=e=>e==="xhigh"||e==="max";function oS(e,i){const a=e[i];return a===null||a===void 0&&lS(i)?"unsupported":a===void 0?"default":"custom"}function rI(e){return e.reasoning?rS.filter(([i])=>oS(e.thinkingLevelMap,i)!=="unsupported").map(([,i])=>x(i)):[x("thinking.level.off")]}function lI({model:e,api:i,onChange:a}){const l=e.thinkingLevelMap,c=(f,m,v)=>{const y={...l};m==="default"?delete y[f]:m==="unsupported"?y[f]=null:y[f]=v??(typeof l[f]=="string"?l[f]:f),a({thinkingLevelMap:y})},u=i==="openai-completions",d=e.thinkingFormat&&!bp.includes(e.thinkingFormat)?[...bp,e.thinkingFormat]:bp;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(Wl,{value:e.thinkingFormat||"default",disabled:!u&&!e.thinkingFormat,onValueChange:f=>a({thinkingFormat:f==="default"?"":f}),children:[o.jsx(to,{"aria-label":x("thinking.format"),children:o.jsx(eo,{})}),o.jsxs(no,{className:"jv-select-menu",children:[o.jsx(Vi,{value:"default",children:x("thinking.protocolDefault")}),d.map(f=>o.jsx(Vi,{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:rS.map(([f,m])=>{const v=oS(l,f);return o.jsxs("div",{className:"jv-thinking-level",children:[o.jsxs("span",{children:[x(m),o.jsx("code",{children:f})]}),o.jsxs(Wl,{value:v,onValueChange:y=>c(f,y),children:[o.jsx(to,{"aria-label":x("thinking.levelName",{level:x(m)}),children:o.jsx(eo,{})}),o.jsxs(no,{className:"jv-select-menu",children:[!lS(f)&&o.jsx(Vi,{value:"default",children:x("thinking.supportedDefault")}),o.jsx(Vi,{value:"unsupported",children:x("thinking.unsupported")}),o.jsx(Vi,{value:"custom",children:x("thinking.supportedCustom")})]})]}),v==="custom"?o.jsx(Yt,{className:"jv-mono",required:!0,"aria-label":x("thinking.levelValue",{level:x(m)}),maxLength:80,value:l[f]??"",onChange:y=>c(f,"custom",y.target.value)}):o.jsx("span",{})]},f)})}),o.jsx("p",{className:"jv-field-hint",children:x("thinking.supported",{levels:rI(e).join(" · ")})})]})}const jp=[{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"}],oI=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function c0({value:e,onChange:i,allowDefault:a=!1}){const l=jp.some(c=>c.id===e)||!e?jp:[...jp,{id:e,label:e}];return o.jsxs(Wl,{value:e||"default",onValueChange:c=>i(c==="default"?"":c),children:[o.jsx(to,{"aria-label":x("editor.protocol"),children:o.jsx(eo,{})}),o.jsxs(no,{className:"jv-select-menu",children:[a&&o.jsx(Vi,{value:"default",children:x("card.defaultProtocol")}),l.map(c=>o.jsx(Vi,{value:c.id,children:c.label},c.id))]})]})}const sI=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),Mb={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function cI({value:e,onChange:i}){const a=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[l,c]=w.useState(()=>a(e)),[u,d]=w.useState(""),f=w.useRef(null);return w.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(l||"{}"))===JSON.stringify(e))return}catch{}c(a(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(a0,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,l.split(`
|
|
586
|
-
`).length)),placeholder:"{}",value:l,onChange:m=>{c(m.target.value);try{const v=JSON.parse(m.target.value||"{}");if(!v||typeof v!="object"||Array.isArray(v))throw new Error;i(v),d(""),m.currentTarget.setCustomValidity("")}catch{d(x("card.jsonObject")),m.currentTarget.setCustomValidity(x("card.jsonObject"))}}}),u&&o.jsx("small",{role:"alert",children:u})]})}function uI({draft:e,protocol:i,onChange:a,onRemove:l,onAutoconfig:c}){const{model:u}=e,[d,f]=w.useState(!u.id),[m,v]=w.useState(!1),[y,p]=w.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),b=k=>a({...e,model:{...u,...k}}),j=(k,C)=>o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:k}),C]}),S=(k,C,E)=>{const M=y.map((_,D)=>D===k?{..._,[C]:E}:_);p(M);const T={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==M[k].name&&(T[y[k].name]=null);for(const _ of M)_.name&&(_.value||!_.saved)&&(T[_.name]=_.value);b({headerUpdates:T})};return o.jsxs("article",{className:`jv-model-card ${e.selected?"is-selected":""}`,children:[o.jsxs("div",{className:"jv-model-summary",children:[o.jsx("input",{type:"checkbox",checked:e.selected,"aria-label":x("card.use",{name:u.id||x("card.newModel")}),onChange:k=>a({...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:sI(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&&Mb[e.auto.status]&&o.jsx("span",{className:"jv-chip jv-chip-warn",children:x(Mb[e.auto.status])})]}),o.jsx(dr,{className:"jv-expand-icon"})]}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-model-remove","aria-label":x("card.remove",{name:u.id||x("card.newModel")}),onClick:l,children:o.jsx(Td,{})})]}),d&&o.jsxs("div",{className:"jv-model-fields",children:[o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.modelId"),o.jsx(Yt,{className:"jv-mono",required:!0,value:u.id,onChange:k=>b({id:k.target.value}),placeholder:"model-id"})),j(x("card.modelName"),o.jsx(Yt,{value:u.name,onChange:k=>b({name:k.target.value}),placeholder:x("card.optional")}))]}),o.jsx(aI,{state:e.auto,modelId:u.id,onRun:c}),o.jsxs("section",{children:[o.jsx("h4",{children:x("card.capabilities")}),o.jsxs("div",{className:"flex flex-wrap gap-5",children:[o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.reasoning,onChange:k=>b({reasoning:k.target.checked})}),x("card.reasoningThinking")]}),o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.input.includes("image"),onChange:k=>b({input:k.target.checked?["text","image"]:["text"]})}),x("card.imageInput")]})]})]}),u.reasoning&&o.jsx(lI,{model:u,api:u.api||i,onChange:b}),o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h4",{children:x("card.specs")}),o.jsx(Oe,{type:"button",variant:"link",size:"sm",onClick:()=>v(!m),children:x(m?"card.hidePrices":"card.editPrices")})]}),o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.context"),o.jsx(Yt,{type:"number",min:1,value:u.contextWindow??"",placeholder:x("card.notProvided"),onChange:k=>b({contextWindow:k.target.value?Number(k.target.value):null})})),j(x("card.maxOutput"),o.jsx(Yt,{type:"number",min:1,value:u.maxTokens??"",placeholder:x("card.notProvided"),onChange:k=>b({maxTokens:k.target.value?Number(k.target.value):null})}))]}),o.jsx("h4",{className:"jv-cost-title",children:x("card.costTitle")}),o.jsx("div",{className:"jv-costs",children:[["input","card.costInput"],["output","card.costOutput"],["cacheRead","card.costCacheRead"],["cacheWrite","card.costCacheWrite"]].map(([k,C])=>{var E,M;return o.jsxs("div",{children:[o.jsx(iS,{children:x(C)}),m?o.jsx(Yt,{type:"number",step:"any",min:0,value:((E=u.cost)==null?void 0:E[k])??"",onChange:T=>b({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(T.target.value)}})}):o.jsx("span",{children:((M=u.cost)==null?void 0:M[k])??x("card.notProvided")})]},k)})})]}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[x("card.advanced"),o.jsx(dr,{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=>b({api:k})})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.headers")}),y.map((k,C)=>o.jsxs("div",{className:"jv-header-row",children:[o.jsx(Yt,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:k.saved,value:k.name,onChange:E=>S(C,"name",E.target.value)}),o.jsx(Yt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?x("card.headerSaved"):"value",value:k.value,onChange:E=>S(C,"value",E.target.value)}),o.jsx(Oe,{type:"button",size:"icon-sm",variant:"ghost","aria-label":x("card.removeHeader"),onClick:()=>{p(y.filter((E,M)=>M!==C)),k.name&&b({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:o.jsx(Td,{})})]},C)),o.jsxs(Oe,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>p([...y,{name:"",value:"",saved:!1}]),children:[o.jsx(ls,{}),x("card.addHeader")]})]}),o.jsx(cI,{value:u.compat,onChange:k=>b({compat:k})})]})]})]})]})}let dI=0;const wp=(e,i,a=!1)=>({key:`draft-${++dI}`,model:e,selected:i,...a?{originalId:e.id}:{}});function fI({connection:e,preset:i,defaultName:a,saved:l=!1,onBack:c,onSaved:u,onConnected:d,onChanged:f}){const m=e?e.kind==="custom":(i==null?void 0:i.id)==="custom",v=(e==null?void 0:e.authType)??i.authType,[y,p]=w.useState(e?m?e.providerName:e.displayName:m?"":a),[b,j]=w.useState((e==null?void 0:e.baseUrl)??""),[S,k]=w.useState((e==null?void 0:e.api)??i.api),[C,E]=w.useState(""),[M,T]=w.useState(()=>((e==null?void 0:e.models)??[]).map(re=>wp(re,!0,!0))),[_,D]=w.useState([]),[A,I]=w.useState(""),[U,$]=w.useState(!1),[O,V]=w.useState(!1),[q,ee]=w.useState(""),[Y,H]=w.useState(l?x("editor.saved"):""),K=w.useRef(e==null?void 0:e.id);function R(re){T(xe=>{const oe=new Set(xe.map(ce=>ce.model.id));return[...xe,...re.filter(ce=>!oe.has(ce.id)).map(ce=>wp(ce,!1))]})}w.useEffect(()=>{if(m)return;let re=!0;return V(!0),(e?be.modelCatalog(e.id):be.providerModels(i.id)).then(oe=>{re&&R(oe.models)}).catch(oe=>{re&&ee(yt(oe,"editor.fetchFailed"))}).finally(()=>{re&&V(!1)}),()=>{re=!1}},[e==null?void 0:e.id,i==null?void 0:i.id,m]);async function F(){V(!0),ee(""),H("");try{const re=await be.discoverModels({connectionId:K.current,baseUrl:b,api:S,...C.trim()?{apiKey:C}:{}});R(re.models),H(re.models.length?x("editor.fetched",{count:re.models.length}):x("editor.noneReturned"))}catch(re){ee(yt(re,"editor.fetchFailed"))}finally{V(!1)}}async function ne(re,xe){const oe=M.filter(me=>re.includes(me.key)&&me.model.id.trim());if(!oe.length)return;ee(""),H(""),T(me=>me.map(Ne=>oe.some(Le=>Le.key===Ne.key)?{...Ne,auto:{status:"pending"}}:Ne));const ce={matched:0,choose:0,none:0,error:0};for(const me of oe){const Ne=await nI(me.model,S,xe);ce[Ne.status]++,T(Le=>Le.map(Ve=>Ve.key===me.key?iI(Ve,Ne):Ve))}oe.length>1&&H(x("editor.autoSummary",{parts:[x("editor.autoMatched",{count:ce.matched}),ce.choose&&x("editor.autoChoose",{count:ce.choose}),ce.none&&x("editor.autoNone",{count:ce.none}),ce.error&&x("editor.autoFailed",{count:ce.error})].filter(Boolean).join(x("common.listSeparator"))}))}async function L(){if(!K.current){const re=await be.createModelConnection({providerName:i.id,displayName:y,kind:"builtin",authType:v,baseUrl:b,api:S});K.current=re.id}return await d(K.current),K.current}async function J(re){re.preventDefault(),$(!0),ee(""),H("");try{let xe;K.current?(xe=await be.updateModelConnection(K.current,{displayName:y,...m?{providerName:y}:{},baseUrl:b,api:S}),m&&C.trim()&&await be.saveModelCredential(xe.id,C)):(xe=await be.createModelConnection({providerName:m?y:i.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:b,api:S,...m&&C.trim()?{apiKey:C}:{}}),K.current=xe.id);for(const oe of M)oe.selected&&await be.saveConnectionModel(xe.id,oe.model,oe.originalId);for(const oe of new Set([..._,...M.filter(ce=>ce.originalId&&!ce.selected).map(ce=>ce.originalId)]))await be.deleteConnectionModel(xe.id,oe);E(""),await u(xe.id),H(x("editor.saved"))}catch(xe){ee(yt(xe,"editor.saveFailed"))}finally{$(!1)}}async function W(){if(!(!e||!confirm(x("editor.confirmDelete",{name:e.displayName})))){$(!0),ee("");try{await be.deleteModelConnection(e.id),await f(),c()}catch(re){ee(yt(re,"editor.deleteFailed"))}finally{$(!1)}}}const P=M.filter(re=>`${re.model.id} ${re.model.name}`.toLowerCase().includes(A.toLowerCase())),G=M.filter(re=>re.selected).length,fe=m?(e==null?void 0:e.displayName)??x("group.custom"):(e==null?void 0:e.displayName)??i.name,ye=e?eS(e):null,je=M.some(re=>{var xe;return((xe=re.auto)==null?void 0:xe.status)==="pending"});return o.jsxs("form",{className:"jv-editor",onChange:()=>H(""),onSubmit:re=>void J(re),children:[o.jsxs("header",{className:"jv-editor-header",children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:U,onClick:c,"aria-label":x("editor.back"),children:o.jsx(Vd,{})}),o.jsx(yg,{name:fe,provider:e?e.kind==="builtin"?e.providerName:void 0:i==null?void 0:i.id}),o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:fe}),o.jsx("span",{children:m?"OpenAI / Anthropic compatible":x(v==="oauth"?"group.subscription":"group.apiKey")})]}),ye&&o.jsx("span",{className:"jv-status","data-ok":ye.ok||void 0,children:ye.label}),e&&o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:U,onClick:()=>void W(),"aria-label":x("editor.delete"),children:o.jsx(Td,{})})]}),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(Yt,{className:"jv-mono",required:!0,maxLength:80,"aria-label":x("editor.providerName"),placeholder:"my-provider",value:y,onChange:re=>p(re.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(Yt,{required:!0,type:"url","aria-label":x("editor.url"),value:b,placeholder:"https://api.example.com/v1",onChange:re=>j(re.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.key")}),o.jsx(Yt,{type:"password",autoComplete:"new-password","aria-label":x("editor.key"),placeholder:x(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:C,onChange:re=>E(re.target.value)})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.name")}),o.jsx(Yt,{required:!0,maxLength:100,"aria-label":x("editor.name"),value:y,onChange:re=>p(re.target.value)})]}),o.jsx(tI,{connection:e,providerName:(e==null?void 0:e.providerName)??i.id,authType:v,ensureConnection:L,onChanged:f}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[o.jsx(dr,{}),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(Yt,{className:"jv-mono",value:b,placeholder:x("editor.defaultUrl"),onChange:re=>j(re.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:G,total:M.length})})]}),o.jsxs("div",{className:"jv-section-actions",children:[m&&o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",disabled:U||O||!b.trim()||!(C.trim()||e!=null&&e.configured),onClick:()=>void F(),children:[o.jsx(m0,{}),x(O?"editor.fetching":"editor.fetch")]}),G>0&&o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",disabled:U||je,onClick:()=>void ne(M.filter(re=>re.selected).map(re=>re.key)),children:[o.jsx(s3,{}),x("editor.autoSelected")]}),o.jsxs(Oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>T([...M,wp(oI(),!0)]),children:[o.jsx(ls,{}),x("editor.addManually")]})]})]}),M.length>6&&o.jsxs("div",{className:"jv-models-filter",children:[o.jsxs("label",{className:"jv-search",children:[o.jsx(Ec,{}),o.jsx("input",{"aria-label":x("editor.filter"),placeholder:x("editor.filterPlaceholder"),value:A,onChange:re=>I(re.target.value)})]}),o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(re=>re.map(xe=>P.includes(xe)?{...xe,selected:!0}:xe)),children:x("editor.selectVisible")})]}),O&&!m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("editor.loadingCatalog")}),o.jsx("div",{className:"jv-model-cards",children:P.map(re=>o.jsx(uI,{draft:re,protocol:S,onAutoconfig:xe=>void ne([re.key],xe),onChange:xe=>T(oe=>oe.map(ce=>ce.key===re.key?xe:ce)),onRemove:()=>{re.originalId&&D(xe=>[...xe,re.originalId]),T(xe=>xe.filter(oe=>oe.key!==re.key))}},re.key))}),!O&&!M.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("editor.empty")}),o.jsx("span",{children:x(m?"editor.emptyCustom":"editor.emptyBuiltin")})]})]})]}),o.jsxs("footer",{className:"jv-editor-footer",children:[o.jsx("div",{"aria-live":"polite",children:q?o.jsx("p",{role:"alert",children:q}):Y?o.jsx("p",{role:"status",children:Y}):o.jsx("p",{children:x("editor.footer")})}),o.jsx(Oe,{type:"submit",className:"jv-primary",disabled:U||O||je,children:x(U?"editor.saving":"editor.save")})]})]})}function hI({connections:e,onChanged:i}){const[a,l]=w.useState("list"),[c,u]=w.useState(),[d,f]=w.useState(),[m,v]=w.useState(0),y=()=>{l("list"),f(void 0),u(void 0),v(0)},p=j=>nS({authType:j.authType,custom:j.kind==="custom"});let b=(c==null?void 0:c.name)??"";if(c){let j=2;for(;e.some(S=>S.displayName===b);)b=`${c.name} ${j++}`}return a==="choose"?o.jsx(JB,{onBack:y,onSelect:j=>{u(j),f(void 0),l("editor")}}):a==="editor"?o.jsx(fI,{connection:e.find(j=>j.id===d),preset:c,defaultName:b,saved:m>0,onBack:y,onChanged:i,onConnected:async j=>{await i(),f(j),u(void 0)},onSaved:async j=>{await i(),f(j),u(void 0),v(S=>S+1)}},m):o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:x("settings.models")}),o.jsx("p",{children:x("models.intro")})]}),o.jsxs(Oe,{className:"jv-primary",onClick:()=>l("choose"),children:[o.jsx(ls,{}),x("models.add")]})]}),!e.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("models.empty")}),o.jsx("span",{children:x("models.emptyHint")})]}),tS.filter(j=>e.some(S=>p(S)===j.id)).map(({id:j,label:S})=>o.jsxs("section",{className:"jv-section","aria-label":x(S),children:[o.jsx("h3",{className:"jv-section-title",children:x(S)}),o.jsx("div",{className:"jv-list",children:e.filter(k=>p(k)===j).map(k=>{const C=eS(k);return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(k.id),u(void 0),l("editor")},children:[o.jsx(yg,{name:k.displayName,provider:k.kind==="builtin"?k.providerName:void 0}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:k.displayName}),o.jsx("span",{children:k.models.length?x("models.count",{count:k.models.length}):x("models.none")})]}),o.jsx("span",{className:"jv-status","data-ok":C.ok||void 0,children:C.label}),o.jsx(Zr,{className:"jv-row-chevron"})]},k.id)})})]},j))]})}function mI(){var b;const[e,i]=w.useState(null),[a,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(!1),[m,v]=w.useState(!1);w.useEffect(()=>{be.connection().then(i).catch(()=>v(!0))},[]);const y=j=>o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{children:o.jsx("h2",{children:x("settings.network")})})}),o.jsxs("section",{className:"jv-section","aria-labelledby":"network-lan",children:[o.jsx("h3",{id:"network-lan",className:"jv-section-title",children:x("connection.lan")}),j]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:x("common.failed")})]});if(!e)return y(null);if(!e.https)return y(o.jsx("div",{className:"jv-list",children:o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-local",children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.localOnly")}),o.jsx("span",{children:f0("connection.localOnlyHint",{flag:o.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const p=async()=>{f(!0),v(!1);try{i(await be.setConnection(!e.allowHttp))}catch{v(!0)}finally{f(!1)}};return y(o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-hint jv-conn-intro",children:x("connection.lanHint")}),o.jsx("div",{className:"jv-list",role:"group","aria-label":x("connection.addresses"),children:e.addresses.map(j=>o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("code",{children:j})}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(a===j?"ui.copied":"connection.copy"),onClick:()=>void cf(j).then(S=>l(S?j:null)),children:a===j?o.jsx(Mi,{}):o.jsx(h0,{})})]},j))}),o.jsxs("div",{className:"jv-list jv-conn-cert",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-root",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.root")}),o.jsx("span",{children:x("connection.rootHint")})]}),o.jsx(Oe,{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:(b=e.fingerprint)==null?void 0:b.replaceAll(":",":")})]}),o.jsxs("button",{type:"button",className:"jv-list-row jv-conn-disclosure","aria-expanded":c,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("connection.howTo")})}),o.jsx(dr,{"aria-hidden":"true"})]}),c&&o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-steps",children:o.jsxs("ul",{children:[o.jsx("li",{children:x("connection.howMac")}),o.jsx("li",{children:x("connection.howWindows")}),o.jsx("li",{children:x("connection.howIos")}),o.jsx("li",{children:x("connection.howAndroid")})]})})]}),o.jsx("div",{className:"jv-list",children:o.jsxs("button",{type:"button",role:"switch","aria-checked":e.allowHttp,disabled:d,className:"jv-list-row jv-choice-row jv-conn-http",onClick:()=>void p(),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.allowHttp")}),o.jsx("span",{children:x("connection.allowHttpHint")})]}),o.jsx("span",{className:"jv-conn-switch","aria-hidden":"true"})]})})]}))}function sS({value:e,visible:i,onChange:a,onVisible:l,placeholder:c,required:u}){return o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"jv-secret-input",children:[o.jsx(Yt,{type:i?"text":"password",autoComplete:"new-password",spellCheck:!1,required:u,className:"jv-mono",placeholder:c,value:e,onChange:d=>a(d.target.value)}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(i?"secrets.hideValue":"secrets.showValue"),onClick:()=>l(!i),children:i?o.jsx(p0,{}):o.jsx(g0,{})})]}),e.length>0&&e.length<8&&o.jsx("span",{className:"jv-field-hint jv-secret-short",children:x("secrets.shortValue")})]})}function pI({secret:e,bots:i,onChanged:a}){const[l,c]=w.useState(!1),[u,d]=w.useState(""),[f,m]=w.useState([]),[v,y]=w.useState(!1),[p,b]=w.useState(null),j=e.grants.map(D=>i.find(A=>A.id===D.botId)).filter(D=>!!D),S=new Set(e.grants.filter(D=>D.scope==="once").map(D=>D.botId)),k=i.filter(D=>!e.grants.some(A=>A.botId===D.id)),C=k.filter(D=>D.name.toLowerCase().includes(u.trim().toLowerCase())),E=()=>{c(!1),d(""),m([])},M=D=>m(A=>A.includes(D)?A.filter(I=>I!==D):[...A,D]),T=async D=>{y(!0),b(null);try{await D()}catch(A){b(yt(A))}finally{y(!1)}},_=()=>T(async()=>{let D=e;for(const A of f)D=await be.grantSecret(e.id,A,!0);a(D),E()});return o.jsxs("section",{className:"jv-secret-grants","aria-label":x("secrets.grants"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsxs("h4",{className:"jv-secret-heading",children:[x("secrets.grants"),j.length>0&&o.jsxs("span",{children:[" · ",j.length]})]}),!l&&o.jsxs(Oe,{type:"button",variant:"outline",size:"sm",disabled:v,onClick:()=>c(!0),children:[o.jsx(ls,{}),x("secrets.addBots")]})]}),j.length>0?o.jsx("ul",{className:"jv-secret-granted",children:j.map(D=>o.jsxs("li",{children:[o.jsx(Jl,{color:D.color,mood:D.mood,size:24,crown:D.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:D.name}),S.has(D.id)&&o.jsx("span",{className:"jv-secret-once",children:x("secrets.onceTag")}),o.jsx(Oe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:v,"aria-label":x("secrets.revoke",{name:D.name}),onClick:()=>void T(async()=>a(await be.grantSecret(e.id,D.id,!1))),children:o.jsx(os,{})})]},D.id))}):!l&&o.jsx("p",{className:"jv-hint",children:x("secrets.noGrants")}),l&&o.jsxs("div",{className:"jv-secret-picker",children:[o.jsx(Yt,{type:"search",autoFocus:!0,value:u,placeholder:x("secrets.searchBots"),"aria-label":x("secrets.searchBots"),onChange:D=>d(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.preventDefault(),C.length===1&&M(C[0].id))}}),o.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":x("secrets.addBots"),children:[C.map(D=>o.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(D.id),className:"jv-secret-option",onClick:()=>M(D.id),children:[o.jsx(Jl,{color:D.color,mood:D.mood,size:24,crown:D.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:D.name}),f.includes(D.id)&&o.jsx(Mi,{"aria-hidden":"true"})]},D.id)),C.length===0&&o.jsx("p",{className:"jv-hint",children:x(i.length?k.length?"secrets.noMatch":"secrets.allGranted":"secrets.noBots")})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",onClick:E,children:x("common.cancel")}),o.jsx(Oe,{type:"button",className:"jv-primary",size:"sm",disabled:v||!f.length,onClick:()=>void _(),children:f.length?x("dialogs.addCount",{count:f.length}):x("common.add")})]})]}),p&&o.jsx("p",{className:"jv-note-error",role:"alert",children:p})]})}const Rb=e=>oa(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function gI({secret:e,bots:i,open:a,onToggle:l,onChanged:c,onDeleted:u}){const[d,f]=w.useState(null),[m,v]=w.useState(e.description),[y,p]=w.useState(""),[b,j]=w.useState(!1),[S,k]=w.useState(null),[C,E]=w.useState(!1),[M,T]=w.useState(null),_=`secret-${e.id}`;w.useEffect(()=>{a&&be.secretUses(e.id).then(O=>f(O.uses)).catch(()=>f([]))},[a,e.id,e.uses]);const D=async(O,V)=>{k(O),T(null);try{await V()}catch(q){T(yt(q))}finally{k(null)}},A=O=>{O.preventDefault(),D("save",async()=>{c(await be.updateSecret(e.id,{description:m.trim(),...y?{value:y}:{}})),p(""),j(!1)})},I=new Set(e.grants.map(O=>O.botId)),U=O=>{var V;return((V=i.find(q=>q.id===O))==null?void 0:V.name)??x("secrets.deletedBot")},$=m.trim()!==e.description||!!y;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":a,"aria-controls":_,onClick:l,children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{className:"jv-mono",children:e.name}),o.jsx("span",{children:e.description||x("secrets.noDescription")})]}),e.readable?o.jsx("span",{className:"jv-row-meta",children:I.size?x("secrets.grantCount",{count:I.size}):x("secrets.notGranted")}):o.jsx("span",{className:"jv-status","data-busy":"",children:x("secrets.unreadable")}),o.jsx(dr,{className:"jv-row-chevron","aria-hidden":"true"})]}),a&&o.jsxs("div",{id:_,className:"jv-list-row jv-static-row jv-secret-details",children:[o.jsxs("p",{className:"jv-secret-meta",children:[x("secrets.fingerprint")," ",o.jsx("code",{children:e.fingerprint})," · ",x("secrets.updated",{time:Rb(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(pI,{secret:e,bots:i,onChanged:c}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:A,"aria-label":x("secrets.edit"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(Yt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:m,onChange:O=>v(O.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.newValue")}),o.jsx(sS,{value:y,visible:b,onChange:p,onVisible:j,placeholder:x("secrets.newValuePlaceholder")})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Oe,{type:"submit",variant:"outline",size:"sm",disabled:!!S||!$,children:x("common.save")})})]}),o.jsx("h4",{className:"jv-secret-heading",children:x("secrets.uses")}),d&&d.length?o.jsx("ul",{className:"jv-secret-uses",children:d.map(O=>o.jsxs("li",{children:[o.jsxs("span",{children:[U(O.botId)," · ",Rb(O.at)," · ",x(O.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),O.detail&&o.jsx("code",{children:O.detail})]},O.id))}):o.jsx("p",{className:"jv-hint",children:x("secrets.noUses")}),C?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":x("secrets.deleteTitle",{name:e.name}),children:[o.jsx("strong",{children:x("secrets.deleteTitle",{name:e.name})}),o.jsx("p",{children:x("secrets.deleteBody")}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>E(!1),children:x("common.cancel")}),o.jsx(Oe,{type:"button",className:"jv-primary",size:"sm",disabled:!!S,onClick:()=>void D("delete",async()=>{await be.deleteSecret(e.id),u()}),children:x("secrets.deleteConfirm")})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Oe,{type:"button",variant:"ghost",size:"sm",disabled:!!S,onClick:()=>E(!0),children:x("secrets.delete")})}),M&&o.jsx("p",{className:"jv-note-error",role:"alert",children:M})]})]})}const Ob=(e,i)=>e.name.localeCompare(i.name);function vI(){const[e,i]=w.useState(null),[a,l]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState(!1),[m,v]=w.useState(null),[y,p]=w.useState(null);w.useEffect(()=>{be.secrets().then(j=>{i([...j.secrets].sort(Ob)),l(j.keyLocation)}).catch(j=>p(yt(j))),be.bots().then(j=>u(j.bots)).catch(()=>u([]))},[]);const b=j=>i(S=>S&&S.map(k=>k.id===j.id?j:k));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:x("settings.secrets")}),o.jsx("p",{children:x("secrets.intro")})]}),!d&&o.jsxs(Oe,{className:"jv-primary",onClick:()=>f(!0),children:[o.jsx(ls,{}),x("secrets.add")]})]}),d&&o.jsx(yI,{onCancel:()=>f(!1),onSaved:j=>{f(!1),i(S=>[...S??[],j].sort(Ob)),v(j.id)}}),e&&!e.length&&!d&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("secrets.empty")}),o.jsx("span",{children:x("secrets.emptyHint")})]}),e&&e.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.secrets"),children:o.jsx("div",{className:"jv-list",children:e.map(j=>o.jsx(gI,{secret:j,bots:c,open:m===j.id,onToggle:()=>v(m===j.id?null:j.id),onChanged:b,onDeleted:()=>{v(null),i(S=>S&&S.filter(k=>k.id!==j.id))}},j.id))})}),a&&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:a}),o.jsx("span",{children:x("secrets.keyHint")})]})})})]}),y&&o.jsx("p",{className:"jv-note-error",role:"alert",children:y})]})}function yI({onCancel:e,onSaved:i}){const[a,l]=w.useState(""),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!1),[y,p]=w.useState(!1),[b,j]=w.useState(null),S=async k=>{k.preventDefault(),p(!0),j(null);try{i(await be.createSecret({name:a.trim(),description:c.trim(),value:d}))}catch(C){j(yt(C))}finally{p(!1)}};return o.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:k=>void S(k),"aria-label":x("secrets.add"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.name")}),o.jsx(Yt,{className:"jv-mono",required:!0,autoFocus:!0,maxLength:64,placeholder:"GITHUB_TOKEN",value:a,onChange:k=>l(k.target.value.toUpperCase())}),o.jsx("span",{className:"jv-field-hint",children:x("secrets.nameHint")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(Yt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:c,onChange:k=>u(k.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.value")}),o.jsx(sS,{value:d,visible:m,onChange:f,onVisible:v,required:!0})]}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Oe,{type:"button",variant:"ghost",onClick:e,children:x("common.cancel")}),o.jsx(Oe,{type:"submit",className:"jv-primary",disabled:y||!a.trim()||!d,children:x("common.save")})]})]})}const xI=[{id:"general",label:"settings.general",icon:v7},{id:"models",label:"settings.models",icon:P8},{id:"secrets",label:"settings.secrets",icon:E4},{id:"network",label:"settings.network",icon:K8},{id:"about",label:"settings.about",icon:v0}];function bI({connections:e,onChanged:i,onClose:a,initialTab:l="general"}){const[c,u]=w.useState(l);return o.jsx(h5,{open:!0,onOpenChange:d=>{d||a()},children:o.jsxs(m5,{className:"jv-settings-shell","aria-describedby":void 0,children:[o.jsxs("nav",{className:"jv-settings-nav","aria-label":x("settings.sections"),children:[o.jsx(uf,{className:"jv-settings-title",children:x("settings.title")}),xI.map(d=>o.jsxs("button",{type:"button",className:"jv-nav-item","aria-current":c===d.id?"page":void 0,onClick:()=>u(d.id),children:[o.jsx(d.icon,{}),x(d.label)]},d.id))]}),o.jsx("main",{className:"jv-settings-content",children:c==="general"?o.jsx(xB,{}):c==="models"?o.jsx(hI,{connections:e,onChanged:i}):c==="secrets"?o.jsx(vI,{}):c==="network"?o.jsx(mI,{}):o.jsx(yB,{})})]})})}const zb="Jarvy";let Db=null,Da=null,Pl=null;function jI(){return document.querySelector('link[rel="icon"][type="image/png"]')}function wI(e){if(!(Da!=null&&Da.complete)||!Da.naturalWidth)return null;const i=64,a=document.createElement("canvas");a.width=a.height=i;const l=a.getContext("2d");if(!l)return null;l.drawImage(Da,0,0,i,i);const c=e>9?"9+":String(e),u=c.length>1?21:18;return l.fillStyle="#e5484d",l.beginPath(),l.arc(i-u,u,u,0,Math.PI*2),l.fill(),l.fillStyle="#fff",l.font=`bold ${c.length>1?26:30}px system-ui, sans-serif`,l.textAlign="center",l.textBaseline="middle",l.fillText(c,i-u,u+2),a.toDataURL("image/png")}function Lb(e){document.title=e>0?`(${e>99?"99+":e}) ${zb}`:zb;const i=jI();if(!i)return;if(Db??(Db=i.href),Pl??(Pl=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){i.href=Db,Pl&&!Pl.isConnected&&document.head.prepend(Pl);return}const a=wI(e);a&&(i.href=a,Pl==null||Pl.remove())}function SI(e){w.useEffect(()=>{Da||(Da=new Image,Da.src="/favicon.svg"),Da.complete?Lb(e):Da.onload=()=>Lb(e)},[e])}const xd=50;function kI({chatId:e,ready:i,scroller:a,me:l,onError:c}){const[u,d]=w.useState([]),[f,m]=w.useState(!1),[v,y]=w.useState(!1),[p,b]=w.useState(!1),j=w.useRef(u),S=w.useRef(e),k=w.useRef(0),C=w.useRef(!1),E=w.useRef(!1);j.current=u,S.current=e,E.current=v;const M=w.useRef(null),T=w.useRef(!1),_=w.useRef(void 0),D=w.useRef(!0),A=w.useRef(!1),I=w.useRef(null),[U,$]=w.useState(!1),O=w.useRef(0);w.useEffect(()=>{if(d([]),y(!1),A.current=!1,D.current=!0,!i||!e)return;let R=!0;const F=++k.current;return m(!0),$(!1),O.current=0,be.latestMessages(e,xd).then(ne=>{!R||F!==k.current||(T.current=!0,d(ne.messages),y(ne.hasOlder),m(!1))}).catch(ne=>{R&&(m(!1),c(ne))}),()=>{R=!1}},[e,i]);async function V(R){const F=j.current[0],ne=++k.current;if(!F||F.chatId!==R){const W=await be.latestMessages(R,xd);S.current===R&&ne===k.current&&(d(W.messages),y(W.hasOlder),m(!1));return}const L=F.sequence-1,J=await be.messages(R,L);S.current!==R||ne!==k.current||(d(W=>[...W.filter(P=>P.chatId===R&&P.sequence<=L),...J.messages]),m(!1))}async function q(){const R=j.current[0],F=a.current;if(!(!R||!E.current||C.current)){C.current=!0,b(!0);try{const ne=await be.olderMessages(R.chatId,R.sequence,xd);if(S.current!==R.chatId)return;M.current=F?F.scrollHeight-F.scrollTop:null,d(L=>{var J;return((J=L[0])==null?void 0:J.id)===R.id?[...ne.messages,...L]:L}),y(ne.hasOlder)}catch(ne){c(ne)}finally{C.current=!1,b(!1)}}}w.useEffect(()=>{const R=a.current;if(!R)return;const F=new ResizeObserver(()=>{!A.current||!D.current||R.scrollHeight-R.scrollTop-R.clientHeight<8||R.scrollTo({top:R.scrollHeight,behavior:"instant"})}),ne=()=>{F.disconnect(),F.observe(R);for(const W of R.children)F.observe(W)};ne();const L=new MutationObserver(ne);L.observe(R,{childList:!0});const J=()=>{var W;if(!A.current){D.current=!0,$(!1);return}D.current=R.scrollHeight-R.scrollTop-R.clientHeight<160,$(!D.current),D.current&&(O.current=((W=j.current.at(-1))==null?void 0:W.sequence)??0)};return J(),R.addEventListener("scroll",J,{passive:!0}),()=>{F.disconnect(),L.disconnect(),R.removeEventListener("scroll",J)}},[a.current,e]),w.useLayoutEffect(()=>{const R=a.current,F=u.at(-1);if(R){if(M.current!==null)R.scrollTo({top:R.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if(T.current&&u.length){const ne=()=>R.scrollTo({top:R.scrollHeight,behavior:"instant"});ne(),requestAnimationFrame(ne),T.current=!1,A.current=!0,D.current=!0}else F&&F.id!==_.current&&(D.current||F.senderId===l)&&R.scrollTo({top:R.scrollHeight,behavior:"smooth"});_.current=F==null?void 0:F.id,D.current&&(O.current=(F==null?void 0:F.sequence)??0)}},[u]),w.useEffect(()=>{const R=a.current,F=I.current;if(!R||!F||!v||!A.current)return;const ne=new IntersectionObserver(L=>{var J;(J=L[0])!=null&&J.isIntersecting&&A.current&&q()},{root:R,rootMargin:"400px 0px 0px 0px"});return ne.observe(F),()=>ne.disconnect()},[v,u,e,f]);async function ee(R,F){if(j.current.some(P=>P.id===R)){Y(R,F);return}const L=S.current,J=await be.message(R);if(J.chatId!==L)return J.chatId;const W=await be.olderMessages(J.chatId,J.sequence+1,xd);S.current===J.chatId&&(T.current=!0,d([...W.messages,J]),y(W.hasOlder),requestAnimationFrame(()=>Y(R,F)))}function Y(R,F){var L;const ne=(L=a.current)==null?void 0:L.querySelector(`[data-message="${R}"]`);ne&&_5(ne,F)}const H=U?u.filter(R=>R.sequence>O.current&&R.senderId!==l).length:0;return{messages:u,setMessages:d,loading:f,hasOlder:v,loadingOlder:p,refresh:V,top:I,away:U,unseen:H,toLatest:()=>{const R=a.current;R==null||R.scrollTo({top:R.scrollHeight,behavior:"smooth"})},toMessage:ee,cancel:()=>{k.current++}}}function CI({ready:e,selected:i,messages:a,chats:l,chatList:c,setChats:u,onError:d}){const f=l.find(m=>m.id===i);w.useEffect(()=>{const m=i,v=a.at(-1);if(!e||!m||!v||v.chatId!==m)return;const y=()=>{const p=c.current.find(b=>b.id===m);document.visibilityState!=="visible"||((p==null?void 0:p.readSequence)??0)>=v.sequence&&!(p!=null&&p.hint)&&!(p!=null&&p.alerts)||(u(b=>b.map(j=>j.id===m?{...j,readSequence:Math.max(j.readSequence,v.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:j)),be.markRead(m,v.sequence).catch(d))};return y(),document.addEventListener("visibilitychange",y),()=>document.removeEventListener("visibilitychange",y)},[a,i,e,f==null?void 0:f.readSequence,f==null?void 0:f.alerts,f==null?void 0:f.hint])}function NI({onLogin:e}){const[i,a]=w.useState(""),[l,c]=w.useState(""),[u,d]=w.useState(!1),[f,m]=w.useState(!1),[v,y]=w.useState(null),[p,b]=w.useState(document.documentElement.classList.contains("dark"));async function j(S){if(S.preventDefault(),!f){m(!0),y(null);try{const k=await be.login(i.trim(),l);c(""),e(k.username)}catch(k){y(k instanceof ns&&k.status===401?"login.wrong":k instanceof ns&&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:Hb.map(S=>o.jsx("button",{type:"button",lang:S,"aria-pressed":Fd()===S,title:kp(S,"name"),onClick:()=>qb(S),children:kp(S,"short")},S))}),o.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Hd(p?"light":"dark"),b(!p)},"aria-label":x(p?"login.themeLight":"login.themeDark"),children:o.jsx(De,{name:p?"sun":"moon"})})]}),o.jsx("main",{className:"jv-login-stage",children:o.jsxs("div",{className:"jv-login-wrap",children:[o.jsxs("header",{className:"jv-login-brand",children:[o.jsx("img",{className:"jv-login-logo",src:"/icon.svg",alt:"",width:64,height:64}),o.jsx("h1",{children:"Jarvy"}),o.jsx("p",{children:x("login.subtitle")})]}),o.jsxs("form",{className:"jv-login-form",onSubmit:S=>void j(S),"aria-label":x("login.form"),"aria-busy":f,children:[o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-username",children:x("login.username")}),o.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:i,onChange:S=>a(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:l,onChange:S=>c(S.target.value)}),o.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":x(u?"login.hidePassword":"login.showPassword"),onClick:()=>d(!u),children:o.jsx(De,{name:u?"eye-slash":"eye"})})]})]}),v&&o.jsx("p",{className:"jv-login-error",role:"alert",children:x(v)}),o.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:x(f?"login.submitting":"login.submit")})]})]})})]})}function EI({selected:e,chats:i,transcript:a,openChat:l,setPane:c,paneRef:u,blocked:d}){const[f,m]=w.useState(null),[v,y]=w.useState(0);w.useEffect(()=>{var j;!f||e!==f.chatId||a.loading||((j=a.messages[0])==null?void 0:j.chatId)!==f.chatId||(a.toMessage(f.id,f.passage),m(null))},[f,e,a.loading,a.messages]);function p(j,S,k){var E;if(j.type==="thread"){const M=i.find(T=>T.id===j.parentId);M&&l(M),c({kind:"thread",id:j.id,parentId:j.parentId,mode:"pane",focus:{id:S,passage:k}});return}((E=u.current)==null?void 0:E.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&c(null);const C=j.id===e;l(j),C?a.toMessage(S,k):m({chatId:j.id,id:S,passage:k})}function b(j){c({kind:"search",chat:j}),y(S=>S+1)}return w.useEffect(()=>{const j=S=>{var C,E;if(d||S.defaultPrevented||!(S.ctrlKey||S.metaKey)||S.key.toLowerCase()!=="f")return;const k=i.find(M=>M.id===e);k&&(((C=u.current)==null?void 0:C.kind)==="search"&&((E=document.activeElement)!=null&&E.closest(".jv-search-pane"))||(S.preventDefault(),b(k)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[d,i,e]),{openMessage:p,search:b,focusKey:v}}const TI=null;function Bb(){var ya,Ga,Ya,ti,xa,ue;const[e,i]=w.useState("loading"),[a,l]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState({}),m=w.useRef(new Map),[v,y]=w.useState([]),[p,b]=w.useState([]),[j,S]=w.useState([]),[k,C]=w.useState(null),[E,M]=w.useState({}),[T,_]=w.useState(null),[D,A]=w.useState(null),[I,U]=w.useState(null),[$,O]=w.useState([]),[V,q]=w.useState(null),[ee,Y]=w.useState(!1),[H,K]=w.useState(!1),[R,F]=w.useState(!1),[ne,L]=w.useState(""),[J,W]=w.useState(!1),[P,G]=w.useState(null),[fe,ye]=w.useState(!1),[je,re]=w.useState(420),[xe,oe]=w.useState(0),[ce,me]=w.useState([]),[Ne,Le]=w.useState(""),Ve=w.useRef(null),mt=w.useRef(null),ot=w.useRef(null),[Je,_t]=w.useState(null),[vn,yn]=w.useState(null),[Pn,di]=w.useState(null),rn=w.useRef(T);rn.current=T;const Yi=w.useRef(0),pe=w.useRef(v);pe.current=v;const ke=w.useRef(P);ke.current=P;const He=w.useMemo(()=>new mL(pL(a)),[a]);w.useEffect(()=>{const B=()=>He.save();return window.addEventListener("pagehide",B),()=>window.removeEventListener("pagehide",B)},[He]);const qe=((ya=j.find(B=>B.kind==="user"&&B.name===a))==null?void 0:ya.id)??"",We=kI({chatId:T,ready:e==="ready",scroller:Ve,me:qe,onError:Xe}),{messages:Pt,setMessages:xn}=We,Ut=EI({selected:T,chats:v,transcript:We,openChat:fi,setPane:G,paneRef:ke,blocked:!!I||!!V}),Rn=((Ga=v.find(B=>B.id===T))==null?void 0:Ga.botId)??D??((Ya=c[0])==null?void 0:Ya.id);async function Un(B){const Q=(m.current.get(B)??0)+1;m.current.set(B,Q);const he=await be.botStatus(B);m.current.get(B)===Q&&f(Ee=>({...Ee,[B]:he}))}w.useEffect(()=>{e==="ready"&&Rn&&Un(Rn).catch(Xe)},[e,Rn]);const Ot=((ti=v.find(B=>B.id===T&&B.type==="channel"))==null?void 0:ti.memberIds.filter(B=>c.some(Q=>Q.id===B)).join(","))??"";w.useEffect(()=>{if(e==="ready"&&Ot)for(const B of Ot.split(","))Un(B).catch(Xe)},[e,Ot]);async function On(B){var Me,$e;const[Q,he,Ee,Se,_e,Be]=await Promise.all([be.bots(),be.chats(),be.modelConnections(),be.sections(),be.members(),be.followedThreads()]);l(B),u(Q.bots),y(he.chats),O(Ee.connections),b(Se.sections),S(_e.members),me(Be.threads);const Ke=he.chats.find(st=>st.type!=="thread");_((Ke==null?void 0:Ke.id)??null),Ke&&M({[Ke.id]:Ke.readSequence}),A(((Me=he.chats[0])==null?void 0:Me.botId)??(($e=Q.bots[0])==null?void 0:$e.id)??null),i("ready")}w.useEffect(()=>{Hd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),be.me().then(B=>On(B.username)).catch(()=>i("login"))},[]),w.useEffect(()=>{if(e!=="ready")return;let B=!0;const Q=new EventSource("/api/events"),he=async Se=>{be.followedThreads().then(Be=>{B&&me(Be.threads)}).catch(()=>{}),oe(Be=>Be+1),await Xt();const _e=rn.current;B&&_e&&(!Se||Se===_e)&&await ol(_e)},Ee=()=>void be.sections().then(Se=>{B&&b(Se.sections)}).catch(Se=>{B&&Xe(Se)});return Q.addEventListener("ready",()=>{var _e;he().catch(Be=>{B&&Xe(Be)}),Ee();const Se=(_e=pe.current.find(Be=>Be.id===rn.current))==null?void 0:_e.botId;Se&&Un(Se).catch(Be=>{B&&Xe(Be)}),be.bots().then(Be=>{B&&u(Be.bots)}).catch(Be=>{B&&Xe(Be)})}),Q.addEventListener("sections",Ee),Q.addEventListener("bots",()=>{be.bots().then(Se=>{B&&u(Se.bots)}).catch(Se=>{B&&Xe(Se)}),he().catch(Se=>{B&&Xe(Se)})}),Q.addEventListener("inbox",()=>void he().catch(Se=>{B&&Xe(Se)})),Q.addEventListener("chat",Se=>{const _e=JSON.parse(Se.data);typeof _e.chatId=="string"&&he(_e.chatId).catch(Be=>{B&&Xe(Be)})}),Q.addEventListener("bot",Se=>{var Ke;const _e=JSON.parse(Se.data),Be=_e.status;m.current.set(_e.botId,(m.current.get(_e.botId)??0)+1),f(Me=>({...Me,[_e.botId]:Be})),Be.error&&((Ke=pe.current.find(Me=>Me.id===rn.current))==null?void 0:Ke.botId)===Be.botId&&Le(dD(Be)),(Be.status==="idle"||Be.status==="stop")&&be.bots().then(Me=>{B&&u(Me.bots)}).catch(Me=>{B&&Xe(Me)})}),Q.onerror=()=>{be.me().catch(Se=>{B&&Se instanceof ns&&Se.status===401&&i("login")})},()=>{B=!1,Q.close(),We.cancel(),Yi.current++}},[e]),CI({ready:e==="ready",selected:T,messages:Pt,chats:v,chatList:pe,setChats:y,onError:Xe}),SI(e==="ready"?v.reduce((B,Q)=>B+Q.alerts,0):0),w.useEffect(()=>{if(!Ne)return;const B=setTimeout(()=>Le(""),4800);return()=>clearTimeout(B)},[Ne]),w.useEffect(()=>{const B=Q=>{Q.defaultPrevented||I||V||(Q.key==="Escape"&&(Y(!1),K(!1),F(!1)),(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="k"&&(Q.preventDefault(),F(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-search"))==null?void 0:he.focus()})))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[I,V]),w.useEffect(()=>{const B=window.matchMedia("(max-width: 620px)"),Q=()=>{B.matches||F(!1)};return B.addEventListener("change",Q),()=>B.removeEventListener("change",Q)},[]);function Xe(B){if(B instanceof ns&&B.status===401){i("login");return}Le(yt(B,"common.failed"))}async function Xt(){const B=++Yi.current,Q=await be.chats();return B===Yi.current&&y(Q.chats),Q.chats}async function ol(B){await We.refresh(B)}async function ua(){const[B,Q]=await Promise.all([be.modelConnections(),be.bots()]);O(B.connections),u(Q.bots)}const da=()=>void be.members().then(B=>S(B.members)).catch(Xe);function bn(B){u(Q=>Q.map(he=>he.id===B.id?B:he)),da()}function fi(B){var he;const Q=uL(B);Q?G({kind:"thread",id:Q,parentId:B.id,mode:"pane",summary:((he=B.hint)==null?void 0:he.kind)==="note"}):B.id!==rn.current&&G(null),ye(!1),M(Ee=>({...Ee,[B.id]:B.readSequence})),_(B.id),B.botId&&A(B.botId),F(!1),Y(!1),K(!1)}const sl=B=>G((P==null?void 0:P.kind)==="info"&&P.page===B?null:{kind:"info",page:B});function hi(B){y(Q=>Q.some(he=>he.id===B.id)?Q.map(he=>he.id===B.id?B:he):[B,...Q])}async function lo(B){if(!J){W(!0);try{const Q=await be.createChat(B);hi(Q),fi(Q),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-composer"))==null?void 0:he.focus()})}catch(Q){Xe(Q)}finally{W(!1)}}}async function Xi(){if(!J){W(!0);try{const B=await be.createBot(PD(la(j).map(he=>he.name))),Q=await be.createChat(B.id);u(he=>[...he,B]),hi(Q),da(),fi(Q)}catch(B){Xe(B)}finally{W(!1)}}}async function cn(B){try{await be.deleteChat(B.id),await Xt(),rn.current===B.id&&_(null),Le(x("app.channelDeleted"))}catch(Q){Xe(Q)}}async function Lt(B,Q){try{hi(await be.pin(B.id,Q))}catch(he){Xe(he)}}async function Vt(B,Q){try{hi(await be.mute(B.id,Q))}catch(he){Xe(he)}}async function fa(B,Q){try{await be.deleteBot(B.id,Q);const he=new Set(v.filter(Ee=>Ee.type==="dm"&&Ee.botId===B.id).map(Ee=>Ee.id));y(Ee=>Ee.filter(Se=>!he.has(Se.id)).map(Se=>Se.memberIds.includes(B.id)?{...Se,memberIds:Se.memberIds.filter(_e=>_e!==B.id)}:Se)),u(Ee=>Ee.filter(Se=>Se.id!==B.id)),da(),rn.current&&he.has(rn.current)&&_(null),I===B.id&&U(null),Le(x("app.botDeleted",{name:B.name}))}catch(he){Xe(he)}}async function ha(B,Q,he,Ee,Se){const _e=T;await be.send(_e,B,Q,he,!1,Ee,Se);const Be=pe.current.find(Me=>Me.id===_e),Ke=(Be==null?void 0:Be.type)==="channel"?[...new Set(gg(B,la(j)).filter(Me=>!Be.memberIds.includes(Me.member.id)).map(Me=>Me.member.name))]:[];Ke.length&&Le(x("app.notInChannel",{names:Ke.join(x("common.listSeparator")),count:Ke.length})),await Promise.all([ol(_e),Xt()])}function Ki(B,Q){be.addMember(B,Q.id).then(he=>{hi(he),Le(x("app.memberAdded",{name:Q.name,channel:he.title}))}).catch(Xe)}async function Qi(B){try{const Q=await be.openThread(B.id);G({kind:"thread",id:Q.id,parentId:B.chatId,mode:"pane"})}catch(Q){Xe(Q)}}function Ri(B,Q){const he=v.find(Ee=>Ee.id===B.parentId);he&&fi(he),G(Q?{kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"}:null)}function Qn(B){U(null);const Q=v.find(he=>he.id===(B.type==="thread"?B.parentId:B.id));Q&&fi(Q),B.type==="thread"&&G({kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"})}async function Zi(B,Q,he){try{const Ee=await be.react(B.id,Q,he);xn(Se=>Se.map(_e=>_e.id===Ee.id?{..._e,reactions:Ee.reactions}:_e))}catch(Ee){Xe(Ee)}}function mi(B){V5(He,B,j)}const pi=(B,Q)=>B?void We.toMessage(B,Q).then(async he=>{he&&Ut.openMessage(await be.chat(he),B,Q)}).catch(()=>Le(x("app.sourceGone"))):Le(x("app.sourceGone"));function ma(B){me(Q=>Q.map(he=>he.id===B.id?{...he,...B}:he)),be.followedThreads().then(Q=>me(Q.threads)).catch(()=>{})}function cl(B){B.preventDefault();const Q=Ee=>re(Math.min(Math.max(340,window.innerWidth-Ee.clientX),Math.round(window.innerWidth*.6))),he=()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",he),document.body.style.cursor=""};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",he),document.body.style.cursor="col-resize"}async function gi(){try{await He.clear(B=>be.removeAttachment(B)),await be.logout(),i("login"),Y(!1),q(null),m.current.clear(),f({}),G(null),me([]),l(""),_(null),y([]),u([]),O([]),xn([])}catch(B){Xe(B)}}const xr=e==="ready"&&v.some(B=>B.id===T);w.useEffect(()=>{const B=Ve.current;if(!B)return;let Q=0,he=B.clientHeight;const Ee=()=>{Q=B.scrollHeight-B.scrollTop-B.clientHeight},Se=new ResizeObserver(()=>{B.clientHeight!==he&&(he=B.clientHeight,B.scrollTo({top:B.scrollHeight-B.clientHeight-Q,behavior:"instant"}))}),_e=new MutationObserver(Ee);return Ee(),B.addEventListener("scroll",Ee,{passive:!0}),Se.observe(B),_e.observe(B,{childList:!0,subtree:!0,characterData:!0}),()=>{Se.disconnect(),_e.disconnect(),B.removeEventListener("scroll",Ee)}},[xr]);const Zn=v.find(B=>B.id===T),pa=(Zn==null?void 0:Zn.type)==="channel",Jn=aB(e==="ready"?(xa=v.find(B=>B.id===T&&B.type==="dm"))==null?void 0:xa.botId:void 0,xe);if(e==="loading")return o.jsx("div",{className:"jarvy-loading",children:x("app.connecting")});if(e==="login")return o.jsx(NI,{onLogin:B=>void On(B).catch(Xe)});const ln=v.find(B=>B.id===T),un=c.find(B=>B.id===((ln==null?void 0:ln.botId)??D))??c[0],ga=!!(un!=null&&un.connectionId),Wn=pa||ga,ei=(un==null?void 0:un.name)??"Jarvy",zn=un?d[un.id]:void 0,Bt=zn!=null&&zn.error?x("activity.error"):(zn==null?void 0:zn.status)==="running"?N5(zn.activity):"",Mt=(ue=[...Pt].reverse().find(B=>{var Q;return((Q=B.question)==null?void 0:Q.state)==="pending"}))==null?void 0:ue.id,$t=(P==null?void 0:P.kind)==="thread"?P:null,jn=($t==null?void 0:$t.mode)==="full",ul=pa?Zn:void 0,br=c.find(B=>B.id===I),jr=new Set(Object.values(d).filter(B=>B.status==="running"&&B.activity!=="asking").map(B=>B.botId)),va=new Set(Object.values(d).filter(B=>B.activity==="asking").map(B=>B.botId));return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ui-app","data-nav":R?"":void 0,"data-pane":P&&!jn?"":void 0,style:{"--ui-pane":`${je}px`},children:[o.jsx(fL,{username:a,chats:v,sections:p,bots:c,members:j,followed:ce,followedOpen:fe&&!jn,working:jr,asking:va,selected:fe?null:T,filter:ne,creating:J,createMenu:H,accountMenu:ee,onFilterChange:L,onOpenFollowed:()=>{ye(!0),G(null),F(!1)},onOpenChat:fi,onOpenBot:B=>void lo(B.id),onOpenMenu:(B,Q)=>yn({target:B,at:Q}),onEditSection:B=>C({kind:"section",section:B}),onCreate:B=>{if(B==="bot")return void Xi();C({kind:B}),K(!1)},onFind:Ut.openMessage,onOpenFound:Qn,onError:Xe,onToggleCreate:B=>{K(B),Y(!1)},onToggleAccount:B=>{Y(B),K(!1)},onSettings:()=>{Y(!1),q("general")},onToggleTheme:()=>{Hd(document.documentElement.classList.contains("dark")?"light":"dark"),Y(!1)},onLogOut:()=>void gi()}),o.jsx(nB,{chat:ln,inChannel:pa,bots:c,members:j,meId:qe,drafts:He,composeReady:Wn,botName:ei,activeBot:un,status:zn,connections:$,activity:Bt,history:We,divider:E[(ln==null?void 0:ln.id)??""]??(ln==null?void 0:ln.readSequence)??0,activeQuestion:Mt,pane:P,onPane:G,onToggleInfo:sl,find:Ut,onNav:()=>F(!0),onBot:B=>U(B),hasBotDirects:Jn.length>0,onInvite:Ki,onQuote:mi,onReply:B=>void Qi(B),onReact:(B,Q,he)=>void Zi(B,Q,he),onJump:pi,onSettled:B=>xn(Q=>Q.map(he=>he.id===B.id?B:he)),onPreview:(B,Q)=>_t({files:B,index:Q}),onSend:ha,notice:Le,onSaveNote:async B=>{try{hi(await be.setNote(ln.id,B))}catch(Q){throw Xe(Q),Q}},createBot:()=>void Xi(),creating:J,updateBot:bn,onManageModels:()=>q("models"),error:Xe,chatArea:mt,transcript:Ve,composeWrap:ot,hidden:jn||fe,onOpenThread:B=>G({kind:"thread",id:B,parentId:ln.id,mode:"pane"})}),o.jsx(mB,{pane:P,followedView:fe,followed:ce,chats:v,sections:p,members:j,bots:c,statuses:d,meId:qe,drafts:He,tick:xe,paneChannel:ul,activeBot:un,botDirects:Jn,find:Ut,onPane:G,onNav:()=>F(!0),onBackToChannel:Ri,onAddMembers:B=>C({kind:"members",chat:B}),onOpenBot:U,onPin:B=>void Lt(B,!B.pinned),onMute:B=>void Vt(B,!B.muted),onDeleteChannel:B=>di({kind:"chat",chat:B}),onChannelSaved:hi,onThreadChanged:ma,onInvite:Ki,onPreview:(B,Q)=>_t({files:B,index:Q}),onNotice:Le,onError:Xe,paneWidth:je,onResize:cl})]}),R&&o.jsx("div",{className:"ui-nav-scrim",onClick:()=>F(!1),role:"presentation"}),V&&o.jsx(bI,{connections:$,initialTab:V,onChanged:ua,onClose:()=>q(null)}),o.jsx(eL,{dialog:k,entryMenu:vn,confirm:Pn,preview:Je,infoBot:br,bots:c,statuses:d,chats:v,sections:p,members:j,connections:$,meId:qe,onDialog:C,onEntryMenu:yn,onConfirm:di,onPreview:_t,onInfoBot:U,onSettings:()=>q("models"),onChannelInfo:B=>{fi(B),G({kind:"info",page:"main"})},onOpenChatId:B=>{_(B),F(!1)},chatSaved:hi,openChat:fi,onSectionSaved:B=>{b(Q=>Q.some(he=>he.id===B.id)?Q.map(he=>he.id===B.id?B:he):[...Q,B]),C(null)},onSectionDeleted:B=>{C(null),b(Q=>Q.filter(he=>he.id!==B)),Xt().catch(Xe)},updateBot:bn,openAnywhere:Qn,removeChannel:cn,deleteBot:fa,pinChat:Lt,muteChat:Vt}),Ne&&o.jsx("div",{className:"ui-toast",role:"status",children:Ne}),TI]})}function AI(){const e=`https://${location.host}${location.pathname}${location.search}`;return o.jsxs("div",{className:"jv-insecure",role:"status",children:[o.jsx(p7,{"aria-hidden":"true"}),o.jsx("span",{children:x("connection.insecure")}),o.jsx("a",{href:e,children:x("connection.useHttps")})]})}function _I(){return Fb(),window.isSecureContext?o.jsx(Bb,{}):o.jsxs("div",{className:"jv-insecure-shell",children:[o.jsx(AI,{}),o.jsx(Bb,{})]})}Qk.createRoot(document.getElementById("root")).render(o.jsx(w.StrictMode,{children:o.jsx(_I,{})}));
|