@jean2/client 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,565 +0,0 @@
1
- function dE(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in t)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function eh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rm={exports:{}},pu={};/**
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 fE(){if(vy)return pu;vy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,o,l){var d=null;if(l!==void 0&&(d=""+l),o.key!==void 0&&(d=""+o.key),"key"in o){l={};for(var a in o)a!=="key"&&(l[a]=o[a])}else l=o;return o=l.ref,{$$typeof:t,type:i,key:d,ref:o!==void 0?o:null,props:l}}return pu.Fragment=e,pu.jsx=n,pu.jsxs=n,pu}var _y;function hE(){return _y||(_y=1,Rm.exports=fE()),Rm.exports}var g=hE(),Tm={exports:{}},ft={};/**
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 yy;function pE(){if(yy)return ft;yy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),d=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),v=Symbol.iterator;function S(B){return B===null||typeof B!="object"?null:(B=v&&B[v]||B["@@iterator"],typeof B=="function"?B:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function b(B,H,F){this.props=B,this.context=H,this.refs=_,this.updater=F||C}b.prototype.isReactComponent={},b.prototype.setState=function(B,H){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,H,"setState")},b.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(B,H,F){this.props=B,this.context=H,this.refs=_,this.updater=F||C}var k=x.prototype=new y;k.constructor=x,w(k,b.prototype),k.isPureReactComponent=!0;var N=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function j(B,H,F){var J=F.ref;return{$$typeof:t,type:B,key:H,ref:J!==void 0?J:null,props:F}}function O(B,H){return j(B.type,H,B.props)}function z(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function q(B){var H={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(F){return H[F]})}var $=/\/+/g;function V(B,H){return typeof B=="object"&&B!==null&&B.key!=null?q(""+B.key):H.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(A,A):(B.status="pending",B.then(function(H){B.status==="pending"&&(B.status="fulfilled",B.value=H)},function(H){B.status==="pending"&&(B.status="rejected",B.reason=H)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function G(B,H,F,J,ne){var Z=typeof B;(Z==="undefined"||Z==="boolean")&&(B=null);var W=!1;if(B===null)W=!0;else switch(Z){case"bigint":case"string":case"number":W=!0;break;case"object":switch(B.$$typeof){case t:case e:W=!0;break;case p:return W=B._init,G(W(B._payload),H,F,J,ne)}}if(W)return ne=ne(B),W=J===""?"."+V(B,0):J,N(ne)?(F="",W!=null&&(F=W.replace($,"$&/")+"/"),G(ne,H,F,"",function(ie){return ie})):ne!=null&&(z(ne)&&(ne=O(ne,F+(ne.key==null||B&&B.key===ne.key?"":(""+ne.key).replace($,"$&/")+"/")+W)),H.push(ne)),1;W=0;var U=J===""?".":J+":";if(N(B))for(var te=0;te<B.length;te++)J=B[te],Z=U+V(J,te),W+=G(J,H,F,Z,ne);else if(te=S(B),typeof te=="function")for(B=te.call(B),te=0;!(J=B.next()).done;)J=J.value,Z=U+V(J,te++),W+=G(J,H,F,Z,ne);else if(Z==="object"){if(typeof B.then=="function")return G(K(B),H,F,J,ne);throw H=String(B),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return W}function Y(B,H,F){if(B==null)return B;var J=[],ne=0;return G(B,J,"","",function(Z){return H.call(F,Z,ne++)}),J}function Q(B){if(B._status===-1){var H=B._result;H=H(),H.then(function(F){(B._status===0||B._status===-1)&&(B._status=1,B._result=F)},function(F){(B._status===0||B._status===-1)&&(B._status=2,B._result=F)}),B._status===-1&&(B._status=0,B._result=H)}if(B._status===1)return B._result.default;throw B._result}var I=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},L={map:Y,forEach:function(B,H,F){Y(B,function(){H.apply(this,arguments)},F)},count:function(B){var H=0;return Y(B,function(){H++}),H},toArray:function(B){return Y(B,function(H){return H})||[]},only:function(B){if(!z(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return ft.Activity=h,ft.Children=L,ft.Component=b,ft.Fragment=n,ft.Profiler=o,ft.PureComponent=x,ft.StrictMode=i,ft.Suspense=u,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ft.__COMPILER_RUNTIME={__proto__:null,c:function(B){return M.H.useMemoCache(B)}},ft.cache=function(B){return function(){return B.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(B,H,F){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var J=w({},B.props),ne=B.key;if(H!=null)for(Z in H.key!==void 0&&(ne=""+H.key),H)!T.call(H,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&H.ref===void 0||(J[Z]=H[Z]);var Z=arguments.length-2;if(Z===1)J.children=F;else if(1<Z){for(var W=Array(Z),U=0;U<Z;U++)W[U]=arguments[U+2];J.children=W}return j(B.type,ne,J)},ft.createContext=function(B){return B={$$typeof:d,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:l,_context:B},B},ft.createElement=function(B,H,F){var J,ne={},Z=null;if(H!=null)for(J in H.key!==void 0&&(Z=""+H.key),H)T.call(H,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=H[J]);var W=arguments.length-2;if(W===1)ne.children=F;else if(1<W){for(var U=Array(W),te=0;te<W;te++)U[te]=arguments[te+2];ne.children=U}if(B&&B.defaultProps)for(J in W=B.defaultProps,W)ne[J]===void 0&&(ne[J]=W[J]);return j(B,Z,ne)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(B){return{$$typeof:a,render:B}},ft.isValidElement=z,ft.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:Q}},ft.memo=function(B,H){return{$$typeof:f,type:B,compare:H===void 0?null:H}},ft.startTransition=function(B){var H=M.T,F={};M.T=F;try{var J=B(),ne=M.S;ne!==null&&ne(F,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(A,I)}catch(Z){I(Z)}finally{H!==null&&F.types!==null&&(H.types=F.types),M.T=H}},ft.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ft.use=function(B){return M.H.use(B)},ft.useActionState=function(B,H,F){return M.H.useActionState(B,H,F)},ft.useCallback=function(B,H){return M.H.useCallback(B,H)},ft.useContext=function(B){return M.H.useContext(B)},ft.useDebugValue=function(){},ft.useDeferredValue=function(B,H){return M.H.useDeferredValue(B,H)},ft.useEffect=function(B,H){return M.H.useEffect(B,H)},ft.useEffectEvent=function(B){return M.H.useEffectEvent(B)},ft.useId=function(){return M.H.useId()},ft.useImperativeHandle=function(B,H,F){return M.H.useImperativeHandle(B,H,F)},ft.useInsertionEffect=function(B,H){return M.H.useInsertionEffect(B,H)},ft.useLayoutEffect=function(B,H){return M.H.useLayoutEffect(B,H)},ft.useMemo=function(B,H){return M.H.useMemo(B,H)},ft.useOptimistic=function(B,H){return M.H.useOptimistic(B,H)},ft.useReducer=function(B,H,F){return M.H.useReducer(B,H,F)},ft.useRef=function(B){return M.H.useRef(B)},ft.useState=function(B){return M.H.useState(B)},ft.useSyncExternalStore=function(B,H,F){return M.H.useSyncExternalStore(B,H,F)},ft.useTransition=function(){return M.H.useTransition()},ft.version="19.2.4",ft}var by;function th(){return by||(by=1,Tm.exports=pE()),Tm.exports}var D=th();const ii=eh(D),jx=dE({__proto__:null,default:ii},[D]);var Nm={exports:{}},mu={},Dm={exports:{}},Mm={};/**
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 xy;function mE(){return xy||(xy=1,(function(t){function e(G,Y){var Q=G.length;G.push(Y);e:for(;0<Q;){var I=Q-1>>>1,L=G[I];if(0<o(L,Y))G[I]=Y,G[Q]=L,Q=I;else break e}}function n(G){return G.length===0?null:G[0]}function i(G){if(G.length===0)return null;var Y=G[0],Q=G.pop();if(Q!==Y){G[0]=Q;e:for(var I=0,L=G.length,B=L>>>1;I<B;){var H=2*(I+1)-1,F=G[H],J=H+1,ne=G[J];if(0>o(F,Q))J<L&&0>o(ne,F)?(G[I]=ne,G[J]=Q,I=J):(G[I]=F,G[H]=Q,I=H);else if(J<L&&0>o(ne,Q))G[I]=ne,G[J]=Q,I=J;else break e}}return Y}function o(G,Y){var Q=G.sortIndex-Y.sortIndex;return Q!==0?Q:G.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,a=d.now();t.unstable_now=function(){return d.now()-a}}var u=[],f=[],p=1,h=null,v=3,S=!1,C=!1,w=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function k(G){for(var Y=n(f);Y!==null;){if(Y.callback===null)i(f);else if(Y.startTime<=G)i(f),Y.sortIndex=Y.expirationTime,e(u,Y);else break;Y=n(f)}}function N(G){if(w=!1,k(G),!C)if(n(u)!==null)C=!0,A||(A=!0,q());else{var Y=n(f);Y!==null&&K(N,Y.startTime-G)}}var A=!1,M=-1,T=5,j=-1;function O(){return _?!0:!(t.unstable_now()-j<T)}function z(){if(_=!1,A){var G=t.unstable_now();j=G;var Y=!0;try{e:{C=!1,w&&(w=!1,y(M),M=-1),S=!0;var Q=v;try{t:{for(k(G),h=n(u);h!==null&&!(h.expirationTime>G&&O());){var I=h.callback;if(typeof I=="function"){h.callback=null,v=h.priorityLevel;var L=I(h.expirationTime<=G);if(G=t.unstable_now(),typeof L=="function"){h.callback=L,k(G),Y=!0;break t}h===n(u)&&i(u),k(G)}else i(u);h=n(u)}if(h!==null)Y=!0;else{var B=n(f);B!==null&&K(N,B.startTime-G),Y=!1}}break e}finally{h=null,v=Q,S=!1}Y=void 0}}finally{Y?q():A=!1}}}var q;if(typeof x=="function")q=function(){x(z)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,V=$.port2;$.port1.onmessage=z,q=function(){V.postMessage(null)}}else q=function(){b(z,0)};function K(G,Y){M=b(function(){G(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(G){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var Q=v;v=Y;try{return G()}finally{v=Q}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(G,Y){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Q=v;v=G;try{return Y()}finally{v=Q}},t.unstable_scheduleCallback=function(G,Y,Q){var I=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?I+Q:I):Q=I,G){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=Q+L,G={id:p++,callback:Y,priorityLevel:G,startTime:Q,expirationTime:L,sortIndex:-1},Q>I?(G.sortIndex=Q,e(f,G),n(u)===null&&G===n(f)&&(w?(y(M),M=-1):w=!0,K(N,Q-I))):(G.sortIndex=L,e(u,G),C||S||(C=!0,A||(A=!0,q()))),G},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(G){var Y=v;return function(){var Q=v;v=Y;try{return G.apply(this,arguments)}finally{v=Q}}}})(Mm)),Mm}var Sy;function gE(){return Sy||(Sy=1,Dm.exports=mE()),Dm.exports}var jm={exports:{}},Gn={};/**
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 wy;function vE(){if(wy)return Gn;wy=1;var t=th();function e(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(u,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:u,containerInfo:f,implementation:p}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Gn.createPortal=function(u,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return l(u,f,null,p)},Gn.flushSync=function(u){var f=d.T,p=i.p;try{if(d.T=null,i.p=2,u)return u()}finally{d.T=f,i.p=p,i.d.f()}},Gn.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(u,f))},Gn.prefetchDNS=function(u){typeof u=="string"&&i.d.D(u)},Gn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin),v=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:v,fetchPriority:S}):p==="script"&&i.d.X(u,{crossOrigin:h,integrity:v,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Gn.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=a(f.as,f.crossOrigin);i.d.M(u,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(u)},Gn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin);i.d.L(u,p,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Gn.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=a(f.as,f.crossOrigin);i.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(u)},Gn.requestFormReset=function(u){i.d.r(u)},Gn.unstable_batchedUpdates=function(u,f){return u(f)},Gn.useFormState=function(u,f,p){return d.H.useFormState(u,f,p)},Gn.useFormStatus=function(){return d.H.useHostTransitionStatus()},Gn.version="19.2.4",Gn}var Cy;function Ox(){if(Cy)return jm.exports;Cy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),jm.exports=vE(),jm.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 ky;function _E(){if(ky)return mu;ky=1;var t=gE(),e=th(),n=Ox();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var s=r,c=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(c=s.return),r=s.return;while(r)}return s.tag===3?c:null}function d(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function a(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function u(r){if(l(r)!==r)throw Error(i(188))}function f(r){var s=r.alternate;if(!s){if(s=l(r),s===null)throw Error(i(188));return s!==r?null:r}for(var c=r,m=s;;){var E=c.return;if(E===null)break;var R=E.alternate;if(R===null){if(m=E.return,m!==null){c=m;continue}break}if(E.child===R.child){for(R=E.child;R;){if(R===c)return u(E),r;if(R===m)return u(E),s;R=R.sibling}throw Error(i(188))}if(c.return!==m.return)c=E,m=R;else{for(var P=!1,X=E.child;X;){if(X===c){P=!0,c=E,m=R;break}if(X===m){P=!0,m=E,c=R;break}X=X.sibling}if(!P){for(X=R.child;X;){if(X===c){P=!0,c=R,m=E;break}if(X===m){P=!0,m=R,c=E;break}X=X.sibling}if(!P)throw Error(i(189))}}if(c.alternate!==m)throw Error(i(190))}if(c.tag!==3)throw Error(i(188));return c.stateNode.current===c?r:s}function p(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=p(r),s!==null)return s;r=r.sibling}return null}var h=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),x=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=z&&r[z]||r["@@iterator"],typeof r=="function"?r:null)}var $=Symbol.for("react.client.reference");function V(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===$?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case b:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList";case j:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case x:return r.displayName||"Context";case y:return(r._context.displayName||"Context")+".Consumer";case k:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case M:return s=r.displayName||null,s!==null?s:V(r.type)||"Memo";case T:s=r._payload,r=r._init;try{return V(r(s))}catch{}}return null}var K=Array.isArray,G=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},I=[],L=-1;function B(r){return{current:r}}function H(r){0>L||(r.current=I[L],I[L]=null,L--)}function F(r,s){L++,I[L]=r.current,r.current=s}var J=B(null),ne=B(null),Z=B(null),W=B(null);function U(r,s){switch(F(Z,s),F(ne,r),F(J,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?F0(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=F0(s),r=H0(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(J),F(J,r)}function te(){H(J),H(ne),H(Z)}function ie(r){r.memoizedState!==null&&F(W,r);var s=J.current,c=H0(s,r.type);s!==c&&(F(ne,r),F(J,c))}function ae(r){ne.current===r&&(H(J),H(ne)),W.current===r&&(H(W),uu._currentValue=Q)}var se,ge;function Te(r){if(se===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);se=s&&s[1]||"",ge=-1<c.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+se+r+ge}var Me=!1;function Ke(r,s){if(!r||Me)return"";Me=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(pe){var he=pe}Reflect.construct(r,[],we)}else{try{we.call()}catch(pe){he=pe}r.call(we.prototype)}}else{try{throw Error()}catch(pe){he=pe}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(pe){if(pe&&he&&typeof pe.stack=="string")return[pe.stack,he.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=m.DetermineComponentFrameRoot(),P=R[0],X=R[1];if(P&&X){var re=P.split(`
44
- `),fe=X.split(`
45
- `);for(E=m=0;m<re.length&&!re[m].includes("DetermineComponentFrameRoot");)m++;for(;E<fe.length&&!fe[E].includes("DetermineComponentFrameRoot");)E++;if(m===re.length||E===fe.length)for(m=re.length-1,E=fe.length-1;1<=m&&0<=E&&re[m]!==fe[E];)E--;for(;1<=m&&0<=E;m--,E--)if(re[m]!==fe[E]){if(m!==1||E!==1)do if(m--,E--,0>E||re[m]!==fe[E]){var ye=`
46
- `+re[m].replace(" at new "," at ");return r.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",r.displayName)),ye}while(1<=m&&0<=E);break}}}finally{Me=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?Te(c):""}function Re(r,s){switch(r.tag){case 26:case 27:case 5:return Te(r.type);case 16:return Te("Lazy");case 13:return r.child!==s&&s!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Ke(r.type,!1);case 11:return Ke(r.type.render,!1);case 1:return Ke(r.type,!0);case 31:return Te("Activity");default:return""}}function et(r){try{var s="",c=null;do s+=Re(r,c),c=r,r=r.return;while(r);return s}catch(m){return`
47
- Error generating stack: `+m.message+`
48
- `+m.stack}}var Ze=Object.prototype.hasOwnProperty,Ge=t.unstable_scheduleCallback,rt=t.unstable_cancelCallback,ue=t.unstable_shouldYield,ct=t.unstable_requestPaint,it=t.unstable_now,ut=t.unstable_getCurrentPriorityLevel,ce=t.unstable_ImmediatePriority,be=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,je=t.unstable_LowPriority,Le=t.unstable_IdlePriority,lt=t.log,xe=t.unstable_setDisableYieldValue,ze=null,Ve=null;function _t(r){if(typeof lt=="function"&&xe(r),Ve&&typeof Ve.setStrictMode=="function")try{Ve.setStrictMode(ze,r)}catch{}}var _e=Math.clz32?Math.clz32:St,Ye=Math.log,st=Math.LN2;function St(r){return r>>>=0,r===0?32:31-(Ye(r)/st|0)|0}var Pt=256,Ft=262144,Gt=4194304;function $t(r){var s=r&42;if(s!==0)return s;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Tn(r,s,c){var m=r.pendingLanes;if(m===0)return 0;var E=0,R=r.suspendedLanes,P=r.pingedLanes;r=r.warmLanes;var X=m&134217727;return X!==0?(m=X&~R,m!==0?E=$t(m):(P&=X,P!==0?E=$t(P):c||(c=X&~r,c!==0&&(E=$t(c))))):(X=m&~R,X!==0?E=$t(X):P!==0?E=$t(P):c||(c=m&~r,c!==0&&(E=$t(c)))),E===0?0:s!==0&&s!==E&&(s&R)===0&&(R=E&-E,c=s&-s,R>=c||R===32&&(c&4194048)!==0)?s:E}function Nn(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Xt(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 an(){var r=Gt;return Gt<<=1,(Gt&62914560)===0&&(Gt=4194304),r}function Kt(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function Un(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function li(r,s,c,m,E,R){var P=r.pendingLanes;r.pendingLanes=c,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=c,r.entangledLanes&=c,r.errorRecoveryDisabledLanes&=c,r.shellSuspendCounter=0;var X=r.entanglements,re=r.expirationTimes,fe=r.hiddenUpdates;for(c=P&~c;0<c;){var ye=31-_e(c),we=1<<ye;X[ye]=0,re[ye]=-1;var he=fe[ye];if(he!==null)for(fe[ye]=null,ye=0;ye<he.length;ye++){var pe=he[ye];pe!==null&&(pe.lane&=-536870913)}c&=~we}m!==0&&rr(r,m,0),R!==0&&E===0&&r.tag!==0&&(r.suspendedLanes|=R&~(P&~s))}function rr(r,s,c){r.pendingLanes|=s,r.suspendedLanes&=~s;var m=31-_e(s);r.entangledLanes|=s,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function ci(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var m=31-_e(c),E=1<<m;E&s|r[m]&s&&(r[m]|=s),c&=~E}}function $r(r,s){var c=s&-s;return c=(c&42)!==0?1:ui(c),(c&(r.suspendedLanes|s))!==0?0:c}function ui(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function qr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function pn(){var r=Y.p;return r!==0?r:(r=window.event,r===void 0?32:uy(r.type))}function Cn(r,s){var c=Y.p;try{return Y.p=r,s()}finally{Y.p=c}}var Qt=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Qt,Zt="__reactProps$"+Qt,Dn="__reactContainer$"+Qt,Mn="__reactEvents$"+Qt,di="__reactListeners$"+Qt,Vr="__reactHandles$"+Qt,_r="__reactResources$"+Qt,$n="__reactMarker$"+Qt;function yr(r){delete r[Nt],delete r[Zt],delete r[Mn],delete r[di],delete r[Vr]}function jn(r){var s=r[Nt];if(s)return s;for(var c=r.parentNode;c;){if(s=c[Dn]||c[Nt]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=K0(r);r!==null;){if(c=r[Nt])return c;r=K0(r)}return s}r=c,c=r.parentNode}return null}function Qn(r){if(r=r[Nt]||r[Dn]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function ir(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function qn(r){var s=r[_r];return s||(s=r[_r]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Mt(r){r[$n]=!0}var br=new Set,Oi={};function Vn(r,s){mn(r,s),mn(r+"Capture",s)}function mn(r,s){for(Oi[r]=s,r=0;r<s.length;r++)br.add(s[r])}var xr=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]*$"),Wr={},Gr={};function Sr(r){return Ze.call(Gr,r)?!0:Ze.call(Wr,r)?!1:xr.test(r)?Gr[r]=!0:(Wr[r]=!0,!1)}function wr(r,s,c){if(Sr(s))if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+c)}}function Zn(r,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+c)}}function sr(r,s,c,m){if(m===null)r.removeAttribute(c);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(c);return}r.setAttributeNS(s,c,""+m)}}function On(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function qo(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ua(r,s,c){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var E=m.get,R=m.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return E.call(this)},set:function(P){c=""+P,R.call(this,P)}}),Object.defineProperty(r,s,{enumerable:m.enumerable}),{getValue:function(){return c},setValue:function(P){c=""+P},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function $a(r){if(!r._valueTracker){var s=qo(r)?"checked":"value";r._valueTracker=Ua(r,s,""+r[s])}}function qa(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return r&&(m=qo(r)?r.checked?"true":"false":r.value),r=m,r!==c?(s.setValue(r),!0):!1}function Xe(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Qe=/[\n"\\]/g;function Ln(r){return r.replace(Qe,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Us(r,s,c,m,E,R,P,X){r.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?r.type=P:r.removeAttribute("type"),s!=null?P==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+On(s)):r.value!==""+On(s)&&(r.value=""+On(s)):P!=="submit"&&P!=="reset"||r.removeAttribute("value"),s!=null?$s(r,P,On(s)):c!=null?$s(r,P,On(c)):m!=null&&r.removeAttribute("value"),E==null&&R!=null&&(r.defaultChecked=!!R),E!=null&&(r.checked=E&&typeof E!="function"&&typeof E!="symbol"),X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?r.name=""+On(X):r.removeAttribute("name")}function Vo(r,s,c,m,E,R,P,X){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(r.type=R),s!=null||c!=null){if(!(R!=="submit"&&R!=="reset"||s!=null)){$a(r);return}c=c!=null?""+On(c):"",s=s!=null?""+On(s):c,X||s===r.value||(r.value=s),r.defaultValue=s}m=m!=null?m:E,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=X?r.checked:!!m,r.defaultChecked=!!m,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(r.name=P),$a(r)}function $s(r,s,c){s==="number"&&Xe(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function fi(r,s,c,m){if(r=r.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<r.length;c++)E=s.hasOwnProperty("$"+r[c].value),r[c].selected!==E&&(r[c].selected=E),E&&m&&(r[c].defaultSelected=!0)}else{for(c=""+On(c),s=null,E=0;E<r.length;E++){if(r[E].value===c){r[E].selected=!0,m&&(r[E].defaultSelected=!0);return}s!==null||r[E].disabled||(s=r[E])}s!==null&&(s.selected=!0)}}function Wo(r,s,c){if(s!=null&&(s=""+On(s),s!==r.value&&(r.value=s),c==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=c!=null?""+On(c):""}function Go(r,s,c,m){if(s==null){if(m!=null){if(c!=null)throw Error(i(92));if(K(m)){if(1<m.length)throw Error(i(93));m=m[0]}c=m}c==null&&(c=""),s=c}c=On(s),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),$a(r)}function hi(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var Va=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 gn(r,s,c){var m=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?m?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":m?r.setProperty(s,c):typeof c!="number"||c===0||Va.has(s)?s==="float"?r.cssFloat=c:r[s]=(""+c).trim():r[s]=c+"px"}function Ko(r,s,c){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,c!=null){for(var m in c)!c.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var E in s)m=s[E],s.hasOwnProperty(E)&&c[E]!==m&&gn(r,E,m)}else for(var R in s)s.hasOwnProperty(R)&&gn(r,R,s[R])}function kc(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Wa=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"],["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"]]),Yo=/^[\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 rs(r){return Yo.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function or(){}var qs=null;function nn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var pi=null,Li=null;function Xo(r){var s=Qn(r);if(s&&(r=s.stateNode)){var c=r[Zt]||null;e:switch(r=s.stateNode,s.type){case"input":if(Us(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Ln(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==r&&m.form===r.form){var E=m[Zt]||null;if(!E)throw Error(i(90));Us(m,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(s=0;s<c.length;s++)m=c[s],m.form===r.form&&qa(m)}break e;case"textarea":Wo(r,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&fi(r,!!c.multiple,s,!1)}}}var Vs=!1;function Qo(r,s,c){if(Vs)return r(s,c);Vs=!0;try{var m=r(s);return m}finally{if(Vs=!1,(pi!==null||Li!==null)&&($d(),pi&&(s=pi,r=Li,Li=pi=null,Xo(s),r)))for(s=0;s<r.length;s++)Xo(r[s])}}function Ii(r,s){var c=r.stateNode;if(c===null)return null;var m=c[Zt]||null;if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(i(231,s,typeof c));return c}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ws=!1;if(ar)try{var Bi={};Object.defineProperty(Bi,"passive",{get:function(){Ws=!0}}),window.addEventListener("test",Bi,Bi),window.removeEventListener("test",Bi,Bi)}catch{Ws=!1}var Cr=null,Gs=null,is=null;function Zo(){if(is)return is;var r,s=Gs,c=s.length,m,E="value"in Cr?Cr.value:Cr.textContent,R=E.length;for(r=0;r<c&&s[r]===E[r];r++);var P=c-r;for(m=1;m<=P&&s[c-m]===E[R-m];m++);return is=E.slice(r,1<m?1-m:void 0)}function ss(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function os(){return!0}function Jo(){return!1}function vn(r){function s(c,m,E,R,P){this._reactName=c,this._targetInst=E,this.type=m,this.nativeEvent=R,this.target=P,this.currentTarget=null;for(var X in r)r.hasOwnProperty(X)&&(c=r[X],this[X]=c?c(R):R[X]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?os:Jo,this.isPropagationStopped=Jo,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=os)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),s}var lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=vn(lr),ea=h({},lr,{view:0,detail:0}),Ga=vn(ea),Ka,Ks,mi,ls=h({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qs,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==mi&&(mi&&r.type==="mousemove"?(Ka=r.screenX-mi.screenX,Ks=r.screenY-mi.screenY):Ks=Ka=0,mi=r),Ka)},movementY:function(r){return"movementY"in r?r.movementY:Ks}}),Ys=vn(ls),Ya=h({},ls,{dataTransfer:0}),ta=vn(Ya),Xa=h({},ea,{relatedTarget:0}),Xs=vn(Xa),Qa=h({},lr,{animationName:0,elapsedTime:0,pseudoElement:0}),Za=vn(Qa),Ja=h({},lr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),el=vn(Ja),tl=h({},lr,{data:0}),Ie=vn(tl),nl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zi={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"},rl={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gi(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=rl[r])?!!s[r]:!1}function Qs(){return gi}var na=h({},ea,{key:function(r){if(r.key){var s=nl[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ss(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?zi[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qs,charCode:function(r){return r.type==="keypress"?ss(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ss(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),il=vn(na),Ec=h({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ra=vn(Ec),Ac=h({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qs}),sl=vn(Ac),Rc=h({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ol=vn(Rc),ia=h({},ls,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),al=vn(ia),sa=h({},lr,{newState:0,oldState:0}),ll=vn(sa),Tc=[9,13,27,32],Zs=ar&&"CompositionEvent"in window,cs=null;ar&&"documentMode"in document&&(cs=document.documentMode);var cl=ar&&"TextEvent"in window&&!cs,ul=ar&&(!Zs||cs&&8<cs&&11>=cs),oa=" ",us=!1;function aa(r,s){switch(r){case"keyup":return Tc.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dl(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var vi=!1;function Nc(r,s){switch(r){case"compositionend":return dl(s);case"keypress":return s.which!==32?null:(us=!0,oa);case"textInput":return r=s.data,r===oa&&us?null:r;default:return null}}function fl(r,s){if(vi)return r==="compositionend"||!Zs&&aa(r,s)?(r=Zo(),is=Gs=Cr=null,vi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return ul&&s.locale!=="ko"?null:s.data;default:return null}}var Dc={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 la(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Dc[r.type]:s==="textarea"}function hl(r,s,c,m){pi?Li?Li.push(m):Li=[m]:pi=m,s=Xd(s,"onChange"),0<s.length&&(c=new as("onChange","change",null,c,m),r.push({event:c,listeners:s}))}var Pi=null,ds=null;function pl(r){O0(r,0)}function _i(r){var s=ir(r);if(qa(s))return r}function ca(r,s){if(r==="change")return s}var ml=!1;if(ar){var Js;if(ar){var ua="oninput"in document;if(!ua){var da=document.createElement("div");da.setAttribute("oninput","return;"),ua=typeof da.oninput=="function"}Js=ua}else Js=!1;ml=Js&&(!document.documentMode||9<document.documentMode)}function gl(){Pi&&(Pi.detachEvent("onpropertychange",fa),ds=Pi=null)}function fa(r){if(r.propertyName==="value"&&_i(ds)){var s=[];hl(s,ds,r,nn(r)),Qo(pl,s)}}function ha(r,s,c){r==="focusin"?(gl(),Pi=s,ds=c,Pi.attachEvent("onpropertychange",fa)):r==="focusout"&&gl()}function vl(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return _i(ds)}function pa(r,s){if(r==="click")return _i(s)}function eo(r,s){if(r==="input"||r==="change")return _i(s)}function dt(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var ln=typeof Object.is=="function"?Object.is:dt;function cr(r,s){if(ln(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var c=Object.keys(r),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var E=c[m];if(!Ze.call(s,E)||!ln(r[E],s[E]))return!1}return!0}function yi(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function bi(r,s){var c=yi(r);r=0;for(var m;c;){if(c.nodeType===3){if(m=r+c.textContent.length,r<=s&&m>=s)return{node:c,offset:s-r};r=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=yi(c)}}function fs(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?fs(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function hs(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Xe(r.document);s instanceof r.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)r=s.contentWindow;else break;s=Xe(r.document)}return s}function Kr(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var Fi=ar&&"documentMode"in document&&11>=document.documentMode,kr=null,Hi=null,Yr=null,to=!1;function ps(r,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;to||kr==null||kr!==Xe(m)||(m=kr,"selectionStart"in m&&Kr(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Yr&&cr(Yr,m)||(Yr=m,m=Xd(Hi,"onSelect"),0<m.length&&(s=new as("onSelect","select",null,s,c),r.push({event:s,listeners:m}),s.target=kr)))}function Xr(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var ms={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},_l={},Mc={};ar&&(Mc=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function Ui(r){if(_l[r])return _l[r];if(!ms[r])return r;var s=ms[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in Mc)return _l[r]=s[c];return r}var jc=Ui("animationend"),Oc=Ui("animationiteration"),Lc=Ui("animationstart"),fd=Ui("transitionrun"),hd=Ui("transitionstart"),pd=Ui("transitioncancel"),Ic=Ui("transitionend"),ee=new Map,Ne="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ne.push("scrollEnd");function tt(r,s){ee.set(r,s),Vn(s,[r])}var ot=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},ve=[],Ae=0,We=0;function At(){for(var r=Ae,s=We=Ae=0;s<r;){var c=ve[s];ve[s++]=null;var m=ve[s];ve[s++]=null;var E=ve[s];ve[s++]=null;var R=ve[s];if(ve[s++]=null,m!==null&&E!==null){var P=m.pending;P===null?E.next=E:(E.next=P.next,P.next=E),m.pending=E}R!==0&&Qr(c,E,R)}}function rn(r,s,c,m){ve[Ae++]=r,ve[Ae++]=s,ve[Ae++]=c,ve[Ae++]=m,We|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function In(r,s,c,m){return rn(r,s,c,m),Er(r)}function Jt(r,s){return rn(r,null,null,s),Er(r)}function Qr(r,s,c){r.lanes|=c;var m=r.alternate;m!==null&&(m.lanes|=c);for(var E=!1,R=r.return;R!==null;)R.childLanes|=c,m=R.alternate,m!==null&&(m.childLanes|=c),R.tag===22&&(r=R.stateNode,r===null||r._visibility&1||(E=!0)),r=R,R=R.return;return r.tag===3?(R=r.stateNode,E&&s!==null&&(E=31-_e(c),r=R.hiddenUpdates,m=r[E],m===null?r[E]=[s]:m.push(s),s.lane=c|536870912),R):null}function Er(r){if(50<ru)throw ru=0,Zp=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var Zr={};function Wh(r,s,c,m){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(r,s,c,m){return new Wh(r,s,c,m)}function $i(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Wn(r,s){var c=r.alternate;return c===null?(c=Jn(r.tag,s,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=s,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&65011712,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,s=r.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c.refCleanup=r.refCleanup,c}function gs(r,s){r.flags&=65011714;var c=r.alternate;return c===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=c.childLanes,r.lanes=c.lanes,r.child=c.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,r.type=c.type,s=c.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function xi(r,s,c,m,E,R){var P=0;if(m=r,typeof r=="function")$i(r)&&(P=1);else if(typeof r=="string")P=Jk(r,c,J.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=Jn(31,c,s,E),r.elementType=j,r.lanes=R,r;case w:return ur(c.children,E,R,s);case _:P=8,E|=24;break;case b:return r=Jn(12,c,s,E|2),r.elementType=b,r.lanes=R,r;case N:return r=Jn(13,c,s,E),r.elementType=N,r.lanes=R,r;case A:return r=Jn(19,c,s,E),r.elementType=A,r.lanes=R,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case x:P=10;break e;case y:P=9;break e;case k:P=11;break e;case M:P=14;break e;case T:P=16,m=null;break e}P=29,c=Error(i(130,r===null?"null":typeof r,"")),m=null}return s=Jn(P,c,s,E),s.elementType=r,s.type=m,s.lanes=R,s}function ur(r,s,c,m){return r=Jn(7,r,m,s),r.lanes=c,r}function qi(r,s,c){return r=Jn(6,r,null,s),r.lanes=c,r}function vs(r){var s=Jn(18,null,null,0);return s.stateNode=r,s}function Vi(r,s,c){return s=Jn(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var _s=new WeakMap;function _n(r,s){if(typeof r=="object"&&r!==null){var c=_s.get(r);return c!==void 0?c:(s={value:r,source:s,stack:et(s)},_s.set(r,s),s)}return{value:r,source:s,stack:et(s)}}var Ar=[],Rr=0,Si=null,Jr=0,yn=[],bn=0,Lt=null,kn=1,Tr="";function wi(r,s){Ar[Rr++]=Jr,Ar[Rr++]=Si,Si=r,Jr=s}function yv(r,s,c){yn[bn++]=kn,yn[bn++]=Tr,yn[bn++]=Lt,Lt=r;var m=kn;r=Tr;var E=32-_e(m)-1;m&=~(1<<E),c+=1;var R=32-_e(s)+E;if(30<R){var P=E-E%5;R=(m&(1<<P)-1).toString(32),m>>=P,E-=P,kn=1<<32-_e(s)+E|c<<E|m,Tr=R+r}else kn=1<<R|c<<E|m,Tr=r}function Gh(r){r.return!==null&&(wi(r,1),yv(r,1,0))}function Kh(r){for(;r===Si;)Si=Ar[--Rr],Ar[Rr]=null,Jr=Ar[--Rr],Ar[Rr]=null;for(;r===Lt;)Lt=yn[--bn],yn[bn]=null,Tr=yn[--bn],yn[bn]=null,kn=yn[--bn],yn[bn]=null}function bv(r,s){yn[bn++]=kn,yn[bn++]=Tr,yn[bn++]=Lt,kn=s.id,Tr=s.overflow,Lt=r}var Bn=null,Vt=null,kt=!1,no=null,ei=!1,Yh=Error(i(519));function ro(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bc(_n(s,r)),Yh}function xv(r){var s=r.stateNode,c=r.type,m=r.memoizedProps;switch(s[Nt]=r,s[Zt]=m,c){case"dialog":bt("cancel",s),bt("close",s);break;case"iframe":case"object":case"embed":bt("load",s);break;case"video":case"audio":for(c=0;c<su.length;c++)bt(su[c],s);break;case"source":bt("error",s);break;case"img":case"image":case"link":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"input":bt("invalid",s),Vo(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":bt("invalid",s);break;case"textarea":bt("invalid",s),Go(s,m.value,m.defaultValue,m.children)}c=m.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||m.suppressHydrationWarning===!0||z0(s.textContent,c)?(m.popover!=null&&(bt("beforetoggle",s),bt("toggle",s)),m.onScroll!=null&&bt("scroll",s),m.onScrollEnd!=null&&bt("scrollend",s),m.onClick!=null&&(s.onclick=or),s=!0):s=!1,s||ro(r,!0)}function Sv(r){for(Bn=r.return;Bn;)switch(Bn.tag){case 5:case 31:case 13:ei=!1;return;case 27:case 3:ei=!0;return;default:Bn=Bn.return}}function yl(r){if(r!==Bn)return!1;if(!kt)return Sv(r),kt=!0,!1;var s=r.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||hm(r.type,r.memoizedProps)),c=!c),c&&Vt&&ro(r),Sv(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=G0(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=G0(r)}else s===27?(s=Vt,_o(r.type)?(r=_m,_m=null,Vt=r):Vt=s):Vt=Bn?ni(r.stateNode.nextSibling):null;return!0}function ma(){Vt=Bn=null,kt=!1}function Xh(){var r=no;return r!==null&&(pr===null?pr=r:pr.push.apply(pr,r),no=null),r}function Bc(r){no===null?no=[r]:no.push(r)}var Qh=B(null),ga=null,ys=null;function io(r,s,c){F(Qh,s._currentValue),s._currentValue=c}function bs(r){r._currentValue=Qh.current,H(Qh)}function Zh(r,s,c){for(;r!==null;){var m=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),r===c)break;r=r.return}}function Jh(r,s,c,m){var E=r.child;for(E!==null&&(E.return=r);E!==null;){var R=E.dependencies;if(R!==null){var P=E.child;R=R.firstContext;e:for(;R!==null;){var X=R;R=E;for(var re=0;re<s.length;re++)if(X.context===s[re]){R.lanes|=c,X=R.alternate,X!==null&&(X.lanes|=c),Zh(R.return,c,r),m||(P=null);break e}R=X.next}}else if(E.tag===18){if(P=E.return,P===null)throw Error(i(341));P.lanes|=c,R=P.alternate,R!==null&&(R.lanes|=c),Zh(P,c,r),P=null}else P=E.child;if(P!==null)P.return=E;else for(P=E;P!==null;){if(P===r){P=null;break}if(E=P.sibling,E!==null){E.return=P.return,P=E;break}P=P.return}E=P}}function bl(r,s,c,m){r=null;for(var E=s,R=!1;E!==null;){if(!R){if((E.flags&524288)!==0)R=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var P=E.alternate;if(P===null)throw Error(i(387));if(P=P.memoizedProps,P!==null){var X=E.type;ln(E.pendingProps.value,P.value)||(r!==null?r.push(X):r=[X])}}else if(E===W.current){if(P=E.alternate,P===null)throw Error(i(387));P.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(r!==null?r.push(uu):r=[uu])}E=E.return}r!==null&&Jh(s,r,c,m),s.flags|=262144}function md(r){for(r=r.firstContext;r!==null;){if(!ln(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function va(r){ga=r,ys=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function zn(r){return wv(ga,r)}function gd(r,s){return ga===null&&va(r),wv(r,s)}function wv(r,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},ys===null){if(r===null)throw Error(i(308));ys=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else ys=ys.next=s;return c}var Y3=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(c,m){r.push(m)}};this.abort=function(){s.aborted=!0,r.forEach(function(c){return c()})}},X3=t.unstable_scheduleCallback,Q3=t.unstable_NormalPriority,cn={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ep(){return{controller:new Y3,data:new Map,refCount:0}}function zc(r){r.refCount--,r.refCount===0&&X3(Q3,function(){r.controller.abort()})}var Pc=null,tp=0,xl=0,Sl=null;function Z3(r,s){if(Pc===null){var c=Pc=[];tp=0,xl=im(),Sl={status:"pending",value:void 0,then:function(m){c.push(m)}}}return tp++,s.then(Cv,Cv),s}function Cv(){if(--tp===0&&Pc!==null){Sl!==null&&(Sl.status="fulfilled");var r=Pc;Pc=null,xl=0,Sl=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function J3(r,s){var c=[],m={status:"pending",value:null,reason:null,then:function(E){c.push(E)}};return r.then(function(){m.status="fulfilled",m.value=s;for(var E=0;E<c.length;E++)(0,c[E])(s)},function(E){for(m.status="rejected",m.reason=E,E=0;E<c.length;E++)(0,c[E])(void 0)}),m}var kv=G.S;G.S=function(r,s){l0=it(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Z3(r,s),kv!==null&&kv(r,s)};var _a=B(null);function np(){var r=_a.current;return r!==null?r:Ht.pooledCache}function vd(r,s){s===null?F(_a,_a.current):F(_a,s.pool)}function Ev(){var r=np();return r===null?null:{parent:cn._currentValue,pool:r}}var wl=Error(i(460)),rp=Error(i(474)),_d=Error(i(542)),yd={then:function(){}};function Av(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Rv(r,s,c){switch(c=r[c],c===void 0?r.push(s):c!==s&&(s.then(or,or),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Nv(r),r;default:if(typeof s.status=="string")s.then(or,or);else{if(r=Ht,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(m){if(s.status==="pending"){var E=s;E.status="fulfilled",E.value=m}},function(m){if(s.status==="pending"){var E=s;E.status="rejected",E.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Nv(r),r}throw ba=s,wl}}function ya(r){try{var s=r._init;return s(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ba=c,wl):c}}var ba=null;function Tv(){if(ba===null)throw Error(i(459));var r=ba;return ba=null,r}function Nv(r){if(r===wl||r===_d)throw Error(i(483))}var Cl=null,Fc=0;function bd(r){var s=Fc;return Fc+=1,Cl===null&&(Cl=[]),Rv(Cl,r,s)}function Hc(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function xd(r,s){throw s.$$typeof===v?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Dv(r){function s(le,oe){if(r){var de=le.deletions;de===null?(le.deletions=[oe],le.flags|=16):de.push(oe)}}function c(le,oe){if(!r)return null;for(;oe!==null;)s(le,oe),oe=oe.sibling;return null}function m(le){for(var oe=new Map;le!==null;)le.key!==null?oe.set(le.key,le):oe.set(le.index,le),le=le.sibling;return oe}function E(le,oe){return le=Wn(le,oe),le.index=0,le.sibling=null,le}function R(le,oe,de){return le.index=de,r?(de=le.alternate,de!==null?(de=de.index,de<oe?(le.flags|=67108866,oe):de):(le.flags|=67108866,oe)):(le.flags|=1048576,oe)}function P(le){return r&&le.alternate===null&&(le.flags|=67108866),le}function X(le,oe,de,Se){return oe===null||oe.tag!==6?(oe=qi(de,le.mode,Se),oe.return=le,oe):(oe=E(oe,de),oe.return=le,oe)}function re(le,oe,de,Se){var Je=de.type;return Je===w?ye(le,oe,de.props.children,Se,de.key):oe!==null&&(oe.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===T&&ya(Je)===oe.type)?(oe=E(oe,de.props),Hc(oe,de),oe.return=le,oe):(oe=xi(de.type,de.key,de.props,null,le.mode,Se),Hc(oe,de),oe.return=le,oe)}function fe(le,oe,de,Se){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==de.containerInfo||oe.stateNode.implementation!==de.implementation?(oe=Vi(de,le.mode,Se),oe.return=le,oe):(oe=E(oe,de.children||[]),oe.return=le,oe)}function ye(le,oe,de,Se,Je){return oe===null||oe.tag!==7?(oe=ur(de,le.mode,Se,Je),oe.return=le,oe):(oe=E(oe,de),oe.return=le,oe)}function we(le,oe,de){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=qi(""+oe,le.mode,de),oe.return=le,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return de=xi(oe.type,oe.key,oe.props,null,le.mode,de),Hc(de,oe),de.return=le,de;case C:return oe=Vi(oe,le.mode,de),oe.return=le,oe;case T:return oe=ya(oe),we(le,oe,de)}if(K(oe)||q(oe))return oe=ur(oe,le.mode,de,null),oe.return=le,oe;if(typeof oe.then=="function")return we(le,bd(oe),de);if(oe.$$typeof===x)return we(le,gd(le,oe),de);xd(le,oe)}return null}function he(le,oe,de,Se){var Je=oe!==null?oe.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return Je!==null?null:X(le,oe,""+de,Se);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case S:return de.key===Je?re(le,oe,de,Se):null;case C:return de.key===Je?fe(le,oe,de,Se):null;case T:return de=ya(de),he(le,oe,de,Se)}if(K(de)||q(de))return Je!==null?null:ye(le,oe,de,Se,null);if(typeof de.then=="function")return he(le,oe,bd(de),Se);if(de.$$typeof===x)return he(le,oe,gd(le,de),Se);xd(le,de)}return null}function pe(le,oe,de,Se,Je){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return le=le.get(de)||null,X(oe,le,""+Se,Je);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case S:return le=le.get(Se.key===null?de:Se.key)||null,re(oe,le,Se,Je);case C:return le=le.get(Se.key===null?de:Se.key)||null,fe(oe,le,Se,Je);case T:return Se=ya(Se),pe(le,oe,de,Se,Je)}if(K(Se)||q(Se))return le=le.get(de)||null,ye(oe,le,Se,Je,null);if(typeof Se.then=="function")return pe(le,oe,de,bd(Se),Je);if(Se.$$typeof===x)return pe(le,oe,de,gd(oe,Se),Je);xd(oe,Se)}return null}function Fe(le,oe,de,Se){for(var Je=null,Rt=null,$e=oe,pt=oe=0,Ct=null;$e!==null&&pt<de.length;pt++){$e.index>pt?(Ct=$e,$e=null):Ct=$e.sibling;var Tt=he(le,$e,de[pt],Se);if(Tt===null){$e===null&&($e=Ct);break}r&&$e&&Tt.alternate===null&&s(le,$e),oe=R(Tt,oe,pt),Rt===null?Je=Tt:Rt.sibling=Tt,Rt=Tt,$e=Ct}if(pt===de.length)return c(le,$e),kt&&wi(le,pt),Je;if($e===null){for(;pt<de.length;pt++)$e=we(le,de[pt],Se),$e!==null&&(oe=R($e,oe,pt),Rt===null?Je=$e:Rt.sibling=$e,Rt=$e);return kt&&wi(le,pt),Je}for($e=m($e);pt<de.length;pt++)Ct=pe($e,le,pt,de[pt],Se),Ct!==null&&(r&&Ct.alternate!==null&&$e.delete(Ct.key===null?pt:Ct.key),oe=R(Ct,oe,pt),Rt===null?Je=Ct:Rt.sibling=Ct,Rt=Ct);return r&&$e.forEach(function(wo){return s(le,wo)}),kt&&wi(le,pt),Je}function at(le,oe,de,Se){if(de==null)throw Error(i(151));for(var Je=null,Rt=null,$e=oe,pt=oe=0,Ct=null,Tt=de.next();$e!==null&&!Tt.done;pt++,Tt=de.next()){$e.index>pt?(Ct=$e,$e=null):Ct=$e.sibling;var wo=he(le,$e,Tt.value,Se);if(wo===null){$e===null&&($e=Ct);break}r&&$e&&wo.alternate===null&&s(le,$e),oe=R(wo,oe,pt),Rt===null?Je=wo:Rt.sibling=wo,Rt=wo,$e=Ct}if(Tt.done)return c(le,$e),kt&&wi(le,pt),Je;if($e===null){for(;!Tt.done;pt++,Tt=de.next())Tt=we(le,Tt.value,Se),Tt!==null&&(oe=R(Tt,oe,pt),Rt===null?Je=Tt:Rt.sibling=Tt,Rt=Tt);return kt&&wi(le,pt),Je}for($e=m($e);!Tt.done;pt++,Tt=de.next())Tt=pe($e,le,pt,Tt.value,Se),Tt!==null&&(r&&Tt.alternate!==null&&$e.delete(Tt.key===null?pt:Tt.key),oe=R(Tt,oe,pt),Rt===null?Je=Tt:Rt.sibling=Tt,Rt=Tt);return r&&$e.forEach(function(uE){return s(le,uE)}),kt&&wi(le,pt),Je}function zt(le,oe,de,Se){if(typeof de=="object"&&de!==null&&de.type===w&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case S:e:{for(var Je=de.key;oe!==null;){if(oe.key===Je){if(Je=de.type,Je===w){if(oe.tag===7){c(le,oe.sibling),Se=E(oe,de.props.children),Se.return=le,le=Se;break e}}else if(oe.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===T&&ya(Je)===oe.type){c(le,oe.sibling),Se=E(oe,de.props),Hc(Se,de),Se.return=le,le=Se;break e}c(le,oe);break}else s(le,oe);oe=oe.sibling}de.type===w?(Se=ur(de.props.children,le.mode,Se,de.key),Se.return=le,le=Se):(Se=xi(de.type,de.key,de.props,null,le.mode,Se),Hc(Se,de),Se.return=le,le=Se)}return P(le);case C:e:{for(Je=de.key;oe!==null;){if(oe.key===Je)if(oe.tag===4&&oe.stateNode.containerInfo===de.containerInfo&&oe.stateNode.implementation===de.implementation){c(le,oe.sibling),Se=E(oe,de.children||[]),Se.return=le,le=Se;break e}else{c(le,oe);break}else s(le,oe);oe=oe.sibling}Se=Vi(de,le.mode,Se),Se.return=le,le=Se}return P(le);case T:return de=ya(de),zt(le,oe,de,Se)}if(K(de))return Fe(le,oe,de,Se);if(q(de)){if(Je=q(de),typeof Je!="function")throw Error(i(150));return de=Je.call(de),at(le,oe,de,Se)}if(typeof de.then=="function")return zt(le,oe,bd(de),Se);if(de.$$typeof===x)return zt(le,oe,gd(le,de),Se);xd(le,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,oe!==null&&oe.tag===6?(c(le,oe.sibling),Se=E(oe,de),Se.return=le,le=Se):(c(le,oe),Se=qi(de,le.mode,Se),Se.return=le,le=Se),P(le)):c(le,oe)}return function(le,oe,de,Se){try{Fc=0;var Je=zt(le,oe,de,Se);return Cl=null,Je}catch($e){if($e===wl||$e===_d)throw $e;var Rt=Jn(29,$e,null,le.mode);return Rt.lanes=Se,Rt.return=le,Rt}finally{}}}var xa=Dv(!0),Mv=Dv(!1),so=!1;function ip(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sp(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function oo(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ao(r,s,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Dt&2)!==0){var E=m.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),m.pending=s,s=Er(r),Qr(r,null,c),s}return rn(r,m,s,c),Er(r)}function Uc(r,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,ci(r,c)}}function op(r,s){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var E=null,R=null;if(c=c.firstBaseUpdate,c!==null){do{var P={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};R===null?E=R=P:R=R.next=P,c=c.next}while(c!==null);R===null?E=R=s:R=R.next=s}else E=R=s;c={baseState:m.baseState,firstBaseUpdate:E,lastBaseUpdate:R,shared:m.shared,callbacks:m.callbacks},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=s}var ap=!1;function $c(){if(ap){var r=Sl;if(r!==null)throw r}}function qc(r,s,c,m){ap=!1;var E=r.updateQueue;so=!1;var R=E.firstBaseUpdate,P=E.lastBaseUpdate,X=E.shared.pending;if(X!==null){E.shared.pending=null;var re=X,fe=re.next;re.next=null,P===null?R=fe:P.next=fe,P=re;var ye=r.alternate;ye!==null&&(ye=ye.updateQueue,X=ye.lastBaseUpdate,X!==P&&(X===null?ye.firstBaseUpdate=fe:X.next=fe,ye.lastBaseUpdate=re))}if(R!==null){var we=E.baseState;P=0,ye=fe=re=null,X=R;do{var he=X.lane&-536870913,pe=he!==X.lane;if(pe?(wt&he)===he:(m&he)===he){he!==0&&he===xl&&(ap=!0),ye!==null&&(ye=ye.next={lane:0,tag:X.tag,payload:X.payload,callback:null,next:null});e:{var Fe=r,at=X;he=s;var zt=c;switch(at.tag){case 1:if(Fe=at.payload,typeof Fe=="function"){we=Fe.call(zt,we,he);break e}we=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=at.payload,he=typeof Fe=="function"?Fe.call(zt,we,he):Fe,he==null)break e;we=h({},we,he);break e;case 2:so=!0}}he=X.callback,he!==null&&(r.flags|=64,pe&&(r.flags|=8192),pe=E.callbacks,pe===null?E.callbacks=[he]:pe.push(he))}else pe={lane:he,tag:X.tag,payload:X.payload,callback:X.callback,next:null},ye===null?(fe=ye=pe,re=we):ye=ye.next=pe,P|=he;if(X=X.next,X===null){if(X=E.shared.pending,X===null)break;pe=X,X=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);ye===null&&(re=we),E.baseState=re,E.firstBaseUpdate=fe,E.lastBaseUpdate=ye,R===null&&(E.shared.lanes=0),ho|=P,r.lanes=P,r.memoizedState=we}}function jv(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function Ov(r,s){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)jv(c[r],s)}var kl=B(null),Sd=B(0);function Lv(r,s){r=Ts,F(Sd,r),F(kl,s),Ts=r|s.baseLanes}function lp(){F(Sd,Ts),F(kl,kl.current)}function cp(){Ts=Sd.current,H(kl),H(Sd)}var Nr=B(null),ti=null;function lo(r){var s=r.alternate;F(sn,sn.current&1),F(Nr,r),ti===null&&(s===null||kl.current!==null||s.memoizedState!==null)&&(ti=r)}function up(r){F(sn,sn.current),F(Nr,r),ti===null&&(ti=r)}function Iv(r){r.tag===22?(F(sn,sn.current),F(Nr,r),ti===null&&(ti=r)):co()}function co(){F(sn,sn.current),F(Nr,Nr.current)}function Dr(r){H(Nr),ti===r&&(ti=null),H(sn)}var sn=B(0);function wd(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||gm(c)||vm(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var xs=0,ht=null,It=null,un=null,Cd=!1,El=!1,Sa=!1,kd=0,Vc=0,Al=null,ek=0;function en(){throw Error(i(321))}function dp(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!ln(r[c],s[c]))return!1;return!0}function fp(r,s,c,m,E,R){return xs=R,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,G.H=r===null||r.memoizedState===null?y_:Ap,Sa=!1,R=c(m,E),Sa=!1,El&&(R=zv(s,c,m,E)),Bv(r),R}function Bv(r){G.H=Kc;var s=It!==null&&It.next!==null;if(xs=0,un=It=ht=null,Cd=!1,Vc=0,Al=null,s)throw Error(i(300));r===null||dn||(r=r.dependencies,r!==null&&md(r)&&(dn=!0))}function zv(r,s,c,m){ht=r;var E=0;do{if(El&&(Al=null),Vc=0,El=!1,25<=E)throw Error(i(301));if(E+=1,un=It=null,r.updateQueue!=null){var R=r.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}G.H=b_,R=s(c,m)}while(El);return R}function tk(){var r=G.H,s=r.useState()[0];return s=typeof s.then=="function"?Wc(s):s,r=r.useState()[0],(It!==null?It.memoizedState:null)!==r&&(ht.flags|=1024),s}function hp(){var r=kd!==0;return kd=0,r}function pp(r,s,c){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~c}function mp(r){if(Cd){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Cd=!1}xs=0,un=It=ht=null,El=!1,Vc=kd=0,Al=null}function er(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?ht.memoizedState=un=r:un=un.next=r,un}function on(){if(It===null){var r=ht.alternate;r=r!==null?r.memoizedState:null}else r=It.next;var s=un===null?ht.memoizedState:un.next;if(s!==null)un=s,It=r;else{if(r===null)throw ht.alternate===null?Error(i(467)):Error(i(310));It=r,r={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},un===null?ht.memoizedState=un=r:un=un.next=r}return un}function Ed(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wc(r){var s=Vc;return Vc+=1,Al===null&&(Al=[]),r=Rv(Al,r,s),s=ht,(un===null?s.memoizedState:un.next)===null&&(s=s.alternate,G.H=s===null||s.memoizedState===null?y_:Ap),r}function Ad(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Wc(r);if(r.$$typeof===x)return zn(r)}throw Error(i(438,String(r)))}function gp(r){var s=null,c=ht.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var m=ht.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(E){return E.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Ed(),ht.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(r),m=0;m<r;m++)c[m]=O;return s.index++,c}function Ss(r,s){return typeof s=="function"?s(r):s}function Rd(r){var s=on();return vp(s,It,r)}function vp(r,s,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var E=r.baseQueue,R=m.pending;if(R!==null){if(E!==null){var P=E.next;E.next=R.next,R.next=P}s.baseQueue=E=R,m.pending=null}if(R=r.baseState,E===null)r.memoizedState=R;else{s=E.next;var X=P=null,re=null,fe=s,ye=!1;do{var we=fe.lane&-536870913;if(we!==fe.lane?(wt&we)===we:(xs&we)===we){var he=fe.revertLane;if(he===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),we===xl&&(ye=!0);else if((xs&he)===he){fe=fe.next,he===xl&&(ye=!0);continue}else we={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(X=re=we,P=R):re=re.next=we,ht.lanes|=he,ho|=he;we=fe.action,Sa&&c(R,we),R=fe.hasEagerState?fe.eagerState:c(R,we)}else he={lane:we,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(X=re=he,P=R):re=re.next=he,ht.lanes|=we,ho|=we;fe=fe.next}while(fe!==null&&fe!==s);if(re===null?P=R:re.next=X,!ln(R,r.memoizedState)&&(dn=!0,ye&&(c=Sl,c!==null)))throw c;r.memoizedState=R,r.baseState=P,r.baseQueue=re,m.lastRenderedState=R}return E===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function _p(r){var s=on(),c=s.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,E=c.pending,R=s.memoizedState;if(E!==null){c.pending=null;var P=E=E.next;do R=r(R,P.action),P=P.next;while(P!==E);ln(R,s.memoizedState)||(dn=!0),s.memoizedState=R,s.baseQueue===null&&(s.baseState=R),c.lastRenderedState=R}return[R,m]}function Pv(r,s,c){var m=ht,E=on(),R=kt;if(R){if(c===void 0)throw Error(i(407));c=c()}else c=s();var P=!ln((It||E).memoizedState,c);if(P&&(E.memoizedState=c,dn=!0),E=E.queue,xp(Uv.bind(null,m,E,r),[r]),E.getSnapshot!==s||P||un!==null&&un.memoizedState.tag&1){if(m.flags|=2048,Rl(9,{destroy:void 0},Hv.bind(null,m,E,c,s),null),Ht===null)throw Error(i(349));R||(xs&127)!==0||Fv(m,s,c)}return c}function Fv(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=ht.updateQueue,s===null?(s=Ed(),ht.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function Hv(r,s,c,m){s.value=c,s.getSnapshot=m,$v(s)&&qv(r)}function Uv(r,s,c){return c(function(){$v(s)&&qv(r)})}function $v(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!ln(r,c)}catch{return!0}}function qv(r){var s=Jt(r,2);s!==null&&mr(s,r,2)}function yp(r){var s=er();if(typeof r=="function"){var c=r;if(r=c(),Sa){_t(!0);try{c()}finally{_t(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:r},s}function Vv(r,s,c,m){return r.baseState=c,vp(r,It,typeof m=="function"?m:Ss)}function nk(r,s,c,m,E){if(Dd(r))throw Error(i(485));if(r=s.action,r!==null){var R={payload:E,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){R.listeners.push(P)}};G.T!==null?c(!0):R.isTransition=!1,m(R),c=s.pending,c===null?(R.next=s.pending=R,Wv(s,R)):(R.next=c.next,s.pending=c.next=R)}}function Wv(r,s){var c=s.action,m=s.payload,E=r.state;if(s.isTransition){var R=G.T,P={};G.T=P;try{var X=c(E,m),re=G.S;re!==null&&re(P,X),Gv(r,s,X)}catch(fe){bp(r,s,fe)}finally{R!==null&&P.types!==null&&(R.types=P.types),G.T=R}}else try{R=c(E,m),Gv(r,s,R)}catch(fe){bp(r,s,fe)}}function Gv(r,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){Kv(r,s,m)},function(m){return bp(r,s,m)}):Kv(r,s,c)}function Kv(r,s,c){s.status="fulfilled",s.value=c,Yv(s),r.state=c,s=r.pending,s!==null&&(c=s.next,c===s?r.pending=null:(c=c.next,s.next=c,Wv(r,c)))}function bp(r,s,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=c,Yv(s),s=s.next;while(s!==m)}r.action=null}function Yv(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Xv(r,s){return s}function Qv(r,s){if(kt){var c=Ht.formState;if(c!==null){e:{var m=ht;if(kt){if(Vt){t:{for(var E=Vt,R=ei;E.nodeType!==8;){if(!R){E=null;break t}if(E=ni(E.nextSibling),E===null){E=null;break t}}R=E.data,E=R==="F!"||R==="F"?E:null}if(E){Vt=ni(E.nextSibling),m=E.data==="F!";break e}}ro(m)}m=!1}m&&(s=c[0])}}return c=er(),c.memoizedState=c.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xv,lastRenderedState:s},c.queue=m,c=g_.bind(null,ht,m),m.dispatch=c,m=yp(!1),R=Ep.bind(null,ht,!1,m.queue),m=er(),E={state:s,dispatch:null,action:r,pending:null},m.queue=E,c=nk.bind(null,ht,E,R,c),E.dispatch=c,m.memoizedState=r,[s,c,!1]}function Zv(r){var s=on();return Jv(s,It,r)}function Jv(r,s,c){if(s=vp(r,s,Xv)[0],r=Rd(Ss)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Wc(s)}catch(P){throw P===wl?_d:P}else m=s;s=on();var E=s.queue,R=E.dispatch;return c!==s.memoizedState&&(ht.flags|=2048,Rl(9,{destroy:void 0},rk.bind(null,E,c),null)),[m,R,r]}function rk(r,s){r.action=s}function e_(r){var s=on(),c=It;if(c!==null)return Jv(s,c,r);on(),s=s.memoizedState,c=on();var m=c.queue.dispatch;return c.memoizedState=r,[s,m,!1]}function Rl(r,s,c,m){return r={tag:r,create:c,deps:m,inst:s,next:null},s=ht.updateQueue,s===null&&(s=Ed(),ht.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=r.next=r:(m=c.next,c.next=r,r.next=m,s.lastEffect=r),r}function t_(){return on().memoizedState}function Td(r,s,c,m){var E=er();ht.flags|=r,E.memoizedState=Rl(1|s,{destroy:void 0},c,m===void 0?null:m)}function Nd(r,s,c,m){var E=on();m=m===void 0?null:m;var R=E.memoizedState.inst;It!==null&&m!==null&&dp(m,It.memoizedState.deps)?E.memoizedState=Rl(s,R,c,m):(ht.flags|=r,E.memoizedState=Rl(1|s,R,c,m))}function n_(r,s){Td(8390656,8,r,s)}function xp(r,s){Nd(2048,8,r,s)}function ik(r){ht.flags|=4;var s=ht.updateQueue;if(s===null)s=Ed(),ht.updateQueue=s,s.events=[r];else{var c=s.events;c===null?s.events=[r]:c.push(r)}}function r_(r){var s=on().memoizedState;return ik({ref:s,nextImpl:r}),function(){if((Dt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function i_(r,s){return Nd(4,2,r,s)}function s_(r,s){return Nd(4,4,r,s)}function o_(r,s){if(typeof s=="function"){r=r();var c=s(r);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function a_(r,s,c){c=c!=null?c.concat([r]):null,Nd(4,4,o_.bind(null,s,r),c)}function Sp(){}function l_(r,s){var c=on();s=s===void 0?null:s;var m=c.memoizedState;return s!==null&&dp(s,m[1])?m[0]:(c.memoizedState=[r,s],r)}function c_(r,s){var c=on();s=s===void 0?null:s;var m=c.memoizedState;if(s!==null&&dp(s,m[1]))return m[0];if(m=r(),Sa){_t(!0);try{r()}finally{_t(!1)}}return c.memoizedState=[m,s],m}function wp(r,s,c){return c===void 0||(xs&1073741824)!==0&&(wt&261930)===0?r.memoizedState=s:(r.memoizedState=c,r=u0(),ht.lanes|=r,ho|=r,c)}function u_(r,s,c,m){return ln(c,s)?c:kl.current!==null?(r=wp(r,c,m),ln(r,s)||(dn=!0),r):(xs&42)===0||(xs&1073741824)!==0&&(wt&261930)===0?(dn=!0,r.memoizedState=c):(r=u0(),ht.lanes|=r,ho|=r,s)}function d_(r,s,c,m,E){var R=Y.p;Y.p=R!==0&&8>R?R:8;var P=G.T,X={};G.T=X,Ep(r,!1,s,c);try{var re=E(),fe=G.S;if(fe!==null&&fe(X,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var ye=J3(re,m);Gc(r,s,ye,Or(r))}else Gc(r,s,m,Or(r))}catch(we){Gc(r,s,{then:function(){},status:"rejected",reason:we},Or())}finally{Y.p=R,P!==null&&X.types!==null&&(P.types=X.types),G.T=P}}function sk(){}function Cp(r,s,c,m){if(r.tag!==5)throw Error(i(476));var E=f_(r).queue;d_(r,E,s,Q,c===null?sk:function(){return h_(r),c(m)})}function f_(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:Q},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:c},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function h_(r){var s=f_(r);s.next===null&&(s=r.alternate.memoizedState),Gc(r,s.next.queue,{},Or())}function kp(){return zn(uu)}function p_(){return on().memoizedState}function m_(){return on().memoizedState}function ok(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var c=Or();r=oo(c);var m=ao(s,r,c);m!==null&&(mr(m,s,c),Uc(m,s,c)),s={cache:ep()},r.payload=s;return}s=s.return}}function ak(r,s,c){var m=Or();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Dd(r)?v_(s,c):(c=In(r,s,c,m),c!==null&&(mr(c,r,m),__(c,s,m)))}function g_(r,s,c){var m=Or();Gc(r,s,c,m)}function Gc(r,s,c,m){var E={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Dd(r))v_(s,E);else{var R=r.alternate;if(r.lanes===0&&(R===null||R.lanes===0)&&(R=s.lastRenderedReducer,R!==null))try{var P=s.lastRenderedState,X=R(P,c);if(E.hasEagerState=!0,E.eagerState=X,ln(X,P))return rn(r,s,E,0),Ht===null&&At(),!1}catch{}finally{}if(c=In(r,s,E,m),c!==null)return mr(c,r,m),__(c,s,m),!0}return!1}function Ep(r,s,c,m){if(m={lane:2,revertLane:im(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Dd(r)){if(s)throw Error(i(479))}else s=In(r,c,m,2),s!==null&&mr(s,r,2)}function Dd(r){var s=r.alternate;return r===ht||s!==null&&s===ht}function v_(r,s){El=Cd=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function __(r,s,c){if((c&4194048)!==0){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,ci(r,c)}}var Kc={readContext:zn,use:Ad,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};Kc.useEffectEvent=en;var y_={readContext:zn,use:Ad,useCallback:function(r,s){return er().memoizedState=[r,s===void 0?null:s],r},useContext:zn,useEffect:n_,useImperativeHandle:function(r,s,c){c=c!=null?c.concat([r]):null,Td(4194308,4,o_.bind(null,s,r),c)},useLayoutEffect:function(r,s){return Td(4194308,4,r,s)},useInsertionEffect:function(r,s){Td(4,2,r,s)},useMemo:function(r,s){var c=er();s=s===void 0?null:s;var m=r();if(Sa){_t(!0);try{r()}finally{_t(!1)}}return c.memoizedState=[m,s],m},useReducer:function(r,s,c){var m=er();if(c!==void 0){var E=c(s);if(Sa){_t(!0);try{c(s)}finally{_t(!1)}}}else E=s;return m.memoizedState=m.baseState=E,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:E},m.queue=r,r=r.dispatch=ak.bind(null,ht,r),[m.memoizedState,r]},useRef:function(r){var s=er();return r={current:r},s.memoizedState=r},useState:function(r){r=yp(r);var s=r.queue,c=g_.bind(null,ht,s);return s.dispatch=c,[r.memoizedState,c]},useDebugValue:Sp,useDeferredValue:function(r,s){var c=er();return wp(c,r,s)},useTransition:function(){var r=yp(!1);return r=d_.bind(null,ht,r.queue,!0,!1),er().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,c){var m=ht,E=er();if(kt){if(c===void 0)throw Error(i(407));c=c()}else{if(c=s(),Ht===null)throw Error(i(349));(wt&127)!==0||Fv(m,s,c)}E.memoizedState=c;var R={value:c,getSnapshot:s};return E.queue=R,n_(Uv.bind(null,m,R,r),[r]),m.flags|=2048,Rl(9,{destroy:void 0},Hv.bind(null,m,R,c,s),null),c},useId:function(){var r=er(),s=Ht.identifierPrefix;if(kt){var c=Tr,m=kn;c=(m&~(1<<32-_e(m)-1)).toString(32)+c,s="_"+s+"R_"+c,c=kd++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=ek++,s="_"+s+"r_"+c.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:kp,useFormState:Qv,useActionState:Qv,useOptimistic:function(r){var s=er();s.memoizedState=s.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Ep.bind(null,ht,!0,c),c.dispatch=s,[r,s]},useMemoCache:gp,useCacheRefresh:function(){return er().memoizedState=ok.bind(null,ht)},useEffectEvent:function(r){var s=er(),c={impl:r};return s.memoizedState=c,function(){if((Dt&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},Ap={readContext:zn,use:Ad,useCallback:l_,useContext:zn,useEffect:xp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:Rd,useRef:t_,useState:function(){return Rd(Ss)},useDebugValue:Sp,useDeferredValue:function(r,s){var c=on();return u_(c,It.memoizedState,r,s)},useTransition:function(){var r=Rd(Ss)[0],s=on().memoizedState;return[typeof r=="boolean"?r:Wc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:kp,useFormState:Zv,useActionState:Zv,useOptimistic:function(r,s){var c=on();return Vv(c,It,r,s)},useMemoCache:gp,useCacheRefresh:m_};Ap.useEffectEvent=r_;var b_={readContext:zn,use:Ad,useCallback:l_,useContext:zn,useEffect:xp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:_p,useRef:t_,useState:function(){return _p(Ss)},useDebugValue:Sp,useDeferredValue:function(r,s){var c=on();return It===null?wp(c,r,s):u_(c,It.memoizedState,r,s)},useTransition:function(){var r=_p(Ss)[0],s=on().memoizedState;return[typeof r=="boolean"?r:Wc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:kp,useFormState:e_,useActionState:e_,useOptimistic:function(r,s){var c=on();return It!==null?Vv(c,It,r,s):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:gp,useCacheRefresh:m_};b_.useEffectEvent=r_;function Rp(r,s,c,m){s=r.memoizedState,c=c(m,s),c=c==null?s:h({},s,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var Tp={enqueueSetState:function(r,s,c){r=r._reactInternals;var m=Or(),E=oo(m);E.payload=s,c!=null&&(E.callback=c),s=ao(r,E,m),s!==null&&(mr(s,r,m),Uc(s,r,m))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var m=Or(),E=oo(m);E.tag=1,E.payload=s,c!=null&&(E.callback=c),s=ao(r,E,m),s!==null&&(mr(s,r,m),Uc(s,r,m))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=Or(),m=oo(c);m.tag=2,s!=null&&(m.callback=s),s=ao(r,m,c),s!==null&&(mr(s,r,c),Uc(s,r,c))}};function x_(r,s,c,m,E,R,P){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,R,P):s.prototype&&s.prototype.isPureReactComponent?!cr(c,m)||!cr(E,R):!0}function S_(r,s,c,m){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==r&&Tp.enqueueReplaceState(s,s.state,null)}function wa(r,s){var c=s;if("ref"in s){c={};for(var m in s)m!=="ref"&&(c[m]=s[m])}if(r=r.defaultProps){c===s&&(c=h({},c));for(var E in r)c[E]===void 0&&(c[E]=r[E])}return c}function w_(r){ot(r)}function C_(r){console.error(r)}function k_(r){ot(r)}function Md(r,s){try{var c=r.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function E_(r,s,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Np(r,s,c){return c=oo(c),c.tag=3,c.payload={element:null},c.callback=function(){Md(r,s)},c}function A_(r){return r=oo(r),r.tag=3,r}function R_(r,s,c,m){var E=c.type.getDerivedStateFromError;if(typeof E=="function"){var R=m.value;r.payload=function(){return E(R)},r.callback=function(){E_(s,c,m)}}var P=c.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(r.callback=function(){E_(s,c,m),typeof E!="function"&&(po===null?po=new Set([this]):po.add(this));var X=m.stack;this.componentDidCatch(m.value,{componentStack:X!==null?X:""})})}function lk(r,s,c,m,E){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=c.alternate,s!==null&&bl(s,c,E,!0),c=Nr.current,c!==null){switch(c.tag){case 31:case 13:return ti===null?qd():c.alternate===null&&tn===0&&(tn=3),c.flags&=-257,c.flags|=65536,c.lanes=E,m===yd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([m]):s.add(m),tm(r,m,E)),!1;case 22:return c.flags|=65536,m===yd?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([m]):c.add(m)),tm(r,m,E)),!1}throw Error(i(435,c.tag))}return tm(r,m,E),qd(),!1}if(kt)return s=Nr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,m!==Yh&&(r=Error(i(422),{cause:m}),Bc(_n(r,c)))):(m!==Yh&&(s=Error(i(423),{cause:m}),Bc(_n(s,c))),r=r.current.alternate,r.flags|=65536,E&=-E,r.lanes|=E,m=_n(m,c),E=Np(r.stateNode,m,E),op(r,E),tn!==4&&(tn=2)),!1;var R=Error(i(520),{cause:m});if(R=_n(R,c),nu===null?nu=[R]:nu.push(R),tn!==4&&(tn=2),s===null)return!0;m=_n(m,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,r=E&-E,c.lanes|=r,r=Np(c.stateNode,m,r),op(c,r),!1;case 1:if(s=c.type,R=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(po===null||!po.has(R))))return c.flags|=65536,E&=-E,c.lanes|=E,E=A_(E),R_(E,r,c,m),op(c,E),!1}c=c.return}while(c!==null);return!1}var Dp=Error(i(461)),dn=!1;function Pn(r,s,c,m){s.child=r===null?Mv(s,null,c,m):xa(s,r.child,c,m)}function T_(r,s,c,m,E){c=c.render;var R=s.ref;if("ref"in m){var P={};for(var X in m)X!=="ref"&&(P[X]=m[X])}else P=m;return va(s),m=fp(r,s,c,P,R,E),X=hp(),r!==null&&!dn?(pp(r,s,E),ws(r,s,E)):(kt&&X&&Gh(s),s.flags|=1,Pn(r,s,m,E),s.child)}function N_(r,s,c,m,E){if(r===null){var R=c.type;return typeof R=="function"&&!$i(R)&&R.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=R,D_(r,s,R,m,E)):(r=xi(c.type,null,m,s,s.mode,E),r.ref=s.ref,r.return=s,s.child=r)}if(R=r.child,!Pp(r,E)){var P=R.memoizedProps;if(c=c.compare,c=c!==null?c:cr,c(P,m)&&r.ref===s.ref)return ws(r,s,E)}return s.flags|=1,r=Wn(R,m),r.ref=s.ref,r.return=s,s.child=r}function D_(r,s,c,m,E){if(r!==null){var R=r.memoizedProps;if(cr(R,m)&&r.ref===s.ref)if(dn=!1,s.pendingProps=m=R,Pp(r,E))(r.flags&131072)!==0&&(dn=!0);else return s.lanes=r.lanes,ws(r,s,E)}return Mp(r,s,c,m,E)}function M_(r,s,c,m){var E=m.children,R=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(R=R!==null?R.baseLanes|c:c,r!==null){for(m=s.child=r.child,E=0;m!==null;)E=E|m.lanes|m.childLanes,m=m.sibling;m=E&~R}else m=0,s.child=null;return j_(r,s,R,c,m)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&vd(s,R!==null?R.cachePool:null),R!==null?Lv(s,R):lp(),Iv(s);else return m=s.lanes=536870912,j_(r,s,R!==null?R.baseLanes|c:c,c,m)}else R!==null?(vd(s,R.cachePool),Lv(s,R),co(),s.memoizedState=null):(r!==null&&vd(s,null),lp(),co());return Pn(r,s,E,c),s.child}function Yc(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function j_(r,s,c,m,E){var R=np();return R=R===null?null:{parent:cn._currentValue,pool:R},s.memoizedState={baseLanes:c,cachePool:R},r!==null&&vd(s,null),lp(),Iv(s),r!==null&&bl(r,s,m,!0),s.childLanes=E,null}function jd(r,s){return s=Ld({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function O_(r,s,c){return xa(s,r.child,null,c),r=jd(s,s.pendingProps),r.flags|=2,Dr(s),s.memoizedState=null,r}function ck(r,s,c){var m=s.pendingProps,E=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(kt){if(m.mode==="hidden")return r=jd(s,m),s.lanes=536870912,Yc(null,r);if(up(s),(r=Vt)?(r=W0(r,ei),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Lt!==null?{id:kn,overflow:Tr}:null,retryLane:536870912,hydrationErrors:null},c=vs(r),c.return=s,s.child=c,Bn=s,Vt=null)):r=null,r===null)throw ro(s);return s.lanes=536870912,null}return jd(s,m)}var R=r.memoizedState;if(R!==null){var P=R.dehydrated;if(up(s),E)if(s.flags&256)s.flags&=-257,s=O_(r,s,c);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(dn||bl(r,s,c,!1),E=(c&r.childLanes)!==0,dn||E){if(m=Ht,m!==null&&(P=$r(m,c),P!==0&&P!==R.retryLane))throw R.retryLane=P,Jt(r,P),mr(m,r,P),Dp;qd(),s=O_(r,s,c)}else r=R.treeContext,Vt=ni(P.nextSibling),Bn=s,kt=!0,no=null,ei=!1,r!==null&&bv(s,r),s=jd(s,m),s.flags|=4096;return s}return r=Wn(r.child,{mode:m.mode,children:m.children}),r.ref=s.ref,s.child=r,r.return=s,r}function Od(r,s){var c=s.ref;if(c===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(i(284));(r===null||r.ref!==c)&&(s.flags|=4194816)}}function Mp(r,s,c,m,E){return va(s),c=fp(r,s,c,m,void 0,E),m=hp(),r!==null&&!dn?(pp(r,s,E),ws(r,s,E)):(kt&&m&&Gh(s),s.flags|=1,Pn(r,s,c,E),s.child)}function L_(r,s,c,m,E,R){return va(s),s.updateQueue=null,c=zv(s,m,c,E),Bv(r),m=hp(),r!==null&&!dn?(pp(r,s,R),ws(r,s,R)):(kt&&m&&Gh(s),s.flags|=1,Pn(r,s,c,R),s.child)}function I_(r,s,c,m,E){if(va(s),s.stateNode===null){var R=Zr,P=c.contextType;typeof P=="object"&&P!==null&&(R=zn(P)),R=new c(m,R),s.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Tp,s.stateNode=R,R._reactInternals=s,R=s.stateNode,R.props=m,R.state=s.memoizedState,R.refs={},ip(s),P=c.contextType,R.context=typeof P=="object"&&P!==null?zn(P):Zr,R.state=s.memoizedState,P=c.getDerivedStateFromProps,typeof P=="function"&&(Rp(s,c,P,m),R.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(P=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),P!==R.state&&Tp.enqueueReplaceState(R,R.state,null),qc(s,m,R,E),$c(),R.state=s.memoizedState),typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(r===null){R=s.stateNode;var X=s.memoizedProps,re=wa(c,X);R.props=re;var fe=R.context,ye=c.contextType;P=Zr,typeof ye=="object"&&ye!==null&&(P=zn(ye));var we=c.getDerivedStateFromProps;ye=typeof we=="function"||typeof R.getSnapshotBeforeUpdate=="function",X=s.pendingProps!==X,ye||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(X||fe!==P)&&S_(s,R,m,P),so=!1;var he=s.memoizedState;R.state=he,qc(s,m,R,E),$c(),fe=s.memoizedState,X||he!==fe||so?(typeof we=="function"&&(Rp(s,c,we,m),fe=s.memoizedState),(re=so||x_(s,c,re,m,he,fe,P))?(ye||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(s.flags|=4194308)):(typeof R.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=fe),R.props=m,R.state=fe,R.context=P,m=re):(typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{R=s.stateNode,sp(r,s),P=s.memoizedProps,ye=wa(c,P),R.props=ye,we=s.pendingProps,he=R.context,fe=c.contextType,re=Zr,typeof fe=="object"&&fe!==null&&(re=zn(fe)),X=c.getDerivedStateFromProps,(fe=typeof X=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==we||he!==re)&&S_(s,R,m,re),so=!1,he=s.memoizedState,R.state=he,qc(s,m,R,E),$c();var pe=s.memoizedState;P!==we||he!==pe||so||r!==null&&r.dependencies!==null&&md(r.dependencies)?(typeof X=="function"&&(Rp(s,c,X,m),pe=s.memoizedState),(ye=so||x_(s,c,ye,m,he,pe,re)||r!==null&&r.dependencies!==null&&md(r.dependencies))?(fe||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(m,pe,re),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(m,pe,re)),typeof R.componentDidUpdate=="function"&&(s.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof R.componentDidUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=pe),R.props=m,R.state=pe,R.context=re,m=ye):(typeof R.componentDidUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),m=!1)}return R=m,Od(r,s),m=(s.flags&128)!==0,R||m?(R=s.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:R.render(),s.flags|=1,r!==null&&m?(s.child=xa(s,r.child,null,E),s.child=xa(s,null,c,E)):Pn(r,s,c,E),s.memoizedState=R.state,r=s.child):r=ws(r,s,E),r}function B_(r,s,c,m){return ma(),s.flags|=256,Pn(r,s,c,m),s.child}var jp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Op(r){return{baseLanes:r,cachePool:Ev()}}function Lp(r,s,c){return r=r!==null?r.childLanes&~c:0,s&&(r|=jr),r}function z_(r,s,c){var m=s.pendingProps,E=!1,R=(s.flags&128)!==0,P;if((P=R)||(P=r!==null&&r.memoizedState===null?!1:(sn.current&2)!==0),P&&(E=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,r===null){if(kt){if(E?lo(s):co(),(r=Vt)?(r=W0(r,ei),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Lt!==null?{id:kn,overflow:Tr}:null,retryLane:536870912,hydrationErrors:null},c=vs(r),c.return=s,s.child=c,Bn=s,Vt=null)):r=null,r===null)throw ro(s);return vm(r)?s.lanes=32:s.lanes=536870912,null}var X=m.children;return m=m.fallback,E?(co(),E=s.mode,X=Ld({mode:"hidden",children:X},E),m=ur(m,E,c,null),X.return=s,m.return=s,X.sibling=m,s.child=X,m=s.child,m.memoizedState=Op(c),m.childLanes=Lp(r,P,c),s.memoizedState=jp,Yc(null,m)):(lo(s),Ip(s,X))}var re=r.memoizedState;if(re!==null&&(X=re.dehydrated,X!==null)){if(R)s.flags&256?(lo(s),s.flags&=-257,s=Bp(r,s,c)):s.memoizedState!==null?(co(),s.child=r.child,s.flags|=128,s=null):(co(),X=m.fallback,E=s.mode,m=Ld({mode:"visible",children:m.children},E),X=ur(X,E,c,null),X.flags|=2,m.return=s,X.return=s,m.sibling=X,s.child=m,xa(s,r.child,null,c),m=s.child,m.memoizedState=Op(c),m.childLanes=Lp(r,P,c),s.memoizedState=jp,s=Yc(null,m));else if(lo(s),vm(X)){if(P=X.nextSibling&&X.nextSibling.dataset,P)var fe=P.dgst;P=fe,m=Error(i(419)),m.stack="",m.digest=P,Bc({value:m,source:null,stack:null}),s=Bp(r,s,c)}else if(dn||bl(r,s,c,!1),P=(c&r.childLanes)!==0,dn||P){if(P=Ht,P!==null&&(m=$r(P,c),m!==0&&m!==re.retryLane))throw re.retryLane=m,Jt(r,m),mr(P,r,m),Dp;gm(X)||qd(),s=Bp(r,s,c)}else gm(X)?(s.flags|=192,s.child=r.child,s=null):(r=re.treeContext,Vt=ni(X.nextSibling),Bn=s,kt=!0,no=null,ei=!1,r!==null&&bv(s,r),s=Ip(s,m.children),s.flags|=4096);return s}return E?(co(),X=m.fallback,E=s.mode,re=r.child,fe=re.sibling,m=Wn(re,{mode:"hidden",children:m.children}),m.subtreeFlags=re.subtreeFlags&65011712,fe!==null?X=Wn(fe,X):(X=ur(X,E,c,null),X.flags|=2),X.return=s,m.return=s,m.sibling=X,s.child=m,Yc(null,m),m=s.child,X=r.child.memoizedState,X===null?X=Op(c):(E=X.cachePool,E!==null?(re=cn._currentValue,E=E.parent!==re?{parent:re,pool:re}:E):E=Ev(),X={baseLanes:X.baseLanes|c,cachePool:E}),m.memoizedState=X,m.childLanes=Lp(r,P,c),s.memoizedState=jp,Yc(r.child,m)):(lo(s),c=r.child,r=c.sibling,c=Wn(c,{mode:"visible",children:m.children}),c.return=s,c.sibling=null,r!==null&&(P=s.deletions,P===null?(s.deletions=[r],s.flags|=16):P.push(r)),s.child=c,s.memoizedState=null,c)}function Ip(r,s){return s=Ld({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Ld(r,s){return r=Jn(22,r,null,s),r.lanes=0,r}function Bp(r,s,c){return xa(s,r.child,null,c),r=Ip(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function P_(r,s,c){r.lanes|=s;var m=r.alternate;m!==null&&(m.lanes|=s),Zh(r.return,s,c)}function zp(r,s,c,m,E,R){var P=r.memoizedState;P===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:E,treeForkCount:R}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=m,P.tail=c,P.tailMode=E,P.treeForkCount=R)}function F_(r,s,c){var m=s.pendingProps,E=m.revealOrder,R=m.tail;m=m.children;var P=sn.current,X=(P&2)!==0;if(X?(P=P&1|2,s.flags|=128):P&=1,F(sn,P),Pn(r,s,m,c),m=kt?Jr:0,!X&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&P_(r,c,s);else if(r.tag===19)P_(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(E){case"forwards":for(c=s.child,E=null;c!==null;)r=c.alternate,r!==null&&wd(r)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),zp(s,!1,E,c,R,m);break;case"backwards":case"unstable_legacy-backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(r=E.alternate,r!==null&&wd(r)===null){s.child=E;break}r=E.sibling,E.sibling=c,c=E,E=r}zp(s,!0,c,null,R,m);break;case"together":zp(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function ws(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),ho|=s.lanes,(c&s.childLanes)===0)if(r!==null){if(bl(r,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,c=Wn(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=Wn(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function Pp(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&md(r)))}function uk(r,s,c){switch(s.tag){case 3:U(s,s.stateNode.containerInfo),io(s,cn,r.memoizedState.cache),ma();break;case 27:case 5:ie(s);break;case 4:U(s,s.stateNode.containerInfo);break;case 10:io(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,up(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(lo(s),s.flags|=128,null):(c&s.child.childLanes)!==0?z_(r,s,c):(lo(s),r=ws(r,s,c),r!==null?r.sibling:null);lo(s);break;case 19:var E=(r.flags&128)!==0;if(m=(c&s.childLanes)!==0,m||(bl(r,s,c,!1),m=(c&s.childLanes)!==0),E){if(m)return F_(r,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),F(sn,sn.current),m)break;return null;case 22:return s.lanes=0,M_(r,s,c,s.pendingProps);case 24:io(s,cn,r.memoizedState.cache)}return ws(r,s,c)}function H_(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps)dn=!0;else{if(!Pp(r,c)&&(s.flags&128)===0)return dn=!1,uk(r,s,c);dn=(r.flags&131072)!==0}else dn=!1,kt&&(s.flags&1048576)!==0&&yv(s,Jr,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(r=ya(s.elementType),s.type=r,typeof r=="function")$i(r)?(m=wa(r,m),s.tag=1,s=I_(null,s,r,m,c)):(s.tag=0,s=Mp(null,s,r,m,c));else{if(r!=null){var E=r.$$typeof;if(E===k){s.tag=11,s=T_(null,s,r,m,c);break e}else if(E===M){s.tag=14,s=N_(null,s,r,m,c);break e}}throw s=V(r)||r,Error(i(306,s,""))}}return s;case 0:return Mp(r,s,s.type,s.pendingProps,c);case 1:return m=s.type,E=wa(m,s.pendingProps),I_(r,s,m,E,c);case 3:e:{if(U(s,s.stateNode.containerInfo),r===null)throw Error(i(387));m=s.pendingProps;var R=s.memoizedState;E=R.element,sp(r,s),qc(s,m,null,c);var P=s.memoizedState;if(m=P.cache,io(s,cn,m),m!==R.cache&&Jh(s,[cn],c,!0),$c(),m=P.element,R.isDehydrated)if(R={element:m,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=R,s.memoizedState=R,s.flags&256){s=B_(r,s,m,c);break e}else if(m!==E){E=_n(Error(i(424)),s),Bc(E),s=B_(r,s,m,c);break e}else{switch(r=s.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Vt=ni(r.firstChild),Bn=s,kt=!0,no=null,ei=!0,c=Mv(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ma(),m===E){s=ws(r,s,c);break e}Pn(r,s,m,c)}s=s.child}return s;case 26:return Od(r,s),r===null?(c=Z0(s.type,null,s.pendingProps,null))?s.memoizedState=c:kt||(c=s.type,r=s.pendingProps,m=Qd(Z.current).createElement(c),m[Nt]=s,m[Zt]=r,Fn(m,c,r),Mt(m),s.stateNode=m):s.memoizedState=Z0(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return ie(s),r===null&&kt&&(m=s.stateNode=Y0(s.type,s.pendingProps,Z.current),Bn=s,ei=!0,E=Vt,_o(s.type)?(_m=E,Vt=ni(m.firstChild)):Vt=E),Pn(r,s,s.pendingProps.children,c),Od(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&kt&&((E=m=Vt)&&(m=Fk(m,s.type,s.pendingProps,ei),m!==null?(s.stateNode=m,Bn=s,Vt=ni(m.firstChild),ei=!1,E=!0):E=!1),E||ro(s)),ie(s),E=s.type,R=s.pendingProps,P=r!==null?r.memoizedProps:null,m=R.children,hm(E,R)?m=null:P!==null&&hm(E,P)&&(s.flags|=32),s.memoizedState!==null&&(E=fp(r,s,tk,null,null,c),uu._currentValue=E),Od(r,s),Pn(r,s,m,c),s.child;case 6:return r===null&&kt&&((r=c=Vt)&&(c=Hk(c,s.pendingProps,ei),c!==null?(s.stateNode=c,Bn=s,Vt=null,r=!0):r=!1),r||ro(s)),null;case 13:return z_(r,s,c);case 4:return U(s,s.stateNode.containerInfo),m=s.pendingProps,r===null?s.child=xa(s,null,m,c):Pn(r,s,m,c),s.child;case 11:return T_(r,s,s.type,s.pendingProps,c);case 7:return Pn(r,s,s.pendingProps,c),s.child;case 8:return Pn(r,s,s.pendingProps.children,c),s.child;case 12:return Pn(r,s,s.pendingProps.children,c),s.child;case 10:return m=s.pendingProps,io(s,s.type,m.value),Pn(r,s,m.children,c),s.child;case 9:return E=s.type._context,m=s.pendingProps.children,va(s),E=zn(E),m=m(E),s.flags|=1,Pn(r,s,m,c),s.child;case 14:return N_(r,s,s.type,s.pendingProps,c);case 15:return D_(r,s,s.type,s.pendingProps,c);case 19:return F_(r,s,c);case 31:return ck(r,s,c);case 22:return M_(r,s,c,s.pendingProps);case 24:return va(s),m=zn(cn),r===null?(E=np(),E===null&&(E=Ht,R=ep(),E.pooledCache=R,R.refCount++,R!==null&&(E.pooledCacheLanes|=c),E=R),s.memoizedState={parent:m,cache:E},ip(s),io(s,cn,E)):((r.lanes&c)!==0&&(sp(r,s),qc(s,null,null,c),$c()),E=r.memoizedState,R=s.memoizedState,E.parent!==m?(E={parent:m,cache:m},s.memoizedState=E,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=E),io(s,cn,m)):(m=R.cache,io(s,cn,m),m!==E.cache&&Jh(s,[cn],c,!0))),Pn(r,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function Cs(r){r.flags|=4}function Fp(r,s,c,m,E){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(E&335544128)===E)if(r.stateNode.complete)r.flags|=8192;else if(p0())r.flags|=8192;else throw ba=yd,rp}else r.flags&=-16777217}function U_(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!ry(s))if(p0())r.flags|=8192;else throw ba=yd,rp}function Id(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?an():536870912,r.lanes|=s,Ml|=s)}function Xc(r,s){if(!kt)switch(r.tailMode){case"hidden":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function Wt(r){var s=r.alternate!==null&&r.alternate.child===r.child,c=0,m=0;if(s)for(var E=r.child;E!==null;)c|=E.lanes|E.childLanes,m|=E.subtreeFlags&65011712,m|=E.flags&65011712,E.return=r,E=E.sibling;else for(E=r.child;E!==null;)c|=E.lanes|E.childLanes,m|=E.subtreeFlags,m|=E.flags,E.return=r,E=E.sibling;return r.subtreeFlags|=m,r.childLanes=c,s}function dk(r,s,c){var m=s.pendingProps;switch(Kh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(s),null;case 1:return Wt(s),null;case 3:return c=s.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),bs(cn),te(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(yl(s)?Cs(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Xh())),Wt(s),null;case 26:var E=s.type,R=s.memoizedState;return r===null?(Cs(s),R!==null?(Wt(s),U_(s,R)):(Wt(s),Fp(s,E,null,m,c))):R?R!==r.memoizedState?(Cs(s),Wt(s),U_(s,R)):(Wt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==m&&Cs(s),Wt(s),Fp(s,E,r,m,c)),null;case 27:if(ae(s),c=Z.current,E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&Cs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Wt(s),null}r=J.current,yl(s)?xv(s):(r=Y0(E,m,c),s.stateNode=r,Cs(s))}return Wt(s),null;case 5:if(ae(s),E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&Cs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Wt(s),null}if(R=J.current,yl(s))xv(s);else{var P=Qd(Z.current);switch(R){case 1:R=P.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:R=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":R=P.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":R=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":R=P.createElement("div"),R.innerHTML="<script><\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof m.is=="string"?P.createElement("select",{is:m.is}):P.createElement("select"),m.multiple?R.multiple=!0:m.size&&(R.size=m.size);break;default:R=typeof m.is=="string"?P.createElement(E,{is:m.is}):P.createElement(E)}}R[Nt]=s,R[Zt]=m;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)R.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===s)break e;for(;P.sibling===null;){if(P.return===null||P.return===s)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}s.stateNode=R;e:switch(Fn(R,E,m),E){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Cs(s)}}return Wt(s),Fp(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,c),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==m&&Cs(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(i(166));if(r=Z.current,yl(s)){if(r=s.stateNode,c=s.memoizedProps,m=null,E=Bn,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}r[Nt]=s,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||z0(r.nodeValue,c)),r||ro(s,!0)}else r=Qd(r).createTextNode(m),r[Nt]=s,s.stateNode=r}return Wt(s),null;case 31:if(c=s.memoizedState,r===null||r.memoizedState!==null){if(m=yl(s),c!==null){if(r===null){if(!m)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Nt]=s}else ma(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Wt(s),r=!1}else c=Xh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return s.flags&256?(Dr(s),s):(Dr(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Wt(s),null;case 13:if(m=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(E=yl(s),m!==null&&m.dehydrated!==null){if(r===null){if(!E)throw Error(i(318));if(E=s.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(i(317));E[Nt]=s}else ma(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Wt(s),E=!1}else E=Xh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=E),E=!0;if(!E)return s.flags&256?(Dr(s),s):(Dr(s),null)}return Dr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=m!==null,r=r!==null&&r.memoizedState!==null,c&&(m=s.child,E=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(E=m.alternate.memoizedState.cachePool.pool),R=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(R=m.memoizedState.cachePool.pool),R!==E&&(m.flags|=2048)),c!==r&&c&&(s.child.flags|=8192),Id(s,s.updateQueue),Wt(s),null);case 4:return te(),r===null&&lm(s.stateNode.containerInfo),Wt(s),null;case 10:return bs(s.type),Wt(s),null;case 19:if(H(sn),m=s.memoizedState,m===null)return Wt(s),null;if(E=(s.flags&128)!==0,R=m.rendering,R===null)if(E)Xc(m,!1);else{if(tn!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(R=wd(r),R!==null){for(s.flags|=128,Xc(m,!1),r=R.updateQueue,s.updateQueue=r,Id(s,r),s.subtreeFlags=0,r=c,c=s.child;c!==null;)gs(c,r),c=c.sibling;return F(sn,sn.current&1|2),kt&&wi(s,m.treeForkCount),s.child}r=r.sibling}m.tail!==null&&it()>Hd&&(s.flags|=128,E=!0,Xc(m,!1),s.lanes=4194304)}else{if(!E)if(r=wd(R),r!==null){if(s.flags|=128,E=!0,r=r.updateQueue,s.updateQueue=r,Id(s,r),Xc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!R.alternate&&!kt)return Wt(s),null}else 2*it()-m.renderingStartTime>Hd&&c!==536870912&&(s.flags|=128,E=!0,Xc(m,!1),s.lanes=4194304);m.isBackwards?(R.sibling=s.child,s.child=R):(r=m.last,r!==null?r.sibling=R:s.child=R,m.last=R)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=it(),r.sibling=null,c=sn.current,F(sn,E?c&1|2:c&1),kt&&wi(s,m.treeForkCount),r):(Wt(s),null);case 22:case 23:return Dr(s),cp(),m=s.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(c&536870912)!==0&&(s.flags&128)===0&&(Wt(s),s.subtreeFlags&6&&(s.flags|=8192)):Wt(s),c=s.updateQueue,c!==null&&Id(s,c.retryQueue),c=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==c&&(s.flags|=2048),r!==null&&H(_a),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),bs(cn),Wt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function fk(r,s){switch(Kh(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return bs(cn),te(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return ae(s),null;case 31:if(s.memoizedState!==null){if(Dr(s),s.alternate===null)throw Error(i(340));ma()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(Dr(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));ma()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(sn),null;case 4:return te(),null;case 10:return bs(s.type),null;case 22:case 23:return Dr(s),cp(),r!==null&&H(_a),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return bs(cn),null;case 25:return null;default:return null}}function $_(r,s){switch(Kh(s),s.tag){case 3:bs(cn),te();break;case 26:case 27:case 5:ae(s);break;case 4:te();break;case 31:s.memoizedState!==null&&Dr(s);break;case 13:Dr(s);break;case 19:H(sn);break;case 10:bs(s.type);break;case 22:case 23:Dr(s),cp(),r!==null&&H(_a);break;case 24:bs(cn)}}function Qc(r,s){try{var c=s.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var E=m.next;c=E;do{if((c.tag&r)===r){m=void 0;var R=c.create,P=c.inst;m=R(),P.destroy=m}c=c.next}while(c!==E)}}catch(X){Ot(s,s.return,X)}}function uo(r,s,c){try{var m=s.updateQueue,E=m!==null?m.lastEffect:null;if(E!==null){var R=E.next;m=R;do{if((m.tag&r)===r){var P=m.inst,X=P.destroy;if(X!==void 0){P.destroy=void 0,E=s;var re=c,fe=X;try{fe()}catch(ye){Ot(E,re,ye)}}}m=m.next}while(m!==R)}}catch(ye){Ot(s,s.return,ye)}}function q_(r){var s=r.updateQueue;if(s!==null){var c=r.stateNode;try{Ov(s,c)}catch(m){Ot(r,r.return,m)}}}function V_(r,s,c){c.props=wa(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){Ot(r,s,m)}}function Zc(r,s){try{var c=r.ref;if(c!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof c=="function"?r.refCleanup=c(m):c.current=m}}catch(E){Ot(r,s,E)}}function Wi(r,s){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(E){Ot(r,s,E)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(E){Ot(r,s,E)}else c.current=null}function W_(r){var s=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(E){Ot(r,r.return,E)}}function Hp(r,s,c){try{var m=r.stateNode;Ok(m,r.type,c,s),m[Zt]=s}catch(E){Ot(r,r.return,E)}}function G_(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&_o(r.type)||r.tag===4}function Up(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||G_(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&_o(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function $p(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(r,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(r),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=or));else if(m!==4&&(m===27&&_o(r.type)&&(c=r.stateNode,s=null),r=r.child,r!==null))for($p(r,s,c),r=r.sibling;r!==null;)$p(r,s,c),r=r.sibling}function Bd(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?c.insertBefore(r,s):c.appendChild(r);else if(m!==4&&(m===27&&_o(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(Bd(r,s,c),r=r.sibling;r!==null;)Bd(r,s,c),r=r.sibling}function K_(r){var s=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);Fn(s,m,c),s[Nt]=r,s[Zt]=c}catch(R){Ot(r,r.return,R)}}var ks=!1,fn=!1,qp=!1,Y_=typeof WeakSet=="function"?WeakSet:Set,En=null;function hk(r,s){if(r=r.containerInfo,dm=sf,r=hs(r),Kr(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var E=m.anchorOffset,R=m.focusNode;m=m.focusOffset;try{c.nodeType,R.nodeType}catch{c=null;break e}var P=0,X=-1,re=-1,fe=0,ye=0,we=r,he=null;t:for(;;){for(var pe;we!==c||E!==0&&we.nodeType!==3||(X=P+E),we!==R||m!==0&&we.nodeType!==3||(re=P+m),we.nodeType===3&&(P+=we.nodeValue.length),(pe=we.firstChild)!==null;)he=we,we=pe;for(;;){if(we===r)break t;if(he===c&&++fe===E&&(X=P),he===R&&++ye===m&&(re=P),(pe=we.nextSibling)!==null)break;we=he,he=we.parentNode}we=pe}c=X===-1||re===-1?null:{start:X,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(fm={focusedElem:r,selectionRange:c},sf=!1,En=s;En!==null;)if(s=En,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,En=r;else for(;En!==null;){switch(s=En,R=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(c=0;c<r.length;c++)E=r[c],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&R!==null){r=void 0,c=s,E=R.memoizedProps,R=R.memoizedState,m=c.stateNode;try{var Fe=wa(c.type,E);r=m.getSnapshotBeforeUpdate(Fe,R),m.__reactInternalSnapshotBeforeUpdate=r}catch(at){Ot(c,c.return,at)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,c=r.nodeType,c===9)mm(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":mm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,En=r;break}En=s.return}}function X_(r,s,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:As(r,c),m&4&&Qc(5,c);break;case 1:if(As(r,c),m&4)if(r=c.stateNode,s===null)try{r.componentDidMount()}catch(P){Ot(c,c.return,P)}else{var E=wa(c.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(E,s,r.__reactInternalSnapshotBeforeUpdate)}catch(P){Ot(c,c.return,P)}}m&64&&q_(c),m&512&&Zc(c,c.return);break;case 3:if(As(r,c),m&64&&(r=c.updateQueue,r!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{Ov(r,s)}catch(P){Ot(c,c.return,P)}}break;case 27:s===null&&m&4&&K_(c);case 26:case 5:As(r,c),s===null&&m&4&&W_(c),m&512&&Zc(c,c.return);break;case 12:As(r,c);break;case 31:As(r,c),m&4&&J_(r,c);break;case 13:As(r,c),m&4&&e0(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=Sk.bind(null,c),Uk(r,c))));break;case 22:if(m=c.memoizedState!==null||ks,!m){s=s!==null&&s.memoizedState!==null||fn,E=ks;var R=fn;ks=m,(fn=s)&&!R?Rs(r,c,(c.subtreeFlags&8772)!==0):As(r,c),ks=E,fn=R}break;case 30:break;default:As(r,c)}}function Q_(r){var s=r.alternate;s!==null&&(r.alternate=null,Q_(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&yr(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Yt=null,dr=!1;function Es(r,s,c){for(c=c.child;c!==null;)Z_(r,s,c),c=c.sibling}function Z_(r,s,c){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(ze,c)}catch{}switch(c.tag){case 26:fn||Wi(c,s),Es(r,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:fn||Wi(c,s);var m=Yt,E=dr;_o(c.type)&&(Yt=c.stateNode,dr=!1),Es(r,s,c),au(c.stateNode),Yt=m,dr=E;break;case 5:fn||Wi(c,s);case 6:if(m=Yt,E=dr,Yt=null,Es(r,s,c),Yt=m,dr=E,Yt!==null)if(dr)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(c.stateNode)}catch(R){Ot(c,s,R)}else try{Yt.removeChild(c.stateNode)}catch(R){Ot(c,s,R)}break;case 18:Yt!==null&&(dr?(r=Yt,q0(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),Fl(r)):q0(Yt,c.stateNode));break;case 4:m=Yt,E=dr,Yt=c.stateNode.containerInfo,dr=!0,Es(r,s,c),Yt=m,dr=E;break;case 0:case 11:case 14:case 15:uo(2,c,s),fn||uo(4,c,s),Es(r,s,c);break;case 1:fn||(Wi(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"&&V_(c,s,m)),Es(r,s,c);break;case 21:Es(r,s,c);break;case 22:fn=(m=fn)||c.memoizedState!==null,Es(r,s,c),fn=m;break;default:Es(r,s,c)}}function J_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Fl(r)}catch(c){Ot(s,s.return,c)}}}function e0(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Fl(r)}catch(c){Ot(s,s.return,c)}}function pk(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Y_),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Y_),s;default:throw Error(i(435,r.tag))}}function zd(r,s){var c=pk(r);s.forEach(function(m){if(!c.has(m)){c.add(m);var E=wk.bind(null,r,m);m.then(E,E)}})}function fr(r,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var E=c[m],R=r,P=s,X=P;e:for(;X!==null;){switch(X.tag){case 27:if(_o(X.type)){Yt=X.stateNode,dr=!1;break e}break;case 5:Yt=X.stateNode,dr=!1;break e;case 3:case 4:Yt=X.stateNode.containerInfo,dr=!0;break e}X=X.return}if(Yt===null)throw Error(i(160));Z_(R,P,E),Yt=null,dr=!1,R=E.alternate,R!==null&&(R.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)t0(s,r),s=s.sibling}var Ci=null;function t0(r,s){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:fr(s,r),hr(r),m&4&&(uo(3,r,r.return),Qc(3,r),uo(5,r,r.return));break;case 1:fr(s,r),hr(r),m&512&&(fn||c===null||Wi(c,c.return)),m&64&&ks&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(c=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=c===null?m:c.concat(m))));break;case 26:var E=Ci;if(fr(s,r),hr(r),m&512&&(fn||c===null||Wi(c,c.return)),m&4){var R=c!==null?c.memoizedState:null;if(m=r.memoizedState,c===null)if(m===null)if(r.stateNode===null){e:{m=r.type,c=r.memoizedProps,E=E.ownerDocument||E;t:switch(m){case"title":R=E.getElementsByTagName("title")[0],(!R||R[$n]||R[Nt]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=E.createElement(m),E.head.insertBefore(R,E.querySelector("head > title"))),Fn(R,m,c),R[Nt]=r,Mt(R),m=R;break e;case"link":var P=ty("link","href",E).get(m+(c.href||""));if(P){for(var X=0;X<P.length;X++)if(R=P[X],R.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&R.getAttribute("rel")===(c.rel==null?null:c.rel)&&R.getAttribute("title")===(c.title==null?null:c.title)&&R.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){P.splice(X,1);break t}}R=E.createElement(m),Fn(R,m,c),E.head.appendChild(R);break;case"meta":if(P=ty("meta","content",E).get(m+(c.content||""))){for(X=0;X<P.length;X++)if(R=P[X],R.getAttribute("content")===(c.content==null?null:""+c.content)&&R.getAttribute("name")===(c.name==null?null:c.name)&&R.getAttribute("property")===(c.property==null?null:c.property)&&R.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&R.getAttribute("charset")===(c.charSet==null?null:c.charSet)){P.splice(X,1);break t}}R=E.createElement(m),Fn(R,m,c),E.head.appendChild(R);break;default:throw Error(i(468,m))}R[Nt]=r,Mt(R),m=R}r.stateNode=m}else ny(E,r.type,r.stateNode);else r.stateNode=ey(E,m,r.memoizedProps);else R!==m?(R===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):R.count--,m===null?ny(E,r.type,r.stateNode):ey(E,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Hp(r,r.memoizedProps,c.memoizedProps)}break;case 27:fr(s,r),hr(r),m&512&&(fn||c===null||Wi(c,c.return)),c!==null&&m&4&&Hp(r,r.memoizedProps,c.memoizedProps);break;case 5:if(fr(s,r),hr(r),m&512&&(fn||c===null||Wi(c,c.return)),r.flags&32){E=r.stateNode;try{hi(E,"")}catch(Fe){Ot(r,r.return,Fe)}}m&4&&r.stateNode!=null&&(E=r.memoizedProps,Hp(r,E,c!==null?c.memoizedProps:E)),m&1024&&(qp=!0);break;case 6:if(fr(s,r),hr(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch(Fe){Ot(r,r.return,Fe)}}break;case 3:if(ef=null,E=Ci,Ci=Zd(s.containerInfo),fr(s,r),Ci=E,hr(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Fl(s.containerInfo)}catch(Fe){Ot(r,r.return,Fe)}qp&&(qp=!1,n0(r));break;case 4:m=Ci,Ci=Zd(r.stateNode.containerInfo),fr(s,r),hr(r),Ci=m;break;case 12:fr(s,r),hr(r);break;case 31:fr(s,r),hr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,zd(r,m)));break;case 13:fr(s,r),hr(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Fd=it()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,zd(r,m)));break;case 22:E=r.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,fe=ks,ye=fn;if(ks=fe||E,fn=ye||re,fr(s,r),fn=ye,ks=fe,hr(r),m&8192)e:for(s=r.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(c===null||re||ks||fn||Ca(r)),c=null,s=r;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(R=re.stateNode,E)P=R.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{X=re.stateNode;var we=re.memoizedProps.style,he=we!=null&&we.hasOwnProperty("display")?we.display:null;X.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Fe){Ot(re,re.return,Fe)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=E?"":re.memoizedProps}catch(Fe){Ot(re,re.return,Fe)}}}else if(s.tag===18){if(c===null){re=s;try{var pe=re.stateNode;E?V0(pe,!0):V0(re.stateNode,!1)}catch(Fe){Ot(re,re.return,Fe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=r.updateQueue,m!==null&&(c=m.retryQueue,c!==null&&(m.retryQueue=null,zd(r,c))));break;case 19:fr(s,r),hr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,zd(r,m)));break;case 30:break;case 21:break;default:fr(s,r),hr(r)}}function hr(r){var s=r.flags;if(s&2){try{for(var c,m=r.return;m!==null;){if(G_(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var E=c.stateNode,R=Up(r);Bd(r,R,E);break;case 5:var P=c.stateNode;c.flags&32&&(hi(P,""),c.flags&=-33);var X=Up(r);Bd(r,X,P);break;case 3:case 4:var re=c.stateNode.containerInfo,fe=Up(r);$p(r,fe,re);break;default:throw Error(i(161))}}catch(ye){Ot(r,r.return,ye)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function n0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;n0(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function As(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)X_(r,s.alternate,s),s=s.sibling}function Ca(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:uo(4,s,s.return),Ca(s);break;case 1:Wi(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&V_(s,s.return,c),Ca(s);break;case 27:au(s.stateNode);case 26:case 5:Wi(s,s.return),Ca(s);break;case 22:s.memoizedState===null&&Ca(s);break;case 30:Ca(s);break;default:Ca(s)}r=r.sibling}}function Rs(r,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,E=r,R=s,P=R.flags;switch(R.tag){case 0:case 11:case 15:Rs(E,R,c),Qc(4,R);break;case 1:if(Rs(E,R,c),m=R,E=m.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(fe){Ot(m,m.return,fe)}if(m=R,E=m.updateQueue,E!==null){var X=m.stateNode;try{var re=E.shared.hiddenCallbacks;if(re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<re.length;E++)jv(re[E],X)}catch(fe){Ot(m,m.return,fe)}}c&&P&64&&q_(R),Zc(R,R.return);break;case 27:K_(R);case 26:case 5:Rs(E,R,c),c&&m===null&&P&4&&W_(R),Zc(R,R.return);break;case 12:Rs(E,R,c);break;case 31:Rs(E,R,c),c&&P&4&&J_(E,R);break;case 13:Rs(E,R,c),c&&P&4&&e0(E,R);break;case 22:R.memoizedState===null&&Rs(E,R,c),Zc(R,R.return);break;case 30:break;default:Rs(E,R,c)}s=s.sibling}}function Vp(r,s){var c=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==c&&(r!=null&&r.refCount++,c!=null&&zc(c))}function Wp(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&zc(r))}function ki(r,s,c,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)r0(r,s,c,m),s=s.sibling}function r0(r,s,c,m){var E=s.flags;switch(s.tag){case 0:case 11:case 15:ki(r,s,c,m),E&2048&&Qc(9,s);break;case 1:ki(r,s,c,m);break;case 3:ki(r,s,c,m),E&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&zc(r)));break;case 12:if(E&2048){ki(r,s,c,m),r=s.stateNode;try{var R=s.memoizedProps,P=R.id,X=R.onPostCommit;typeof X=="function"&&X(P,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(re){Ot(s,s.return,re)}}else ki(r,s,c,m);break;case 31:ki(r,s,c,m);break;case 13:ki(r,s,c,m);break;case 23:break;case 22:R=s.stateNode,P=s.alternate,s.memoizedState!==null?R._visibility&2?ki(r,s,c,m):Jc(r,s):R._visibility&2?ki(r,s,c,m):(R._visibility|=2,Tl(r,s,c,m,(s.subtreeFlags&10256)!==0||!1)),E&2048&&Vp(P,s);break;case 24:ki(r,s,c,m),E&2048&&Wp(s.alternate,s);break;default:ki(r,s,c,m)}}function Tl(r,s,c,m,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var R=r,P=s,X=c,re=m,fe=P.flags;switch(P.tag){case 0:case 11:case 15:Tl(R,P,X,re,E),Qc(8,P);break;case 23:break;case 22:var ye=P.stateNode;P.memoizedState!==null?ye._visibility&2?Tl(R,P,X,re,E):Jc(R,P):(ye._visibility|=2,Tl(R,P,X,re,E)),E&&fe&2048&&Vp(P.alternate,P);break;case 24:Tl(R,P,X,re,E),E&&fe&2048&&Wp(P.alternate,P);break;default:Tl(R,P,X,re,E)}s=s.sibling}}function Jc(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=r,m=s,E=m.flags;switch(m.tag){case 22:Jc(c,m),E&2048&&Vp(m.alternate,m);break;case 24:Jc(c,m),E&2048&&Wp(m.alternate,m);break;default:Jc(c,m)}s=s.sibling}}var eu=8192;function Nl(r,s,c){if(r.subtreeFlags&eu)for(r=r.child;r!==null;)i0(r,s,c),r=r.sibling}function i0(r,s,c){switch(r.tag){case 26:Nl(r,s,c),r.flags&eu&&r.memoizedState!==null&&eE(c,Ci,r.memoizedState,r.memoizedProps);break;case 5:Nl(r,s,c);break;case 3:case 4:var m=Ci;Ci=Zd(r.stateNode.containerInfo),Nl(r,s,c),Ci=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=eu,eu=16777216,Nl(r,s,c),eu=m):Nl(r,s,c));break;default:Nl(r,s,c)}}function s0(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function tu(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];En=m,a0(m,r)}s0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)o0(r),r=r.sibling}function o0(r){switch(r.tag){case 0:case 11:case 15:tu(r),r.flags&2048&&uo(9,r,r.return);break;case 3:tu(r);break;case 12:tu(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Pd(r)):tu(r);break;default:tu(r)}}function Pd(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];En=m,a0(m,r)}s0(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:uo(8,s,s.return),Pd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Pd(s));break;default:Pd(s)}r=r.sibling}}function a0(r,s){for(;En!==null;){var c=En;switch(c.tag){case 0:case 11:case 15:uo(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var m=c.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:zc(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,En=m;else e:for(c=r;En!==null;){m=En;var E=m.sibling,R=m.return;if(Q_(m),m===c){En=null;break e}if(E!==null){E.return=R,En=E;break e}En=R}}}var mk={getCacheForType:function(r){var s=zn(cn),c=s.data.get(r);return c===void 0&&(c=r(),s.data.set(r,c)),c},cacheSignal:function(){return zn(cn).controller.signal}},gk=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Ht=null,yt=null,wt=0,jt=0,Mr=null,fo=!1,Dl=!1,Gp=!1,Ts=0,tn=0,ho=0,ka=0,Kp=0,jr=0,Ml=0,nu=null,pr=null,Yp=!1,Fd=0,l0=0,Hd=1/0,Ud=null,po=null,xn=0,mo=null,jl=null,Ns=0,Xp=0,Qp=null,c0=null,ru=0,Zp=null;function Or(){return(Dt&2)!==0&&wt!==0?wt&-wt:G.T!==null?im():pn()}function u0(){if(jr===0)if((wt&536870912)===0||kt){var r=Ft;Ft<<=1,(Ft&3932160)===0&&(Ft=262144),jr=r}else jr=536870912;return r=Nr.current,r!==null&&(r.flags|=32),jr}function mr(r,s,c){(r===Ht&&(jt===2||jt===9)||r.cancelPendingCommit!==null)&&(Ol(r,0),go(r,wt,jr,!1)),Un(r,c),((Dt&2)===0||r!==Ht)&&(r===Ht&&((Dt&2)===0&&(ka|=c),tn===4&&go(r,wt,jr,!1)),Gi(r))}function d0(r,s,c){if((Dt&6)!==0)throw Error(i(327));var m=!c&&(s&127)===0&&(s&r.expiredLanes)===0||Nn(r,s),E=m?yk(r,s):em(r,s,!0),R=m;do{if(E===0){Dl&&!m&&go(r,s,0,!1);break}else{if(c=r.current.alternate,R&&!vk(c)){E=em(r,s,!1),R=!1;continue}if(E===2){if(R=s,r.errorRecoveryDisabledLanes&R)var P=0;else P=r.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){s=P;e:{var X=r;E=nu;var re=X.current.memoizedState.isDehydrated;if(re&&(Ol(X,P).flags|=256),P=em(X,P,!1),P!==2){if(Gp&&!re){X.errorRecoveryDisabledLanes|=R,ka|=R,E=4;break e}R=pr,pr=E,R!==null&&(pr===null?pr=R:pr.push.apply(pr,R))}E=P}if(R=!1,E!==2)continue}}if(E===1){Ol(r,0),go(r,s,0,!0);break}e:{switch(m=r,R=E,R){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:go(m,s,jr,!fo);break e;case 2:pr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(E=Fd+300-it(),10<E)){if(go(m,s,jr,!fo),Tn(m,0,!0)!==0)break e;Ns=s,m.timeoutHandle=U0(f0.bind(null,m,c,pr,Ud,Yp,s,jr,ka,Ml,fo,R,"Throttled",-0,0),E);break e}f0(m,c,pr,Ud,Yp,s,jr,ka,Ml,fo,R,null,-0,0)}}break}while(!0);Gi(r)}function f0(r,s,c,m,E,R,P,X,re,fe,ye,we,he,pe){if(r.timeoutHandle=-1,we=s.subtreeFlags,we&8192||(we&16785408)===16785408){we={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},i0(s,R,we);var Fe=(R&62914560)===R?Fd-it():(R&4194048)===R?l0-it():0;if(Fe=tE(we,Fe),Fe!==null){Ns=R,r.cancelPendingCommit=Fe(b0.bind(null,r,s,R,c,m,E,P,X,re,ye,we,null,he,pe)),go(r,R,P,!fe);return}}b0(r,s,R,c,m,E,P,X,re)}function vk(r){for(var s=r;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var m=0;m<c.length;m++){var E=c[m],R=E.getSnapshot;E=E.value;try{if(!ln(R(),E))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function go(r,s,c,m){s&=~Kp,s&=~ka,r.suspendedLanes|=s,r.pingedLanes&=~s,m&&(r.warmLanes|=s),m=r.expirationTimes;for(var E=s;0<E;){var R=31-_e(E),P=1<<R;m[R]=-1,E&=~P}c!==0&&rr(r,c,s)}function $d(){return(Dt&6)===0?(iu(0),!1):!0}function Jp(){if(yt!==null){if(jt===0)var r=yt.return;else r=yt,ys=ga=null,mp(r),Cl=null,Fc=0,r=yt;for(;r!==null;)$_(r.alternate,r),r=r.return;yt=null}}function Ol(r,s){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,Bk(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),Ns=0,Jp(),Ht=r,yt=c=Wn(r.current,null),wt=s,jt=0,Mr=null,fo=!1,Dl=Nn(r,s),Gp=!1,Ml=jr=Kp=ka=ho=tn=0,pr=nu=null,Yp=!1,(s&8)!==0&&(s|=s&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=s;0<m;){var E=31-_e(m),R=1<<E;s|=r[E],m&=~R}return Ts=s,At(),c}function h0(r,s){ht=null,G.H=Kc,s===wl||s===_d?(s=Tv(),jt=3):s===rp?(s=Tv(),jt=4):jt=s===Dp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Mr=s,yt===null&&(tn=1,Md(r,_n(s,r.current)))}function p0(){var r=Nr.current;return r===null?!0:(wt&4194048)===wt?ti===null:(wt&62914560)===wt||(wt&536870912)!==0?r===ti:!1}function m0(){var r=G.H;return G.H=Kc,r===null?Kc:r}function g0(){var r=G.A;return G.A=mk,r}function qd(){tn=4,fo||(wt&4194048)!==wt&&Nr.current!==null||(Dl=!0),(ho&134217727)===0&&(ka&134217727)===0||Ht===null||go(Ht,wt,jr,!1)}function em(r,s,c){var m=Dt;Dt|=2;var E=m0(),R=g0();(Ht!==r||wt!==s)&&(Ud=null,Ol(r,s)),s=!1;var P=tn;e:do try{if(jt!==0&&yt!==null){var X=yt,re=Mr;switch(jt){case 8:Jp(),P=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(s=!0);var fe=jt;if(jt=0,Mr=null,Ll(r,X,re,fe),c&&Dl){P=0;break e}break;default:fe=jt,jt=0,Mr=null,Ll(r,X,re,fe)}}_k(),P=tn;break}catch(ye){h0(r,ye)}while(!0);return s&&r.shellSuspendCounter++,ys=ga=null,Dt=m,G.H=E,G.A=R,yt===null&&(Ht=null,wt=0,At()),P}function _k(){for(;yt!==null;)v0(yt)}function yk(r,s){var c=Dt;Dt|=2;var m=m0(),E=g0();Ht!==r||wt!==s?(Ud=null,Hd=it()+500,Ol(r,s)):Dl=Nn(r,s);e:do try{if(jt!==0&&yt!==null){s=yt;var R=Mr;t:switch(jt){case 1:jt=0,Mr=null,Ll(r,s,R,1);break;case 2:case 9:if(Av(R)){jt=0,Mr=null,_0(s);break}s=function(){jt!==2&&jt!==9||Ht!==r||(jt=7),Gi(r)},R.then(s,s);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:Av(R)?(jt=0,Mr=null,_0(s)):(jt=0,Mr=null,Ll(r,s,R,7));break;case 5:var P=null;switch(yt.tag){case 26:P=yt.memoizedState;case 5:case 27:var X=yt;if(P?ry(P):X.stateNode.complete){jt=0,Mr=null;var re=X.sibling;if(re!==null)yt=re;else{var fe=X.return;fe!==null?(yt=fe,Vd(fe)):yt=null}break t}}jt=0,Mr=null,Ll(r,s,R,5);break;case 6:jt=0,Mr=null,Ll(r,s,R,6);break;case 8:Jp(),tn=6;break e;default:throw Error(i(462))}}bk();break}catch(ye){h0(r,ye)}while(!0);return ys=ga=null,G.H=m,G.A=E,Dt=c,yt!==null?0:(Ht=null,wt=0,At(),tn)}function bk(){for(;yt!==null&&!ue();)v0(yt)}function v0(r){var s=H_(r.alternate,r,Ts);r.memoizedProps=r.pendingProps,s===null?Vd(r):yt=s}function _0(r){var s=r,c=s.alternate;switch(s.tag){case 15:case 0:s=L_(c,s,s.pendingProps,s.type,void 0,wt);break;case 11:s=L_(c,s,s.pendingProps,s.type.render,s.ref,wt);break;case 5:mp(s);default:$_(c,s),s=yt=gs(s,Ts),s=H_(c,s,Ts)}r.memoizedProps=r.pendingProps,s===null?Vd(r):yt=s}function Ll(r,s,c,m){ys=ga=null,mp(s),Cl=null,Fc=0;var E=s.return;try{if(lk(r,E,s,c,wt)){tn=1,Md(r,_n(c,r.current)),yt=null;return}}catch(R){if(E!==null)throw yt=E,R;tn=1,Md(r,_n(c,r.current)),yt=null;return}s.flags&32768?(kt||m===1?r=!0:Dl||(wt&536870912)!==0?r=!1:(fo=r=!0,(m===2||m===9||m===3||m===6)&&(m=Nr.current,m!==null&&m.tag===13&&(m.flags|=16384))),y0(s,r)):Vd(s)}function Vd(r){var s=r;do{if((s.flags&32768)!==0){y0(s,fo);return}r=s.return;var c=dk(s.alternate,s,Ts);if(c!==null){yt=c;return}if(s=s.sibling,s!==null){yt=s;return}yt=s=r}while(s!==null);tn===0&&(tn=5)}function y0(r,s){do{var c=fk(r.alternate,r);if(c!==null){c.flags&=32767,yt=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(r=r.sibling,r!==null)){yt=r;return}yt=r=c}while(r!==null);tn=6,yt=null}function b0(r,s,c,m,E,R,P,X,re){r.cancelPendingCommit=null;do Wd();while(xn!==0);if((Dt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(R=s.lanes|s.childLanes,R|=We,li(r,c,R,P,X,re),r===Ht&&(yt=Ht=null,wt=0),jl=s,mo=r,Ns=c,Xp=R,Qp=E,c0=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Ck(ke,function(){return k0(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=G.T,G.T=null,E=Y.p,Y.p=2,P=Dt,Dt|=4;try{hk(r,s,c)}finally{Dt=P,Y.p=E,G.T=m}}xn=1,x0(),S0(),w0()}}function x0(){if(xn===1){xn=0;var r=mo,s=jl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=G.T,G.T=null;var m=Y.p;Y.p=2;var E=Dt;Dt|=4;try{t0(s,r);var R=fm,P=hs(r.containerInfo),X=R.focusedElem,re=R.selectionRange;if(P!==X&&X&&X.ownerDocument&&fs(X.ownerDocument.documentElement,X)){if(re!==null&&Kr(X)){var fe=re.start,ye=re.end;if(ye===void 0&&(ye=fe),"selectionStart"in X)X.selectionStart=fe,X.selectionEnd=Math.min(ye,X.value.length);else{var we=X.ownerDocument||document,he=we&&we.defaultView||window;if(he.getSelection){var pe=he.getSelection(),Fe=X.textContent.length,at=Math.min(re.start,Fe),zt=re.end===void 0?at:Math.min(re.end,Fe);!pe.extend&&at>zt&&(P=zt,zt=at,at=P);var le=bi(X,at),oe=bi(X,zt);if(le&&oe&&(pe.rangeCount!==1||pe.anchorNode!==le.node||pe.anchorOffset!==le.offset||pe.focusNode!==oe.node||pe.focusOffset!==oe.offset)){var de=we.createRange();de.setStart(le.node,le.offset),pe.removeAllRanges(),at>zt?(pe.addRange(de),pe.extend(oe.node,oe.offset)):(de.setEnd(oe.node,oe.offset),pe.addRange(de))}}}}for(we=[],pe=X;pe=pe.parentNode;)pe.nodeType===1&&we.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof X.focus=="function"&&X.focus(),X=0;X<we.length;X++){var Se=we[X];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}sf=!!dm,fm=dm=null}finally{Dt=E,Y.p=m,G.T=c}}r.current=s,xn=2}}function S0(){if(xn===2){xn=0;var r=mo,s=jl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=G.T,G.T=null;var m=Y.p;Y.p=2;var E=Dt;Dt|=4;try{X_(r,s.alternate,s)}finally{Dt=E,Y.p=m,G.T=c}}xn=3}}function w0(){if(xn===4||xn===3){xn=0,ct();var r=mo,s=jl,c=Ns,m=c0;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?xn=5:(xn=0,jl=mo=null,C0(r,r.pendingLanes));var E=r.pendingLanes;if(E===0&&(po=null),qr(c),s=s.stateNode,Ve&&typeof Ve.onCommitFiberRoot=="function")try{Ve.onCommitFiberRoot(ze,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=G.T,E=Y.p,Y.p=2,G.T=null;try{for(var R=r.onRecoverableError,P=0;P<m.length;P++){var X=m[P];R(X.value,{componentStack:X.stack})}}finally{G.T=s,Y.p=E}}(Ns&3)!==0&&Wd(),Gi(r),E=r.pendingLanes,(c&261930)!==0&&(E&42)!==0?r===Zp?ru++:(ru=0,Zp=r):ru=0,iu(0)}}function C0(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,zc(s)))}function Wd(){return x0(),S0(),w0(),k0()}function k0(){if(xn!==5)return!1;var r=mo,s=Xp;Xp=0;var c=qr(Ns),m=G.T,E=Y.p;try{Y.p=32>c?32:c,G.T=null,c=Qp,Qp=null;var R=mo,P=Ns;if(xn=0,jl=mo=null,Ns=0,(Dt&6)!==0)throw Error(i(331));var X=Dt;if(Dt|=4,o0(R.current),r0(R,R.current,P,c),Dt=X,iu(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot=="function")try{Ve.onPostCommitFiberRoot(ze,R)}catch{}return!0}finally{Y.p=E,G.T=m,C0(r,s)}}function E0(r,s,c){s=_n(c,s),s=Np(r.stateNode,s,2),r=ao(r,s,2),r!==null&&(Un(r,2),Gi(r))}function Ot(r,s,c){if(r.tag===3)E0(r,r,c);else for(;s!==null;){if(s.tag===3){E0(s,r,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(po===null||!po.has(m))){r=_n(c,r),c=A_(2),m=ao(s,c,2),m!==null&&(R_(c,m,s,r),Un(m,2),Gi(m));break}}s=s.return}}function tm(r,s,c){var m=r.pingCache;if(m===null){m=r.pingCache=new gk;var E=new Set;m.set(s,E)}else E=m.get(s),E===void 0&&(E=new Set,m.set(s,E));E.has(c)||(Gp=!0,E.add(c),r=xk.bind(null,r,s,c),s.then(r,r))}function xk(r,s,c){var m=r.pingCache;m!==null&&m.delete(s),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,Ht===r&&(wt&c)===c&&(tn===4||tn===3&&(wt&62914560)===wt&&300>it()-Fd?(Dt&2)===0&&Ol(r,0):Kp|=c,Ml===wt&&(Ml=0)),Gi(r)}function A0(r,s){s===0&&(s=an()),r=Jt(r,s),r!==null&&(Un(r,s),Gi(r))}function Sk(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),A0(r,c)}function wk(r,s){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,E=r.memoizedState;E!==null&&(c=E.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(s),A0(r,c)}function Ck(r,s){return Ge(r,s)}var Gd=null,Il=null,nm=!1,Kd=!1,rm=!1,vo=0;function Gi(r){r!==Il&&r.next===null&&(Il===null?Gd=Il=r:Il=Il.next=r),Kd=!0,nm||(nm=!0,Ek())}function iu(r,s){if(!rm&&Kd){rm=!0;do for(var c=!1,m=Gd;m!==null;){if(r!==0){var E=m.pendingLanes;if(E===0)var R=0;else{var P=m.suspendedLanes,X=m.pingedLanes;R=(1<<31-_e(42|r)+1)-1,R&=E&~(P&~X),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(c=!0,D0(m,R))}else R=wt,R=Tn(m,m===Ht?R:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(R&3)===0||Nn(m,R)||(c=!0,D0(m,R));m=m.next}while(c);rm=!1}}function kk(){R0()}function R0(){Kd=nm=!1;var r=0;vo!==0&&Ik()&&(r=vo);for(var s=it(),c=null,m=Gd;m!==null;){var E=m.next,R=T0(m,s);R===0?(m.next=null,c===null?Gd=E:c.next=E,E===null&&(Il=c)):(c=m,(r!==0||(R&3)!==0)&&(Kd=!0)),m=E}xn!==0&&xn!==5||iu(r),vo!==0&&(vo=0)}function T0(r,s){for(var c=r.suspendedLanes,m=r.pingedLanes,E=r.expirationTimes,R=r.pendingLanes&-62914561;0<R;){var P=31-_e(R),X=1<<P,re=E[P];re===-1?((X&c)===0||(X&m)!==0)&&(E[P]=Xt(X,s)):re<=s&&(r.expiredLanes|=X),R&=~X}if(s=Ht,c=wt,c=Tn(r,r===s?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===s&&(jt===2||jt===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&rt(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||Nn(r,c)){if(s=c&-c,s===r.callbackPriority)return s;switch(m!==null&&rt(m),qr(c)){case 2:case 8:c=be;break;case 32:c=ke;break;case 268435456:c=Le;break;default:c=ke}return m=N0.bind(null,r),c=Ge(c,m),r.callbackPriority=s,r.callbackNode=c,s}return m!==null&&m!==null&&rt(m),r.callbackPriority=2,r.callbackNode=null,2}function N0(r,s){if(xn!==0&&xn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Wd()&&r.callbackNode!==c)return null;var m=wt;return m=Tn(r,r===Ht?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(d0(r,m,s),T0(r,it()),r.callbackNode!=null&&r.callbackNode===c?N0.bind(null,r):null)}function D0(r,s){if(Wd())return null;d0(r,s,!0)}function Ek(){zk(function(){(Dt&6)!==0?Ge(ce,kk):R0()})}function im(){if(vo===0){var r=xl;r===0&&(r=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),vo=r}return vo}function M0(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:rs(""+r)}function j0(r,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,r.id&&c.setAttribute("form",r.id),s.parentNode.insertBefore(c,s),r=new FormData(r),c.parentNode.removeChild(c),r}function Ak(r,s,c,m,E){if(s==="submit"&&c&&c.stateNode===E){var R=M0((E[Zt]||null).action),P=m.submitter;P&&(s=(s=P[Zt]||null)?M0(s.formAction):P.getAttribute("formAction"),s!==null&&(R=s,P=null));var X=new as("action","action",null,m,E);r.push({event:X,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(vo!==0){var re=P?j0(E,P):new FormData(E);Cp(c,{pending:!0,data:re,method:E.method,action:R},null,re)}}else typeof R=="function"&&(X.preventDefault(),re=P?j0(E,P):new FormData(E),Cp(c,{pending:!0,data:re,method:E.method,action:R},R,re))},currentTarget:E}]})}}for(var sm=0;sm<Ne.length;sm++){var om=Ne[sm],Rk=om.toLowerCase(),Tk=om[0].toUpperCase()+om.slice(1);tt(Rk,"on"+Tk)}tt(jc,"onAnimationEnd"),tt(Oc,"onAnimationIteration"),tt(Lc,"onAnimationStart"),tt("dblclick","onDoubleClick"),tt("focusin","onFocus"),tt("focusout","onBlur"),tt(fd,"onTransitionRun"),tt(hd,"onTransitionStart"),tt(pd,"onTransitionCancel"),tt(Ic,"onTransitionEnd"),mn("onMouseEnter",["mouseout","mouseover"]),mn("onMouseLeave",["mouseout","mouseover"]),mn("onPointerEnter",["pointerout","pointerover"]),mn("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),Nk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(su));function O0(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],E=m.event;m=m.listeners;e:{var R=void 0;if(s)for(var P=m.length-1;0<=P;P--){var X=m[P],re=X.instance,fe=X.currentTarget;if(X=X.listener,re!==R&&E.isPropagationStopped())break e;R=X,E.currentTarget=fe;try{R(E)}catch(ye){ot(ye)}E.currentTarget=null,R=re}else for(P=0;P<m.length;P++){if(X=m[P],re=X.instance,fe=X.currentTarget,X=X.listener,re!==R&&E.isPropagationStopped())break e;R=X,E.currentTarget=fe;try{R(E)}catch(ye){ot(ye)}E.currentTarget=null,R=re}}}}function bt(r,s){var c=s[Mn];c===void 0&&(c=s[Mn]=new Set);var m=r+"__bubble";c.has(m)||(L0(s,r,2,!1),c.add(m))}function am(r,s,c){var m=0;s&&(m|=4),L0(c,r,m,s)}var Yd="_reactListening"+Math.random().toString(36).slice(2);function lm(r){if(!r[Yd]){r[Yd]=!0,br.forEach(function(c){c!=="selectionchange"&&(Nk.has(c)||am(c,!1,r),am(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Yd]||(s[Yd]=!0,am("selectionchange",!1,s))}}function L0(r,s,c,m){switch(uy(s)){case 2:var E=iE;break;case 8:E=sE;break;default:E=wm}c=E.bind(null,s,c,r),E=void 0,!Ws||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),m?E!==void 0?r.addEventListener(s,c,{capture:!0,passive:E}):r.addEventListener(s,c,!0):E!==void 0?r.addEventListener(s,c,{passive:E}):r.addEventListener(s,c,!1)}function cm(r,s,c,m,E){var R=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var X=m.stateNode.containerInfo;if(X===E)break;if(P===4)for(P=m.return;P!==null;){var re=P.tag;if((re===3||re===4)&&P.stateNode.containerInfo===E)return;P=P.return}for(;X!==null;){if(P=jn(X),P===null)return;if(re=P.tag,re===5||re===6||re===26||re===27){m=R=P;continue e}X=X.parentNode}}m=m.return}Qo(function(){var fe=R,ye=nn(c),we=[];e:{var he=ee.get(r);if(he!==void 0){var pe=as,Fe=r;switch(r){case"keypress":if(ss(c)===0)break e;case"keydown":case"keyup":pe=il;break;case"focusin":Fe="focus",pe=Xs;break;case"focusout":Fe="blur",pe=Xs;break;case"beforeblur":case"afterblur":pe=Xs;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=Ys;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=ta;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=sl;break;case jc:case Oc:case Lc:pe=Za;break;case Ic:pe=ol;break;case"scroll":case"scrollend":pe=Ga;break;case"wheel":pe=al;break;case"copy":case"cut":case"paste":pe=el;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=ra;break;case"toggle":case"beforetoggle":pe=ll}var at=(s&4)!==0,zt=!at&&(r==="scroll"||r==="scrollend"),le=at?he!==null?he+"Capture":null:he;at=[];for(var oe=fe,de;oe!==null;){var Se=oe;if(de=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||de===null||le===null||(Se=Ii(oe,le),Se!=null&&at.push(ou(oe,Se,de))),zt)break;oe=oe.return}0<at.length&&(he=new pe(he,Fe,null,c,ye),we.push({event:he,listeners:at}))}}if((s&7)===0){e:{if(he=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",he&&c!==qs&&(Fe=c.relatedTarget||c.fromElement)&&(jn(Fe)||Fe[Dn]))break e;if((pe||he)&&(he=ye.window===ye?ye:(he=ye.ownerDocument)?he.defaultView||he.parentWindow:window,pe?(Fe=c.relatedTarget||c.toElement,pe=fe,Fe=Fe?jn(Fe):null,Fe!==null&&(zt=l(Fe),at=Fe.tag,Fe!==zt||at!==5&&at!==27&&at!==6)&&(Fe=null)):(pe=null,Fe=fe),pe!==Fe)){if(at=Ys,Se="onMouseLeave",le="onMouseEnter",oe="mouse",(r==="pointerout"||r==="pointerover")&&(at=ra,Se="onPointerLeave",le="onPointerEnter",oe="pointer"),zt=pe==null?he:ir(pe),de=Fe==null?he:ir(Fe),he=new at(Se,oe+"leave",pe,c,ye),he.target=zt,he.relatedTarget=de,Se=null,jn(ye)===fe&&(at=new at(le,oe+"enter",Fe,c,ye),at.target=de,at.relatedTarget=zt,Se=at),zt=Se,pe&&Fe)t:{for(at=Dk,le=pe,oe=Fe,de=0,Se=le;Se;Se=at(Se))de++;Se=0;for(var Je=oe;Je;Je=at(Je))Se++;for(;0<de-Se;)le=at(le),de--;for(;0<Se-de;)oe=at(oe),Se--;for(;de--;){if(le===oe||oe!==null&&le===oe.alternate){at=le;break t}le=at(le),oe=at(oe)}at=null}else at=null;pe!==null&&I0(we,he,pe,at,!1),Fe!==null&&zt!==null&&I0(we,zt,Fe,at,!0)}}e:{if(he=fe?ir(fe):window,pe=he.nodeName&&he.nodeName.toLowerCase(),pe==="select"||pe==="input"&&he.type==="file")var Rt=ca;else if(la(he))if(ml)Rt=eo;else{Rt=vl;var $e=ha}else pe=he.nodeName,!pe||pe.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?fe&&kc(fe.elementType)&&(Rt=ca):Rt=pa;if(Rt&&(Rt=Rt(r,fe))){hl(we,Rt,c,ye);break e}$e&&$e(r,he,fe),r==="focusout"&&fe&&he.type==="number"&&fe.memoizedProps.value!=null&&$s(he,"number",he.value)}switch($e=fe?ir(fe):window,r){case"focusin":(la($e)||$e.contentEditable==="true")&&(kr=$e,Hi=fe,Yr=null);break;case"focusout":Yr=Hi=kr=null;break;case"mousedown":to=!0;break;case"contextmenu":case"mouseup":case"dragend":to=!1,ps(we,c,ye);break;case"selectionchange":if(Fi)break;case"keydown":case"keyup":ps(we,c,ye)}var pt;if(Zs)e:{switch(r){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else vi?aa(r,c)&&(Ct="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ct="onCompositionStart");Ct&&(ul&&c.locale!=="ko"&&(vi||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&vi&&(pt=Zo()):(Cr=ye,Gs="value"in Cr?Cr.value:Cr.textContent,vi=!0)),$e=Xd(fe,Ct),0<$e.length&&(Ct=new Ie(Ct,r,null,c,ye),we.push({event:Ct,listeners:$e}),pt?Ct.data=pt:(pt=dl(c),pt!==null&&(Ct.data=pt)))),(pt=cl?Nc(r,c):fl(r,c))&&(Ct=Xd(fe,"onBeforeInput"),0<Ct.length&&($e=new Ie("onBeforeInput","beforeinput",null,c,ye),we.push({event:$e,listeners:Ct}),$e.data=pt)),Ak(we,r,fe,c,ye)}O0(we,s)})}function ou(r,s,c){return{instance:r,listener:s,currentTarget:c}}function Xd(r,s){for(var c=s+"Capture",m=[];r!==null;){var E=r,R=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||R===null||(E=Ii(r,c),E!=null&&m.unshift(ou(r,E,R)),E=Ii(r,s),E!=null&&m.push(ou(r,E,R))),r.tag===3)return m;r=r.return}return[]}function Dk(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function I0(r,s,c,m,E){for(var R=s._reactName,P=[];c!==null&&c!==m;){var X=c,re=X.alternate,fe=X.stateNode;if(X=X.tag,re!==null&&re===m)break;X!==5&&X!==26&&X!==27||fe===null||(re=fe,E?(fe=Ii(c,R),fe!=null&&P.unshift(ou(c,fe,re))):E||(fe=Ii(c,R),fe!=null&&P.push(ou(c,fe,re)))),c=c.return}P.length!==0&&r.push({event:s,listeners:P})}var Mk=/\r\n?/g,jk=/\u0000|\uFFFD/g;function B0(r){return(typeof r=="string"?r:""+r).replace(Mk,`
49
- `).replace(jk,"")}function z0(r,s){return s=B0(s),B0(r)===s}function Bt(r,s,c,m,E,R){switch(c){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||hi(r,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&hi(r,""+m);break;case"className":Zn(r,"class",m);break;case"tabIndex":Zn(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Zn(r,c,m);break;case"style":Ko(r,m,R);break;case"data":if(s!=="object"){Zn(r,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=rs(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"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 R=="function"&&(c==="formAction"?(s!=="input"&&Bt(r,s,"name",E.name,E,null),Bt(r,s,"formEncType",E.formEncType,E,null),Bt(r,s,"formMethod",E.formMethod,E,null),Bt(r,s,"formTarget",E.formTarget,E,null)):(Bt(r,s,"encType",E.encType,E,null),Bt(r,s,"method",E.method,E,null),Bt(r,s,"target",E.target,E,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=rs(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=or);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(E.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=rs(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":bt("beforetoggle",r),bt("toggle",r),wr(r,"popover",m);break;case"xlinkActuate":sr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":sr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":sr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":sr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":sr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":sr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":sr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":sr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":sr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":wr(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=Wa.get(c)||c,wr(r,c,m))}}function um(r,s,c,m,E,R){switch(c){case"style":Ko(r,m,R);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(E.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?hi(r,m):(typeof m=="number"||typeof m=="bigint")&&hi(r,""+m);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"onClick":m!=null&&(r.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oi.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(E=c.endsWith("Capture"),s=c.slice(2,E?c.length-7:void 0),R=r[Zt]||null,R=R!=null?R[c]:null,typeof R=="function"&&r.removeEventListener(s,R,E),typeof m=="function")){typeof R!="function"&&R!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(s,m,E);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):wr(r,c,m)}}}function Fn(r,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",r),bt("load",r);var m=!1,E=!1,R;for(R in c)if(c.hasOwnProperty(R)){var P=c[R];if(P!=null)switch(R){case"src":m=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Bt(r,s,R,P,c,null)}}E&&Bt(r,s,"srcSet",c.srcSet,c,null),m&&Bt(r,s,"src",c.src,c,null);return;case"input":bt("invalid",r);var X=R=P=E=null,re=null,fe=null;for(m in c)if(c.hasOwnProperty(m)){var ye=c[m];if(ye!=null)switch(m){case"name":E=ye;break;case"type":P=ye;break;case"checked":re=ye;break;case"defaultChecked":fe=ye;break;case"value":R=ye;break;case"defaultValue":X=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(i(137,s));break;default:Bt(r,s,m,ye,c,null)}}Vo(r,R,X,re,fe,P,E,!1);return;case"select":bt("invalid",r),m=P=R=null;for(E in c)if(c.hasOwnProperty(E)&&(X=c[E],X!=null))switch(E){case"value":R=X;break;case"defaultValue":P=X;break;case"multiple":m=X;default:Bt(r,s,E,X,c,null)}s=R,c=P,r.multiple=!!m,s!=null?fi(r,!!m,s,!1):c!=null&&fi(r,!!m,c,!0);return;case"textarea":bt("invalid",r),R=E=m=null;for(P in c)if(c.hasOwnProperty(P)&&(X=c[P],X!=null))switch(P){case"value":m=X;break;case"defaultValue":E=X;break;case"children":R=X;break;case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(91));break;default:Bt(r,s,P,X,c,null)}Go(r,m,E,R);return;case"option":for(re in c)if(c.hasOwnProperty(re)&&(m=c[re],m!=null))switch(re){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Bt(r,s,re,m,c,null)}return;case"dialog":bt("beforetoggle",r),bt("toggle",r),bt("cancel",r),bt("close",r);break;case"iframe":case"object":bt("load",r);break;case"video":case"audio":for(m=0;m<su.length;m++)bt(su[m],r);break;case"image":bt("error",r),bt("load",r);break;case"details":bt("toggle",r);break;case"embed":case"source":case"link":bt("error",r),bt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in c)if(c.hasOwnProperty(fe)&&(m=c[fe],m!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Bt(r,s,fe,m,c,null)}return;default:if(kc(s)){for(ye in c)c.hasOwnProperty(ye)&&(m=c[ye],m!==void 0&&um(r,s,ye,m,c,void 0));return}}for(X in c)c.hasOwnProperty(X)&&(m=c[X],m!=null&&Bt(r,s,X,m,c,null))}function Ok(r,s,c,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,R=null,P=null,X=null,re=null,fe=null,ye=null;for(pe in c){var we=c[pe];if(c.hasOwnProperty(pe)&&we!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":re=we;default:m.hasOwnProperty(pe)||Bt(r,s,pe,null,m,we)}}for(var he in m){var pe=m[he];if(we=c[he],m.hasOwnProperty(he)&&(pe!=null||we!=null))switch(he){case"type":R=pe;break;case"name":E=pe;break;case"checked":fe=pe;break;case"defaultChecked":ye=pe;break;case"value":P=pe;break;case"defaultValue":X=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,s));break;default:pe!==we&&Bt(r,s,he,pe,m,we)}}Us(r,P,X,re,fe,ye,R,E);return;case"select":pe=P=X=he=null;for(R in c)if(re=c[R],c.hasOwnProperty(R)&&re!=null)switch(R){case"value":break;case"multiple":pe=re;default:m.hasOwnProperty(R)||Bt(r,s,R,null,m,re)}for(E in m)if(R=m[E],re=c[E],m.hasOwnProperty(E)&&(R!=null||re!=null))switch(E){case"value":he=R;break;case"defaultValue":X=R;break;case"multiple":P=R;default:R!==re&&Bt(r,s,E,R,m,re)}s=X,c=P,m=pe,he!=null?fi(r,!!c,he,!1):!!m!=!!c&&(s!=null?fi(r,!!c,s,!0):fi(r,!!c,c?[]:"",!1));return;case"textarea":pe=he=null;for(X in c)if(E=c[X],c.hasOwnProperty(X)&&E!=null&&!m.hasOwnProperty(X))switch(X){case"value":break;case"children":break;default:Bt(r,s,X,null,m,E)}for(P in m)if(E=m[P],R=c[P],m.hasOwnProperty(P)&&(E!=null||R!=null))switch(P){case"value":he=E;break;case"defaultValue":pe=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:E!==R&&Bt(r,s,P,E,m,R)}Wo(r,he,pe);return;case"option":for(var Fe in c)if(he=c[Fe],c.hasOwnProperty(Fe)&&he!=null&&!m.hasOwnProperty(Fe))switch(Fe){case"selected":r.selected=!1;break;default:Bt(r,s,Fe,null,m,he)}for(re in m)if(he=m[re],pe=c[re],m.hasOwnProperty(re)&&he!==pe&&(he!=null||pe!=null))switch(re){case"selected":r.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:Bt(r,s,re,he,m,pe)}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 at in c)he=c[at],c.hasOwnProperty(at)&&he!=null&&!m.hasOwnProperty(at)&&Bt(r,s,at,null,m,he);for(fe in m)if(he=m[fe],pe=c[fe],m.hasOwnProperty(fe)&&he!==pe&&(he!=null||pe!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,s));break;default:Bt(r,s,fe,he,m,pe)}return;default:if(kc(s)){for(var zt in c)he=c[zt],c.hasOwnProperty(zt)&&he!==void 0&&!m.hasOwnProperty(zt)&&um(r,s,zt,void 0,m,he);for(ye in m)he=m[ye],pe=c[ye],!m.hasOwnProperty(ye)||he===pe||he===void 0&&pe===void 0||um(r,s,ye,he,m,pe);return}}for(var le in c)he=c[le],c.hasOwnProperty(le)&&he!=null&&!m.hasOwnProperty(le)&&Bt(r,s,le,null,m,he);for(we in m)he=m[we],pe=c[we],!m.hasOwnProperty(we)||he===pe||he==null&&pe==null||Bt(r,s,we,he,m,pe)}function P0(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lk(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var E=c[m],R=E.transferSize,P=E.initiatorType,X=E.duration;if(R&&X&&P0(P)){for(P=0,X=E.responseEnd,m+=1;m<c.length;m++){var re=c[m],fe=re.startTime;if(fe>X)break;var ye=re.transferSize,we=re.initiatorType;ye&&P0(we)&&(re=re.responseEnd,P+=ye*(re<X?1:(X-fe)/(re-fe)))}if(--m,s+=8*(R+P)/(E.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var dm=null,fm=null;function Qd(r){return r.nodeType===9?r:r.ownerDocument}function F0(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H0(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function hm(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var pm=null;function Ik(){var r=window.event;return r&&r.type==="popstate"?r===pm?!1:(pm=r,!0):(pm=null,!1)}var U0=typeof setTimeout=="function"?setTimeout:void 0,Bk=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,zk=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(r){return $0.resolve(null).then(r).catch(Pk)}:U0;function Pk(r){setTimeout(function(){throw r})}function _o(r){return r==="head"}function q0(r,s){var c=s,m=0;do{var E=c.nextSibling;if(r.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(E),Fl(s);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")au(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,au(c);for(var R=c.firstChild;R;){var P=R.nextSibling,X=R.nodeName;R[$n]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&R.rel.toLowerCase()==="stylesheet"||c.removeChild(R),R=P}}else c==="body"&&au(r.ownerDocument.body);c=E}while(c);Fl(s)}function V0(r,s){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function mm(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":mm(c),yr(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function Fk(r,s,c,m){for(;r.nodeType===1;){var E=c;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[$n])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(R=r.getAttribute("rel"),R==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(R!==E.rel||r.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||r.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||r.getAttribute("title")!==(E.title==null?null:E.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(R=r.getAttribute("src"),(R!==(E.src==null?null:E.src)||r.getAttribute("type")!==(E.type==null?null:E.type)||r.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&R&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var R=E.name==null?null:""+E.name;if(E.type==="hidden"&&r.getAttribute("name")===R)return r}else return r;if(r=ni(r.nextSibling),r===null)break}return null}function Hk(r,s,c){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=ni(r.nextSibling),r===null))return null;return r}function W0(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=ni(r.nextSibling),r===null))return null;return r}function gm(r){return r.data==="$?"||r.data==="$~"}function vm(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Uk(r,s){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||c.readyState!=="loading")s();else{var m=function(){s(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function ni(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var _m=null;function G0(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(s===0)return ni(r.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}r=r.nextSibling}return null}function K0(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return r;s--}else c!=="/$"&&c!=="/&"||s++}r=r.previousSibling}return null}function Y0(r,s,c){switch(s=Qd(c),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function au(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);yr(r)}var ri=new Map,X0=new Set;function Zd(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ds=Y.d;Y.d={f:$k,r:qk,D:Vk,C:Wk,L:Gk,m:Kk,X:Xk,S:Yk,M:Qk};function $k(){var r=Ds.f(),s=$d();return r||s}function qk(r){var s=Qn(r);s!==null&&s.tag===5&&s.type==="form"?h_(s):Ds.r(r)}var Bl=typeof document>"u"?null:document;function Q0(r,s,c){var m=Bl;if(m&&typeof s=="string"&&s){var E=Ln(s);E='link[rel="'+r+'"][href="'+E+'"]',typeof c=="string"&&(E+='[crossorigin="'+c+'"]'),X0.has(E)||(X0.add(E),r={rel:r,crossOrigin:c,href:s},m.querySelector(E)===null&&(s=m.createElement("link"),Fn(s,"link",r),Mt(s),m.head.appendChild(s)))}}function Vk(r){Ds.D(r),Q0("dns-prefetch",r,null)}function Wk(r,s){Ds.C(r,s),Q0("preconnect",r,s)}function Gk(r,s,c){Ds.L(r,s,c);var m=Bl;if(m&&r&&s){var E='link[rel="preload"][as="'+Ln(s)+'"]';s==="image"&&c&&c.imageSrcSet?(E+='[imagesrcset="'+Ln(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(E+='[imagesizes="'+Ln(c.imageSizes)+'"]')):E+='[href="'+Ln(r)+'"]';var R=E;switch(s){case"style":R=zl(r);break;case"script":R=Pl(r)}ri.has(R)||(r=h({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:r,as:s},c),ri.set(R,r),m.querySelector(E)!==null||s==="style"&&m.querySelector(lu(R))||s==="script"&&m.querySelector(cu(R))||(s=m.createElement("link"),Fn(s,"link",r),Mt(s),m.head.appendChild(s)))}}function Kk(r,s){Ds.m(r,s);var c=Bl;if(c&&r){var m=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+Ln(m)+'"][href="'+Ln(r)+'"]',R=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Pl(r)}if(!ri.has(R)&&(r=h({rel:"modulepreload",href:r},s),ri.set(R,r),c.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(cu(R)))return}m=c.createElement("link"),Fn(m,"link",r),Mt(m),c.head.appendChild(m)}}}function Yk(r,s,c){Ds.S(r,s,c);var m=Bl;if(m&&r){var E=qn(m).hoistableStyles,R=zl(r);s=s||"default";var P=E.get(R);if(!P){var X={loading:0,preload:null};if(P=m.querySelector(lu(R)))X.loading=5;else{r=h({rel:"stylesheet",href:r,"data-precedence":s},c),(c=ri.get(R))&&ym(r,c);var re=P=m.createElement("link");Mt(re),Fn(re,"link",r),re._p=new Promise(function(fe,ye){re.onload=fe,re.onerror=ye}),re.addEventListener("load",function(){X.loading|=1}),re.addEventListener("error",function(){X.loading|=2}),X.loading|=4,Jd(P,s,m)}P={type:"stylesheet",instance:P,count:1,state:X},E.set(R,P)}}}function Xk(r,s){Ds.X(r,s);var c=Bl;if(c&&r){var m=qn(c).hoistableScripts,E=Pl(r),R=m.get(E);R||(R=c.querySelector(cu(E)),R||(r=h({src:r,async:!0},s),(s=ri.get(E))&&bm(r,s),R=c.createElement("script"),Mt(R),Fn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(E,R))}}function Qk(r,s){Ds.M(r,s);var c=Bl;if(c&&r){var m=qn(c).hoistableScripts,E=Pl(r),R=m.get(E);R||(R=c.querySelector(cu(E)),R||(r=h({src:r,async:!0,type:"module"},s),(s=ri.get(E))&&bm(r,s),R=c.createElement("script"),Mt(R),Fn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(E,R))}}function Z0(r,s,c,m){var E=(E=Z.current)?Zd(E):null;if(!E)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=zl(c.href),c=qn(E).hoistableStyles,m=c.get(s),m||(m={type:"style",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=zl(c.href);var R=qn(E).hoistableStyles,P=R.get(r);if(P||(E=E.ownerDocument||E,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(r,P),(R=E.querySelector(lu(r)))&&!R._p&&(P.instance=R,P.state.loading=5),ri.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},ri.set(r,c),R||Zk(E,r,c,P.state))),s&&m===null)throw Error(i(528,""));return P}if(s&&m!==null)throw Error(i(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Pl(c),c=qn(E).hoistableScripts,m=c.get(s),m||(m={type:"script",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function zl(r){return'href="'+Ln(r)+'"'}function lu(r){return'link[rel="stylesheet"]['+r+"]"}function J0(r){return h({},r,{"data-precedence":r.precedence,precedence:null})}function Zk(r,s,c,m){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=r.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),Fn(s,"link",c),Mt(s),r.head.appendChild(s))}function Pl(r){return'[src="'+Ln(r)+'"]'}function cu(r){return"script[async]"+r}function ey(r,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var m=r.querySelector('style[data-href~="'+Ln(c.href)+'"]');if(m)return s.instance=m,Mt(m),m;var E=h({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Mt(m),Fn(m,"style",E),Jd(m,c.precedence,r),s.instance=m;case"stylesheet":E=zl(c.href);var R=r.querySelector(lu(E));if(R)return s.state.loading|=4,s.instance=R,Mt(R),R;m=J0(c),(E=ri.get(E))&&ym(m,E),R=(r.ownerDocument||r).createElement("link"),Mt(R);var P=R;return P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),Fn(R,"link",m),s.state.loading|=4,Jd(R,c.precedence,r),s.instance=R;case"script":return R=Pl(c.src),(E=r.querySelector(cu(R)))?(s.instance=E,Mt(E),E):(m=c,(E=ri.get(R))&&(m=h({},c),bm(m,E)),r=r.ownerDocument||r,E=r.createElement("script"),Mt(E),Fn(E,"link",m),r.head.appendChild(E),s.instance=E);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,Jd(m,c.precedence,r));return s.instance}function Jd(r,s,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=m.length?m[m.length-1]:null,R=E,P=0;P<m.length;P++){var X=m[P];if(X.dataset.precedence===s)R=X;else if(R!==E)break}R?R.parentNode.insertBefore(r,R.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(r,s.firstChild))}function ym(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function bm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var ef=null;function ty(r,s,c){if(ef===null){var m=new Map,E=ef=new Map;E.set(c,m)}else E=ef,m=E.get(c),m||(m=new Map,E.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),E=0;E<c.length;E++){var R=c[E];if(!(R[$n]||R[Nt]||r==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var P=R.getAttribute(s)||"";P=r+P;var X=m.get(P);X?X.push(R):m.set(P,[R])}}return m}function ny(r,s,c){r=r.ownerDocument||r,r.head.insertBefore(c,s==="title"?r.querySelector("head > title"):null)}function Jk(r,s,c){if(c===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return r=s.disabled,typeof s.precedence=="string"&&r==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ry(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function eE(r,s,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var E=zl(m.href),R=s.querySelector(lu(E));if(R){s=R._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=tf.bind(r),s.then(r,r)),c.state.loading|=4,c.instance=R,Mt(R);return}R=s.ownerDocument||s,m=J0(m),(E=ri.get(E))&&ym(m,E),R=R.createElement("link"),Mt(R);var P=R;P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),Fn(R,"link",m),c.instance=R}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=tf.bind(r),s.addEventListener("load",c),s.addEventListener("error",c))}}var xm=0;function tE(r,s){return r.stylesheets&&r.count===0&&rf(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&rf(r,r.stylesheets),r.unsuspend){var R=r.unsuspend;r.unsuspend=null,R()}},6e4+s);0<r.imgBytes&&xm===0&&(xm=62500*Lk());var E=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&rf(r,r.stylesheets),r.unsuspend)){var R=r.unsuspend;r.unsuspend=null,R()}},(r.imgBytes>xm?50:800)+s);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(E)}}:null}function tf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rf(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var nf=null;function rf(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,nf=new Map,s.forEach(nE,r),nf=null,tf.call(r))}function nE(r,s){if(!(s.state.loading&4)){var c=nf.get(r);if(c)var m=c.get(null);else{c=new Map,nf.set(r,c);for(var E=r.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<E.length;R++){var P=E[R];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(c.set(P.dataset.precedence,P),m=P)}m&&c.set(null,m)}E=s.instance,P=E.getAttribute("data-precedence"),R=c.get(P)||m,R===m&&c.set(null,E),c.set(P,E),this.count++,m=tf.bind(this),E.addEventListener("load",m),E.addEventListener("error",m),R?R.parentNode.insertBefore(E,R.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(E,r.firstChild)),s.state.loading|=4}}var uu={$$typeof:x,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function rE(r,s,c,m,E,R,P,X,re){this.tag=1,this.containerInfo=r,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=Kt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kt(0),this.hiddenUpdates=Kt(null),this.identifierPrefix=m,this.onUncaughtError=E,this.onCaughtError=R,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function iy(r,s,c,m,E,R,P,X,re,fe,ye,we){return r=new rE(r,s,c,P,re,fe,ye,we,X),s=1,R===!0&&(s|=24),R=Jn(3,null,null,s),r.current=R,R.stateNode=r,s=ep(),s.refCount++,r.pooledCache=s,s.refCount++,R.memoizedState={element:m,isDehydrated:c,cache:s},ip(R),r}function sy(r){return r?(r=Zr,r):Zr}function oy(r,s,c,m,E,R){E=sy(E),m.context===null?m.context=E:m.pendingContext=E,m=oo(s),m.payload={element:c},R=R===void 0?null:R,R!==null&&(m.callback=R),c=ao(r,m,s),c!==null&&(mr(c,r,s),Uc(c,r,s))}function ay(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function Sm(r,s){ay(r,s),(r=r.alternate)&&ay(r,s)}function ly(r){if(r.tag===13||r.tag===31){var s=Jt(r,67108864);s!==null&&mr(s,r,67108864),Sm(r,67108864)}}function cy(r){if(r.tag===13||r.tag===31){var s=Or();s=ui(s);var c=Jt(r,s);c!==null&&mr(c,r,s),Sm(r,s)}}var sf=!0;function iE(r,s,c,m){var E=G.T;G.T=null;var R=Y.p;try{Y.p=2,wm(r,s,c,m)}finally{Y.p=R,G.T=E}}function sE(r,s,c,m){var E=G.T;G.T=null;var R=Y.p;try{Y.p=8,wm(r,s,c,m)}finally{Y.p=R,G.T=E}}function wm(r,s,c,m){if(sf){var E=Cm(m);if(E===null)cm(r,s,m,of,c),dy(r,m);else if(aE(E,r,s,c,m))m.stopPropagation();else if(dy(r,m),s&4&&-1<oE.indexOf(r)){for(;E!==null;){var R=Qn(E);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var P=$t(R.pendingLanes);if(P!==0){var X=R;for(X.pendingLanes|=2,X.entangledLanes|=2;P;){var re=1<<31-_e(P);X.entanglements[1]|=re,P&=~re}Gi(R),(Dt&6)===0&&(Hd=it()+500,iu(0))}}break;case 31:case 13:X=Jt(R,2),X!==null&&mr(X,R,2),$d(),Sm(R,2)}if(R=Cm(m),R===null&&cm(r,s,m,of,c),R===E)break;E=R}E!==null&&m.stopPropagation()}else cm(r,s,m,null,c)}}function Cm(r){return r=nn(r),km(r)}var of=null;function km(r){if(of=null,r=jn(r),r!==null){var s=l(r);if(s===null)r=null;else{var c=s.tag;if(c===13){if(r=d(s),r!==null)return r;r=null}else if(c===31){if(r=a(s),r!==null)return r;r=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return of=r,null}function uy(r){switch(r){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ut()){case ce:return 2;case be:return 8;case ke:case je:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Em=!1,yo=null,bo=null,xo=null,du=new Map,fu=new Map,So=[],oE="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 dy(r,s){switch(r){case"focusin":case"focusout":yo=null;break;case"dragenter":case"dragleave":bo=null;break;case"mouseover":case"mouseout":xo=null;break;case"pointerover":case"pointerout":du.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":fu.delete(s.pointerId)}}function hu(r,s,c,m,E,R){return r===null||r.nativeEvent!==R?(r={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:R,targetContainers:[E]},s!==null&&(s=Qn(s),s!==null&&ly(s)),r):(r.eventSystemFlags|=m,s=r.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),r)}function aE(r,s,c,m,E){switch(s){case"focusin":return yo=hu(yo,r,s,c,m,E),!0;case"dragenter":return bo=hu(bo,r,s,c,m,E),!0;case"mouseover":return xo=hu(xo,r,s,c,m,E),!0;case"pointerover":var R=E.pointerId;return du.set(R,hu(du.get(R)||null,r,s,c,m,E)),!0;case"gotpointercapture":return R=E.pointerId,fu.set(R,hu(fu.get(R)||null,r,s,c,m,E)),!0}return!1}function fy(r){var s=jn(r.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=d(c),s!==null){r.blockedOn=s,Cn(r.priority,function(){cy(c)});return}}else if(s===31){if(s=a(c),s!==null){r.blockedOn=s,Cn(r.priority,function(){cy(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function af(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=Cm(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);qs=m,c.target.dispatchEvent(m),qs=null}else return s=Qn(c),s!==null&&ly(s),r.blockedOn=c,!1;s.shift()}return!0}function hy(r,s,c){af(r)&&c.delete(s)}function lE(){Em=!1,yo!==null&&af(yo)&&(yo=null),bo!==null&&af(bo)&&(bo=null),xo!==null&&af(xo)&&(xo=null),du.forEach(hy),fu.forEach(hy)}function lf(r,s){r.blockedOn===s&&(r.blockedOn=null,Em||(Em=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lE)))}var cf=null;function py(r){cf!==r&&(cf=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){cf===r&&(cf=null);for(var s=0;s<r.length;s+=3){var c=r[s],m=r[s+1],E=r[s+2];if(typeof m!="function"){if(km(m||c)===null)continue;break}var R=Qn(c);R!==null&&(r.splice(s,3),s-=3,Cp(R,{pending:!0,data:E,method:c.method,action:m},m,E))}}))}function Fl(r){function s(re){return lf(re,r)}yo!==null&&lf(yo,r),bo!==null&&lf(bo,r),xo!==null&&lf(xo,r),du.forEach(s),fu.forEach(s);for(var c=0;c<So.length;c++){var m=So[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<So.length&&(c=So[0],c.blockedOn===null);)fy(c),c.blockedOn===null&&So.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var E=c[m],R=c[m+1],P=E[Zt]||null;if(typeof R=="function")P||py(c);else if(P){var X=null;if(R&&R.hasAttribute("formAction")){if(E=R,P=R[Zt]||null)X=P.formAction;else if(km(E)!==null)continue}else X=P.action;typeof X=="function"?c[m+1]=X:(c.splice(m,3),m-=3),py(c)}}}function my(){function r(R){R.canIntercept&&R.info==="react-transition"&&R.intercept({handler:function(){return new Promise(function(P){return E=P})},focusReset:"manual",scroll:"manual"})}function s(){E!==null&&(E(),E=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var R=navigation.currentEntry;R&&R.url!=null&&navigation.navigate(R.url,{state:R.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,E=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),E!==null&&(E(),E=null)}}}function Am(r){this._internalRoot=r}uf.prototype.render=Am.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var c=s.current,m=Or();oy(c,m,r,s,null,null)},uf.prototype.unmount=Am.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;oy(r.current,2,null,r,null,null),$d(),s[Dn]=null}};function uf(r){this._internalRoot=r}uf.prototype.unstable_scheduleHydration=function(r){if(r){var s=pn();r={blockedOn:null,target:r,priority:s};for(var c=0;c<So.length&&s!==0&&s<So[c].priority;c++);So.splice(c,0,r),c===0&&fy(r)}};var gy=e.version;if(gy!=="19.2.4")throw Error(i(527,gy,"19.2.4"));Y.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(s),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var cE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var df=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!df.isDisabled&&df.supportsFiber)try{ze=df.inject(cE),Ve=df}catch{}}return mu.createRoot=function(r,s){if(!o(r))throw Error(i(299));var c=!1,m="",E=w_,R=C_,P=k_;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(E=s.onUncaughtError),s.onCaughtError!==void 0&&(R=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=iy(r,1,!1,null,null,c,m,null,E,R,P,my),r[Dn]=s.current,lm(r),new Am(s)},mu.hydrateRoot=function(r,s,c){if(!o(r))throw Error(i(299));var m=!1,E="",R=w_,P=C_,X=k_,re=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(E=c.identifierPrefix),c.onUncaughtError!==void 0&&(R=c.onUncaughtError),c.onCaughtError!==void 0&&(P=c.onCaughtError),c.onRecoverableError!==void 0&&(X=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=iy(r,1,!0,s,c!=null?c:null,m,E,re,R,P,X,my),s.context=sy(null),c=s.current,m=Or(),m=ui(m),E=oo(m),E.callback=null,ao(c,E,m),c=m,s.current.lanes=c,Un(s,c),Gi(s),r[Dn]=s.current,lm(r),new uf(s)},mu.version="19.2.4",mu}var Ey;function yE(){if(Ey)return Nm.exports;Ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Nm.exports=_E(),Nm.exports}var bE=yE();const Ay="jean2-theme",r1="neutral",Lx="system",xE={mode:Lx,scheme:r1,setMode:()=>null,setScheme:()=>null,resolvedMode:"dark"},Ix=D.createContext(xE);function SE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ry(t){return t==="system"?SE():t}function wE(t){const e=localStorage.getItem(Ay);if(!e||!["light","dark","system"].includes(e))return null;const i={mode:e,scheme:r1};return localStorage.setItem(t,JSON.stringify(i)),localStorage.removeItem(Ay),i}function CE({children:t,defaultMode:e=Lx,defaultScheme:n=r1,storageKey:i="jean2-theme-settings",...o}){const[l,d]=D.useState(()=>{const S=wE(i);if(S)return S;const C=localStorage.getItem(i);if(C)try{const w=JSON.parse(C);if(typeof w=="object"&&w!==null&&"mode"in w&&"scheme"in w)return w}catch{}return{mode:e,scheme:n}}),[a,u]=D.useState(()=>Ry(l.mode)),f=D.useCallback((S,C)=>{const w=window.document.documentElement,_=Ry(S);w.classList.remove("light","dark"),w.classList.remove("neutral","ocean","forest","sunset","amethyst"),w.classList.add(_),w.classList.add(C),u(_)},[]);D.useEffect(()=>{f(l.mode,l.scheme)},[l,f]),D.useEffect(()=>{if(l.mode!=="system")return;const S=window.matchMedia("(prefers-color-scheme: dark)"),C=()=>{f(l.mode,l.scheme)};return S.addEventListener("change",C),()=>S.removeEventListener("change",C)},[l.mode,l.scheme,f]);const p=D.useCallback(S=>{const C={...l,mode:S};d(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),h=D.useCallback(S=>{const C={...l,scheme:S};d(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),v={mode:l.mode,scheme:l.scheme,setMode:p,setScheme:h,resolvedMode:a};return g.jsx(Ix.Provider,{...o,value:v,children:t})}const kE=()=>{const t=D.useContext(Ix);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var Om={exports:{}},Lm={};/**
50
- * @license React
51
- * react-compiler-runtime.production.js
52
- *
53
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */var Ty;function EE(){if(Ty)return Lm;Ty=1;var t=th().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Lm.c=function(e){return t.H.useMemoCache(e)},Lm}var Ny;function AE(){return Ny||(Ny=1,Om.exports=EE()),Om.exports}var me=AE();/**
58
- * @license lucide-react v0.577.0 - ISC
59
- *
60
- * This source code is licensed under the ISC license.
61
- * See the LICENSE file in the root directory of this source tree.
62
- */const Bx=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
63
- * @license lucide-react v0.577.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const RE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
68
- * @license lucide-react v0.577.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */const TE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
73
- * @license lucide-react v0.577.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const Dy=t=>{const e=TE(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
78
- * @license lucide-react v0.577.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */var NE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
83
- * @license lucide-react v0.577.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const DE=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
88
- * @license lucide-react v0.577.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const ME=D.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:d,...a},u)=>D.createElement("svg",{ref:u,...NE,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:Bx("lucide",o),...!l&&!DE(a)&&{"aria-hidden":"true"},...a},[...d.map(([f,p])=>D.createElement(f,p)),...Array.isArray(l)?l:[l]]));/**
93
- * @license lucide-react v0.577.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const Be=(t,e)=>{const n=D.forwardRef(({className:i,...o},l)=>D.createElement(ME,{ref:l,iconNode:e,className:Bx(`lucide-${RE(Dy(t))}`,`lucide-${t}`,i),...o}));return n.displayName=Dy(t),n};/**
98
- * @license lucide-react v0.577.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const jE=[["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"}]],OE=Be("archive",jE);/**
103
- * @license lucide-react v0.577.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */const LE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],IE=Be("arrow-left",LE);/**
108
- * @license lucide-react v0.577.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const BE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],zE=Be("bot",BE);/**
113
- * @license lucide-react v0.577.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const PE=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],wg=Be("box",PE);/**
118
- * @license lucide-react v0.577.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const FE=[["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"}]],My=Be("brain",FE);/**
123
- * @license lucide-react v0.577.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const HE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ls=Be("check",HE);/**
128
- * @license lucide-react v0.577.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const UE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lc=Be("chevron-down",UE);/**
133
- * @license lucide-react v0.577.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const $E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qE=Be("chevron-left",$E);/**
138
- * @license lucide-react v0.577.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const VE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ni=Be("chevron-right",VE);/**
143
- * @license lucide-react v0.577.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const WE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],GE=Be("chevron-up",WE);/**
148
- * @license lucide-react v0.577.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const KE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],zx=Be("chevrons-up-down",KE);/**
153
- * @license lucide-react v0.577.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const YE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ru=Be("circle-alert",YE);/**
158
- * @license lucide-react v0.577.0 - ISC
159
- *
160
- * This source code is licensed under the ISC license.
161
- * See the LICENSE file in the root directory of this source tree.
162
- */const XE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Vu=Be("circle-check-big",XE);/**
163
- * @license lucide-react v0.577.0 - ISC
164
- *
165
- * This source code is licensed under the ISC license.
166
- * See the LICENSE file in the root directory of this source tree.
167
- */const QE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ZE=Be("circle-check",QE);/**
168
- * @license lucide-react v0.577.0 - ISC
169
- *
170
- * This source code is licensed under the ISC license.
171
- * See the LICENSE file in the root directory of this source tree.
172
- */const JE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],nh=Be("circle-x",JE);/**
173
- * @license lucide-react v0.577.0 - ISC
174
- *
175
- * This source code is licensed under the ISC license.
176
- * See the LICENSE file in the root directory of this source tree.
177
- */const e4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],t4=Be("circle",e4);/**
178
- * @license lucide-react v0.577.0 - ISC
179
- *
180
- * This source code is licensed under the ISC license.
181
- * See the LICENSE file in the root directory of this source tree.
182
- */const n4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Px=Be("clock",n4);/**
183
- * @license lucide-react v0.577.0 - ISC
184
- *
185
- * This source code is licensed under the ISC license.
186
- * See the LICENSE file in the root directory of this source tree.
187
- */const r4=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],i4=Be("cog",r4);/**
188
- * @license lucide-react v0.577.0 - ISC
189
- *
190
- * This source code is licensed under the ISC license.
191
- * See the LICENSE file in the root directory of this source tree.
192
- */const s4=[["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"}]],Mu=Be("copy",s4);/**
193
- * @license lucide-react v0.577.0 - ISC
194
- *
195
- * This source code is licensed under the ISC license.
196
- * See the LICENSE file in the root directory of this source tree.
197
- */const o4=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],jy=Be("cpu",o4);/**
198
- * @license lucide-react v0.577.0 - ISC
199
- *
200
- * This source code is licensed under the ISC license.
201
- * See the LICENSE file in the root directory of this source tree.
202
- */const a4=[["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"}]],Fx=Be("ellipsis",a4);/**
203
- * @license lucide-react v0.577.0 - ISC
204
- *
205
- * This source code is licensed under the ISC license.
206
- * See the LICENSE file in the root directory of this source tree.
207
- */const l4=[["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"}]],Cg=Be("external-link",l4);/**
208
- * @license lucide-react v0.577.0 - ISC
209
- *
210
- * This source code is licensed under the ISC license.
211
- * See the LICENSE file in the root directory of this source tree.
212
- */const c4=[["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"}]],u4=Be("eye-off",c4);/**
213
- * @license lucide-react v0.577.0 - ISC
214
- *
215
- * This source code is licensed under the ISC license.
216
- * See the LICENSE file in the root directory of this source tree.
217
- */const d4=[["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"}]],f4=Be("eye",d4);/**
218
- * @license lucide-react v0.577.0 - ISC
219
- *
220
- * This source code is licensed under the ISC license.
221
- * See the LICENSE file in the root directory of this source tree.
222
- */const h4=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],p4=Be("file-pen",h4);/**
223
- * @license lucide-react v0.577.0 - ISC
224
- *
225
- * This source code is licensed under the ISC license.
226
- * See the LICENSE file in the root directory of this source tree.
227
- */const m4=[["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"}]],i1=Be("file-text",m4);/**
228
- * @license lucide-react v0.577.0 - ISC
229
- *
230
- * This source code is licensed under the ISC license.
231
- * See the LICENSE file in the root directory of this source tree.
232
- */const g4=[["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"}]],Ki=Be("file",g4);/**
233
- * @license lucide-react v0.577.0 - ISC
234
- *
235
- * This source code is licensed under the ISC license.
236
- * See the LICENSE file in the root directory of this source tree.
237
- */const v4=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],kg=Be("folder-open",v4);/**
238
- * @license lucide-react v0.577.0 - ISC
239
- *
240
- * This source code is licensed under the ISC license.
241
- * See the LICENSE file in the root directory of this source tree.
242
- */const _4=[["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"}]],No=Be("folder",_4);/**
243
- * @license lucide-react v0.577.0 - ISC
244
- *
245
- * This source code is licensed under the ISC license.
246
- * See the LICENSE file in the root directory of this source tree.
247
- */const y4=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],b4=Be("git-branch",y4);/**
248
- * @license lucide-react v0.577.0 - ISC
249
- *
250
- * This source code is licensed under the ISC license.
251
- * See the LICENSE file in the root directory of this source tree.
252
- */const x4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],S4=Be("info",x4);/**
253
- * @license lucide-react v0.577.0 - ISC
254
- *
255
- * This source code is licensed under the ISC license.
256
- * See the LICENSE file in the root directory of this source tree.
257
- */const w4=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],C4=Be("keyboard",w4);/**
258
- * @license lucide-react v0.577.0 - ISC
259
- *
260
- * This source code is licensed under the ISC license.
261
- * See the LICENSE file in the root directory of this source tree.
262
- */const k4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],E4=Be("layout-grid",k4);/**
263
- * @license lucide-react v0.577.0 - ISC
264
- *
265
- * This source code is licensed under the ISC license.
266
- * See the LICENSE file in the root directory of this source tree.
267
- */const A4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],R4=Be("layout-list",A4);/**
268
- * @license lucide-react v0.577.0 - ISC
269
- *
270
- * This source code is licensed under the ISC license.
271
- * See the LICENSE file in the root directory of this source tree.
272
- */const T4=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],N4=Be("link-2",T4);/**
273
- * @license lucide-react v0.577.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- */const D4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zr=Be("loader-circle",D4);/**
278
- * @license lucide-react v0.577.0 - ISC
279
- *
280
- * This source code is licensed under the ISC license.
281
- * See the LICENSE file in the root directory of this source tree.
282
- */const M4=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],j4=Be("lock",M4);/**
283
- * @license lucide-react v0.577.0 - ISC
284
- *
285
- * This source code is licensed under the ISC license.
286
- * See the LICENSE file in the root directory of this source tree.
287
- */const O4=[["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"}]],L4=Be("message-square",O4);/**
288
- * @license lucide-react v0.577.0 - ISC
289
- *
290
- * This source code is licensed under the ISC license.
291
- * See the LICENSE file in the root directory of this source tree.
292
- */const I4=[["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"}]],Hx=Be("minimize-2",I4);/**
293
- * @license lucide-react v0.577.0 - ISC
294
- *
295
- * This source code is licensed under the ISC license.
296
- * See the LICENSE file in the root directory of this source tree.
297
- */const B4=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],z4=Be("monitor",B4);/**
298
- * @license lucide-react v0.577.0 - ISC
299
- *
300
- * This source code is licensed under the ISC license.
301
- * See the LICENSE file in the root directory of this source tree.
302
- */const P4=[["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=Be("moon",P4);/**
303
- * @license lucide-react v0.577.0 - ISC
304
- *
305
- * This source code is licensed under the ISC license.
306
- * See the LICENSE file in the root directory of this source tree.
307
- */const H4=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],U4=Be("palette",H4);/**
308
- * @license lucide-react v0.577.0 - ISC
309
- *
310
- * This source code is licensed under the ISC license.
311
- * See the LICENSE file in the root directory of this source tree.
312
- */const $4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],q4=Be("panel-left",$4);/**
313
- * @license lucide-react v0.577.0 - ISC
314
- *
315
- * This source code is licensed under the ISC license.
316
- * See the LICENSE file in the root directory of this source tree.
317
- */const V4=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Ux=Be("pause",V4);/**
318
- * @license lucide-react v0.577.0 - ISC
319
- *
320
- * This source code is licensed under the ISC license.
321
- * See the LICENSE file in the root directory of this source tree.
322
- */const W4=[["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"}]],G4=Be("pencil",W4);/**
323
- * @license lucide-react v0.577.0 - ISC
324
- *
325
- * This source code is licensed under the ISC license.
326
- * See the LICENSE file in the root directory of this source tree.
327
- */const K4=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Y4=Be("plug-zap",K4);/**
328
- * @license lucide-react v0.577.0 - ISC
329
- *
330
- * This source code is licensed under the ISC license.
331
- * See the LICENSE file in the root directory of this source tree.
332
- */const X4=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Q4=Be("plug",X4);/**
333
- * @license lucide-react v0.577.0 - ISC
334
- *
335
- * This source code is licensed under the ISC license.
336
- * See the LICENSE file in the root directory of this source tree.
337
- */const Z4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],cc=Be("plus",Z4);/**
338
- * @license lucide-react v0.577.0 - ISC
339
- *
340
- * This source code is licensed under the ISC license.
341
- * See the LICENSE file in the root directory of this source tree.
342
- */const J4=[["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"}]],Xl=Be("refresh-cw",J4);/**
343
- * @license lucide-react v0.577.0 - ISC
344
- *
345
- * This source code is licensed under the ISC license.
346
- * See the LICENSE file in the root directory of this source tree.
347
- */const e5=[["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"}]],$x=Be("rotate-ccw",e5);/**
348
- * @license lucide-react v0.577.0 - ISC
349
- *
350
- * This source code is licensed under the ISC license.
351
- * See the LICENSE file in the root directory of this source tree.
352
- */const t5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s1=Be("search",t5);/**
353
- * @license lucide-react v0.577.0 - ISC
354
- *
355
- * This source code is licensed under the ISC license.
356
- * See the LICENSE file in the root directory of this source tree.
357
- */const n5=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],r5=Be("send",n5);/**
358
- * @license lucide-react v0.577.0 - ISC
359
- *
360
- * This source code is licensed under the ISC license.
361
- * See the LICENSE file in the root directory of this source tree.
362
- */const i5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Na=Be("server",i5);/**
363
- * @license lucide-react v0.577.0 - ISC
364
- *
365
- * This source code is licensed under the ISC license.
366
- * See the LICENSE file in the root directory of this source tree.
367
- */const s5=[["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"}]],qx=Be("settings",s5);/**
368
- * @license lucide-react v0.577.0 - ISC
369
- *
370
- * This source code is licensed under the ISC license.
371
- * See the LICENSE file in the root directory of this source tree.
372
- */const o5=[["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"}]],Vx=Be("shield",o5);/**
373
- * @license lucide-react v0.577.0 - ISC
374
- *
375
- * This source code is licensed under the ISC license.
376
- * See the LICENSE file in the root directory of this source tree.
377
- */const a5=[["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"}]],Oy=Be("square-terminal",a5);/**
378
- * @license lucide-react v0.577.0 - ISC
379
- *
380
- * This source code is licensed under the ISC license.
381
- * See the LICENSE file in the root directory of this source tree.
382
- */const l5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Wx=Be("square",l5);/**
383
- * @license lucide-react v0.577.0 - ISC
384
- *
385
- * This source code is licensed under the ISC license.
386
- * See the LICENSE file in the root directory of this source tree.
387
- */const c5=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ly=Be("star",c5);/**
388
- * @license lucide-react v0.577.0 - ISC
389
- *
390
- * This source code is licensed under the ISC license.
391
- * See the LICENSE file in the root directory of this source tree.
392
- */const u5=[["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"}]],d5=Be("sun",u5);/**
393
- * @license lucide-react v0.577.0 - ISC
394
- *
395
- * This source code is licensed under the ISC license.
396
- * See the LICENSE file in the root directory of this source tree.
397
- */const f5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Iy=Be("terminal",f5);/**
398
- * @license lucide-react v0.577.0 - ISC
399
- *
400
- * This source code is licensed under the ISC license.
401
- * See the LICENSE file in the root directory of this source tree.
402
- */const h5=[["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"}]],uc=Be("trash-2",h5);/**
403
- * @license lucide-react v0.577.0 - ISC
404
- *
405
- * This source code is licensed under the ISC license.
406
- * See the LICENSE file in the root directory of this source tree.
407
- */const p5=[["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"}]],ju=Be("triangle-alert",p5);/**
408
- * @license lucide-react v0.577.0 - ISC
409
- *
410
- * This source code is licensed under the ISC license.
411
- * See the LICENSE file in the root directory of this source tree.
412
- */const m5=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],g5=Be("undo-2",m5);/**
413
- * @license lucide-react v0.577.0 - ISC
414
- *
415
- * This source code is licensed under the ISC license.
416
- * See the LICENSE file in the root directory of this source tree.
417
- */const v5=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],_5=Be("unplug",v5);/**
418
- * @license lucide-react v0.577.0 - ISC
419
- *
420
- * This source code is licensed under the ISC license.
421
- * See the LICENSE file in the root directory of this source tree.
422
- */const y5=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Gx=Be("user",y5);/**
423
- * @license lucide-react v0.577.0 - ISC
424
- *
425
- * This source code is licensed under the ISC license.
426
- * See the LICENSE file in the root directory of this source tree.
427
- */const b5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],x5=Be("volume-2",b5);/**
428
- * @license lucide-react v0.577.0 - ISC
429
- *
430
- * This source code is licensed under the ISC license.
431
- * See the LICENSE file in the root directory of this source tree.
432
- */const S5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],w5=Be("volume-x",S5);/**
433
- * @license lucide-react v0.577.0 - ISC
434
- *
435
- * This source code is licensed under the ISC license.
436
- * See the LICENSE file in the root directory of this source tree.
437
- */const C5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Kx=Be("wifi-off",C5);/**
438
- * @license lucide-react v0.577.0 - ISC
439
- *
440
- * This source code is licensed under the ISC license.
441
- * See the LICENSE file in the root directory of this source tree.
442
- */const k5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],E5=Be("wifi",k5);/**
443
- * @license lucide-react v0.577.0 - ISC
444
- *
445
- * This source code is licensed under the ISC license.
446
- * See the LICENSE file in the root directory of this source tree.
447
- */const A5=[["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"}]],R5=Be("wrench",A5);/**
448
- * @license lucide-react v0.577.0 - ISC
449
- *
450
- * This source code is licensed under the ISC license.
451
- * See the LICENSE file in the root directory of this source tree.
452
- */const T5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Os=Be("x",T5);/**
453
- * @license lucide-react v0.577.0 - ISC
454
- *
455
- * This source code is licensed under the ISC license.
456
- * See the LICENSE file in the root directory of this source tree.
457
- */const N5=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Im=Be("zap",N5);function D5(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function o1(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var By;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(By||(By={}));async function M5(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await o1("plugin:event|unlisten",{event:t,eventId:e})}async function zy(t,e,n){var i;const o=(i=void 0)!==null&&i!==void 0?i:{kind:"Any"};return o1("plugin:event|listen",{event:t,target:o,handler:D5(e)}).then(l=>async()=>M5(t,l))}const Pr={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function js(){try{const t=localStorage.getItem(Pr.SERVERS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading saved servers from localStorage:",t),[]}}function j5(t){return js().find(n=>n.id===t)||null}function O5(t){try{const e=js();e.push(t),localStorage.setItem(Pr.SERVERS,JSON.stringify(e))}catch(e){console.error("Error saving server to localStorage:",e)}}function L5(t,e){try{const n=js(),i=n.findIndex(o=>o.id===t);if(i===-1){console.error("Server not found:",t);return}n[i]={...n[i],...e},localStorage.setItem(Pr.SERVERS,JSON.stringify(n))}catch(n){console.error("Error updating server in localStorage:",n)}}function I5(t){try{const n=js().filter(d=>d.id!==t);localStorage.setItem(Pr.SERVERS,JSON.stringify(n));const o=Ai().filter(d=>d.serverId!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(o)),Yx()===t&&localStorage.removeItem(Pr.ACTIVE_SERVER_ID)}catch(e){console.error("Error deleting server from localStorage:",e)}}function Yx(){try{return localStorage.getItem(Pr.ACTIVE_SERVER_ID)}catch(t){return console.error("Error reading active server ID from localStorage:",t),null}}function Bm(t){try{localStorage.setItem(Pr.ACTIVE_SERVER_ID,t)}catch(e){console.error("Error setting active server ID in localStorage:",e)}}function Py(){const t=Yx();return t?j5(t):null}function Ai(){try{const t=localStorage.getItem(Pr.QUICK_CONNECTIONS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading quick connections from localStorage:",t),[]}}function B5(t){const e=Ai(),n=e.reduce((o,l)=>Math.max(o,l.order),-1),i={...t,id:crypto.randomUUID(),order:n+1};e.push(i);try{localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(o){console.error("Error saving quick connection to localStorage:",o)}return i}function z5(t){try{const n=Ai().filter(i=>i.id!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connection from localStorage:",e)}}function P5(t){try{const n=Ai().filter(i=>i.workspaceId!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connections for workspace from localStorage:",e)}}function F5(t){try{const e=Ai(),n=new Map(e.map(i=>[i.id,i]));t.forEach((i,o)=>{const l=n.get(i);l&&(l.order=o)}),localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(e){console.error("Error reordering quick connections in localStorage:",e)}}function Xx(t){return/^[a-f0-9]{64}$/.test(t)}function H5(t){return t.length<12?t:`${t.slice(0,4)}...${t.slice(-4)}`}function Mf(t){let e=t.trim();return e=e.replace(/^(https?:\/\/|wss?:\/\/)/i,""),e=e.replace(/\/+$/,""),e}const Qx=D.createContext(null),U5=t=>{const e=me.c(30),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[o,l]=D.useState(i),[d,a]=D.useState(null);let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[1]=u):u=e[1];const[f,p]=D.useState(u),[h,v]=D.useState(!1),S=D.useRef(null),C=D.useRef(!1);let w,_;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{const J=js(),ne=Py(),Z=Ai();l(J),a(ne),p(Z)},_=[],e[2]=w,e[3]=_):(w=e[2],_=e[3]),D.useEffect(w,_);let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{C.current=!0},e[4]=b):b=e[4];const y=b;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=(J,ne,Z)=>{const W=Mf(ne),U={id:crypto.randomUUID(),name:J,url:W,token:Z,createdAt:new Date().toISOString()};return O5(U),l(js()),Bm(U.id),a(U),U},e[5]=x):x=e[5];const k=x;let N;e[6]!==(d==null?void 0:d.id)?(N=(J,ne)=>{const Z={...ne,...ne.url&&{url:Mf(ne.url)}};L5(J,Z),l(js()),(d==null?void 0:d.id)===J&&a(Py())},e[6]=d==null?void 0:d.id,e[7]=N):N=e[7];const A=N;let M;e[8]!==(d==null?void 0:d.id)?(M=J=>{const ne=(d==null?void 0:d.id)===J;if(I5(J),l(js()),ne){const Z=js(),W=Z.length>0?Z[0]:null;W?(Bm(W.id),a(W)):a(null)}p(Ai())},e[8]=d==null?void 0:d.id,e[9]=M):M=e[9];const T=M;let j;e[10]!==(d==null?void 0:d.id)||e[11]!==h||e[12]!==o?(j=J=>(S.current&&(clearTimeout(S.current),S.current=null),h&&(d==null?void 0:d.id)===J?!1:(h&&v(!1),v(!0),S.current=setTimeout(()=>{Bm(J);const ne=o.find(Z=>Z.id===J)||null;a(ne),v(!1)},100),!0)),e[10]=d==null?void 0:d.id,e[11]=h,e[12]=o,e[13]=j):j=e[13];const O=j;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{v(!1)},e[14]=z):z=e[14];const q=z;let $;e[15]===Symbol.for("react.memo_cache_sentinel")?($=(J,ne,Z,W)=>{B5({serverId:J,serverName:ne,workspaceId:Z,workspaceName:W}),p(Ai())},e[15]=$):$=e[15];const V=$;let K;e[16]===Symbol.for("react.memo_cache_sentinel")?(K=J=>{z5(J),p(Ai())},e[16]=K):K=e[16];const G=K;let Y;e[17]===Symbol.for("react.memo_cache_sentinel")?(Y=J=>{P5(J),p(Ai())},e[17]=Y):Y=e[17];const Q=Y;let I;e[18]===Symbol.for("react.memo_cache_sentinel")?(I=J=>{F5(J),p(Ai())},e[18]=I):I=e[18];const L=I;let B;e[19]!==d||e[20]!==A||e[21]!==h||e[22]!==f||e[23]!==T||e[24]!==o||e[25]!==O?(B={servers:o,activeServer:d,quickConnections:f,isSwitching:h,isAddingServerRef:C,prepareForServerAdd:y,addServer:k,editServer:A,removeServer:T,switchServer:O,clearSwitchingState:q,addToQuickConnections:V,removeFromQuickConnections:G,removeFromQuickConnectionsByWorkspace:Q,reorderQuick:L},e[19]=d,e[20]=A,e[21]=h,e[22]=f,e[23]=T,e[24]=o,e[25]=O,e[26]=B):B=e[26];const H=B;let F;return e[27]!==n||e[28]!==H?(F=g.jsx(Qx.Provider,{value:H,children:n}),e[27]=n,e[28]=H,e[29]=F):F=e[29],F},dc=()=>{const t=D.useContext(Qx);if(t===null)throw new Error("useServerContext must be used within a ServerProvider");return t};function Zx(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Zx(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function rh(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Zx(t))&&(i&&(i+=" "),i+=e);return i}const Fy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hy=rh,fc=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Hy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,d=Object.keys(o).map(f=>{const p=n==null?void 0:n[f],h=l==null?void 0:l[f];if(p===null)return null;const v=Fy(p)||Fy(h);return o[f][v]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,v]=p;return v===void 0||(f[h]=v),f},{}),u=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:h,className:v,...S}=p;return Object.entries(S).every(C=>{let[w,_]=C;return Array.isArray(_)?_.includes({...l,...a}[w]):{...l,...a}[w]===_})?[...f,h,v]:f},[]);return Hy(t,d,u,n==null?void 0:n.class,n==null?void 0:n.className)};var Wu=Ox();const $5=eh(Wu);function Uy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Is(...t){return e=>{let n=!1;const i=t.map(o=>{const l=Uy(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():Uy(t[o],null)}}}}function vt(...t){return D.useCallback(Is(...t),t)}function Do(t){const e=q5(t),n=D.forwardRef((i,o)=>{const{children:l,...d}=i,a=D.Children.toArray(l),u=a.find(W5);if(u){const f=u.props.children,p=a.map(h=>h===u?D.Children.count(f)>1?D.Children.only(null):D.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...d,ref:o,children:D.isValidElement(f)?D.cloneElement(f,void 0,p):null})}return g.jsx(e,{...d,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}var Gu=Do("Slot");function q5(t){const e=D.forwardRef((n,i)=>{const{children:o,...l}=n;if(D.isValidElement(o)){const d=K5(o),a=G5(l,o.props);return o.type!==D.Fragment&&(a.ref=i?Is(i,d):d),D.cloneElement(o,a)}return D.Children.count(o)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Jx=Symbol("radix.slottable");function V5(t){const e=({children:n})=>g.jsx(g.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=Jx,e}function W5(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Jx}function G5(t,e){const n={...e};for(const i in e){const o=t[i],l=e[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...a)=>{const u=l(...a);return o(...a),u}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function K5(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Y5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=Y5.reduce((t,e)=>{const n=Do(`Primitive.${e}`),i=D.forwardRef((o,l)=>{const{asChild:d,...a}=o,u=d?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(u,{...a,ref:l})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function eS(t,e){t&&Wu.flushSync(()=>t.dispatchEvent(e))}var tS=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"}),X5="VisuallyHidden",nS=D.forwardRef((t,e)=>g.jsx(qe.span,{...t,ref:e,style:{...tS,...t.style}}));nS.displayName=X5;var Q5=nS;function Z5(t,e){const n=D.createContext(e),i=l=>{const{children:d,...a}=l,u=D.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:u,children:d})};i.displayName=t+"Provider";function o(l){const d=D.useContext(n);if(d)return d;if(e!==void 0)return e;throw new Error(`\`${l}\` must be used within \`${t}\``)}return[i,o]}function Ur(t,e=[]){let n=[];function i(l,d){const a=D.createContext(d),u=n.length;n=[...n,d];const f=h=>{var b;const{scope:v,children:S,...C}=h,w=((b=v==null?void 0:v[t])==null?void 0:b[u])||a,_=D.useMemo(()=>C,Object.values(C));return g.jsx(w.Provider,{value:_,children:S})};f.displayName=l+"Provider";function p(h,v){var w;const S=((w=v==null?void 0:v[t])==null?void 0:w[u])||a,C=D.useContext(S);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(d=>D.createContext(d));return function(a){const u=(a==null?void 0:a[t])||l;return D.useMemo(()=>({[`__scope${t}`]:{...a,[t]:u}}),[a,u])}};return o.scopeName=t,[i,J5(o,...e)]}function J5(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const d=i.reduce((a,{useScope:u,scopeName:f})=>{const h=u(l)[`__scope${f}`];return{...a,...h}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:d}),[d])}};return n.scopeName=e.scopeName,n}function a1(t){const e=t+"CollectionProvider",[n,i]=Ur(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),d=w=>{const{scope:_,children:b}=w,y=ii.useRef(null),x=ii.useRef(new Map).current;return g.jsx(o,{scope:_,itemMap:x,collectionRef:y,children:b})};d.displayName=e;const a=t+"CollectionSlot",u=Do(a),f=ii.forwardRef((w,_)=>{const{scope:b,children:y}=w,x=l(a,b),k=vt(_,x.collectionRef);return g.jsx(u,{ref:k,children:y})});f.displayName=a;const p=t+"CollectionItemSlot",h="data-radix-collection-item",v=Do(p),S=ii.forwardRef((w,_)=>{const{scope:b,children:y,...x}=w,k=ii.useRef(null),N=vt(_,k),A=l(p,b);return ii.useEffect(()=>(A.itemMap.set(k,{ref:k,...x}),()=>void A.itemMap.delete(k))),g.jsx(v,{[h]:"",ref:N,children:y})});S.displayName=p;function C(w){const _=l(t+"CollectionConsumer",w);return ii.useCallback(()=>{const y=_.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(_.itemMap.values()).sort((A,M)=>x.indexOf(A.ref.current)-x.indexOf(M.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:d,Slot:f,ItemSlot:S},C,i]}function Oe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}var An=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},eA=jx[" useInsertionEffect ".trim().toString()]||An;function Bs({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[o,l,d]=tA({defaultProp:e,onChange:n}),a=t!==void 0,u=a?t:o;{const p=D.useRef(t!==void 0);D.useEffect(()=>{const h=p.current;h!==a&&console.warn(`${i} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,i])}const f=D.useCallback(p=>{var h;if(a){const v=nA(p)?p(t):p;v!==t&&((h=d.current)==null||h.call(d,v))}else l(p)},[a,t,l,d]);return[u,f]}function tA({defaultProp:t,onChange:e}){const[n,i]=D.useState(t),o=D.useRef(n),l=D.useRef(e);return eA(()=>{l.current=e},[e]),D.useEffect(()=>{var d;o.current!==n&&((d=l.current)==null||d.call(l,n),o.current=n)},[n,o]),[n,i,l]}function nA(t){return typeof t=="function"}function rA(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var Rn=t=>{const{present:e,children:n}=t,i=iA(e),o=typeof n=="function"?n({present:i.isPresent}):D.Children.only(n),l=vt(i.ref,sA(o));return typeof n=="function"||i.isPresent?D.cloneElement(o,{ref:l}):null};Rn.displayName="Presence";function iA(t){const[e,n]=D.useState(),i=D.useRef(null),o=D.useRef(t),l=D.useRef("none"),d=t?"mounted":"unmounted",[a,u]=rA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const f=ff(i.current);l.current=a==="mounted"?f:"none"},[a]),An(()=>{const f=i.current,p=o.current;if(p!==t){const v=l.current,S=ff(f);t?u("MOUNT"):S==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(p&&v!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),An(()=>{var f;if(e){let p;const h=(f=e.ownerDocument.defaultView)!=null?f:window,v=C=>{const _=ff(i.current).includes(CSS.escape(C.animationName));if(C.target===e&&_&&(u("ANIMATION_END"),!o.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",p=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},S=C=>{C.target===e&&(l.current=ff(i.current))};return e.addEventListener("animationstart",S),e.addEventListener("animationcancel",v),e.addEventListener("animationend",v),()=>{h.clearTimeout(p),e.removeEventListener("animationstart",S),e.removeEventListener("animationcancel",v),e.removeEventListener("animationend",v)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:D.useCallback(f=>{i.current=f?getComputedStyle(f):null,n(f)},[])}}function ff(t){return(t==null?void 0:t.animationName)||"none"}function sA(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oA=jx[" useId ".trim().toString()]||(()=>{}),aA=0;function wn(t){const[e,n]=D.useState(oA());return An(()=>{n(i=>i!=null?i:String(aA++))},[t]),e?`radix-${e}`:""}var ih="Collapsible",[lA]=Ur(ih),[cA,l1]=lA(ih),rS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:o,disabled:l,onOpenChange:d,...a}=t,[u,f]=Bs({prop:i,defaultProp:o!=null?o:!1,onChange:d,caller:ih});return g.jsx(cA,{scope:n,disabled:l,contentId:wn(),open:u,onOpenToggle:D.useCallback(()=>f(p=>!p),[f]),children:g.jsx(qe.div,{"data-state":u1(u),"data-disabled":l?"":void 0,...a,ref:e})})});rS.displayName=ih;var iS="CollapsibleTrigger",sS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,o=l1(iS,n);return g.jsx(qe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":u1(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:e,onClick:Oe(t.onClick,o.onOpenToggle)})});sS.displayName=iS;var c1="CollapsibleContent",oS=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=l1(c1,t.__scopeCollapsible);return g.jsx(Rn,{present:n||o.open,children:({present:l})=>g.jsx(uA,{...i,ref:e,present:l})})});oS.displayName=c1;var uA=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:o,...l}=t,d=l1(c1,n),[a,u]=D.useState(i),f=D.useRef(null),p=vt(e,f),h=D.useRef(0),v=h.current,S=D.useRef(0),C=S.current,w=d.open||a,_=D.useRef(w),b=D.useRef(void 0);return D.useEffect(()=>{const y=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(y)},[]),An(()=>{const y=f.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();h.current=x.height,S.current=x.width,_.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),u(i)}},[d.open,i]),g.jsx(qe.div,{"data-state":u1(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!w,...l,ref:p,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:w&&o})});function u1(t){return t?"open":"closed"}var dA=rS,fA=D.createContext(void 0);function Ku(t){const e=D.useContext(fA);return t||e||"ltr"}function Hn(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function hA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t);D.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var pA="DismissableLayer",Eg="dismissableLayer.update",mA="dismissableLayer.pointerDownOutside",gA="dismissableLayer.focusOutside",$y,aS=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hc=D.forwardRef((t,e)=>{var M;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:d,onDismiss:a,...u}=t,f=D.useContext(aS),[p,h]=D.useState(null),v=(M=p==null?void 0:p.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,S]=D.useState({}),C=vt(e,T=>h(T)),w=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(_),y=p?w.indexOf(p):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=y>=b,N=yA(T=>{const j=T.target,O=[...f.branches].some(z=>z.contains(j));!k||O||(o==null||o(T),d==null||d(T),T.defaultPrevented||a==null||a())},v),A=bA(T=>{const j=T.target;[...f.branches].some(z=>z.contains(j))||(l==null||l(T),d==null||d(T),T.defaultPrevented||a==null||a())},v);return hA(T=>{y===f.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},v),D.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($y=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),qy(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=$y)}},[p,v,n,f]),D.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),qy())},[p,f]),D.useEffect(()=>{const T=()=>S({});return document.addEventListener(Eg,T),()=>document.removeEventListener(Eg,T)},[]),g.jsx(qe.div,{...u,ref:C,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Oe(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(t.onPointerDownCapture,N.onPointerDownCapture)})});hc.displayName=pA;var vA="DismissableLayerBranch",_A=D.forwardRef((t,e)=>{const n=D.useContext(aS),i=D.useRef(null),o=vt(e,i);return D.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),g.jsx(qe.div,{...t,ref:o})});_A.displayName=vA;function yA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t),i=D.useRef(!1),o=D.useRef(()=>{});return D.useEffect(()=>{const l=a=>{if(a.target&&!i.current){let u=function(){lS(mA,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=u,e.addEventListener("click",o.current,{once:!0})):u()}else e.removeEventListener("click",o.current);i.current=!1},d=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(d),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function bA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t),i=D.useRef(!1);return D.useEffect(()=>{const o=l=>{l.target&&!i.current&&lS(gA,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function qy(){const t=new CustomEvent(Eg);document.dispatchEvent(t)}function lS(t,e,n,{discrete:i}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),i?eS(o,l):o.dispatchEvent(l)}var zm="focusScope.autoFocusOnMount",Pm="focusScope.autoFocusOnUnmount",Vy={bubbles:!1,cancelable:!0},xA="FocusScope",Yu=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...d}=t,[a,u]=D.useState(null),f=Hn(o),p=Hn(l),h=D.useRef(null),v=vt(e,w=>u(w)),S=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(i){let w=function(x){if(S.paused||!a)return;const k=x.target;a.contains(k)?h.current=k:Ro(h.current,{select:!0})},_=function(x){if(S.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||Ro(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const N of x)N.removedNodes.length>0&&Ro(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",_);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",_),y.disconnect()}}},[i,a,S.paused]),D.useEffect(()=>{if(a){Gy.add(S);const w=document.activeElement;if(!a.contains(w)){const b=new CustomEvent(zm,Vy);a.addEventListener(zm,f),a.dispatchEvent(b),b.defaultPrevented||(SA(AA(cS(a)),{select:!0}),document.activeElement===w&&Ro(a))}return()=>{a.removeEventListener(zm,f),setTimeout(()=>{const b=new CustomEvent(Pm,Vy);a.addEventListener(Pm,p),a.dispatchEvent(b),b.defaultPrevented||Ro(w!=null?w:document.body,{select:!0}),a.removeEventListener(Pm,p),Gy.remove(S)},0)}}},[a,f,p,S]);const C=D.useCallback(w=>{if(!n&&!i||S.paused)return;const _=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,b=document.activeElement;if(_&&b){const y=w.currentTarget,[x,k]=wA(y);x&&k?!w.shiftKey&&b===k?(w.preventDefault(),n&&Ro(x,{select:!0})):w.shiftKey&&b===x&&(w.preventDefault(),n&&Ro(k,{select:!0})):b===y&&w.preventDefault()}},[n,i,S.paused]);return g.jsx(qe.div,{tabIndex:-1,...d,ref:v,onKeyDown:C})});Yu.displayName=xA;function SA(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(Ro(i,{select:e}),document.activeElement!==n)return}function wA(t){const e=cS(t),n=Wy(e,t),i=Wy(e.reverse(),t);return[n,i]}function cS(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Wy(t,e){for(const n of t)if(!CA(n,{upTo:e}))return n}function CA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function kA(t){return t instanceof HTMLInputElement&&"select"in t}function Ro(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&kA(t)&&e&&t.select()}}var Gy=EA();function EA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Ky(t,e),t.unshift(e)},remove(e){var n;t=Ky(t,e),(n=t[0])==null||n.resume()}}}function Ky(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function AA(t){return t.filter(e=>e.tagName!=="A")}var RA="Portal",pc=D.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[o,l]=D.useState(!1);An(()=>l(!0),[]);const d=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return d?$5.createPortal(g.jsx(qe.div,{...i,ref:e}),d):null});pc.displayName=RA;var Fm=0;function sh(){D.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!=null?e:Yy()),document.body.insertAdjacentElement("beforeend",(n=t[1])!=null?n:Yy()),Fm++,()=>{Fm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Fm--}},[])}function Yy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Xi=function(){return Xi=Object.assign||function(e){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},Xi.apply(this,arguments)};function uS(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n}function TA(t,e,n){if(n||arguments.length===2)for(var i=0,o=e.length,l;i<o;i++)(l||!(i in e))&&(l||(l=Array.prototype.slice.call(e,0,i)),l[i]=e[i]);return t.concat(l||Array.prototype.slice.call(e))}var kf="right-scroll-bar-position",Ef="width-before-scroll-bar",NA="with-scroll-bars-hidden",DA="--removed-body-scroll-bar-size";function Hm(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function MA(t,e){var n=D.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=e,n.facade}var jA=typeof window<"u"?D.useLayoutEffect:D.useEffect,Xy=new WeakMap;function OA(t,e){var n=MA(null,function(i){return t.forEach(function(o){return Hm(o,i)})});return jA(function(){var i=Xy.get(n);if(i){var o=new Set(i),l=new Set(t),d=n.current;o.forEach(function(a){l.has(a)||Hm(a,null)}),l.forEach(function(a){o.has(a)||Hm(a,d)})}Xy.set(n,t)},[t]),n}function LA(t){return t}function IA(t,e){e===void 0&&(e=LA);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(l){var d=e(l,i);return n.push(d),function(){n=n.filter(function(a){return a!==d})}},assignSyncMedium:function(l){for(i=!0;n.length;){var d=n;n=[],d.forEach(l)}n={push:function(a){return l(a)},filter:function(){return n}}},assignMedium:function(l){i=!0;var d=[];if(n.length){var a=n;n=[],a.forEach(l),d=n}var u=function(){var p=d;d=[],p.forEach(l)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(p){d.push(p),f()},filter:function(p){return d=d.filter(p),n}}}};return o}function BA(t){t===void 0&&(t={});var e=IA(null);return e.options=Xi({async:!0,ssr:!1},t),e}var dS=function(t){var e=t.sideCar,n=uS(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return D.createElement(i,Xi({},n))};dS.isSideCarExport=!0;function zA(t,e){return t.useMedium(e),dS}var fS=BA(),Um=function(){},oh=D.forwardRef(function(t,e){var n=D.useRef(null),i=D.useState({onScrollCapture:Um,onWheelCapture:Um,onTouchMoveCapture:Um}),o=i[0],l=i[1],d=t.forwardProps,a=t.children,u=t.className,f=t.removeScrollBar,p=t.enabled,h=t.shards,v=t.sideCar,S=t.noRelative,C=t.noIsolation,w=t.inert,_=t.allowPinchZoom,b=t.as,y=b===void 0?"div":b,x=t.gapMode,k=uS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=v,A=OA([n,e]),M=Xi(Xi({},k),o);return D.createElement(D.Fragment,null,p&&D.createElement(N,{sideCar:fS,removeScrollBar:f,shards:h,noRelative:S,noIsolation:C,inert:w,setCallbacks:l,allowPinchZoom:!!_,lockRef:n,gapMode:x}),d?D.cloneElement(D.Children.only(a),Xi(Xi({},M),{ref:A})):D.createElement(y,Xi({},M,{className:u,ref:A}),a))});oh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};oh.classNames={fullWidth:Ef,zeroRight:kf};var PA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=PA();return e&&t.setAttribute("nonce",e),t}function HA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function UA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var $A=function(){var t=0,e=null;return{add:function(n){t==0&&(e=FA())&&(HA(e,n),UA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},qA=function(){var t=$A();return function(e,n){D.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},hS=function(){var t=qA(),e=function(n){var i=n.styles,o=n.dynamic;return t(i,o),null};return e},VA={left:0,top:0,right:0,gap:0},$m=function(t){return parseInt(t||"",10)||0},WA=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[$m(n),$m(i),$m(o)]},GA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return VA;var e=WA(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},KA=hS(),Ql="data-scroll-locked",YA=function(t,e,n,i){var o=t.left,l=t.top,d=t.right,a=t.gap;return n===void 0&&(n="margin"),`
458
- .`.concat(NA,` {
459
- overflow: hidden `).concat(i,`;
460
- padding-right: `).concat(a,"px ").concat(i,`;
461
- }
462
- body[`).concat(Ql,`] {
463
- overflow: hidden `).concat(i,`;
464
- overscroll-behavior: contain;
465
- `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
466
- padding-left: `.concat(o,`px;
467
- padding-top: `).concat(l,`px;
468
- padding-right: `).concat(d,`px;
469
- margin-left:0;
470
- margin-top:0;
471
- margin-right: `).concat(a,"px ").concat(i,`;
472
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
473
- }
474
-
475
- .`).concat(kf,` {
476
- right: `).concat(a,"px ").concat(i,`;
477
- }
478
-
479
- .`).concat(Ef,` {
480
- margin-right: `).concat(a,"px ").concat(i,`;
481
- }
482
-
483
- .`).concat(kf," .").concat(kf,` {
484
- right: 0 `).concat(i,`;
485
- }
486
-
487
- .`).concat(Ef," .").concat(Ef,` {
488
- margin-right: 0 `).concat(i,`;
489
- }
490
-
491
- body[`).concat(Ql,`] {
492
- `).concat(DA,": ").concat(a,`px;
493
- }
494
- `)},Qy=function(){var t=parseInt(document.body.getAttribute(Ql)||"0",10);return isFinite(t)?t:0},XA=function(){D.useEffect(function(){return document.body.setAttribute(Ql,(Qy()+1).toString()),function(){var t=Qy()-1;t<=0?document.body.removeAttribute(Ql):document.body.setAttribute(Ql,t.toString())}},[])},QA=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,o=i===void 0?"margin":i;XA();var l=D.useMemo(function(){return GA(o)},[o]);return D.createElement(KA,{styles:YA(l,!e,o,n?"":"!important")})},Ag=!1;if(typeof window<"u")try{var hf=Object.defineProperty({},"passive",{get:function(){return Ag=!0,!0}});window.addEventListener("test",hf,hf),window.removeEventListener("test",hf,hf)}catch{Ag=!1}var Hl=Ag?{passive:!1}:!1,ZA=function(t){return t.tagName==="TEXTAREA"},pS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ZA(t)&&n[e]==="visible")},JA=function(t){return pS(t,"overflowY")},eR=function(t){return pS(t,"overflowX")},Zy=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=mS(t,i);if(o){var l=gS(t,i),d=l[1],a=l[2];if(d>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},tR=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},nR=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},mS=function(t,e){return t==="v"?JA(e):eR(e)},gS=function(t,e){return t==="v"?tR(e):nR(e)},rR=function(t,e){return t==="h"&&e==="rtl"?-1:1},iR=function(t,e,n,i,o){var l=rR(t,window.getComputedStyle(e).direction),d=l*i,a=n.target,u=e.contains(a),f=!1,p=d>0,h=0,v=0;do{if(!a)break;var S=gS(t,a),C=S[0],w=S[1],_=S[2],b=w-_-l*C;(C||b)&&mS(t,a)&&(h+=b,v+=C);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&a!==document.body||u&&(e.contains(a)||e===a));return(p&&Math.abs(h)<1||!p&&Math.abs(v)<1)&&(f=!0),f},pf=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jy=function(t){return[t.deltaX,t.deltaY]},eb=function(t){return t&&"current"in t?t.current:t},sR=function(t,e){return t[0]===e[0]&&t[1]===e[1]},oR=function(t){return`
495
- .block-interactivity-`.concat(t,` {pointer-events: none;}
496
- .allow-interactivity-`).concat(t,` {pointer-events: all;}
497
- `)},aR=0,Ul=[];function lR(t){var e=D.useRef([]),n=D.useRef([0,0]),i=D.useRef(),o=D.useState(aR++)[0],l=D.useState(hS)[0],d=D.useRef(t);D.useEffect(function(){d.current=t},[t]),D.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var w=TA([t.lockRef.current],(t.shards||[]).map(eb),!0).filter(Boolean);return w.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=D.useCallback(function(w,_){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!d.current.allowPinchZoom;var b=pf(w),y=n.current,x="deltaX"in w?w.deltaX:y[0]-b[0],k="deltaY"in w?w.deltaY:y[1]-b[1],N,A=w.target,M=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in w&&M==="h"&&A.type==="range")return!1;var T=window.getSelection(),j=T&&T.anchorNode,O=j?j===A||j.contains(A):!1;if(O)return!1;var z=Zy(M,A);if(!z)return!0;if(z?N=M:(N=M==="v"?"h":"v",z=Zy(M,A)),!z)return!1;if(!i.current&&"changedTouches"in w&&(x||k)&&(i.current=N),!N)return!0;var q=i.current||N;return iR(q,_,w,q==="h"?x:k)},[]),u=D.useCallback(function(w){var _=w;if(!(!Ul.length||Ul[Ul.length-1]!==l)){var b="deltaY"in _?Jy(_):pf(_),y=e.current.filter(function(N){return N.name===_.type&&(N.target===_.target||_.target===N.shadowParent)&&sR(N.delta,b)})[0];if(y&&y.should){_.cancelable&&_.preventDefault();return}if(!y){var x=(d.current.shards||[]).map(eb).filter(Boolean).filter(function(N){return N.contains(_.target)}),k=x.length>0?a(_,x[0]):!d.current.noIsolation;k&&_.cancelable&&_.preventDefault()}}},[]),f=D.useCallback(function(w,_,b,y){var x={name:w,delta:_,target:b,should:y,shadowParent:cR(b)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),p=D.useCallback(function(w){n.current=pf(w),i.current=void 0},[]),h=D.useCallback(function(w){f(w.type,Jy(w),w.target,a(w,t.lockRef.current))},[]),v=D.useCallback(function(w){f(w.type,pf(w),w.target,a(w,t.lockRef.current))},[]);D.useEffect(function(){return Ul.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Hl),document.addEventListener("touchmove",u,Hl),document.addEventListener("touchstart",p,Hl),function(){Ul=Ul.filter(function(w){return w!==l}),document.removeEventListener("wheel",u,Hl),document.removeEventListener("touchmove",u,Hl),document.removeEventListener("touchstart",p,Hl)}},[]);var S=t.removeScrollBar,C=t.inert;return D.createElement(D.Fragment,null,C?D.createElement(l,{styles:oR(o)}):null,S?D.createElement(QA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function cR(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const uR=zA(fS,lR);var Xu=D.forwardRef(function(t,e){return D.createElement(oh,Xi({},t,{ref:e,sideCar:uR}))});Xu.classNames=oh.classNames;var dR=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},$l=new WeakMap,mf=new WeakMap,gf={},qm=0,vS=function(t){return t&&(t.host||vS(t.parentNode))},fR=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=vS(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},hR=function(t,e,n,i){var o=fR(e,Array.isArray(t)?t:[t]);gf[n]||(gf[n]=new WeakMap);var l=gf[n],d=[],a=new Set,u=new Set(o),f=function(h){!h||a.has(h)||(a.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(a.has(v))p(v);else try{var S=v.getAttribute(i),C=S!==null&&S!=="false",w=($l.get(v)||0)+1,_=(l.get(v)||0)+1;$l.set(v,w),l.set(v,_),d.push(v),w===1&&C&&mf.set(v,!0),_===1&&v.setAttribute(n,"true"),C||v.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return p(e),a.clear(),qm++,function(){d.forEach(function(h){var v=$l.get(h)-1,S=l.get(h)-1;$l.set(h,v),l.set(h,S),v||(mf.has(h)||h.removeAttribute(i),mf.delete(h)),S||h.removeAttribute(n)}),qm--,qm||($l=new WeakMap,$l=new WeakMap,mf=new WeakMap,gf={})}},ah=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),o=dR(t);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),hR(i,o,n,"aria-hidden")):function(){return null}},lh="Dialog",[_S]=Ur(lh),[pR,ji]=_S(lh),yS=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:d=!0}=t,a=D.useRef(null),u=D.useRef(null),[f,p]=Bs({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:lh});return g.jsx(pR,{scope:e,triggerRef:a,contentRef:u,contentId:wn(),titleId:wn(),descriptionId:wn(),open:f,onOpenChange:p,onOpenToggle:D.useCallback(()=>p(h=>!h),[p]),modal:d,children:n})};yS.displayName=lh;var bS="DialogTrigger",xS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ji(bS,n),l=vt(e,o.triggerRef);return g.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":h1(o.open),...i,ref:l,onClick:Oe(t.onClick,o.onOpenToggle)})});xS.displayName=bS;var d1="DialogPortal",[mR,SS]=_S(d1,{forceMount:void 0}),wS=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:o}=t,l=ji(d1,e);return g.jsx(mR,{scope:e,forceMount:n,children:D.Children.map(i,d=>g.jsx(Rn,{present:n||l.open,children:g.jsx(pc,{asChild:!0,container:o,children:d})}))})};wS.displayName=d1;var jf="DialogOverlay",CS=D.forwardRef((t,e)=>{const n=SS(jf,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=ji(jf,t.__scopeDialog);return l.modal?g.jsx(Rn,{present:i||l.open,children:g.jsx(vR,{...o,ref:e})}):null});CS.displayName=jf;var gR=Do("DialogOverlay.RemoveScroll"),vR=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ji(jf,n);return g.jsx(Xu,{as:gR,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(qe.div,{"data-state":h1(o.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Da="DialogContent",kS=D.forwardRef((t,e)=>{const n=SS(Da,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=ji(Da,t.__scopeDialog);return g.jsx(Rn,{present:i||l.open,children:l.modal?g.jsx(_R,{...o,ref:e}):g.jsx(yR,{...o,ref:e})})});kS.displayName=Da;var _R=D.forwardRef((t,e)=>{const n=ji(Da,t.__scopeDialog),i=D.useRef(null),o=vt(e,n.contentRef,i);return D.useEffect(()=>{const l=i.current;if(l)return ah(l)},[]),g.jsx(ES,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,l=>{var d;l.preventDefault(),(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,l=>{const d=l.detail.originalEvent,a=d.button===0&&d.ctrlKey===!0;(d.button===2||a)&&l.preventDefault()}),onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault())})}),yR=D.forwardRef((t,e)=>{const n=ji(Da,t.__scopeDialog),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(ES,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,a;(d=t.onCloseAutoFocus)==null||d.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),ES=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...d}=t,a=ji(Da,n),u=D.useRef(null),f=vt(e,u);return sh(),g.jsxs(g.Fragment,{children:[g.jsx(Yu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(hc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":h1(a.open),...d,ref:f,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(bR,{titleId:a.titleId}),g.jsx(SR,{contentRef:u,descriptionId:a.descriptionId})]})]})}),f1="DialogTitle",AS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ji(f1,n);return g.jsx(qe.h2,{id:o.titleId,...i,ref:e})});AS.displayName=f1;var RS="DialogDescription",TS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ji(RS,n);return g.jsx(qe.p,{id:o.descriptionId,...i,ref:e})});TS.displayName=RS;var NS="DialogClose",DS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ji(NS,n);return g.jsx(qe.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});DS.displayName=NS;function h1(t){return t?"open":"closed"}var MS="DialogTitleWarning",[LH,jS]=Z5(MS,{contentName:Da,titleName:f1,docsSlug:"dialog"}),bR=({titleId:t})=>{const e=jS(MS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
498
-
499
- If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
500
-
501
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return D.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},xR="DialogDescriptionWarning",SR=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jS(xR).contentName}}.`;return D.useEffect(()=>{var l;const o=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");e&&o&&(document.getElementById(e)||console.warn(i))},[i,t,e]),null},p1=yS,wR=xS,m1=wS,g1=CS,v1=kS,OS=AS,LS=TS,ch=DS;function CR(t){const e=D.useRef({value:t,previous:t});return D.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function kR(t){const[e,n]=D.useState(void 0);return An(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let d,a;if("borderBoxSize"in l){const u=l.borderBoxSize,f=Array.isArray(u)?u[0]:u;d=f.inlineSize,a=f.blockSize}else d=t.offsetWidth,a=t.offsetHeight;n({width:d,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}const ER=["top","right","bottom","left"],Mo=Math.min,Br=Math.max,Of=Math.round,vf=Math.floor,Zi=t=>({x:t,y:t}),AR={left:"right",right:"left",bottom:"top",top:"bottom"};function Rg(t,e,n){return Br(t,Mo(e,n))}function zs(t,e){return typeof t=="function"?t(e):t}function Ps(t){return t.split("-")[0]}function mc(t){return t.split("-")[1]}function _1(t){return t==="x"?"y":"x"}function y1(t){return t==="y"?"height":"width"}function Qi(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function b1(t){return _1(Qi(t))}function RR(t,e,n){n===void 0&&(n=!1);const i=mc(t),o=b1(t),l=y1(o);let d=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(d=Lf(d)),[d,Lf(d)]}function TR(t){const e=Lf(t);return[Tg(t),e,Tg(e)]}function Tg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const tb=["left","right"],nb=["right","left"],NR=["top","bottom"],DR=["bottom","top"];function MR(t,e,n){switch(t){case"top":case"bottom":return n?e?nb:tb:e?tb:nb;case"left":case"right":return e?NR:DR;default:return[]}}function jR(t,e,n,i){const o=mc(t);let l=MR(Ps(t),n==="start",i);return o&&(l=l.map(d=>d+"-"+o),e&&(l=l.concat(l.map(Tg)))),l}function Lf(t){const e=Ps(t);return AR[e]+t.slice(e.length)}function OR(t){return{top:0,right:0,bottom:0,left:0,...t}}function IS(t){return typeof t!="number"?OR(t):{top:t,right:t,bottom:t,left:t}}function If(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function rb(t,e,n){let{reference:i,floating:o}=t;const l=Qi(e),d=b1(e),a=y1(d),u=Ps(e),f=l==="y",p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,v=i[a]/2-o[a]/2;let S;switch(u){case"top":S={x:p,y:i.y-o.height};break;case"bottom":S={x:p,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:h};break;case"left":S={x:i.x-o.width,y:h};break;default:S={x:i.x,y:i.y}}switch(mc(e)){case"start":S[d]-=v*(n&&f?-1:1);break;case"end":S[d]+=v*(n&&f?-1:1);break}return S}async function LR(t,e){var n;e===void 0&&(e={});const{x:i,y:o,platform:l,rects:d,elements:a,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:S=0}=zs(e,t),C=IS(S),_=a[v?h==="floating"?"reference":"floating":h],b=If(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(_)))==null||n?_:_.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),y=h==="floating"?{x:i,y:o,width:d.floating.width,height:d.floating.height}:d.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),k=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},N=If(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:u}):y);return{top:(b.top-N.top+C.top)/k.y,bottom:(N.bottom-b.bottom+C.bottom)/k.y,left:(b.left-N.left+C.left)/k.x,right:(N.right-b.right+C.right)/k.x}}const IR=50,BR=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:d}=n,a=d.detectOverflow?d:{...d,detectOverflow:LR},u=await(d.isRTL==null?void 0:d.isRTL(e));let f=await d.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:h}=rb(f,i,u),v=i,S=0;const C={};for(let w=0;w<l.length;w++){const _=l[w];if(!_)continue;const{name:b,fn:y}=_,{x,y:k,data:N,reset:A}=await y({x:p,y:h,initialPlacement:i,placement:v,strategy:o,middlewareData:C,rects:f,platform:a,elements:{reference:t,floating:e}});p=x!=null?x:p,h=k!=null?k:h,C[b]={...C[b],...N},A&&S<IR&&(S++,typeof A=="object"&&(A.placement&&(v=A.placement),A.rects&&(f=A.rects===!0?await d.getElementRects({reference:t,floating:e,strategy:o}):A.rects),{x:p,y:h}=rb(f,v,u)),w=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:C}},zR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:l,platform:d,elements:a,middlewareData:u}=e,{element:f,padding:p=0}=zs(t,e)||{};if(f==null)return{};const h=IS(p),v={x:n,y:i},S=b1(o),C=y1(S),w=await d.getDimensions(f),_=S==="y",b=_?"top":"left",y=_?"bottom":"right",x=_?"clientHeight":"clientWidth",k=l.reference[C]+l.reference[S]-v[S]-l.floating[C],N=v[S]-l.reference[S],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(f));let M=A?A[x]:0;(!M||!await(d.isElement==null?void 0:d.isElement(A)))&&(M=a.floating[x]||l.floating[C]);const T=k/2-N/2,j=M/2-w[C]/2-1,O=Mo(h[b],j),z=Mo(h[y],j),q=O,$=M-w[C]-z,V=M/2-w[C]/2+T,K=Rg(q,V,$),G=!u.arrow&&mc(o)!=null&&V!==K&&l.reference[C]/2-(V<q?O:z)-w[C]/2<0,Y=G?V<q?V-q:V-$:0;return{[S]:v[S]+Y,data:{[S]:K,centerOffset:V-K-Y,...G&&{alignmentOffset:Y}},reset:G}}}),PR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:l,rects:d,initialPlacement:a,platform:u,elements:f}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,..._}=zs(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const b=Ps(o),y=Qi(a),x=Ps(a)===a,k=await(u.isRTL==null?void 0:u.isRTL(f.floating)),N=v||(x||!w?[Lf(a)]:TR(a)),A=C!=="none";!v&&A&&N.push(...jR(a,w,C,k));const M=[a,...N],T=await u.detectOverflow(e,_),j=[];let O=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&j.push(T[b]),h){const V=RR(o,d,k);j.push(T[V[0]],T[V[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(V=>V<=0)){var z,q;const V=(((z=l.flip)==null?void 0:z.index)||0)+1,K=M[V];if(K&&(!(h==="alignment"?y!==Qi(K):!1)||O.every(Q=>Qi(Q.placement)===y?Q.overflows[0]>0:!0)))return{data:{index:V,overflows:O},reset:{placement:K}};let G=(q=O.filter(Y=>Y.overflows[0]<=0).sort((Y,Q)=>Y.overflows[1]-Q.overflows[1])[0])==null?void 0:q.placement;if(!G)switch(S){case"bestFit":{var $;const Y=($=O.filter(Q=>{if(A){const I=Qi(Q.placement);return I===y||I==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(I=>I>0).reduce((I,L)=>I+L,0)]).sort((Q,I)=>Q[1]-I[1])[0])==null?void 0:$[0];Y&&(G=Y);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function ib(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function sb(t){return ER.some(e=>t[e]>=0)}const FR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:o="referenceHidden",...l}=zs(t,e);switch(o){case"referenceHidden":{const d=await i.detectOverflow(e,{...l,elementContext:"reference"}),a=ib(d,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:sb(a)}}}case"escaped":{const d=await i.detectOverflow(e,{...l,altBoundary:!0}),a=ib(d,n.floating);return{data:{escapedOffsets:a,escaped:sb(a)}}}default:return{}}}}},BS=new Set(["left","top"]);async function HR(t,e){const{placement:n,platform:i,elements:o}=t,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),d=Ps(n),a=mc(n),u=Qi(n)==="y",f=BS.has(d)?-1:1,p=l&&u?-1:1,h=zs(e,t);let{mainAxis:v,crossAxis:S,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof C=="number"&&(S=a==="end"?C*-1:C),u?{x:S*p,y:v*f}:{x:v*f,y:S*p}}const UR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:l,placement:d,middlewareData:a}=e,u=await HR(e,t);return d===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:d}}}}},$R=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:l}=e,{mainAxis:d=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...f}=zs(t,e),p={x:n,y:i},h=await l.detectOverflow(e,f),v=Qi(Ps(o)),S=_1(v);let C=p[S],w=p[v];if(d){const b=S==="y"?"top":"left",y=S==="y"?"bottom":"right",x=C+h[b],k=C-h[y];C=Rg(x,C,k)}if(a){const b=v==="y"?"top":"left",y=v==="y"?"bottom":"right",x=w+h[b],k=w-h[y];w=Rg(x,w,k)}const _=u.fn({...e,[S]:C,[v]:w});return{..._,data:{x:_.x-n,y:_.y-i,enabled:{[S]:d,[v]:a}}}}}},qR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:l,middlewareData:d}=e,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=zs(t,e),p={x:n,y:i},h=Qi(o),v=_1(h);let S=p[v],C=p[h];const w=zs(a,e),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const x=v==="y"?"height":"width",k=l.reference[v]-l.floating[x]+_.mainAxis,N=l.reference[v]+l.reference[x]-_.mainAxis;S<k?S=k:S>N&&(S=N)}if(f){var b,y;const x=v==="y"?"width":"height",k=BS.has(Ps(o)),N=l.reference[h]-l.floating[x]+(k&&((b=d.offset)==null?void 0:b[h])||0)+(k?0:_.crossAxis),A=l.reference[h]+l.reference[x]+(k?0:((y=d.offset)==null?void 0:y[h])||0)-(k?_.crossAxis:0);C<N?C=N:C>A&&(C=A)}return{[v]:S,[h]:C}}}},VR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:l,platform:d,elements:a}=e,{apply:u=()=>{},...f}=zs(t,e),p=await d.detectOverflow(e,f),h=Ps(o),v=mc(o),S=Qi(o)==="y",{width:C,height:w}=l.floating;let _,b;h==="top"||h==="bottom"?(_=h,b=v===(await(d.isRTL==null?void 0:d.isRTL(a.floating))?"start":"end")?"left":"right"):(b=h,_=v==="end"?"top":"bottom");const y=w-p.top-p.bottom,x=C-p.left-p.right,k=Mo(w-p[_],y),N=Mo(C-p[b],x),A=!e.middlewareData.shift;let M=k,T=N;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=x),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(M=y),A&&!v){const O=Br(p.left,0),z=Br(p.right,0),q=Br(p.top,0),$=Br(p.bottom,0);S?T=C-2*(O!==0||z!==0?O+z:Br(p.left,p.right)):M=w-2*(q!==0||$!==0?q+$:Br(p.top,p.bottom))}await u({...e,availableWidth:T,availableHeight:M});const j=await d.getDimensions(a.floating);return C!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function uh(){return typeof window<"u"}function gc(t){return zS(t)?(t.nodeName||"").toLowerCase():"#document"}function Fr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function es(t){var e;return(e=(zS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zS(t){return uh()?t instanceof Node||t instanceof Fr(t).Node:!1}function Di(t){return uh()?t instanceof Element||t instanceof Fr(t).Element:!1}function Fs(t){return uh()?t instanceof HTMLElement||t instanceof Fr(t).HTMLElement:!1}function ob(t){return!uh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fr(t).ShadowRoot}function Qu(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=Mi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function WR(t){return/^(table|td|th)$/.test(gc(t))}function dh(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const GR=/transform|translate|scale|rotate|perspective|filter/,KR=/paint|layout|strict|content/,Ea=t=>!!t&&t!=="none";let Vm;function x1(t){const e=Di(t)?Mi(t):t;return Ea(e.transform)||Ea(e.translate)||Ea(e.scale)||Ea(e.rotate)||Ea(e.perspective)||!S1()&&(Ea(e.backdropFilter)||Ea(e.filter))||GR.test(e.willChange||"")||KR.test(e.contain||"")}function YR(t){let e=jo(t);for(;Fs(e)&&!nc(e);){if(x1(e))return e;if(dh(e))return null;e=jo(e)}return null}function S1(){return Vm==null&&(Vm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vm}function nc(t){return/^(html|body|#document)$/.test(gc(t))}function Mi(t){return Fr(t).getComputedStyle(t)}function fh(t){return Di(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function jo(t){if(gc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ob(t)&&t.host||es(t);return ob(e)?e.host:e}function PS(t){const e=jo(t);return nc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Fs(e)&&Qu(e)?e:PS(e)}function Ou(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=PS(t),l=o===((i=t.ownerDocument)==null?void 0:i.body),d=Fr(o);if(l){const a=Ng(d);return e.concat(d,d.visualViewport||[],Qu(o)?o:[],a&&n?Ou(a):[])}else return e.concat(o,Ou(o,[],n))}function Ng(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function FS(t){const e=Mi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=Fs(t),l=o?t.offsetWidth:n,d=o?t.offsetHeight:i,a=Of(n)!==l||Of(i)!==d;return a&&(n=l,i=d),{width:n,height:i,$:a}}function w1(t){return Di(t)?t:t.contextElement}function Zl(t){const e=w1(t);if(!Fs(e))return Zi(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:l}=FS(e);let d=(l?Of(n.width):n.width)/i,a=(l?Of(n.height):n.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!a||!Number.isFinite(a))&&(a=1),{x:d,y:a}}const XR=Zi(0);function HS(t){const e=Fr(t);return!S1()||!e.visualViewport?XR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Fr(t)?!1:e}function Ma(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=w1(t);let d=Zi(1);e&&(i?Di(i)&&(d=Zl(i)):d=Zl(t));const a=QR(l,n,i)?HS(l):Zi(0);let u=(o.left+a.x)/d.x,f=(o.top+a.y)/d.y,p=o.width/d.x,h=o.height/d.y;if(l){const v=Fr(l),S=i&&Di(i)?Fr(i):i;let C=v,w=Ng(C);for(;w&&i&&S!==C;){const _=Zl(w),b=w.getBoundingClientRect(),y=Mi(w),x=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*_.x,k=b.top+(w.clientTop+parseFloat(y.paddingTop))*_.y;u*=_.x,f*=_.y,p*=_.x,h*=_.y,u+=x,f+=k,C=Fr(w),w=Ng(C)}}return If({width:p,height:h,x:u,y:f})}function hh(t,e){const n=fh(t).scrollLeft;return e?e.left+n:Ma(es(t)).left+n}function US(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-hh(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function ZR(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const l=o==="fixed",d=es(i),a=e?dh(e.floating):!1;if(i===d||a&&l)return n;let u={scrollLeft:0,scrollTop:0},f=Zi(1);const p=Zi(0),h=Fs(i);if((h||!h&&!l)&&((gc(i)!=="body"||Qu(d))&&(u=fh(i)),h)){const S=Ma(i);f=Zl(i),p.x=S.x+i.clientLeft,p.y=S.y+i.clientTop}const v=d&&!h&&!l?US(d,u):Zi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+p.x+v.x,y:n.y*f.y-u.scrollTop*f.y+p.y+v.y}}function JR(t){return Array.from(t.getClientRects())}function eT(t){const e=es(t),n=fh(t),i=t.ownerDocument.body,o=Br(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),l=Br(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let d=-n.scrollLeft+hh(t);const a=-n.scrollTop;return Mi(i).direction==="rtl"&&(d+=Br(e.clientWidth,i.clientWidth)-o),{width:o,height:l,x:d,y:a}}const ab=25;function tT(t,e){const n=Fr(t),i=es(t),o=n.visualViewport;let l=i.clientWidth,d=i.clientHeight,a=0,u=0;if(o){l=o.width,d=o.height;const p=S1();(!p||p&&e==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const f=hh(i);if(f<=0){const p=i.ownerDocument,h=p.body,v=getComputedStyle(h),S=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-S);C<=ab&&(l-=C)}else f<=ab&&(l+=f);return{width:l,height:d,x:a,y:u}}function nT(t,e){const n=Ma(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,l=Fs(t)?Zl(t):Zi(1),d=t.clientWidth*l.x,a=t.clientHeight*l.y,u=o*l.x,f=i*l.y;return{width:d,height:a,x:u,y:f}}function lb(t,e,n){let i;if(e==="viewport")i=tT(t,n);else if(e==="document")i=eT(es(t));else if(Di(e))i=nT(e,n);else{const o=HS(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return If(i)}function $S(t,e){const n=jo(t);return n===e||!Di(n)||nc(n)?!1:Mi(n).position==="fixed"||$S(n,e)}function rT(t,e){const n=e.get(t);if(n)return n;let i=Ou(t,[],!1).filter(a=>Di(a)&&gc(a)!=="body"),o=null;const l=Mi(t).position==="fixed";let d=l?jo(t):t;for(;Di(d)&&!nc(d);){const a=Mi(d),u=x1(d);!u&&a.position==="fixed"&&(o=null),(l?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Qu(d)&&!u&&$S(t,d))?i=i.filter(p=>p!==d):o=a,d=jo(d)}return e.set(t,i),i}function iT(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const d=[...n==="clippingAncestors"?dh(e)?[]:rT(e,this._c):[].concat(n),i],a=lb(e,d[0],o);let u=a.top,f=a.right,p=a.bottom,h=a.left;for(let v=1;v<d.length;v++){const S=lb(e,d[v],o);u=Br(S.top,u),f=Mo(S.right,f),p=Mo(S.bottom,p),h=Br(S.left,h)}return{width:f-h,height:p-u,x:h,y:u}}function sT(t){const{width:e,height:n}=FS(t);return{width:e,height:n}}function oT(t,e,n){const i=Fs(e),o=es(e),l=n==="fixed",d=Ma(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const u=Zi(0);function f(){u.x=hh(o)}if(i||!i&&!l)if((gc(e)!=="body"||Qu(o))&&(a=fh(e)),i){const S=Ma(e,!0,l,e);u.x=S.x+e.clientLeft,u.y=S.y+e.clientTop}else o&&f();l&&!i&&o&&f();const p=o&&!i&&!l?US(o,a):Zi(0),h=d.left+a.scrollLeft-u.x-p.x,v=d.top+a.scrollTop-u.y-p.y;return{x:h,y:v,width:d.width,height:d.height}}function Wm(t){return Mi(t).position==="static"}function cb(t,e){if(!Fs(t)||Mi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return es(t)===n&&(n=n.ownerDocument.body),n}function qS(t,e){const n=Fr(t);if(dh(t))return n;if(!Fs(t)){let o=jo(t);for(;o&&!nc(o);){if(Di(o)&&!Wm(o))return o;o=jo(o)}return n}let i=cb(t,e);for(;i&&WR(i)&&Wm(i);)i=cb(i,e);return i&&nc(i)&&Wm(i)&&!x1(i)?n:i||YR(t)||n}const aT=async function(t){const e=this.getOffsetParent||qS,n=this.getDimensions,i=await n(t.floating);return{reference:oT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function lT(t){return Mi(t).direction==="rtl"}const cT={convertOffsetParentRelativeRectToViewportRelativeRect:ZR,getDocumentElement:es,getClippingRect:iT,getOffsetParent:qS,getElementRects:aT,getClientRects:JR,getDimensions:sT,getScale:Zl,isElement:Di,isRTL:lT};function VS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function uT(t,e){let n=null,i;const o=es(t);function l(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function d(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),l();const f=t.getBoundingClientRect(),{left:p,top:h,width:v,height:S}=f;if(a||e(),!v||!S)return;const C=vf(h),w=vf(o.clientWidth-(p+v)),_=vf(o.clientHeight-(h+S)),b=vf(p),x={rootMargin:-C+"px "+-w+"px "+-_+"px "+-b+"px",threshold:Br(0,Mo(1,u))||1};let k=!0;function N(A){const M=A[0].intersectionRatio;if(M!==u){if(!k)return d();M?d(!1,M):i=setTimeout(()=>{d(!1,1e-7)},1e3)}M===1&&!VS(f,t.getBoundingClientRect())&&d(),k=!1}try{n=new IntersectionObserver(N,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,x)}n.observe(t)}return d(!0),l}function dT(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,f=w1(t),p=o||l?[...f?Ou(f):[],...e?Ou(e):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),l&&b.addEventListener("resize",n)});const h=f&&a?uT(f,n):null;let v=-1,S=null;d&&(S=new ResizeObserver(b=>{let[y]=b;y&&y.target===f&&S&&e&&(S.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=S)==null||x.observe(e)})),n()}),f&&!u&&S.observe(f),e&&S.observe(e));let C,w=u?Ma(t):null;u&&_();function _(){const b=Ma(t);w&&!VS(w,b)&&n(),w=b,C=requestAnimationFrame(_)}return n(),()=>{var b;p.forEach(y=>{o&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),h==null||h(),(b=S)==null||b.disconnect(),S=null,u&&cancelAnimationFrame(C)}}const fT=UR,hT=$R,pT=PR,mT=VR,gT=FR,ub=zR,vT=qR,_T=(t,e,n)=>{const i=new Map,o={platform:cT,...n},l={...o.platform,_c:i};return BR(t,e,{...o,platform:l})};var yT=typeof document<"u",bT=function(){},Af=yT?D.useLayoutEffect:bT;function Bf(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Bf(t[i],e[i]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&t.$$typeof)&&!Bf(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function WS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function db(t,e){const n=WS(t);return Math.round(e*n)/n}function Gm(t){const e=D.useRef(t);return Af(()=>{e.current=t}),e}function xT(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:d}={},transform:a=!0,whileElementsMounted:u,open:f}=t,[p,h]=D.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[v,S]=D.useState(i);Bf(v,i)||S(i);const[C,w]=D.useState(null),[_,b]=D.useState(null),y=D.useCallback(Q=>{Q!==A.current&&(A.current=Q,w(Q))},[]),x=D.useCallback(Q=>{Q!==M.current&&(M.current=Q,b(Q))},[]),k=l||C,N=d||_,A=D.useRef(null),M=D.useRef(null),T=D.useRef(p),j=u!=null,O=Gm(u),z=Gm(o),q=Gm(f),$=D.useCallback(()=>{if(!A.current||!M.current)return;const Q={placement:e,strategy:n,middleware:v};z.current&&(Q.platform=z.current),_T(A.current,M.current,Q).then(I=>{const L={...I,isPositioned:q.current!==!1};V.current&&!Bf(T.current,L)&&(T.current=L,Wu.flushSync(()=>{h(L)}))})},[v,e,n,z,q]);Af(()=>{f===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(Q=>({...Q,isPositioned:!1})))},[f]);const V=D.useRef(!1);Af(()=>(V.current=!0,()=>{V.current=!1}),[]),Af(()=>{if(k&&(A.current=k),N&&(M.current=N),k&&N){if(O.current)return O.current(k,N,$);$()}},[k,N,$,O,j]);const K=D.useMemo(()=>({reference:A,floating:M,setReference:y,setFloating:x}),[y,x]),G=D.useMemo(()=>({reference:k,floating:N}),[k,N]),Y=D.useMemo(()=>{const Q={position:n,left:0,top:0};if(!G.floating)return Q;const I=db(G.floating,p.x),L=db(G.floating,p.y);return a?{...Q,transform:"translate("+I+"px, "+L+"px)",...WS(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:L}},[n,a,G.floating,p.x,p.y]);return D.useMemo(()=>({...p,update:$,refs:K,elements:G,floatingStyles:Y}),[p,$,K,G,Y])}const ST=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:o}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?ub({element:i.current,padding:o}).fn(n):{}:i?ub({element:i,padding:o}).fn(n):{}}}},wT=(t,e)=>{const n=fT(t);return{name:n.name,fn:n.fn,options:[t,e]}},CT=(t,e)=>{const n=hT(t);return{name:n.name,fn:n.fn,options:[t,e]}},kT=(t,e)=>({fn:vT(t).fn,options:[t,e]}),ET=(t,e)=>{const n=pT(t);return{name:n.name,fn:n.fn,options:[t,e]}},AT=(t,e)=>{const n=mT(t);return{name:n.name,fn:n.fn,options:[t,e]}},RT=(t,e)=>{const n=gT(t);return{name:n.name,fn:n.fn,options:[t,e]}},TT=(t,e)=>{const n=ST(t);return{name:n.name,fn:n.fn,options:[t,e]}};var NT="Arrow",GS=D.forwardRef((t,e)=>{const{children:n,width:i=10,height:o=5,...l}=t;return g.jsx(qe.svg,{...l,ref:e,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});GS.displayName=NT;var DT=GS,C1="Popper",[KS,zo]=Ur(C1),[MT,YS]=KS(C1),XS=t=>{const{__scopePopper:e,children:n}=t,[i,o]=D.useState(null);return g.jsx(MT,{scope:e,anchor:i,onAnchorChange:o,children:n})};XS.displayName=C1;var QS="PopperAnchor",ZS=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...o}=t,l=YS(QS,n),d=D.useRef(null),a=vt(e,d),u=D.useRef(null);return D.useEffect(()=>{const f=u.current;u.current=(i==null?void 0:i.current)||d.current,f!==u.current&&l.onAnchorChange(u.current)}),i?null:g.jsx(qe.div,{...o,ref:a})});ZS.displayName=QS;var k1="PopperContent",[jT,OT]=KS(k1),JS=D.forwardRef((t,e)=>{var W,U,te,ie,ae,se,ge,Te;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:d=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:S="optimized",onPlaced:C,...w}=t,_=YS(k1,n),[b,y]=D.useState(null),x=vt(e,Me=>y(Me)),[k,N]=D.useState(null),A=kR(k),M=(W=A==null?void 0:A.width)!=null?W:0,T=(U=A==null?void 0:A.height)!=null?U:0,j=i+(l!=="center"?"-"+l:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},z=Array.isArray(f)?f:[f],q=z.length>0,$={padding:O,boundary:z.filter(IT),altBoundary:q},{refs:V,floatingStyles:K,placement:G,isPositioned:Y,middlewareData:Q}=xT({strategy:"fixed",placement:j,whileElementsMounted:(...Me)=>dT(...Me,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[wT({mainAxis:o+T,alignmentAxis:d}),u&&CT({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?kT():void 0,...$}),u&&ET({...$}),AT({...$,apply:({elements:Me,rects:Ke,availableWidth:Re,availableHeight:et})=>{const{width:Ze,height:Ge}=Ke.reference,rt=Me.floating.style;rt.setProperty("--radix-popper-available-width",`${Re}px`),rt.setProperty("--radix-popper-available-height",`${et}px`),rt.setProperty("--radix-popper-anchor-width",`${Ze}px`),rt.setProperty("--radix-popper-anchor-height",`${Ge}px`)}}),k&&TT({element:k,padding:a}),BT({arrowWidth:M,arrowHeight:T}),v&&RT({strategy:"referenceHidden",...$})]}),[I,L]=n2(G),B=Hn(C);An(()=>{Y&&(B==null||B())},[Y,B]);const H=(te=Q.arrow)==null?void 0:te.x,F=(ie=Q.arrow)==null?void 0:ie.y,J=((ae=Q.arrow)==null?void 0:ae.centerOffset)!==0,[ne,Z]=D.useState();return An(()=>{b&&Z(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Y?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(se=Q.transformOrigin)==null?void 0:se.x,(ge=Q.transformOrigin)==null?void 0:ge.y].join(" "),...((Te=Q.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(jT,{scope:n,placedSide:I,onArrowChange:N,arrowX:H,arrowY:F,shouldHideArrow:J,children:g.jsx(qe.div,{"data-side":I,"data-align":L,...w,ref:x,style:{...w.style,animation:Y?void 0:"none"}})})})});JS.displayName=k1;var e2="PopperArrow",LT={top:"bottom",right:"left",bottom:"top",left:"right"},t2=D.forwardRef(function(e,n){const{__scopePopper:i,...o}=e,l=OT(e2,i),d=LT[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:g.jsx(DT,{...o,ref:n,style:{...o.style,display:"block"}})})});t2.displayName=e2;function IT(t){return t!==null}var BT=t=>({name:"transformOrigin",options:t,fn(e){var _,b,y,x,k;const{placement:n,rects:i,middlewareData:o}=e,d=((_=o.arrow)==null?void 0:_.centerOffset)!==0,a=d?0:t.arrowWidth,u=d?0:t.arrowHeight,[f,p]=n2(n),h={start:"0%",center:"50%",end:"100%"}[p],v=((y=(b=o.arrow)==null?void 0:b.x)!=null?y:0)+a/2,S=((k=(x=o.arrow)==null?void 0:x.y)!=null?k:0)+u/2;let C="",w="";return f==="bottom"?(C=d?h:`${v}px`,w=`${-u}px`):f==="top"?(C=d?h:`${v}px`,w=`${i.floating.height+u}px`):f==="right"?(C=`${-u}px`,w=d?h:`${S}px`):f==="left"&&(C=`${i.floating.width+u}px`,w=d?h:`${S}px`),{data:{x:C,y:w}}}});function n2(t){const[e,n="center"]=t.split("-");return[e,n]}var ph=XS,Zu=ZS,mh=JS,gh=t2,Km="rovingFocusGroup.onEntryFocus",zT={bubbles:!1,cancelable:!0},Ju="RovingFocusGroup",[Dg,r2,PT]=a1(Ju),[FT,vh]=Ur(Ju,[PT]),[HT,UT]=FT(Ju),i2=D.forwardRef((t,e)=>g.jsx(Dg.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(Dg.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx($T,{...t,ref:e})})}));i2.displayName=Ju;var $T=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:d,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=t,v=D.useRef(null),S=vt(e,v),C=Ku(l),[w,_]=Bs({prop:d,defaultProp:a!=null?a:null,onChange:u,caller:Ju}),[b,y]=D.useState(!1),x=Hn(f),k=r2(n),N=D.useRef(!1),[A,M]=D.useState(0);return D.useEffect(()=>{const T=v.current;if(T)return T.addEventListener(Km,x),()=>T.removeEventListener(Km,x)},[x]),g.jsx(HT,{scope:n,orientation:i,dir:C,loop:o,currentTabStopId:w,onItemFocus:D.useCallback(T=>_(T),[_]),onItemShiftTab:D.useCallback(()=>y(!0),[]),onFocusableItemAdd:D.useCallback(()=>M(T=>T+1),[]),onFocusableItemRemove:D.useCallback(()=>M(T=>T-1),[]),children:g.jsx(qe.div,{tabIndex:b||A===0?-1:0,"data-orientation":i,...h,ref:S,style:{outline:"none",...t.style},onMouseDown:Oe(t.onMouseDown,()=>{N.current=!0}),onFocus:Oe(t.onFocus,T=>{const j=!N.current;if(T.target===T.currentTarget&&j&&!b){const O=new CustomEvent(Km,zT);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const z=k().filter(G=>G.focusable),q=z.find(G=>G.active),$=z.find(G=>G.id===w),K=[q,$,...z].filter(Boolean).map(G=>G.ref.current);a2(K,p)}}N.current=!1}),onBlur:Oe(t.onBlur,()=>y(!1))})})}),s2="RovingFocusGroupItem",o2=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:d,...a}=t,u=wn(),f=l||u,p=UT(s2,n),h=p.currentTabStopId===f,v=r2(n),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:w}=p;return D.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),g.jsx(Dg.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:g.jsx(qe.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...a,ref:e,onMouseDown:Oe(t.onMouseDown,_=>{i?p.onItemFocus(f):_.preventDefault()}),onFocus:Oe(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:Oe(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){p.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const b=WT(_,p.orientation,p.dir);if(b!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let x=v().filter(k=>k.focusable).map(k=>k.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const k=x.indexOf(_.currentTarget);x=p.loop?GT(x,k+1):x.slice(k+1)}setTimeout(()=>a2(x))}}),children:typeof d=="function"?d({isCurrentTabStop:h,hasTabStop:w!=null}):d})})});o2.displayName=s2;var qT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VT(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function WT(t,e,n){const i=VT(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return qT[i]}function a2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function GT(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var l2=i2,c2=o2,Mg=["Enter"," "],KT=["ArrowDown","PageUp","Home"],u2=["ArrowUp","PageDown","End"],YT=[...KT,...u2],XT={ltr:[...Mg,"ArrowRight"],rtl:[...Mg,"ArrowLeft"]},QT={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ed="Menu",[Lu,ZT,JT]=a1(ed),[Ba,d2]=Ur(ed,[JT,zo,vh]),_h=zo(),f2=vh(),[e6,za]=Ba(ed),[t6,td]=Ba(ed),h2=t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:o,onOpenChange:l,modal:d=!0}=t,a=_h(e),[u,f]=D.useState(null),p=D.useRef(!1),h=Hn(l),v=Ku(o);return D.useEffect(()=>{const S=()=>{p.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>p.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),g.jsx(ph,{...a,children:g.jsx(e6,{scope:e,open:n,onOpenChange:h,content:u,onContentChange:f,children:g.jsx(t6,{scope:e,onClose:D.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:v,modal:d,children:i})})})};h2.displayName=ed;var n6="MenuAnchor",E1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=_h(n);return g.jsx(Zu,{...o,...i,ref:e})});E1.displayName=n6;var A1="MenuPortal",[r6,p2]=Ba(A1,{forceMount:void 0}),m2=t=>{const{__scopeMenu:e,forceMount:n,children:i,container:o}=t,l=za(A1,e);return g.jsx(r6,{scope:e,forceMount:n,children:g.jsx(Rn,{present:n||l.open,children:g.jsx(pc,{asChild:!0,container:o,children:i})})})};m2.displayName=A1;var oi="MenuContent",[i6,R1]=Ba(oi),g2=D.forwardRef((t,e)=>{const n=p2(oi,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=za(oi,t.__scopeMenu),d=td(oi,t.__scopeMenu);return g.jsx(Lu.Provider,{scope:t.__scopeMenu,children:g.jsx(Rn,{present:i||l.open,children:g.jsx(Lu.Slot,{scope:t.__scopeMenu,children:d.modal?g.jsx(s6,{...o,ref:e}):g.jsx(o6,{...o,ref:e})})})})}),s6=D.forwardRef((t,e)=>{const n=za(oi,t.__scopeMenu),i=D.useRef(null),o=vt(e,i);return D.useEffect(()=>{const l=i.current;if(l)return ah(l)},[]),g.jsx(T1,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),o6=D.forwardRef((t,e)=>{const n=za(oi,t.__scopeMenu);return g.jsx(T1,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),a6=Do("MenuContent.ScrollLock"),T1=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:d,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:v,onDismiss:S,disableOutsideScroll:C,...w}=t,_=za(oi,n),b=td(oi,n),y=_h(n),x=f2(n),k=ZT(n),[N,A]=D.useState(null),M=D.useRef(null),T=vt(e,M,_.onContentChange),j=D.useRef(0),O=D.useRef(""),z=D.useRef(0),q=D.useRef(null),$=D.useRef("right"),V=D.useRef(0),K=C?Xu:D.Fragment,G=C?{as:a6,allowPinchZoom:!0}:void 0,Y=I=>{var W,U;const L=O.current+I,B=k().filter(te=>!te.disabled),H=document.activeElement,F=(W=B.find(te=>te.ref.current===H))==null?void 0:W.textValue,J=B.map(te=>te.textValue),ne=y6(J,L,F),Z=(U=B.find(te=>te.textValue===ne))==null?void 0:U.ref.current;(function te(ie){O.current=ie,window.clearTimeout(j.current),ie!==""&&(j.current=window.setTimeout(()=>te(""),1e3))})(L),Z&&setTimeout(()=>Z.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),sh();const Q=D.useCallback(I=>{var B,H;return $.current===((B=q.current)==null?void 0:B.side)&&x6(I,(H=q.current)==null?void 0:H.area)},[]);return g.jsx(i6,{scope:n,searchRef:O,onItemEnter:D.useCallback(I=>{Q(I)&&I.preventDefault()},[Q]),onItemLeave:D.useCallback(I=>{var L;Q(I)||((L=M.current)==null||L.focus(),A(null))},[Q]),onTriggerLeave:D.useCallback(I=>{Q(I)&&I.preventDefault()},[Q]),pointerGraceTimerRef:z,onPointerGraceIntentChange:D.useCallback(I=>{q.current=I},[]),children:g.jsx(K,{...G,children:g.jsx(Yu,{asChild:!0,trapped:o,onMountAutoFocus:Oe(l,I=>{var L;I.preventDefault(),(L=M.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:g.jsx(hc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:v,onDismiss:S,children:g.jsx(l2,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:Oe(u,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(mh,{role:"menu","aria-orientation":"vertical","data-state":M2(_.open),"data-radix-menu-content":"",dir:b.dir,...y,...w,ref:T,style:{outline:"none",...w.style},onKeyDown:Oe(w.onKeyDown,I=>{const B=I.target.closest("[data-radix-menu-content]")===I.currentTarget,H=I.ctrlKey||I.altKey||I.metaKey,F=I.key.length===1;B&&(I.key==="Tab"&&I.preventDefault(),!H&&F&&Y(I.key));const J=M.current;if(I.target!==J||!YT.includes(I.key))return;I.preventDefault();const Z=k().filter(W=>!W.disabled).map(W=>W.ref.current);u2.includes(I.key)&&Z.reverse(),v6(Z)}),onBlur:Oe(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:Oe(t.onPointerMove,Iu(I=>{const L=I.target,B=V.current!==I.clientX;if(I.currentTarget.contains(L)&&B){const H=I.clientX>V.current?"right":"left";$.current=H,V.current=I.clientX}}))})})})})})})});g2.displayName=oi;var l6="MenuGroup",N1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{role:"group",...i,ref:e})});N1.displayName=l6;var c6="MenuLabel",v2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{...i,ref:e})});v2.displayName=c6;var zf="MenuItem",fb="menu.itemSelect",yh=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:i,...o}=t,l=D.useRef(null),d=td(zf,t.__scopeMenu),a=R1(zf,t.__scopeMenu),u=vt(e,l),f=D.useRef(!1),p=()=>{const h=l.current;if(!n&&h){const v=new CustomEvent(fb,{bubbles:!0,cancelable:!0});h.addEventListener(fb,S=>i==null?void 0:i(S),{once:!0}),eS(h,v),v.defaultPrevented?f.current=!1:d.onClose()}};return g.jsx(_2,{...o,ref:u,disabled:n,onClick:Oe(t.onClick,p),onPointerDown:h=>{var v;(v=t.onPointerDown)==null||v.call(t,h),f.current=!0},onPointerUp:Oe(t.onPointerUp,h=>{var v;f.current||(v=h.currentTarget)==null||v.click()}),onKeyDown:Oe(t.onKeyDown,h=>{const v=a.searchRef.current!=="";n||v&&h.key===" "||Mg.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});yh.displayName=zf;var _2=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=t,d=R1(zf,n),a=f2(n),u=D.useRef(null),f=vt(e,u),[p,h]=D.useState(!1),[v,S]=D.useState("");return D.useEffect(()=>{var w;const C=u.current;C&&S(((w=C.textContent)!=null?w:"").trim())},[l.children]),g.jsx(Lu.ItemSlot,{scope:n,disabled:i,textValue:o!=null?o:v,children:g.jsx(c2,{asChild:!0,...a,focusable:!i,children:g.jsx(qe.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:f,onPointerMove:Oe(t.onPointerMove,Iu(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(t.onPointerLeave,Iu(C=>d.onItemLeave(C))),onFocus:Oe(t.onFocus,()=>h(!0)),onBlur:Oe(t.onBlur,()=>h(!1))})})})}),u6="MenuCheckboxItem",y2=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:i,...o}=t;return g.jsx(C2,{scope:t.__scopeMenu,checked:n,children:g.jsx(yh,{role:"menuitemcheckbox","aria-checked":Pf(n)?"mixed":n,...o,ref:e,"data-state":M1(n),onSelect:Oe(o.onSelect,()=>i==null?void 0:i(Pf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});y2.displayName=u6;var b2="MenuRadioGroup",[d6,f6]=Ba(b2,{value:void 0,onValueChange:()=>{}}),x2=D.forwardRef((t,e)=>{const{value:n,onValueChange:i,...o}=t,l=Hn(i);return g.jsx(d6,{scope:t.__scopeMenu,value:n,onValueChange:l,children:g.jsx(N1,{...o,ref:e})})});x2.displayName=b2;var S2="MenuRadioItem",w2=D.forwardRef((t,e)=>{const{value:n,...i}=t,o=f6(S2,t.__scopeMenu),l=n===o.value;return g.jsx(C2,{scope:t.__scopeMenu,checked:l,children:g.jsx(yh,{role:"menuitemradio","aria-checked":l,...i,ref:e,"data-state":M1(l),onSelect:Oe(i.onSelect,()=>{var d;return(d=o.onValueChange)==null?void 0:d.call(o,n)},{checkForDefaultPrevented:!1})})})});w2.displayName=S2;var D1="MenuItemIndicator",[C2,h6]=Ba(D1,{checked:!1}),k2=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:i,...o}=t,l=h6(D1,n);return g.jsx(Rn,{present:i||Pf(l.checked)||l.checked===!0,children:g.jsx(qe.span,{...o,ref:e,"data-state":M1(l.checked)})})});k2.displayName=D1;var p6="MenuSeparator",E2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});E2.displayName=p6;var m6="MenuArrow",A2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=_h(n);return g.jsx(gh,{...o,...i,ref:e})});A2.displayName=m6;var g6="MenuSub",[IH,R2]=Ba(g6),ku="MenuSubTrigger",T2=D.forwardRef((t,e)=>{const n=za(ku,t.__scopeMenu),i=td(ku,t.__scopeMenu),o=R2(ku,t.__scopeMenu),l=R1(ku,t.__scopeMenu),d=D.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=l,f={__scopeMenu:t.__scopeMenu},p=D.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return D.useEffect(()=>p,[p]),D.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),u(null)}},[a,u]),g.jsx(E1,{asChild:!0,...f,children:g.jsx(_2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":M2(n.open),...t,ref:Is(e,o.onTriggerChange),onClick:h=>{var v;(v=t.onClick)==null||v.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(t.onPointerMove,Iu(h=>{l.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!d.current&&(l.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Oe(t.onPointerLeave,Iu(h=>{var S,C;p();const v=(S=n.content)==null?void 0:S.getBoundingClientRect();if(v){const w=(C=n.content)==null?void 0:C.dataset.side,_=w==="right",b=_?-5:5,y=v[_?"left":"right"],x=v[_?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:y,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:y,y:v.bottom}],side:w}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(h),h.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(t.onKeyDown,h=>{var S;const v=l.searchRef.current!=="";t.disabled||v&&h.key===" "||XT[i.dir].includes(h.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),h.preventDefault())})})})});T2.displayName=ku;var N2="MenuSubContent",D2=D.forwardRef((t,e)=>{const n=p2(oi,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=za(oi,t.__scopeMenu),d=td(oi,t.__scopeMenu),a=R2(N2,t.__scopeMenu),u=D.useRef(null),f=vt(e,u);return g.jsx(Lu.Provider,{scope:t.__scopeMenu,children:g.jsx(Rn,{present:i||l.open,children:g.jsx(Lu.Slot,{scope:t.__scopeMenu,children:g.jsx(T1,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:f,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var h;d.isUsingKeyboardRef.current&&((h=u.current)==null||h.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Oe(t.onFocusOutside,p=>{p.target!==a.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Oe(t.onEscapeKeyDown,p=>{d.onClose(),p.preventDefault()}),onKeyDown:Oe(t.onKeyDown,p=>{var S;const h=p.currentTarget.contains(p.target),v=QT[d.dir].includes(p.key);h&&v&&(l.onOpenChange(!1),(S=a.trigger)==null||S.focus(),p.preventDefault())})})})})})});D2.displayName=N2;function M2(t){return t?"open":"closed"}function Pf(t){return t==="indeterminate"}function M1(t){return Pf(t)?"indeterminate":t?"checked":"unchecked"}function v6(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function _6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function y6(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let d=_6(t,Math.max(l,0));o.length===1&&(d=d.filter(f=>f!==n));const u=d.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function b6(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,d=e.length-1;l<e.length;d=l++){const a=e[l],u=e[d],f=a.x,p=a.y,h=u.x,v=u.y;p>i!=v>i&&n<(h-f)*(i-p)/(v-p)+f&&(o=!o)}return o}function x6(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return b6(n,e)}function Iu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var S6=h2,w6=E1,C6=m2,k6=g2,E6=N1,A6=v2,R6=yh,T6=y2,N6=x2,D6=w2,M6=k2,j6=E2,O6=A2,L6=T2,I6=D2,bh="DropdownMenu",[B6]=Ur(bh,[d2]),nr=d2(),[z6,j2]=B6(bh),O2=t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:d,modal:a=!0}=t,u=nr(e),f=D.useRef(null),[p,h]=Bs({prop:o,defaultProp:l!=null?l:!1,onChange:d,caller:bh});return g.jsx(z6,{scope:e,triggerId:wn(),triggerRef:f,contentId:wn(),open:p,onOpenChange:h,onOpenToggle:D.useCallback(()=>h(v=>!v),[h]),modal:a,children:g.jsx(S6,{...u,open:p,onOpenChange:h,dir:i,modal:a,children:n})})};O2.displayName=bh;var L2="DropdownMenuTrigger",I2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=t,l=j2(L2,n),d=nr(n);return g.jsx(w6,{asChild:!0,...d,children:g.jsx(qe.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:Is(e,l.triggerRef),onPointerDown:Oe(t.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(l.onOpenToggle(),l.open||a.preventDefault())}),onKeyDown:Oe(t.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&l.onOpenToggle(),a.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});I2.displayName=L2;var P6="DropdownMenuPortal",B2=t=>{const{__scopeDropdownMenu:e,...n}=t,i=nr(e);return g.jsx(C6,{...i,...n})};B2.displayName=P6;var z2="DropdownMenuContent",P2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=j2(z2,n),l=nr(n),d=D.useRef(!1);return g.jsx(k6,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:e,onCloseAutoFocus:Oe(t.onCloseAutoFocus,a=>{var u;d.current||(u=o.triggerRef.current)==null||u.focus(),d.current=!1,a.preventDefault()}),onInteractOutside:Oe(t.onInteractOutside,a=>{const u=a.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,p=u.button===2||f;(!o.modal||p)&&(d.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});P2.displayName=z2;var F6="DropdownMenuGroup",H6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(E6,{...o,...i,ref:e})});H6.displayName=F6;var U6="DropdownMenuLabel",$6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(A6,{...o,...i,ref:e})});$6.displayName=U6;var q6="DropdownMenuItem",F2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(R6,{...o,...i,ref:e})});F2.displayName=q6;var V6="DropdownMenuCheckboxItem",W6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(T6,{...o,...i,ref:e})});W6.displayName=V6;var G6="DropdownMenuRadioGroup",K6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(N6,{...o,...i,ref:e})});K6.displayName=G6;var Y6="DropdownMenuRadioItem",X6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(D6,{...o,...i,ref:e})});X6.displayName=Y6;var Q6="DropdownMenuItemIndicator",Z6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(M6,{...o,...i,ref:e})});Z6.displayName=Q6;var J6="DropdownMenuSeparator",eN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(j6,{...o,...i,ref:e})});eN.displayName=J6;var tN="DropdownMenuArrow",nN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(O6,{...o,...i,ref:e})});nN.displayName=tN;var rN="DropdownMenuSubTrigger",iN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(L6,{...o,...i,ref:e})});iN.displayName=rN;var sN="DropdownMenuSubContent",oN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=nr(n);return g.jsx(I6,{...o,...i,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oN.displayName=sN;var aN=O2,lN=I2,cN=B2,uN=P2,dN=F2,fN="Label",H2=D.forwardRef((t,e)=>g.jsx(qe.label,{...t,ref:e,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));H2.displayName=fN;var hN=H2;function jg(t,[e,n]){return Math.min(n,Math.max(e,t))}var xh="Popover",[U2]=Ur(xh,[zo]),nd=zo(),[pN,Po]=U2(xh),$2=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:d=!1}=t,a=nd(e),u=D.useRef(null),[f,p]=D.useState(!1),[h,v]=Bs({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:xh});return g.jsx(ph,{...a,children:g.jsx(pN,{scope:e,contentId:wn(),triggerRef:u,open:h,onOpenChange:v,onOpenToggle:D.useCallback(()=>v(S=>!S),[v]),hasCustomAnchor:f,onCustomAnchorAdd:D.useCallback(()=>p(!0),[]),onCustomAnchorRemove:D.useCallback(()=>p(!1),[]),modal:d,children:n})})};$2.displayName=xh;var q2="PopoverAnchor",V2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Po(q2,n),l=nd(n),{onCustomAnchorAdd:d,onCustomAnchorRemove:a}=o;return D.useEffect(()=>(d(),()=>a()),[d,a]),g.jsx(Zu,{...l,...i,ref:e})});V2.displayName=q2;var W2="PopoverTrigger",G2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Po(W2,n),l=nd(n),d=vt(e,o.triggerRef),a=g.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Z2(o.open),...i,ref:d,onClick:Oe(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:g.jsx(Zu,{asChild:!0,...l,children:a})});G2.displayName=W2;var j1="PopoverPortal",[mN,gN]=U2(j1,{forceMount:void 0}),K2=t=>{const{__scopePopover:e,forceMount:n,children:i,container:o}=t,l=Po(j1,e);return g.jsx(mN,{scope:e,forceMount:n,children:g.jsx(Rn,{present:n||l.open,children:g.jsx(pc,{asChild:!0,container:o,children:i})})})};K2.displayName=j1;var rc="PopoverContent",Y2=D.forwardRef((t,e)=>{const n=gN(rc,t.__scopePopover),{forceMount:i=n.forceMount,...o}=t,l=Po(rc,t.__scopePopover);return g.jsx(Rn,{present:i||l.open,children:l.modal?g.jsx(_N,{...o,ref:e}):g.jsx(yN,{...o,ref:e})})});Y2.displayName=rc;var vN=Do("PopoverContent.RemoveScroll"),_N=D.forwardRef((t,e)=>{const n=Po(rc,t.__scopePopover),i=D.useRef(null),o=vt(e,i),l=D.useRef(!1);return D.useEffect(()=>{const d=i.current;if(d)return ah(d)},[]),g.jsx(Xu,{as:vN,allowPinchZoom:!0,children:g.jsx(X2,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,d=>{var a;d.preventDefault(),l.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,d=>{const a=d.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,f=a.button===2||u;l.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),yN=D.forwardRef((t,e)=>{const n=Po(rc,t.__scopePopover),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(X2,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,a;(d=t.onCloseAutoFocus)==null||d.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),X2=D.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,...h}=t,v=Po(rc,n),S=nd(n);return sh(),g.jsx(Yu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(hc,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>v.onOpenChange(!1),children:g.jsx(mh,{"data-state":Z2(v.open),role:"dialog",id:v.contentId,...S,...h,ref:e,style:{...h.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)"}})})})}),Q2="PopoverClose",bN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Po(Q2,n);return g.jsx(qe.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});bN.displayName=Q2;var xN="PopoverArrow",SN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=nd(n);return g.jsx(gh,{...o,...i,ref:e})});SN.displayName=xN;function Z2(t){return t?"open":"closed"}var wN=$2,CN=V2,kN=G2,EN=K2,AN=Y2,O1="Progress",L1=100,[RN]=Ur(O1),[TN,NN]=RN(O1),J2=D.forwardRef((t,e)=>{const{__scopeProgress:n,value:i=null,max:o,getValueLabel:l=DN,...d}=t;(o||o===0)&&!hb(o)&&console.error(MN(`${o}`,"Progress"));const a=hb(o)?o:L1;i!==null&&!pb(i,a)&&console.error(jN(`${i}`,"Progress"));const u=pb(i,a)?i:null,f=Ff(u)?l(u,a):void 0;return g.jsx(TN,{scope:n,value:u,max:a,children:g.jsx(qe.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Ff(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":nw(u,a),"data-value":u!=null?u:void 0,"data-max":a,...d,ref:e})})});J2.displayName=O1;var ew="ProgressIndicator",tw=D.forwardRef((t,e)=>{var l;const{__scopeProgress:n,...i}=t,o=NN(ew,n);return g.jsx(qe.div,{"data-state":nw(o.value,o.max),"data-value":(l=o.value)!=null?l:void 0,"data-max":o.max,...i,ref:e})});tw.displayName=ew;function DN(t,e){return`${Math.round(t/e*100)}%`}function nw(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Ff(t){return typeof t=="number"}function hb(t){return Ff(t)&&!isNaN(t)&&t>0}function pb(t,e){return Ff(t)&&!isNaN(t)&&t<=e&&t>=0}function MN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${L1}\`.`}function jN(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
502
- - a positive number
503
- - less than the value passed to \`max\` (or ${L1} if no \`max\` prop is set)
504
- - \`null\` or \`undefined\` if the progress is indeterminate.
505
-
506
- Defaulting to \`null\`.`}var ON=J2,LN=tw;function IN(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var I1="ScrollArea",[rw]=Ur(I1),[BN,ai]=rw(I1),iw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:i="hover",dir:o,scrollHideDelay:l=600,...d}=t,[a,u]=D.useState(null),[f,p]=D.useState(null),[h,v]=D.useState(null),[S,C]=D.useState(null),[w,_]=D.useState(null),[b,y]=D.useState(0),[x,k]=D.useState(0),[N,A]=D.useState(!1),[M,T]=D.useState(!1),j=vt(e,z=>u(z)),O=Ku(o);return g.jsx(BN,{scope:n,type:i,dir:O,scrollHideDelay:l,scrollArea:a,viewport:f,onViewportChange:p,content:h,onContentChange:v,scrollbarX:S,onScrollbarXChange:C,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:_,scrollbarYEnabled:M,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:k,children:g.jsx(qe.div,{dir:O,...d,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});iw.displayName=I1;var sw="ScrollAreaViewport",ow=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:o,...l}=t,d=ai(sw,n),a=D.useRef(null),u=vt(e,a,d.onViewportChange);return g.jsxs(g.Fragment,{children:[g.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:o}),g.jsx(qe.div,{"data-radix-scroll-area-viewport":"",...l,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});ow.displayName=sw;var ts="ScrollAreaScrollbar",aw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=ai(ts,t.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:d}=o,a=t.orientation==="horizontal";return D.useEffect(()=>(a?l(!0):d(!0),()=>{a?l(!1):d(!1)}),[a,l,d]),o.type==="hover"?g.jsx(zN,{...i,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(PN,{...i,ref:e,forceMount:n}):o.type==="auto"?g.jsx(lw,{...i,ref:e,forceMount:n}):o.type==="always"?g.jsx(B1,{...i,ref:e}):null});aw.displayName=ts;var zN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=ai(ts,t.__scopeScrollArea),[l,d]=D.useState(!1);return D.useEffect(()=>{const a=o.scrollArea;let u=0;if(a){const f=()=>{window.clearTimeout(u),d(!0)},p=()=>{u=window.setTimeout(()=>d(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",p),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(Rn,{present:n||l,children:g.jsx(lw,{"data-state":l?"visible":"hidden",...i,ref:e})})}),PN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=ai(ts,t.__scopeScrollArea),l=t.orientation==="horizontal",d=wh(()=>u("SCROLL_END"),100),[a,u]=IN("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 D.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,o.scrollHideDelay,u]),D.useEffect(()=>{const f=o.viewport,p=l?"scrollLeft":"scrollTop";if(f){let h=f[p];const v=()=>{const S=f[p];h!==S&&(u("SCROLL"),d()),h=S};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[o.viewport,l,u,d]),g.jsx(Rn,{present:n||a!=="hidden",children:g.jsx(B1,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:Oe(t.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Oe(t.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),lw=D.forwardRef((t,e)=>{const n=ai(ts,t.__scopeScrollArea),{forceMount:i,...o}=t,[l,d]=D.useState(!1),a=t.orientation==="horizontal",u=wh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;d(a?f:p)}},10);return ic(n.viewport,u),ic(n.content,u),g.jsx(Rn,{present:i||l,children:g.jsx(B1,{"data-state":l?"visible":"hidden",...o,ref:e})})}),B1=D.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,o=ai(ts,t.__scopeScrollArea),l=D.useRef(null),d=D.useRef(0),[a,u]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=hw(a.viewport,a.content),p={...i,sizes:a,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:v=>l.current=v,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:v=>d.current=v};function h(v,S){return VN(v,d.current,a,S)}return n==="horizontal"?g.jsx(FN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const v=o.viewport.scrollLeft,S=mb(v,a,o.dir);l.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=h(v,o.dir))}}):n==="vertical"?g.jsx(HN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const v=o.viewport.scrollTop,S=mb(v,a);l.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=h(v))}}):null}),FN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=ai(ts,t.__scopeScrollArea),[d,a]=D.useState(),u=D.useRef(null),f=vt(e,u,l.onScrollbarXChange);return D.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(uw,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Sh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const v=l.viewport.scrollLeft+p.deltaX;t.onWheelScroll(v),mw(v,h)&&p.preventDefault()}},onResize:()=>{u.current&&l.viewport&&d&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Uf(d.paddingLeft),paddingEnd:Uf(d.paddingRight)}})}})}),HN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=ai(ts,t.__scopeScrollArea),[d,a]=D.useState(),u=D.useRef(null),f=vt(e,u,l.onScrollbarYChange);return D.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(uw,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Sh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const v=l.viewport.scrollTop+p.deltaY;t.onWheelScroll(v),mw(v,h)&&p.preventDefault()}},onResize:()=>{u.current&&l.viewport&&d&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Uf(d.paddingTop),paddingEnd:Uf(d.paddingBottom)}})}})}),[UN,cw]=rw(ts),uw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:o,onThumbChange:l,onThumbPointerUp:d,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:p,onResize:h,...v}=t,S=ai(ts,n),[C,w]=D.useState(null),_=vt(e,j=>w(j)),b=D.useRef(null),y=D.useRef(""),x=S.viewport,k=i.content-i.viewport,N=Hn(p),A=Hn(u),M=wh(h,10);function T(j){if(b.current){const O=j.clientX-b.current.left,z=j.clientY-b.current.top;f({x:O,y:z})}}return D.useEffect(()=>{const j=O=>{const z=O.target;(C==null?void 0:C.contains(z))&&N(O,k)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[x,C,k,N]),D.useEffect(A,[i,A]),ic(C,M),ic(S.content,M),g.jsx(UN,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Hn(l),onThumbPointerUp:Hn(d),onThumbPositionChange:A,onThumbPointerDown:Hn(a),children:g.jsx(qe.div,{...v,ref:_,style:{position:"absolute",...v.style},onPointerDown:Oe(t.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),b.current=C.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),T(j))}),onPointerMove:Oe(t.onPointerMove,T),onPointerUp:Oe(t.onPointerUp,j=>{const O=j.target;O.hasPointerCapture(j.pointerId)&&O.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=y.current,S.viewport&&(S.viewport.style.scrollBehavior=""),b.current=null})})})}),Hf="ScrollAreaThumb",dw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=cw(Hf,t.__scopeScrollArea);return g.jsx(Rn,{present:n||o.hasThumb,children:g.jsx($N,{ref:e,...i})})}),$N=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...o}=t,l=ai(Hf,n),d=cw(Hf,n),{onThumbPositionChange:a}=d,u=vt(e,h=>d.onThumbChange(h)),f=D.useRef(void 0),p=wh(()=>{f.current&&(f.current(),f.current=void 0)},100);return D.useEffect(()=>{const h=l.viewport;if(h){const v=()=>{if(p(),!f.current){const S=WN(h,a);f.current=S,a()}};return a(),h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[l.viewport,p,a]),g.jsx(qe.div,{"data-state":d.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Oe(t.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),C=h.clientX-S.left,w=h.clientY-S.top;d.onThumbPointerDown({x:C,y:w})}),onPointerUp:Oe(t.onPointerUp,d.onThumbPointerUp)})});dw.displayName=Hf;var z1="ScrollAreaCorner",fw=D.forwardRef((t,e)=>{const n=ai(z1,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?g.jsx(qN,{...t,ref:e}):null});fw.displayName=z1;var qN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,o=ai(z1,n),[l,d]=D.useState(0),[a,u]=D.useState(0),f=!!(l&&a);return ic(o.scrollbarX,()=>{var h;const p=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(p),u(p)}),ic(o.scrollbarY,()=>{var h;const p=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(p),d(p)}),f?g.jsx(qe.div,{...i,ref:e,style:{width:l,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Uf(t){return t?parseInt(t,10):0}function hw(t,e){const n=t/e;return isNaN(n)?0:n}function Sh(t){const e=hw(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function VN(t,e,n,i="ltr"){const o=Sh(n),l=o/2,d=e||l,a=o-d,u=n.scrollbar.paddingStart+d,f=n.scrollbar.size-n.scrollbar.paddingEnd-a,p=n.content-n.viewport,h=i==="ltr"?[0,p]:[p*-1,0];return pw([u,f],h)(t)}function mb(t,e,n="ltr"){const i=Sh(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=e.scrollbar.size-o,d=e.content-e.viewport,a=l-i,u=n==="ltr"?[0,d]:[d*-1,0],f=jg(t,u);return pw([0,d],[0,a])(f)}function pw(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const i=(e[1]-e[0])/(t[1]-t[0]);return e[0]+i*(n-t[0])}}function mw(t,e){return t>0&&t<e}var WN=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},i=0;return(function o(){const l={left:t.scrollLeft,top:t.scrollTop},d=n.left!==l.left,a=n.top!==l.top;(d||a)&&e(),n=l,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function wh(t,e){const n=Hn(t),i=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),D.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,e)},[n,e])}function ic(t,e){const n=Hn(e);An(()=>{let i=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(i),o.unobserve(t)}}},[t,n])}var GN=iw,KN=ow,YN=fw,XN=[" ","Enter","ArrowUp","ArrowDown"],QN=[" ","Enter"],ja="Select",[Ch,kh,ZN]=a1(ja),[vc]=Ur(ja,[ZN,zo]),Eh=zo(),[JN,Fo]=vc(ja),[eD,tD]=vc(ja),gw=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:o,onOpenChange:l,value:d,defaultValue:a,onValueChange:u,dir:f,name:p,autoComplete:h,disabled:v,required:S,form:C}=t,w=Eh(e),[_,b]=D.useState(null),[y,x]=D.useState(null),[k,N]=D.useState(!1),A=Ku(f),[M,T]=Bs({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:ja}),[j,O]=Bs({prop:d,defaultProp:a,onChange:u,caller:ja}),z=D.useRef(null),q=_?C||!!_.closest("form"):!0,[$,V]=D.useState(new Set),K=Array.from($).map(G=>G.props.value).join(";");return g.jsx(ph,{...w,children:g.jsxs(JN,{required:S,scope:e,trigger:_,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:wn(),value:j,onValueChange:O,open:M,onOpenChange:T,dir:A,triggerPointerDownPosRef:z,disabled:v,children:[g.jsx(Ch.Provider,{scope:e,children:g.jsx(eD,{scope:t.__scopeSelect,onNativeOptionAdd:D.useCallback(G=>{V(Y=>new Set(Y).add(G))},[]),onNativeOptionRemove:D.useCallback(G=>{V(Y=>{const Q=new Set(Y);return Q.delete(G),Q})},[]),children:n})}),q?g.jsxs(Fw,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:j,onChange:G=>O(G.target.value),disabled:v,form:C,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from($)]},K):null]})})};gw.displayName=ja;var vw="SelectTrigger",_w=D.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...o}=t,l=Eh(n),d=Fo(vw,n),a=d.disabled||i,u=vt(e,d.onTriggerChange),f=kh(n),p=D.useRef("touch"),[h,v,S]=Uw(w=>{const _=f().filter(x=>!x.disabled),b=_.find(x=>x.value===d.value),y=$w(_,w,b);y!==void 0&&d.onValueChange(y.value)}),C=w=>{a||(d.onOpenChange(!0),S()),w&&(d.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(Zu,{asChild:!0,...l,children:g.jsx(qe.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Hw(d.value)?"":void 0,...o,ref:u,onClick:Oe(o.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&C(w)}),onPointerDown:Oe(o.onPointerDown,w=>{p.current=w.pointerType;const _=w.target;_.hasPointerCapture(w.pointerId)&&_.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(C(w),w.preventDefault())}),onKeyDown:Oe(o.onKeyDown,w=>{const _=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&v(w.key),!(_&&w.key===" ")&&XN.includes(w.key)&&(C(),w.preventDefault())})})})});_w.displayName=vw;var yw="SelectValue",bw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:d="",...a}=t,u=Fo(yw,n),{onValueNodeHasChildrenChange:f}=u,p=l!==void 0,h=vt(e,u.onValueNodeChange);return An(()=>{f(p)},[f,p]),g.jsx(qe.span,{...a,ref:h,style:{pointerEvents:"none"},children:Hw(u.value)?g.jsx(g.Fragment,{children:d}):l})});bw.displayName=yw;var nD="SelectIcon",xw=D.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...o}=t;return g.jsx(qe.span,{"aria-hidden":!0,...o,ref:e,children:i||"▼"})});xw.displayName=nD;var rD="SelectPortal",Sw=t=>g.jsx(pc,{asChild:!0,...t});Sw.displayName=rD;var Oa="SelectContent",ww=D.forwardRef((t,e)=>{const n=Fo(Oa,t.__scopeSelect),[i,o]=D.useState();if(An(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?Wu.createPortal(g.jsx(Cw,{scope:t.__scopeSelect,children:g.jsx(Ch.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(kw,{...t,ref:e})});ww.displayName=Oa;var Ei=10,[Cw,Ho]=vc(Oa),iD="SelectContentImpl",sD=Do("SelectContent.RemoveScroll"),kw=D.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:d,side:a,sideOffset:u,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:_,...b}=t,y=Fo(Oa,n),[x,k]=D.useState(null),[N,A]=D.useState(null),M=vt(e,W=>k(W)),[T,j]=D.useState(null),[O,z]=D.useState(null),q=kh(n),[$,V]=D.useState(!1),K=D.useRef(!1);D.useEffect(()=>{if(x)return ah(x)},[x]),sh();const G=D.useCallback(W=>{const[U,...te]=q().map(se=>se.ref.current),[ie]=te.slice(-1),ae=document.activeElement;for(const se of W)if(se===ae||(se==null||se.scrollIntoView({block:"nearest"}),se===U&&N&&(N.scrollTop=0),se===ie&&N&&(N.scrollTop=N.scrollHeight),se==null||se.focus(),document.activeElement!==ae))return},[q,N]),Y=D.useCallback(()=>G([T,x]),[G,T,x]);D.useEffect(()=>{$&&Y()},[$,Y]);const{onOpenChange:Q,triggerPointerDownPosRef:I}=y;D.useEffect(()=>{if(x){let W={x:0,y:0};const U=ie=>{var ae,se,ge,Te;W={x:Math.abs(Math.round(ie.pageX)-((se=(ae=I.current)==null?void 0:ae.x)!=null?se:0)),y:Math.abs(Math.round(ie.pageY)-((Te=(ge=I.current)==null?void 0:ge.y)!=null?Te:0))}},te=ie=>{W.x<=10&&W.y<=10?ie.preventDefault():x.contains(ie.target)||Q(!1),document.removeEventListener("pointermove",U),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",te,{capture:!0})}}},[x,Q,I]),D.useEffect(()=>{const W=()=>Q(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[Q]);const[L,B]=Uw(W=>{const U=q().filter(ae=>!ae.disabled),te=U.find(ae=>ae.ref.current===document.activeElement),ie=$w(U,W,te);ie&&setTimeout(()=>ie.ref.current.focus())}),H=D.useCallback((W,U,te)=>{const ie=!K.current&&!te;(y.value!==void 0&&y.value===U||ie)&&(j(W),ie&&(K.current=!0))},[y.value]),F=D.useCallback(()=>x==null?void 0:x.focus(),[x]),J=D.useCallback((W,U,te)=>{const ie=!K.current&&!te;(y.value!==void 0&&y.value===U||ie)&&z(W)},[y.value]),ne=i==="popper"?Og:Ew,Z=ne===Og?{side:a,sideOffset:u,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:_}:{};return g.jsx(Cw,{scope:n,content:x,viewport:N,onViewportChange:A,itemRefCallback:H,selectedItem:T,onItemLeave:F,itemTextRefCallback:J,focusSelectedItem:Y,selectedItemText:O,position:i,isPositioned:$,searchRef:L,children:g.jsx(Xu,{as:sD,allowPinchZoom:!0,children:g.jsx(Yu,{asChild:!0,trapped:y.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Oe(o,W=>{var U;(U=y.trigger)==null||U.focus({preventScroll:!0}),W.preventDefault()}),children:g.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:g.jsx(ne,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:W=>W.preventDefault(),...b,...Z,onPlaced:()=>V(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Oe(b.onKeyDown,W=>{const U=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!U&&W.key.length===1&&B(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ie=q().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ae=W.target,se=ie.indexOf(ae);ie=ie.slice(se+1)}setTimeout(()=>G(ie)),W.preventDefault()}})})})})})})});kw.displayName=iD;var oD="SelectItemAlignedPosition",Ew=D.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...o}=t,l=Fo(Oa,n),d=Ho(Oa,n),[a,u]=D.useState(null),[f,p]=D.useState(null),h=vt(e,M=>p(M)),v=kh(n),S=D.useRef(!1),C=D.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:b,focusSelectedItem:y}=d,x=D.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&f&&w&&_&&b){const M=l.trigger.getBoundingClientRect(),T=f.getBoundingClientRect(),j=l.valueNode.getBoundingClientRect(),O=b.getBoundingClientRect();if(l.dir!=="rtl"){const ae=O.left-T.left,se=j.left-ae,ge=M.left-se,Te=M.width+ge,Me=Math.max(Te,T.width),Ke=window.innerWidth-Ei,Re=jg(se,[Ei,Math.max(Ei,Ke-Me)]);a.style.minWidth=Te+"px",a.style.left=Re+"px"}else{const ae=T.right-O.right,se=window.innerWidth-j.right-ae,ge=window.innerWidth-M.right-se,Te=M.width+ge,Me=Math.max(Te,T.width),Ke=window.innerWidth-Ei,Re=jg(se,[Ei,Math.max(Ei,Ke-Me)]);a.style.minWidth=Te+"px",a.style.right=Re+"px"}const z=v(),q=window.innerHeight-Ei*2,$=w.scrollHeight,V=window.getComputedStyle(f),K=parseInt(V.borderTopWidth,10),G=parseInt(V.paddingTop,10),Y=parseInt(V.borderBottomWidth,10),Q=parseInt(V.paddingBottom,10),I=K+G+$+Q+Y,L=Math.min(_.offsetHeight*5,I),B=window.getComputedStyle(w),H=parseInt(B.paddingTop,10),F=parseInt(B.paddingBottom,10),J=M.top+M.height/2-Ei,ne=q-J,Z=_.offsetHeight/2,W=_.offsetTop+Z,U=K+G+W,te=I-U;if(U<=J){const ae=z.length>0&&_===z[z.length-1].ref.current;a.style.bottom="0px";const se=f.clientHeight-w.offsetTop-w.offsetHeight,ge=Math.max(ne,Z+(ae?F:0)+se+Y),Te=U+ge;a.style.height=Te+"px"}else{const ae=z.length>0&&_===z[0].ref.current;a.style.top="0px";const ge=Math.max(J,K+w.offsetTop+(ae?H:0)+Z)+te;a.style.height=ge+"px",w.scrollTop=U-J+w.offsetTop}a.style.margin=`${Ei}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=q+"px",i==null||i(),requestAnimationFrame(()=>S.current=!0)}},[v,l.trigger,l.valueNode,a,f,w,_,b,l.dir,i]);An(()=>x(),[x]);const[k,N]=D.useState();An(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const A=D.useCallback(M=>{M&&C.current===!0&&(x(),y==null||y(),C.current=!1)},[x,y]);return g.jsx(lD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:S,onScrollButtonChange:A,children:g.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:g.jsx(qe.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ew.displayName=oD;var aD="SelectPopperPosition",Og=D.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=Ei,...l}=t,d=Eh(n);return g.jsx(mh,{...d,...l,ref:e,align:i,collisionPadding:o,style:{boxSizing:"border-box",...l.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)"}})});Og.displayName=aD;var[lD,P1]=vc(Oa,{}),Lg="SelectViewport",Aw=D.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...o}=t,l=Ho(Lg,n),d=P1(Lg,n),a=vt(e,l.onViewportChange),u=D.useRef(0);return g.jsxs(g.Fragment,{children:[g.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:i}),g.jsx(Ch.Slot,{scope:n,children:g.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Oe(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:v}=d;if(v!=null&&v.current&&h){const S=Math.abs(u.current-p.scrollTop);if(S>0){const C=window.innerHeight-Ei*2,w=parseFloat(h.style.minHeight),_=parseFloat(h.style.height),b=Math.max(w,_);if(b<C){const y=b+S,x=Math.min(C,y),k=y-x;h.style.height=x+"px",h.style.bottom==="0px"&&(p.scrollTop=k>0?k:0,h.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});Aw.displayName=Lg;var Rw="SelectGroup",[cD,uD]=vc(Rw),Tw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=wn();return g.jsx(cD,{scope:n,id:o,children:g.jsx(qe.div,{role:"group","aria-labelledby":o,...i,ref:e})})});Tw.displayName=Rw;var Nw="SelectLabel",Dw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=uD(Nw,n);return g.jsx(qe.div,{id:o.id,...i,ref:e})});Dw.displayName=Nw;var $f="SelectItem",[dD,Mw]=vc($f),jw=D.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...d}=t,a=Fo($f,n),u=Ho($f,n),f=a.value===i,[p,h]=D.useState(l!=null?l:""),[v,S]=D.useState(!1),C=vt(e,y=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,y,i,o)}),w=wn(),_=D.useRef("touch"),b=()=>{o||(a.onValueChange(i),a.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(dD,{scope:n,value:i,disabled:o,textId:w,isSelected:f,onItemTextChange:D.useCallback(y=>{h(x=>{var k;return x||((k=y==null?void 0:y.textContent)!=null?k:"").trim()})},[]),children:g.jsx(Ch.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:g.jsx(qe.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...d,ref:C,onFocus:Oe(d.onFocus,()=>S(!0)),onBlur:Oe(d.onBlur,()=>S(!1)),onClick:Oe(d.onClick,()=>{_.current!=="mouse"&&b()}),onPointerUp:Oe(d.onPointerUp,()=>{_.current==="mouse"&&b()}),onPointerDown:Oe(d.onPointerDown,y=>{_.current=y.pointerType}),onPointerMove:Oe(d.onPointerMove,y=>{var x;_.current=y.pointerType,o?(x=u.onItemLeave)==null||x.call(u):_.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(d.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:Oe(d.onKeyDown,y=>{var k;((k=u.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(QN.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});jw.displayName=$f;var Eu="SelectItemText",Ow=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,...l}=t,d=Fo(Eu,n),a=Ho(Eu,n),u=Mw(Eu,n),f=tD(Eu,n),[p,h]=D.useState(null),v=vt(e,b=>h(b),u.onItemTextChange,b=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,b,u.value,u.disabled)}),S=p==null?void 0:p.textContent,C=D.useMemo(()=>g.jsx("option",{value:u.value,disabled:u.disabled,children:S},u.value),[u.disabled,u.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=f;return An(()=>(w(C),()=>_(C)),[w,_,C]),g.jsxs(g.Fragment,{children:[g.jsx(qe.span,{id:u.textId,...l,ref:v}),u.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Wu.createPortal(l.children,d.valueNode):null]})});Ow.displayName=Eu;var Lw="SelectItemIndicator",Iw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Mw(Lw,n).isSelected?g.jsx(qe.span,{"aria-hidden":!0,...i,ref:e}):null});Iw.displayName=Lw;var Ig="SelectScrollUpButton",Bw=D.forwardRef((t,e)=>{const n=Ho(Ig,t.__scopeSelect),i=P1(Ig,t.__scopeSelect),[o,l]=D.useState(!1),d=vt(e,i.onScrollButtonChange);return An(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=u.scrollTop>0;l(f)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Pw,{...t,ref:d,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Bw.displayName=Ig;var Bg="SelectScrollDownButton",zw=D.forwardRef((t,e)=>{const n=Ho(Bg,t.__scopeSelect),i=P1(Bg,t.__scopeSelect),[o,l]=D.useState(!1),d=vt(e,i.onScrollButtonChange);return An(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<f;l(p)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Pw,{...t,ref:d,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});zw.displayName=Bg;var Pw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=t,l=Ho("SelectScrollButton",n),d=D.useRef(null),a=kh(n),u=D.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return D.useEffect(()=>()=>u(),[u]),An(()=>{var p;const f=a().find(h=>h.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),g.jsx(qe.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:Oe(o.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:Oe(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:Oe(o.onPointerLeave,()=>{u()})})}),fD="SelectSeparator",hD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return g.jsx(qe.div,{"aria-hidden":!0,...i,ref:e})});hD.displayName=fD;var zg="SelectArrow",pD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=Eh(n),l=Fo(zg,n),d=Ho(zg,n);return l.open&&d.position==="popper"?g.jsx(gh,{...o,...i,ref:e}):null});pD.displayName=zg;var mD="SelectBubbleInput",Fw=D.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const o=D.useRef(null),l=vt(i,o),d=CR(e);return D.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(d!==e&&p){const h=new Event("change",{bubbles:!0});p.call(a,e),a.dispatchEvent(h)}},[d,e]),g.jsx(qe.select,{...n,style:{...tS,...n.style},ref:l,defaultValue:e})});Fw.displayName=mD;function Hw(t){return t===""||t===void 0}function Uw(t){const e=Hn(t),n=D.useRef(""),i=D.useRef(0),o=D.useCallback(d=>{const a=n.current+d;e(a),(function u(f){n.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>u(""),1e3))})(a)},[e]),l=D.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function $w(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let d=gD(t,Math.max(l,0));o.length===1&&(d=d.filter(f=>f!==n));const u=d.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function gD(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var vD=gw,_D=_w,yD=bw,bD=xw,xD=Sw,SD=ww,wD=Aw,CD=Tw,kD=Dw,ED=jw,AD=Ow,RD=Iw,TD=Bw,ND=zw,DD="Separator",gb="horizontal",MD=["horizontal","vertical"],qw=D.forwardRef((t,e)=>{const{decorative:n,orientation:i=gb,...o}=t,l=jD(i)?i:gb,a=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return g.jsx(qe.div,{"data-orientation":l,...a,...o,ref:e})});qw.displayName=DD;function jD(t){return MD.includes(t)}var OD=qw,Ah="Tabs",[LD]=Ur(Ah,[vh]),Vw=vh(),[ID,F1]=LD(Ah),Ww=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:d="horizontal",dir:a,activationMode:u="automatic",...f}=t,p=Ku(a),[h,v]=Bs({prop:i,onChange:o,defaultProp:l!=null?l:"",caller:Ah});return g.jsx(ID,{scope:n,baseId:wn(),value:h,onValueChange:v,orientation:d,dir:p,activationMode:u,children:g.jsx(qe.div,{dir:p,"data-orientation":d,...f,ref:e})})});Ww.displayName=Ah;var Gw="TabsList",Kw=D.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...o}=t,l=F1(Gw,n),d=Vw(n);return g.jsx(l2,{asChild:!0,...d,orientation:l.orientation,dir:l.dir,loop:i,children:g.jsx(qe.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:e})})});Kw.displayName=Gw;var Yw="TabsTrigger",Xw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=t,d=F1(Yw,n),a=Vw(n),u=Jw(d.baseId,i),f=eC(d.baseId,i),p=i===d.value;return g.jsx(c2,{asChild:!0,...a,focusable:!o,active:p,children:g.jsx(qe.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...l,ref:e,onMouseDown:Oe(t.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?d.onValueChange(i):h.preventDefault()}),onKeyDown:Oe(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&d.onValueChange(i)}),onFocus:Oe(t.onFocus,()=>{const h=d.activationMode!=="manual";!p&&!o&&h&&d.onValueChange(i)})})})});Xw.displayName=Yw;var Qw="TabsContent",Zw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...d}=t,a=F1(Qw,n),u=Jw(a.baseId,i),f=eC(a.baseId,i),p=i===a.value,h=D.useRef(p);return D.useEffect(()=>{const v=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(v)},[]),g.jsx(Rn,{present:o||p,children:({present:v})=>g.jsx(qe.div,{"data-state":p?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:f,tabIndex:0,...d,ref:e,style:{...t.style,animationDuration:h.current?"0s":void 0},children:v&&l})})});Zw.displayName=Qw;function Jw(t,e){return`${t}-trigger-${e}`}function eC(t,e){return`${t}-content-${e}`}var BD=Ww,zD=Kw,PD=Xw,FD=Zw,[Rh]=Ur("Tooltip",[zo]),Th=zo(),tC="TooltipProvider",HD=700,Pg="tooltip.open",[UD,H1]=Rh(tC),nC=t=>{const{__scopeTooltip:e,delayDuration:n=HD,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=t,d=D.useRef(!0),a=D.useRef(!1),u=D.useRef(0);return D.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),g.jsx(UD,{scope:e,isOpenDelayedRef:d,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(u.current),d.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:D.useCallback(f=>{a.current=f},[]),disableHoverableContent:o,children:l})};nC.displayName=tC;var Bu="Tooltip",[$D,rd]=Rh(Bu),rC=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:o,onOpenChange:l,disableHoverableContent:d,delayDuration:a}=t,u=H1(Bu,t.__scopeTooltip),f=Th(e),[p,h]=D.useState(null),v=wn(),S=D.useRef(0),C=d!=null?d:u.disableHoverableContent,w=a!=null?a:u.delayDuration,_=D.useRef(!1),[b,y]=Bs({prop:i,defaultProp:o!=null?o:!1,onChange:M=>{M?(u.onOpen(),document.dispatchEvent(new CustomEvent(Pg))):u.onClose(),l==null||l(M)},caller:Bu}),x=D.useMemo(()=>b?_.current?"delayed-open":"instant-open":"closed",[b]),k=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_.current=!1,y(!0)},[y]),N=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,y(!1)},[y]),A=D.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{_.current=!0,y(!0),S.current=0},w)},[w,y]);return D.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(ph,{...f,children:g.jsx($D,{scope:e,contentId:v,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:D.useCallback(()=>{u.isOpenDelayedRef.current?A():k()},[u.isOpenDelayedRef,A,k]),onTriggerLeave:D.useCallback(()=>{C?N():(window.clearTimeout(S.current),S.current=0)},[N,C]),onOpen:k,onClose:N,disableHoverableContent:C,children:n})})};rC.displayName=Bu;var Fg="TooltipTrigger",iC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=rd(Fg,n),l=H1(Fg,n),d=Th(n),a=D.useRef(null),u=vt(e,a,o.onTriggerChange),f=D.useRef(!1),p=D.useRef(!1),h=D.useCallback(()=>f.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(Zu,{asChild:!0,...d,children:g.jsx(qe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:u,onPointerMove:Oe(t.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Oe(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Oe(t.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oe(t.onFocus,()=>{f.current||o.onOpen()}),onBlur:Oe(t.onBlur,o.onClose),onClick:Oe(t.onClick,o.onClose)})})});iC.displayName=Fg;var U1="TooltipPortal",[qD,VD]=Rh(U1,{forceMount:void 0}),sC=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:o}=t,l=rd(U1,e);return g.jsx(qD,{scope:e,forceMount:n,children:g.jsx(Rn,{present:n||l.open,children:g.jsx(pc,{asChild:!0,container:o,children:i})})})};sC.displayName=U1;var sc="TooltipContent",oC=D.forwardRef((t,e)=>{const n=VD(sc,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=t,d=rd(sc,t.__scopeTooltip);return g.jsx(Rn,{present:i||d.open,children:d.disableHoverableContent?g.jsx(aC,{side:o,...l,ref:e}):g.jsx(WD,{side:o,...l,ref:e})})}),WD=D.forwardRef((t,e)=>{const n=rd(sc,t.__scopeTooltip),i=H1(sc,t.__scopeTooltip),o=D.useRef(null),l=vt(e,o),[d,a]=D.useState(null),{trigger:u,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=i,v=D.useCallback(()=>{a(null),h(!1)},[h]),S=D.useCallback((C,w)=>{const _=C.currentTarget,b={x:C.clientX,y:C.clientY},y=XD(b,_.getBoundingClientRect()),x=QD(b,y),k=ZD(w.getBoundingClientRect()),N=eM([...x,...k]);a(N),h(!0)},[h]);return D.useEffect(()=>()=>v(),[v]),D.useEffect(()=>{if(u&&p){const C=_=>S(_,p),w=_=>S(_,u);return u.addEventListener("pointerleave",C),p.addEventListener("pointerleave",w),()=>{u.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",w)}}},[u,p,S,v]),D.useEffect(()=>{if(d){const C=w=>{const _=w.target,b={x:w.clientX,y:w.clientY},y=(u==null?void 0:u.contains(_))||(p==null?void 0:p.contains(_)),x=!JD(b,d);y?v():x&&(v(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[u,p,d,f,v]),g.jsx(aC,{...t,ref:l})}),[GD,KD]=Rh(Bu,{isInside:!1}),YD=V5("TooltipContent"),aC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:d,...a}=t,u=rd(sc,n),f=Th(n),{onClose:p}=u;return D.useEffect(()=>(document.addEventListener(Pg,p),()=>document.removeEventListener(Pg,p)),[p]),D.useEffect(()=>{if(u.trigger){const h=v=>{const S=v.target;S!=null&&S.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),g.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:g.jsxs(mh,{"data-state":u.stateAttribute,...f,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(YD,{children:i}),g.jsx(GD,{scope:n,isInside:!0,children:g.jsx(Q5,{id:u.contentId,role:"tooltip",children:o||i})})]})})});oC.displayName=sc;var lC="TooltipArrow",cC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=Th(n);return KD(lC,n).isInside?null:g.jsx(gh,{...o,...i,ref:e})});cC.displayName=lC;function XD(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),l=Math.abs(e.left-t.x);switch(Math.min(n,i,o,l)){case l:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function QD(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function ZD(t){const{top:e,right:n,bottom:i,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:i},{x:o,y:i}]}function JD(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,d=e.length-1;l<e.length;d=l++){const a=e[l],u=e[d],f=a.x,p=a.y,h=u.x,v=u.y;p>i!=v>i&&n<(h-f)*(i-p)/(v-p)+f&&(o=!o)}return o}function eM(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),tM(e)}function tM(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const o=t[i];for(;e.length>=2;){const l=e[e.length-1],d=e[e.length-2];if((l.x-d.x)*(o.y-d.y)>=(l.y-d.y)*(o.x-d.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const o=t[i];for(;n.length>=2;){const l=n[n.length-1],d=n[n.length-2];if((l.x-d.x)*(o.y-d.y)>=(l.y-d.y)*(o.x-d.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var nM=nC,rM=rC,iM=iC,sM=sC,oM=oC,aM=cC;const lM=(t,e)=>{const n=new Array(t.length+e.length);for(let i=0;i<t.length;i++)n[i]=t[i];for(let i=0;i<e.length;i++)n[t.length+i]=e[i];return n},cM=(t,e)=>({classGroupId:t,validator:e}),uC=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),qf="-",vb=[],uM="arbitrary..",dM=t=>{const e=hM(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return fM(d);const a=d.split(qf),u=a[0]===""&&a.length>1?1:0;return dC(a,u,e)},getConflictingClassGroupIds:(d,a)=>{if(a){const u=i[d],f=n[d];return u?f?lM(f,u):u:f||vb}return n[d]||vb}}},dC=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const f=dC(t,e+1,l);if(f)return f}const d=n.validators;if(d===null)return;const a=e===0?t.join(qf):t.slice(e).join(qf),u=d.length;for(let f=0;f<u;f++){const p=d[f];if(p.validator(a))return p.classGroupId}},fM=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),i=e.slice(0,n);return i?uM+i:void 0})(),hM=t=>{const{theme:e,classGroups:n}=t;return pM(n,e)},pM=(t,e)=>{const n=uC();for(const i in t){const o=t[i];$1(o,n,i,e)}return n},$1=(t,e,n,i)=>{const o=t.length;for(let l=0;l<o;l++){const d=t[l];mM(d,e,n,i)}},mM=(t,e,n,i)=>{if(typeof t=="string"){gM(t,e,n);return}if(typeof t=="function"){vM(t,e,n,i);return}_M(t,e,n,i)},gM=(t,e,n)=>{const i=t===""?e:fC(e,t);i.classGroupId=n},vM=(t,e,n,i)=>{if(yM(t)){$1(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(cM(n,t))},_M=(t,e,n,i)=>{const o=Object.entries(t),l=o.length;for(let d=0;d<l;d++){const[a,u]=o[d];$1(u,fC(e,a),n,i)}},fC=(t,e)=>{let n=t;const i=e.split(qf),o=i.length;for(let l=0;l<o;l++){const d=i[l];let a=n.nextPart.get(d);a||(a=uC(),n.nextPart.set(d,a)),n=a}return n},yM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,bM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const o=(l,d)=>{n[l]=d,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(l){let d=n[l];if(d!==void 0)return d;if((d=i[l])!==void 0)return o(l,d),d},set(l,d){l in n?n[l]=d:o(l,d)}}},Hg="!",_b=":",xM=[],yb=(t,e,n,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),SM=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=o=>{const l=[];let d=0,a=0,u=0,f;const p=o.length;for(let w=0;w<p;w++){const _=o[w];if(d===0&&a===0){if(_===_b){l.push(o.slice(u,w)),u=w+1;continue}if(_==="/"){f=w;continue}}_==="["?d++:_==="]"?d--:_==="("?a++:_===")"&&a--}const h=l.length===0?o:o.slice(u);let v=h,S=!1;h.endsWith(Hg)?(v=h.slice(0,-1),S=!0):h.startsWith(Hg)&&(v=h.slice(1),S=!0);const C=f&&f>u?f-u:void 0;return yb(l,S,v,C)};if(e){const o=e+_b,l=i;i=d=>d.startsWith(o)?l(d.slice(o.length)):yb(xM,!1,d,void 0,!0)}if(n){const o=i;i=l=>n({className:l,parseClassName:o})}return i},wM=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,i)=>{e.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let l=0;l<n.length;l++){const d=n[l],a=d[0]==="[",u=e.has(d);a||u?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(d)):o.push(d)}return o.length>0&&(o.sort(),i.push(...o)),i}},CM=t=>({cache:bM(t.cacheSize),parseClassName:SM(t),sortModifiers:wM(t),...dM(t)}),kM=/\s+/,EM=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=e,d=[],a=t.trim().split(kM);let u="";for(let f=a.length-1;f>=0;f-=1){const p=a[f],{isExternal:h,modifiers:v,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:w}=n(p);if(h){u=p+(u.length>0?" "+u:u);continue}let _=!!w,b=i(_?C.substring(0,w):C);if(!b){if(!_){u=p+(u.length>0?" "+u:u);continue}if(b=i(C),!b){u=p+(u.length>0?" "+u:u);continue}_=!1}const y=v.length===0?"":v.length===1?v[0]:l(v).join(":"),x=S?y+Hg:y,k=x+b;if(d.indexOf(k)>-1)continue;d.push(k);const N=o(b,_);for(let A=0;A<N.length;++A){const M=N[A];d.push(x+M)}u=p+(u.length>0?" "+u:u)}return u},AM=(...t)=>{let e=0,n,i,o="";for(;e<t.length;)(n=t[e++])&&(i=hC(n))&&(o&&(o+=" "),o+=i);return o},hC=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=hC(t[i]))&&(n&&(n+=" "),n+=e);return n},RM=(t,...e)=>{let n,i,o,l;const d=u=>{const f=e.reduce((p,h)=>h(p),t());return n=CM(f),i=n.cache.get,o=n.cache.set,l=a,a(u)},a=u=>{const f=i(u);if(f)return f;const p=EM(u,n);return o(u,p),p};return l=d,(...u)=>l(AM(...u))},TM=[],Sn=t=>{const e=n=>n[t]||TM;return e.isThemeGetter=!0,e},pC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,DM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MM=/\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$/,jM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Co=t=>NM.test(t),gt=t=>!!t&&!Number.isNaN(Number(t)),ko=t=>!!t&&Number.isInteger(Number(t)),Ym=t=>t.endsWith("%")&&gt(t.slice(0,-1)),Ms=t=>DM.test(t),gC=()=>!0,IM=t=>MM.test(t)&&!jM.test(t),q1=()=>!1,BM=t=>OM.test(t),zM=t=>LM.test(t),PM=t=>!He(t)&&!Ue(t),FM=t=>Uo(t,yC,q1),He=t=>pC.test(t),Aa=t=>Uo(t,bC,IM),bb=t=>Uo(t,KM,gt),HM=t=>Uo(t,SC,gC),UM=t=>Uo(t,xC,q1),xb=t=>Uo(t,vC,q1),$M=t=>Uo(t,_C,zM),_f=t=>Uo(t,wC,BM),Ue=t=>mC.test(t),gu=t=>Pa(t,bC),qM=t=>Pa(t,xC),Sb=t=>Pa(t,vC),VM=t=>Pa(t,yC),WM=t=>Pa(t,_C),yf=t=>Pa(t,wC,!0),GM=t=>Pa(t,SC,!0),Uo=(t,e,n)=>{const i=pC.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},Pa=(t,e,n=!1)=>{const i=mC.exec(t);return i?i[1]?e(i[1]):n:!1},vC=t=>t==="position"||t==="percentage",_C=t=>t==="image"||t==="url",yC=t=>t==="length"||t==="size"||t==="bg-size",bC=t=>t==="length",KM=t=>t==="number",xC=t=>t==="family-name",SC=t=>t==="number"||t==="weight",wC=t=>t==="shadow",YM=()=>{const t=Sn("color"),e=Sn("font"),n=Sn("text"),i=Sn("font-weight"),o=Sn("tracking"),l=Sn("leading"),d=Sn("breakpoint"),a=Sn("container"),u=Sn("spacing"),f=Sn("radius"),p=Sn("shadow"),h=Sn("inset-shadow"),v=Sn("text-shadow"),S=Sn("drop-shadow"),C=Sn("blur"),w=Sn("perspective"),_=Sn("aspect"),b=Sn("ease"),y=Sn("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...k(),Ue,He],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],T=()=>[Ue,He,u],j=()=>[Co,"full","auto",...T()],O=()=>[ko,"none","subgrid",Ue,He],z=()=>["auto",{span:["full",ko,Ue,He]},ko,Ue,He],q=()=>[ko,"auto",Ue,He],$=()=>["auto","min","max","fr",Ue,He],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],Y=()=>[Co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],Q=()=>[Co,"screen","full","dvw","lvw","svw","min","max","fit",...T()],I=()=>[Co,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[t,Ue,He],B=()=>[...k(),Sb,xb,{position:[Ue,He]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",VM,FM,{size:[Ue,He]}],J=()=>[Ym,gu,Aa],ne=()=>["","none","full",f,Ue,He],Z=()=>["",gt,gu,Aa],W=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[gt,Ym,Sb,xb],ie=()=>["","none",C,Ue,He],ae=()=>["none",gt,Ue,He],se=()=>["none",gt,Ue,He],ge=()=>[gt,Ue,He],Te=()=>[Co,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ms],breakpoint:[Ms],color:[gC],container:[Ms],"drop-shadow":[Ms],ease:["in","out","in-out"],font:[PM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ms],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ms],shadow:[Ms],spacing:["px",gt],text:[Ms],"text-shadow":[Ms],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Co,He,Ue,_]}],container:["container"],columns:[{columns:[gt,He,Ue,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ko,"auto",Ue,He]}],basis:[{basis:[Co,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,Co,"auto","initial","none",He]}],grow:[{grow:["",gt,Ue,He]}],shrink:[{shrink:["",gt,Ue,He]}],order:[{order:[ko,"first","last","none",Ue,He]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[a,"screen",...Y()]}],"min-w":[{"min-w":[a,"screen","none",...Y()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[d]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,gu,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,GM,HM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ym,He]}],"font-family":[{font:[qM,UM,e]}],"font-features":[{"font-features":[He]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ue,He]}],"line-clamp":[{"line-clamp":[gt,"none",Ue,bb]}],leading:[{leading:[l,...T()]}],"list-image":[{"list-image":["none",Ue,He]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ue,He]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",Ue,Aa]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[gt,"auto",Ue,He]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue,He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue,He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ko,Ue,He],radial:["",Ue,He],conic:[ko,Ue,He]},WM,$M]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,Ue,He]}],"outline-w":[{outline:["",gt,gu,Aa]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",p,yf,_f]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,yf,_f]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[gt,Aa]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",v,yf,_f]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[gt,Ue,He]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Ue,He]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ue,He]}],filter:[{filter:["","none",Ue,He]}],blur:[{blur:ie()}],brightness:[{brightness:[gt,Ue,He]}],contrast:[{contrast:[gt,Ue,He]}],"drop-shadow":[{"drop-shadow":["","none",S,yf,_f]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",gt,Ue,He]}],"hue-rotate":[{"hue-rotate":[gt,Ue,He]}],invert:[{invert:["",gt,Ue,He]}],saturate:[{saturate:[gt,Ue,He]}],sepia:[{sepia:["",gt,Ue,He]}],"backdrop-filter":[{"backdrop-filter":["","none",Ue,He]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[gt,Ue,He]}],"backdrop-contrast":[{"backdrop-contrast":[gt,Ue,He]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,Ue,He]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,Ue,He]}],"backdrop-invert":[{"backdrop-invert":["",gt,Ue,He]}],"backdrop-opacity":[{"backdrop-opacity":[gt,Ue,He]}],"backdrop-saturate":[{"backdrop-saturate":[gt,Ue,He]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,Ue,He]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ue,He]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",Ue,He]}],ease:[{ease:["linear","initial",b,Ue,He]}],delay:[{delay:[gt,Ue,He]}],animate:[{animate:["none",y,Ue,He]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ue,He]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Ue,He,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue,He]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue,He]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[gt,gu,Aa,bb]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},XM=RM(YM);function Ee(...t){return XM(rh(t))}const QM=fc("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 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 [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pe(t){const e=me.c(16);let n,i,o,l,d;e[0]!==t?({className:n,variant:o,size:l,asChild:d,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5]);const a=o===void 0?"default":o,u=l===void 0?"default":l,p=(d===void 0?!1:d)?Gu:"button";let h;e[6]!==n||e[7]!==u||e[8]!==a?(h=Ee(QM({variant:a,size:u,className:n})),e[6]=n,e[7]=u,e[8]=a,e[9]=h):h=e[9];let v;return e[10]!==p||e[11]!==i||e[12]!==u||e[13]!==h||e[14]!==a?(v=g.jsx(p,{"data-slot":"button","data-variant":a,"data-size":u,className:h,...i}),e[10]=p,e[11]=i,e[12]=u,e[13]=h,e[14]=a,e[15]=v):v=e[15],v}function id(){const t=me.c(1),e=ZM;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={fetchWithAuth:e},t[0]=n):n=t[0],n}async function ZM(t,e,n){const i=e===void 0?{}:e,{serverUrl:o,token:l}=n||{};let d=t;t.startsWith("/")&&o&&(d=`http://${o}${t}`);const a=new Headers(i.headers||{});return l&&a.set("Authorization",`Bearer ${l}`),fetch(d,{...i,headers:a})}function JM(t){const n=t.replace(/\\/g,"/").split("/");return n.pop(),n.join("/")||"/"}function e8(...t){return t.map((e,n)=>n===0?e.replace(/\/+$/,""):e.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function _c(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(p1,{"data-slot":"dialog",...n}),e[2]=n,e[3]=i):i=e[3],i}function t8(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(m1,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function n8(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(ch,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=i):i=e[3],i}function r8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(g1,{"data-slot":"dialog-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function yc(t){const e=me.c(15);let n,i,o,l;e[0]!==t?({className:i,children:n,showCloseButton:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?!0:l;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(r8,{}),e[5]=a):a=e[5];let u;e[6]!==i?(u=Ee("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[6]=i,e[7]=u):u=e[7];let f;e[8]!==d?(f=d&&g.jsx(ch,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[g.jsx(Os,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[8]=d,e[9]=f):f=e[9];let p;return e[10]!==n||e[11]!==o||e[12]!==u||e[13]!==f?(p=g.jsxs(t8,{children:[a,g.jsxs(v1,{"data-slot":"dialog-content",className:u,...o,children:[n,f]})]}),e[10]=n,e[11]=o,e[12]=u,e[13]=f,e[14]=p):p=e[14],p}function bc(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"dialog-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Nh(t){const e=me.c(14);let n,i,o,l;e[0]!==t?({className:i,showCloseButton:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?!1:l;let a;e[5]!==i?(a=Ee("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]!==d?(u=d&&g.jsx(ch,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:"Close"})}),e[7]=d,e[8]=u):u=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==u?(f=g.jsxs("div",{"data-slot":"dialog-footer",className:a,...o,children:[n,u]}),e[9]=n,e[10]=o,e[11]=a,e[12]=u,e[13]=f):f=e[13],f}function xc(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-base leading-none font-medium",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(OS,{"data-slot":"dialog-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function sd(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(LS,{"data-slot":"dialog-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Rf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,type:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=Ee("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[4]=n,e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==l||e[8]!==o?(d=g.jsx("input",{type:o,"data-slot":"input",className:l,...i}),e[6]=i,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}const Sc=D.forwardRef((t,e)=>{const n=me.c(16);let i,o,l;n[0]!==t?({className:o,children:i,...l}=t,n[0]=t,n[1]=i,n[2]=o,n[3]=l):(i=n[1],o=n[2],l=n[3]);let d;n[4]!==o?(d=Ee("relative overflow-hidden",o),n[4]=o,n[5]=d):d=n[5];let a;n[6]===Symbol.for("react.memo_cache_sentinel")?(a={WebkitOverflowScrolling:"touch"},n[6]=a):a=n[6];let u;n[7]!==i||n[8]!==e?(u=g.jsx(KN,{ref:e,"data-slot":"scroll-area-viewport",className:"size-full min-w-0 rounded-[inherit] outline-none",style:a,children:i}),n[7]=i,n[8]=e,n[9]=u):u=n[9];let f,p;n[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(i8,{}),p=g.jsx(YN,{}),n[10]=f,n[11]=p):(f=n[10],p=n[11]);let h;return n[12]!==l||n[13]!==d||n[14]!==u?(h=g.jsxs(GN,{"data-slot":"scroll-area",className:d,...l,children:[u,f,p]}),n[12]=l,n[13]=d,n[14]=u,n[15]=h):h=n[15],h});Sc.displayName="ScrollArea";function i8(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"vertical":o;let d;e[4]!==n?(d=Ee("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",n),e[4]=n,e[5]=d):d=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(dw,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[6]=a):a=e[6];let u;return e[7]!==l||e[8]!==i||e[9]!==d?(u=g.jsx(aw,{"data-slot":"scroll-area-scrollbar","data-orientation":l,orientation:l,className:d,...i,children:a}),e[7]=l,e[8]=i,e[9]=d,e[10]=u):u=e[10],u}function s8({open:t,onOpenChange:e,onSelect:n,initialPath:i,title:o="Select Folder"}){var G;const[l,d]=D.useState(i||""),[a,u]=D.useState([]),[f,p]=D.useState(!1),[h,v]=D.useState(0),[S,C]=D.useState(null),[w,_]=D.useState(""),b=D.useRef(null),y=D.useRef(null),{fetchWithAuth:x}=id(),{activeServer:k}=dc(),N=D.useCallback(async Y=>{p(!0),C(null),v(0),_("");try{const Q=await x(`/api/fs/browse?path=${encodeURIComponent(Y)}`,{},{serverUrl:k==null?void 0:k.url,token:k==null?void 0:k.token}),I=await Q.json();if(!Q.ok)throw new Error(I.message||"Failed to browse directory");const L=I.files.filter(B=>B.type==="directory");u(L),d(I.currentPath)}catch(Q){C(Q instanceof Error?Q.message:"Failed to load directory"),u([])}finally{p(!1)}},[x,k]);D.useEffect(()=>{t&&N(i||"")},[t,i,N]),D.useEffect(()=>{v(0)},[w]);const A=a.filter(Y=>Y.name.toLowerCase().includes(w.toLowerCase())),M=(G=A[h])!=null?G:null,T=D.useCallback(Y=>e8(l,Y.name),[l]),j=M?T(M):l,O=!M,z=()=>{const Y=JM(l);Y!==l&&N(Y)},q=()=>{j&&(n(j),e(!1))},$=Y=>{const Q=T(Y);N(Q)},V=Y=>{if(A.length!==0)switch(Y.key){case"ArrowDown":Y.preventDefault(),v(Q=>Math.min(Q+1,A.length-1));break;case"ArrowRight":A[h]&&(Y.preventDefault(),$(A[h]));break;case"ArrowUp":Y.preventDefault(),v(Q=>Math.max(Q-1,0));break;case"Enter":Y.preventDefault(),q();break;case"Escape":w&&(Y.preventDefault(),_(""));break}};D.useEffect(()=>{if(y.current&&A.length>0){const Y=y.current.children[h];Y&&Y.scrollIntoView({block:"nearest"})}},[h,A.length]),D.useEffect(()=>{t&&setTimeout(()=>{var Y;return(Y=b.current)==null?void 0:Y.focus()},100)},[t]);const K=(Y,Q=50)=>{if(Y.length<=Q)return Y;const I=Y.split("/");return I.length<=2?Y:".../"+I.slice(-2).join("/")};return g.jsx(_c,{open:t,onOpenChange:e,children:g.jsxs(yc,{className:"sm:max-w-lg",onKeyDown:V,children:[g.jsx(bc,{children:g.jsx(xc,{children:o})}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[g.jsx(Pe,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:z,disabled:f||!l,children:g.jsx(qE,{className:"w-4 h-4"})}),g.jsx("span",{className:"flex-1 text-sm font-mono truncate",title:j,children:M?g.jsx("span",{className:"text-primary",children:K(T(M),45)}):K(l)||"Home"})]}),g.jsxs("div",{className:"relative",children:[g.jsx(s1,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),g.jsx(Rf,{ref:b,placeholder:"Filter folders...",value:w,onChange:Y=>_(Y.target.value),className:"pl-8"})]}),g.jsx(Sc,{className:"h-64 border rounded-md",children:f?g.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[g.jsx(zr,{className:"w-4 h-4 animate-spin mr-2"}),"Loading..."]}):S?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[g.jsx("span",{className:"text-destructive",children:S}),g.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>N(l),className:"mt-2",children:"Retry"})]}):A.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm",children:[g.jsx(No,{className:"w-8 h-8 mb-2 opacity-50"}),w?"No matching folders":"No folders in this directory"]}):g.jsx("div",{className:"p-1",ref:y,children:A.map((Y,Q)=>g.jsxs("button",{onClick:()=>v(Q),onDoubleClick:()=>$(Y),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",Q===h&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(No,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:Y.name}),Q===h&&g.jsx(Ls,{className:"w-4 h-4 text-primary"})]},Y.path))})}),S&&g.jsx("p",{className:"text-xs text-destructive",children:S})]}),g.jsxs(Nh,{children:[g.jsx(Pe,{variant:"outline",onClick:()=>e(!1),children:"Cancel"}),g.jsx(Pe,{onClick:q,disabled:!j||f,children:O?"Use This Folder":"Add Selected Folder"})]})]})})}function Ug(t){const e=me.c(26),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:d,cancelLabel:a,onConfirm:u,variant:f}=t,p=d===void 0?"Confirm":d,h=a===void 0?"Cancel":a,v=f===void 0?"default":f;let S;e[0]!==u||e[1]!==i?(S=()=>{u(),i(!1)},e[0]=u,e[1]=i,e[2]=S):S=e[2];const C=S;let w;e[3]!==o?(w=g.jsx(xc,{children:o}),e[3]=o,e[4]=w):w=e[4];let _;e[5]!==l?(_=g.jsx(sd,{children:l}),e[5]=l,e[6]=_):_=e[6];let b;e[7]!==w||e[8]!==_?(b=g.jsxs(bc,{children:[w,_]}),e[7]=w,e[8]=_,e[9]=b):b=e[9];let y;e[10]!==h?(y=g.jsx(n8,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:h})}),e[10]=h,e[11]=y):y=e[11];const x=v==="destructive"?"destructive":"default";let k;e[12]!==p||e[13]!==C||e[14]!==x?(k=g.jsx(Pe,{onClick:C,variant:x,children:p}),e[12]=p,e[13]=C,e[14]=x,e[15]=k):k=e[15];let N;e[16]!==k||e[17]!==y?(N=g.jsxs(Nh,{children:[y,k]}),e[16]=k,e[17]=y,e[18]=N):N=e[18];let A;e[19]!==N||e[20]!==b?(A=g.jsxs(yc,{showCloseButton:!1,children:[b,N]}),e[19]=N,e[20]=b,e[21]=A):A=e[21];let M;return e[22]!==i||e[23]!==n||e[24]!==A?(M=g.jsx(_c,{open:n,onOpenChange:i,children:A}),e[22]=i,e[23]=n,e[24]=A,e[25]=M):M=e[25],M}function CC(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(aN,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}function kC(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(lN,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function EC(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"start":o,a=l===void 0?4:l;let u;e[5]!==n?(u=Ee("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==u?(f=g.jsx(cN,{children:g.jsx(uN,{"data-slot":"dropdown-menu-content",sideOffset:a,align:d,className:u,...i})}),e[7]=d,e[8]=i,e[9]=a,e[10]=u,e[11]=f):f=e[11],f}function Au(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,inset:i,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?"default":l;let a;e[5]!==n?(a=Ee("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),e[5]=n,e[6]=a):a=e[6];let u;return e[7]!==i||e[8]!==o||e[9]!==a||e[10]!==d?(u=g.jsx(dN,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":d,className:a,...o}),e[7]=i,e[8]=o,e[9]=a,e[10]=d,e[11]=u):u=e[11],u}var wb=1,o8=.9,a8=.8,l8=.17,Xm=.1,Qm=.999,c8=.9999,u8=.99,d8=/[\\\/_+.#"@\[\(\{&]/,f8=/[\\\/_+.#"@\[\(\{&]/g,h8=/[\s-]/,AC=/[\s-]/g;function $g(t,e,n,i,o,l,d){if(l===e.length)return o===t.length?wb:u8;var a=`${o},${l}`;if(d[a]!==void 0)return d[a];for(var u=i.charAt(l),f=n.indexOf(u,o),p=0,h,v,S,C;f>=0;)h=$g(t,e,n,i,f+1,l+1,d),h>p&&(f===o?h*=wb:d8.test(t.charAt(f-1))?(h*=a8,S=t.slice(o,f-1).match(f8),S&&o>0&&(h*=Math.pow(Qm,S.length))):h8.test(t.charAt(f-1))?(h*=o8,C=t.slice(o,f-1).match(AC),C&&o>0&&(h*=Math.pow(Qm,C.length))):(h*=l8,o>0&&(h*=Math.pow(Qm,f-o))),t.charAt(f)!==e.charAt(l)&&(h*=c8)),(h<Xm&&n.charAt(f-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(f-1)!==i.charAt(l))&&(v=$g(t,e,n,i,f+1,l+2,d),v*Xm>h&&(h=v*Xm)),h>p&&(p=h),f=n.indexOf(u,f+1);return d[a]=p,p}function Cb(t){return t.toLowerCase().replace(AC," ")}function p8(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,$g(t,e,Cb(t),Cb(e),0,0,{})}var vu='[cmdk-group=""]',Zm='[cmdk-group-items=""]',m8='[cmdk-group-heading=""]',RC='[cmdk-item=""]',kb=`${RC}:not([aria-disabled="true"])`,qg="cmdk-item-select",Wl="data-value",g8=(t,e,n)=>p8(t,e,n),TC=D.createContext(void 0),od=()=>D.useContext(TC),NC=D.createContext(void 0),V1=()=>D.useContext(NC),DC=D.createContext(void 0),MC=D.forwardRef((t,e)=>{let n=Gl(()=>{var H,F;return{search:"",value:(F=(H=t.value)!=null?H:t.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Gl(()=>new Set),o=Gl(()=>new Map),l=Gl(()=>new Map),d=Gl(()=>new Set),a=jC(t),{label:u,children:f,value:p,onValueChange:h,filter:v,shouldFilter:S,loop:C,disablePointerSelection:w=!1,vimBindings:_=!0,...b}=t,y=wn(),x=wn(),k=wn(),N=D.useRef(null),A=A8();La(()=>{if(p!==void 0){let H=p.trim();n.current.value=H,M.emit()}},[p]),La(()=>{A(6,$)},[]);let M=D.useMemo(()=>({subscribe:H=>(d.current.add(H),()=>d.current.delete(H)),snapshot:()=>n.current,setState:(H,F,J)=>{var ne,Z,W,U;if(!Object.is(n.current[H],F)){if(n.current[H]=F,H==="search")q(),O(),A(1,z);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(k);te?te.focus():(ne=document.getElementById(y))==null||ne.focus()}if(A(7,()=>{var te;n.current.selectedItemId=(te=V())==null?void 0:te.id,M.emit()}),J||A(5,$),((Z=a.current)==null?void 0:Z.value)!==void 0){let te=F!=null?F:"";(U=(W=a.current).onValueChange)==null||U.call(W,te);return}}M.emit()}},emit:()=>{d.current.forEach(H=>H())}}),[]),T=D.useMemo(()=>({value:(H,F,J)=>{var ne;F!==((ne=l.current.get(H))==null?void 0:ne.value)&&(l.current.set(H,{value:F,keywords:J}),n.current.filtered.items.set(H,j(F,J)),A(2,()=>{O(),M.emit()}))},item:(H,F)=>(i.current.add(H),F&&(o.current.has(F)?o.current.get(F).add(H):o.current.set(F,new Set([H]))),A(3,()=>{q(),O(),n.current.value||z(),M.emit()}),()=>{l.current.delete(H),i.current.delete(H),n.current.filtered.items.delete(H);let J=V();A(4,()=>{q(),(J==null?void 0:J.getAttribute("id"))===H&&z(),M.emit()})}),group:H=>(o.current.has(H)||o.current.set(H,new Set),()=>{l.current.delete(H),o.current.delete(H)}),filter:()=>a.current.shouldFilter,label:u||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:k,labelId:x,listInnerRef:N}),[]);function j(H,F){var J,ne;let Z=(ne=(J=a.current)==null?void 0:J.filter)!=null?ne:g8;return H?Z(H,n.current.search,F):0}function O(){if(!n.current.search||a.current.shouldFilter===!1)return;let H=n.current.filtered.items,F=[];n.current.filtered.groups.forEach(ne=>{let Z=o.current.get(ne),W=0;Z.forEach(U=>{let te=H.get(U);W=Math.max(te,W)}),F.push([ne,W])});let J=N.current;K().sort((ne,Z)=>{var W,U;let te=ne.getAttribute("id"),ie=Z.getAttribute("id");return((W=H.get(ie))!=null?W:0)-((U=H.get(te))!=null?U:0)}).forEach(ne=>{let Z=ne.closest(Zm);Z?Z.appendChild(ne.parentElement===Z?ne:ne.closest(`${Zm} > *`)):J.appendChild(ne.parentElement===J?ne:ne.closest(`${Zm} > *`))}),F.sort((ne,Z)=>Z[1]-ne[1]).forEach(ne=>{var Z;let W=(Z=N.current)==null?void 0:Z.querySelector(`${vu}[${Wl}="${encodeURIComponent(ne[0])}"]`);W==null||W.parentElement.appendChild(W)})}function z(){let H=K().find(J=>J.getAttribute("aria-disabled")!=="true"),F=H==null?void 0:H.getAttribute(Wl);M.setState("value",F||void 0)}function q(){var H,F,J,ne;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let W of i.current){let U=(F=(H=l.current.get(W))==null?void 0:H.value)!=null?F:"",te=(ne=(J=l.current.get(W))==null?void 0:J.keywords)!=null?ne:[],ie=j(U,te);n.current.filtered.items.set(W,ie),ie>0&&Z++}for(let[W,U]of o.current)for(let te of U)if(n.current.filtered.items.get(te)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Z}function $(){var H,F,J;let ne=V();ne&&(((H=ne.parentElement)==null?void 0:H.firstChild)===ne&&((J=(F=ne.closest(vu))==null?void 0:F.querySelector(m8))==null||J.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function V(){var H;return(H=N.current)==null?void 0:H.querySelector(`${RC}[aria-selected="true"]`)}function K(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(kb))||[])}function G(H){let F=K()[H];F&&M.setState("value",F.getAttribute(Wl))}function Y(H){var F;let J=V(),ne=K(),Z=ne.findIndex(U=>U===J),W=ne[Z+H];(F=a.current)!=null&&F.loop&&(W=Z+H<0?ne[ne.length-1]:Z+H===ne.length?ne[0]:ne[Z+H]),W&&M.setState("value",W.getAttribute(Wl))}function Q(H){let F=V(),J=F==null?void 0:F.closest(vu),ne;for(;J&&!ne;)J=H>0?k8(J,vu):E8(J,vu),ne=J==null?void 0:J.querySelector(kb);ne?M.setState("value",ne.getAttribute(Wl)):Y(H)}let I=()=>G(K().length-1),L=H=>{H.preventDefault(),H.metaKey?I():H.altKey?Q(1):Y(1)},B=H=>{H.preventDefault(),H.metaKey?G(0):H.altKey?Q(-1):Y(-1)};return D.createElement(qe.div,{ref:e,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:H=>{var F;(F=b.onKeyDown)==null||F.call(b,H);let J=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||J))switch(H.key){case"n":case"j":{_&&H.ctrlKey&&L(H);break}case"ArrowDown":{L(H);break}case"p":case"k":{_&&H.ctrlKey&&B(H);break}case"ArrowUp":{B(H);break}case"Home":{H.preventDefault(),G(0);break}case"End":{H.preventDefault(),I();break}case"Enter":{H.preventDefault();let ne=V();if(ne){let Z=new Event(qg);ne.dispatchEvent(Z)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:T8},u),Dh(t,H=>D.createElement(NC.Provider,{value:M},D.createElement(TC.Provider,{value:T},H))))}),v8=D.forwardRef((t,e)=>{var n,i;let o=wn(),l=D.useRef(null),d=D.useContext(DC),a=od(),u=jC(t),f=(i=(n=u.current)==null?void 0:n.forceMount)!=null?i:d==null?void 0:d.forceMount;La(()=>{if(!f)return a.item(o,d==null?void 0:d.id)},[f]);let p=OC(o,l,[t.value,t.children,l],t.keywords),h=V1(),v=Oo(A=>A.value&&A.value===p.current),S=Oo(A=>f||a.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);D.useEffect(()=>{let A=l.current;if(!(!A||t.disabled))return A.addEventListener(qg,C),()=>A.removeEventListener(qg,C)},[S,t.onSelect,t.disabled]);function C(){var A,M;w(),(M=(A=u.current).onSelect)==null||M.call(A,p.current)}function w(){h.setState("value",p.current,!0)}if(!S)return null;let{disabled:_,value:b,onSelect:y,forceMount:x,keywords:k,...N}=t;return D.createElement(qe.div,{ref:Is(l,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!v,"data-disabled":!!_,"data-selected":!!v,onPointerMove:_||a.getDisablePointerSelection()?void 0:w,onClick:_?void 0:C},t.children)}),_8=D.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:o,...l}=t,d=wn(),a=D.useRef(null),u=D.useRef(null),f=wn(),p=od(),h=Oo(S=>o||p.filter()===!1?!0:S.search?S.filtered.groups.has(d):!0);La(()=>p.group(d),[]),OC(d,a,[t.value,t.heading,u]);let v=D.useMemo(()=>({id:d,forceMount:o}),[o]);return D.createElement(qe.div,{ref:Is(a,e),...l,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&D.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Dh(t,S=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},D.createElement(DC.Provider,{value:v},S))))}),y8=D.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,o=D.useRef(null),l=Oo(d=>!d.search);return!n&&!l?null:D.createElement(qe.div,{ref:Is(o,e),...i,"cmdk-separator":"",role:"separator"})}),b8=D.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,o=t.value!=null,l=V1(),d=Oo(f=>f.search),a=Oo(f=>f.selectedItemId),u=od();return D.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),D.createElement(qe.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":a,id:u.inputId,type:"text",value:o?t.value:d,onChange:f=>{o||l.setState("search",f.target.value),n==null||n(f.target.value)}})}),x8=D.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...o}=t,l=D.useRef(null),d=D.useRef(null),a=Oo(f=>f.selectedItemId),u=od();return D.useEffect(()=>{if(d.current&&l.current){let f=d.current,p=l.current,h,v=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let S=f.offsetHeight;p.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(h),v.unobserve(f)}}},[]),D.createElement(qe.div,{ref:Is(l,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:u.listId},Dh(t,f=>D.createElement("div",{ref:Is(d,u.listInnerRef),"cmdk-list-sizer":""},f)))}),S8=D.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:l,container:d,...a}=t;return D.createElement(p1,{open:n,onOpenChange:i},D.createElement(m1,{container:d},D.createElement(g1,{"cmdk-overlay":"",className:o}),D.createElement(v1,{"aria-label":t.label,"cmdk-dialog":"",className:l},D.createElement(MC,{ref:e,...a}))))}),w8=D.forwardRef((t,e)=>Oo(n=>n.filtered.count===0)?D.createElement(qe.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),C8=D.forwardRef((t,e)=>{let{progress:n,children:i,label:o="Loading...",...l}=t;return D.createElement(qe.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Dh(t,d=>D.createElement("div",{"aria-hidden":!0},d)))}),Fa=Object.assign(MC,{List:x8,Item:v8,Input:b8,Group:_8,Separator:y8,Dialog:S8,Empty:w8,Loading:C8});function k8(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function E8(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function jC(t){let e=D.useRef(t);return La(()=>{e.current=t}),e}var La=typeof window>"u"?D.useEffect:D.useLayoutEffect;function Gl(t){let e=D.useRef();return e.current===void 0&&(e.current=t()),e}function Oo(t){let e=V1(),n=()=>t(e.snapshot());return D.useSyncExternalStore(e.subscribe,n,n)}function OC(t,e,n,i=[]){let o=D.useRef(),l=od();return La(()=>{var d;let a=(()=>{var f;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(f=p.current.textContent)==null?void 0:f.trim():o.current}})(),u=i.map(f=>f.trim());l.value(t,a,u),(d=e.current)==null||d.setAttribute(Wl,a),o.current=a}),o}var A8=()=>{let[t,e]=D.useState(),n=Gl(()=>new Map);return La(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,o)=>{n.current.set(i,o),e({})}};function R8(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Dh({asChild:t,children:e},n){return t&&D.isValidElement(e)?D.cloneElement(R8(e),{ref:e.ref},n(e.props.children)):n(e)}var T8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function N8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("textarea",{"data-slot":"textarea",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function D8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 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-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"input-group",role:"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const M8=fc("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-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function j8(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,align:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"inline-start":o;let d;e[4]!==l||e[5]!==n?(d=Ee(M8({align:l}),n),e[4]=l,e[5]=n,e[6]=d):d=e[6];let a;return e[7]!==l||e[8]!==i||e[9]!==d?(a=g.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":l,className:d,onClick:O8,...i}),e[7]=l,e[8]=i,e[9]=d,e[10]=a):a=e[10],a}function O8(t){var e,n;t.target.closest("button")||(n=(e=t.currentTarget.parentElement)==null?void 0:e.querySelector("input"))==null||n.focus()}function W1(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa,{"data-slot":"command",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function LC(t){const e=me.c(11);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Input,{"data-slot":"command-input",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(j8,{children:g.jsx(s1,{className:"size-4 shrink-0 opacity-50"})}),e[8]=d):d=e[8];let a;return e[9]!==l?(a=g.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:g.jsxs(D8,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[l,d]})}),e[9]=l,e[10]=a):a=e[10],a}function G1(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.List,{"data-slot":"command-list",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function K1(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("py-6 text-center text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Empty,{"data-slot":"command-empty",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function zu(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Group,{"data-slot":"command-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function IC(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("-mx-1 h-px bg-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Separator,{"data-slot":"command-separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Jl(t){const e=me.c(14);let n,i,o,l;e[0]!==t?({className:i,children:n,showCheck:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?!0:l;let a;e[5]!==i?(a=Ee("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]!==d?(u=d&&g.jsx(Ls,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"}),e[7]=d,e[8]=u):u=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==u?(f=g.jsxs(Fa.Item,{"data-slot":"command-item",className:a,...o,children:[n,u]}),e[9]=n,e[10]=o,e[11]=a,e[12]=u,e[13]=f):f=e[13],f}function Mh(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(wN,{"data-slot":"popover",...n}),e[2]=n,e[3]=i):i=e[3],i}function Y1(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(kN,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function jh(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"center":o,a=l===void 0?4:l;let u;e[5]!==n?(u=Ee("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==u?(f=g.jsx(EN,{children:g.jsx(AN,{"data-slot":"popover-content",align:d,sideOffset:a,className:u,...i})}),e[7]=d,e[8]=i,e[9]=a,e[10]=u,e[11]=f):f=e[11],f}function L8(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(CN,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=i):i=e[3],i}function I8(t){const e=me.c(59),{workspaces:n,activeWorkspace:i,onSelectWorkspace:o,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:d,isWorkspaceFavorited:a,onToggleFavorite:u,onDeleteWorkspace:f}=t,[p,h]=D.useState(!1),[v,S]=D.useState(!1),[C,w]=D.useState(null);let _;e[0]!==(i==null?void 0:i.isVirtual)?(_=i!=null&&i.isVirtual?g.jsx(wg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(No,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=i==null?void 0:i.isVirtual,e[1]=_):_=e[1];const b=(i==null?void 0:i.name)||"Select workspace";let y;e[2]!==b?(y=g.jsx("span",{className:"truncate",children:b}),e[2]=b,e[3]=y):y=e[3];let x;e[4]!==_||e[5]!==y?(x=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[_,y]}),e[4]=_,e[5]=y,e[6]=x):x=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(zx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[7]=k):k=e[7];let N;e[8]!==p||e[9]!==x?(N=g.jsx(Y1,{asChild:!0,children:g.jsxs(Pe,{variant:"outline",role:"combobox","aria-expanded":p,"aria-label":"Select workspace",className:"w-full justify-between h-9",children:[x,k]})}),e[8]=p,e[9]=x,e[10]=N):N=e[10];let A;e[11]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx(LC,{placeholder:"Search workspace..."}),e[11]=A):A=e[11];let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(K1,{children:"No workspace found."}),e[12]=M):M=e[12];let T;if(e[13]!==(i==null?void 0:i.id)||e[14]!==a||e[15]!==o||e[16]!==u||e[17]!==n){let Z;e[19]!==(i==null?void 0:i.id)||e[20]!==a||e[21]!==o||e[22]!==u?(Z=W=>g.jsxs(Jl,{showCheck:!1,onSelect:()=>{o(W),h(!1)},children:[g.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[W.isVirtual?g.jsx(wg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(No,{className:"size-4 flex-shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate",children:W.name})]}),g.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[g.jsx("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:U=>{U.stopPropagation(),u(W.id,W.name)},title:a(W.id)?"Remove from favorites":"Add to favorites",children:a(W.id)?g.jsx(Ly,{className:"size-4 fill-primary text-primary"}):g.jsx(Ly,{className:"size-4 text-muted-foreground"})}),g.jsx(Ls,{className:Ee("size-4",(i==null?void 0:i.id)===W.id?"opacity-100":"opacity-0")}),g.jsxs(CC,{children:[g.jsx(kC,{asChild:!0,children:g.jsxs("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:B8,children:[g.jsx(Fx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Workspace actions"})]})}),g.jsx(EC,{align:"end",children:g.jsxs(Au,{onClick:U=>{U.stopPropagation(),w(W)},className:"text-destructive focus:text-destructive",children:[g.jsx(uc,{className:"size-4"}),"Delete workspace"]})})]})]})]},W.id),e[19]=i==null?void 0:i.id,e[20]=a,e[21]=o,e[22]=u,e[23]=Z):Z=e[23],T=n.map(Z),e[13]=i==null?void 0:i.id,e[14]=a,e[15]=o,e[16]=u,e[17]=n,e[18]=T}else T=e[18];let j;e[24]!==T?(j=g.jsx(zu,{heading:"Workspaces",children:T}),e[24]=T,e[25]=j):j=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(IC,{}),e[26]=O):O=e[26];let z;e[27]!==l?(z=()=>{l(),h(!1)},e[27]=l,e[28]=z):z=e[28];let q;e[29]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(cc,{className:"size-4","data-icon":"inline-start"}),e[29]=q):q=e[29];let $;e[30]!==z?($=g.jsxs(Jl,{onSelect:z,children:[q,"Create virtual workspace"]}),e[30]=z,e[31]=$):$=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsxs(Jl,{onSelect:()=>{h(!1),S(!0)},children:[g.jsx(No,{className:"size-4","data-icon":"inline-start"}),"Add existing folder"]}),e[32]=V):V=e[32];let K;e[33]!==$?(K=g.jsxs(zu,{children:[$,V]}),e[33]=$,e[34]=K):K=e[34];let G;e[35]!==j||e[36]!==K?(G=g.jsx(jh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(W1,{children:[A,g.jsxs(G1,{className:"max-h-[50vh] overflow-y-auto",children:[M,j,O,K]})]})}),e[35]=j,e[36]=K,e[37]=G):G=e[37];let Y;e[38]!==p||e[39]!==G||e[40]!==N?(Y=g.jsxs(Mh,{open:p,onOpenChange:h,children:[N,G]}),e[38]=p,e[39]=G,e[40]=N,e[41]=Y):Y=e[41];let Q;e[42]!==d?(Q=Z=>{d(Z),S(!1)},e[42]=d,e[43]=Q):Q=e[43];let I;e[44]!==v||e[45]!==Q?(I=g.jsx(s8,{open:v,onOpenChange:S,onSelect:Q,title:"Select Workspace Folder"}),e[44]=v,e[45]=Q,e[46]=I):I=e[46];const L=C!==null;let B;e[47]===Symbol.for("react.memo_cache_sentinel")?(B=Z=>!Z&&w(null),e[47]=B):B=e[47];const H=C?`Are you sure you want to delete "${C.name}"? This will permanently remove the workspace and all associated Jean data, including sessions, messages, and temporary files. The actual files in "${C.name}" on disk will not be deleted.`:"";let F;e[48]!==f||e[49]!==C?(F=()=>{C&&(f(C.id),w(null))},e[48]=f,e[49]=C,e[50]=F):F=e[50];let J;e[51]!==L||e[52]!==H||e[53]!==F?(J=g.jsx(Ug,{open:L,onOpenChange:B,title:"Delete Workspace",description:H,confirmLabel:"Delete",variant:"destructive",onConfirm:F}),e[51]=L,e[52]=H,e[53]=F,e[54]=J):J=e[54];let ne;return e[55]!==Y||e[56]!==I||e[57]!==J?(ne=g.jsxs(g.Fragment,{children:[Y,I,J]}),e[55]=Y,e[56]=I,e[57]=J,e[58]=ne):ne=e[58],ne}function B8(t){return t.stopPropagation()}function z8(t){const e=me.c(33),{onOpenAddServer:n,onServerSwitch:i}=t,[o,l]=D.useState(!1),{servers:d,activeServer:a,switchServer:u}=dc();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(Na,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];const p=(a==null?void 0:a.name)||"Select server";let h;e[1]!==p?(h=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[f,g.jsx("span",{className:"truncate",children:p})]}),e[1]=p,e[2]=h):h=e[2];let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(zx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[3]=v):v=e[3];let S;e[4]!==o||e[5]!==h?(S=g.jsx(Y1,{asChild:!0,children:g.jsxs(Pe,{variant:"outline",role:"combobox","aria-expanded":o,"aria-label":"Select server",className:"w-full justify-between h-9",children:[h,v]})}),e[4]=o,e[5]=h,e[6]=S):S=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(LC,{placeholder:"Search server..."}),e[7]=C):C=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(K1,{children:"No server found."}),e[8]=w):w=e[8];let _;if(e[9]!==(a==null?void 0:a.id)||e[10]!==i||e[11]!==d||e[12]!==u){let T;e[14]!==(a==null?void 0:a.id)||e[15]!==i||e[16]!==u?(T=j=>g.jsxs(Jl,{onSelect:()=>{u(j.id),i==null||i(),l(!1)},className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:j.name})]}),g.jsx(Ls,{className:Ee("size-4",(a==null?void 0:a.id)===j.id?"opacity-100":"opacity-0")})]},j.id),e[14]=a==null?void 0:a.id,e[15]=i,e[16]=u,e[17]=T):T=e[17],_=d.map(T),e[9]=a==null?void 0:a.id,e[10]=i,e[11]=d,e[12]=u,e[13]=_}else _=e[13];let b;e[18]!==_?(b=g.jsx(zu,{heading:"Servers",children:_}),e[18]=_,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(IC,{}),e[20]=y):y=e[20];let x;e[21]!==n?(x=()=>{n(),l(!1)},e[21]=n,e[22]=x):x=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(cc,{className:"size-4","data-icon":"inline-start"}),e[23]=k):k=e[23];let N;e[24]!==x?(N=g.jsx(zu,{children:g.jsxs(Jl,{onSelect:x,children:[k,"Add Server..."]})}),e[24]=x,e[25]=N):N=e[25];let A;e[26]!==N||e[27]!==b?(A=g.jsx(jh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(W1,{children:[C,g.jsxs(G1,{className:"max-h-[50vh] overflow-y-auto",children:[w,b,y,N]})]})}),e[26]=N,e[27]=b,e[28]=A):A=e[28];let M;return e[29]!==o||e[30]!==A||e[31]!==S?(M=g.jsxs(Mh,{open:o,onOpenChange:l,children:[S,A]}),e[29]=o,e[30]=A,e[31]=S,e[32]=M):M=e[32],M}const Jm=640,eg=1300;function ad(){const t=me.c(2),[e,n]=D.useState(void 0);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.matchMedia(`(max-width: ${Jm-1}px)`),d=()=>{n(window.innerWidth<Jm)};return l.addEventListener("change",d),n(window.innerWidth<Jm),()=>l.removeEventListener("change",d)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function P8(){const t=me.c(2),[e,n]=D.useState(void 0);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.matchMedia(`(max-width: ${eg-1}px)`),d=()=>{n(window.innerWidth<eg)};return l.addEventListener("change",d),n(window.innerWidth<eg),()=>l.removeEventListener("change",d)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function To(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,orientation:o,decorative:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"horizontal":o,a=l===void 0?!0:l;let u;e[5]!==n?(u=Ee("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==d||e[9]!==i||e[10]!==u?(f=g.jsx(OD,{"data-slot":"separator",decorative:a,orientation:d,className:u,...i}),e[7]=a,e[8]=d,e[9]=i,e[10]=u,e[11]=f):f=e[11],f}function Oh(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(p1,{"data-slot":"sheet",...n}),e[2]=n,e[3]=i):i=e[3],i}function F8(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(wR,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function H8(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(m1,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function U8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(g1,{"data-slot":"sheet-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Lh(t){const e=me.c(24);let n,i,o,l,d,a;e[0]!==t?({className:i,children:n,side:d,showCloseButton:a,style:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6]);const u=d===void 0?"right":d,f=a===void 0?!0:a;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(U8,{}),e[7]=p):p=e[7];let h;e[8]!==i?(h=Ee("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",i),e[8]=i,e[9]=h):h=e[9];let v;e[10]!==u?(v=u==="left"||u==="right"?{top:"env(safe-area-inset-top, 0px)",bottom:"env(safe-area-inset-bottom, 0px)",height:"calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))"}:u==="top"?{top:"env(safe-area-inset-top, 0px)"}:u==="bottom"?{bottom:"env(safe-area-inset-bottom, 0px)"}:void 0,e[10]=u,e[11]=v):v=e[11];const S=v;let C;e[12]!==S||e[13]!==l?(C=S?{...S,...l}:l,e[12]=S,e[13]=l,e[14]=C):C=e[14];const w=C;let _;e[15]!==f?(_=f&&g.jsx(ch,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[g.jsx(Os,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[15]=f,e[16]=_):_=e[16];let b;return e[17]!==n||e[18]!==o||e[19]!==u||e[20]!==h||e[21]!==w||e[22]!==_?(b=g.jsxs(H8,{children:[p,g.jsxs(v1,{"data-slot":"sheet-content","data-side":u,className:h,style:w,...o,children:[n,_]})]}),e[17]=n,e[18]=o,e[19]=u,e[20]=h,e[21]=w,e[22]=_,e[23]=b):b=e[23],b}function Ih(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-0.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sheet-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Bh(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-base font-medium text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(OS,{"data-slot":"sheet-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function $8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(LS,{"data-slot":"sheet-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Vf(t){const e=me.c(6);let n,i;e[0]!==t?({delayDuration:i,...n}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);const o=i===void 0?0:i;let l;return e[3]!==o||e[4]!==n?(l=g.jsx(nM,{"data-slot":"tooltip-provider",delayDuration:o,...n}),e[3]=o,e[4]=n,e[5]=l):l=e[5],l}function Pu(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(rM,{"data-slot":"tooltip",...n}),e[2]=n,e[3]=i):i=e[3],i}function Fu(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(iM,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Hu(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:i,sideOffset:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?0:l;let a;e[5]!==i?(a=Ee("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(aM,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==d||e[11]!==a?(f=g.jsx(sM,{children:g.jsxs(oM,{"data-slot":"tooltip-content",sideOffset:d,className:a,...o,children:[n,u]})}),e[8]=n,e[9]=o,e[10]=d,e[11]=a,e[12]=f):f=e[12],f}const q8="sidebar_state",V8=3600*24*7,W8="16rem",G8="18rem",K8="3rem",BC=D.createContext(null);function ld(){const t=D.useContext(BC);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Y8(t){const e=me.c(33);let n,i,o,l,d,a,u;e[0]!==t?({defaultOpen:u,open:o,onOpenChange:d,className:i,style:a,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=u===void 0?!0:u,p=ad(),[h,v]=D.useState(!1),[S,C]=D.useState(f),w=o!=null?o:S;let _;e[8]!==w||e[9]!==d?(_=q=>{const $=typeof q=="function"?q(w):q;d?d($):C($),document.cookie=`${q8}=${$}; path=/; max-age=${V8}`},e[8]=w,e[9]=d,e[10]=_):_=e[10];const b=_;let y;e[11]!==p||e[12]!==b?(y=()=>p?v(Q8):b(X8),e[11]=p,e[12]=b,e[13]=y):y=e[13];const x=y,k=w?"expanded":"collapsed";let N;e[14]!==p||e[15]!==w||e[16]!==h||e[17]!==b||e[18]!==k||e[19]!==x?(N={state:k,open:w,setOpen:b,isMobile:p,openMobile:h,setOpenMobile:v,toggleSidebar:x},e[14]=p,e[15]=w,e[16]=h,e[17]=b,e[18]=k,e[19]=x,e[20]=N):N=e[20];const A=N;let M;e[21]!==a?(M={"--sidebar-width":W8,"--sidebar-width-icon":K8,...a},e[21]=a,e[22]=M):M=e[22];const T=M;let j;e[23]!==i?(j=Ee("overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar",i),e[23]=i,e[24]=j):j=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==T||e[28]!==j?(O=g.jsx("div",{"data-slot":"sidebar-wrapper",style:T,className:j,...l,children:n}),e[25]=n,e[26]=l,e[27]=T,e[28]=j,e[29]=O):O=e[29];let z;return e[30]!==A||e[31]!==O?(z=g.jsx(BC.Provider,{value:A,children:O}),e[30]=A,e[31]=O,e[32]=z):z=e[32],z}function X8(t){return!t}function Q8(t){return!t}function Z8(t){const e=me.c(49);let n,i,o,l,d,a,u;e[0]!==t?({side:d,variant:a,collapsible:u,className:i,children:n,dir:o,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=d===void 0?"left":d,p=a===void 0?"sidebar":a,h=u===void 0?"offcanvas":u,{isMobile:v,state:S,openMobile:C,setOpenMobile:w}=ld();if(h==="none"){let O;e[8]!==i?(O=Ee("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),e[8]=i,e[9]=O):O=e[9];let z;return e[10]!==n||e[11]!==l||e[12]!==O?(z=g.jsx("div",{"data-slot":"sidebar",className:O,...l,children:n}),e[10]=n,e[11]=l,e[12]=O,e[13]=z):z=e[13],z}if(v){let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={"--sidebar-width":G8},e[14]=O):O=e[14];let z;e[15]===Symbol.for("react.memo_cache_sentinel")?(z=g.jsxs(Ih,{className:"sr-only",children:[g.jsx(Bh,{children:"Sidebar"}),g.jsx($8,{children:"Displays the mobile sidebar."})]}),e[15]=z):z=e[15];let q;e[16]!==n?(q=g.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[16]=n,e[17]=q):q=e[17];let $;e[18]!==o||e[19]!==f||e[20]!==q?($=g.jsxs(Lh,{dir:o,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:O,side:f,children:[z,q]}),e[18]=o,e[19]=f,e[20]=q,e[21]=$):$=e[21];let V;return e[22]!==C||e[23]!==l||e[24]!==w||e[25]!==$?(V=g.jsx(Oh,{open:C,onOpenChange:w,...l,children:$}),e[22]=C,e[23]=l,e[24]=w,e[25]=$,e[26]=V):V=e[26],V}const _=S==="collapsed"?h:"",b=p==="floating"||p==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[27]!==b?(y=Ee("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[27]=b,e[28]=y):y=e[28];let x;e[29]!==y?(x=g.jsx("div",{"data-slot":"sidebar-gap",className:y}),e[29]=y,e[30]=x):x=e[30];const k=p==="floating"||p==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;e[31]!==i||e[32]!==k?(N=Ee("fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",k,i),e[31]=i,e[32]=k,e[33]=N):N=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[34]=A):A=e[34];let M;e[35]!==n?(M=g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n}),e[35]=n,e[36]=M):M=e[36];let T;e[37]!==l||e[38]!==f||e[39]!==M||e[40]!==N?(T=g.jsx("div",{"data-slot":"sidebar-container","data-side":f,className:N,style:A,...l,children:M}),e[37]=l,e[38]=f,e[39]=M,e[40]=N,e[41]=T):T=e[41];let j;return e[42]!==f||e[43]!==S||e[44]!==T||e[45]!==_||e[46]!==x||e[47]!==p?(j=g.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":S,"data-collapsible":_,"data-variant":p,"data-side":f,"data-slot":"sidebar",children:[x,T]}),e[42]=f,e[43]=S,e[44]=T,e[45]=_,e[46]=x,e[47]=p,e[48]=j):j=e[48],j}function Eb(t){const e=me.c(15);let n,i,o;e[0]!==t?({className:n,onClick:i,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const{toggleSidebar:l}=ld();let d;e[4]!==n?(d=Ee(n),e[4]=n,e[5]=d):d=e[5];let a;e[6]!==i||e[7]!==l?(a=h=>{i==null||i(h),l()},e[6]=i,e[7]=l,e[8]=a):a=e[8];let u,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(q4,{}),f=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=u,e[10]=f):(u=e[9],f=e[10]);let p;return e[11]!==o||e[12]!==d||e[13]!==a?(p=g.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:d,onClick:a,...o,children:[u,f]}),e[11]=o,e[12]=d,e[13]=a,e[14]=p):p=e[14],p}function J8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ej(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function tj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("mx-2 w-auto bg-sidebar-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(To,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const nj=D.forwardRef((t,e)=>{const n=me.c(9);let i,o;n[0]!==t?({className:i,...o}=t,n[0]=t,n[1]=i,n[2]=o):(i=n[1],o=n[2]);let l;n[3]!==i?(l=Ee("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",i),n[3]=i,n[4]=l):l=n[4];let d;return n[5]!==o||n[6]!==e||n[7]!==l?(d=g.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,ref:e,...o}),n[5]=o,n[6]=e,n[7]=l,n[8]=d):d=n[8],d});function Wf(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Gf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,asChild:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const d=(o===void 0?!1:o)?Gu:"div";let a;e[4]!==n?(a=Ee("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",n),e[4]=n,e[5]=a):a=e[5];let u;return e[6]!==d||e[7]!==i||e[8]!==a?(u=g.jsx(d,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:a,...i}),e[6]=d,e[7]=i,e[8]=a,e[9]=u):u=e[9],u}function Kf(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Yl(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex w-full min-w-0 flex-col gap-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ta(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const rj=fc("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ec(t){const e=me.c(28);let n,i,o,l,d,a,u;e[0]!==t?({asChild:o,isActive:l,variant:d,size:a,tooltip:u,className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=o===void 0?!1:o,p=l===void 0?!1:l,h=d===void 0?"default":d,v=a===void 0?"default":a,S=f?Gu:"button",{isMobile:C,state:w}=ld();let _;e[8]!==n||e[9]!==v||e[10]!==h?(_=Ee(rj({variant:h,size:v}),n),e[8]=n,e[9]=v,e[10]=h,e[11]=_):_=e[11];let b;e[12]!==S||e[13]!==p||e[14]!==i||e[15]!==v||e[16]!==_?(b=g.jsx(S,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":v,"data-active":p,className:_,...i}),e[12]=S,e[13]=p,e[14]=i,e[15]=v,e[16]=_,e[17]=b):b=e[17];const y=b;if(!u)return y;if(typeof u=="string"){let M;e[18]!==u?(M={children:u},e[18]=u,e[19]=M):M=e[19],u=M}let x;e[20]!==y?(x=g.jsx(Fu,{asChild:!0,children:y}),e[20]=y,e[21]=x):x=e[21];const k=w!=="collapsed"||C;let N;e[22]!==k||e[23]!==u?(N=g.jsx(Hu,{side:"right",align:"center",hidden:k,...u}),e[22]=k,e[23]=u,e[24]=N):N=e[24];let A;return e[25]!==x||e[26]!==N?(A=g.jsxs(Pu,{children:[x,N]}),e[25]=x,e[26]=N,e[27]=A):A=e[27],A}function ij(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,asChild:o,showOnHover:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?!1:o,a=l===void 0?!1:l,u=d?Gu:"button",f=a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0";let p;e[5]!==n||e[6]!==f?(p=Ee("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",f,n),e[5]=n,e[6]=f,e[7]=p):p=e[7];let h;return e[8]!==u||e[9]!==i||e[10]!==p?(h=g.jsx(u,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:p,...i}),e[8]=u,e[9]=i,e[10]=p,e[11]=h):h=e[11],h}function sj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Lo(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(dA,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=i):i=e[3],i}function Io(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(sS,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Bo(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(oS,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=i):i=e[3],i}function oj(t,e){const n=me.c(6),[i,o]=D.useState(null),l=D.useRef(!1),d=D.useRef(null);let a,u;n[0]!==e||n[1]!==t?(a=()=>(l.current&&!e&&t&&(o(t),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{o(null),d.current=null},5e3)),l.current=e,()=>{d.current&&clearTimeout(d.current)}),u=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=u):(a=n[2],u=n[3]),D.useEffect(a,u);const f=t!==null&&i===t;let p;return n[4]!==f?(p={isFlashing:f},n[4]=f,n[5]=p):p=n[5],p}const Ab=ii.memo(function(e){const n=me.c(13),{isClosed:i,isEditing:o,onRename:l,onReopen:d,onClose:a,onDelete:u}=e;if(o){let C;return n[0]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("div",{className:"shrink-0 size-7"}),n[0]=C):C=n[0],C}let f;n[1]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(kC,{asChild:!0,children:g.jsxs(ij,{showOnHover:!0,children:[g.jsx(Fx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Session actions"})]})}),n[1]=f):f=n[1];let p;n[2]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(G4,{className:"size-4"}),n[2]=p):p=n[2];let h;n[3]!==l?(h=g.jsxs(Au,{onClick:l,children:[p,"Rename"]}),n[3]=l,n[4]=h):h=n[4];let v;n[5]!==i||n[6]!==a||n[7]!==u||n[8]!==d?(v=i?g.jsxs(g.Fragment,{children:[g.jsxs(Au,{onClick:d,children:[g.jsx($x,{className:"size-4"}),"Restore"]}),g.jsxs(Au,{onClick:u,className:"text-destructive focus:text-destructive",children:[g.jsx(uc,{className:"size-4"}),"Delete permanently"]})]}):g.jsxs(Au,{onClick:a,children:[g.jsx(Os,{className:"size-4"}),"Archive"]}),n[5]=i,n[6]=a,n[7]=u,n[8]=d,n[9]=v):v=n[9];let S;return n[10]!==h||n[11]!==v?(S=g.jsxs(CC,{children:[f,g.jsxs(EC,{align:"end",children:[h,v]})]}),n[10]=h,n[11]=v,n[12]=S):S=n[12],S}),Rb=ii.memo(function(e){const n=me.c(4),{status:i,isStreaming:o,runningAt:l}=e;if(o||i==="running"||!!l){let u;return n[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(zr,{className:"size-3.5 animate-spin shrink-0"}),n[0]=u):u=n[0],u}if(i==="error"){let u;return n[1]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(nh,{className:"size-3.5 shrink-0"}),n[1]=u):u=n[1],u}if(i==="interrupted"){let u;return n[2]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Ux,{className:"size-3.5 shrink-0"}),n[2]=u):u=n[2],u}let a;return n[3]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(Vu,{className:"size-3.5 shrink-0"}),n[3]=a):a=n[3],a}),Vg=ii.memo(function t({session:e,allSessions:n,isActive:i,currentSessionId:o,streamingSessionId:l,pendingPermissions:d,onResumeSession:a,onCloseSession:u,onReopenSession:f,onDeleteSession:p,onRename:h}){const[v,S]=D.useState(!1),[C,w]=D.useState(e.title||""),_=D.useRef(null),b=D.useMemo(()=>n.filter(V=>V.parentId===e.id),[n,e.id]),y=b.length>0,x=e.status==="closed",k=D.useRef(!1);D.useEffect(()=>{v&&_.current?k.current||(_.current.focus(),_.current.select(),k.current=!0):k.current=!1},[v]),D.useEffect(()=>{v||w(e.title||"")},[v,e.title]);const N=()=>{w(e.title||""),S(!0)},A=()=>{const V=C.trim();V&&V!==e.title&&h(e.id,V),S(!1)},M=()=>{S(!1),w(e.title||"")},T=V=>{V.key==="Enter"?(V.preventDefault(),A()):V.key==="Escape"&&(V.preventDefault(),M())},j=D.useMemo(()=>b.some(V=>V.id===o),[b,o]),O=e.id===l,z=d.some(V=>V.sessionId===e.id),q=O||e.subagentStatus==="running"||!!e.runningAt,{isFlashing:$}=oj(e.id,q);return y?g.jsx(Vf,{delayDuration:300,children:g.jsx(Lo,{defaultOpen:i||j,className:"group/collapsible",children:g.jsxs(Ta,{children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx(Io,{asChild:!0,children:g.jsx("button",{className:"flex items-center justify-center rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 size-7 p-1","aria-label":"Toggle child sessions",children:g.jsx(Ni,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),v?g.jsx("input",{ref:_,type:"text",value:C,onChange:V=>w(V.target.value),onKeyDown:T,onBlur:A,"aria-label":`Rename session: ${e.title||"Untitled"}`,className:"flex-1 min-w-0 h-8 px-2 text-sm bg-background border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring"}):g.jsx(ec,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",$&&"animate-completion-flash rounded-md"),children:g.jsxs(Pu,{children:[g.jsx(Fu,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Rb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),z&&g.jsx(ju,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Hu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:v,onRename:N,onReopen:()=>f(e.id),onClose:()=>u(e.id),onDelete:()=>p(e.id)})]}),g.jsx(Bo,{children:g.jsx(sj,{children:b.map(V=>g.jsx(t,{session:V,allSessions:n,isActive:o===V.id,currentSessionId:o,streamingSessionId:l,pendingPermissions:d,onResumeSession:a,onCloseSession:u,onReopenSession:f,onDeleteSession:p,onRename:h},V.id))})})]})})}):g.jsx(Vf,{delayDuration:300,children:g.jsx(Ta,{children:g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:"shrink-0 size-7 p-1"}),v?g.jsx("input",{ref:_,type:"text",value:C,onChange:V=>w(V.target.value),onKeyDown:T,onBlur:A,"aria-label":`Rename session: ${e.title||"Untitled"}`,className:"flex-1 min-w-0 h-8 px-2 text-sm bg-background border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring"}):g.jsx(ec,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",$&&"animate-completion-flash rounded-md"),children:g.jsxs(Pu,{children:[g.jsx(Fu,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Rb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),z&&g.jsx(ju,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Hu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:v,onRename:N,onReopen:()=>f(e.id),onClose:()=>u(e.id),onDelete:()=>p(e.id)})]})})})}),aj=fc("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Kn(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:n,variant:o,asChild:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"default":o,u=(l===void 0?!1:l)?Gu:"span";let f;e[5]!==n||e[6]!==d?(f=Ee(aj({variant:d}),n),e[5]=n,e[6]=d,e[7]=f):f=e[7];let p;return e[8]!==u||e[9]!==i||e[10]!==f||e[11]!==d?(p=g.jsx(u,{"data-slot":"badge","data-variant":d,className:f,...i}),e[8]=u,e[9]=i,e[10]=f,e[11]=d,e[12]=p):p=e[12],p}const lj=ii.memo(function(e){const n=me.c(45),{allSessions:i,currentSession:o,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,favoritedWorkspaceIds:u,workspaces:f,activeWorkspace:p,onSelectWorkspace:h,onResumeSession:v,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRenameSession:_,onCreateSessionInWorkspace:b,connected:y}=e;let x;if(n[0]!==u||n[1]!==f){const j=new Map(f.map(cj));x=u.map(O=>j.get(O)).filter(uj),n[0]=u,n[1]=f,n[2]=x}else x=n[2];const k=x;let N;if(n[3]!==i||n[4]!==k){N=new Map;for(const j of k){const O=i.filter(z=>z.workspaceId===j.id&&z.status==="active"&&z.parentId===null).sort(dj);N.set(j.id,O)}n[3]=i,n[4]=k,n[5]=N}else N=n[5];const A=N;if(k.length===0){let j;n[6]===Symbol.for("react.memo_cache_sentinel")?(j=g.jsx(Gf,{children:"Overview"}),n[6]=j):j=n[6];let O;return n[7]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsxs(Wf,{children:[j,g.jsx(Kf,{children:g.jsx("div",{className:"px-2 py-8 text-center text-sm text-muted-foreground",children:"Star a workspace to see it here"})})]}),n[7]=O):O=n[7],O}let M;if(n[8]!==(p==null?void 0:p.id)||n[9]!==i||n[10]!==y||n[11]!==(o==null?void 0:o.id)||n[12]!==(o==null?void 0:o.workspaceId)||n[13]!==l||n[14]!==k||n[15]!==S||n[16]!==b||n[17]!==w||n[18]!==_||n[19]!==C||n[20]!==v||n[21]!==h||n[22]!==a||n[23]!==d||n[24]!==A){let j;n[26]!==(p==null?void 0:p.id)||n[27]!==i||n[28]!==y||n[29]!==(o==null?void 0:o.id)||n[30]!==(o==null?void 0:o.workspaceId)||n[31]!==l||n[32]!==S||n[33]!==b||n[34]!==w||n[35]!==_||n[36]!==C||n[37]!==v||n[38]!==h||n[39]!==a||n[40]!==d||n[41]!==A?(j=O=>{const z=O.id===(p==null?void 0:p.id),q=(o==null?void 0:o.workspaceId)===O.id,$=A.get(O.id)||[];return g.jsx(Lo,{defaultOpen:z,className:"group/collapsible",children:g.jsxs(Wf,{children:[g.jsx(Gf,{asChild:!0,children:g.jsxs(Io,{className:"flex items-center justify-between w-full",onClick:()=>h(O),children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ni,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),O.isVirtual?g.jsx(wg,{className:"size-3.5"}):g.jsx(No,{className:"size-3.5"}),g.jsx("span",{className:q?"truncate text-sidebar-foreground font-medium":"truncate",children:O.name})]}),g.jsx(Kn,{variant:"secondary",children:$.length})]})}),g.jsx(Bo,{children:g.jsxs(Kf,{children:[g.jsx(Yl,{children:g.jsx(Ta,{children:g.jsxs(ec,{onClick:()=>b(O.id),disabled:!y,className:"w-full",children:[g.jsx(cc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),g.jsx(tj,{}),g.jsx(Yl,{children:$.length===0?g.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground",children:"(no active sessions)"}):$.map(V=>g.jsx(Vg,{session:V,allSessions:i,isActive:(o==null?void 0:o.id)===V.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:v,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRename:_},V.id))})]})})]})},O.id)},n[26]=p==null?void 0:p.id,n[27]=i,n[28]=y,n[29]=o==null?void 0:o.id,n[30]=o==null?void 0:o.workspaceId,n[31]=l,n[32]=S,n[33]=b,n[34]=w,n[35]=_,n[36]=C,n[37]=v,n[38]=h,n[39]=a,n[40]=d,n[41]=A,n[42]=j):j=n[42],M=k.map(j),n[8]=p==null?void 0:p.id,n[9]=i,n[10]=y,n[11]=o==null?void 0:o.id,n[12]=o==null?void 0:o.workspaceId,n[13]=l,n[14]=k,n[15]=S,n[16]=b,n[17]=w,n[18]=_,n[19]=C,n[20]=v,n[21]=h,n[22]=a,n[23]=d,n[24]=A,n[25]=M}else M=n[25];let T;return n[43]!==M?(T=g.jsx(g.Fragment,{children:M}),n[43]=M,n[44]=T):T=n[44],T});function cj(t){return[t.id,t]}function uj(t){return t!==void 0}function dj(t,e){return new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}const fj=D.forwardRef((t,e)=>{const n=me.c(92),{sessions:i,currentSession:o,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,connected:u,workspaces:f,activeWorkspace:p,allSessions:h,viewMode:v,favoritedWorkspaceIds:S,onCreateSession:C,onResumeSession:w,onCloseSession:_,onReopenSession:b,onDeleteSession:y,onRenameSession:x,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,onDeleteWorkspace:M,onCreateSessionInWorkspace:T,onOpenSettings:j,onOpenMCP:O,onOpenAddServer:z,onServerSwitch:q,onEscape:$}=t,{quickConnections:V,addToQuickConnections:K,removeFromQuickConnections:G,activeServer:Y}=dc();ld();const Q=D.useRef(null),I=D.useRef(null);let L,B;n[0]!==l?(L=()=>{I.current=l},B=[l],n[0]=l,n[1]=L,n[2]=B):(L=n[1],B=n[2]),D.useEffect(L,B);let H;n[3]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{var St;const _e=Q.current;if(!_e)return;const Ye=Array.from(_e.querySelectorAll('[data-sidebar="menu-button"]'));if(Ye.length===0){_e.focus();return}const st=Ye.find(Pt=>Pt.getAttribute("data-session-id")===I.current);st?st.focus():(St=Ye[0])==null||St.focus()},n[3]=H):H=n[3];const F=H;let J,ne;n[4]===Symbol.for("react.memo_cache_sentinel")?(J=()=>({focusSessionPanel:F}),ne=[F],n[4]=J,n[5]=ne):(J=n[4],ne=n[5]),D.useImperativeHandle(e,J,ne);let Z;n[6]!==$?(Z=_e=>{var Ft,Gt,$t,Tn,Nn;const Ye=Q.current;if(!Ye)return;const st=document.activeElement;if(st instanceof HTMLInputElement||st instanceof HTMLTextAreaElement||st instanceof HTMLElement&&st.contentEditable==="true")return;const St=Array.from(Ye.querySelectorAll('[data-sidebar="menu-button"]')),Pt=St.indexOf(document.activeElement);e:switch(_e.key){case"ArrowDown":{_e.preventDefault();const Xt=Pt<St.length-1?Pt+1:0;(Ft=St[Xt])==null||Ft.focus();break e}case"ArrowUp":{_e.preventDefault();const Xt=Pt>0?Pt-1:St.length-1;(Gt=St[Xt])==null||Gt.focus();break e}case"ArrowRight":{const Xt=($t=document.activeElement)==null?void 0:$t.parentElement;if(!Xt)break e;const an=Xt.querySelector('button[aria-label="Toggle child sessions"]');if(!an)break e;const Kt=Xt.closest("[data-state]");(Kt==null?void 0:Kt.dataset.state)==="closed"&&(_e.preventDefault(),an.click());break e}case"ArrowLeft":{const Xt=(Tn=document.activeElement)==null?void 0:Tn.parentElement;if(!Xt)break e;const an=Xt.querySelector('button[aria-label="Toggle child sessions"]');if(!an)break e;const Kt=Xt.closest("[data-state]");(Kt==null?void 0:Kt.dataset.state)==="open"&&(_e.preventDefault(),an.click());break e}case"Enter":{document.activeElement instanceof HTMLButtonElement&&document.activeElement.click();break e}case"Escape":_e.preventDefault(),(Nn=document.activeElement)==null||Nn.blur(),$==null||$()}},n[6]=$,n[7]=Z):Z=n[7];const W=Z;let U,te;if(n[8]!==i){const _e=i.filter(hj);U=_e.filter(pj),te=_e.filter(mj),n[8]=i,n[9]=U,n[10]=te}else U=n[9],te=n[10];let ie;n[11]!==U||n[12]!==te?(ie={activeSessions:U,archivedSessions:te},n[11]=U,n[12]=te,n[13]=ie):ie=n[13];const{activeSessions:ae,archivedSessions:se}=ie;let ge;n[14]!==(Y==null?void 0:Y.id)||n[15]!==V?(ge=_e=>V.some(Ye=>Ye.workspaceId===_e&&Ye.serverId===(Y==null?void 0:Y.id)),n[14]=Y==null?void 0:Y.id,n[15]=V,n[16]=ge):ge=n[16];const Te=ge;let Me;n[17]!==Y||n[18]!==K||n[19]!==V||n[20]!==G?(Me=(_e,Ye)=>{if(!Y)return;const st=V.find(St=>St.workspaceId===_e&&St.serverId===Y.id);st?G(st.id):K(Y.id,Y.name,_e,Ye)},n[17]=Y,n[18]=K,n[19]=V,n[20]=G,n[21]=Me):Me=n[21];const Ke=Me;let Re;n[22]!==z||n[23]!==q?(Re=g.jsx(z8,{onOpenAddServer:z,onServerSwitch:q}),n[22]=z,n[23]=q,n[24]=Re):Re=n[24];let et;n[25]!==p||n[26]!==Ke||n[27]!==Te||n[28]!==A||n[29]!==N||n[30]!==M||n[31]!==k||n[32]!==v||n[33]!==f?(et=v!=="overview"&&g.jsx(I8,{workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,isWorkspaceFavorited:Te,onToggleFavorite:Ke,onDeleteWorkspace:M}),n[25]=p,n[26]=Ke,n[27]=Te,n[28]=A,n[29]=N,n[30]=M,n[31]=k,n[32]=v,n[33]=f,n[34]=et):et=n[34];let Ze;n[35]!==Re||n[36]!==et?(Ze=g.jsxs("div",{className:"p-2 space-y-2",children:[Re,et]}),n[35]=Re,n[36]=et,n[37]=Ze):Ze=n[37];let Ge;n[38]!==u||n[39]!==C||n[40]!==v?(Ge=v!=="overview"&&g.jsx(Yl,{children:g.jsx(Ta,{children:g.jsxs(ec,{onClick:C,disabled:!u,className:"w-full",children:[g.jsx(cc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),n[38]=u,n[39]=C,n[40]=v,n[41]=Ge):Ge=n[41];let rt;n[42]!==Ze||n[43]!==Ge?(rt=g.jsxs(J8,{children:[Ze,Ge]}),n[42]=Ze,n[43]=Ge,n[44]=rt):rt=n[44];let ue;n[45]!==ae||n[46]!==p||n[47]!==h||n[48]!==se||n[49]!==u||n[50]!==o||n[51]!==l||n[52]!==S||n[53]!==_||n[54]!==T||n[55]!==y||n[56]!==x||n[57]!==b||n[58]!==w||n[59]!==k||n[60]!==a||n[61]!==i||n[62]!==d||n[63]!==v||n[64]!==f?(ue=v==="overview"?g.jsx(lj,{allSessions:h,currentSession:o,currentSessionId:l,streamingSessionId:d,favoritedWorkspaceIds:S,workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onResumeSession:w,onCloseSession:_,onReopenSession:b,onDeleteSession:y,onRenameSession:x,onCreateSessionInWorkspace:T,connected:u,pendingPermissions:a}):g.jsxs(g.Fragment,{children:[ae.length>0&&g.jsx(Lo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Wf,{children:[g.jsx(Gf,{asChild:!0,children:g.jsxs(Io,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ni,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),g.jsx(Kn,{variant:"secondary",children:ae.length})]})}),g.jsx(Bo,{children:g.jsx(Kf,{children:g.jsx(Yl,{children:ae.map(_e=>g.jsx(Vg,{session:_e,allSessions:i,isActive:(o==null?void 0:o.id)===_e.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:w,onCloseSession:_,onReopenSession:b,onDeleteSession:y,onRename:x},_e.id))})})})]})}),se.length>0&&g.jsx(Lo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Wf,{children:[g.jsx(Gf,{asChild:!0,children:g.jsxs(Io,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ni,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),g.jsx(Kn,{variant:"secondary",children:se.length})]})}),g.jsx(Bo,{children:g.jsx(Kf,{children:g.jsx(Yl,{children:se.map(_e=>g.jsx(Vg,{session:_e,allSessions:i,isActive:(o==null?void 0:o.id)===_e.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:w,onCloseSession:_,onReopenSession:b,onDeleteSession:y,onRename:x},_e.id))})})})]})}),ae.length===0&&se.length===0&&g.jsxs("div",{className:"p-4 text-center text-sm text-muted-foreground",children:["No sessions yet.",g.jsx("br",{}),"Start a new chat to begin."]})]}),n[45]=ae,n[46]=p,n[47]=h,n[48]=se,n[49]=u,n[50]=o,n[51]=l,n[52]=S,n[53]=_,n[54]=T,n[55]=y,n[56]=x,n[57]=b,n[58]=w,n[59]=k,n[60]=a,n[61]=i,n[62]=d,n[63]=v,n[64]=f,n[65]=ue):ue=n[65];let ct;n[66]!==W||n[67]!==ue?(ct=g.jsx(nj,{ref:Q,tabIndex:-1,onKeyDown:W,className:"outline-none",children:ue}),n[66]=W,n[67]=ue,n[68]=ct):ct=n[68];let it;n[69]!==u?(it=u?g.jsx(E5,{className:"size-3.5 text-success"}):g.jsx(Kx,{className:"size-3.5 text-destructive"}),n[69]=u,n[70]=it):it=n[70];const ut=u?"Connected":"Disconnected";let ce;n[71]!==ut?(ce=g.jsx("span",{className:"text-xs text-muted-foreground",children:ut}),n[71]=ut,n[72]=ce):ce=n[72];let be;n[73]!==it||n[74]!==ce?(be=g.jsx(Ta,{children:g.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[it,ce]})}),n[73]=it,n[74]=ce,n[75]=be):be=n[75];let ke,je;n[76]===Symbol.for("react.memo_cache_sentinel")?(ke=g.jsx(Na,{className:"size-4","data-icon":"inline-start"}),je=g.jsx("span",{children:"MCP Servers"}),n[76]=ke,n[77]=je):(ke=n[76],je=n[77]);let Le;n[78]!==O?(Le=g.jsx(Ta,{children:g.jsxs(ec,{onClick:O,children:[ke,je]})}),n[78]=O,n[79]=Le):Le=n[79];let lt,xe;n[80]===Symbol.for("react.memo_cache_sentinel")?(lt=g.jsx(qx,{className:"size-4","data-icon":"inline-start"}),xe=g.jsx("span",{children:"Settings"}),n[80]=lt,n[81]=xe):(lt=n[80],xe=n[81]);let ze;n[82]!==j?(ze=g.jsx(Ta,{children:g.jsx("div",{className:"flex items-center gap-1",children:g.jsxs(ec,{onClick:j,children:[lt,xe]})})}),n[82]=j,n[83]=ze):ze=n[83];let Ve;n[84]!==be||n[85]!==Le||n[86]!==ze?(Ve=g.jsx(ej,{className:"pb-4",children:g.jsxs(Yl,{children:[be,Le,ze]})}),n[84]=be,n[85]=Le,n[86]=ze,n[87]=Ve):Ve=n[87];let _t;return n[88]!==rt||n[89]!==ct||n[90]!==Ve?(_t=g.jsxs(Z8,{collapsible:"offcanvas",children:[rt,ct,Ve]}),n[88]=rt,n[89]=ct,n[90]=Ve,n[91]=_t):_t=n[91],_t});function hj(t){return!t.parentId}function pj(t){return t.status==="active"}function mj(t){return t.status==="closed"}const gj={".ts":{icon:Ki,color:"text-blue-500"},".tsx":{icon:Ki,color:"text-blue-500"},".js":{icon:Ki,color:"text-yellow-500"},".jsx":{icon:Ki,color:"text-yellow-500"},".json":{icon:Ki,color:"text-yellow-600"},".md":{icon:Ki,color:"text-gray-500"},".css":{icon:Ki,color:"text-purple-500"},".html":{icon:Ki,color:"text-orange-500"}};function zC({entry:t,workspaceId:e,parentPath:n,depth:i,onFileSelect:o,showHidden:l=!0,serverUrl:d,apiToken:a}){const{fetchWithAuth:u}=id(),[f,p]=D.useState(!1),[h,v]=D.useState([]),[S,C]=D.useState(!1),[w,_]=D.useState(!1),b=n?`${n}/${t.path}`:t.path,y=t.type==="directory",x=async()=>{if(!(w||S)){C(!0);try{const O=await(await u(`/api/workspaces/${e}/files?path=${encodeURIComponent(b)}&showHidden=${l}`,{},{serverUrl:d,token:a})).json();v(O.files||[]),_(!0)}catch(j){console.error("Failed to load children:",j)}finally{C(!1)}}},k=j=>{p(j),j&&y&&x()},N=()=>{!y&&o&&o({...t,path:b})},A=t.extension?gj[t.extension]:null,M=y?f?kg:No:(A==null?void 0:A.icon)||Ki,T=y?"text-amber-500":(A==null?void 0:A.color)||"text-muted-foreground";return y?g.jsxs(Lo,{open:f,onOpenChange:k,children:[g.jsx(Io,{asChild:!0,children:g.jsxs("button",{className:Ee("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[S?g.jsx(zr,{className:"w-3 h-3 animate-spin shrink-0"}):g.jsx(Ni,{className:Ee("w-3 h-3 shrink-0 transition-transform",f&&"rotate-90")}),g.jsx(M,{className:Ee("w-4 h-4 shrink-0",T)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}),g.jsx(Bo,{children:h.map(j=>g.jsx(zC,{entry:j,workspaceId:e,parentPath:b,depth:i+1,onFileSelect:o,showHidden:l,serverUrl:d,apiToken:a},`${b}/${j.path}`))})]}):g.jsxs("button",{onClick:N,className:Ee("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[g.jsx(M,{className:Ee("w-4 h-4 shrink-0",T)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}function Tb({workspaceId:t,serverUrl:e,apiToken:n,onFileSelect:i,showHidden:o=!0}){const[l,d]=D.useState([]),[a,u]=D.useState(""),[f,p]=D.useState(!0),[h,v]=D.useState(null),{fetchWithAuth:S}=id(),C=D.useCallback(async()=>{p(!0),v(null);try{const w=await S(`/api/workspaces/${t}/files?showHidden=${o}`,{},{serverUrl:e,token:n}),_=await w.json();if(!w.ok)throw new Error(_.message||"Failed to load files");d(_.files),u(_.currentPath)}catch(w){v(w instanceof Error?w.message:"Failed to load files")}finally{p(!1)}},[t,o,S,e,n]);return D.useEffect(()=>{C()},[C]),f?g.jsxs("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:[g.jsx(zr,{className:"w-4 h-4 animate-spin mr-2"}),"Loading files..."]}):h?g.jsxs("div",{className:"p-4 text-sm text-destructive",children:[h,g.jsx(Pe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Xl,{className:"w-3 h-3"})})]}):l.length===0?g.jsxs("div",{className:"p-4 text-sm text-muted-foreground",children:["Empty workspace",g.jsx(Pe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Xl,{className:"w-3 h-3"})})]}):g.jsxs("div",{className:"flex flex-col h-full min-w-0 overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between min-w-0 overflow-hidden px-3 py-2",children:[g.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide truncate min-w-0",children:"Files"}),g.jsx(Pe,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:C,children:g.jsx(Xl,{className:"w-3 h-3"})})]}),g.jsx(Sc,{className:"flex-1 min-h-0 min-w-0",children:g.jsx("div",{className:"px-2 pb-2 min-w-0 overflow-hidden",children:g.jsx("div",{className:"space-y-0.5",children:l.map(w=>g.jsx(zC,{entry:w,workspaceId:t,parentPath:a,depth:0,onFileSelect:i,showHidden:o,serverUrl:e,apiToken:n},w.path))})})})]})}function vj(t){const e=me.c(33),{workspaceId:n,searchQuery:i,selectedIndex:o,onSelect:l,onFilesChange:d,showHidden:a,serverUrl:u,apiToken:f}=t,p=a===void 0?!0:a;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[0]=h):h=e[0];const[v,S]=D.useState(h),[C,w]=D.useState(!1),[_,b]=D.useState(i),{fetchWithAuth:y}=id(),x=D.useRef(0);let k,N;e[1]!==i?(k=()=>{const K=setTimeout(()=>{b(i)},300);return()=>clearTimeout(K)},N=[i],e[1]=i,e[2]=k,e[3]=N):(k=e[2],N=e[3]),D.useEffect(k,N);let A,M;if(e[4]!==f||e[5]!==_||e[6]!==y||e[7]!==d||e[8]!==u||e[9]!==p||e[10]!==n?(A=()=>{if(!_||_.length<2){S([]),d([]);return}const K=x.current=x.current+1;w(!0);const G=new AbortController;return y(`/api/workspaces/${n}/files?search=${encodeURIComponent(_)}&showHidden=${p}`,{signal:G.signal},{serverUrl:u,token:f}).then(yj).then(Y=>{if(K!==x.current)return;const Q=Y.files||[];S(Q),d(Q)}).catch(_j).finally(()=>{K===x.current&&w(!1)}),()=>G.abort()},M=[n,_,d,p,y,u,f],e[4]=f,e[5]=_,e[6]=y,e[7]=d,e[8]=u,e[9]=p,e[10]=n,e[11]=A,e[12]=M):(A=e[11],M=e[12]),D.useEffect(A,M),!i||i.length<2){let K;return e[13]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsx("div",{className:"p-2 text-xs text-muted-foreground",children:"Type at least 2 characters to search files..."}),e[13]=K):K=e[13],K}if(C){let K;return e[14]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsxs("div",{className:"flex items-center justify-center p-4 text-muted-foreground",children:[g.jsx(zr,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}),e[14]=K):K=e[14],K}if(v.length===0){let K;return e[15]!==i?(K=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No files found matching "',i,'"']}),e[15]=i,e[16]=K):K=e[16],K}let T;if(e[17]!==v||e[18]!==l||e[19]!==o){let K;e[21]!==l||e[22]!==o?(K=(G,Y)=>g.jsxs("button",{onClick:()=>l(G),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",Y===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[G.type==="directory"?g.jsx(No,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):g.jsx(Ki,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:G.path}),G.extension&&g.jsx("span",{className:"text-xs text-muted-foreground",children:G.extension})]},G.path),e[21]=l,e[22]=o,e[23]=K):K=e[23],T=v.map(K),e[17]=v,e[18]=l,e[19]=o,e[20]=T}else T=e[20];const j=v.length!==1?"s":"";let O;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[24]=O):O=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[25]=z):z=e[25];let q;e[26]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[26]=q):q=e[26];let $;e[27]!==v.length||e[28]!==j?($=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[v.length," result",j," •",O," navigate",z," select",q," close"]}),e[27]=v.length,e[28]=j,e[29]=$):$=e[29];let V;return e[30]!==$||e[31]!==T?(V=g.jsxs("div",{className:"p-1",children:[T,$]}),e[30]=$,e[31]=T,e[32]=V):V=e[32],V}function _j(t){t.name!=="AbortError"&&console.error("File search failed:",t)}function yj(t){return t.json()}function bj(t){const e=me.c(40),{workspaceId:n,serverUrl:i,apiToken:o,isOpen:l,onClose:d}=t,a=ad();if(!n)return null;if(a){let k;e[0]!==d?(k=q=>!q&&d(),e[0]=d,e[1]=k):k=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(Ih,{className:"sr-only",children:g.jsx(Bh,{children:"Files"})}),e[2]=N):N=e[2];let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[3]=A):A=e[3];let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(Os,{className:"w-4 h-4"}),e[4]=M):M=e[4];let T;e[5]!==d?(T=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[A,g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:d,children:M})]}),e[5]=d,e[6]=T):T=e[6];let j;e[7]!==o||e[8]!==i||e[9]!==n?(j=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[7]=o,e[8]=i,e[9]=n,e[10]=j):j=e[10];let O;e[11]!==T||e[12]!==j?(O=g.jsxs(Lh,{side:"right",className:"w-72 p-0 bg-sidebar [&>button]:hidden",children:[N,T,j]}),e[11]=T,e[12]=j,e[13]=O):O=e[13];let z;return e[14]!==l||e[15]!==k||e[16]!==O?(z=g.jsx(Oh,{open:l,onOpenChange:k,children:O}),e[14]=l,e[15]=k,e[16]=O,e[17]=z):z=e[17],z}const u=!l&&"w-0";let f;e[18]!==u?(f=Ee("relative w-64 bg-transparent transition-[width] duration-200 ease-linear",u),e[18]=u,e[19]=f):f=e[19];let p;e[20]!==f?(p=g.jsx("div",{className:f}),e[20]=f,e[21]=p):p=e[21];const h=!l&&"translate-x-full";let v;e[22]!==h?(v=Ee("fixed right-0 z-10 w-64 bg-sidebar border-l border-border flex flex-col overflow-hidden","transform transition-transform duration-200 ease-linear",h),e[22]=h,e[23]=v):v=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[25]=C):C=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(Os,{className:"w-4 h-4"}),e[26]=w):w=e[26];let _;e[27]!==d?(_=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[C,g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:d,children:w})]}),e[27]=d,e[28]=_):_=e[28];let b;e[29]!==o||e[30]!==i||e[31]!==n?(b=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[29]=o,e[30]=i,e[31]=n,e[32]=b):b=e[32];let y;e[33]!==b||e[34]!==v||e[35]!==_?(y=g.jsxs("div",{className:v,style:S,children:[_,b]}),e[33]=b,e[34]=v,e[35]=_,e[36]=y):y=e[36];let x;return e[37]!==y||e[38]!==p?(x=g.jsxs(g.Fragment,{children:[p,y]}),e[37]=y,e[38]=p,e[39]=x):x=e[39],x}var tg={exports:{}},Nb;function xj(){return Nb||(Nb=1,(function(t,e){(function(n,i){t.exports=i()})(globalThis,(()=>(()=>{var n={4567:function(d,a,u){var f=this&&this.__decorate||function(y,x,k,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,x,k,N);else for(var j=y.length-1;j>=0;j--)(A=y[j])&&(T=(M<3?A(T):M>3?A(x,k,T):A(x,k))||T);return M>3&&T&&Object.defineProperty(x,k,T),T},p=this&&this.__param||function(y,x){return function(k,N){x(k,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=u(9042),v=u(9924),S=u(844),C=u(4725),w=u(2585),_=u(3656);let b=a.AccessibilityManager=class extends S.Disposable{constructor(y,x,k,N){super(),this._terminal=y,this._coreBrowserService=k,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new v.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
507
- `)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,_.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(y){for(let x=0;x<y;x++)this._handleChar(" ")}_handleChar(y){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===`
508
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,x){this._liveRegionDebouncer.refresh(y,x,this._terminal.rows)}_renderRows(y,x){const k=this._terminal.buffer,N=k.lines.length.toString();for(let A=y;A<=x;A++){const M=k.lines.get(k.ydisp+A),T=[],j=(M==null?void 0:M.translateToString(!0,void 0,void 0,T))||"",O=(k.ydisp+A+1).toString(),z=this._rowElements[A];z&&(j.length===0?(z.innerText=" ",this._rowColumns.set(z,[0,1])):(z.textContent=j,this._rowColumns.set(z,T)),z.setAttribute("aria-posinset",O),z.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,x){const k=y.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let A,M;if(x===0?(A=k,M=this._rowElements.pop(),this._rowContainer.removeChild(M)):(A=this._rowElements.shift(),M=k,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),M.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var j,O;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:y.anchorNode,offset:y.anchorOffset},k={node:y.focusNode,offset:y.focusOffset};if((x.node.compareDocumentPosition(k.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===k.node&&x.offset>k.offset)&&([x,k]=[k,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.node))return;const N=this._rowElements.slice(-1)[0];if(k.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(k={node:N,offset:(O=(j=N.textContent)==null?void 0:j.length)!=null?O:0}),!this._rowContainer.contains(k.node))return;const A=({node:z,offset:q})=>{const $=z instanceof Text?z.parentNode:z;let V=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(V))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get($);if(!K)return console.warn("columns is null. Race condition?"),null;let G=q<K.length?K[q]:K.slice(-1)[0]+1;return G>=this._terminal.cols&&(++V,G=0),{row:V,column:G}},M=A(x),T=A(k);if(M&&T){if(M.row>T.row||M.row===T.row&&M.column>=T.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(T.row-M.row)*this._terminal.cols-M.column+T.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>y;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let y=0;y<this._terminal.rows;y++)this._refreshRowDimensions(this._rowElements[y])}}_refreshRowDimensions(y){y.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=b=f([p(1,w.IInstantiationService),p(2,C.ICoreBrowserService),p(3,C.IRenderService)],b)},3614:(d,a)=>{function u(v){return v.replace(/\r?\n/g,"\r")}function f(v,S){return S?"\x1B[200~"+v+"\x1B[201~":v}function p(v,S,C,w){v=f(v=u(v),C.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(v,!0),S.value=""}function h(v,S,C){const w=C.getBoundingClientRect(),_=v.clientX-w.left-10,b=v.clientY-w.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${_}px`,S.style.top=`${b}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=f,a.copyHandler=function(v,S){v.clipboardData&&v.clipboardData.setData("text/plain",S.selectionText),v.preventDefault()},a.handlePasteEvent=function(v,S,C,w){v.stopPropagation(),v.clipboardData&&p(v.clipboardData.getData("text/plain"),S,C,w)},a.paste=p,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(v,S,C,w,_){h(v,S,C),_&&w.rightClickSelect(v),S.value=w.selectionText,S.select()}},7239:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=u(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(p,h,v){this._css.set(p,h,v)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,v){this._color.set(p,h,v)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,f,p,h){u.addEventListener(f,p,h);let v=!1;return{dispose:()=>{v||(v=!0,u.removeEventListener(f,p,h))}}}},3551:function(d,a,u){var f=this&&this.__decorate||function(b,y,x,k){var N,A=arguments.length,M=A<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,y,x,k);else for(var T=b.length-1;T>=0;T--)(N=b[T])&&(M=(A<3?N(M):A>3?N(y,x,M):N(y,x))||M);return A>3&&M&&Object.defineProperty(y,x,M),M},p=this&&this.__param||function(b,y){return function(x,k){y(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=u(3656),v=u(8460),S=u(844),C=u(2585),w=u(4725);let _=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(b,y,x,k,N){super(),this._element=b,this._mouseService=y,this._renderService=x,this._bufferService=k,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new v.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new v.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const x=b.composedPath();for(let k=0;k<x.length;k++){const N=x[k];if(N.classList.contains("xterm"))break;if(N.classList.contains("xterm-hover"))return}this._lastBufferCell&&y.x===this._lastBufferCell.x&&y.y===this._lastBufferCell.y||(this._handleHover(y),this._lastBufferCell=y)}_handleHover(b){if(this._activeLine!==b.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(b,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))}_askForLink(b,y){var k,N;this._activeProviderReplies&&y||((k=this._activeProviderReplies)==null||k.forEach((A=>{A==null||A.forEach((M=>{M.link.dispose&&M.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[A,M]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(A)&&(x=this._checkLinkProviderResult(A,b,x)):M.provideLinks(b.y,(T=>{var O,z;if(this._isMouseOut)return;const j=T==null?void 0:T.map((q=>({link:q})));(O=this._activeProviderReplies)==null||O.set(A,j),x=this._checkLinkProviderResult(A,b,x),((z=this._activeProviderReplies)==null?void 0:z.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const x=new Set;for(let k=0;k<y.size;k++){const N=y.get(k);if(N)for(let A=0;A<N.length;A++){const M=N[A],T=M.link.range.start.y<b?0:M.link.range.start.x,j=M.link.range.end.y>b?this._bufferService.cols:M.link.range.end.x;for(let O=T;O<=j;O++){if(x.has(O)){N.splice(A--,1);break}x.add(O)}}}}_checkLinkProviderResult(b,y,x){var A;if(!this._activeProviderReplies)return x;const k=this._activeProviderReplies.get(b);let N=!1;for(let M=0;M<b;M++)this._activeProviderReplies.has(M)&&!this._activeProviderReplies.get(M)||(N=!0);if(!N&&k){const M=k.find((T=>this._linkAtPosition(T.link,y)));M&&(x=!0,this._handleNewLink(M))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let M=0;M<this._activeProviderReplies.size;M++){const T=(A=this._activeProviderReplies.get(M))==null?void 0:A.find((j=>this._linkAtPosition(j.link,y)));if(T){x=!0,this._handleNewLink(T);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,k;return(k=(x=this._currentLink)==null?void 0:x.state)==null?void 0:k.decorations.pointerCursor},set:x=>{var k;(k=this._currentLink)!=null&&k.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,k;return(k=(x=this._currentLink)==null?void 0:x.state)==null?void 0:k.decorations.underline},set:x=>{var k,N,A;(k=this._currentLink)!=null&&k.state&&((A=(N=this._currentLink)==null?void 0:N.state)==null?void 0:A.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const k=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=k&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(k,N),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(b,y,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(x,y.text)}_fireUnderlineEvent(b,y){const x=b.range,k=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-k-1,x.end.x,x.end.y-k-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,y,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(x,y.text)}_linkAtPosition(b,y){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,k=b.range.end.y*this._bufferService.cols+b.range.end.x,N=y.y*this._bufferService.cols+y.x;return x<=N&&N<=k}_positionFromMouseEvent(b,y,x){const k=x.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,x,k,N){return{x1:b,y1:y,x2:x,y2:k,cols:this._bufferService.cols,fg:N}}};a.Linkifier=_=f([p(1,w.IMouseService),p(2,w.IRenderService),p(3,C.IBufferService),p(4,w.ILinkProviderService)],_)},9042:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,a,u){var f=this&&this.__decorate||function(w,_,b,y){var x,k=arguments.length,N=k<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(_,b,N):x(_,b))||N);return k>3&&N&&Object.defineProperty(_,b,N),N},p=this&&this.__param||function(w,_){return function(b,y){_(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=u(511),v=u(2585);let S=a.OscLinkProvider=class{constructor(w,_,b){this._bufferService=w,this._optionsService=_,this._oscLinkService=b}provideLinks(w,_){var j;const b=this._bufferService.buffer.lines.get(w-1);if(!b)return void _(void 0);const y=[],x=this._optionsService.rawOptions.linkHandler,k=new h.CellData,N=b.getTrimmedLength();let A=-1,M=-1,T=!1;for(let O=0;O<N;O++)if(M!==-1||b.hasContent(O)){if(b.loadCell(O,k),k.hasExtendedAttrs()&&k.extended.urlId){if(M===-1){M=O,A=k.extended.urlId;continue}T=k.extended.urlId!==A}else M!==-1&&(T=!0);if(T||M!==-1&&O===N-1){const z=(j=this._oscLinkService.getLinkData(A))==null?void 0:j.uri;if(z){const q={start:{x:M+1,y:w},end:{x:O+(T||O!==N-1?0:1),y:w}};let $=!1;if(!(x!=null&&x.allowNonHttpProtocols))try{const V=new URL(z);["http:","https:"].includes(V.protocol)||($=!0)}catch{$=!0}$||y.push({text:z,range:q,activate:(V,K)=>x?x.activate(V,K,q):C(0,K),hover:(V,K)=>{var G;return(G=x==null?void 0:x.hover)==null?void 0:G.call(x,V,K,q)},leave:(V,K)=>{var G;return(G=x==null?void 0:x.leave)==null?void 0:G.call(x,V,K,q)}})}T=!1,k.hasExtendedAttrs()&&k.extended.urlId?(M=O,A=k.extended.urlId):(M=-1,A=-1)}}_(y)}};function C(w,_){if(confirm(`Do you want to navigate to ${_}?
509
-
510
- WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([p(0,v.IBufferService),p(1,v.IOptionsService),p(2,v.IOscLinkService)],S)},6193:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,p){this._rowCount=p,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=u(3614),p=u(3656),h=u(3551),v=u(9042),S=u(3730),C=u(1680),w=u(3107),_=u(5744),b=u(2950),y=u(1296),x=u(428),k=u(4269),N=u(5114),A=u(8934),M=u(3230),T=u(9312),j=u(4725),O=u(6731),z=u(8055),q=u(8969),$=u(8460),V=u(844),K=u(6114),G=u(8437),Y=u(2584),Q=u(7399),I=u(5941),L=u(9074),B=u(2585),H=u(5435),F=u(4567),J=u(779);class ne extends q.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(W={}){super(W),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new $.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new $.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new $.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new $.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new $.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new $.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new $.EventEmitter),this._onBlur=this.register(new $.EventEmitter),this._onA11yCharEmitter=this.register(new $.EventEmitter),this._onA11yTabEmitter=this.register(new $.EventEmitter),this._onWillOpen=this.register(new $.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(J.LinkProviderService),this._instantiationService.setService(j.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,te)=>this.refresh(U,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,$.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,$.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,V.toDisposable)((()=>{var U,te;this._customKeyEventHandler=void 0,(te=(U=this.element)==null?void 0:U.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(W){if(this._themeService)for(const U of W){let te,ie="";switch(U.index){case 256:te="foreground",ie="10";break;case 257:te="background",ie="11";break;case 258:te="cursor",ie="12";break;default:te="ansi",ie="4;"+U.index}switch(U.type){case 0:const ae=z.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${ie};${(0,I.toRgbString)(ae)}${Y.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((se=>se.ansi[U.index]=z.channels.toColor(...U.color)));else{const se=te;this._themeService.modifyColors((ge=>ge[se]=z.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(W){W?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(W){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var W;return(W=this.textarea)==null?void 0:W.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const W=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(W);if(!U)return;const te=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ae=U.getWidth(te),se=this._renderService.dimensions.css.cell.width*ae,ge=this.buffer.y*this._renderService.dimensions.css.cell.height,Te=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Te+"px",this.textarea.style.top=ge+"px",this.textarea.style.width=se+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,f.copyHandler)(U,this._selectionService)})));const W=U=>(0,f.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",W)),this.register((0,p.addDisposableDomListener)(this.element,"paste",W)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,f.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,f.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,f.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(W=>this._keyUp(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(W=>this._keyDown(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(W=>this._keyPress(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(W=>this._compositionHelper.compositionupdate(W)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(W=>this._inputEvent(W)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(W){var te,ie,ae;if(!W)throw new Error("Terminal requires a parent element.");if(W.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((te=this.element)==null?void 0:te.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=W.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),W.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,(ie=W.ownerDocument.defaultView)!=null?ie:window,((ae=this._document)!=null?ae:typeof window<"u")?window.document:null)),this._instantiationService.setService(j.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(j.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(j.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(k.CharacterJoinerService),this._instantiationService.setService(j.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(M.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(j.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(j.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(U);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(j.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(w.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const W=this,U=this.element;function te(se){const ge=W._mouseService.getMouseReportCoords(se,W.screenElement);if(!ge)return!1;let Te,Me;switch(se.overrideType||se.type){case"mousemove":Me=32,se.buttons===void 0?(Te=3,se.button!==void 0&&(Te=se.button<3?se.button:3)):Te=1&se.buttons?0:4&se.buttons?1:2&se.buttons?2:3;break;case"mouseup":Me=0,Te=se.button<3?se.button:3;break;case"mousedown":Me=1,Te=se.button<3?se.button:3;break;case"wheel":if(W._customWheelEventHandler&&W._customWheelEventHandler(se)===!1||W.viewport.getLinesScrolled(se)===0)return!1;Me=se.deltaY<0?0:1,Te=4;break;default:return!1}return!(Me===void 0||Te===void 0||Te>4)&&W.coreMouseService.triggerMouseEvent({col:ge.col,row:ge.row,x:ge.x,y:ge.y,button:Te,action:Me,ctrl:se.ctrlKey,alt:se.altKey,shift:se.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ae={mouseup:se=>(te(se),se.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(se)),wheel:se=>(te(se),this.cancel(se,!0)),mousedrag:se=>{se.buttons&&te(se)},mousemove:se=>{se.buttons||te(se)}};this.register(this.coreMouseService.onProtocolChange((se=>{se?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(se)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&se?ie.mousemove||(U.addEventListener("mousemove",ae.mousemove),ie.mousemove=ae.mousemove):(U.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&se?ie.wheel||(U.addEventListener("wheel",ae.wheel,{passive:!1}),ie.wheel=ae.wheel):(U.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&se?ie.mouseup||(ie.mouseup=ae.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&se?ie.mousedrag||(ie.mousedrag=ae.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(U,"mousedown",(se=>{if(se.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(se))return te(se),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(se)}))),this.register((0,p.addDisposableDomListener)(U,"wheel",(se=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(se)===!1)return!1;if(!this.buffer.hasScrollback){const ge=this.viewport.getLinesScrolled(se);if(ge===0)return;const Te=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(se.deltaY<0?"A":"B");let Me="";for(let Ke=0;Ke<Math.abs(ge);Ke++)Me+=Te;return this.coreService.triggerDataEvent(Me,!0),this.cancel(se,!0)}return this.viewport.handleWheel(se)?this.cancel(se):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(U,"touchstart",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(se),this.cancel(se)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(U,"touchmove",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(se)?void 0:this.cancel(se)}),{passive:!1}))}refresh(W,U){var te;(te=this._renderService)==null||te.refreshRows(W,U)}updateCursorStyle(W){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(W)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(W,U,te=0){var ie;te===1?(super.scrollLines(W,U,te),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(W)}paste(W){(0,f.paste)(W,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(W){this._customKeyEventHandler=W}attachCustomWheelEventHandler(W){this._customWheelEventHandler=W}registerLinkProvider(W){return this._linkProviderService.registerLinkProvider(W)}registerCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(W);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(W)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(W){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+W)}registerDecoration(W){return this._decorationService.registerDecoration(W)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(W,U,te){this._selectionService.setSelection(W,U,te)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var W;(W=this._selectionService)==null||W.clearSelection()}selectAll(){var W;(W=this._selectionService)==null||W.selectAll()}selectLines(W,U){var te;(te=this._selectionService)==null||te.selectLines(W,U)}_keyDown(W){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&W.altKey;if(!U&&!this._compositionHelper.keydown(W))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||W.key!=="Dead"&&W.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,Q.evaluateKeyboardEvent)(W,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(W),te.type===3||te.type===2){const ie=this.rows-1;return this.scrollLines(te.type===2?-ie:ie),this.cancel(W,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,W)||(te.cancel&&this.cancel(W,!0),!te.key||!!(W.key&&!W.ctrlKey&&!W.altKey&&!W.metaKey&&W.key.length===1&&W.key.charCodeAt(0)>=65&&W.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==Y.C0.ETX&&te.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||W.altKey||W.ctrlKey?this.cancel(W,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(W,U){const te=W.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||W.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||W.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?te:te&&(!U.keyCode||U.keyCode>47)}_keyUp(W){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(W)||this.focus(),this.updateCursorStyle(W),this._keyPressHandled=!1)}_keyPress(W){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;if(this.cancel(W),W.charCode)U=W.charCode;else if(W.which===null||W.which===void 0)U=W.keyCode;else{if(W.which===0||W.charCode===0)return!1;U=W.which}return!(!U||(W.altKey||W.ctrlKey||W.metaKey)&&!this._isThirdLevelShift(this.browser,W)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(W){if(W.data&&W.inputType==="insertText"&&(!W.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=W.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(W),!0}return!1}resize(W,U){W!==this.cols||U!==this.rows?super.resize(W,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(W,U){var te,ie;(te=this._charSizeService)==null||te.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var W;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(W=this.viewport)==null||W.reset(),this.refresh(0,this.rows-1)}}reset(){var U,te;this.options.rows=this.rows,this.options.cols=this.cols;const W=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(te=this.viewport)==null||te.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1)}clearTextureAtlas(){var W;(W=this._renderService)==null||W.clearTextureAtlas()}_reportFocus(){var W;(W=this.element)!=null&&W.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(W){if(this._renderService)switch(W){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${te};${U}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ae=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[6;${ae};${ie}t`)}}cancel(W,U){if(this.options.cancelEvents||U)return W.preventDefault(),W.stopPropagation(),!1}}a.Terminal=ne},9924:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,p){this._rowCount=p,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const v=h-this._lastRefreshMs,S=this._debounceThresholdMS-v;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(d,a,u){var f=this&&this.__decorate||function(b,y,x,k){var N,A=arguments.length,M=A<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,y,x,k);else for(var T=b.length-1;T>=0;T--)(N=b[T])&&(M=(A<3?N(M):A>3?N(y,x,M):N(y,x))||M);return A>3&&M&&Object.defineProperty(y,x,M),M},p=this&&this.__param||function(b,y){return function(x,k){y(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=u(3656),v=u(4725),S=u(8460),C=u(844),w=u(2585);let _=a.Viewport=class extends C.Disposable{constructor(b,y,x,k,N,A,M,T){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=x,this._optionsService=k,this._charSizeService=N,this._renderService=A,this._coreBrowserService=M,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((j=>this._activeBuffer=j.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((j=>this._renderDimensions=j))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((j=>this._handleThemeChange(j)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,y){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)}handleWheel(b){const y=this._getPixelsScrolled(b);return y!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+y:this._smoothScrollState.target+=y,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}scrollLines(b){if(b!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const y=b*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+y,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!1})}_getPixelsScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?y*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._currentRowHeight*this._bufferService.rows),y}getBufferElements(b,y){var T;let x,k="";const N=[],A=y!=null?y:this._bufferService.buffer.lines.length,M=this._bufferService.buffer.lines;for(let j=b;j<A;j++){const O=M.get(j);if(!O)continue;const z=(T=M.get(j+1))==null?void 0:T.isWrapped;if(k+=O.translateToString(!z),!z||j===M.length-1){const q=document.createElement("div");q.textContent=k,N.push(q),k.length>0&&(x=q),k=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&y.altKey||x==="ctrl"&&y.ctrlKey||x==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};a.Viewport=_=f([p(2,w.IBufferService),p(3,w.IOptionsService),p(4,v.ICharSizeService),p(5,v.IRenderService),p(6,v.ICoreBrowserService),p(7,v.IThemeService)],_)},3107:function(d,a,u){var f=this&&this.__decorate||function(w,_,b,y){var x,k=arguments.length,N=k<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(_,b,N):x(_,b))||N);return k>3&&N&&Object.defineProperty(_,b,N),N},p=this&&this.__param||function(w,_){return function(b,y){_(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=u(4725),v=u(844),S=u(2585);let C=a.BufferDecorationRenderer=class extends v.Disposable{constructor(w,_,b,y,x){super(),this._screenElement=w,this._bufferService=_,this._coreBrowserService=b,this._decorationService=y,this._renderService=x,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((k=>this._removeDecoration(k)))),this.register((0,v.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const w of this._decorationService.decorations)this._renderDecoration(w);this._dimensionsChanged=!1}_renderDecoration(w){this._refreshStyle(w),this._dimensionsChanged&&this._refreshXPosition(w)}_createElement(w){var y,x;const _=this._coreBrowserService.mainDocument.createElement("div");_.classList.add("xterm-decoration"),_.classList.toggle("xterm-decoration-top-layer",((y=w==null?void 0:w.options)==null?void 0:y.layer)==="top"),_.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,_.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",_.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",_.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=(x=w.options.x)!=null?x:0;return b&&b>this._bufferService.cols&&(_.style.display="none"),this._refreshXPosition(w,_),_}_refreshStyle(w){const _=w.marker.line-this._bufferService.buffers.active.ydisp;if(_<0||_>=this._bufferService.rows)w.element&&(w.element.style.display="none",w.onRenderEmitter.fire(w.element));else{let b=this._decorationElements.get(w);b||(b=this._createElement(w),w.element=b,this._decorationElements.set(w,b),this._container.appendChild(b),w.onDispose((()=>{this._decorationElements.delete(w),b.remove()}))),b.style.top=_*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(b)}}_refreshXPosition(w,_=w.element){var y;if(!_)return;const b=(y=w.options.x)!=null?y:0;(w.options.anchor||"left")==="right"?_.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":_.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var _;(_=this._decorationElements.get(w))==null||_.remove(),this._decorationElements.delete(w),w.dispose()}};a.BufferDecorationRenderer=C=f([p(1,S.IBufferService),p(2,h.ICoreBrowserService),p(3,S.IDecorationService),p(4,h.IRenderService)],C)},5871:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,p){return f>=u.startBufferLine-this._linePadding[p||"full"]&&f<=u.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(d,a,u){var f=this&&this.__decorate||function(x,k,N,A){var M,T=arguments.length,j=T<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,k,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(T<3?M(j):T>3?M(k,N,j):M(k,N))||j);return T>3&&j&&Object.defineProperty(k,N,j),j},p=this&&this.__param||function(x,k){return function(N,A){k(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=u(5871),v=u(4725),S=u(844),C=u(2585),w={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let y=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,k,N,A,M,T,j){var z;super(),this._viewportElement=x,this._screenElement=k,this._bufferService=N,this._decorationService=A,this._renderService=M,this._optionsService=T,this._coreBrowserService=j,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(z=this._viewportElement.parentElement)==null||z.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var q;(q=this._canvas)==null||q.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const x=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);_.full=this._canvas.width,_.left=x,_.center=k,_.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=_.left,b.right=_.left+_.center}_refreshDrawHeightConstants(){w.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,k=Math.round(Math.max(Math.min(x,12),6)*this._coreBrowserService.dpr);w.left=k,w.center=k,w.right=k}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const k of this._decorationService.decorations)this._colorZoneStore.addDecoration(k);this._ctx.lineWidth=1;const x=this._colorZoneStore.zones;for(const k of x)k.position!=="full"&&this._renderColorZone(k);for(const k of x)k.position==="full"&&this._renderColorZone(k);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-w[x.position||"full"]/2),_[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+w[x.position||"full"]))}_queueRefresh(x,k){this._shouldUpdateDimensions=x||this._shouldUpdateDimensions,this._shouldUpdateAnchor=k||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=y=f([p(2,C.IBufferService),p(3,C.IDecorationService),p(4,v.IRenderService),p(5,C.IOptionsService),p(6,v.ICoreBrowserService)],y)},2950:function(d,a,u){var f=this&&this.__decorate||function(w,_,b,y){var x,k=arguments.length,N=k<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(_,b,N):x(_,b))||N);return k>3&&N&&Object.defineProperty(_,b,N),N},p=this&&this.__param||function(w,_){return function(b,y){_(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=u(4725),v=u(2585),S=u(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,_,b,y,x,k){this._textarea=w,this._compositionView=_,this._bufferService=b,this._optionsService=y,this._coreService=x,this._renderService=k,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(w){this._compositionView.textContent=w.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(w){if(this._isComposing||this._isSendingComposition){if(w.keyCode===229||w.keyCode===16||w.keyCode===17||w.keyCode===18)return!1;this._finalizeComposition(!1)}return w.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(w){if(this._compositionView.classList.remove("active"),this._isComposing=!1,w){const _={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,_.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(_.start,_.end):this._textarea.value.substring(_.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const _=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(_,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const _=this._textarea.value,b=_.replace(w,"");this._dataAlreadySent=b,_.length>w.length?this._coreService.triggerDataEvent(b,!0):_.length<w.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):_.length===w.length&&_!==w&&this._coreService.triggerDataEvent(_,!0)}}),0)}updateCompositionElements(w){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const _=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.css.cell.height,y=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,x=_*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=x+"px",this._compositionView.style.top=y+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const k=this._compositionView.getBoundingClientRect();this._textarea.style.left=x+"px",this._textarea.style.top=y+"px",this._textarea.style.width=Math.max(k.width,1)+"px",this._textarea.style.height=Math.max(k.height,1)+"px",this._textarea.style.lineHeight=k.height+"px"}w||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=C=f([p(2,v.IBufferService),p(3,v.IOptionsService),p(4,v.ICoreService),p(5,h.IRenderService)],C)},9806:(d,a)=>{function u(f,p,h){const v=h.getBoundingClientRect(),S=f.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),w=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-v.left-C,p.clientY-v.top-w]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(f,p,h,v,S,C,w,_,b){if(!C)return;const y=u(f,p,h);return y?(y[0]=Math.ceil((y[0]+(b?w/2:0))/w),y[1]=Math.ceil(y[1]/_),y[0]=Math.min(Math.max(y[0],1),v+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),S),y):void 0}},9504:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=u(2584);function p(_,b,y,x){const k=_-h(_,y),N=b-h(b,y),A=Math.abs(k-N)-(function(M,T,j){let O=0;const z=M-h(M,j),q=T-h(T,j);for(let $=0;$<Math.abs(z-q);$++){const V=v(M,T)==="A"?-1:1,K=j.buffer.lines.get(z+V*$);K!=null&&K.isWrapped&&O++}return O})(_,b,y);return w(A,C(v(_,b),x))}function h(_,b){let y=0,x=b.buffer.lines.get(_),k=x==null?void 0:x.isWrapped;for(;k&&_>=0&&_<b.rows;)y++,x=b.buffer.lines.get(--_),k=x==null?void 0:x.isWrapped;return y}function v(_,b){return _>b?"A":"B"}function S(_,b,y,x,k,N){let A=_,M=b,T="";for(;A!==y||M!==x;)A+=k?1:-1,k&&A>N.cols-1?(T+=N.buffer.translateBufferLineToString(M,!1,_,A),A=0,_=0,M++):!k&&A<0&&(T+=N.buffer.translateBufferLineToString(M,!1,0,_+1),A=N.cols-1,_=A,M--);return T+N.buffer.translateBufferLineToString(M,!1,_,A)}function C(_,b){const y=b?"O":"[";return f.C0.ESC+y+_}function w(_,b){_=Math.floor(_);let y="";for(let x=0;x<_;x++)y+=b;return y}a.moveToCellSequence=function(_,b,y,x){const k=y.buffer.x,N=y.buffer.y;if(!y.buffer.hasScrollback)return(function(T,j,O,z,q,$){return p(j,z,q,$).length===0?"":w(S(T,j,T,j-h(j,q),!1,q).length,C("D",$))})(k,N,0,b,y,x)+p(N,b,y,x)+(function(T,j,O,z,q,$){let V;V=p(j,z,q,$).length>0?z-h(z,q):j;const K=z,G=(function(Y,Q,I,L,B,H){let F;return F=p(I,L,B,H).length>0?L-h(L,B):Q,Y<I&&F<=L||Y>=I&&F<L?"C":"D"})(T,j,O,z,q,$);return w(S(T,V,O,K,G==="C",q).length,C(G,$))})(k,N,_,b,y,x);let A;if(N===b)return A=k>_?"D":"C",w(Math.abs(k-_),C(A,x));A=N>b?"D":"C";const M=Math.abs(N-b);return w((function(T,j){return j.cols-T})(N>b?_:k,y)+(M-1)*y.cols+1+((N>b?k:_)-1),C(A,x))}},1296:function(d,a,u){var f=this&&this.__decorate||function($,V,K,G){var Y,Q=arguments.length,I=Q<3?V:G===null?G=Object.getOwnPropertyDescriptor(V,K):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate($,V,K,G);else for(var L=$.length-1;L>=0;L--)(Y=$[L])&&(I=(Q<3?Y(I):Q>3?Y(V,K,I):Y(V,K))||I);return Q>3&&I&&Object.defineProperty(V,K,I),I},p=this&&this.__param||function($,V){return function(K,G){V(K,G,$)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=u(3787),v=u(2550),S=u(2223),C=u(6171),w=u(6052),_=u(4725),b=u(8055),y=u(8460),x=u(844),k=u(2585),N="xterm-dom-renderer-owner-",A="xterm-rows",M="xterm-fg-",T="xterm-bg-",j="xterm-focus",O="xterm-selection";let z=1,q=a.DomRenderer=class extends x.Disposable{constructor($,V,K,G,Y,Q,I,L,B,H,F,J,ne){super(),this._terminal=$,this._document=V,this._element=K,this._screenElement=G,this._viewportElement=Y,this._helperContainer=Q,this._linkifier2=I,this._charSizeService=B,this._optionsService=H,this._bufferService=F,this._coreBrowserService=J,this._themeService=ne,this._terminalClass=z++,this._rowElements=[],this._selectionRenderModel=(0,w.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Z=>this._injectCss(Z)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Z=>this._handleLinkHover(Z)))),this.register(this._linkifier2.onHideLinkUnderline((Z=>this._handleLinkLeave(Z)))),this.register((0,x.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new v.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const $=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*$,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*$),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/$),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/$),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss($){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${A} { color: ${$.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${A} .xterm-dim { color: ${b.color.multiplyOpacity($.foreground,.5).css};}`,V+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const K=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;V+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${G} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Y} { 0% { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css}; } 50% { background-color: inherit; color: ${$.cursor.css}; }}`,V+=`${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${$.cursor.css} !important; color: ${$.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${$.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${$.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${$.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,I]of $.ansi.entries())V+=`${this._terminalSelector} .${M}${Q} { color: ${I.css}; }${this._terminalSelector} .${M}${Q}.xterm-dim { color: ${b.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${T}${Q} { background-color: ${I.css}; }`;V+=`${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque($.background).css}; }${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque($.background),.5).css}; }${this._terminalSelector} .${T}${S.INVERTED_DEFAULT_COLOR} { background-color: ${$.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const $=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${$}px`,this._rowFactory.defaultSpacing=$}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements($,V){for(let K=this._rowElements.length;K<=V;K++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize($,V){this._refreshRowElements($,V),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(j),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(j),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged($,V,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged($,V,K),this.renderRows(0,this._bufferService.rows-1),!$||!V)return;this._selectionRenderModel.update(this._terminal,$,V,K);const G=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(K){const B=$[0]>V[0];L.appendChild(this._createSelectionElement(Q,B?V[0]:$[0],B?$[0]:V[0],I-Q+1))}else{const B=G===Q?$[0]:0,H=Q===Y?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Q,B,H));const F=I-Q-1;if(L.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,F)),Q!==I){const J=Y===I?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,J))}}this._selectionContainer.appendChild(L)}_createSelectionElement($,V,K,G=1){const Y=this._document.createElement("div"),Q=V*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(K-V);return Q+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-Q),Y.style.height=G*this.dimensions.css.cell.height+"px",Y.style.top=$*this.dimensions.css.cell.height+"px",Y.style.left=`${Q}px`,Y.style.width=`${I}px`,Y}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const $ of this._rowElements)$.replaceChildren()}renderRows($,V){const K=this._bufferService.buffer,G=K.ybase+K.y,Y=Math.min(K.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=$;B<=V;B++){const H=B+K.ydisp,F=this._rowElements[B],J=K.lines.get(H);if(!F||!J)break;F.replaceChildren(...this._rowFactory.createRow(J,H,H===G,I,L,Y,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,V,K,G,Y,Q){K<0&&($=0),G<0&&(V=0);const I=this._bufferService.rows-1;K=Math.max(Math.min(K,I),0),G=Math.max(Math.min(G,I),0),Y=Math.min(Y,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,H=Math.min(L.x,Y-1),F=this._optionsService.rawOptions.cursorBlink,J=this._optionsService.rawOptions.cursorStyle,ne=this._optionsService.rawOptions.cursorInactiveStyle;for(let Z=K;Z<=G;++Z){const W=Z+L.ydisp,U=this._rowElements[Z],te=L.lines.get(W);if(!U||!te)break;U.replaceChildren(...this._rowFactory.createRow(te,W,W===B,J,ne,H,F,this.dimensions.css.cell.width,this._widthCache,Q?Z===K?$:0:-1,Q?(Z===G?V:Y)-1:-1))}}};a.DomRenderer=q=f([p(7,k.IInstantiationService),p(8,_.ICharSizeService),p(9,k.IOptionsService),p(10,k.IBufferService),p(11,_.ICoreBrowserService),p(12,_.IThemeService)],q)},3787:function(d,a,u){var f=this&&this.__decorate||function(A,M,T,j){var O,z=arguments.length,q=z<3?M:j===null?j=Object.getOwnPropertyDescriptor(M,T):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(A,M,T,j);else for(var $=A.length-1;$>=0;$--)(O=A[$])&&(q=(z<3?O(q):z>3?O(M,T,q):O(M,T))||q);return z>3&&q&&Object.defineProperty(M,T,q),q},p=this&&this.__param||function(A,M){return function(T,j){M(T,j,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=u(2223),v=u(643),S=u(511),C=u(2585),w=u(8055),_=u(4725),b=u(4269),y=u(6171),x=u(3734);let k=a.DomRendererRowFactory=class{constructor(A,M,T,j,O,z,q){this._document=A,this._characterJoinerService=M,this._optionsService=T,this._coreBrowserService=j,this._coreService=O,this._decorationService=z,this._themeService=q,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,M,T){this._selectionStart=A,this._selectionEnd=M,this._columnSelectMode=T}createRow(A,M,T,j,O,z,q,$,V,K,G){const Y=[],Q=this._characterJoinerService.getJoinedCharacters(M),I=this._themeService.colors;let L,B=A.getNoBgTrimmedLength();T&&B<z+1&&(B=z+1);let H=0,F="",J=0,ne=0,Z=0,W=!1,U=0,te=!1,ie=0;const ae=[],se=K!==-1&&G!==-1;for(let ge=0;ge<B;ge++){A.loadCell(ge,this._workCell);let Te=this._workCell.getWidth();if(Te===0)continue;let Me=!1,Ke=ge,Re=this._workCell;if(Q.length>0&&ge===Q[0][0]){Me=!0;const xe=Q.shift();Re=new b.JoinedCellData(this._workCell,A.translateToString(!0,xe[0],xe[1]),xe[1]-xe[0]),Ke=xe[1]-1,Te=Re.getWidth()}const et=this._isCellInSelection(ge,M),Ze=T&&ge===z,Ge=se&&ge>=K&&ge<=G;let rt=!1;this._decorationService.forEachDecorationAtCell(ge,M,void 0,(xe=>{rt=!0}));let ue=Re.getChars()||v.WHITESPACE_CELL_CHAR;if(ue===" "&&(Re.isUnderline()||Re.isOverline())&&(ue=" "),ie=Te*$-V.get(ue,Re.isBold(),Re.isItalic()),L){if(H&&(et&&te||!et&&!te&&Re.bg===J)&&(et&&te&&I.selectionForeground||Re.fg===ne)&&Re.extended.ext===Z&&Ge===W&&ie===U&&!Ze&&!Me&&!rt){Re.isInvisible()?F+=v.WHITESPACE_CELL_CHAR:F+=ue,H++;continue}H&&(L.textContent=F),L=this._document.createElement("span"),H=0,F=""}else L=this._document.createElement("span");if(J=Re.bg,ne=Re.fg,Z=Re.extended.ext,W=Ge,U=ie,te=et,Me&&z>=ge&&z<=Ke&&(z=ge),!this._coreService.isCursorHidden&&Ze&&this._coreService.isCursorInitialized){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)q&&ae.push("xterm-cursor-blink"),ae.push(j==="bar"?"xterm-cursor-bar":j==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ae.push("xterm-cursor-outline");break;case"block":ae.push("xterm-cursor-block");break;case"bar":ae.push("xterm-cursor-bar");break;case"underline":ae.push("xterm-cursor-underline")}}if(Re.isBold()&&ae.push("xterm-bold"),Re.isItalic()&&ae.push("xterm-italic"),Re.isDim()&&ae.push("xterm-dim"),F=Re.isInvisible()?v.WHITESPACE_CELL_CHAR:Re.getChars()||v.WHITESPACE_CELL_CHAR,Re.isUnderline()&&(ae.push(`xterm-underline-${Re.extended.underlineStyle}`),F===" "&&(F=" "),!Re.isUnderlineColorDefault()))if(Re.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(Re.getUnderlineColor()).join(",")})`;else{let xe=Re.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Re.isBold()&&xe<8&&(xe+=8),L.style.textDecorationColor=I.ansi[xe].css}Re.isOverline()&&(ae.push("xterm-overline"),F===" "&&(F=" ")),Re.isStrikethrough()&&ae.push("xterm-strikethrough"),Ge&&(L.style.textDecoration="underline");let ct=Re.getFgColor(),it=Re.getFgColorMode(),ut=Re.getBgColor(),ce=Re.getBgColorMode();const be=!!Re.isInverse();if(be){const xe=ct;ct=ut,ut=xe;const ze=it;it=ce,ce=ze}let ke,je,Le,lt=!1;switch(this._decorationService.forEachDecorationAtCell(ge,M,void 0,(xe=>{xe.options.layer!=="top"&&lt||(xe.backgroundColorRGB&&(ce=50331648,ut=xe.backgroundColorRGB.rgba>>8&16777215,ke=xe.backgroundColorRGB),xe.foregroundColorRGB&&(it=50331648,ct=xe.foregroundColorRGB.rgba>>8&16777215,je=xe.foregroundColorRGB),lt=xe.options.layer==="top")})),!lt&&et&&(ke=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,ut=ke.rgba>>8&16777215,ce=50331648,lt=!0,I.selectionForeground&&(it=50331648,ct=I.selectionForeground.rgba>>8&16777215,je=I.selectionForeground)),lt&&ae.push("xterm-decoration-top"),ce){case 16777216:case 33554432:Le=I.ansi[ut],ae.push(`xterm-bg-${ut}`);break;case 50331648:Le=w.channels.toColor(ut>>16,ut>>8&255,255&ut),this._addStyle(L,`background-color:#${N((ut>>>0).toString(16),"0",6)}`);break;default:be?(Le=I.foreground,ae.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Le=I.background}switch(ke||Re.isDim()&&(ke=w.color.multiplyOpacity(Le,.5)),it){case 16777216:case 33554432:Re.isBold()&&ct<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ct+=8),this._applyMinimumContrast(L,Le,I.ansi[ct],Re,ke,void 0)||ae.push(`xterm-fg-${ct}`);break;case 50331648:const xe=w.channels.toColor(ct>>16&255,ct>>8&255,255&ct);this._applyMinimumContrast(L,Le,xe,Re,ke,je)||this._addStyle(L,`color:#${N(ct.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Le,I.foreground,Re,ke,je)||be&&ae.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ae.length&&(L.className=ae.join(" "),ae.length=0),Ze||Me||rt?L.textContent=F:H++,ie!==this.defaultSpacing&&(L.style.letterSpacing=`${ie}px`),Y.push(L),ge=Ke}return L&&H&&(L.textContent=F),Y}_applyMinimumContrast(A,M,T,j,O,z){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const q=this._getContrastCache(j);let $;if(O||z||($=q.getColor(M.rgba,T.rgba)),$===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);$=w.color.ensureContrastRatio(O||M,z||T,V),q.setColor((O||M).rgba,(z||T).rgba,$!=null?$:null)}return!!$&&(this._addStyle(A,`color:${$.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,M){A.setAttribute("style",`${A.getAttribute("style")||""}${M};`)}_isCellInSelection(A,M){const T=this._selectionStart,j=this._selectionEnd;return!(!T||!j)&&(this._columnSelectMode?T[0]<=j[0]?A>=T[0]&&M>=T[1]&&A<j[0]&&M<=j[1]:A<T[0]&&M>=T[1]&&A>=j[0]&&M<=j[1]:M>T[1]&&M<j[1]||T[1]===j[1]&&M===T[1]&&A>=T[0]&&A<j[0]||T[1]<j[1]&&M===j[1]&&A<j[0]||T[1]<j[1]&&M===T[1]&&A>=T[0])}};function N(A,M,T){for(;A.length<T;)A=M+A;return A}a.DomRendererRowFactory=k=f([p(1,_.ICharacterJoinerService),p(2,C.IOptionsService),p(3,_.ICoreBrowserService),p(4,C.ICoreService),p(5,C.IDecorationService),p(6,_.IThemeService)],k)},2550:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=u.createElement("span");p.classList.add("xterm-char-measure-element");const h=u.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const v=u.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontStyle="italic";const S=u.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[p,h,v,S],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(v),this._container.appendChild(S),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,p,h){u===this._font&&f===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=u,this._fontSize=f,this._weight=p,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(u,f,p){let h=0;if(!f&&!p&&u.length===1&&(h=u.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(u,0);return C>0&&(this._flat[h]=C),C}let v=u;f&&(v+="B"),p&&(v+="I");let S=this._holey.get(v);if(S===void 0){let C=0;f&&(C|=1),p&&(C|=2),S=this._measure(u,C),S>0&&this._holey.set(v,S)}return S}_measure(u,f){const p=this._measureElements[f];return p.textContent=u.repeat(32),p.offsetWidth/32}}},2223:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(d,a)=>{function u(p){return 57508<=p&&p<=57558}function f(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=f,a.allowRescaling=function(p,h,v,S){return h===1&&v>Math.ceil(1.5*S)&&p!==void 0&&p>255&&!f(p)&&!u(p)&&!(function(C){return 57344<=C&&C<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(h){return 9472<=h&&h<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,h,v=0){return(p-(2*Math.round(h)-v))%(2*Math.round(h))}},6052:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,h,v,S=!1){if(this.selectionStart=h,this.selectionEnd=v,!h||!v||h[0]===v[0]&&h[1]===v[1])return void this.clear();const C=p.buffers.active.ydisp,w=h[1]-C,_=v[1]-C,b=Math.max(w,0),y=Math.min(_,p.rows-1);b>=p.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=w,this.viewportEndRow=_,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=h[0],this.endCol=v[0])}isCellSelected(p,h,v){return!!this.hasSelection&&(v-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&v>=this.viewportCappedStartRow&&h<this.endCol&&v<=this.viewportCappedEndRow:h<this.startCol&&v>=this.viewportCappedStartRow&&h>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(d,a,u){var f=this&&this.__decorate||function(y,x,k,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,x,k,N);else for(var j=y.length-1;j>=0;j--)(A=y[j])&&(T=(M<3?A(T):M>3?A(x,k,T):A(x,k))||T);return M>3&&T&&Object.defineProperty(x,k,T),T},p=this&&this.__param||function(y,x){return function(k,N){x(k,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=u(2585),v=u(8460),S=u(844);let C=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(y,x,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new v.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new _(y,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=f([p(2,h.IOptionsService)],C);class w extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,k){x!==void 0&&x>0&&k!==void 0&&k>0&&(this._result.width=x,this._result.height=k)}}class _ extends w{constructor(x,k,N){super(),this._document=x,this._parentElement=k,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends w{constructor(x){super(),this._optionsService=x,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const k=this._ctx.measureText("W");if(!("width"in k&&"fontBoundingBoxAscent"in k&&"fontBoundingBoxDescent"in k))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(d,a,u){var f=this&&this.__decorate||function(b,y,x,k){var N,A=arguments.length,M=A<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,y,x,k);else for(var T=b.length-1;T>=0;T--)(N=b[T])&&(M=(A<3?N(M):A>3?N(y,x,M):N(y,x))||M);return A>3&&M&&Object.defineProperty(y,x,M),M},p=this&&this.__param||function(b,y){return function(x,k){y(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=u(3734),v=u(643),S=u(511),C=u(2585);class w extends h.AttributeData{constructor(y,x,k){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=x,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=w;let _=a.CharacterJoinerService=class PC{constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(y){const x={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(x),x.id}deregister(y){for(let x=0;x<this._characterJoiners.length;x++)if(this._characterJoiners[x].id===y)return this._characterJoiners.splice(x,1),!0;return!1}getJoinedCharacters(y){if(this._characterJoiners.length===0)return[];const x=this._bufferService.buffer.lines.get(y);if(!x||x.length===0)return[];const k=[],N=x.translateToString(!0);let A=0,M=0,T=0,j=x.getFg(0),O=x.getBg(0);for(let z=0;z<x.getTrimmedLength();z++)if(x.loadCell(z,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==j||this._workCell.bg!==O){if(z-A>1){const q=this._getJoinedRanges(N,T,M,x,A);for(let $=0;$<q.length;$++)k.push(q[$])}A=z,T=M,j=this._workCell.fg,O=this._workCell.bg}M+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const z=this._getJoinedRanges(N,T,M,x,A);for(let q=0;q<z.length;q++)k.push(z[q])}return k}_getJoinedRanges(y,x,k,N,A){const M=y.substring(x,k);let T=[];try{T=this._characterJoiners[0].handler(M)}catch(j){console.error(j)}for(let j=1;j<this._characterJoiners.length;j++)try{const O=this._characterJoiners[j].handler(M);for(let z=0;z<O.length;z++)PC._mergeRanges(T,O[z])}catch(O){console.error(O)}return this._stringRangesToCellRanges(T,N,A),T}_stringRangesToCellRanges(y,x,k){let N=0,A=!1,M=0,T=y[N];if(T){for(let j=k;j<this._bufferService.cols;j++){const O=x.getWidth(j),z=x.getString(j).length||v.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!A&&T[0]<=M&&(T[0]=j,A=!0),T[1]<=M){if(T[1]=j,T=y[++N],!T)break;T[0]<=M?(T[0]=j,A=!0):A=!1}M+=z}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(y,x){let k=!1;for(let N=0;N<y.length;N++){const A=y[N];if(k){if(x[1]<=A[0])return y[N-1][1]=x[1],y;if(x[1]<=A[1])return y[N-1][1]=Math.max(x[1],A[1]),y.splice(N,1),y;y.splice(N,1),N--}else{if(x[1]<=A[0])return y.splice(N,0,x),y;if(x[1]<=A[1])return A[0]=Math.min(x[0],A[0]),y;x[0]<A[1]&&(A[0]=Math.min(x[0],A[0]),k=!0)}}return k?y[y.length-1][1]=x[1]:y.push(x),y}};a.CharacterJoinerService=_=f([p(0,C.IBufferService)],_)},5114:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=u(844),p=u(8460),h=u(3656);class v extends f.Disposable{constructor(w,_,b){super(),this._textarea=w,this._window=_,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(w){this._window!==w&&(this._window=w,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=v;class S extends f.Disposable{constructor(w){super(),this._parentWindow=w,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(w){this._parentWindow=w,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var w;this._outerListener&&((w=this._resolutionMediaMatchList)==null||w.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=u(844);class p extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(v){return this.linkProviders.push(v),{dispose:()=>{const S=this.linkProviders.indexOf(v);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=p},8934:function(d,a,u){var f=this&&this.__decorate||function(C,w,_,b){var y,x=arguments.length,k=x<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(C,w,_,b);else for(var N=C.length-1;N>=0;N--)(y=C[N])&&(k=(x<3?y(k):x>3?y(w,_,k):y(w,_))||k);return x>3&&k&&Object.defineProperty(w,_,k),k},p=this&&this.__param||function(C,w){return function(_,b){w(_,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=u(4725),v=u(9806);let S=a.MouseService=class{constructor(C,w){this._renderService=C,this._charSizeService=w}getCoords(C,w,_,b,y){return(0,v.getCoords)(window,C,w,_,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}getMouseReportCoords(C,w){const _=(0,v.getCoordsRelativeToElement)(window,C,w);if(this._charSizeService.hasValidSize)return _[0]=Math.min(Math.max(_[0],0),this._renderService.dimensions.css.canvas.width-1),_[1]=Math.min(Math.max(_[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(_[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(_[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(_[0]),y:Math.floor(_[1])}}};a.MouseService=S=f([p(0,h.IRenderService),p(1,h.ICharSizeService)],S)},3230:function(d,a,u){var f=this&&this.__decorate||function(y,x,k,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,x,k,N);else for(var j=y.length-1;j>=0;j--)(A=y[j])&&(T=(M<3?A(T):M>3?A(x,k,T):A(x,k))||T);return M>3&&T&&Object.defineProperty(x,k,T),T},p=this&&this.__param||function(y,x){return function(k,N){x(k,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=u(6193),v=u(4725),S=u(8460),C=u(844),w=u(7226),_=u(2585);let b=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,x,k,N,A,M,T,j){super(),this._rowCount=y,this._charSizeService=N,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new w.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,z)=>this._renderRows(O,z)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(M.onResize((()=>this._fullRefresh()))),this.register(M.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(k.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(k.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(M.cols,M.rows),this._fullRefresh()}))),this.register(k.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(M.buffer.y,M.buffer.y,!0)))),this.register(j.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,x),this.register(T.onWindowChange((O=>this._registerIntersectionObserver(O,x))))}_registerIntersectionObserver(y,x){if("IntersectionObserver"in y){const k=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});k.observe(x),this._observerDisposable.value=(0,C.toDisposable)((()=>k.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(y,x,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,x,this._rowCount))}_renderRows(y,x){this._renderer.value&&(y=Math.min(y,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(y,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:x}),this._onRender.fire({start:y,end:x}),this._isNextRenderRedrawOnly=!0)}resize(y,x){this._rowCount=x,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,x;this._renderer.value&&((x=(y=this._renderer.value).clearTextureAtlas)==null||x.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var k;return(k=this._renderer.value)==null?void 0:k.handleResize(y,x)})):this._renderer.value.handleResize(y,x),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,x,k){var N;this._selectionState.start=y,this._selectionState.end=x,this._selectionState.columnSelectMode=k,(N=this._renderer.value)==null||N.handleSelectionChanged(y,x,k)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};a.RenderService=b=f([p(2,_.IOptionsService),p(3,v.ICharSizeService),p(4,_.IDecorationService),p(5,_.IBufferService),p(6,v.ICoreBrowserService),p(7,v.IThemeService)],b)},9312:function(d,a,u){var f=this&&this.__decorate||function(T,j,O,z){var q,$=arguments.length,V=$<3?j:z===null?z=Object.getOwnPropertyDescriptor(j,O):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,j,O,z);else for(var K=T.length-1;K>=0;K--)(q=T[K])&&(V=($<3?q(V):$>3?q(j,O,V):q(j,O))||V);return $>3&&V&&Object.defineProperty(j,O,V),V},p=this&&this.__param||function(T,j){return function(O,z){j(O,z,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=u(9806),v=u(9504),S=u(456),C=u(4725),w=u(8460),_=u(844),b=u(6114),y=u(4841),x=u(511),k=u(2585),N=" ",A=new RegExp(N,"g");let M=a.SelectionService=class extends _.Disposable{constructor(T,j,O,z,q,$,V,K,G){super(),this._element=T,this._screenElement=j,this._linkifier=O,this._bufferService=z,this._coreService=q,this._mouseService=$,this._optionsService=V,this._renderService=K,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new w.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new w.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,_.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!T||!j||T[0]===j[0]&&T[1]===j[1])}get selectionText(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!T||!j)return"";const O=this._bufferService.buffer,z=[];if(this._activeSelectionMode===3){if(T[0]===j[0])return"";const q=T[0]<j[0]?T[0]:j[0],$=T[0]<j[0]?j[0]:T[0];for(let V=T[1];V<=j[1];V++){const K=O.translateBufferLineToString(V,!0,q,$);z.push(K)}}else{const q=T[1]===j[1]?j[0]:void 0;z.push(O.translateBufferLineToString(T[1],!0,T[0],q));for(let $=T[1]+1;$<=j[1]-1;$++){const V=O.lines.get($),K=O.translateBufferLineToString($,!0);V!=null&&V.isWrapped?z[z.length-1]+=K:z.push(K)}if(T[1]!==j[1]){const $=O.lines.get(j[1]),V=O.translateBufferLineToString(j[1],!0,0,j[0]);$&&$.isWrapped?z[z.length-1]+=V:z.push(V)}}return z.map((q=>q.replace(A," "))).join(b.isWindows?`\r
511
- `:`
512
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&T&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(T){const j=this._getMouseBufferCoords(T),O=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!!(O&&z&&j)&&this._areCoordsInSelection(j,O,z)}isCellInSelection(T,j){const O=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!O||!z)&&this._areCoordsInSelection([T,j],O,z)}_areCoordsInSelection(T,j,O){return T[1]>j[1]&&T[1]<O[1]||j[1]===O[1]&&T[1]===j[1]&&T[0]>=j[0]&&T[0]<O[0]||j[1]<O[1]&&T[1]===O[1]&&T[0]<O[0]||j[1]<O[1]&&T[1]===j[1]&&T[0]>=j[0]}_selectWordAtCursor(T,j){var q,$;const O=($=(q=this._linkifier.currentLink)==null?void 0:q.link)==null?void 0:$.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const z=this._getMouseBufferCoords(T);return!!z&&(this._selectWordAt(z,j),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,j){this._model.clearSelection(),T=Math.max(T,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const j=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j}_getMouseEventScrollAmount(T){let j=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return j>=0&&j<=O?0:(j>O&&(j-=O),j=Math.min(Math.max(j,-50),50),j/=50,j/Math.abs(j)+Math.round(14*j))}shouldForceSelection(T){return b.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const j=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);j&&j.length!==this._model.selectionStart[0]&&j.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const j=this._getMouseBufferCoords(T);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))}shouldColumnSelect(T){return T.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const j=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(T),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const z=O.lines.get(this._model.selectionEnd[1]);z&&z.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}j&&j[0]===this._model.selectionEnd[0]&&j[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const j=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const z=(0,v.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(z,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd,O=!(!T||!j||T[0]===j[0]&&T[1]===j[1]);O?T&&j&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&j[0]===this._oldSelectionEnd[0]&&j[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,j,O)):this._oldHasSelection&&this._fireOnSelectionChange(T,j,O)}_fireOnSelectionChange(T,j,O){this._oldSelectionStart=T,this._oldSelectionEnd=j,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((j=>this._handleTrim(j)))}_convertViewportColToCharacterIndex(T,j){let O=j;for(let z=0;j>=z;z++){const q=T.loadCell(z,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:q>1&&j!==z&&(O+=q-1)}return O}setSelection(T,j,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,j],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,j,O=!0,z=!0){if(T[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,$=q.lines.get(T[1]);if(!$)return;const V=q.translateBufferLineToString(T[1],!1);let K=this._convertViewportColToCharacterIndex($,T[0]),G=K;const Y=T[0]-K;let Q=0,I=0,L=0,B=0;if(V.charAt(K)===" "){for(;K>0&&V.charAt(K-1)===" ";)K--;for(;G<V.length&&V.charAt(G+1)===" ";)G++}else{let J=T[0],ne=T[0];$.getWidth(J)===0&&(Q++,J--),$.getWidth(ne)===2&&(I++,ne++);const Z=$.getString(ne).length;for(Z>1&&(B+=Z-1,G+=Z-1);J>0&&K>0&&!this._isCharWordSeparator($.loadCell(J-1,this._workCell));){$.loadCell(J-1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,J--):W>1&&(L+=W-1,K-=W-1),K--,J--}for(;ne<$.length&&G+1<V.length&&!this._isCharWordSeparator($.loadCell(ne+1,this._workCell));){$.loadCell(ne+1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,ne++):W>1&&(B+=W-1,G+=W-1),G++,ne++}}G++;let H=K+Y-Q+L,F=Math.min(this._bufferService.cols,G-K+Q+I-L-B);if(j||V.slice(K,G).trim()!==""){if(O&&H===0&&$.getCodePoint(0)!==32){const J=q.lines.get(T[1]-1);if(J&&$.isWrapped&&J.getCodePoint(this._bufferService.cols-1)!==32){const ne=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(ne){const Z=this._bufferService.cols-ne.start;H-=Z,F+=Z}}}if(z&&H+F===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){const J=q.lines.get(T[1]+1);if(J!=null&&J.isWrapped&&J.getCodePoint(0)!==32){const ne=this._getWordAt([0,T[1]+1],!1,!1,!0);ne&&(F+=ne.length)}}return{start:H,length:F}}}_selectWordAt(T,j){const O=this._getWordAt(T,j);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[O.start,T[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(T){const j=this._getWordAt(T,!0);if(j){let O=T[1];for(;j.start<0;)j.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;j.start+j.length>this._bufferService.cols;)j.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?j.start:j.start+j.length,O]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const j=this._bufferService.buffer.getWrappedRangeForLine(T),O={start:{x:0,y:j.first},end:{x:this._bufferService.cols-1,y:j.last}};this._model.selectionStart=[0,j.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=M=f([p(3,k.IBufferService),p(4,k.ICoreService),p(5,C.IMouseService),p(6,k.IOptionsService),p(7,C.IRenderService),p(8,C.ICoreBrowserService)],M)},4725:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=u(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(d,a,u){var f=this&&this.__decorate||function(M,T,j,O){var z,q=arguments.length,$=q<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,j):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(M,T,j,O);else for(var V=M.length-1;V>=0;V--)(z=M[V])&&($=(q<3?z($):q>3?z(T,j,$):z(T,j))||$);return q>3&&$&&Object.defineProperty(T,j,$),$},p=this&&this.__param||function(M,T){return function(j,O){T(j,O,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=u(7239),v=u(8055),S=u(8460),C=u(844),w=u(2585),_=v.css.toColor("#ffffff"),b=v.css.toColor("#000000"),y=v.css.toColor("#ffffff"),x=v.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[v.css.toColor("#2e3436"),v.css.toColor("#cc0000"),v.css.toColor("#4e9a06"),v.css.toColor("#c4a000"),v.css.toColor("#3465a4"),v.css.toColor("#75507b"),v.css.toColor("#06989a"),v.css.toColor("#d3d7cf"),v.css.toColor("#555753"),v.css.toColor("#ef2929"),v.css.toColor("#8ae234"),v.css.toColor("#fce94f"),v.css.toColor("#729fcf"),v.css.toColor("#ad7fa8"),v.css.toColor("#34e2e2"),v.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let j=0;j<216;j++){const O=T[j/36%6|0],z=T[j/6%6|0],q=T[j%6];M.push({css:v.channels.toCss(O,z,q),rgba:v.channels.toRgba(O,z,q)})}for(let j=0;j<24;j++){const O=8+10*j;M.push({css:v.channels.toCss(O,O,O),rgba:v.channels.toRgba(O,O,O)})}return M})());let N=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(M){super(),this._optionsService=M,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:_,background:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:v.color.blend(b,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:v.color.blend(b,k),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(M={}){const T=this._colors;if(T.foreground=A(M.foreground,_),T.background=A(M.background,b),T.cursor=A(M.cursor,y),T.cursorAccent=A(M.cursorAccent,x),T.selectionBackgroundTransparent=A(M.selectionBackground,k),T.selectionBackgroundOpaque=v.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(M.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=v.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=M.selectionForeground?A(M.selectionForeground,v.NULL_COLOR):void 0,T.selectionForeground===v.NULL_COLOR&&(T.selectionForeground=void 0),v.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=v.color.opacity(T.selectionBackgroundTransparent,.3)),v.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=v.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=A(M.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=A(M.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=A(M.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=A(M.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=A(M.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=A(M.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=A(M.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=A(M.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=A(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=A(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=A(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=A(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=A(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=A(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=A(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=A(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const j=Math.min(T.ansi.length-16,M.extendedAnsi.length);for(let O=0;O<j;O++)T.ansi[O+16]=A(M.extendedAnsi[O],a.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(M){this._restoreColor(M),this._onChangeColors.fire(this.colors)}_restoreColor(M){if(M!==void 0)switch(M){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[M]=this._restoreColors.ansi[M]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(M){M(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(M,T){if(M!==void 0)try{return v.css.toColor(M)}catch{}return T}a.ThemeService=N=f([p(0,w.IOptionsService)],N)},6349:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=u(8460),p=u(844);class h extends p.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const C=new Array(S);for(let w=0;w<Math.min(S,this.length);w++)C[w]=this._array[this._getCyclicIndex(w)];this._array=C,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let C=this._length;C<S;C++)this._array[C]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,C){this._array[this._getCyclicIndex(S)]=C}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,C,...w){if(C){for(let _=S;_<this._length-C;_++)this._array[this._getCyclicIndex(_)]=this._array[this._getCyclicIndex(_+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let _=this._length-1;_>=S;_--)this._array[this._getCyclicIndex(_+w.length)]=this._array[this._getCyclicIndex(_)];for(let _=0;_<w.length;_++)this._array[this._getCyclicIndex(S+_)]=w[_];if(w.length&&this.onInsertEmitter.fire({index:S,amount:w.length}),this._length+w.length>this._maxLength){const _=this._length+w.length-this._maxLength;this._startIndex+=_,this._length=this._maxLength,this.onTrimEmitter.fire(_)}else this._length+=w.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,w){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+w<0)throw new Error("Cannot shift elements in list beyond index 0");if(w>0){for(let b=C-1;b>=0;b--)this.set(S+b+w,this.get(S+b));const _=S+C+w-this._length;if(_>0)for(this._length+=_;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let _=0;_<C;_++)this.set(S+_+w,this.get(S+_))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=h},1439:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(f,p=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const v in f)h[v]=p<=1?f[v]:f[v]&&u(f[v],p-1);return h}},8055:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,f=0,p=0,h=0;var v,S,C,w,_;function b(x){const k=x.toString(16);return k.length<2?"0"+k:k}function y(x,k){return x<k?(k+.05)/(x+.05):(x+.05)/(k+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(x){x.toCss=function(k,N,A,M){return M!==void 0?`#${b(k)}${b(N)}${b(A)}${b(M)}`:`#${b(k)}${b(N)}${b(A)}`},x.toRgba=function(k,N,A,M=255){return(k<<24|N<<16|A<<8|M)>>>0},x.toColor=function(k,N,A,M){return{css:x.toCss(k,N,A,M),rgba:x.toRgba(k,N,A,M)}}})(v||(a.channels=v={})),(function(x){function k(N,A){return h=Math.round(255*A),[u,f,p]=_.toChannels(N.rgba),{css:v.toCss(u,f,p,h),rgba:v.toRgba(u,f,p,h)}}x.blend=function(N,A){if(h=(255&A.rgba)/255,h===1)return{css:A.css,rgba:A.rgba};const M=A.rgba>>24&255,T=A.rgba>>16&255,j=A.rgba>>8&255,O=N.rgba>>24&255,z=N.rgba>>16&255,q=N.rgba>>8&255;return u=O+Math.round((M-O)*h),f=z+Math.round((T-z)*h),p=q+Math.round((j-q)*h),{css:v.toCss(u,f,p),rgba:v.toRgba(u,f,p)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,A,M){const T=_.ensureContrastRatio(N.rgba,A.rgba,M);if(T)return v.toColor(T>>24&255,T>>16&255,T>>8&255)},x.opaque=function(N){const A=(255|N.rgba)>>>0;return[u,f,p]=_.toChannels(A),{css:v.toCss(u,f,p),rgba:A}},x.opacity=k,x.multiplyOpacity=function(N,A){return h=255&N.rgba,k(N,h*A/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(S||(a.color=S={})),(function(x){let k,N;try{const A=document.createElement("canvas");A.width=1,A.height=1;const M=A.getContext("2d",{willReadFrequently:!0});M&&(k=M,k.globalCompositeOperation="copy",N=k.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),v.toColor(u,f,p);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),h=parseInt(A.slice(4,5).repeat(2),16),v.toColor(u,f,p,h);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const M=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return u=parseInt(M[1]),f=parseInt(M[2]),p=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),v.toColor(u,f,p,h);if(!k||!N)throw new Error("css.toColor: Unsupported css format");if(k.fillStyle=N,k.fillStyle=A,typeof k.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(k.fillRect(0,0,1,1),[u,f,p,h]=k.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(u,f,p,h),css:A}}})(C||(a.css=C={})),(function(x){function k(N,A,M){const T=N/255,j=A/255,O=M/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}x.relativeLuminance=function(N){return k(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=k})(w||(a.rgb=w={})),(function(x){function k(A,M,T){const j=A>>24&255,O=A>>16&255,z=A>>8&255;let q=M>>24&255,$=M>>16&255,V=M>>8&255,K=y(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,z));for(;K<T&&(q>0||$>0||V>0);)q-=Math.max(0,Math.ceil(.1*q)),$-=Math.max(0,Math.ceil(.1*$)),V-=Math.max(0,Math.ceil(.1*V)),K=y(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,z));return(q<<24|$<<16|V<<8|255)>>>0}function N(A,M,T){const j=A>>24&255,O=A>>16&255,z=A>>8&255;let q=M>>24&255,$=M>>16&255,V=M>>8&255,K=y(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,z));for(;K<T&&(q<255||$<255||V<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),$=Math.min(255,$+Math.ceil(.1*(255-$))),V=Math.min(255,V+Math.ceil(.1*(255-V))),K=y(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,z));return(q<<24|$<<16|V<<8|255)>>>0}x.blend=function(A,M){if(h=(255&M)/255,h===1)return M;const T=M>>24&255,j=M>>16&255,O=M>>8&255,z=A>>24&255,q=A>>16&255,$=A>>8&255;return u=z+Math.round((T-z)*h),f=q+Math.round((j-q)*h),p=$+Math.round((O-$)*h),v.toRgba(u,f,p)},x.ensureContrastRatio=function(A,M,T){const j=w.relativeLuminance(A>>8),O=w.relativeLuminance(M>>8);if(y(j,O)<T){if(O<j){const $=k(A,M,T),V=y(j,w.relativeLuminance($>>8));if(V<T){const K=N(A,M,T);return V>y(j,w.relativeLuminance(K>>8))?$:K}return $}const z=N(A,M,T),q=y(j,w.relativeLuminance(z>>8));if(q<T){const $=k(A,M,T);return q>y(j,w.relativeLuminance($>>8))?z:$}return z}},x.reduceLuminance=k,x.increaseLuminance=N,x.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(_||(a.rgba=_={})),a.toPaddedHex=b,a.contrastRatio=y},8969:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=u(844),p=u(2585),h=u(4348),v=u(7866),S=u(744),C=u(7302),w=u(6975),_=u(8460),b=u(1753),y=u(1480),x=u(7994),k=u(9282),N=u(5435),A=u(5981),M=u(2660);let T=!1;class j extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new _.EventEmitter),this._onScroll.event((z=>{var q;(q=this._onScrollApi)==null||q.fire(z.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(z){for(const q in z)this.optionsService.options[q]=z[q]}constructor(z){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new _.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(z)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(v.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(w.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(M.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,_.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,_.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,_.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,_.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new A.WriteBuffer(((q,$)=>this._inputHandler.parse(q,$)))),this.register((0,_.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(z,q){this._writeBuffer.write(z,q)}writeSync(z,q){this._logService.logLevel<=p.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(z,q)}input(z,q=!0){this.coreService.triggerDataEvent(z,q)}resize(z,q){isNaN(z)||isNaN(q)||(z=Math.max(z,S.MINIMUM_COLS),q=Math.max(q,S.MINIMUM_ROWS),this._bufferService.resize(z,q))}scroll(z,q=!1){this._bufferService.scroll(z,q)}scrollLines(z,q,$){this._bufferService.scrollLines(z,q,$)}scrollPages(z){this.scrollLines(z*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(z){const q=z-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(z,q){return this._inputHandler.registerEscHandler(z,q)}registerDcsHandler(z,q){return this._inputHandler.registerDcsHandler(z,q)}registerCsiHandler(z,q){return this._inputHandler.registerCsiHandler(z,q)}registerOscHandler(z,q){return this._inputHandler.registerOscHandler(z,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let z=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?z=q.backend==="conpty"&&q.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(z=!0),z?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const z=[];z.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),z.push(this.registerCsiHandler({final:"H"},(()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const q of z)q.dispose()}))}}}a.CoreTerminal=j},8460:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const p=[];for(let h=0;h<this._listeners.length;h++)p.push(this._listeners[h]);for(let h=0;h<p.length;h++)p[h].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,f){return u((p=>f.fire(p)))},a.runAndSubscribe=function(u,f){return f(void 0),u((p=>f(p)))}},5435:function(d,a,u){var f=this&&this.__decorate||function(Q,I,L,B){var H,F=arguments.length,J=F<3?I:B===null?B=Object.getOwnPropertyDescriptor(I,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(Q,I,L,B);else for(var ne=Q.length-1;ne>=0;ne--)(H=Q[ne])&&(J=(F<3?H(J):F>3?H(I,L,J):H(I,L))||J);return F>3&&J&&Object.defineProperty(I,L,J),J},p=this&&this.__param||function(Q,I){return function(L,B){I(L,B,Q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=u(2584),v=u(7116),S=u(2015),C=u(844),w=u(482),_=u(8437),b=u(8460),y=u(643),x=u(511),k=u(3734),N=u(2585),A=u(1480),M=u(6242),T=u(6351),j=u(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},z=131072;function q(Q,I){if(Q>24)return I.setWinLines||!1;switch(Q){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var $;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})($||(a.WindowsOptionsReportType=$={}));let V=0;class K extends C.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,B,H,F,J,ne,Z,W=new S.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=B,this._logService=H,this._optionsService=F,this._oscLinkService=J,this._coreMouseService=ne,this._unicodeService=Z,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new w.StringToUtf32,this._utf8Decoder=new w.Utf8ToUtf32,this._workCell=new x.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:te.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,te,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:te,data:ie})})),this._parser.setDcsHandlerFallback(((U,te,ie)=>{te==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:te,payload:ie})})),this._parser.setPrintHandler(((U,te,ie)=>this.print(U,te,ie))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new M.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new M.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new M.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new M.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new M.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new M.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new M.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new M.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new M.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new M.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new M.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new M.OscHandler((U=>this.restoreCursorColor(U)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const U in v.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((U,te)=>this.requestStatusString(U,te))))}_preserveStack(I,L,B,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=H}_logSlowResolvingAsync(I){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([I,new Promise(((L,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,L){let B,H=this._activeBuffer.x,F=this._activeBuffer.y,J=0;const ne=this._parseStack.paused;if(ne){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;H=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>z&&(J=this._parseStack.position+z)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(U=>String.fromCharCode(U))).join("")}"`),typeof I=="string"?I.split("").map((U=>U.charCodeAt(0))):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<z&&(this._parseBuffer=new Uint32Array(Math.min(I.length,z))),ne||this._dirtyRowTracker.clearRange(),I.length>z)for(let U=J;U<I.length;U+=z){const te=U+z<I.length?U+z:I.length,ie=typeof I=="string"?this._stringDecoder.decode(I.substring(U,te),this._parseBuffer):this._utf8Decoder.decode(I.subarray(U,te),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,F,ie,U),this._logSlowResolvingAsync(B),B}else if(!ne){const U=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,U))return this._preserveStack(H,F,U,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===H&&this._activeBuffer.y===F||this._onCursorMove.fire();const Z=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),W=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);W<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(W,this._bufferService.rows-1),Math.min(Z,this._bufferService.rows-1))}print(I,L,B){let H,F;const J=this._charsetService.charset,ne=this._optionsService.rawOptions.screenReaderMode,Z=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,te=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-L>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let ae=this._parser.precedingJoinState;for(let se=L;se<B;++se){if(H=I[se],H<127&&J){const Ke=J[String.fromCharCode(H)];Ke&&(H=Ke.charCodeAt(0))}const ge=this._unicodeService.charProperties(H,ae);F=A.UnicodeService.extractWidth(ge);const Te=A.UnicodeService.extractShouldJoin(ge),Me=Te?A.UnicodeService.extractWidth(ae):0;if(ae=ge,ne&&this._onA11yChar.fire((0,w.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-Me>Z){if(W){const Ke=ie;let Re=this._activeBuffer.x-Me;for(this._activeBuffer.x=Me,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Me>0&&ie instanceof _.BufferLine&&ie.copyCellsFrom(Ke,Re,0,Me,!1);Re<Z;)Ke.setCellFromCodepoint(Re++,0,1,te)}else if(this._activeBuffer.x=Z-1,F===2)continue}if(Te&&this._activeBuffer.x){const Ke=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-Ke,H,F);for(let Re=F-Me;--Re>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(U&&(ie.insertCells(this._activeBuffer.x,F-Me,this._activeBuffer.getNullCell(te)),ie.getWidth(Z-1)===2&&ie.setCellFromCodepoint(Z-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,te)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,F,te),F>0)for(;--F;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=ae,this._activeBuffer.x<Z&&B-L>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,(B=>!q(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new T.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new M.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var I;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,B,H=!1,F=!1){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);J.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),F),H&&(J.isWrapped=!1)}_resetBufferLine(I,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),B.isWrapped=!1)}eraseInDisplay(I,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B<this._bufferService.rows;B++)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;L--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;L--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(_.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const L=this._parser.precedingJoinState;if(!L)return!0;const B=I.params[0]||1,H=A.UnicodeService.extractWidth(L),F=this._activeBuffer.x-H,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),ne=new Uint32Array(J.length*B);let Z=0;for(let U=0;U<J.length;){const te=J.codePointAt(U)||0;ne[Z++]=te,U+=te>65535?2:1}let W=Z;for(let U=1;U<B;++U)ne.copyWithin(W,0,Z),W+=Z;return this.print(ne,0,W),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),this._charsetService.setgCharset(1,v.DEFAULT_CHARSET),this._charsetService.setgCharset(2,v.DEFAULT_CHARSET),this._charsetService.setgCharset(3,v.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),I.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(I,L){const B=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:F}=this._coreMouseService,J=this._coreService,{buffers:ne,cols:Z}=this._bufferService,{active:W,alt:U}=ne,te=this._optionsService.rawOptions,ie=Te=>Te?1:2,ae=I.params[0];return se=ae,ge=L?ae===2?4:ae===4?ie(J.modes.insertMode):ae===12?3:ae===20?ie(te.convertEol):0:ae===1?ie(B.applicationCursorKeys):ae===3?te.windowOptions.setWinLines?Z===80?2:Z===132?1:0:0:ae===6?ie(B.origin):ae===7?ie(B.wraparound):ae===8?3:ae===9?ie(H==="X10"):ae===12?ie(te.cursorBlink):ae===25?ie(!J.isCursorHidden):ae===45?ie(B.reverseWraparound):ae===66?ie(B.applicationKeypad):ae===67?4:ae===1e3?ie(H==="VT200"):ae===1002?ie(H==="DRAG"):ae===1003?ie(H==="ANY"):ae===1004?ie(B.sendFocus):ae===1005?4:ae===1006?ie(F==="SGR"):ae===1015?4:ae===1016?ie(F==="SGR_PIXELS"):ae===1048?1:ae===47||ae===1047||ae===1049?ie(W===U):ae===2004?ie(B.bracketedPasteMode):0,J.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${se};${ge}$y`),!0;var se,ge}_updateAttrColor(I,L,B,H,F){return L===2?(I|=50331648,I&=-16777216,I|=k.AttributeData.fromColorRGB([B,H,F])):L===5&&(I&=-50331904,I|=33554432|255&B),I}_extractColor(I,L,B){const H=[0,0,-1,0,0,0];let F=0,J=0;do{if(H[J+F]=I.params[L+J],I.hasSubParams(L+J)){const ne=I.getSubParams(L+J);let Z=0;do H[1]===5&&(F=1),H[J+Z+1+F]=ne[Z];while(++Z<ne.length&&Z+J+1+F<H.length);break}if(H[1]===5&&J+F>=2||H[1]===2&&J+F>=5)break;H[1]&&(F=1)}while(++J+L<I.length&&J+F<H.length);for(let ne=2;ne<H.length;++ne)H[ne]===-1&&(H[ne]=0);switch(H[0]){case 38:B.fg=this._updateAttrColor(B.fg,H[1],H[3],H[4],H[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,H[1],H[3],H[4],H[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,H[1],H[3],H[4],H[5])}return J}_processUnderline(I,L){L.extended=L.extended.clone(),(!~I||I>5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=_.DEFAULT_ATTR_DATA.fg,I.bg=_.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let B;const H=this._curAttrData;for(let F=0;F<L;F++)B=I.params[F],B>=30&&B<=37?(H.fg&=-50331904,H.fg|=16777216|B-30):B>=40&&B<=47?(H.bg&=-50331904,H.bg|=16777216|B-40):B>=90&&B<=97?(H.fg&=-50331904,H.fg|=16777224|B-90):B>=100&&B<=107?(H.bg&=-50331904,H.bg|=16777224|B-100):B===0?this._processSGR0(H):B===1?H.fg|=134217728:B===3?H.bg|=67108864:B===4?(H.fg|=268435456,this._processUnderline(I.hasSubParams(F)?I.getSubParams(F)[0]:1,H)):B===5?H.fg|=536870912:B===7?H.fg|=67108864:B===8?H.fg|=1073741824:B===9?H.fg|=2147483648:B===2?H.bg|=134217728:B===21?this._processUnderline(2,H):B===22?(H.fg&=-134217729,H.bg&=-134217729):B===23?H.bg&=-67108865:B===24?(H.fg&=-268435457,this._processUnderline(0,H)):B===25?H.fg&=-536870913:B===27?H.fg&=-67108865:B===28?H.fg&=-1073741825:B===29?H.fg&=2147483647:B===39?(H.fg&=-67108864,H.fg|=16777215&_.DEFAULT_ATTR_DATA.fg):B===49?(H.bg&=-67108864,H.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?F+=this._extractColor(I,F,H):B===53?H.bg|=1073741824:B===55?H.bg&=-1073741825:B===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):B===100?(H.fg&=-67108864,H.fg|=16777215&_.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${B}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const L=I.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(I){const L=I.params[0]||1;let B;return(I.length<2||(B=I.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(I){if(!q(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire($.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire($.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],B=I.split(";");for(;B.length>1;){const H=B.shift(),F=B.shift();if(/^\d+$/.exec(H)){const J=parseInt(H);if(Y(J))if(F==="?")L.push({type:0,index:J});else{const ne=(0,j.parseColor)(F);ne&&L.push({type:1,index:J,color:ne})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=I.split(":");let H;const F=B.findIndex((J=>J.startsWith("id=")));return F!==-1&&(H=B[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,L){const B=I.split(";");for(let H=0;H<B.length&&!(L>=this._specialColors.length);++H,++L)if(B[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const F=(0,j.parseColor)(B[H]);F&&this._onColor.fire([{type:1,index:this._specialColors[L],color:F}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],B=I.split(";");for(let H=0;H<B.length;++H)if(/^\d+$/.exec(B[H])){const F=parseInt(B[H]);Y(F)&&L.push({type:2,index:F})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(O[I[0]],v.CHARSETS[I[1]]||v.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new x.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const B=this._activeBuffer.ybase+this._activeBuffer.y+L,H=this._activeBuffer.lines.get(B);H&&(H.fill(I),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,L){const B=this._bufferService.buffer,H=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${F}${h.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}a.InputHandler=K;let G=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,I){Q>I&&(V=Q,Q=I,I=V),Q<this.start&&(this.start=Q),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(Q){return 0<=Q&&Q<256}G=f([p(0,N.IBufferService)],G)},844:(d,a)=>{function u(f){for(const p of f)p.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const p=this._disposables.indexOf(f);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var p;this._isDisposed||f===this._value||((p=this._value)==null||p.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=u,a.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,h,v){this._data[p]||(this._data[p]={}),this._data[p][h]=v}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(f,p,h,v,S){this._data.get(f,p)||this._data.set(f,p,new u),this._data.get(f,p).set(h,v,S)}get(f,p,h,v){var S;return(S=this._data.get(f,p))==null?void 0:S.get(h,v)}clear(){this._data.clear()}}},6114:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const p=this._getKey(f);if(p===void 0||(u=this._search(p),u===-1)||this._getKey(this._array[u])!==p)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===p);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,p){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do p(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let p=0,h=this._array.length-1;for(;h>=p;){let v=p+h>>1;const S=this._getKey(this._array[v]);if(S>f)h=v-1;else{if(!(S<f)){for(;v>0&&this._getKey(this._array[v-1])===f;)v--;return v}p=v+1}}return p}}},7226:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=u(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let C=0,w=0,_=S.timeRemaining(),b=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),w=Math.max(C,w),b=S.timeRemaining(),1.5*w>b)return _-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(_-C))}ms`),void this._start();_=b}this.clear()}}class h extends p{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const C=Date.now()+S;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},9282:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=u(643);a.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),v=h==null?void 0:h.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&v&&(S.isWrapped=v[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&v[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,v=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=v}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=u(6349),p=u(7226),h=u(3734),v=u(8437),S=u(4634),C=u(511),w=u(643),_=u(4863),b=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(y,x,k){this._hasScrollback=y,this._optionsService=x,this._bufferService=k,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,w.NULL_CELL_CHAR,w.NULL_CELL_WIDTH,w.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,w.WHITESPACE_CELL_CHAR,w.WHITESPACE_CELL_WIDTH,w.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,x){return new v.BufferLine(this._bufferService.cols,this.getNullCell(y),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&y<this._rows}_getCorrectBufferLength(y){if(!this._hasScrollback)return y;const x=y+this._optionsService.rawOptions.scrollback;return x>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:x}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=v.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(y))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(y,x){const k=this.getNullCell(v.DEFAULT_ATTR_DATA);let N=0;const A=this._getCorrectBufferLength(x);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<y)for(let T=0;T<this.lines.length;T++)N+=+this.lines.get(T).resize(y,k);let M=0;if(this._rows<x)for(let T=this._rows;T<x;T++)this.lines.length<x+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new v.BufferLine(y,k)):this.ybase>0&&this.lines.length<=this.ybase+this.y+M+1?(this.ybase--,M++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(y,k)));else for(let T=this._rows;T>x;T--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,x-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(y,x),this._cols>y))for(let M=0;M<this.lines.length;M++)N+=+this.lines.get(M).resize(y,k);this._cols=y,this._rows=x,this._memoryCleanupQueue.clear(),N>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let x=0;for(;this._memoryCleanupPosition<this.lines.length;)if(x+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),x>100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,x){this._cols!==y&&(y>this._cols?this._reflowLarger(y,x):this._reflowSmaller(y,x))}_reflowLarger(y,x){const k=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(k.length>0){const N=(0,S.reflowLargerCreateNewLayout)(this.lines,k);(0,S.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(y,x,N.countRemoved)}}_reflowLargerAdjustViewport(y,x,k){const N=this.getNullCell(v.DEFAULT_ATTR_DATA);let A=k;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<x&&this.lines.push(new v.BufferLine(y,N))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-k,0)}_reflowSmaller(y,x){const k=this.getNullCell(v.DEFAULT_ATTR_DATA),N=[];let A=0;for(let M=this.lines.length-1;M>=0;M--){let T=this.lines.get(M);if(!T||!T.isWrapped&&T.getTrimmedLength()<=y)continue;const j=[T];for(;T.isWrapped&&M>0;)T=this.lines.get(--M),j.unshift(T);const O=this.ybase+this.y;if(O>=M&&O<M+j.length)continue;const z=j[j.length-1].getTrimmedLength(),q=(0,S.reflowSmallerGetNewLineLengths)(j,this._cols,y),$=q.length-j.length;let V;V=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+$):Math.max(0,this.lines.length-this.lines.maxLength+$);const K=[];for(let B=0;B<$;B++){const H=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);K.push(H)}K.length>0&&(N.push({start:M+j.length+A,newLines:K}),A+=K.length),j.push(...K);let G=q.length-1,Y=q[G];Y===0&&(G--,Y=q[G]);let Q=j.length-$-1,I=z;for(;Q>=0;){const B=Math.min(I,Y);if(j[G]===void 0)break;if(j[G].copyCellsFrom(j[Q],I-B,Y-B,B,!0),Y-=B,Y===0&&(G--,Y=q[G]),I-=B,I===0){Q--;const H=Math.max(Q,0);I=(0,S.getWrappedLineTrimmedLength)(j,H,this._cols)}}for(let B=0;B<j.length;B++)q[B]<y&&j[B].setCell(q[B],k);let L=$-V;for(;L-- >0;)this.ybase===0?this.y<x-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-x&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+$,this.ybase+x-1)}if(N.length>0){const M=[],T=[];for(let G=0;G<this.lines.length;G++)T.push(this.lines.get(G));const j=this.lines.length;let O=j-1,z=0,q=N[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let $=0;for(let G=Math.min(this.lines.maxLength-1,j+A-1);G>=0;G--)if(q&&q.start>O+$){for(let Y=q.newLines.length-1;Y>=0;Y--)this.lines.set(G--,q.newLines[Y]);G++,M.push({index:O+1,amount:q.newLines.length}),$+=q.newLines.length,q=N[++z]}else this.lines.set(G,T[O--]);let V=0;for(let G=M.length-1;G>=0;G--)M[G].index+=V,this.lines.onInsertEmitter.fire(M[G]),V+=M[G].amount;const K=Math.max(0,j+A-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(y,x,k=0,N){const A=this.lines.get(y);return A?A.translateToString(x,k,N):""}getWrappedRangeForLine(y){let x=y,k=y;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;k+1<this.lines.length&&this.lines.get(k+1).isWrapped;)k++;return{first:x,last:k}}setupTabStops(y){for(y!=null?this.tabs[y]||(y=this.prevStop(y)):(this.tabs={},y=0);y<this._cols;y+=this._optionsService.rawOptions.tabStopWidth)this.tabs[y]=!0}prevStop(y){for(y==null&&(y=this.x);!this.tabs[--y]&&y>0;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y<this._cols;);return y>=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].line===y&&(this.markers[x].dispose(),this.markers.splice(x--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].dispose(),this.markers.splice(y--,1);this._isClearing=!1}addMarker(y){const x=new _.Marker(y);return this.markers.push(x),x.register(this.lines.onTrim((k=>{x.line-=k,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((k=>{x.line>=k.index&&(x.line+=k.amount)}))),x.register(this.lines.onDelete((k=>{x.line>=k.index&&x.line<k.index+k.amount&&x.dispose(),x.line>k.index&&(x.line-=k.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=u(3734),p=u(511),h=u(643),v=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class C{constructor(_,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*_);const x=b||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let k=0;k<_;++k)this.setCell(k,x);this.length=_}get(_){const b=this._data[3*_+0],y=2097151&b;return[this._data[3*_+1],2097152&b?this._combined[_]:y?(0,v.stringFromCodePoint)(y):"",b>>22,2097152&b?this._combined[_].charCodeAt(this._combined[_].length-1):y]}set(_,b){this._data[3*_+1]=b[h.CHAR_DATA_ATTR_INDEX],b[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[_]=b[1],this._data[3*_+0]=2097152|_|b[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*_+0]=b[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(_){return this._data[3*_+0]>>22}hasWidth(_){return 12582912&this._data[3*_+0]}getFg(_){return this._data[3*_+1]}getBg(_){return this._data[3*_+2]}hasContent(_){return 4194303&this._data[3*_+0]}getCodePoint(_){const b=this._data[3*_+0];return 2097152&b?this._combined[_].charCodeAt(this._combined[_].length-1):2097151&b}isCombined(_){return 2097152&this._data[3*_+0]}getString(_){const b=this._data[3*_+0];return 2097152&b?this._combined[_]:2097151&b?(0,v.stringFromCodePoint)(2097151&b):""}isProtected(_){return 536870912&this._data[3*_+2]}loadCell(_,b){return S=3*_,b.content=this._data[S+0],b.fg=this._data[S+1],b.bg=this._data[S+2],2097152&b.content&&(b.combinedData=this._combined[_]),268435456&b.bg&&(b.extended=this._extendedAttrs[_]),b}setCell(_,b){2097152&b.content&&(this._combined[_]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[_]=b.extended),this._data[3*_+0]=b.content,this._data[3*_+1]=b.fg,this._data[3*_+2]=b.bg}setCellFromCodepoint(_,b,y,x){268435456&x.bg&&(this._extendedAttrs[_]=x.extended),this._data[3*_+0]=b|y<<22,this._data[3*_+1]=x.fg,this._data[3*_+2]=x.bg}addCodepointToCell(_,b,y){let x=this._data[3*_+0];2097152&x?this._combined[_]+=(0,v.stringFromCodePoint)(b):2097151&x?(this._combined[_]=(0,v.stringFromCodePoint)(2097151&x)+(0,v.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*_+0]=x}insertCells(_,b,y){if((_%=this.length)&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,y),b<this.length-_){const x=new p.CellData;for(let k=this.length-_-b-1;k>=0;--k)this.setCell(_+b+k,this.loadCell(_+k,x));for(let k=0;k<b;++k)this.setCell(_+k,y)}else for(let x=_;x<this.length;++x)this.setCell(x,y);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,y)}deleteCells(_,b,y){if(_%=this.length,b<this.length-_){const x=new p.CellData;for(let k=0;k<this.length-_-b;++k)this.setCell(_+k,this.loadCell(_+b+k,x));for(let k=this.length-b;k<this.length;++k)this.setCell(k,y)}else for(let x=_;x<this.length;++x)this.setCell(x,y);_&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,y),this.getWidth(_)!==0||this.hasContent(_)||this.setCellFromCodepoint(_,0,1,y)}replaceCells(_,b,y,x=!1){if(x)for(_&&this.getWidth(_-1)===2&&!this.isProtected(_-1)&&this.setCellFromCodepoint(_-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,y);_<b&&_<this.length;)this.isProtected(_)||this.setCell(_,y),_++;else for(_&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,y);_<b&&_<this.length;)this.setCell(_++,y)}resize(_,b){if(_===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const y=3*_;if(_>this.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const x=new Uint32Array(y);x.set(this._data),this._data=x}for(let x=this.length;x<_;++x)this.setCell(x,b)}else{this._data=this._data.subarray(0,y);const x=Object.keys(this._combined);for(let N=0;N<x.length;N++){const A=parseInt(x[N],10);A>=_&&delete this._combined[A]}const k=Object.keys(this._extendedAttrs);for(let N=0;N<k.length;N++){const A=parseInt(k[N],10);A>=_&&delete this._extendedAttrs[A]}}return this.length=_,4*y*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const _=new Uint32Array(this._data.length);return _.set(this._data),this._data=_,1}return 0}fill(_,b=!1){if(b)for(let y=0;y<this.length;++y)this.isProtected(y)||this.setCell(y,_);else{this._combined={},this._extendedAttrs={};for(let y=0;y<this.length;++y)this.setCell(y,_)}}copyFrom(_){this.length!==_.length?this._data=new Uint32Array(_._data):this._data.set(_._data),this.length=_.length,this._combined={};for(const b in _._combined)this._combined[b]=_._combined[b];this._extendedAttrs={};for(const b in _._extendedAttrs)this._extendedAttrs[b]=_._extendedAttrs[b];this.isWrapped=_.isWrapped}clone(){const _=new C(0);_._data=new Uint32Array(this._data),_.length=this.length;for(const b in this._combined)_._combined[b]=this._combined[b];for(const b in this._extendedAttrs)_._extendedAttrs[b]=this._extendedAttrs[b];return _.isWrapped=this.isWrapped,_}getTrimmedLength(){for(let _=this.length-1;_>=0;--_)if(4194303&this._data[3*_+0])return _+(this._data[3*_+0]>>22);return 0}getNoBgTrimmedLength(){for(let _=this.length-1;_>=0;--_)if(4194303&this._data[3*_+0]||50331648&this._data[3*_+2])return _+(this._data[3*_+0]>>22);return 0}copyCellsFrom(_,b,y,x,k){const N=_._data;if(k)for(let M=x-1;M>=0;M--){for(let T=0;T<3;T++)this._data[3*(y+M)+T]=N[3*(b+M)+T];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[y+M]=_._extendedAttrs[b+M])}else for(let M=0;M<x;M++){for(let T=0;T<3;T++)this._data[3*(y+M)+T]=N[3*(b+M)+T];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[y+M]=_._extendedAttrs[b+M])}const A=Object.keys(_._combined);for(let M=0;M<A.length;M++){const T=parseInt(A[M],10);T>=b&&(this._combined[T-b+y]=_._combined[T])}}translateToString(_,b,y,x){b=b!=null?b:0,y=y!=null?y:this.length,_&&(y=Math.min(y,this.getTrimmedLength())),x&&(x.length=0);let k="";for(;b<y;){const N=this._data[3*b+0],A=2097151&N,M=2097152&N?this._combined[b]:A?(0,v.stringFromCodePoint)(A):h.WHITESPACE_CELL_CHAR;if(k+=M,x)for(let T=0;T<M.length;++T)x.push(b);b+=N>>22||1}return x&&x.push(b),k}}a.BufferLine=C},4841:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(d,a)=>{function u(f,p,h){if(p===f.length-1)return f[p].getTrimmedLength();const v=!f[p].hasContent(h-1)&&f[p].getWidth(h-1)===1,S=f[p+1].getWidth(0)===2;return v&&S?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,p,h,v,S){const C=[];for(let w=0;w<f.length-1;w++){let _=w,b=f.get(++_);if(!b.isWrapped)continue;const y=[f.get(w)];for(;_<f.length&&b.isWrapped;)y.push(b),b=f.get(++_);if(v>=w&&v<_){w+=y.length-1;continue}let x=0,k=u(y,x,p),N=1,A=0;for(;N<y.length;){const T=u(y,N,p),j=T-A,O=h-k,z=Math.min(j,O);y[x].copyCellsFrom(y[N],A,k,z,!1),k+=z,k===h&&(x++,k=0),A+=z,A===T&&(N++,A=0),k===0&&x!==0&&y[x-1].getWidth(h-1)===2&&(y[x].copyCellsFrom(y[x-1],h-1,k++,1,!1),y[x-1].setCell(h-1,S))}y[x].replaceCells(k,h,S);let M=0;for(let T=y.length-1;T>0&&(T>x||y[T].getTrimmedLength()===0);T--)M++;M>0&&(C.push(w+y.length-M),C.push(M)),w+=y.length-1}return C},a.reflowLargerCreateNewLayout=function(f,p){const h=[];let v=0,S=p[v],C=0;for(let w=0;w<f.length;w++)if(S===w){const _=p[++v];f.onDeleteEmitter.fire({index:w-C,amount:_}),w+=_-1,C+=_,S=p[++v]}else h.push(w);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,p){const h=[];for(let v=0;v<p.length;v++)h.push(f.get(p[v]));for(let v=0;v<h.length;v++)f.set(v,h[v]);f.length=p.length},a.reflowSmallerGetNewLineLengths=function(f,p,h){const v=[],S=f.map(((b,y)=>u(f,y,p))).reduce(((b,y)=>b+y));let C=0,w=0,_=0;for(;_<S;){if(S-_<h){v.push(S-_);break}C+=h;const b=u(f,w,p);C>b&&(C-=b,w++);const y=f[w].getWidth(C-1)===2;y&&C--;const x=y?h-1:h;v.push(x),_+=x}return v},a.getWrappedLineTrimmedLength=u},5295:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=u(8460),p=u(844),h=u(9092);class v extends p.Disposable{constructor(C,w){super(),this._optionsService=C,this._bufferService=w,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(C,w){this._normal.resize(C,w),this._alt.resize(C,w),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}a.BufferSet=v},511:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=u(482),p=u(643),h=u(3734);class v extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const w=new v;return w.setFromCharData(C),w}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let w=!1;if(C[p.CHAR_DATA_CHAR_INDEX].length>2)w=!0;else if(C[p.CHAR_DATA_CHAR_INDEX].length===2){const _=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=_&&_<=56319){const b=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(_-55296)+b-56320+65536|C[p.CHAR_DATA_WIDTH_INDEX]<<22:w=!0}else w=!0}else this.content=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[p.CHAR_DATA_WIDTH_INDEX]<<22;w&&(this.combinedData=C[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=v},643:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=u(8460),p=u(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}a.Marker=h,h._nextId=1},7116:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(d,a)=>{var u,f,p;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
513
- `,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(u||(a.C0=u={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(f||(a.C1=f={})),(function(h){h.ST=`${u.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=u(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(h,v,S,C){const w={type:0,cancel:!1,key:void 0},_=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?w.key=v?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?w.key=v?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?w.key=v?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(w.key=v?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:w.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(w.key=f.C0.ESC+w.key);break;case 9:if(h.shiftKey){w.key=f.C0.ESC+"[Z";break}w.key=f.C0.HT,w.cancel=!0;break;case 13:w.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,w.cancel=!0;break;case 27:w.key=f.C0.ESC,h.altKey&&(w.key=f.C0.ESC+f.C0.ESC),w.cancel=!0;break;case 37:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"D",w.key===f.C0.ESC+"[1;3D"&&(w.key=f.C0.ESC+(S?"b":"[1;5D"))):w.key=v?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"C",w.key===f.C0.ESC+"[1;3C"&&(w.key=f.C0.ESC+(S?"f":"[1;5C"))):w.key=v?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"A",S||w.key!==f.C0.ESC+"[1;3A"||(w.key=f.C0.ESC+"[1;5A")):w.key=v?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"B",S||w.key!==f.C0.ESC+"[1;3B"||(w.key=f.C0.ESC+"[1;5B")):w.key=v?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(w.key=f.C0.ESC+"[2~");break;case 46:w.key=_?f.C0.ESC+"[3;"+(_+1)+"~":f.C0.ESC+"[3~";break;case 36:w.key=_?f.C0.ESC+"[1;"+(_+1)+"H":v?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:w.key=_?f.C0.ESC+"[1;"+(_+1)+"F":v?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?w.type=2:h.ctrlKey?w.key=f.C0.ESC+"[5;"+(_+1)+"~":w.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?w.type=3:h.ctrlKey?w.key=f.C0.ESC+"[6;"+(_+1)+"~":w.key=f.C0.ESC+"[6~";break;case 112:w.key=_?f.C0.ESC+"[1;"+(_+1)+"P":f.C0.ESC+"OP";break;case 113:w.key=_?f.C0.ESC+"[1;"+(_+1)+"Q":f.C0.ESC+"OQ";break;case 114:w.key=_?f.C0.ESC+"[1;"+(_+1)+"R":f.C0.ESC+"OR";break;case 115:w.key=_?f.C0.ESC+"[1;"+(_+1)+"S":f.C0.ESC+"OS";break;case 116:w.key=_?f.C0.ESC+"[15;"+(_+1)+"~":f.C0.ESC+"[15~";break;case 117:w.key=_?f.C0.ESC+"[17;"+(_+1)+"~":f.C0.ESC+"[17~";break;case 118:w.key=_?f.C0.ESC+"[18;"+(_+1)+"~":f.C0.ESC+"[18~";break;case 119:w.key=_?f.C0.ESC+"[19;"+(_+1)+"~":f.C0.ESC+"[19~";break;case 120:w.key=_?f.C0.ESC+"[20;"+(_+1)+"~":f.C0.ESC+"[20~";break;case 121:w.key=_?f.C0.ESC+"[21;"+(_+1)+"~":f.C0.ESC+"[21~";break;case 122:w.key=_?f.C0.ESC+"[23;"+(_+1)+"~":f.C0.ESC+"[23~";break;case 123:w.key=_?f.C0.ESC+"[24;"+(_+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!C||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?w.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(w.key=f.C0.US),h.key==="@"&&(w.key=f.C0.NUL)):h.keyCode===65&&(w.type=1);else{const b=p[h.keyCode],y=b==null?void 0:b[h.shiftKey?1:0];if(y)w.key=f.C0.ESC+y;else if(h.keyCode>=65&&h.keyCode<=90){const x=h.ctrlKey?h.keyCode-64:h.keyCode+32;let k=String.fromCharCode(x);h.shiftKey&&(k=k.toUpperCase()),w.key=f.C0.ESC+k}else if(h.keyCode===32)w.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let x=h.code.slice(3,4);h.shiftKey||(x=x.toLowerCase()),w.key=f.C0.ESC+x,w.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?w.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?w.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?w.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?w.key=f.C0.DEL:h.keyCode===219?w.key=f.C0.ESC:h.keyCode===220?w.key=f.C0.FS:h.keyCode===221&&(w.key=f.C0.GS)}return w}},482:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,f=0,p=u.length){let h="";for(let v=f;v<p;++v){let S=u[v];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const p=u.length;if(!p)return 0;let h=0,v=0;if(this._interim){const S=u.charCodeAt(v++);56320<=S&&S<=57343?f[h++]=1024*(this._interim-55296)+S-56320+65536:(f[h++]=this._interim,f[h++]=S),this._interim=0}for(let S=v;S<p;++S){const C=u.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=p)return this._interim=C,h;const w=u.charCodeAt(S);56320<=w&&w<=57343?f[h++]=1024*(C-55296)+w-56320+65536:(f[h++]=C,f[h++]=w)}else C!==65279&&(f[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const p=u.length;if(!p)return 0;let h,v,S,C,w=0,_=0,b=0;if(this.interim[0]){let k=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let A,M=0;for(;(A=63&this.interim[++M])&&M<4;)N<<=6,N|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=T-M;for(;b<j;){if(b>=p)return 0;if(A=u[b++],(192&A)!=128){b--,k=!0;break}this.interim[M++]=A,N<<=6,N|=63&A}k||(T===2?N<128?b--:f[w++]=N:T===3?N<2048||N>=55296&&N<=57343||N===65279||(f[w++]=N):N<65536||N>1114111||(f[w++]=N)),this.interim.fill(0)}const y=p-4;let x=b;for(;x<p;){for(;!(!(x<y)||128&(h=u[x])||128&(v=u[x+1])||128&(S=u[x+2])||128&(C=u[x+3]));)f[w++]=h,f[w++]=v,f[w++]=S,f[w++]=C,x+=4;if(h=u[x++],h<128)f[w++]=h;else if((224&h)==192){if(x>=p)return this.interim[0]=h,w;if(v=u[x++],(192&v)!=128){x--;continue}if(_=(31&h)<<6|63&v,_<128){x--;continue}f[w++]=_}else if((240&h)==224){if(x>=p)return this.interim[0]=h,w;if(v=u[x++],(192&v)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=v,w;if(S=u[x++],(192&S)!=128){x--;continue}if(_=(15&h)<<12|(63&v)<<6|63&S,_<2048||_>=55296&&_<=57343||_===65279)continue;f[w++]=_}else if((248&h)==240){if(x>=p)return this.interim[0]=h,w;if(v=u[x++],(192&v)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=v,w;if(S=u[x++],(192&S)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=v,this.interim[2]=S,w;if(C=u[x++],(192&C)!=128){x--;continue}if(_=(7&h)<<18|(63&v)<<12|(63&S)<<6|63&C,_<65536||_>1114111)continue;f[w++]=_}}return w}}},225:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=u(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let v;a.UnicodeV6=class{constructor(){if(this.version="6",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160),v.fill(2,4352,4448),v[9001]=2,v[9002]=2,v.fill(2,11904,42192),v[12351]=1,v.fill(2,44032,55204),v.fill(2,63744,64256),v.fill(2,65040,65050),v.fill(2,65072,65136),v.fill(2,65280,65377),v.fill(2,65504,65511);for(let S=0;S<p.length;++S)v.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?v[S]:(function(C,w){let _,b=0,y=w.length-1;if(C<w[0][0]||C>w[y][1])return!1;for(;y>=b;)if(_=b+y>>1,C>w[_][1])b=_+1;else{if(!(C<w[_][0]))return!0;y=_-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let w=this.wcwidth(S),_=w===0&&C!==0;if(_){const b=f.UnicodeService.extractWidth(C);b===0?_=!1:b>w&&(w=b)}return f.UnicodeService.createPropertyValue(0,w,_)}}},5981:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=u(8460),p=u(844);class h extends p.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let w;for(this._isSyncWriting=!0;w=this._writeBuffer.shift();){this._action(w);const _=this._callbacks.shift();_&&_()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C)}_innerWrite(S=0,C=!0){const w=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const _=this._writeBuffer[this._bufferOffset],b=this._action(_,C);if(b){const x=k=>Date.now()-w>=12?setTimeout((()=>this._innerWrite(0,k))):this._innerWrite(w,k);return void b.catch((k=>(queueMicrotask((()=>{throw k})),Promise.resolve(!1)))).then(x)}const y=this._callbacks[this._bufferOffset];if(y&&y(),this._bufferOffset++,this._pendingData-=_.length,Date.now()-w>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=h},5941:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function p(h,v){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(v){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(h){if(!h)return;let v=h.toLowerCase();if(v.indexOf("rgb:")===0){v=v.slice(4);const S=u.exec(v);if(S){const C=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/C*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/C*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/C*255)]}}else if(v.indexOf("#")===0&&(v=v.slice(1),f.exec(v)&&[3,6,9,12].includes(v.length))){const S=v.length/3,C=[0,0,0];for(let w=0;w<3;++w){const _=parseInt(v.slice(S*w,S*w+S),16);C[w]=S===1?_<<4:S===2?_:S===3?_>>4:_>>8}return C}},a.toRgbString=function(h,v=16){const[S,C,w]=h;return`rgb:${p(S,v)}/${p(C,v)}/${p(w,v)}`}},5770:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=u(482),p=u(8742),h=u(5770),v=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=v,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const _=this._handlers[C];return _.push(w),{dispose:()=>{const b=_.indexOf(w);b!==-1&&_.splice(b,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=v,this._ident=0}hook(C,w){if(this.reset(),this._ident=C,this._active=this._handlers[C]||v,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(C,w,_){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(C,w,_);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,w,_))}unhook(C,w=!0){if(this._active.length){let _=!1,b=this._active.length-1,y=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,_=w,y=this._stack.fallThrough,this._stack.paused=!1),!y&&_===!1){for(;b>=0&&(_=this._active[b].unhook(C),_!==!0);b--)if(_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,_;b--}for(;b>=0;b--)if(_=this._active[b].unhook(!1),_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,_}else this._handlerFb(this._ident,"UNHOOK",C);this._active=v,this._ident=0}};const S=new p.Params;S.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=S,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():S,this._data="",this._hitLimit=!1}put(C,w,_){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,w,_),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(w=this._handler(this._data,this._params),w instanceof Promise))return w.then((_=>(this._params=S,this._data="",this._hitLimit=!1,_)));return this._params=S,this._data="",this._hitLimit=!1,w}}},2015:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=u(844),p=u(8742),h=u(6242),v=u(6351);class S{constructor(b){this.table=new Uint8Array(b)}setDefault(b,y){this.table.fill(b<<4|y)}add(b,y,x,k){this.table[y<<8|b]=x<<4|k}addMany(b,y,x,k){for(let N=0;N<b.length;N++)this.table[y<<8|b[N]]=x<<4|k}}a.TransitionTable=S;const C=160;a.VT500_TRANSITION_TABLE=(function(){const _=new S(4095),b=Array.apply(null,Array(256)).map(((M,T)=>T)),y=(M,T)=>b.slice(M,T),x=y(32,127),k=y(0,24);k.push(25),k.push.apply(k,y(28,32));const N=y(0,14);let A;for(A in _.setDefault(1,0),_.addMany(x,0,2,0),N)_.addMany([24,26,153,154],A,3,0),_.addMany(y(128,144),A,3,0),_.addMany(y(144,152),A,3,0),_.add(156,A,0,0),_.add(27,A,11,1),_.add(157,A,4,8),_.addMany([152,158,159],A,0,7),_.add(155,A,11,3),_.add(144,A,11,9);return _.addMany(k,0,3,0),_.addMany(k,1,3,1),_.add(127,1,0,1),_.addMany(k,8,0,8),_.addMany(k,3,3,3),_.add(127,3,0,3),_.addMany(k,4,3,4),_.add(127,4,0,4),_.addMany(k,6,3,6),_.addMany(k,5,3,5),_.add(127,5,0,5),_.addMany(k,2,3,2),_.add(127,2,0,2),_.add(93,1,4,8),_.addMany(x,8,5,8),_.add(127,8,5,8),_.addMany([156,27,24,26,7],8,6,0),_.addMany(y(28,32),8,0,8),_.addMany([88,94,95],1,0,7),_.addMany(x,7,0,7),_.addMany(k,7,0,7),_.add(156,7,0,0),_.add(127,7,0,7),_.add(91,1,11,3),_.addMany(y(64,127),3,7,0),_.addMany(y(48,60),3,8,4),_.addMany([60,61,62,63],3,9,4),_.addMany(y(48,60),4,8,4),_.addMany(y(64,127),4,7,0),_.addMany([60,61,62,63],4,0,6),_.addMany(y(32,64),6,0,6),_.add(127,6,0,6),_.addMany(y(64,127),6,0,0),_.addMany(y(32,48),3,9,5),_.addMany(y(32,48),5,9,5),_.addMany(y(48,64),5,0,6),_.addMany(y(64,127),5,7,0),_.addMany(y(32,48),4,9,5),_.addMany(y(32,48),1,9,2),_.addMany(y(32,48),2,9,2),_.addMany(y(48,127),2,10,0),_.addMany(y(48,80),1,10,0),_.addMany(y(81,88),1,10,0),_.addMany([89,90,92],1,10,0),_.addMany(y(96,127),1,10,0),_.add(80,1,11,9),_.addMany(k,9,0,9),_.add(127,9,0,9),_.addMany(y(28,32),9,0,9),_.addMany(y(32,48),9,9,12),_.addMany(y(48,60),9,8,10),_.addMany([60,61,62,63],9,9,10),_.addMany(k,11,0,11),_.addMany(y(32,128),11,0,11),_.addMany(y(28,32),11,0,11),_.addMany(k,10,0,10),_.add(127,10,0,10),_.addMany(y(28,32),10,0,10),_.addMany(y(48,60),10,8,10),_.addMany([60,61,62,63],10,0,11),_.addMany(y(32,48),10,9,12),_.addMany(k,12,0,12),_.add(127,12,0,12),_.addMany(y(28,32),12,0,12),_.addMany(y(32,48),12,9,12),_.addMany(y(48,64),12,0,11),_.addMany(y(64,127),12,12,13),_.addMany(y(64,127),10,12,13),_.addMany(y(64,127),9,12,13),_.addMany(k,13,13,13),_.addMany(x,13,13,13),_.add(127,13,0,13),_.addMany([27,156,24,26],13,14,0),_.add(C,0,2,0),_.add(C,8,5,8),_.add(C,6,0,6),_.add(C,11,0,11),_.add(C,13,13,13),_})();class w extends f.Disposable{constructor(b=a.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,x,k)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,x)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new v.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,y=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;N<b.intermediates.length;++N){const A=b.intermediates.charCodeAt(N);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=A}}if(b.final.length!==1)throw new Error("final must be a single byte");const k=b.final.charCodeAt(0);if(y[0]>k||k>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return x<<=8,x|=k,x}identToString(b){const y=[];for(;b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,y){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const k=this._escHandlers[x];return k.push(y),{dispose:()=>{const N=k.indexOf(y);N!==-1&&k.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,y){this._executeHandlers[b.charCodeAt(0)]=y}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,y){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const k=this._csiHandlers[x];return k.push(y),{dispose:()=>{const N=k.indexOf(y);N!==-1&&k.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,y){return this._oscParser.registerHandler(b,y)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,y,x,k,N){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=x,this._parseStack.transition=k,this._parseStack.chunkPos=N}parse(b,y,x){let k,N=0,A=0,M=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,M=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let j=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&j>-1){for(;j>=0&&(k=T[j](this._params),k!==!0);j--)if(k instanceof Promise)return this._parseStack.handlerPos=j,k}this._parseStack.handlers=[];break;case 4:if(x===!1&&j>-1){for(;j>=0&&(k=T[j](),k!==!0);j--)if(k instanceof Promise)return this._parseStack.handlerPos=j,k}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],k=this._dcsParser.unhook(N!==24&&N!==26,x),k)return k;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],k=this._oscParser.end(N!==24&&N!==26,x),k)return k;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,M=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=M;T<y;++T){switch(N=b[T],A=this._transitions.table[this.currentState<<8|(N<160?N:C)],A>>4){case 2:for(let $=T+1;;++$){if($>=y||(N=b[$])<32||N>126&&N<C){this._printHandler(b,T,$),T=$-1;break}if(++$>=y||(N=b[$])<32||N>126&&N<C){this._printHandler(b,T,$),T=$-1;break}if(++$>=y||(N=b[$])<32||N>126&&N<C){this._printHandler(b,T,$),T=$-1;break}if(++$>=y||(N=b[$])<32||N>126&&N<C){this._printHandler(b,T,$),T=$-1;break}}break;case 3:this._executeHandlers[N]?this._executeHandlers[N]():this._executeHandlerFb(N),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:N,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const j=this._csiHandlers[this._collect<<8|N];let O=j?j.length-1:-1;for(;O>=0&&(k=j[O](this._params),k!==!0);O--)if(k instanceof Promise)return this._preserveStack(3,j,O,A,T),k;O<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++T<y&&(N=b[T])>47&&N<60);T--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const z=this._escHandlers[this._collect<<8|N];let q=z?z.length-1:-1;for(;q>=0&&(k=z[q](),k!==!0);q--)if(k instanceof Promise)return this._preserveStack(4,z,q,A,T),k;q<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let $=T+1;;++$)if($>=y||(N=b[$])===24||N===26||N===27||N>127&&N<C){this._dcsParser.put(b,T,$),T=$-1;break}break;case 14:if(k=this._dcsParser.unhook(N!==24&&N!==26),k)return this._preserveStack(6,[],0,A,T),k;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let $=T+1;;$++)if($>=y||(N=b[$])<32||N>127&&N<C){this._oscParser.put(b,T,$),T=$-1;break}break;case 6:if(k=this._oscParser.end(N!==24&&N!==26),k)return this._preserveStack(5,[],0,A,T),k;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=w},6242:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=u(5770),p=u(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(v,S){this._handlers[v]===void 0&&(this._handlers[v]=[]);const C=this._handlers[v];return C.push(S),{dispose:()=>{const w=C.indexOf(S);w!==-1&&C.splice(w,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].start();else this._handlerFb(this._id,"START")}_put(v,S,C){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(v,S,C);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(v,S,C))}start(){this.reset(),this._state=1}put(v,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const w=v[S++];if(w===59){this._state=2,this._start();break}if(w<48||57<w)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+w-48}this._state===2&&C-S>0&&this._put(v,S,C)}}end(v,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,w=this._active.length-1,_=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,C=S,_=this._stack.fallThrough,this._stack.paused=!1),!_&&C===!1){for(;w>=0&&(C=this._active[w].end(v),C!==!0);w--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,C;w--}for(;w>=0;w--)if(C=this._active[w].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",v);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(v){this._handler=v,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(v,S,C){this._hitLimit||(this._data+=(0,p.utf32ToString)(v,S,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(v){let S=!1;if(this._hitLimit)S=!1;else if(v&&(S=this._handler(this._data),S instanceof Promise))return S.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,S}}},8742:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class f{static fromArray(h){const v=new f;if(!h.length)return v;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const C=h[S];if(Array.isArray(C))for(let w=0;w<C.length;++w)v.addSubParam(C[w]);else v.addParam(C)}return v}constructor(h=32,v=32){if(this.maxLength=h,this.maxSubParamsLength=v,v>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(v),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let v=0;v<this.length;++v){h.push(this.params[v]);const S=this._subParamsIdx[v]>>8,C=255&this._subParamsIdx[v];C-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,C))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>u?u:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>u?u:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const v=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-v>0?this._subParams.subarray(v,S):null}getSubParamsAll(){const h={};for(let v=0;v<this.length;++v){const S=this._subParamsIdx[v]>>8,C=255&this._subParamsIdx[v];C-S>0&&(h[v]=this._subParams.slice(S,C))}return h}addDigit(h){let v;if(this._rejectDigits||!(v=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[v-1];S[v-1]=~C?Math.min(10*C+h,u):h}}a.Params=f},5741:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const p={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(p),f.dispose=()=>this._wrappedAddonDispose(p),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===u){f=p;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=u(3785),p=u(511);a.BufferApiView=class{constructor(h,v){this._buffer=h,this.type=v}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const v=this._buffer.lines.get(h);if(v)return new f.BufferLineApiView(v)}getNullCell(){return new p.CellData}}},3785:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=u(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,h){if(!(p<0||p>=this._line.length))return h?(this._line.loadCell(p,h),h):this._line.loadCell(p,new f.CellData)}translateToString(p,h,v){return this._line.translateToString(p,h,v)}}},8285:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=u(8771),p=u(8460),h=u(844);class v extends h.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=v},7975:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(p=>f(p.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((p,h)=>f(p,h.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(d,a,u){var f=this&&this.__decorate||function(_,b,y,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(_,b,y,x);else for(var M=_.length-1;M>=0;M--)(k=_[M])&&(A=(N<3?k(A):N>3?k(b,y,A):k(b,y))||A);return N>3&&A&&Object.defineProperty(b,y,A),A},p=this&&this.__param||function(_,b){return function(y,x){b(y,x,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=u(8460),v=u(844),S=u(5295),C=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let w=a.BufferService=class extends v.Disposable{get buffer(){return this.buffers.active}constructor(_){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(_.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(_.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(_,this))}resize(_,b){this.cols=_,this.rows=b,this.buffers.resize(_,b),this._onResize.fire({cols:_,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(_,b=!1){const y=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===_.fg&&x.getBg(0)===_.bg||(x=y.getBlankLine(_,b),this._cachedBlankLine=x),x.isWrapped=b;const k=y.ybase+y.scrollTop,N=y.ybase+y.scrollBottom;if(y.scrollTop===0){const A=y.lines.isFull;N===y.lines.length-1?A?y.lines.recycle().copyFrom(x):y.lines.push(x.clone()):y.lines.splice(N+1,0,x.clone()),A?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const A=N-k+1;y.lines.shiftElements(k+1,A-1,-1),y.lines.set(N,x.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(_,b,y){const x=this.buffer;if(_<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else _+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const k=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+_,x.ybase),0),k!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};a.BufferService=w=f([p(0,C.IOptionsService)],w)},7994:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(d,a,u){var f=this&&this.__decorate||function(x,k,N,A){var M,T=arguments.length,j=T<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,k,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(T<3?M(j):T>3?M(k,N,j):M(k,N))||j);return T>3&&j&&Object.defineProperty(k,N,j),j},p=this&&this.__param||function(x,k){return function(N,A){k(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=u(2585),v=u(8460),S=u(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function w(x,k){let N=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(N|=64,N|=x.action):(N|=3&x.button,4&x.button&&(N|=64),8&x.button&&(N|=128),x.action===32?N|=32:x.action!==0||k||(N|=3)),N}const _=String.fromCharCode,b={DEFAULT:x=>{const k=[w(x,!1)+32,x.col+32,x.row+32];return k[0]>255||k[1]>255||k[2]>255?"":`\x1B[M${_(k[0])}${_(k[1])}${_(k[2])}`},SGR:x=>{const k=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.col};${x.row}${k}`},SGR_PIXELS:x=>{const k=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.x};${x.y}${k}`}};let y=a.CoreMouseService=class extends S.Disposable{constructor(x,k){super(),this._bufferService=x,this._coreService=k,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new v.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(C))this.addProtocol(N,C[N]);for(const N of Object.keys(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(x,k){this._protocols[x]=k}addEncoding(x,k){this._encodings[x]=k}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const k=this._encodings[this._activeEncoding](x);return k&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(k):this._coreService.triggerDataEvent(k,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,k,N){if(N){if(x.x!==k.x||x.y!==k.y)return!1}else if(x.col!==k.col||x.row!==k.row)return!1;return x.button===k.button&&x.action===k.action&&x.ctrl===k.ctrl&&x.alt===k.alt&&x.shift===k.shift}};a.CoreMouseService=y=f([p(0,h.IBufferService),p(1,h.ICoreService)],y)},6975:function(d,a,u){var f=this&&this.__decorate||function(y,x,k,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,x,k,N);else for(var j=y.length-1;j>=0;j--)(A=y[j])&&(T=(M<3?A(T):M>3?A(x,k,T):A(x,k))||T);return M>3&&T&&Object.defineProperty(x,k,T),T},p=this&&this.__param||function(y,x){return function(k,N){x(k,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=u(1439),v=u(8460),S=u(844),C=u(2585),w=Object.freeze({insertMode:!1}),_=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=a.CoreService=class extends S.Disposable{constructor(y,x,k){super(),this._bufferService=y,this._logService=x,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new v.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new v.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(_)}reset(){this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(_)}triggerDataEvent(y,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const k=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&k.ybase!==k.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(y))}};a.CoreService=b=f([p(0,C.IBufferService),p(1,C.ILogService),p(2,C.IOptionsService)],b)},9074:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=u(8055),p=u(8460),h=u(844),v=u(6106);let S=0,C=0;class w extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new v.SortedList((y=>y==null?void 0:y.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const x=new _(y);if(x){const k=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),k.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,x,k){var M,T,j;let N=0,A=0;for(const O of this._decorations.getKeyIterator(x))N=(M=O.options.x)!=null?M:0,A=N+((T=O.options.width)!=null?T:1),y>=N&&y<A&&(!k||((j=O.options.layer)!=null?j:"bottom")===k)&&(yield O)}forEachDecorationAtCell(y,x,k,N){this._decorations.forEachByKey(x,(A=>{var M,T,j;S=(M=A.options.x)!=null?M:0,C=S+((T=A.options.width)!=null?T:1),y>=S&&y<C&&(!k||((j=A.options.layer)!=null?j:"bottom")===k)&&N(A)}))}}a.DecorationService=w;class _ extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(y){super(),this.options=y,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=y.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=u(2585),p=u(8343);class h{constructor(...S){this._entries=new Map;for(const[C,w]of S)this.set(C,w)}set(S,C){const w=this._entries.get(S);return this._entries.set(S,C),w}forEach(S){for(const[C,w]of this._entries.entries())S(C,w)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(v,S){this._services.set(v,S)}getService(v){return this._services.get(v)}createInstance(v,...S){const C=(0,p.getServiceDependencies)(v).sort(((b,y)=>b.index-y.index)),w=[];for(const b of C){const y=this._services.get(b.id);if(!y)throw new Error(`[createInstance] ${v.name} depends on UNKNOWN service ${b.id}.`);w.push(y)}const _=C.length>0?C[0].index:S.length;if(S.length!==_)throw new Error(`[createInstance] First service dependency of ${v.name} at position ${_+1} conflicts with ${S.length} static arguments`);return new v(...S,...w)}}},7866:function(d,a,u){var f=this&&this.__decorate||function(_,b,y,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(_,b,y,x);else for(var M=_.length-1;M>=0;M--)(k=_[M])&&(A=(N<3?k(A):N>3?k(b,y,A):k(b,y))||A);return N>3&&A&&Object.defineProperty(b,y,A),A},p=this&&this.__param||function(_,b){return function(y,x){b(y,x,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=u(844),v=u(2585),S={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let C,w=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(_){super(),this._optionsService=_,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(_){for(let b=0;b<_.length;b++)typeof _[b]=="function"&&(_[b]=_[b]())}_log(_,b,y){this._evalLazyOptionalParams(y),_.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...y)}trace(_,...b){var y,x;this._logLevel<=v.LogLevelEnum.TRACE&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.trace.bind(this._optionsService.options.logger))!=null?x:console.log,_,b)}debug(_,...b){var y,x;this._logLevel<=v.LogLevelEnum.DEBUG&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.debug.bind(this._optionsService.options.logger))!=null?x:console.log,_,b)}info(_,...b){var y,x;this._logLevel<=v.LogLevelEnum.INFO&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.info.bind(this._optionsService.options.logger))!=null?x:console.info,_,b)}warn(_,...b){var y,x;this._logLevel<=v.LogLevelEnum.WARN&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.warn.bind(this._optionsService.options.logger))!=null?x:console.warn,_,b)}error(_,...b){var y,x;this._logLevel<=v.LogLevelEnum.ERROR&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.error.bind(this._optionsService.options.logger))!=null?x:console.error,_,b)}};a.LogService=w=f([p(0,v.IOptionsService)],w),a.setTraceLogger=function(_){C=_},a.traceCall=function(_,b,y){if(typeof y.value!="function")throw new Error("not supported");const x=y.value;y.value=function(...k){if(C.logLevel!==v.LogLevelEnum.TRACE)return x.apply(this,k);C.trace(`GlyphRenderer#${x.name}(${k.map((A=>JSON.stringify(A))).join(", ")})`);const N=x.apply(this,k);return C.trace(`GlyphRenderer#${x.name} return`,N),N}}},7302:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=u(8460),p=u(844),h=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const v=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends p.Disposable{constructor(w){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const _={...a.DEFAULT_OPTIONS};for(const b in w)if(b in _)try{const y=w[b];_[b]=this._sanitizeAndValidateOption(b,y)}catch(y){console.error(y)}this.rawOptions=_,this.options={..._},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,_){return this.onOptionChange((b=>{b===w&&_(this.rawOptions[w])}))}onMultipleOptionChange(w,_){return this.onOptionChange((b=>{w.indexOf(b)!==-1&&_()}))}_setupOptions(){const w=b=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},_=(b,y)=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);y=this._sanitizeAndValidateOption(b,y),this.rawOptions[b]!==y&&(this.rawOptions[b]=y,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const y={get:w.bind(this,b),set:_.bind(this,b)};Object.defineProperty(this.options,b,y)}}_sanitizeAndValidateOption(w,_){switch(w){case"cursorStyle":if(_||(_=a.DEFAULT_OPTIONS[w]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(_))throw new Error(`"${_}" is not a valid value for ${w}`);break;case"wordSeparator":_||(_=a.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof _=="number"&&1<=_&&_<=1e3)break;_=v.includes(_)?_:a.DEFAULT_OPTIONS[w];break;case"cursorWidth":_=Math.floor(_);case"lineHeight":case"tabStopWidth":if(_<1)throw new Error(`${w} cannot be less than 1, value: ${_}`);break;case"minimumContrastRatio":_=Math.max(1,Math.min(21,Math.round(10*_)/10));break;case"scrollback":if((_=Math.min(_,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${_}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(_<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${_}`);break;case"rows":case"cols":if(!_&&_!==0)throw new Error(`${w} must be numeric, value: ${_}`);break;case"windowsPty":_=_!=null?_:{}}return _}}a.OptionsService=S},2660:function(d,a,u){var f=this&&this.__decorate||function(S,C,w,_){var b,y=arguments.length,x=y<3?C:_===null?_=Object.getOwnPropertyDescriptor(C,w):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,C,w,_);else for(var k=S.length-1;k>=0;k--)(b=S[k])&&(x=(y<3?b(x):y>3?b(C,w,x):b(C,w))||x);return y>3&&x&&Object.defineProperty(C,w,x),x},p=this&&this.__param||function(S,C){return function(w,_){C(w,_,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=u(2585);let v=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const C=this._bufferService.buffer;if(S.id===void 0){const k=C.addMarker(C.ybase+C.y),N={data:S,id:this._nextId++,lines:[k]};return k.onDispose((()=>this._removeMarkerFromLink(N,k))),this._dataByLinkId.set(N.id,N),N.id}const w=S,_=this._getEntryIdKey(w),b=this._entriesWithId.get(_);if(b)return this.addLineToLink(b.id,C.ybase+C.y),b.id;const y=C.addMarker(C.ybase+C.y),x={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(x,y))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.id}addLineToLink(S,C){const w=this._dataByLinkId.get(S);if(w&&w.lines.every((_=>_.line!==C))){const _=this._bufferService.buffer.addMarker(C);w.lines.push(_),_.onDispose((()=>this._removeMarkerFromLink(w,_)))}}getLinkData(S){var C;return(C=this._dataByLinkId.get(S))==null?void 0:C.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,C){const w=S.lines.indexOf(C);w!==-1&&(S.lines.splice(w,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};a.OscLinkService=v=f([p(0,h.IBufferService)],v)},8343:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[f]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const h=function(v,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,_,b){_[u]===_?_[f].push({id:w,index:b}):(_[f]=[{id:w,index:b}],_[u]=_)})(h,v,C)};return h.toString=()=>p,a.serviceRegistry.set(p,h),h}},2585:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=u(8343);var p;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=u(8460),p=u(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,w=!1){return(16777215&S)<<3|(3&C)<<1|(w?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const S=new p.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let C=0,w=0;const _=S.length;for(let b=0;b<_;++b){let y=S.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=_)return C+this.wcwidth(y);const N=S.charCodeAt(b);56320<=N&&N<=57343?y=1024*(y-55296)+N-56320+65536:C+=this.wcwidth(N)}const x=this.charProperties(y,w);let k=h.extractWidth(x);h.extractShouldJoin(x)&&(k-=h.extractWidth(w)),C+=k,w=x}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}a.UnicodeService=h}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return n[d].call(u.exports,u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.Terminal=void 0;const a=o(9042),u=o(3236),f=o(844),p=o(5741),h=o(8285),v=o(7975),S=o(7090),C=["cols","rows"];class w extends f.Disposable{constructor(b){super(),this._core=this.register(new u.Terminal(b)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const y=k=>this._core.options[k],x=(k,N)=>{this._checkReadonlyOptions(k),this._core.options[k]=N};for(const k in this._core.options){const N={get:y.bind(this,k),set:x.bind(this,k)};Object.defineProperty(this._publicOptions,k,N)}}_checkReadonlyOptions(b){if(C.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new v.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const y in b)this._publicOptions[y]=b[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,y=!0){this._core.input(b,y)}resize(b,y){this._verifyIntegers(b,y),this._core.resize(b,y)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){var y,x,k;return this._checkProposedApi(),this._verifyPositiveIntegers((y=b.x)!=null?y:0,(x=b.width)!=null?x:0,(k=b.height)!=null?k:0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,y,x){this._verifyIntegers(b,y,x),this._core.select(b,y,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,y){this._verifyIntegers(b,y),this._core.selectLines(b,y)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,y){this._core.write(b,y)}writeln(b,y){this._core.write(b),this._core.write(`\r
514
- `,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return a}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}d.Terminal=w})(),l})()))})(tg)),tg.exports}var Sj=xj(),ng={exports:{}},Db;function wj(){return Db||(Db=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const l=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(l._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,l=o._renderService.dimensions;if(l.css.cell.width===0||l.css.cell.height===0)return;const d=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=u-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),v=f-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-d;return{cols:Math.max(2,Math.floor(v/l.css.cell.width)),rows:Math.max(1,Math.floor(h/l.css.cell.height))}}}})(),n})()))})(ng)),ng.exports}var Cj=wj(),rg={exports:{}},Mb;function kj(){return Mb||(Mb=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={6:(d,a)=>{function u(p){try{const h=new URL(p),v=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return p.toLocaleLowerCase().startsWith(v.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,h,v,S={}){this._terminal=p,this._regex=h,this._handler=v,this._options=S}provideLinks(p,h){const v=f.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(v))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(v,S)=>{if(this._options.hover){const{range:C}=h;this._options.hover(v,S,C)}},h)))}};class f{static computeLink(h,v,S,C){const w=new RegExp(v.source,(v.flags||"")+"g"),[_,b]=f._getWindowedLineStrings(h-1,S),y=_.join("");let x;const k=[];for(;x=w.exec(y);){const N=x[0];if(!u(N))continue;const[A,M]=f._mapStrIdx(S,b,0,x.index),[T,j]=f._mapStrIdx(S,A,M,N.length);if(A===-1||M===-1||T===-1||j===-1)continue;const O={start:{x:M+1,y:A+1},end:{x:j,y:T+1}};k.push({range:O,text:N,activate:C})}return k}static _getWindowedLineStrings(h,v){let S,C=h,w=h,_=0,b="";const y=[];if(S=v.buffer.active.getLine(h)){const x=S.translateToString(!0);if(S.isWrapped&&x[0]!==" "){for(_=0;(S=v.buffer.active.getLine(--C))&&_<2048&&(b=S.translateToString(!0),_+=b.length,y.push(b),S.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),_=0;(S=v.buffer.active.getLine(++w))&&S.isWrapped&&_<2048&&(b=S.translateToString(!0),_+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,C]}static _mapStrIdx(h,v,S,C){const w=h.buffer.active,_=w.getNullCell();let b=S;for(;C;){const y=w.getLine(v);if(!y)return[-1,-1];for(let x=b;x<y.length;++x){y.getCell(x,_);const k=_.getChars();if(_.getWidth()&&(C-=k.length||1,x===y.length-1&&k==="")){const N=w.getLine(v+1);N&&N.isWrapped&&(N.getCell(0,_),_.getWidth()===2&&(C+=1))}if(C<0)return[v,x]}v++,b=0}return[v,b]}}a.LinkComputer=f}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return n[d](u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.WebLinksAddon=void 0;const a=o(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(p,h){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}d.WebLinksAddon=class{constructor(p=f,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,v=h.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,v,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),l})()))})(rg)),rg.exports}var Ej=kj();const Eo={INPUT:1,RESIZE:2,CLOSE:3,OUTPUT:4,EXIT:5,ERROR:6,INIT_ACK:7,TITLE:8};function ig(t,e){const n=new Uint8Array(1+e.length);return n[0]=t,n.set(e,1),n}function Aj(t,e){const{serverUrl:n,apiToken:i,cwd:o}=e,l=D.useRef(null),d=D.useRef(null),a=D.useRef(null),u=D.useRef("disconnected"),f=D.useRef(!1),p=D.useRef(0),h=D.useRef(e.onStatusChange),v=D.useRef(e.onExit),S=D.useRef(e.onSessionInit),C=D.useRef(e.onTitleChange);D.useEffect(()=>{h.current=e.onStatusChange,v.current=e.onExit,S.current=e.onSessionInit,C.current=e.onTitleChange});const w=D.useRef(n),_=D.useRef(i),b=D.useRef(o),y=D.useRef(e.serverSessionId);D.useEffect(()=>{w.current=n,_.current=i,b.current=o,y.current=e.serverSessionId});const x=D.useCallback(j=>{var O;u.current=j,(O=h.current)==null||O.call(h,j)},[]),k=D.useCallback(()=>{if(f.current)return;const j=++p.current,O=a.current;O&&(O.onopen=null,O.onclose=null,O.onmessage=null,O.onerror=null,O.close(),a.current=null),x("connecting");const z=y.current,q=z?`ws://${w.current}/ws/terminal?token=${_.current}&cwd=${encodeURIComponent(b.current)}&sessionId=${z}`:`ws://${w.current}/ws/terminal?token=${_.current}&cwd=${encodeURIComponent(b.current)}`,$=new WebSocket(q);$.binaryType="arraybuffer",$.onopen=()=>{if(p.current!==j){$.close();return}if(a.current=$,l.current&&d.current)try{d.current.fit()}catch{}},$.onmessage=V=>{var Q,I,L,B,H,F,J,ne;if(p.current!==j||!(V.data instanceof ArrayBuffer))return;const K=new Uint8Array(V.data);if(K.length<1)return;const G=K[0],Y=K.slice(1);switch(G){case Eo.OUTPUT:{const Z=new TextDecoder().decode(Y);(Q=l.current)==null||Q.write(Z);break}case Eo.EXIT:{const{exitCode:Z}=JSON.parse(new TextDecoder().decode(Y));x("exited"),(I=l.current)==null||I.writeln(`\r
515
- [Process exited with code ${Z}]`),(L=v.current)==null||L.call(v,Z),$.close();break}case Eo.ERROR:{const{message:Z}=JSON.parse(new TextDecoder().decode(Y));x("disconnected"),(B=l.current)==null||B.writeln(`\r
516
- [Error: ${Z}]`);break}case Eo.INIT_ACK:{const Z=JSON.parse(new TextDecoder().decode(Y));(H=S.current)==null||H.call(S,Z),Z.isReconnect&&Z.status==="exited"?(x("exited"),(F=l.current)==null||F.writeln(`\r
517
- [Process exited with code ${Z.exitCode} while disconnected]`),(J=v.current)==null||J.call(v,Z.exitCode)):x("connected");break}case Eo.TITLE:{const{title:Z}=JSON.parse(new TextDecoder().decode(Y));(ne=C.current)==null||ne.call(C,Z);break}}},$.onclose=()=>{var V;p.current===j&&(a.current=null,u.current==="connecting"?(x("disconnected"),(V=l.current)==null||V.writeln(`\r
518
- [Connection failed]`)):u.current==="connected"&&x("disconnected"))},$.onerror=()=>{}},[x]);D.useEffect(()=>{const j=t();if(!j){console.log("[useTerminal] MAIN EFFECT: no container, returning early");return}N.current=!0,f.current=!1;const O=new Sj.Terminal({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:"'Menlo', 'Monaco', 'Courier New', monospace",scrollback:1e3,allowProposedApi:!0,theme:{background:"var(--background)",foreground:"var(--foreground)",cursor:"var(--foreground)",selectionBackground:"var(--accent)"}}),z=new Cj.FitAddon,q=new Ej.WebLinksAddon;O.loadAddon(z),O.loadAddon(q);let $=!1;const V=requestAnimationFrame(()=>{if(!($||!j.isConnected))if(O.open(j),O.cols<=1||O.rows<=1){const K=()=>{if(!$){try{if(z.fit(),O.cols>1&&O.rows>1)return}catch{}requestAnimationFrame(K)}};requestAnimationFrame(K)}else try{z.fit()}catch{}});return l.current=O,d.current=z,O.onData(K=>{const G=a.current;if(!G||G.readyState!==WebSocket.OPEN)return;const Y=new TextEncoder().encode(K);G.send(ig(Eo.INPUT,Y))}),O.onResize(({cols:K,rows:G})=>{const Y=a.current;if(!Y||Y.readyState!==WebSocket.OPEN)return;const Q=new TextEncoder().encode(JSON.stringify({cols:K,rows:G}));Y.send(ig(Eo.RESIZE,Q))}),k(),()=>{$=!0,cancelAnimationFrame(V),f.current=!0;const K=a.current;K&&(K.onopen=null,K.onclose=null,K.onmessage=null,K.onerror=null,K.close(),a.current=null),O.dispose(),l.current=null,d.current=null}},[t,k]);const N=D.useRef(!0);D.useEffect(()=>{if(N.current){N.current=!1;return}const j=a.current;j&&(j.close(),a.current=null),!f.current&&l.current&&k()},[n,i,o,k]);const A=D.useCallback(()=>{var j;try{(j=d.current)==null||j.fit()}catch{}},[]),M=D.useCallback(()=>{var j;(j=l.current)==null||j.focus()},[]),T=D.useCallback(()=>{var O;const j=a.current;if(j){try{j.send(ig(Eo.CLOSE,new Uint8Array(0)))}catch{}j.close(),a.current=null}(O=l.current)==null||O.dispose(),l.current=null,d.current=null,f.current=!0},[]);return{fit:A,focus:M,destroy:T}}const Rj=D.forwardRef(function({serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:d,onSessionInit:a,onTitleChange:u},f){const p=D.useRef(null),h=D.useCallback(()=>p.current,[]),{fit:v,focus:S}=Aj(h,{serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:d,onSessionInit:a,onTitleChange:u});return D.useImperativeHandle(f,()=>({focus:S}),[S]),D.useEffect(()=>{const C=p.current;if(!C)return;const w=new ResizeObserver(()=>{requestAnimationFrame(()=>v())});return w.observe(C),()=>{w.disconnect()}},[v]),D.useEffect(()=>{const C=p.current;if(!C)return;let w=0;const _=10,b=setInterval(()=>{if(w++,w>_){clearInterval(b);return}C.offsetParent!==null&&(clearInterval(b),requestAnimationFrame(()=>v()))},100);return()=>{clearInterval(b)}},[v]),g.jsx("div",{ref:p,className:"w-full h-full",onFocus:S})});function Tj(){const t=me.c(2),[e,n]=D.useState(Nj);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.visualViewport;if(!l)return;const d=()=>{n({height:l.height,offsetTop:l.offsetTop,scale:l.scale})};return d(),l.addEventListener("resize",d),l.addEventListener("scroll",d),()=>{l.removeEventListener("resize",d),l.removeEventListener("scroll",d)}},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),e}function Nj(){return{height:typeof window<"u"?window.innerHeight:0,offsetTop:0,scale:1}}const Dj=5,Mj=300,jj=200,Oj=.7,Lj=D.forwardRef(function({workspaceId:e,workspacePath:n,workspaceName:i,serverUrl:o,apiToken:l,isOpen:d,onClose:a},u){var F,J,ne;const f=ad(),p=Tj(),[h,v]=D.useState(new Map),[S,C]=D.useState(new Map),[w,_]=D.useState(Mj),b=D.useRef(!1),y=D.useRef(0),x=D.useRef(0),k=D.useRef(new Set),N=D.useRef(new Map),A=e?(F=h.get(e))!=null?F:[]:[],M=e?S.get(e):void 0,j=(e&&(ne=(J=h.get(e))==null?void 0:J.length)!=null?ne:0)<Dj,O=D.useCallback(async Z=>{if(!(!o||!l||k.current.has(Z))){k.current.add(Z);try{const W=await fetch(`http://${o}/api/workspaces/${Z}/terminals`,{headers:{Authorization:`Bearer ${l}`}});if(!W.ok)return;const U=await W.json();if(!U.sessions||U.sessions.length===0)return;const te=U.sessions.map(ie=>({id:crypto.randomUUID(),serverSessionId:ie.id,workspaceId:Z,workspacePath:ie.cwd,title:ie.title,status:"disconnected"}));v(ie=>{var Me;const ae=(Me=ie.get(Z))!=null?Me:[],se=new Set(ae.map(Ke=>Ke.serverSessionId).filter(Boolean)),ge=te.filter(Ke=>!se.has(Ke.serverSessionId));if(ge.length===0)return ie;if(ae.length>0){for(const Ke of ge)fetch(`http://${o}/api/workspaces/${Z}/terminals/${Ke.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{});return ie}const Te=new Map(ie);return Te.set(Z,[...ae,...ge]),Te}),C(ie=>{const ae=new Map(ie);return ae.has(Z)||ae.set(Z,te[0].id),ae})}catch(W){console.log("[TerminalPanel] fetchExistingSessions FAILED",W)}finally{k.current.delete(Z)}}},[o,l]);D.useEffect(()=>{!e||!d||O(e)},[e,d,O]);const z=D.useCallback((Z,W)=>{v(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(ge=>ge.id===Z?{...ge,status:W}:ge);se.some(ge=>ge.id===Z)&&te.set(ie,se)}return te})},[]),q=D.useCallback((Z,W)=>{v(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(ge=>ge.id===Z?{...ge,serverSessionId:W.sessionId,title:W.title||ge.title}:ge);se.some(ge=>ge.id===Z)&&te.set(ie,se)}return te})},[]),$=D.useCallback((Z,W)=>{v(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(ge=>ge.id===Z?{...ge,title:W}:ge);se.some(ge=>ge.id===Z)&&te.set(ie,se)}return te})},[]),V=D.useCallback(()=>{if(!e||!n||!j)return;const Z={id:crypto.randomUUID(),serverSessionId:null,workspaceId:e,workspacePath:n,title:"main",status:"connecting"};v(W=>{var ie;const U=new Map(W),te=(ie=U.get(e))!=null?ie:[];return U.set(e,[...te,Z]),U}),C(W=>{const U=new Map(W);return U.set(e,Z.id),U})},[e,n,j]),K=D.useCallback(Z=>{const W=[...h.values()].flat().find(U=>U.id===Z);W!=null&&W.serverSessionId&&o&&l&&fetch(`http://${o}/api/workspaces/${W.workspaceId}/terminals/${W.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{}),v(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.filter(ge=>ge.id!==Z);se.length<ae.length&&te.set(ie,se)}return te}),C(U=>{var ie,ae;const te=new Map(U);for(const[se,ge]of te.entries())if(ge===Z){const Te=(ae=(ie=h.get(se))==null?void 0:ie.filter(Me=>Me.id!==Z))!=null?ae:[];Te.length>0?te.set(se,Te[Te.length-1].id):te.delete(se)}return te})},[h,o,l]);D.useEffect(()=>{var W;if(!e||!n||!d)return;((W=h.get(e))!=null?W:[]).length===0&&V()},[d,e,n,h,V]);const G=D.useCallback(()=>{var Z;(Z=N.current.get(M!=null?M:""))==null||Z.focus()},[M]);D.useImperativeHandle(u,()=>({focus:G}),[G]),D.useEffect(()=>{if(!d||A.length===0)return;const Z=setTimeout(G,300);return()=>clearTimeout(Z)},[d,A.length,G]);const Y=D.useCallback(Z=>{Z.preventDefault(),b.current=!0;const W="touches"in Z?Z.touches[0].clientY:Z.clientY;y.current=W,x.current=w;const U=ie=>{if(!b.current)return;const ae="touches"in ie?ie.touches[0].clientY:ie.clientY,se=y.current-ae,ge=window.innerHeight*Oj,Te=Math.min(Math.max(x.current+se,jj),ge);_(Te)},te=()=>{b.current=!1,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",te)};document.addEventListener("mousemove",U),document.addEventListener("mouseup",te),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",te)},[w]);if(!e||!n||!o||!l)return g.jsx("div",{className:"flex items-center justify-center h-[300px] border-t border-border bg-background text-muted-foreground text-sm",children:"Select a workspace to use the terminal."});const I=`[${i||n.split("/").pop()||"ws"}]`,L=Z=>{switch(Z){case"connecting":return"bg-warning";case"connected":return"bg-success";case"disconnected":return"bg-muted-foreground";case"exited":return"bg-error"}},B=()=>g.jsxs("div",{className:"flex items-center gap-0.5 overflow-x-auto px-1 min-h-[32px]",children:[A.map(Z=>g.jsxs("div",{className:Ee("group flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer rounded-sm whitespace-nowrap border border-transparent",Z.id===M?"bg-accent text-accent-foreground border-border":"text-muted-foreground hover:bg-muted"),onClick:()=>C(W=>{const U=new Map(W);return U.set(e,Z.id),U}),children:[g.jsx("span",{className:Ee("w-1.5 h-1.5 rounded-full shrink-0",L(Z.status))}),g.jsxs("span",{children:[I," ",Z.title]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:text-destructive transition-opacity ml-0.5",onClick:W=>{W.stopPropagation(),K(Z.id)},children:g.jsx(Os,{className:"w-3 h-3"})})]},Z.id)),j&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:V,title:"New terminal tab",children:g.jsx(cc,{className:"w-3.5 h-3.5"})})]}),H=()=>g.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[A.map(Z=>g.jsx("div",{className:Ee("w-full h-full",Z.id!==M?"invisible absolute inset-0 pointer-events-none":"relative"),children:g.jsx(Ij,{tab:Z,serverUrl:o,apiToken:l,onStatusChange:W=>z(Z.id,W),onSessionInit:W=>q(Z.id,W),onTitleChange:W=>$(Z.id,W),onTerminalRef:W=>{W?N.current.set(Z.id,W):N.current.delete(Z.id)}},Z.id)},Z.id)),A.length===0&&g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"No terminal sessions"})]});if(f){const W=p.height<window.innerHeight*.85?`calc(${p.height}px - env(safe-area-inset-top, 0px))`:Math.min(window.innerHeight*.7,p.height);return d?g.jsx(Oh,{open:d,onOpenChange:U=>!U&&a(),children:g.jsxs(Lh,{side:"top",className:"p-0 bg-background [&>button]:hidden flex flex-col",style:{height:W},children:[g.jsx(Ih,{className:"sr-only",children:g.jsx(Bh,{children:"Terminal"})}),g.jsxs("div",{className:"flex items-center justify-between p-2 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Iy,{className:"w-4 h-4"}),g.jsx("span",{className:"font-semibold text-sm",children:"Terminal"})]}),g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Os,{className:"w-4 h-4"})})]}),B(),H()]})}):null}return g.jsxs("div",{className:Ee(!d&&"hidden"),"data-terminal-panel":"",children:[g.jsx("div",{className:"w-full cursor-ns-resize flex items-center justify-center border-t border-border bg-background select-none shrink-0",style:{height:4},onMouseDown:Y,onTouchStart:Y,children:g.jsx("div",{className:"w-10 h-0.5 bg-muted-foreground/30 rounded-full"})}),g.jsxs("div",{className:"flex flex-col border-t border-border bg-background overflow-hidden shrink-0",style:{height:w},children:[g.jsxs("div",{className:"flex items-center justify-between px-2 py-1 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Iy,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("span",{className:"font-medium text-xs text-muted-foreground",children:"Terminal"})]}),g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Os,{className:"w-3.5 h-3.5"})})]}),B(),H()]})]})});function Ij(t){const e=me.c(13),{tab:n,serverUrl:i,apiToken:o,onStatusChange:l,onSessionInit:d,onTitleChange:a,onTerminalRef:u}=t,f=D.useRef(l),p=D.useRef(d),h=D.useRef(a);let v;e[0]!==d||e[1]!==l||e[2]!==a?(v=()=>{f.current=l,p.current=d,h.current=a},e[0]=d,e[1]=l,e[2]=a,e[3]=v):v=e[3],D.useEffect(v);let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=k=>{f.current(k)},e[4]=S):S=e[4];const C=S;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=k=>{p.current(k)},e[5]=w):w=e[5];const _=w;let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=k=>{h.current(k)},e[6]=b):b=e[6];const y=b;let x;return e[7]!==o||e[8]!==u||e[9]!==i||e[10]!==n.serverSessionId||e[11]!==n.workspacePath?(x=g.jsx(Rj,{ref:u,serverUrl:i,apiToken:o,cwd:n.workspacePath,serverSessionId:n.serverSessionId,onStatusChange:C,onSessionInit:_,onTitleChange:y}),e[7]=o,e[8]=u,e[9]=i,e[10]=n.serverSessionId,e[11]=n.workspacePath,e[12]=x):x=e[12],x}function Bj(t){return t.role==="assistant"}const zj=fc("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Tf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n||e[5]!==o?(l=Ee(zj({variant:o}),n),e[4]=n,e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==i||e[8]!==l?(d=g.jsx("div",{"data-slot":"alert",role:"alert",className:l,...i}),e[7]=i,e[8]=l,e[9]=d):d=e[9],d}function Nf(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"alert-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Pj(t){const e=me.c(12);let n,i,o;e[0]!==t?({className:n,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=Ee("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",n),e[4]=n,e[5]=l):l=e[5];const d=`translateX(-${100-(o||0)}%)`;let a;e[6]!==d?(a=g.jsx(LN,{"data-slot":"progress-indicator",className:"size-full flex-1 bg-primary transition-all",style:{transform:d}}),e[6]=d,e[7]=a):a=e[7];let u;return e[8]!==i||e[9]!==l||e[10]!==a?(u=g.jsx(ON,{"data-slot":"progress",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=u):u=e[11],u}function bf(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()}function Fj(t){return t>=60?"critical":t>=40?"warning":"normal"}function Hj(t){const e=me.c(41),{totalTokens:n,contextWindow:i,modelName:o,compact:l}=t,d=n===void 0?0:n,a=i===void 0?0:i,u=l===void 0?!1:l,f=d===0?0:a;let p;e[0]!==f||e[1]!==d?(p=f===0?0:Math.min(100,Math.round(d/f*100)),e[0]=f,e[1]=d,e[2]=p):p=e[2];const h=p;let v;e[3]!==h?(v=Fj(h),e[3]=h,e[4]=v):v=e[4];const S=v;if(u){let O;e[5]!==d?(O=bf(d),e[5]=d,e[6]=O):O=e[6];let z;e[7]!==f?(z=bf(f),e[7]=f,e[8]=z):z=e[8];let q;e[9]!==O||e[10]!==z?(q=g.jsxs("span",{className:"text-xs font-mono",children:[O,"/",z]}),e[9]=O,e[10]=z,e[11]=q):q=e[11];let $;e[12]===Symbol.for("react.memo_cache_sentinel")?($=g.jsx(Fu,{asChild:!0,children:g.jsx(S4,{className:"size-3 text-muted-foreground cursor-help"})}),e[12]=$):$=e[12];let V;e[13]!==h?(V=g.jsx(Vf,{children:g.jsxs(Pu,{children:[$,g.jsx(Hu,{side:"bottom",children:g.jsxs("p",{className:"text-xs",children:[h,"% of context window used"]})})]})}),e[13]=h,e[14]=V):V=e[14];let K;return e[15]!==V||e[16]!==q?(K=g.jsxs("div",{className:"flex items-center gap-1.5",children:[q,V]}),e[15]=V,e[16]=q,e[17]=K):K=e[17],K}let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens:"}),e[18]=C):C=e[18];let w;e[19]!==d?(w=bf(d),e[19]=d,e[20]=w):w=e[20];let _;e[21]!==f?(_=bf(f),e[21]=f,e[22]=_):_=e[22];let b;e[23]!==w||e[24]!==_?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[C,g.jsxs("span",{className:"text-xs font-mono",children:[w,"/",_]})]}),e[23]=w,e[24]=_,e[25]=b):b=e[25];const y=S==="critical"&&"[&>div]:bg-destructive",x=S==="warning"&&"[&>div]:bg-warning",k=S==="normal"&&"[&>div]:bg-primary";let N;e[26]!==y||e[27]!==x||e[28]!==k?(N=Ee("h-1 w-20",y,x,k),e[26]=y,e[27]=x,e[28]=k,e[29]=N):N=e[29];let A;e[30]!==h||e[31]!==N?(A=g.jsx(Pj,{value:h,className:N}),e[30]=h,e[31]=N,e[32]=A):A=e[32];let M;e[33]!==h?(M=g.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",h,"%)"]}),e[33]=h,e[34]=M):M=e[34];let T;e[35]!==A||e[36]!==M?(T=g.jsxs("div",{className:"flex items-center gap-2",children:[A,M]}),e[35]=A,e[36]=M,e[37]=T):T=e[37];let j;return e[38]!==b||e[39]!==T?(j=g.jsx("div",{className:"flex items-center gap-3",children:g.jsxs("div",{className:"flex flex-col gap-1",children:[b,T]})}),e[38]=b,e[39]=T,e[40]=j):j=e[40],j}function X1(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(vD,{"data-slot":"select",...n}),e[2]=n,e[3]=i):i=e[3],i}function Uj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("scroll-my-1 p-1",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(CD,{"data-slot":"select-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function oc(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(yD,{"data-slot":"select-value",...n}),e[2]=n,e[3]=i):i=e[3],i}function Q1(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:i,size:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?"default":l;let a;e[5]!==i?(a=Ee("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(bD,{asChild:!0,children:g.jsx(lc,{className:"pointer-events-none size-4 text-muted-foreground"})}),e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==d||e[11]!==a?(f=g.jsxs(_D,{"data-slot":"select-trigger","data-size":d,className:a,...o,children:[n,u]}),e[8]=n,e[9]=o,e[10]=d,e[11]=a,e[12]=f):f=e[12],f}function Z1(t){const e=me.c(24);let n,i,o,l,d;e[0]!==t?({className:i,children:n,position:l,align:d,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5]);const a=l===void 0?"item-aligned":l,u=d===void 0?"center":d,f=a==="item-aligned",p=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==i||e[7]!==p?(h=Ee("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",p,i),e[6]=i,e[7]=p,e[8]=h):h=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(qj,{}),e[9]=v):v=e[9];const S=a==="popper"&&"";let C;e[10]!==S?(C=Ee("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",S),e[10]=S,e[11]=C):C=e[11];let w;e[12]!==n||e[13]!==a||e[14]!==C?(w=g.jsx(wD,{"data-position":a,className:C,children:n}),e[12]=n,e[13]=a,e[14]=C,e[15]=w):w=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(Vj,{}),e[16]=_):_=e[16];let b;return e[17]!==u||e[18]!==a||e[19]!==o||e[20]!==f||e[21]!==h||e[22]!==w?(b=g.jsx(xD,{children:g.jsxs(SD,{"data-slot":"select-content","data-align-trigger":f,className:h,position:a,align:u,...o,children:[v,w,_]})}),e[17]=u,e[18]=a,e[19]=o,e[20]=f,e[21]=h,e[22]=w,e[23]=b):b=e[23],b}function $j(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("px-1.5 py-1 text-xs text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(kD,{"data-slot":"select-label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function zh(t){const e=me.c(13);let n,i,o;e[0]!==t?({className:i,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==i?(l=Ee("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),e[4]=i,e[5]=l):l=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:g.jsx(RD,{children:g.jsx(Ls,{className:"pointer-events-none"})})}),e[6]=d):d=e[6];let a;e[7]!==n?(a=g.jsx(AD,{children:n}),e[7]=n,e[8]=a):a=e[8];let u;return e[9]!==o||e[10]!==l||e[11]!==a?(u=g.jsxs(ED,{"data-slot":"select-item",className:l,...o,children:[d,a]}),e[9]=o,e[10]=l,e[11]=a,e[12]=u):u=e[12],u}function qj(t){const e=me.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(GE,{}),e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==o?(d=g.jsx(TD,{"data-slot":"select-scroll-up-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function Vj(t){const e=me.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(lc,{}),e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==o?(d=g.jsx(ND,{"data-slot":"select-scroll-down-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function Ri(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(hN,{"data-slot":"label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Wj(t){switch(t){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function Gj(t){const e=me.c(45),{models:n,selectedModelId:i,onChangeModel:o,disabled:l,compact:d,iconOnly:a,connectedProviderIds:u,connectableProviderIds:f}=t,p=d===void 0?!1:d,h=a===void 0?!1:a;let v,S,C,w,_,b,y,x,k;if(e[0]!==p||e[1]!==f||e[2]!==u||e[3]!==l||e[4]!==h||e[5]!==n||e[6]!==o||e[7]!==i){const T=n.reduce(Kj,{});let j;e[17]!==n||e[18]!==o?(j=K=>{const G=n.find(Y=>Y.id===K);G&&o(K,G.providerId)},e[17]=n,e[18]=o,e[19]=j):j=e[19];const O=j,z=p&&!h;x="flex items-center gap-2",e[20]!==h||e[21]!==z?(k=!h&&g.jsx(Ri,{className:"text-xs text-muted-foreground",children:z?g.jsx(jy,{className:"size-3.5"}):"Model:"}),e[20]=h,e[21]=z,e[22]=k):k=e[22],S=X1,w=i||"",_=O,b=l;const q=h?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[180px] h-8 text-sm";let $;e[23]!==h?($=h&&g.jsxs(g.Fragment,{children:[g.jsx(jy,{className:"size-4"}),g.jsx(oc,{className:"sr-only"})]}),e[23]=h,e[24]=$):$=e[24];let V;e[25]!==h?(V=!h&&g.jsx(oc,{placeholder:"Select model"}),e[25]=h,e[26]=V):V=e[26],e[27]!==q||e[28]!==$||e[29]!==V?(y=g.jsxs(Q1,{className:q,children:[$,V]}),e[27]=q,e[28]=$,e[29]=V,e[30]=y):y=e[30],v=Z1,C=Object.entries(T).map(K=>{const[G,Y]=K;return g.jsxs(Uj,{children:[g.jsx($j,{children:G}),Y.map(Q=>g.jsx(zh,{value:Q.id,disabled:(f==null?void 0:f.has(Q.providerId))&&!(u!=null&&u.has(Q.providerId)),children:g.jsxs("span",{className:"flex items-center gap-2",children:[Q.name,g.jsx("span",{className:"text-muted-foreground text-xs",children:Wj(Q.tier)}),(f==null?void 0:f.has(Q.providerId))&&(u==null?void 0:u.has(Q.providerId))&&g.jsx(Kn,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"Sub"}),(f==null?void 0:f.has(Q.providerId))&&!(u!=null&&u.has(Q.providerId))&&g.jsx(Kn,{variant:"outline",className:"text-[10px] px-1 py-0 h-4",children:"OAuth"})]})},Q.id))]},G)}),e[0]=p,e[1]=f,e[2]=u,e[3]=l,e[4]=h,e[5]=n,e[6]=o,e[7]=i,e[8]=v,e[9]=S,e[10]=C,e[11]=w,e[12]=_,e[13]=b,e[14]=y,e[15]=x,e[16]=k}else v=e[8],S=e[9],C=e[10],w=e[11],_=e[12],b=e[13],y=e[14],x=e[15],k=e[16];let N;e[31]!==v||e[32]!==C?(N=g.jsx(v,{children:C}),e[31]=v,e[32]=C,e[33]=N):N=e[33];let A;e[34]!==S||e[35]!==N||e[36]!==w||e[37]!==_||e[38]!==b||e[39]!==y?(A=g.jsxs(S,{value:w,onValueChange:_,disabled:b,children:[y,N]}),e[34]=S,e[35]=N,e[36]=w,e[37]=_,e[38]=b,e[39]=y,e[40]=A):A=e[40];let M;return e[41]!==A||e[42]!==x||e[43]!==k?(M=g.jsxs("div",{className:x,children:[k,A]}),e[41]=A,e[42]=x,e[43]=k,e[44]=M):M=e[44],M}function Kj(t,e){return t[e.providerName]||(t[e.providerName]=[]),t[e.providerName].push(e),t}const Yj={low:"Low",medium:"Medium",high:"High",xhigh:"X-High",minimal:"Minimal",max:"Max"};function Xj(t){return Yj[t]||t.charAt(0).toUpperCase()+t.slice(1)}function Qj(t){const e=me.c(45),{variants:n,selectedVariant:i,onChangeVariant:o,disabled:l,compact:d,iconOnly:a}=t,u=d===void 0?!1:d,f=a===void 0?!1:a,p=u&&!f;if(!n||Object.keys(n).length===0)return null;let h,v,S,C,w,_,b,y,x,k;if(e[0]!==l||e[1]!==f||e[2]!==o||e[3]!==i||e[4]!==p||e[5]!==n){const T=Object.keys(n);let j;e[16]!==o?(j=V=>{o(V==="__none__"?null:V)},e[16]=o,e[17]=j):j=e[17];const O=j;k="flex items-center gap-2",e[18]!==f||e[19]!==p?(S=!f&&g.jsx(Ri,{className:"text-xs text-muted-foreground",children:p?g.jsx(My,{className:"size-3.5"}):"Thinking:"}),e[18]=f,e[19]=p,e[20]=S):S=e[20],v=X1,_=i||"__none__",b=O,y=l;const z=f?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[120px] h-8 text-sm";let q;e[21]!==f?(q=f&&g.jsxs(g.Fragment,{children:[g.jsx(My,{className:"size-4"}),g.jsx(oc,{className:"sr-only"})]}),e[21]=f,e[22]=q):q=e[22];let $;e[23]!==f?($=!f&&g.jsx(oc,{placeholder:"Default"}),e[23]=f,e[24]=$):$=e[24],e[25]!==z||e[26]!==q||e[27]!==$?(x=g.jsxs(Q1,{className:z,children:[q,$]}),e[25]=z,e[26]=q,e[27]=$,e[28]=x):x=e[28],h=Z1,e[29]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(zh,{value:"__none__",children:"Default"}),e[29]=C):C=e[29],w=T.map(Zj),e[0]=l,e[1]=f,e[2]=o,e[3]=i,e[4]=p,e[5]=n,e[6]=h,e[7]=v,e[8]=S,e[9]=C,e[10]=w,e[11]=_,e[12]=b,e[13]=y,e[14]=x,e[15]=k}else h=e[6],v=e[7],S=e[8],C=e[9],w=e[10],_=e[11],b=e[12],y=e[13],x=e[14],k=e[15];let N;e[30]!==h||e[31]!==C||e[32]!==w?(N=g.jsxs(h,{children:[C,w]}),e[30]=h,e[31]=C,e[32]=w,e[33]=N):N=e[33];let A;e[34]!==v||e[35]!==N||e[36]!==_||e[37]!==b||e[38]!==y||e[39]!==x?(A=g.jsxs(v,{value:_,onValueChange:b,disabled:y,children:[x,N]}),e[34]=v,e[35]=N,e[36]=_,e[37]=b,e[38]=y,e[39]=x,e[40]=A):A=e[40];let M;return e[41]!==S||e[42]!==A||e[43]!==k?(M=g.jsxs("div",{className:k,children:[S,A]}),e[41]=S,e[42]=A,e[43]=k,e[44]=M):M=e[44],M}function Zj(t){return g.jsx(zh,{value:t,children:Xj(t)},t)}function Jj(t){const e=me.c(24),{preconfigs:n,selectedPreconfigId:i,onChangePreconfig:o,disabled:l,compact:d,iconOnly:a}=t,u=d===void 0?!1:d,f=a===void 0?!1:a,p=u&&!f;let h;e[0]!==f||e[1]!==p?(h=!f&&g.jsx(Ri,{className:"text-xs text-muted-foreground",children:p?g.jsx(i4,{className:"size-3.5"}):"Config:"}),e[0]=f,e[1]=p,e[2]=h):h=e[2];const v=i||"",S=f?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[140px] h-8 text-sm";let C;e[3]!==f?(C=f&&g.jsxs(g.Fragment,{children:[g.jsx(qx,{className:"size-4"}),g.jsx(oc,{className:"sr-only"})]}),e[3]=f,e[4]=C):C=e[4];let w;e[5]!==f?(w=!f&&g.jsx(oc,{placeholder:"Select config"}),e[5]=f,e[6]=w):w=e[6];let _;e[7]!==S||e[8]!==C||e[9]!==w?(_=g.jsxs(Q1,{className:S,children:[C,w]}),e[7]=S,e[8]=C,e[9]=w,e[10]=_):_=e[10];let b;e[11]!==n?(b=n.map(eO),e[11]=n,e[12]=b):b=e[12];let y;e[13]!==b?(y=g.jsx(Z1,{children:b}),e[13]=b,e[14]=y):y=e[14];let x;e[15]!==l||e[16]!==o||e[17]!==y||e[18]!==v||e[19]!==_?(x=g.jsxs(X1,{value:v,onValueChange:o,disabled:l,children:[_,y]}),e[15]=l,e[16]=o,e[17]=y,e[18]=v,e[19]=_,e[20]=x):x=e[20];let k;return e[21]!==x||e[22]!==h?(k=g.jsxs("div",{className:"flex items-center gap-2",children:[h,x]}),e[21]=x,e[22]=h,e[23]=k):k=e[23],k}function eO(t){return g.jsxs(zh,{value:t.id,children:[t.name,t.isDefault&&g.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},t.id)}function tO(t){var xe;const e=me.c(104),{session:n,preconfigs:i,models:o,usage:l,modelName:d,onChangePreconfig:a,onChangeModel:u,onChangeVariant:f,onRename:p,onNavigateBack:h,isStreaming:v,onInterrupt:S,onCompact:C,isCompacting:w,canCompact:_,connectedProviderIds:b,connectableProviderIds:y,selectedVariant:x,variants:k}=t,[N,A]=D.useState(!1),[M,T]=D.useState(n.title||""),j=D.useRef(null),O=ad(),z=P8();let q,$;e[0]!==N?(q=()=>{N&&j.current&&(j.current.focus(),j.current.select())},$=[N],e[0]=N,e[1]=q,e[2]=$):(q=e[1],$=e[2]),D.useEffect(q,$);let V;e[3]!==n.title?(V=()=>{T(n.title||""),A(!0)},e[3]=n.title,e[4]=V):V=e[4];const K=V;let G;e[5]!==M||e[6]!==p||e[7]!==n.id||e[8]!==n.title?(G=()=>{const ze=M.trim();ze&&ze!==n.title&&p(n.id,ze),A(!1)},e[5]=M,e[6]=p,e[7]=n.id,e[8]=n.title,e[9]=G):G=e[9];const Y=G;let Q;e[10]!==Y||e[11]!==n.title?(Q=ze=>{ze.key==="Enter"?Y():ze.key==="Escape"&&(T(n.title||""),A(!1))},e[10]=Y,e[11]=n.title,e[12]=Q):Q=e[12];const I=Q;let L;e[13]!==d||e[14]!==i||e[15]!==n.preconfigId||e[16]!==n.selectedModel?(L=n.selectedModel||((xe=i.find(ze=>ze.id===n.preconfigId))==null?void 0:xe.model)||d,e[13]=d,e[14]=i,e[15]=n.preconfigId,e[16]=n.selectedModel,e[17]=L):L=e[17];const B=L;let H;if(e[18]!==o||e[19]!==B){let ze;e[21]!==B?(ze=Ve=>Ve.id===B,e[21]=B,e[22]=ze):ze=e[22],H=o.find(ze),e[18]=o,e[19]=B,e[20]=H}else H=e[20];const F=H,J=F==null?void 0:F.contextWindow;let ne;e[23]!==h||e[24]!==n.parentId?(ne=n.parentId&&h&&g.jsxs(Pe,{variant:"ghost",size:"sm",onClick:h,className:"h-7",children:[g.jsx(IE,{className:"size-4","data-icon":"inline-start"}),"Back"]}),e[23]=h,e[24]=n.parentId,e[25]=ne):ne=e[25];let Z;e[26]!==M||e[27]!==I||e[28]!==K||e[29]!==Y||e[30]!==N||e[31]!==n.title?(Z=N?g.jsx("input",{ref:j,type:"text",value:M,onChange:ze=>T(ze.target.value),onBlur:Y,onKeyDown:I,className:"text-lg font-semibold bg-background border border-primary rounded px-2 py-0.5 outline-none min-w-0 flex-1",autoFocus:!0}):g.jsx("h2",{className:"text-lg font-semibold cursor-pointer px-2 py-0.5 -mx-2 rounded hover:bg-accent transition-colors truncate min-w-0",onDoubleClick:K,children:n.title||"Untitled Session"}),e[26]=M,e[27]=I,e[28]=K,e[29]=Y,e[30]=N,e[31]=n.title,e[32]=Z):Z=e[32];let W;e[33]!==n.id?(W=n.id.slice(0,8),e[33]=n.id,e[34]=W):W=e[34];let U;e[35]!==W?(U=g.jsx(Kn,{variant:"outline",className:"font-mono text-xs",children:W}),e[35]=W,e[36]=U):U=e[36];let te;e[37]!==n.status?(te=n.status==="closed"&&g.jsxs(Kn,{variant:"secondary",children:[g.jsx(OE,{className:"size-3","data-icon":"inline-start"}),"Archived"]}),e[37]=n.status,e[38]=te):te=e[38];let ie;e[39]!==U||e[40]!==te||e[41]!==ne||e[42]!==Z?(ie=g.jsx("div",{className:"flex items-center justify-start px-4 py-2 overflow-hidden",children:g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[ne,Z,U,te]})}),e[39]=U,e[40]=te,e[41]=ne,e[42]=Z,e[43]=ie):ie=e[43];let ae;e[44]===Symbol.for("react.memo_cache_sentinel")?(ae=g.jsx(To,{}),e[44]=ae):ae=e[44];let se;e[45]!==J||e[46]!==O||e[47]!==d||e[48]!==l.completionTokens||e[49]!==l.promptTokens||e[50]!==l.totalTokens?(se=g.jsx(Hj,{promptTokens:l.promptTokens,completionTokens:l.completionTokens,totalTokens:l.totalTokens,contextWindow:J,modelName:d,compact:O}),e[45]=J,e[46]=O,e[47]=d,e[48]=l.completionTokens,e[49]=l.promptTokens,e[50]=l.totalTokens,e[51]=se):se=e[51];let ge;e[52]===Symbol.for("react.memo_cache_sentinel")?(ge=g.jsx(To,{orientation:"vertical",className:"hidden sm:block"}),e[52]=ge):ge=e[52];const Te=n.status==="closed"||!!n.parentId;let Me;e[53]!==y||e[54]!==b||e[55]!==z||e[56]!==O||e[57]!==o||e[58]!==u||e[59]!==B||e[60]!==Te?(Me=g.jsx(Gj,{models:o,selectedModelId:B,onChangeModel:u,disabled:Te,compact:z,iconOnly:O,connectedProviderIds:b,connectableProviderIds:y}),e[53]=y,e[54]=b,e[55]=z,e[56]=O,e[57]=o,e[58]=u,e[59]=B,e[60]=Te,e[61]=Me):Me=e[61];const Ke=n.status==="closed"||!!n.parentId;let Re;e[62]!==z||e[63]!==O||e[64]!==f||e[65]!==x||e[66]!==Ke||e[67]!==k?(Re=g.jsx(Qj,{variants:k,selectedVariant:x,onChangeVariant:f,disabled:Ke,compact:z,iconOnly:O}),e[62]=z,e[63]=O,e[64]=f,e[65]=x,e[66]=Ke,e[67]=k,e[68]=Re):Re=e[68];const et=n.status==="closed"||!!n.parentId;let Ze;e[69]!==z||e[70]!==O||e[71]!==a||e[72]!==i||e[73]!==n.preconfigId||e[74]!==et?(Ze=g.jsx(Jj,{preconfigs:i,selectedPreconfigId:n.preconfigId,onChangePreconfig:a,disabled:et,compact:z,iconOnly:O}),e[69]=z,e[70]=O,e[71]=a,e[72]=i,e[73]=n.preconfigId,e[74]=et,e[75]=Ze):Ze=e[75];let Ge;e[76]===Symbol.for("react.memo_cache_sentinel")?(Ge=g.jsx(To,{orientation:"vertical",className:"hidden sm:block"}),e[76]=Ge):Ge=e[76];let rt;e[77]!==_||e[78]!==z||e[79]!==w||e[80]!==v||e[81]!==C?(rt=C&&g.jsxs(g.Fragment,{children:[g.jsxs(Pe,{variant:"outline",size:z?"icon":"sm",onClick:C,disabled:v||w||!_,title:w?"Compacting...":"Compact older messages",children:[g.jsx(Hx,{className:"size-4"}),!z&&g.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),g.jsx(To,{orientation:"vertical",className:"hidden sm:block"})]}),e[77]=_,e[78]=z,e[79]=w,e[80]=v,e[81]=C,e[82]=rt):rt=e[82];const ue=v?"destructive":"outline",ct=z?"icon":"sm",it=!S,ut=v?"":"opacity-60 hover:opacity-100",ce=v?"Interrupt operation":"Interrupt (no active operation)";let be;e[83]===Symbol.for("react.memo_cache_sentinel")?(be=g.jsx(Wx,{className:"size-4"}),e[83]=be):be=e[83];let ke;e[84]!==z?(ke=!z&&g.jsx("span",{className:"ml-1",children:"Stop"}),e[84]=z,e[85]=ke):ke=e[85];let je;e[86]!==S||e[87]!==ue||e[88]!==ct||e[89]!==it||e[90]!==ut||e[91]!==ce||e[92]!==ke?(je=g.jsxs(Pe,{variant:ue,size:ct,onClick:S,disabled:it,className:ut,title:ce,children:[be,ke]}),e[86]=S,e[87]=ue,e[88]=ct,e[89]=it,e[90]=ut,e[91]=ce,e[92]=ke,e[93]=je):je=e[93];let Le;e[94]!==se||e[95]!==Me||e[96]!==Re||e[97]!==Ze||e[98]!==rt||e[99]!==je?(Le=g.jsxs("div",{className:"inline-flex align-middle items-center gap-3 sm:gap-4 px-4 py-2 flex-wrap",children:[se,ge,Me,Re,Ze,Ge,rt,je]}),e[94]=se,e[95]=Me,e[96]=Re,e[97]=Ze,e[98]=rt,e[99]=je,e[100]=Le):Le=e[100];let lt;return e[101]!==ie||e[102]!==Le?(lt=g.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[ie,ae,Le]}),e[101]=ie,e[102]=Le,e[103]=lt):lt=e[103],lt}function nO(t){const e=me.c(46),{message:n,textContent:i,children:o,isQueued:l,onRemove:d,onRevert:a,canRevert:u,onFork:f,canFork:p}=t,h=l===void 0?!1:l,v=u===void 0?!1:u,S=p===void 0?!1:p,[C,w]=D.useState(!1),[_,b]=D.useState(!1),[y,x]=D.useState(!1),k=n.role==="user";let N;e[0]!==i?(N=async()=>{const F=i||"";await navigator.clipboard.writeText(F),w(!0),setTimeout(()=>w(!1),2e3)},e[0]=i,e[1]=N):N=e[1];const A=N,M=k?"items-end":"items-start";let T;e[2]!==M?(T=Ee("flex flex-col gap-1 mb-4 animate-slide-up min-w-0",M),e[2]=M,e[3]=T):T=e[3];const j=k?"mr-3":"ml-3";let O;e[4]!==j?(O=Ee("flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",j),e[4]=j,e[5]=O):O=e[5];let z;e[6]!==S||e[7]!==v||e[8]!==C||e[9]!==A||e[10]!==h||e[11]!==k||e[12]!==n.role||e[13]!==f||e[14]!==a?(z=k?g.jsxs(g.Fragment,{children:[!h&&g.jsxs(g.Fragment,{children:[v&&a&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>b(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Revert to this point",children:g.jsx(g5,{className:"size-3"})}),S&&f&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>x(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Fork from this point",children:g.jsx(b4,{className:"size-3"})}),g.jsx(Pe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ls,{className:"size-3"}):g.jsx(Mu,{className:"size-3"})})]}),g.jsx(Gx,{className:"size-3"}),n.role]}):g.jsxs(g.Fragment,{children:[g.jsx(zE,{className:"size-3"}),n.role,g.jsx(Pe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ls,{className:"size-3"}):g.jsx(Mu,{className:"size-3"})})]}),e[6]=S,e[7]=v,e[8]=C,e[9]=A,e[10]=h,e[11]=k,e[12]=n.role,e[13]=f,e[14]=a,e[15]=z):z=e[15];let q;e[16]!==O||e[17]!==z?(q=g.jsx("div",{className:O,children:z}),e[16]=O,e[17]=z,e[18]=q):q=e[18];const $=h?"bg-muted border-2 border-dashed border-muted-foreground/30 opacity-80":k?"bg-primary text-primary-foreground rounded-br-md":"bg-card text-card-foreground border border-border rounded-bl-md";let V;e[19]!==$?(V=Ee("rounded-2xl px-4 py-3 max-w-full relative group min-w-0 overflow-hidden",$),e[19]=$,e[20]=V):V=e[20];let K;e[21]!==h||e[22]!==d?(K=h&&g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2 pb-2 border-b border-muted-foreground/20",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx(Px,{className:"size-3 animate-pulse"}),g.jsx("span",{children:"Pending"})]}),d&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:d,className:"size-6 text-muted-foreground hover:text-destructive hover:bg-destructive/10",title:"Remove from queue",children:g.jsx(Os,{className:"size-3"})})]}),e[21]=h,e[22]=d,e[23]=K):K=e[23];let G;e[24]!==o?(G=g.jsx("div",{className:"min-w-0",children:o}),e[24]=o,e[25]=G):G=e[25];let Y;e[26]!==V||e[27]!==K||e[28]!==G?(Y=g.jsxs("div",{className:V,children:[K,G]}),e[26]=V,e[27]=K,e[28]=G,e[29]=Y):Y=e[29];let Q;e[30]!==a?(Q=()=>{a==null||a()},e[30]=a,e[31]=Q):Q=e[31];let I;e[32]!==_||e[33]!==Q?(I=g.jsx(Ug,{open:_,onOpenChange:b,title:"Revert Conversation",description:"This will delete this message and all messages after it. Are you sure you want to continue?",confirmLabel:"Revert",cancelLabel:"Cancel",onConfirm:Q,variant:"destructive"}),e[32]=_,e[33]=Q,e[34]=I):I=e[34];let L;e[35]!==f?(L=()=>{f==null||f()},e[35]=f,e[36]=L):L=e[36];let B;e[37]!==y||e[38]!==L?(B=g.jsx(Ug,{open:y,onOpenChange:x,title:"Fork Conversation",description:"This will create a new session with messages up to and including this point. The original session will be unchanged.",confirmLabel:"Fork",cancelLabel:"Cancel",onConfirm:L}),e[37]=y,e[38]=L,e[39]=B):B=e[39];let H;return e[40]!==q||e[41]!==Y||e[42]!==I||e[43]!==B||e[44]!==T?(H=g.jsxs("div",{className:T,children:[q,Y,I,B]}),e[40]=q,e[41]=Y,e[42]=I,e[43]=B,e[44]=T,e[45]=H):H=e[45],H}var rO=Object.create,Ph=Object.defineProperty,iO=Object.defineProperties,sO=Object.getOwnPropertyDescriptor,oO=Object.getOwnPropertyDescriptors,FC=Object.getOwnPropertyNames,Yf=Object.getOwnPropertySymbols,aO=Object.getPrototypeOf,J1=Object.prototype.hasOwnProperty,HC=Object.prototype.propertyIsEnumerable,jb=(t,e,n)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ji=(t,e)=>{for(var n in e||(e={}))J1.call(e,n)&&jb(t,n,e[n]);if(Yf)for(var n of Yf(e))HC.call(e,n)&&jb(t,n,e[n]);return t},Fh=(t,e)=>iO(t,oO(e)),UC=(t,e)=>{var n={};for(var i in t)J1.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Yf)for(var i of Yf(t))e.indexOf(i)<0&&HC.call(t,i)&&(n[i]=t[i]);return n},lO=(t,e)=>function(){return e||(0,t[FC(t)[0]])((e={exports:{}}).exports,e),e.exports},cO=(t,e)=>{for(var n in e)Ph(t,n,{get:e[n],enumerable:!0})},uO=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of FC(e))!J1.call(t,o)&&o!==n&&Ph(t,o,{get:()=>e[o],enumerable:!(i=sO(e,o))||i.enumerable});return t},dO=(t,e,n)=>(n=t!=null?rO(aO(t)):{},uO(!t||!t.__esModule?Ph(n,"default",{value:t,enumerable:!0}):n,t)),fO=lO({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(t,e){var n=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},d={util:{encode:function C(w){return w instanceof a?new a(w.type,C(w.content),w.alias):Array.isArray(w)?w.map(C):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++o}),C.__id},clone:function C(w,_){_=_||{};var b,y;switch(d.util.type(w)){case"Object":if(y=d.util.objId(w),_[y])return _[y];b={},_[y]=b;for(var x in w)w.hasOwnProperty(x)&&(b[x]=C(w[x],_));return b;case"Array":return y=d.util.objId(w),_[y]?_[y]:(b=[],_[y]=b,w.forEach(function(k,N){b[N]=C(k,_)}),b);default:return w}},getLanguage:function(C){for(;C;){var w=i.exec(C.className);if(w)return w[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,w){C.className=C.className.replace(RegExp(i,"gi"),""),C.classList.add("language-"+w)},isActive:function(C,w,_){for(var b="no-"+w;C;){var y=C.classList;if(y.contains(w))return!0;if(y.contains(b))return!1;C=C.parentElement}return!!_}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(C,w){var _=d.util.clone(d.languages[C]);for(var b in w)_[b]=w[b];return _},insertBefore:function(C,w,_,b){b=b||d.languages;var y=b[C],x={};for(var k in y)if(y.hasOwnProperty(k)){if(k==w)for(var N in _)_.hasOwnProperty(N)&&(x[N]=_[N]);_.hasOwnProperty(k)||(x[k]=y[k])}var A=b[C];return b[C]=x,d.languages.DFS(d.languages,function(M,T){T===A&&M!=C&&(this[M]=x)}),x},DFS:function C(w,_,b,y){y=y||{};var x=d.util.objId;for(var k in w)if(w.hasOwnProperty(k)){_.call(w,k,w[k],b||k);var N=w[k],A=d.util.type(N);A==="Object"&&!y[x(N)]?(y[x(N)]=!0,C(N,_,null,y)):A==="Array"&&!y[x(N)]&&(y[x(N)]=!0,C(N,_,k,y))}}},plugins:{},highlight:function(C,w,_){var b={code:C,grammar:w,language:_};if(d.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=d.tokenize(b.code,b.grammar),d.hooks.run("after-tokenize",b),a.stringify(d.util.encode(b.tokens),b.language)},tokenize:function(C,w){var _=w.rest;if(_){for(var b in _)w[b]=_[b];delete w.rest}var y=new p;return h(y,y.head,C),f(C,y,w,y.head,0),S(y)},hooks:{all:{},add:function(C,w){var _=d.hooks.all;_[C]=_[C]||[],_[C].push(w)},run:function(C,w){var _=d.hooks.all[C];if(!(!_||!_.length))for(var b=0,y;y=_[b++];)y(w)}},Token:a};function a(C,w,_,b){this.type=C,this.content=w,this.alias=_,this.length=(b||"").length|0}a.stringify=function C(w,_){if(typeof w=="string")return w;if(Array.isArray(w)){var b="";return w.forEach(function(A){b+=C(A,_)}),b}var y={type:w.type,content:C(w.content,_),tag:"span",classes:["token",w.type],attributes:{},language:_},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(y.classes,x):y.classes.push(x)),d.hooks.run("wrap",y);var k="";for(var N in y.attributes)k+=" "+N+'="'+(y.attributes[N]||"").replace(/"/g,"&quot;")+'"';return"<"+y.tag+' class="'+y.classes.join(" ")+'"'+k+">"+y.content+"</"+y.tag+">"};function u(C,w,_,b){C.lastIndex=w;var y=C.exec(_);if(y&&b&&y[1]){var x=y[1].length;y.index+=x,y[0]=y[0].slice(x)}return y}function f(C,w,_,b,y,x){for(var k in _)if(!(!_.hasOwnProperty(k)||!_[k])){var N=_[k];N=Array.isArray(N)?N:[N];for(var A=0;A<N.length;++A){if(x&&x.cause==k+","+A)return;var M=N[A],T=M.inside,j=!!M.lookbehind,O=!!M.greedy,z=M.alias;if(O&&!M.pattern.global){var q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,q+"g")}for(var $=M.pattern||M,V=b.next,K=y;V!==w.tail&&!(x&&K>=x.reach);K+=V.value.length,V=V.next){var G=V.value;if(w.length>C.length)return;if(!(G instanceof a)){var Y=1,Q;if(O){if(Q=u($,K,C,j),!Q||Q.index>=C.length)break;var H=Q.index,I=Q.index+Q[0].length,L=K;for(L+=V.value.length;H>=L;)V=V.next,L+=V.value.length;if(L-=V.value.length,K=L,V.value instanceof a)continue;for(var B=V;B!==w.tail&&(L<I||typeof B.value=="string");B=B.next)Y++,L+=B.value.length;Y--,G=C.slice(K,L),Q.index-=K}else if(Q=u($,0,G,j),!Q)continue;var H=Q.index,F=Q[0],J=G.slice(0,H),ne=G.slice(H+F.length),Z=K+G.length;x&&Z>x.reach&&(x.reach=Z);var W=V.prev;J&&(W=h(w,W,J),K+=J.length),v(w,W,Y);var U=new a(k,T?d.tokenize(F,T):F,z,F);if(V=h(w,W,U),ne&&h(w,V,ne),Y>1){var te={cause:k+","+A,reach:Z};f(C,w,_,V.prev,K,te),x&&te.reach>x.reach&&(x.reach=te.reach)}}}}}}function p(){var C={value:null,prev:null,next:null},w={value:null,prev:C,next:null};C.next=w,this.head=C,this.tail=w,this.length=0}function h(C,w,_){var b=w.next,y={value:_,prev:w,next:b};return w.next=y,b.prev=y,C.length++,y}function v(C,w,_){for(var b=w.next,y=0;y<_&&b!==C.tail;y++)b=b.next;w.next=b,b.prev=w,C.length-=y}function S(C){for(var w=[],_=C.head.next;_!==C.tail;)w.push(_.value),_=_.next;return w}return d})();e.exports=n,n.default=n}}),Ce=dO(fO());Ce.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Ce.languages.markup.tag.inside["attr-value"].inside.entity=Ce.languages.markup.entity,Ce.languages.markup.doctype.inside["internal-subset"].inside=Ce.languages.markup,Ce.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&amp;/,"&"))}),Object.defineProperty(Ce.languages.markup.tag,"addInlined",{value:function(t,i){var n={},n=(n["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Ce.languages[i]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),i=(n["language-"+i]={pattern:/[\s\S]+/,inside:Ce.languages[i]},{});i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},Ce.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Ce.languages.markup.tag,"addAttribute",{value:function(t,e){Ce.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Ce.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Ce.languages.html=Ce.languages.markup,Ce.languages.mathml=Ce.languages.markup,Ce.languages.svg=Ce.languages.markup,Ce.languages.xml=Ce.languages.extend("markup",{}),Ce.languages.ssml=Ce.languages.xml,Ce.languages.atom=Ce.languages.xml,Ce.languages.rss=Ce.languages.xml,(function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+n.source+")",i=RegExp(i+"-"+i),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(Ce),Ce.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Ce.languages.javascript=Ce.languages.extend("clike",{"class-name":[Ce.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Ce.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Ce.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Ce.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Ce.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Ce.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Ce.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Ce.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Ce.languages.markup&&(Ce.languages.markup.tag.addInlined("script","javascript"),Ce.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Ce.languages.js=Ce.languages.javascript,Ce.languages.actionscript=Ce.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),Ce.languages.actionscript["class-name"].alias="function",delete Ce.languages.actionscript.parameter,delete Ce.languages.actionscript["literal-property"],Ce.languages.markup&&Ce.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Ce.languages.markup}}),(function(t){var e=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:e,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:e,interpolation:n}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript})(Ce),(function(t){var e=t.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(n,i){(n=typeof n=="string"?[n]:n).forEach(function(o){var l=function(h){h.inside||(h.inside={}),h.inside.rest=i},d="doc-comment";if(a=t.languages[o]){var a,u=a[d];if((u=u||(a=t.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[d])instanceof RegExp&&(u=a[d]={pattern:u}),Array.isArray(u))for(var f=0,p=u.length;f<p;f++)u[f]instanceof RegExp&&(u[f]={pattern:u[f]}),l(u[f]);else l(u)}})}}),e.addSupport(["java","javascript","php"],e)})(Ce),(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e=(t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css,t.languages.markup);e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(Ce),(function(t){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,e=(t.languages.css.selector={pattern:t.languages.css.selector.pattern,lookbehind:!0,inside:e={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+e.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[e,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=e,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:e,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:e,number:n})})(Ce),(function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+n.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function d(a,u){u=(u||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return a});return RegExp(f,u)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:d(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:d(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:d(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:d(l),lookbehind:!0,greedy:!0},number:{pattern:d(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Ce),(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,d=(t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+l+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+l+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(p){f!==p&&(t.languages.markdown[f].inside.content.inside[p]=t.languages.markdown[p])})}),t.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||(function p(h){if(h&&typeof h!="string")for(var v=0,S=h.length;v<S;v++){var C,w=h[v];w.type!=="code"?p(w.content):(C=w.content[1],w=w.content[3],C&&w&&C.type==="code-language"&&w.type==="code-block"&&typeof C.content=="string"&&(C=C.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),C="language-"+(C=(/[a-z][\w-]*/i.exec(C)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,C]:w.alias.push(C):w.alias=[C]))}})(f.tokens)}),t.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var p="",h=0,v=f.classes.length;h<v;h++){var S=f.classes[h],S=/language-(.+)/.exec(S);if(S){p=S[1];break}}var C,w=t.languages[p];w?f.content=t.highlight((function(_){return _=_.replace(d,""),_=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(b,y){var x;return(y=y.toLowerCase())[0]==="#"?(x=y[1]==="x"?parseInt(y.slice(2),16):Number(y.slice(1)),u(x)):a[y]||b})})(f.content),w,p):p&&p!=="none"&&t.plugins.autoloader&&(C="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=C,t.plugins.autoloader.loadLanguages(p,function(){var _=document.getElementById(C);_&&(_.innerHTML=t.highlight(_.textContent,t.languages[p],p))}))}}),RegExp(t.languages.markup.tag.pattern.source,"gi")),a={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown})(Ce),Ce.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Ce.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Ce.hooks.add("after-tokenize",function(t){if(t.language==="graphql")for(var e=t.tokens.filter(function(C){return typeof C!="string"&&C.type!=="comment"&&C.type!=="scalar"}),n=0;n<e.length;){var i=e[n++];if(i.type==="keyword"&&i.content==="mutation"){var o=[];if(h(["definition-mutation","punctuation"])&&p(1).content==="("){n+=2;var l=v(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var d=p(0);d.type==="variable"&&(S(d,"variable-input"),o.push(d.content))}n=l+1}if(h(["punctuation","property-query"])&&p(0).content==="{"&&(n++,S(p(0),"property-mutation"),0<o.length)){var a=v(/^\{$/,/^\}$/);if(a!==-1)for(var u=n;u<a;u++){var f=e[u];f.type==="variable"&&0<=o.indexOf(f.content)&&S(f,"variable-input")}}}}function p(C){return e[n+C]}function h(C,w){w=w||0;for(var _=0;_<C.length;_++){var b=p(_+w);if(!b||b.type!==C[_])return}return 1}function v(C,w){for(var _=1,b=n;b<e.length;b++){var y=e[b],x=y.content;if(y.type==="punctuation"&&typeof x=="string"){if(C.test(x))_++;else if(w.test(x)&&--_===0)return b}}return-1}function S(C,w){var _=C.alias;_?Array.isArray(_)||(C.alias=_=[_]):C.alias=_=[],_.push(w)}}),Ce.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(t){var e=t.languages.javascript["template-string"],n=e.pattern.source,i=e.inside.interpolation,o=i.inside["interpolation-punctuation"],l=i.pattern.source;function d(h,v){if(t.languages[h])return{pattern:RegExp("((?:"+v+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,v,S){return h={code:h,grammar:v,language:S},t.hooks.run("before-tokenize",h),h.tokens=t.tokenize(h.code,h.grammar),t.hooks.run("after-tokenize",h),h.tokens}function u(h,v,S){var _=t.tokenize(h,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),C=0,w={},_=a(_.map(function(y){if(typeof y=="string")return y;for(var x,k,y=y.content;h.indexOf((k=C++,x="___"+S.toUpperCase()+"_"+k+"___"))!==-1;);return w[x]=y,x}).join(""),v,S),b=Object.keys(w);return C=0,(function y(x){for(var k=0;k<x.length;k++){if(C>=b.length)return;var N,A,M,T,j,O,z,q=x[k];typeof q=="string"||typeof q.content=="string"?(N=b[C],(z=(O=typeof q=="string"?q:q.content).indexOf(N))!==-1&&(++C,A=O.substring(0,z),j=w[N],M=void 0,(T={})["interpolation-punctuation"]=o,(T=t.tokenize(j,T)).length===3&&((M=[1,1]).push.apply(M,a(T[1],t.languages.javascript,"javascript")),T.splice.apply(T,M)),M=new t.Token("interpolation",T,i.alias,j),T=O.substring(z+N.length),j=[],A&&j.push(A),j.push(M),T&&(y(O=[T]),j.push.apply(j,O)),typeof q=="string"?(x.splice.apply(x,[k,1].concat(j)),k+=j.length-1):q.content=j)):(z=q.content,Array.isArray(z)?y(z):y([z]))}})(_),new t.Token(S,_,"language-"+S,h)}t.languages.javascript["template-string"]=[d("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),d("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),d("svg",/\bsvg/.source),d("markdown",/\b(?:markdown|md)/.source),d("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),d("sql",/\bsql/.source),e].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(h){return typeof h=="string"?h:Array.isArray(h)?h.map(p).join(""):p(h.content)}t.hooks.add("after-tokenize",function(h){h.language in f&&(function v(S){for(var C=0,w=S.length;C<w;C++){var _,b,y,x=S[C];typeof x!="string"&&(_=x.content,Array.isArray(_)?x.type==="template-string"?(x=_[1],_.length===3&&typeof x!="string"&&x.type==="embedded-code"&&(b=p(x),x=x.alias,x=Array.isArray(x)?x[0]:x,y=t.languages[x])&&(_[1]=u(b,y,x))):v(_):typeof _!="string"&&v([_]))}})(h.tokens)})})(Ce),(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Ce),(function(t){var e=t.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";t.languages.jsdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:e,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:e.string,number:e.number,boolean:e.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)})(Ce),(function(t){t.languages.flow=t.languages.extend("javascript",{}),t.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),t.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete t.languages.flow.parameter,t.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(t.languages.flow.keyword)||(t.languages.flow.keyword=[t.languages.flow.keyword]),t.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(Ce),Ce.languages.n4js=Ce.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),Ce.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),Ce.languages.n4jsd=Ce.languages.n4js,(function(t){function e(d,a){return RegExp(d.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),a)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),t.languages.insertBefore("javascript","keyword",{imports:{pattern:e(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:e(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],i=0;i<n.length;i++){var l=n[i],o=t.languages.javascript[l],l=(o=t.util.type(o)==="RegExp"?t.languages.javascript[l]={pattern:o}:o).inside||{};(o.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(Ce),(function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(u,f){return u=u.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(u,f)}o=l(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);function d(u){for(var f=[],p=0;p<u.length;p++){var h=u[p],v=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===a(h.content[0].content[1])&&f.pop():h.content[h.content.length-1].content!=="/>"&&f.push({tagName:a(h.content[0].content[1]),openedBraces:0}):0<f.length&&h.type==="punctuation"&&h.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?f[f.length-1].openedBraces--:v=!0),(v||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(v=a(h),p<u.length-1&&(typeof u[p+1]=="string"||u[p+1].type==="plain-text")&&(v+=a(u[p+1]),u.splice(p+1,1)),0<p&&(typeof u[p-1]=="string"||u[p-1].type==="plain-text")&&(v=a(u[p-1])+v,u.splice(p-1,1),p--),u[p]=new t.Token("plain-text",v,null,v)),h.content&&typeof h.content!="string"&&d(h.content)}}var a=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(a).join(""):""};t.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||d(u.tokens)})})(Ce),(function(t){var e=t.util.clone(t.languages.typescript),e=(t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"],t.languages.tsx.tag);e.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+e.pattern.source+")",e.pattern.flags),e.lookbehind=!0})(Ce),Ce.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Ce.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Ce.languages.swift}),(function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin})(Ce),Ce.languages.c=Ce.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Ce.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Ce.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Ce.languages.c.string],char:Ce.languages.c.char,comment:Ce.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Ce.languages.c}}}}),Ce.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Ce.languages.c.boolean,Ce.languages.objectivec=Ce.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Ce.languages.objectivec["class-name"],Ce.languages.objc=Ce.languages.objectivec,Ce.languages.reason=Ce.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),Ce.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Ce.languages.reason.function,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Ce),Ce.languages.go=Ce.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Ce.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Ce.languages.go["class-name"],(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Ce),Ce.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Ce.languages.python["string-interpolation"].inside.interpolation.inside.rest=Ce.languages.python,Ce.languages.py=Ce.languages.python,Ce.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Ce.languages.webmanifest=Ce.languages.json;var Uu={};cO(Uu,{dracula:()=>pO,duotoneDark:()=>gO,duotoneLight:()=>_O,github:()=>bO,gruvboxMaterialDark:()=>YO,gruvboxMaterialLight:()=>QO,jettwaveDark:()=>HO,jettwaveLight:()=>$O,nightOwl:()=>SO,nightOwlLight:()=>CO,oceanicNext:()=>EO,okaidia:()=>RO,oneDark:()=>VO,oneLight:()=>GO,palenight:()=>NO,shadesOfPurple:()=>MO,synthwave84:()=>OO,ultramin:()=>IO,vsDark:()=>$C,vsLight:()=>PO});var hO={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},pO=hO,mO={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},gO=mO,vO={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},_O=vO,yO={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},bO=yO,xO={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},SO=xO,wO={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},CO=wO,Lr={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},kO={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Lr.keyword}},{types:["attr-value"],style:{color:Lr.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Lr.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Lr.primitive}},{types:["boolean"],style:{color:Lr.boolean}},{types:["tag"],style:{color:Lr.tag}},{types:["string"],style:{color:Lr.string}},{types:["punctuation"],style:{color:Lr.string}},{types:["selector","char","builtin","inserted"],style:{color:Lr.char}},{types:["function"],style:{color:Lr.function}},{types:["operator","entity","url","variable"],style:{color:Lr.variable}},{types:["keyword"],style:{color:Lr.keyword}},{types:["atrule","class-name"],style:{color:Lr.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},EO=kO,AO={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},RO=AO,TO={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},NO=TO,DO={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},MO=DO,jO={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},OO=jO,LO={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},IO=LO,BO={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},$C=BO,zO={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},PO=zO,FO={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},HO=FO,UO={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},$O=UO,qO={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},VO=qO,WO={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},GO=WO,KO={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},YO=KO,XO={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},QO=XO,ZO=t=>D.useCallback(e=>{var n=e,{className:i,style:o,line:l}=n,d=UC(n,["className","style","line"]);const a=Fh(Ji({},d),{className:rh("token-line",i)});return typeof t=="object"&&"plain"in t&&(a.style=t.plain),typeof o=="object"&&(a.style=Ji(Ji({},a.style||{}),o)),a},[t]),JO=t=>{const e=D.useCallback(({types:n,empty:i})=>{if(t!=null){{if(n.length===1&&n[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(n.length===1&&i!=null)return t[n[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...n.map(o=>t[o]))}},[t]);return D.useCallback(n=>{var i=n,{token:o,className:l,style:d}=i,a=UC(i,["token","className","style"]);const u=Fh(Ji({},a),{className:rh("token",...o.types,l),children:o.content,style:e(o)});return d!=null&&(u.style=Ji(Ji({},u.style||{}),d)),u},[e])},e7=/\r\n|\r|\n/,Ob=t=>{t.length===0?t.push({types:["plain"],content:`
519
- `,empty:!0}):t.length===1&&t[0].content===""&&(t[0].content=`
520
- `,t[0].empty=!0)},Lb=(t,e)=>{const n=t.length;return n>0&&t[n-1]===e?t:t.concat(e)},t7=t=>{const e=[[]],n=[t],i=[0],o=[t.length];let l=0,d=0,a=[];const u=[a];for(;d>-1;){for(;(l=i[d]++)<o[d];){let f,p=e[d];const v=n[d][l];if(typeof v=="string"?(p=d>0?p:["plain"],f=v):(p=Lb(p,v.type),v.alias&&(p=Lb(p,v.alias)),f=v.content),typeof f!="string"){d++,e.push(p),n.push(f),i.push(0),o.push(f.length);continue}const S=f.split(e7),C=S.length;a.push({types:p,content:S[0]});for(let w=1;w<C;w++)Ob(a),u.push(a=[]),a.push({types:p,content:S[w]})}d--,e.pop(),n.pop(),i.pop(),o.pop()}return Ob(a),u},Ib=t7,n7=({prism:t,code:e,grammar:n,language:i})=>D.useMemo(()=>{if(n==null)return Ib([e]);const o={code:e,grammar:n,language:i,tokens:[]};return t.hooks.run("before-tokenize",o),o.tokens=t.tokenize(e,n),t.hooks.run("after-tokenize",o),Ib(o.tokens)},[e,n,i,t]),r7=(t,e)=>{const{plain:n}=t,i=t.styles.reduce((o,l)=>{const{languages:d,style:a}=l;return d&&!d.includes(e)||l.types.forEach(u=>{const f=Ji(Ji({},o[u]),a);o[u]=f}),o},{});return i.root=n,i.plain=Fh(Ji({},n),{backgroundColor:void 0}),i},i7=r7,s7=({children:t,language:e,code:n,theme:i,prism:o})=>{const l=e.toLowerCase(),d=i7(i,l),a=ZO(d),u=JO(d),f=o.languages[l],p=n7({prism:o,language:l,code:n,grammar:f});return t({tokens:p,className:`prism-code language-${l}`,style:d!=null?d.root:{},getLineProps:a,getTokenProps:u})},ev=t=>D.createElement(s7,Fh(Ji({},t),{prism:t.prism||Ce,theme:t.theme||$C,code:t.code,language:t.language}));/*! Bundled license information:
521
-
522
- prismjs/prism.js:
523
- (**
524
- * Prism: Lightweight, robust, elegant syntax highlighting
525
- *
526
- * @license MIT <https://opensource.org/licenses/MIT>
527
- * @author Lea Verou <https://lea.verou.me>
528
- * @namespace
529
- * @public
530
- *)
531
- */function o7(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}function a7(t){const e=me.c(28),{type:n,content:i,lineNumber:o,newLineNumber:l,language:d}=t,a=n==="added"&&"bg-green-500/20",u=n==="removed"&&"bg-red-500/20",f=n==="context"&&"bg-muted/30";let p;e[0]!==a||e[1]!==u||e[2]!==f?(p=Ee("flex font-mono text-xs",a,u,f),e[0]=a,e[1]=u,e[2]=f,e[3]=p):p=e[3];const h=p,v=n==="added"&&"text-green-400",S=n==="removed"&&"text-red-400",C=n==="context"&&"text-muted-foreground/50";let w;e[4]!==v||e[5]!==S||e[6]!==C?(w=Ee("font-bold w-4 select-none",v,S,C),e[4]=v,e[5]=S,e[6]=C,e[7]=w):w=e[7];const _=w,b=o!=null?o:"";let y;e[8]!==b?(y=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:b}),e[8]=b,e[9]=y):y=e[9];const x=l!=null?l:"";let k;e[10]!==x?(k=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:x}),e[10]=x,e[11]=k):k=e[11];const N=n==="added"&&"+",A=n==="removed"&&"-",M=n==="context"&&" ";let T;e[12]!==_||e[13]!==N||e[14]!==A||e[15]!==M?(T=g.jsxs("span",{className:_,children:[N,A,M]}),e[12]=_,e[13]=N,e[14]=A,e[15]=M,e[16]=T):T=e[16];let j;e[17]!==i||e[18]!==d?(j=g.jsx(ev,{theme:Uu.oneDark,code:i,language:d,children:l7}),e[17]=i,e[18]=d,e[19]=j):j=e[19];let O;e[20]!==T||e[21]!==j?(O=g.jsxs("span",{className:"pl-2 flex-1 whitespace-pre flex",children:[T,j]}),e[20]=T,e[21]=j,e[22]=O):O=e[22];let z;return e[23]!==y||e[24]!==k||e[25]!==O||e[26]!==h?(z=g.jsxs("div",{className:h,children:[y,k,O]}),e[23]=y,e[24]=k,e[25]=O,e[26]=h,e[27]=z):z=e[27],z}function l7(t){const{tokens:e,getTokenProps:n}=t;return g.jsx(g.Fragment,{children:e.map((i,o)=>g.jsx("span",{children:i.map((l,d)=>g.jsx("span",{...n({token:l})},d))},o))})}function qC(t){const e=me.c(27),{hunks:n,path:i,language:o,additions:l,deletions:d}=t,[a,u]=D.useState(!0);let f;e[0]!==i||e[1]!==o?(f=o||o7(i),e[0]=i,e[1]=o,e[2]=f):f=e[2];const p=f;let h;e[3]!==a?(h=()=>u(!a),e[3]=a,e[4]=h):h=e[4];let v;e[5]!==a?(v=a?g.jsx(lc,{className:"size-3"}):g.jsx(Ni,{className:"size-3"}),e[5]=a,e[6]=v):v=e[6];let S;e[7]!==h||e[8]!==v?(S=g.jsx("button",{onClick:h,className:"px-1 py-1 hover:bg-muted rounded",children:v}),e[7]=h,e[8]=v,e[9]=S):S=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(i1,{className:"size-3"}),e[10]=C):C=e[10];let w;e[11]!==i?(w=g.jsx("span",{className:"font-mono pr-2",children:i}),e[11]=i,e[12]=w):w=e[12];let _;e[13]!==l||e[14]!==d?(_=l!==void 0&&d!==void 0&&g.jsxs("span",{className:"ml-auto mr-2 text-muted-foreground",children:["+",l," -",d]}),e[13]=l,e[14]=d,e[15]=_):_=e[15];let b;e[16]!==S||e[17]!==w||e[18]!==_?(b=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[S,C,w,_]}),e[16]=S,e[17]=w,e[18]=_,e[19]=b):b=e[19];let y;e[20]!==a||e[21]!==n||e[22]!==p?(y=a&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:n.map((k,N)=>g.jsx("div",{className:"divide-y divide-white/5",children:k.changes.map((A,M)=>g.jsx(a7,{...A,language:p},M))},N))}),e[20]=a,e[21]=n,e[22]=p,e[23]=y):y=e[23];let x;return e[24]!==b||e[25]!==y?(x=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[b,y]})}),e[24]=b,e[25]=y,e[26]=x):x=e[26],x}function c7(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}const u7=t=>{const e=me.c(31),{content:n,path:i,language:o,created:l,highlightLines:d}=t;let a;e[0]!==d?(a=d===void 0?[]:d,e[0]=d,e[1]=a):a=e[1];const u=a,[f,p]=D.useState(!0);let h;e[2]!==o||e[3]!==i?(h=o||c7(i),e[2]=o,e[3]=i,e[4]=h):h=e[4];const v=h;let S;e[5]!==u?(S=new Set(u),e[5]=u,e[6]=S):S=e[6];const C=S;let w;e[7]!==f?(w=()=>p(!f),e[7]=f,e[8]=w):w=e[8];let _;e[9]!==f?(_=f?g.jsx(lc,{className:"size-3"}):g.jsx(Ni,{className:"size-3"}),e[9]=f,e[10]=_):_=e[10];let b;e[11]!==w||e[12]!==_?(b=g.jsx("button",{onClick:w,className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:_}),e[11]=w,e[12]=_,e[13]=b):b=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(i1,{className:"size-3"}),e[14]=y):y=e[14];let x;e[15]!==i?(x=g.jsx("span",{className:"font-mono pr-2",children:i}),e[15]=i,e[16]=x):x=e[16];let k;e[17]!==l?(k=l===!1?g.jsxs("span",{className:"flex items-center gap-1 text-warning ml-auto mr-2",children:[g.jsx(Ru,{className:"size-3"}),"Overwrote"]}):g.jsxs("span",{className:"flex items-center gap-1 text-success ml-auto mr-2",children:[g.jsx(Ls,{className:"size-3"}),"Created"]}),e[17]=l,e[18]=k):k=e[18];let N;e[19]!==k||e[20]!==b||e[21]!==x?(N=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[b,y,x,k]}),e[19]=k,e[20]=b,e[21]=x,e[22]=N):N=e[22];let A;e[23]!==n||e[24]!==v||e[25]!==f||e[26]!==C?(A=f&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:g.jsx(ev,{theme:Uu.oneDark,code:n,language:v,children:T=>{const{tokens:j,getTokenProps:O}=T;return g.jsx(g.Fragment,{children:j.map((z,q)=>g.jsxs("div",{className:`flex font-mono text-xs ${C.has(q+1)?"bg-yellow-500/20":""}`,children:[g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:q+1}),g.jsx("span",{className:"pl-2 flex-1 whitespace-pre",children:z.map(($,V)=>g.jsx("span",{...O({token:$})},V))})]},q))})}})}),e[23]=n,e[24]=v,e[25]=f,e[26]=C,e[27]=A):A=e[27];let M;return e[28]!==N||e[29]!==A?(M=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[N,A]})}),e[28]=N,e[29]=A,e[30]=M):M=e[30],M};function d7(t){const e=me.c(3),{message:n}=t,i=n===void 0?"Success":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Vu,{className:"size-4"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o,g.jsx("span",{className:"break-all",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const f7={edit:p4,plus:cc,trash:uc,search:s1};function h7(t){const e=me.c(7),{text:n}=t,[i,o]=D.useState(!1);let l;e[0]!==n?(l=async()=>{await navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),1500)},e[0]=n,e[1]=l):l=e[1];const d=l;let a;e[2]!==i?(a=i?g.jsx("span",{className:"text-success text-xs",children:"Copied!"}):g.jsx(Mu,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];let u;return e[4]!==d||e[5]!==a?(u=g.jsx("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",title:"Copy path",children:a}),e[4]=d,e[5]=a,e[6]=u):u=e[6],u}function p7(t){const e=me.c(16),{title:n,groups:i,files:o,total:l}=t;let d;e[0]!==o?(d=o||[],e[0]=o,e[1]=d):d=e[1];let a;e[2]!==d?(a={label:"Files",files:d,icon:void 0},e[2]=d,e[3]=a):a=e[3];const u=a;let f;e[4]!==u||e[5]!==o||e[6]!==i?(f=i||(o?[u]:[]),e[4]=u,e[5]=o,e[6]=i,e[7]=f):f=e[7];const p=f;if(p.length===0)return null;let h;e[8]!==n||e[9]!==l?(h=n&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n,l!==void 0&&g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",l," files)"]})]}),e[8]=n,e[9]=l,e[10]=h):h=e[10];let v;e[11]!==p?(v=p.map(m7),e[11]=p,e[12]=v):v=e[12];let S;return e[13]!==h||e[14]!==v?(S=g.jsxs("div",{className:"flex flex-col gap-3",children:[h,v]}),e[13]=h,e[14]=v,e[15]=S):S=e[15],S}function m7(t,e){return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.icon&&g.jsx("span",{className:"flex items-center",children:(()=>{const n=f7[t.icon];return g.jsx(n,{className:"size-3"})})()}),g.jsx("span",{children:t.label}),g.jsxs("span",{className:"text-muted-foreground/50",children:["(",t.files.length,")"]})]}),g.jsx("div",{className:"flex flex-col gap-0.5 pl-5",children:t.files.map(g7)})]},e)}function g7(t,e){return g.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[g.jsx(i1,{className:"size-3 text-muted-foreground shrink-0"}),g.jsx("span",{className:"font-mono text-foreground/80 truncate",children:t.path}),t.line!==void 0&&g.jsxs("span",{className:"text-muted-foreground shrink-0",children:[":",t.line]}),t.action&&g.jsx("span",{className:Ee("text-xs px-1 rounded shrink-0",t.action==="created"&&"bg-success/20 text-success",t.action==="modified"&&"bg-warning/20 text-warning",t.action==="deleted"&&"bg-destructive/20 text-destructive"),children:t.action}),g.jsx(h7,{text:t.path})]},e)}function v7(t){const e=me.c(15),{command:n,stdout:i,stderr:o,exitCode:l}=t,d=l===0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("span",{className:"text-muted-foreground",children:"$ "}),e[0]=a):a=e[0];let u;e[1]!==n?(u=g.jsxs("div",{className:"font-mono text-xs text-muted-foreground truncate flex-1 mr-2",children:[a,g.jsx("span",{className:"text-foreground",children:n})]}),e[1]=n,e[2]=u):u=e[2];const f=`text-xs font-mono px-2 py-0.5 rounded ${d?"bg-muted text-muted-foreground":"bg-red-500/20 text-red-400"}`;let p;e[3]!==l||e[4]!==f?(p=g.jsxs("span",{className:f,children:["[",l,"]"]}),e[3]=l,e[4]=f,e[5]=p):p=e[5];let h;e[6]!==u||e[7]!==p?(h=g.jsxs("div",{className:"bg-muted px-3 py-2 flex items-center justify-between",children:[u,p]}),e[6]=u,e[7]=p,e[8]=h):h=e[8];let v;e[9]!==o||e[10]!==i?(v=(i||o)&&g.jsxs("div",{className:"bg-black px-3 py-2 font-mono text-xs overflow-x-auto",children:[i&&g.jsx("pre",{className:"text-gray-300 whitespace-pre-wrap",children:i}),o&&g.jsx("pre",{className:"text-red-400 whitespace-pre-wrap mt-1",children:o})]}),e[9]=o,e[10]=i,e[11]=v):v=e[11];let S;return e[12]!==h||e[13]!==v?(S=g.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=S):S=e[14],S}const _7={pending:{icon:t4,color:"text-muted-foreground"},in_progress:{icon:zr,color:"text-warning",animate:!0},completed:{icon:Vu,color:"text-success"},cancelled:{icon:nh,color:"text-destructive"}},y7={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function b7(t){const e=me.c(13),{title:n,items:i}=t;if(i.length===0)return null;let o;e[0]!==i?(o=i.filter(C7),e[0]=i,e[1]=o):o=e[1];const l=o.length;i.filter(w7),i.filter(S7);let d;e[2]!==l||e[3]!==i.length||e[4]!==n?(d=(n||i.length>0)&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n||"Todo List",g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",i.length,")"]}),l>0&&g.jsxs("span",{className:"ml-2 text-success text-xs",children:[l," completed"]})]}),e[2]=l,e[3]=i.length,e[4]=n,e[5]=d):d=e[5];let a;e[6]!==i?(a=i.map(x7),e[6]=i,e[7]=a):a=e[7];let u;e[8]!==a?(u=g.jsx("div",{className:"flex flex-col gap-1 w-full",children:a}),e[8]=a,e[9]=u):u=e[9];let f;return e[10]!==d||e[11]!==u?(f=g.jsxs("div",{className:"flex flex-col gap-3 w-full overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=f):f=e[12],f}function x7(t,e){const n=_7[t.status],i=n.icon,o=y7[t.priority];return g.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[g.jsx(i,{className:Ee("size-4 shrink-0",n.color,n.animate&&"animate-spin")}),g.jsx("span",{className:Ee("flex-1 break-all",t.status==="completed"&&"line-through text-muted-foreground",t.status==="cancelled"&&"text-muted-foreground"),children:t.content}),o.label&&t.priority==="high"&&g.jsx("span",{className:Ee("text-xs px-1.5 py-0.5 rounded shrink-0",o.className),children:o.label}),t.priority==="low"&&t.status!=="completed"&&t.status!=="cancelled"&&g.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:o.label})]},e)}function S7(t){return t.status==="pending"}function w7(t){return t.status==="in_progress"}function C7(t){return t.status==="completed"}function k7(t){const e=me.c(38),{visualization:n}=t;if(!n)return null;switch(n.type){case"diff":{let i;return e[0]!==n.additions||e[1]!==n.deletions||e[2]!==n.hunks||e[3]!==n.language||e[4]!==n.matchInfo||e[5]!==n.path?(i=g.jsx(qC,{path:n.path,hunks:n.hunks,language:n.language,additions:n.additions,deletions:n.deletions,matchInfo:n.matchInfo}),e[0]=n.additions,e[1]=n.deletions,e[2]=n.hunks,e[3]=n.language,e[4]=n.matchInfo,e[5]=n.path,e[6]=i):i=e[6],i}case"diffs":{let i;e[7]!==n.items?(i=n.items.map(E7),e[7]=n.items,e[8]=i):i=e[8];let o;return e[9]!==i?(o=g.jsx("div",{className:"space-y-3",children:i}),e[9]=i,e[10]=o):o=e[10],o}case"code":{let i;return e[11]!==n.content||e[12]!==n.created||e[13]!==n.highlightLines||e[14]!==n.language||e[15]!==n.path?(i=g.jsx(u7,{path:n.path,content:n.content,language:n.language,created:n.created,highlightLines:n.highlightLines}),e[11]=n.content,e[12]=n.created,e[13]=n.highlightLines,e[14]=n.language,e[15]=n.path,e[16]=i):i=e[16],i}case"file-list":{let i;return e[17]!==n.files||e[18]!==n.groups||e[19]!==n.title||e[20]!==n.total?(i=g.jsx(p7,{title:n.title,groups:n.groups,files:n.files,total:n.total}),e[17]=n.files,e[18]=n.groups,e[19]=n.title,e[20]=n.total,e[21]=i):i=e[21],i}case"table":{let i;e[22]!==n.rows?(i=JSON.stringify(n.rows,null,2),e[22]=n.rows,e[23]=i):i=e[23];let o;return e[24]!==i?(o=g.jsx("pre",{className:"text-xs bg-muted/50 border rounded-md p-2 overflow-x-auto",children:i}),e[24]=i,e[25]=o):o=e[25],o}case"markdown":{let i;return e[26]!==n.content?(i=g.jsx("div",{className:"prose prose-sm dark:prose-invert",children:n.content}),e[26]=n.content,e[27]=i):i=e[27],i}case"none":{let i;return e[28]!==n.message?(i=g.jsx(d7,{message:n.message}),e[28]=n.message,e[29]=i):i=e[29],i}case"shell-output":{let i;return e[30]!==n.command||e[31]!==n.exitCode||e[32]!==n.stderr||e[33]!==n.stdout?(i=g.jsx(v7,{command:n.command,stdout:n.stdout,stderr:n.stderr,exitCode:n.exitCode}),e[30]=n.command,e[31]=n.exitCode,e[32]=n.stderr,e[33]=n.stdout,e[34]=i):i=e[34],i}case"todo-list":{let i;return e[35]!==n.items||e[36]!==n.title?(i=g.jsx(b7,{title:n.title,items:n.items}),e[35]=n.items,e[36]=n.title,e[37]=i):i=e[37],i}default:return null}}function E7(t,e){return g.jsx(qC,{path:t.path,hunks:t.hunks,language:t.language,additions:t.additions,deletions:t.deletions,matchInfo:t.matchInfo},`${t.path}-${e}`)}function A7(t){switch(t){case"pending":return g.jsx(Px,{className:"size-3 text-warning"});case"running":return g.jsx(zr,{className:"size-3 text-warning animate-spin"});case"completed":return g.jsx(Vu,{className:"size-3 text-success"});case"error":return g.jsx(nh,{className:"size-3 text-destructive"});case"interrupted":return g.jsx(Ux,{className:"size-3 text-warning"});default:return null}}function R7(t){if(t&&typeof t=="object"&&"_visualization"in t)return t._visualization}function T7({part:t,pendingPermissions:e,onPermissionResponse:n,onNavigateToSubagent:i}){var _;const[o,l]=D.useState(!1),[d,a]=D.useState(!1),u=t.state,f=u.status,p=f==="completed"&&"output"in u?R7(u.output):void 0,h=f==="pending"?e.find(b=>b.toolCallId===t.callId):void 0,v=h?typeof((_=h.args)==null?void 0:_.command)=="string"?h.args.command:JSON.stringify(h.args,null,2):null;let S=null;if(t.name==="task"){if("childSessionId"in u&&u.childSessionId)S=u.childSessionId;else if(f==="completed"&&"output"in u){const y=(typeof u.output=="string"?u.output:"").match(/task_id:\s*([a-f0-9-]{36})/i);y&&(S=y[1])}}const C=async()=>{if("output"in u){const b=typeof u.output=="string"?u.output:JSON.stringify(u.output,null,2);await navigator.clipboard.writeText(b),a(!0),setTimeout(()=>a(!1),2e3)}},w=(()=>{try{const b=JSON.stringify(u.input);return b.length>50?b.slice(0,47)+"...":b}catch{return String(u.input)}})();return g.jsxs("div",{className:"my-1",children:[g.jsxs(Lo,{open:o,onOpenChange:l,children:[g.jsx(Io,{asChild:!0,children:g.jsxs("div",{className:"flex items-center gap-2 py-1 cursor-pointer hover:text-foreground transition-colors text-muted-foreground",children:[o?g.jsx(lc,{className:"size-4 text-muted-foreground"}):g.jsx(Ni,{className:"size-4 text-muted-foreground"}),g.jsx(R5,{className:"size-3"}),g.jsx("span",{className:"text-xs truncate max-w-[120px] sm:max-w-none",children:t.name}),!o&&g.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate flex-1 min-w-0 sm:max-w-[200px] hidden sm:block",children:w}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[A7(f),S&&i&&g.jsxs(Pe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:b=>{b.stopPropagation(),i(S)},title:"View session",children:[g.jsx(Cg,{className:"size-3"}),g.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),g.jsx(Bo,{children:g.jsxs("div",{className:"pl-5 pb-2 flex flex-col gap-2",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Input"}),g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(u.input,null,2)})]}),(f==="running"||f==="completed")&&S&&i&&g.jsxs(Pe,{variant:"outline",className:"w-full",size:"sm",onClick:()=>i(S),children:[g.jsx(Cg,{className:"size-4","data-icon":"inline-start"}),f==="running"?"Watch Subagent":"View Session"]}),f==="completed"&&"output"in u&&g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1",children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground",children:"Output"}),g.jsx(Pe,{variant:"ghost",size:"icon",onClick:C,className:"size-6",children:d?g.jsx(Ls,{className:"size-3 text-success"}):g.jsx(Mu,{className:"size-3"})})]}),g.jsx("pre",{className:"text-xs bg-success/10 border border-success/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:typeof u.output=="string"?u.output:JSON.stringify(u.output,null,2)})]}),f==="error"&&"error"in u&&g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Error"}),g.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words text-destructive",children:u.error})]})]})})]}),f==="pending"&&h&&g.jsxs("div",{className:"border border-warning/50 bg-warning/10 rounded-md p-3 flex flex-col gap-3 mt-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ju,{className:"size-4 text-warning"}),g.jsx(Kn,{variant:"outline",className:"text-warning border-warning",children:h.permissionType}),g.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:h.permissionKey})]}),h.message&&g.jsx("p",{className:"text-sm",children:h.message}),h.dangerous&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive font-medium",children:[g.jsx(ju,{className:"size-4"}),"This operation is marked as dangerous"]}),v&&g.jsxs(Lo,{children:[g.jsx(Io,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(Ni,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Bo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words overflow-wrap-break",children:v})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>n(t.callId,!1,!1),children:"Deny"}),g.jsx(Pe,{variant:"secondary",size:"sm",onClick:()=>n(t.callId,!0,!1),children:"Approve"}),g.jsx(Pe,{size:"sm",onClick:()=>n(t.callId,!0,!0),children:"Always Allow"})]})]}),f==="completed"&&p&&g.jsx("div",{className:"mt-2",children:g.jsx(k7,{visualization:p})})]})}function N7(t){const e=me.c(25),{prompts:n,query:i,selectedIndex:o,onSelect:l}=t;let d,a,u,f;if(e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==o){f=Symbol.for("react.early_return_sentinel");e:{let _;if(e[8]!==i?(_=y=>y.name.toLowerCase().includes(i.toLowerCase()),e[8]=i,e[9]=_):_=e[9],d=n.filter(_),d.length===0){let y;e[10]!==i?(y=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No prompts matching "/',i,'"']}),e[10]=i,e[11]=y):y=e[11],f=y;break e}a="p-1";let b;e[12]!==l||e[13]!==o?(b=(y,x)=>g.jsxs("button",{onClick:()=>l(y),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",x===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(L4,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"font-mono text-xs",children:["/",y.name]}),g.jsx("div",{className:"text-xs text-muted-foreground truncate",children:y.description})]})]},y.name),e[12]=l,e[13]=o,e[14]=b):b=e[14],u=d.map(b)}e[0]=l,e[1]=n,e[2]=i,e[3]=o,e[4]=d,e[5]=a,e[6]=u,e[7]=f}else d=e[4],a=e[5],u=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=d.length!==1?"s":"";let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[15]=h):h=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[16]=v):v=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[17]=S):S=e[17];let C;e[18]!==d.length||e[19]!==p?(C=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[d.length," prompt",p," •",h," navigate",v," select",S," close"]}),e[18]=d.length,e[19]=p,e[20]=C):C=e[20];let w;return e[21]!==a||e[22]!==u||e[23]!==C?(w=g.jsxs("div",{className:a,children:[u,C]}),e[21]=a,e[22]=u,e[23]=C,e[24]=w):w=e[24],w}function D7(t){const e=me.c(9),{debounceMs:n}=t,[i,o]=D.useState(""),[l,d]=D.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[u,f]=D.useState(a);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=_=>{const b={type:"file",path:_.path,display:_.name};return f(y=>[...y,b]),d(!1),o(""),b},e[1]=p):p=e[1];const h=p,v=M7;let S;e[2]!==u?(S=_=>{const b=/@([^\s@]+)/g,y=[];let x;for(;(x=b.exec(_))!==null;){const k=x[1];u.some(N=>N.path===k)&&!y.some(N=>N.path===k)&&y.push({type:"file",path:k,display:k.split("/").pop()||k})}return y},e[2]=u,e[3]=S):S=e[3];const C=S;let w;return e[4]!==C||e[5]!==u||e[6]!==i||e[7]!==l?(w={query:i,setQuery:o,showAutocomplete:l,setShowAutocomplete:d,mentions:u,handleFileSelect:h,insertMention:v,extractMentions:C},e[4]=C,e[5]=u,e[6]=i,e[7]=l,e[8]=w):w=e[8],w}function M7(t,e,n){const i=t.lastIndexOf("@",e);if(i===-1)return{text:t,cursorPos:e};const o=t.slice(0,i)+`@${n.path}`+t.slice(e),l=i+n.path.length+1;return{text:o,cursorPos:l}}function j7(t,e){return e?t.content.includes("ARG")?t.content.replace("ARG",e):`${t.content}
532
- ${e}`:t.content}function O7(t){const e=t.trimStart();if(!e.startsWith("/"))return null;const n=e.indexOf(" ");return n===-1?{command:e.slice(1),rest:""}:{command:e.slice(1,n),rest:e.slice(n+1).trim()}}const L7=D.forwardRef(function(e,n){const i=me.c(90),{onSendMessage:o,disabled:l,isStreaming:d,onStopStreaming:a,placeholder:u,workspaceId:f,serverUrl:p,apiToken:h,prompts:v}=e,S=u===void 0?"Type a message...":u;let C;i[0]!==v?(C=v===void 0?[]:v,i[0]=v,i[1]=C):C=i[1];const w=C,[_,b]=D.useState(""),[y,x]=D.useState(0);let k;i[2]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[2]=k):k=i[2];const[N,A]=D.useState(k),[M,T]=D.useState(0),[j,O]=D.useState("none"),[z,q]=D.useState(""),$=D.useRef(null);let V,K;i[3]===Symbol.for("react.memo_cache_sentinel")?(V=()=>({focus:()=>{var _e;return(_e=$.current)==null?void 0:_e.focus()}}),K=[],i[3]=V,i[4]=K):(V=i[3],K=i[4]),D.useImperativeHandle(n,V,K);const G=f||"";let Y;i[5]!==G?(Y={workspaceId:G},i[5]=G,i[6]=Y):Y=i[6];const{query:Q,setQuery:I,showAutocomplete:L,setShowAutocomplete:B,handleFileSelect:H,insertMention:F}=D7(Y);let J;i[7]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{T(0)},i[7]=J):J=i[7];let ne;i[8]!==N||i[9]!==z||i[10]!==w?(ne=[N,z,w],i[8]=N,i[9]=z,i[10]=w,i[11]=ne):ne=i[11],D.useEffect(J,ne);let Z;i[12]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{const _e=$.current;_e&&(_e.style.height="auto",_e.style.height=`${Math.min(_e.scrollHeight,150)}px`)},i[12]=Z):Z=i[12];let W;i[13]!==_?(W=[_],i[13]=_,i[14]=W):W=i[14],D.useEffect(Z,W);let U;if(i[15]!==z||i[16]!==w){let _e;i[18]!==z?(_e=Ye=>Ye.name.toLowerCase().includes(z.toLowerCase()),i[18]=z,i[19]=_e):_e=i[19],U=w.filter(_e),i[15]=z,i[16]=w,i[17]=U}else U=i[17];const te=U,ie=j==="prompts"&&w.length>0,ae=j==="files"&&L&&!!f;let se;i[20]!==I||i[21]!==B?(se=_e=>{const Ye=_e.target.value,st=_e.target.selectionStart||0;b(Ye),x(st);const St=Ye.lastIndexOf("/",st);if(St!==-1){const Ft=St>0?Ye[St-1]:`
533
- `,Gt=Ye.slice(St+1,st);if((Ft===`
534
- `||Ft===" "||Ft==="")&&!Gt.includes(" ")){q(Gt),O("prompts");return}}const Pt=Ye.lastIndexOf("@",st);if(Pt!==-1){const Ft=Ye.slice(Pt+1,st);if(!Ft.includes(" ")){I(Ft),B(!0),O("files");return}}O("none"),B(!1)},i[20]=I,i[21]=B,i[22]=se):se=i[22];const ge=se;let Te;i[23]!==y||i[24]!==H||i[25]!==_||i[26]!==F||i[27]!==B?(Te=_e=>{const Ye=H(_e),st=F(_,y,Ye);b(st.text),O("none"),B(!1),A([]),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange(st.cursorPos,st.cursorPos))},0)},i[23]=y,i[24]=H,i[25]=_,i[26]=F,i[27]=B,i[28]=Te):Te=i[28];const Me=Te;let Ke;i[29]!==y||i[30]!==_?(Ke=_e=>{const Ye=_.lastIndexOf("/",y),st=_.slice(0,Ye),St=_.slice(Ye+1),Pt=St.indexOf(" "),Ft=Pt!==-1?St.slice(Pt):"",Gt=`${st}/${_e.name}${Ft}`,$t=Ye+1+_e.name.length+0;b(Gt),O("none"),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange($t,$t))},0)},i[29]=y,i[30]=_,i[31]=Ke):Ke=i[31];const Re=Ke;let et;i[32]!==l||i[33]!==_||i[34]!==o||i[35]!==w?(et=_e=>{if(_e==null||_e.preventDefault(),!_.trim()||l)return;const Ye=O7(_);if(Ye){const st=w.find(St=>St.name===Ye.command);if(st){const St=j7(st,Ye.rest);o(St),b("");return}}o(_.trim()),b("")},i[32]=l,i[33]=_,i[34]=o,i[35]=w,i[36]=et):et=i[36];const Ze=et;let Ge;i[37]!==N||i[38]!==te||i[39]!==Me||i[40]!==Re||i[41]!==Ze||i[42]!==M||i[43]!==B||i[44]!==ae||i[45]!==ie?(Ge=_e=>{if(!_e.nativeEvent.isComposing){if(ie&&te.length>0)switch(_e.key){case"ArrowDown":{_e.preventDefault(),T(Ye=>Math.min(Ye+1,te.length-1));return}case"ArrowUp":{_e.preventDefault(),T(I7);return}case"Enter":{if(_e.shiftKey)return;_e.preventDefault(),te[M]&&Re(te[M]);return}case"Tab":{_e.preventDefault(),te[M]&&Re(te[M]);return}case"Escape":{_e.preventDefault(),O("none");return}}if(ae&&N.length>0)switch(_e.key){case"ArrowDown":{_e.preventDefault(),T(Ye=>Math.min(Ye+1,N.length-1));return}case"ArrowUp":{_e.preventDefault(),T(B7);return}case"Enter":{_e.preventDefault(),N[M]&&Me(N[M]);return}case"Escape":{_e.preventDefault(),B(!1),O("none");return}case"Tab":{_e.preventDefault(),N[M]&&Me(N[M]);return}}_e.key==="Enter"&&!_e.shiftKey&&(_e.preventDefault(),Ze())}},i[37]=N,i[38]=te,i[39]=Me,i[40]=Re,i[41]=Ze,i[42]=M,i[43]=B,i[44]=ae,i[45]=ie,i[46]=Ge):Ge=i[46];const rt=Ge;let ue;i[47]===Symbol.for("react.memo_cache_sentinel")?(ue=_e=>{A(_e)},i[47]=ue):ue=i[47];const ct=ue;if(d&&a){let _e;i[48]===Symbol.for("react.memo_cache_sentinel")?(_e=g.jsxs("div",{className:"animate-pulse flex items-center gap-2 text-muted-foreground",children:[g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.2s]"}),g.jsx("span",{className:"text-sm ml-2",children:"Generating..."})]}),i[48]=_e):_e=i[48];let Ye;i[49]===Symbol.for("react.memo_cache_sentinel")?(Ye=g.jsx(Wx,{className:"size-4","data-icon":"inline-start"}),i[49]=Ye):Ye=i[49];let st;return i[50]!==a?(st=g.jsx("div",{className:"p-4 border-t border-border bg-card",children:g.jsxs("div",{className:"flex items-center justify-center gap-3",children:[_e,g.jsxs(Pe,{variant:"outline",size:"sm",onClick:a,children:[Ye,"Stop"]})]})}),i[50]=a,i[51]=st):st=i[51],st}const it=ie||ae;let ut;i[52]!==B?(ut=_e=>{_e||(O("none"),B(!1))},i[52]=B,i[53]=ut):ut=i[53];let ce;i[54]===Symbol.for("react.memo_cache_sentinel")?(ce=Ee("min-h-[44px] max-h-[150px] resize-none pr-12","focus-visible:ring-1"),i[54]=ce):ce=i[54];let be;i[55]!==l||i[56]!==ge||i[57]!==rt||i[58]!==_||i[59]!==S?(be=g.jsx(L8,{asChild:!0,children:g.jsx(N8,{ref:$,value:_,onChange:ge,onKeyDown:rt,placeholder:S,disabled:l,className:ce,rows:1,"data-chat-input":"true"})}),i[55]=l,i[56]=ge,i[57]=rt,i[58]=_,i[59]=S,i[60]=be):be=i[60];let ke;i[61]!==h||i[62]!==Me||i[63]!==Re||i[64]!==z||i[65]!==w||i[66]!==Q||i[67]!==M||i[68]!==p||i[69]!==ae||i[70]!==f?(ke=g.jsx(jh,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:z7,onCloseAutoFocus:P7,children:ae?g.jsx(vj,{workspaceId:f||"",searchQuery:Q,selectedIndex:M,onSelect:Me,onFilesChange:ct,serverUrl:p,apiToken:h}):g.jsx(N7,{prompts:w,query:z,selectedIndex:M,onSelect:Re})}),i[61]=h,i[62]=Me,i[63]=Re,i[64]=z,i[65]=w,i[66]=Q,i[67]=M,i[68]=p,i[69]=ae,i[70]=f,i[71]=ke):ke=i[71];let je;i[72]!==it||i[73]!==ut||i[74]!==be||i[75]!==ke?(je=g.jsx("div",{className:"flex-1 relative",children:g.jsxs(Mh,{open:it,onOpenChange:ut,children:[be,ke]})}),i[72]=it,i[73]=ut,i[74]=be,i[75]=ke,i[76]=je):je=i[76];let Le;i[77]!==l||i[78]!==_?(Le=!_.trim()||l,i[77]=l,i[78]=_,i[79]=Le):Le=i[79];let lt;i[80]===Symbol.for("react.memo_cache_sentinel")?(lt=g.jsx(r5,{className:"size-4"}),i[80]=lt):lt=i[80];let xe;i[81]!==Le?(xe=g.jsx(Pe,{type:"submit",disabled:Le,size:"default",className:"h-11",children:lt}),i[81]=Le,i[82]=xe):xe=i[82];let ze;i[83]!==je||i[84]!==xe?(ze=g.jsxs("div",{className:"flex gap-3 items-end",children:[je,xe]}),i[83]=je,i[84]=xe,i[85]=ze):ze=i[85];let Ve;i[86]===Symbol.for("react.memo_cache_sentinel")?(Ve=g.jsxs("div",{className:"mt-2 text-xs text-muted-foreground text-center hidden sm:flex items-center justify-center gap-1",children:[g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"/"}),g.jsx("span",{children:"prompts"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"@"}),g.jsx("span",{children:"files"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Enter"}),g.jsx("span",{children:"to send"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Shift + Enter"}),g.jsx("span",{children:"for new line"})]}),i[86]=Ve):Ve=i[86];let _t;return i[87]!==Ze||i[88]!==ze?(_t=g.jsxs("form",{onSubmit:Ze,className:"p-4 border-t border-border bg-card",children:[ze,Ve]}),i[87]=Ze,i[88]=ze,i[89]=_t):_t=i[89],_t});function I7(t){return Math.max(t-1,0)}function B7(t){return Math.max(t-1,0)}function z7(t){return t.preventDefault()}function P7(t){return t.preventDefault()}function F7(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const H7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,U7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$7={};function Bb(t,e){return($7.jsx?U7:H7).test(t)}const q7=/[ \t\n\f\r]/g;function V7(t){return typeof t=="object"?t.type==="text"?zb(t.value):!1:zb(t)}function zb(t){return t.replace(q7,"")===""}class cd{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}}cd.prototype.normal={};cd.prototype.property={};cd.prototype.space=void 0;function VC(t,e){const n={},i={};for(const o of t)Object.assign(n,o.property),Object.assign(i,o.normal);return new cd(n,i,e)}function Wg(t){return t.toLowerCase()}class vr{constructor(e,n){this.attribute=n,this.property=e}}vr.prototype.attribute="";vr.prototype.booleanish=!1;vr.prototype.boolean=!1;vr.prototype.commaOrSpaceSeparated=!1;vr.prototype.commaSeparated=!1;vr.prototype.defined=!1;vr.prototype.mustUseProperty=!1;vr.prototype.number=!1;vr.prototype.overloadedBoolean=!1;vr.prototype.property="";vr.prototype.spaceSeparated=!1;vr.prototype.space=void 0;let W7=0;const mt=Ha(),hn=Ha(),Gg=Ha(),De=Ha(),qt=Ha(),tc=Ha(),Ir=Ha();function Ha(){return 2**++W7}const Kg=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:hn,commaOrSpaceSeparated:Ir,commaSeparated:tc,number:De,overloadedBoolean:Gg,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),sg=Object.keys(Kg);class tv extends vr{constructor(e,n,i,o){let l=-1;if(super(e,n),Pb(this,"space",o),typeof i=="number")for(;++l<sg.length;){const d=sg[l];Pb(this,sg[l],(i&Kg[d])===Kg[d])}}}tv.prototype.defined=!0;function Pb(t,e,n){n&&(t[e]=n)}function wc(t){const e={},n={};for(const[i,o]of Object.entries(t.properties)){const l=new tv(i,t.transform(t.attributes||{},i),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),e[i]=l,n[Wg(i)]=i,n[Wg(l.attribute)]=i}return new cd(e,n,t.space)}const WC=wc({properties:{ariaActiveDescendant:null,ariaAtomic:hn,ariaAutoComplete:null,ariaBusy:hn,ariaChecked:hn,ariaColCount:De,ariaColIndex:De,ariaColSpan:De,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:hn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:hn,ariaFlowTo:qt,ariaGrabbed:hn,ariaHasPopup:null,ariaHidden:hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:De,ariaLive:null,ariaModal:hn,ariaMultiLine:hn,ariaMultiSelectable:hn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:De,ariaPressed:hn,ariaReadOnly:hn,ariaRelevant:null,ariaRequired:hn,ariaRoleDescription:qt,ariaRowCount:De,ariaRowIndex:De,ariaRowSpan:De,ariaSelected:hn,ariaSetSize:De,ariaSort:null,ariaValueMax:De,ariaValueMin:De,ariaValueNow:De,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function GC(t,e){return e in t?t[e]:e}function KC(t,e){return GC(t,e.toLowerCase())}const G7=wc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tc,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:qt,autoFocus:mt,autoPlay:mt,blocking:qt,capture:null,charSet:null,checked:mt,cite:null,className:qt,cols:De,colSpan:null,content:null,contentEditable:hn,controls:mt,controlsList:qt,coords:De|tc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Gg,draggable:hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:qt,height:De,hidden:Gg,high:De,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:qt,itemRef:qt,itemScope:mt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:De,manifest:null,max:null,maxLength:De,media:null,method:null,min:null,minLength:De,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,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:mt,optimum:De,pattern:null,ping:qt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:qt,required:mt,reversed:mt,rows:De,rowSpan:De,sandbox:qt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:De,sizes:null,slot:null,span:De,spellCheck:hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:De,step:null,style:null,tabIndex:De,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:hn,width:De,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:De,borderColor:null,bottomMargin:De,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:De,leftMargin:De,link:null,longDesc:null,lowSrc:null,marginHeight:De,marginWidth:De,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:De,rules:null,scheme:null,scrolling:hn,standby:null,summary:null,text:null,topMargin:De,valueType:null,version:null,vAlign:null,vLink:null,vSpace:De,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:De,security:null,unselectable:null},space:"html",transform:KC}),K7=wc({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",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:Ir,accentHeight:De,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:De,amplitude:De,arabicForm:null,ascent:De,attributeName:null,attributeType:null,azimuth:De,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:De,by:null,calcMode:null,capHeight:De,className:qt,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:De,diffuseConstant:De,direction:null,display:null,dur:null,divisor:De,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:De,enableBackground:null,end:null,event:null,exponent:De,externalResourcesRequired:null,fill:null,fillOpacity:De,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:tc,g2:tc,glyphName:tc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:De,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:De,horizOriginX:De,horizOriginY:De,id:null,ideographic:De,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:De,k:De,k1:De,k2:De,k3:De,k4:De,kernelMatrix:Ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:De,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:De,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:De,overlineThickness:De,paintOrder:null,panose1:null,path:null,pathLength:De,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:De,pointsAtY:De,pointsAtZ:De,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ir,rev:Ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ir,requiredFeatures:Ir,requiredFonts:Ir,requiredFormats:Ir,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:De,specularExponent:De,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:De,strikethroughThickness:De,string:null,stroke:null,strokeDashArray:Ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:De,strokeOpacity:De,strokeWidth:null,style:null,surfaceScale:De,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ir,tabIndex:De,tableValues:null,target:null,targetX:De,targetY:De,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ir,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:De,underlineThickness:De,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:De,values:null,vAlphabetic:De,vMathematical:De,vectorEffect:null,vHanging:De,vIdeographic:De,version:null,vertAdvY:De,vertOriginX:De,vertOriginY:De,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:De,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:GC}),YC=wc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),XC=wc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:KC}),QC=wc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Y7={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"},X7=/[A-Z]/g,Fb=/-[a-z]/g,Q7=/^data[-\w.:]+$/i;function Z7(t,e){const n=Wg(e);let i=e,o=vr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Q7.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Fb,eL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Fb.test(l)){let d=l.replace(X7,J7);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}o=tv}return new o(i,e)}function J7(t){return"-"+t.toLowerCase()}function eL(t){return t.charAt(1).toUpperCase()}const tL=VC([WC,G7,YC,XC,QC],"html"),nv=VC([WC,K7,YC,XC,QC],"svg");function nL(t){return t.join(" ").trim()}var ql={},og,Hb;function rL(){if(Hb)return og;Hb=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
535
- `,f="/",p="*",h="",v="comment",S="declaration";function C(_,b){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];b=b||{};var y=1,x=1;function k(V){var K=V.match(e);K&&(y+=K.length);var G=V.lastIndexOf(u);x=~G?V.length-G:x+V.length}function N(){var V={line:y,column:x};return function(K){return K.position=new A(V),j(),K}}function A(V){this.start=V,this.end={line:y,column:x},this.source=b.source}A.prototype.content=_;function M(V){var K=new Error(b.source+":"+y+":"+x+": "+V);if(K.reason=V,K.filename=b.source,K.line=y,K.column=x,K.source=_,!b.silent)throw K}function T(V){var K=V.exec(_);if(K){var G=K[0];return k(G),_=_.slice(G.length),K}}function j(){T(n)}function O(V){var K;for(V=V||[];K=z();)K!==!1&&V.push(K);return V}function z(){var V=N();if(!(f!=_.charAt(0)||p!=_.charAt(1))){for(var K=2;h!=_.charAt(K)&&(p!=_.charAt(K)||f!=_.charAt(K+1));)++K;if(K+=2,h===_.charAt(K-1))return M("End of comment missing");var G=_.slice(2,K-2);return x+=2,k(G),_=_.slice(K),x+=2,V({type:v,comment:G})}}function q(){var V=N(),K=T(i);if(K){if(z(),!T(o))return M("property missing ':'");var G=T(l),Y=V({type:S,property:w(K[0].replace(t,h)),value:G?w(G[0].replace(t,h)):h});return T(d),Y}}function $(){var V=[];O(V);for(var K;K=q();)K!==!1&&(V.push(K),O(V));return V}return j(),$()}function w(_){return _?_.replace(a,h):h}return og=C,og}var Ub;function iL(){if(Ub)return ql;Ub=1;var t=ql&&ql.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ql,"__esModule",{value:!0}),ql.default=n;const e=t(rL());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const d=(0,e.default)(i),a=typeof o=="function";return d.forEach(u=>{if(u.type!=="declaration")return;const{property:f,value:p}=u;a?o(f,p,u):p&&(l=l||{},l[f]=p)}),l}return ql}var _u={},$b;function sL(){if($b)return _u;$b=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(f){return!f||n.test(f)||t.test(f)},d=function(f,p){return p.toUpperCase()},a=function(f,p){return"".concat(p,"-")},u=function(f,p){return p===void 0&&(p={}),l(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,a):f=f.replace(i,a),f.replace(e,d))};return _u.camelCase=u,_u}var yu,qb;function oL(){if(qb)return yu;qb=1;var t=yu&&yu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},e=t(iL()),n=sL();function i(o,l){var d={};return!o||typeof o!="string"||(0,e.default)(o,function(a,u){a&&u&&(d[(0,n.camelCase)(a,l)]=u)}),d}return i.default=i,yu=i,yu}var aL=oL();const lL=eh(aL),ZC=JC("end"),rv=JC("start");function JC(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function cL(t){const e=rv(t),n=ZC(t);if(e&&n)return{start:e,end:n}}function Tu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vb(t.position):"start"in t||"end"in t?Vb(t):"line"in t||"column"in t?Yg(t):""}function Yg(t){return Wb(t&&t.line)+":"+Wb(t&&t.column)}function Vb(t){return Yg(t&&t.start)+"-"+Yg(t&&t.end)}function Wb(t){return t&&typeof t=="number"?t:1}class Xn extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},d=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof e=="string"?o=e:!l.cause&&e&&(d=!0,o=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?l.ruleId=i:(l.source=i.slice(0,u),l.ruleId=i.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Tu(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=d&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xn.prototype.file="";Xn.prototype.name="";Xn.prototype.reason="";Xn.prototype.message="";Xn.prototype.stack="";Xn.prototype.column=void 0;Xn.prototype.line=void 0;Xn.prototype.ancestors=void 0;Xn.prototype.cause=void 0;Xn.prototype.fatal=void 0;Xn.prototype.place=void 0;Xn.prototype.ruleId=void 0;Xn.prototype.source=void 0;const iv={}.hasOwnProperty,uL=new Map,dL=/[A-Z]/g,fL=new Set(["table","tbody","thead","tfoot","tr"]),hL=new Set(["td","th"]),e3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pL(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=SL(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=xL(n,e.jsx,e.jsxs)}const o={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?nv:tL,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=t3(o,t,void 0);return l&&typeof l!="string"?l:o.create(t,o.Fragment,{children:l||void 0},void 0)}function t3(t,e,n){if(e.type==="element")return mL(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return gL(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return _L(t,e,n);if(e.type==="mdxjsEsm")return vL(t,e);if(e.type==="root")return yL(t,e,n);if(e.type==="text")return bL(t,e)}function mL(t,e,n){const i=t.schema;let o=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=nv,t.schema=o),t.ancestors.push(e);const l=r3(t,e.tagName,!1),d=wL(t,e);let a=ov(t,e);return fL.has(e.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!V7(u):!0})),n3(t,d,l,e),sv(d,a),t.ancestors.pop(),t.schema=i,t.create(e,l,d,n)}function gL(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}$u(t,e.position)}function vL(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);$u(t,e.position)}function _L(t,e,n){const i=t.schema;let o=i;e.name==="svg"&&i.space==="html"&&(o=nv,t.schema=o),t.ancestors.push(e);const l=e.name===null?t.Fragment:r3(t,e.name,!0),d=CL(t,e),a=ov(t,e);return n3(t,d,l,e),sv(d,a),t.ancestors.pop(),t.schema=i,t.create(e,l,d,n)}function yL(t,e,n){const i={};return sv(i,ov(t,e)),t.create(e,t.Fragment,i,n)}function bL(t,e){return e.value}function n3(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function sv(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function xL(t,e,n){return i;function i(o,l,d,a){const f=Array.isArray(d.children)?n:e;return a?f(l,d,a):f(l,d)}}function SL(t,e){return n;function n(i,o,l,d){const a=Array.isArray(l.children),u=rv(i);return e(o,l,d,a,{columnNumber:u?u.column-1:void 0,fileName:t,lineNumber:u?u.line:void 0},void 0)}}function wL(t,e){const n={};let i,o;for(o in e.properties)if(o!=="children"&&iv.call(e.properties,o)){const l=kL(t,o,e.properties[o]);if(l){const[d,a]=l;t.tableCellAlignToStyle&&d==="align"&&typeof a=="string"&&hL.has(e.tagName)?i=a:n[d]=a}}if(i){const l=n.style||(n.style={});l[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function CL(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const l=i.data.estree.body[0];l.type;const d=l.expression;d.type;const a=d.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else $u(t,e.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,l=t.evaluater.evaluateExpression(a.expression)}else $u(t,e.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function ov(t,e){const n=[];let i=-1;const o=t.passKeys?new Map:uL;for(;++i<e.children.length;){const l=e.children[i];let d;if(t.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const f=o.get(u)||0;d=u+"-"+f,o.set(u,f+1)}}const a=t3(t,l,d);a!==void 0&&n.push(a)}return n}function kL(t,e,n){const i=Z7(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?F7(n):nL(n)),i.property==="style"){let o=typeof n=="object"?n:EL(t,String(n));return t.stylePropertyNameCase==="css"&&(o=AL(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&i.space?Y7[i.property]||i.property:i.attribute,n]}}function EL(t,e){try{return lL(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,o=new Xn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=e3+"#cannot-parse-style-attribute",o}}function r3(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const o=e.split(".");let l=-1,d;for(;++l<o.length;){const a=Bb(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};d=d?{type:"MemberExpression",object:d,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}i=d}else i=Bb(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const o=i.value;return iv.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(i);$u(t)}function $u(t,e){const n=new Xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=e3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AL(t){const e={};let n;for(n in t)iv.call(t,n)&&(e[RL(n)]=t[n]);return e}function RL(t){let e=t.replace(dL,TL);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function TL(t){return"-"+t.toLowerCase()}const ag={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"]},NL={};function av(t,e){const n=NL,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return i3(t,i,o)}function i3(t,e,n){if(DL(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Gb(t.children,e,n)}return Array.isArray(t)?Gb(t,e,n):""}function Gb(t,e,n){const i=[];let o=-1;for(;++o<t.length;)i[o]=i3(t[o],e,n);return i.join("")}function DL(t){return!!(t&&typeof t=="object")}const Kb=document.createElement("i");function lv(t){const e="&"+t+";";Kb.innerHTML=e;const n=Kb.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Hr(t,e,n,i){const o=t.length;let l=0,d;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,i.length<1e4)d=Array.from(i),d.unshift(e,n),t.splice(...d);else for(n&&t.splice(e,n);l<i.length;)d=i.slice(l,l+1e4),d.unshift(e,0),t.splice(...d),l+=1e4,e+=1e4}function si(t,e){return t.length>0?(Hr(t,t.length,0,e),t):e}const Yb={}.hasOwnProperty;function s3(t){const e={};let n=-1;for(;++n<t.length;)ML(e,t[n]);return e}function ML(t,e){let n;for(n in e){const o=(Yb.call(t,n)?t[n]:void 0)||(t[n]={}),l=e[n];let d;if(l)for(d in l){Yb.call(o,d)||(o[d]=[]);const a=l[d];jL(o[d],Array.isArray(a)?a:a?[a]:[])}}}function jL(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);Hr(t,0,0,i)}function o3(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ti(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tr=$o(/[A-Za-z]/),Yn=$o(/[\dA-Za-z]/),OL=$o(/[#-'*+\--9=?A-Z^-~]/);function Xf(t){return t!==null&&(t<32||t===127)}const Xg=$o(/\d/),LL=$o(/[\dA-Fa-f]/),IL=$o(/[!-/:-@[-`{-~]/);function nt(t){return t!==null&&t<-2}function Ut(t){return t!==null&&(t<0||t===32)}function xt(t){return t===-2||t===-1||t===32}const Hh=$o(new RegExp("\\p{P}|\\p{S}","u")),Ia=$o(/\s/);function $o(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Cc(t){const e=[];let n=-1,i=0,o=0;for(;++n<t.length;){const l=t.charCodeAt(n);let d="";if(l===37&&Yn(t.charCodeAt(n+1))&&Yn(t.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(d=String.fromCharCode(l));else if(l>55295&&l<57344){const a=t.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(d=String.fromCharCode(l,a),o=1):d="�"}else d=String.fromCharCode(l);d&&(e.push(t.slice(i,n),encodeURIComponent(d)),i=n+o+1,d=""),o&&(n+=o,o=0)}return e.join("")+t.slice(i)}function Et(t,e,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return d;function d(u){return xt(u)?(t.enter(n),a(u)):e(u)}function a(u){return xt(u)&&l++<o?(t.consume(u),a):(t.exit(n),e(u))}}const BL={tokenize:zL};function zL(t){const e=t.attempt(this.parser.constructs.contentInitial,i,o);let n;return e;function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Et(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),l(a)}function l(a){const u=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,d(a)}function d(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return nt(a)?(t.consume(a),t.exit("chunkText"),l):(t.consume(a),d)}}const PL={tokenize:FL},Xb={tokenize:HL};function FL(t){const e=this,n=[];let i=0,o,l,d;return a;function a(x){if(i<n.length){const k=n[i];return e.containerState=k[1],t.attempt(k[0].continuation,u,f)(x)}return f(x)}function u(x){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,o&&y();const k=e.events.length;let N=k,A;for(;N--;)if(e.events[N][0]==="exit"&&e.events[N][1].type==="chunkFlow"){A=e.events[N][1].end;break}b(i);let M=k;for(;M<e.events.length;)e.events[M][1].end={...A},M++;return Hr(e.events,N+1,0,e.events.slice(k)),e.events.length=M,f(x)}return a(x)}function f(x){if(i===n.length){if(!o)return v(x);if(o.currentConstruct&&o.currentConstruct.concrete)return C(x);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Xb,p,h)(x)}function p(x){return o&&y(),b(i),v(x)}function h(x){return e.parser.lazy[e.now().line]=i!==n.length,d=e.now().offset,C(x)}function v(x){return e.containerState={},t.attempt(Xb,S,C)(x)}function S(x){return i++,n.push([e.currentConstruct,e.containerState]),v(x)}function C(x){if(x===null){o&&y(),b(0),t.consume(x);return}return o=o||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),w(x)}function w(x){if(x===null){_(t.exit("chunkFlow"),!0),b(0),t.consume(x);return}return nt(x)?(t.consume(x),_(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(x),w)}function _(x,k){const N=e.sliceStream(x);if(k&&N.push(null),x.previous=l,l&&(l.next=x),l=x,o.defineSkip(x.start),o.write(N),e.parser.lazy[x.start.line]){let A=o.events.length;for(;A--;)if(o.events[A][1].start.offset<d&&(!o.events[A][1].end||o.events[A][1].end.offset>d))return;const M=e.events.length;let T=M,j,O;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(j){O=e.events[T][1].end;break}j=!0}for(b(i),A=M;A<e.events.length;)e.events[A][1].end={...O},A++;Hr(e.events,T+1,0,e.events.slice(M)),e.events.length=A}}function b(x){let k=n.length;for(;k-- >x;){const N=n[k];e.containerState=N[1],N[0].exit.call(e,t)}n.length=x}function y(){o.write([null]),l=void 0,o=void 0,e.containerState._closeFlow=void 0}}function HL(t,e,n){return Et(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ac(t){if(t===null||Ut(t)||Ia(t))return 1;if(Hh(t))return 2}function Uh(t,e,n){const i=[];let o=-1;for(;++o<t.length;){const l=t[o].resolveAll;l&&!i.includes(l)&&(e=l(e,n),i.push(l))}return e}const Qg={name:"attention",resolveAll:UL,tokenize:$L};function UL(t,e){let n=-1,i,o,l,d,a,u,f,p;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;u=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const h={...t[i][1].end},v={...t[n][1].start};Qb(h,-u),Qb(v,u),d={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...t[i][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:v},l={type:u>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},o={type:u>1?"strong":"emphasis",start:{...d.start},end:{...a.end}},t[i][1].end={...d.start},t[n][1].start={...a.end},f=[],t[i][1].end.offset-t[i][1].start.offset&&(f=si(f,[["enter",t[i][1],e],["exit",t[i][1],e]])),f=si(f,[["enter",o,e],["enter",d,e],["exit",d,e],["enter",l,e]]),f=si(f,Uh(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),f=si(f,[["exit",l,e],["enter",a,e],["exit",a,e],["exit",o,e]]),t[n][1].end.offset-t[n][1].start.offset?(p=2,f=si(f,[["enter",t[n][1],e],["exit",t[n][1],e]])):p=0,Hr(t,i-1,n-i+3,f),n=i+f.length-p-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function $L(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=ac(i);let l;return d;function d(u){return l=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===l)return t.consume(u),a;const f=t.exit("attentionSequence"),p=ac(u),h=!p||p===2&&o||n.includes(u),v=!o||o===2&&p||n.includes(i);return f._open=!!(l===42?h:h&&(o||!v)),f._close=!!(l===42?v:v&&(p||!h)),e(u)}}function Qb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const qL={name:"autolink",tokenize:VL};function VL(t,e,n){let i=0;return o;function o(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),l}function l(S){return tr(S)?(t.consume(S),d):S===64?n(S):f(S)}function d(S){return S===43||S===45||S===46||Yn(S)?(i=1,a(S)):f(S)}function a(S){return S===58?(t.consume(S),i=0,u):(S===43||S===45||S===46||Yn(S))&&i++<32?(t.consume(S),a):(i=0,f(S))}function u(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):S===null||S===32||S===60||Xf(S)?n(S):(t.consume(S),u)}function f(S){return S===64?(t.consume(S),p):OL(S)?(t.consume(S),f):n(S)}function p(S){return Yn(S)?h(S):n(S)}function h(S){return S===46?(t.consume(S),i=0,p):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):v(S)}function v(S){if((S===45||Yn(S))&&i++<63){const C=S===45?v:h;return t.consume(S),C}return n(S)}}const ud={partial:!0,tokenize:WL};function WL(t,e,n){return i;function i(l){return xt(l)?Et(t,o,"linePrefix")(l):o(l)}function o(l){return l===null||nt(l)?e(l):n(l)}}const a3={continuation:{tokenize:KL},exit:YL,name:"blockQuote",tokenize:GL};function GL(t,e,n){const i=this;return o;function o(d){if(d===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(d),t.exit("blockQuoteMarker"),l}return n(d)}function l(d){return xt(d)?(t.enter("blockQuotePrefixWhitespace"),t.consume(d),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(d))}}function KL(t,e,n){const i=this;return o;function o(d){return xt(d)?Et(t,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):l(d)}function l(d){return t.attempt(a3,e,n)(d)}}function YL(t){t.exit("blockQuote")}const l3={name:"characterEscape",tokenize:XL};function XL(t,e,n){return i;function i(l){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(l),t.exit("escapeMarker"),o}function o(l){return IL(l)?(t.enter("characterEscapeValue"),t.consume(l),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(l)}}const c3={name:"characterReference",tokenize:QL};function QL(t,e,n){const i=this;let o=0,l,d;return a;function a(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),u}function u(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),f):(t.enter("characterReferenceValue"),l=31,d=Yn,p(h))}function f(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),l=6,d=LL,p):(t.enter("characterReferenceValue"),l=7,d=Xg,p(h))}function p(h){if(h===59&&o){const v=t.exit("characterReferenceValue");return d===Yn&&!lv(i.sliceSerialize(v))?n(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return d(h)&&o++<l?(t.consume(h),p):n(h)}}const Zb={partial:!0,tokenize:JL},Jb={concrete:!0,name:"codeFenced",tokenize:ZL};function ZL(t,e,n){const i=this,o={partial:!0,tokenize:N};let l=0,d=0,a;return u;function u(A){return f(A)}function f(A){const M=i.events[i.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=A,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===a?(d++,t.consume(A),p):d<3?n(A):(t.exit("codeFencedFenceSequence"),xt(A)?Et(t,h,"whitespace")(A):h(A))}function h(A){return A===null||nt(A)?(t.exit("codeFencedFence"),i.interrupt?e(A):t.check(Zb,w,k)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||nt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(A)):xt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Et(t,S,"whitespace")(A)):A===96&&A===a?n(A):(t.consume(A),v)}function S(A){return A===null||nt(A)?h(A):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||nt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),h(A)):A===96&&A===a?n(A):(t.consume(A),C)}function w(A){return t.attempt(o,k,_)(A)}function _(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),b}function b(A){return l>0&&xt(A)?Et(t,y,"linePrefix",l+1)(A):y(A)}function y(A){return A===null||nt(A)?t.check(Zb,w,k)(A):(t.enter("codeFlowValue"),x(A))}function x(A){return A===null||nt(A)?(t.exit("codeFlowValue"),y(A)):(t.consume(A),x)}function k(A){return t.exit("codeFenced"),e(A)}function N(A,M,T){let j=0;return O;function O(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),z}function z(K){return A.enter("codeFencedFence"),xt(K)?Et(A,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):q(K)}function q(K){return K===a?(A.enter("codeFencedFenceSequence"),$(K)):T(K)}function $(K){return K===a?(j++,A.consume(K),$):j>=d?(A.exit("codeFencedFenceSequence"),xt(K)?Et(A,V,"whitespace")(K):V(K)):T(K)}function V(K){return K===null||nt(K)?(A.exit("codeFencedFence"),M(K)):T(K)}}}function JL(t,e,n){const i=this;return o;function o(d){return d===null?n(d):(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l)}function l(d){return i.parser.lazy[i.now().line]?n(d):e(d)}}const lg={name:"codeIndented",tokenize:t9},e9={partial:!0,tokenize:n9};function t9(t,e,n){const i=this;return o;function o(f){return t.enter("codeIndented"),Et(t,l,"linePrefix",5)(f)}function l(f){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?d(f):n(f)}function d(f){return f===null?u(f):nt(f)?t.attempt(e9,d,u)(f):(t.enter("codeFlowValue"),a(f))}function a(f){return f===null||nt(f)?(t.exit("codeFlowValue"),d(f)):(t.consume(f),a)}function u(f){return t.exit("codeIndented"),e(f)}}function n9(t,e,n){const i=this;return o;function o(d){return i.parser.lazy[i.now().line]?n(d):nt(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),o):Et(t,l,"linePrefix",5)(d)}function l(d){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(d):nt(d)?o(d):n(d)}}const r9={name:"codeText",previous:s9,resolve:i9,tokenize:o9};function i9(t){let e=t.length-4,n=3,i,o;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)o===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(o=i):(i===e||t[i][1].type==="lineEnding")&&(t[o][1].type="codeTextData",i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),e-=i-o-2,i=o+2),o=void 0);return t}function s9(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function o9(t,e,n){let i=0,o,l;return d;function d(h){return t.enter("codeText"),t.enter("codeTextSequence"),a(h)}function a(h){return h===96?(t.consume(h),i++,a):(t.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),u):h===96?(l=t.enter("codeTextSequence"),o=0,p(h)):nt(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||nt(h)?(t.exit("codeTextData"),u(h)):(t.consume(h),f)}function p(h){return h===96?(t.consume(h),o++,p):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(l.type="codeTextData",f(h))}}class a9{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n==null?Number.POSITIVE_INFINITY:n;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const o=n||0;this.setCursor(Math.trunc(e));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&bu(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),bu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),bu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);bu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);bu(this.left,n.reverse())}}}function bu(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function u3(t){const e={};let n=-1,i,o,l,d,a,u,f;const p=new a9(t);for(;++n<p.length;){for(;n in e;)n=e[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,l9(p,n)),n=e[n],f=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(d=p.get(l),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),d[1].type="lineEnding",o=l);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},a=p.slice(o,n),a.unshift(i),p.splice(o,n-o+1,a))}}return Hr(t,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function l9(t,e){const n=t.get(e)[1],i=t.get(e)[2];let o=e-1;const l=[];let d=n._tokenizer;d||(d=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const a=d.events,u=[],f={};let p,h,v=-1,S=n,C=0,w=0;const _=[w];for(;S;){for(;t.get(++o)[1]!==S;);l.push(o),S._tokenizer||(p=i.sliceStream(S),S.next||p.push(null),h&&d.defineSkip(S.start),S._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(p),S._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),h=S,S=S.next}for(S=n;++v<a.length;)a[v][0]==="exit"&&a[v-1][0]==="enter"&&a[v][1].type===a[v-1][1].type&&a[v][1].start.line!==a[v][1].end.line&&(w=v+1,_.push(w),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(d.events=[],S?(S._tokenizer=void 0,S.previous=void 0):_.pop(),v=_.length;v--;){const b=a.slice(_[v],_[v+1]),y=l.pop();u.push([y,y+b.length-1]),t.splice(y,2,b)}for(u.reverse(),v=-1;++v<u.length;)f[C+u[v][0]]=C+u[v][1],C+=u[v][1]-u[v][0]-1;return f}const c9={resolve:d9,tokenize:f9},u9={partial:!0,tokenize:h9};function d9(t){return u3(t),t}function f9(t,e){let n;return i;function i(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?l(a):nt(a)?t.check(u9,d,l)(a):(t.consume(a),o)}function l(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function d(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function h9(t,e,n){const i=this;return o;function o(d){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Et(t,l,"linePrefix")}function l(d){if(d===null||nt(d))return n(d);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(d):t.interrupt(i.parser.constructs.flow,n,e)(d)}}function d3(t,e,n,i,o,l,d,a,u){const f=u||Number.POSITIVE_INFINITY;let p=0;return h;function h(b){return b===60?(t.enter(i),t.enter(o),t.enter(l),t.consume(b),t.exit(l),v):b===null||b===32||b===41||Xf(b)?n(b):(t.enter(i),t.enter(d),t.enter(a),t.enter("chunkString",{contentType:"string"}),w(b))}function v(b){return b===62?(t.enter(l),t.consume(b),t.exit(l),t.exit(o),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),S(b))}function S(b){return b===62?(t.exit("chunkString"),t.exit(a),v(b)):b===null||b===60||nt(b)?n(b):(t.consume(b),b===92?C:S)}function C(b){return b===60||b===62||b===92?(t.consume(b),S):S(b)}function w(b){return!p&&(b===null||b===41||Ut(b))?(t.exit("chunkString"),t.exit(a),t.exit(d),t.exit(i),e(b)):p<f&&b===40?(t.consume(b),p++,w):b===41?(t.consume(b),p--,w):b===null||b===32||b===40||Xf(b)?n(b):(t.consume(b),b===92?_:w)}function _(b){return b===40||b===41||b===92?(t.consume(b),w):w(b)}}function f3(t,e,n,i,o,l){const d=this;let a=0,u;return f;function f(S){return t.enter(i),t.enter(o),t.consume(S),t.exit(o),t.enter(l),p}function p(S){return a>999||S===null||S===91||S===93&&!u||S===94&&!a&&"_hiddenFootnoteSupport"in d.parser.constructs?n(S):S===93?(t.exit(l),t.enter(o),t.consume(S),t.exit(o),t.exit(i),e):nt(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),p):(t.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||S===91||S===93||nt(S)||a++>999?(t.exit("chunkString"),p(S)):(t.consume(S),u||(u=!xt(S)),S===92?v:h)}function v(S){return S===91||S===92||S===93?(t.consume(S),a++,h):h(S)}}function h3(t,e,n,i,o,l){let d;return a;function a(v){return v===34||v===39||v===40?(t.enter(i),t.enter(o),t.consume(v),t.exit(o),d=v===40?41:v,u):n(v)}function u(v){return v===d?(t.enter(o),t.consume(v),t.exit(o),t.exit(i),e):(t.enter(l),f(v))}function f(v){return v===d?(t.exit(l),u(d)):v===null?n(v):nt(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Et(t,f,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===d||v===null||nt(v)?(t.exit("chunkString"),f(v)):(t.consume(v),v===92?h:p)}function h(v){return v===d||v===92?(t.consume(v),p):p(v)}}function Nu(t,e){let n;return i;function i(o){return nt(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,i):xt(o)?Et(t,i,n?"linePrefix":"lineSuffix")(o):e(o)}}const p9={name:"definition",tokenize:g9},m9={partial:!0,tokenize:v9};function g9(t,e,n){const i=this;let o;return l;function l(S){return t.enter("definition"),d(S)}function d(S){return f3.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function a(S){return o=Ti(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),u):n(S)}function u(S){return Ut(S)?Nu(t,f)(S):f(S)}function f(S){return d3(t,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function p(S){return t.attempt(m9,h,h)(S)}function h(S){return xt(S)?Et(t,v,"whitespace")(S):v(S)}function v(S){return S===null||nt(S)?(t.exit("definition"),i.parser.defined.push(o),e(S)):n(S)}}function v9(t,e,n){return i;function i(a){return Ut(a)?Nu(t,o)(a):n(a)}function o(a){return h3(t,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return xt(a)?Et(t,d,"whitespace")(a):d(a)}function d(a){return a===null||nt(a)?e(a):n(a)}}const _9={name:"hardBreakEscape",tokenize:y9};function y9(t,e,n){return i;function i(l){return t.enter("hardBreakEscape"),t.consume(l),o}function o(l){return nt(l)?(t.exit("hardBreakEscape"),e(l)):n(l)}}const b9={name:"headingAtx",resolve:x9,tokenize:S9};function x9(t,e){let n=t.length-2,i=3,o,l;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},l={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},Hr(t,i,n-i+1,[["enter",o,e],["enter",l,e],["exit",l,e],["exit",o,e]])),t}function S9(t,e,n){let i=0;return o;function o(p){return t.enter("atxHeading"),l(p)}function l(p){return t.enter("atxHeadingSequence"),d(p)}function d(p){return p===35&&i++<6?(t.consume(p),d):p===null||Ut(p)?(t.exit("atxHeadingSequence"),a(p)):n(p)}function a(p){return p===35?(t.enter("atxHeadingSequence"),u(p)):p===null||nt(p)?(t.exit("atxHeading"),e(p)):xt(p)?Et(t,a,"whitespace")(p):(t.enter("atxHeadingText"),f(p))}function u(p){return p===35?(t.consume(p),u):(t.exit("atxHeadingSequence"),a(p))}function f(p){return p===null||p===35||Ut(p)?(t.exit("atxHeadingText"),a(p)):(t.consume(p),f)}}const w9=["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"],ex=["pre","script","style","textarea"],C9={concrete:!0,name:"htmlFlow",resolveTo:A9,tokenize:R9},k9={partial:!0,tokenize:N9},E9={partial:!0,tokenize:T9};function A9(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function R9(t,e,n){const i=this;let o,l,d,a,u;return f;function f(F){return p(F)}function p(F){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(F),h}function h(F){return F===33?(t.consume(F),v):F===47?(t.consume(F),l=!0,w):F===63?(t.consume(F),o=3,i.interrupt?e:L):tr(F)?(t.consume(F),d=String.fromCharCode(F),_):n(F)}function v(F){return F===45?(t.consume(F),o=2,S):F===91?(t.consume(F),o=5,a=0,C):tr(F)?(t.consume(F),o=4,i.interrupt?e:L):n(F)}function S(F){return F===45?(t.consume(F),i.interrupt?e:L):n(F)}function C(F){const J="CDATA[";return F===J.charCodeAt(a++)?(t.consume(F),a===J.length?i.interrupt?e:q:C):n(F)}function w(F){return tr(F)?(t.consume(F),d=String.fromCharCode(F),_):n(F)}function _(F){if(F===null||F===47||F===62||Ut(F)){const J=F===47,ne=d.toLowerCase();return!J&&!l&&ex.includes(ne)?(o=1,i.interrupt?e(F):q(F)):w9.includes(d.toLowerCase())?(o=6,J?(t.consume(F),b):i.interrupt?e(F):q(F)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(F):l?y(F):x(F))}return F===45||Yn(F)?(t.consume(F),d+=String.fromCharCode(F),_):n(F)}function b(F){return F===62?(t.consume(F),i.interrupt?e:q):n(F)}function y(F){return xt(F)?(t.consume(F),y):O(F)}function x(F){return F===47?(t.consume(F),O):F===58||F===95||tr(F)?(t.consume(F),k):xt(F)?(t.consume(F),x):O(F)}function k(F){return F===45||F===46||F===58||F===95||Yn(F)?(t.consume(F),k):N(F)}function N(F){return F===61?(t.consume(F),A):xt(F)?(t.consume(F),N):x(F)}function A(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(t.consume(F),u=F,M):xt(F)?(t.consume(F),A):T(F)}function M(F){return F===u?(t.consume(F),u=null,j):F===null||nt(F)?n(F):(t.consume(F),M)}function T(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||Ut(F)?N(F):(t.consume(F),T)}function j(F){return F===47||F===62||xt(F)?x(F):n(F)}function O(F){return F===62?(t.consume(F),z):n(F)}function z(F){return F===null||nt(F)?q(F):xt(F)?(t.consume(F),z):n(F)}function q(F){return F===45&&o===2?(t.consume(F),G):F===60&&o===1?(t.consume(F),Y):F===62&&o===4?(t.consume(F),B):F===63&&o===3?(t.consume(F),L):F===93&&o===5?(t.consume(F),I):nt(F)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(k9,H,$)(F)):F===null||nt(F)?(t.exit("htmlFlowData"),$(F)):(t.consume(F),q)}function $(F){return t.check(E9,V,H)(F)}function V(F){return t.enter("lineEnding"),t.consume(F),t.exit("lineEnding"),K}function K(F){return F===null||nt(F)?$(F):(t.enter("htmlFlowData"),q(F))}function G(F){return F===45?(t.consume(F),L):q(F)}function Y(F){return F===47?(t.consume(F),d="",Q):q(F)}function Q(F){if(F===62){const J=d.toLowerCase();return ex.includes(J)?(t.consume(F),B):q(F)}return tr(F)&&d.length<8?(t.consume(F),d+=String.fromCharCode(F),Q):q(F)}function I(F){return F===93?(t.consume(F),L):q(F)}function L(F){return F===62?(t.consume(F),B):F===45&&o===2?(t.consume(F),L):q(F)}function B(F){return F===null||nt(F)?(t.exit("htmlFlowData"),H(F)):(t.consume(F),B)}function H(F){return t.exit("htmlFlow"),e(F)}}function T9(t,e,n){const i=this;return o;function o(d){return nt(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l):n(d)}function l(d){return i.parser.lazy[i.now().line]?n(d):e(d)}}function N9(t,e,n){return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(ud,e,n)}}const D9={name:"htmlText",tokenize:M9};function M9(t,e,n){const i=this;let o,l,d;return a;function a(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),u}function u(L){return L===33?(t.consume(L),f):L===47?(t.consume(L),N):L===63?(t.consume(L),x):tr(L)?(t.consume(L),T):n(L)}function f(L){return L===45?(t.consume(L),p):L===91?(t.consume(L),l=0,C):tr(L)?(t.consume(L),y):n(L)}function p(L){return L===45?(t.consume(L),S):n(L)}function h(L){return L===null?n(L):L===45?(t.consume(L),v):nt(L)?(d=h,Y(L)):(t.consume(L),h)}function v(L){return L===45?(t.consume(L),S):h(L)}function S(L){return L===62?G(L):L===45?v(L):h(L)}function C(L){const B="CDATA[";return L===B.charCodeAt(l++)?(t.consume(L),l===B.length?w:C):n(L)}function w(L){return L===null?n(L):L===93?(t.consume(L),_):nt(L)?(d=w,Y(L)):(t.consume(L),w)}function _(L){return L===93?(t.consume(L),b):w(L)}function b(L){return L===62?G(L):L===93?(t.consume(L),b):w(L)}function y(L){return L===null||L===62?G(L):nt(L)?(d=y,Y(L)):(t.consume(L),y)}function x(L){return L===null?n(L):L===63?(t.consume(L),k):nt(L)?(d=x,Y(L)):(t.consume(L),x)}function k(L){return L===62?G(L):x(L)}function N(L){return tr(L)?(t.consume(L),A):n(L)}function A(L){return L===45||Yn(L)?(t.consume(L),A):M(L)}function M(L){return nt(L)?(d=M,Y(L)):xt(L)?(t.consume(L),M):G(L)}function T(L){return L===45||Yn(L)?(t.consume(L),T):L===47||L===62||Ut(L)?j(L):n(L)}function j(L){return L===47?(t.consume(L),G):L===58||L===95||tr(L)?(t.consume(L),O):nt(L)?(d=j,Y(L)):xt(L)?(t.consume(L),j):G(L)}function O(L){return L===45||L===46||L===58||L===95||Yn(L)?(t.consume(L),O):z(L)}function z(L){return L===61?(t.consume(L),q):nt(L)?(d=z,Y(L)):xt(L)?(t.consume(L),z):j(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),o=L,$):nt(L)?(d=q,Y(L)):xt(L)?(t.consume(L),q):(t.consume(L),V)}function $(L){return L===o?(t.consume(L),o=void 0,K):L===null?n(L):nt(L)?(d=$,Y(L)):(t.consume(L),$)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Ut(L)?j(L):(t.consume(L),V)}function K(L){return L===47||L===62||Ut(L)?j(L):n(L)}function G(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function Y(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),Q}function Q(L){return xt(L)?Et(t,I,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return t.enter("htmlTextData"),d(L)}}const cv={name:"labelEnd",resolveAll:I9,resolveTo:B9,tokenize:z9},j9={tokenize:P9},O9={tokenize:F9},L9={tokenize:H9};function I9(t){let e=-1;const n=[];for(;++e<t.length;){const i=t[e][1];if(n.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",e+=o}}return t.length!==n.length&&Hr(t,0,t.length,n),t}function B9(t,e){let n=t.length,i=0,o,l,d,a;for(;n--;)if(o=t[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(d){if(t[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(d=n);const u={type:t[l][1].type==="labelLink"?"link":"image",start:{...t[l][1].start},end:{...t[t.length-1][1].end}},f={type:"label",start:{...t[l][1].start},end:{...t[d][1].end}},p={type:"labelText",start:{...t[l+i+2][1].end},end:{...t[d-2][1].start}};return a=[["enter",u,e],["enter",f,e]],a=si(a,t.slice(l+1,l+i+3)),a=si(a,[["enter",p,e]]),a=si(a,Uh(e.parser.constructs.insideSpan.null,t.slice(l+i+4,d-3),e)),a=si(a,[["exit",p,e],t[d-2],t[d-1],["exit",f,e]]),a=si(a,t.slice(d+1)),a=si(a,[["exit",u,e]]),Hr(t,l,t.length,a),t}function z9(t,e,n){const i=this;let o=i.events.length,l,d;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return a;function a(v){return l?l._inactive?h(v):(d=i.parser.defined.includes(Ti(i.sliceSerialize({start:l.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),u):n(v)}function u(v){return v===40?t.attempt(j9,p,d?p:h)(v):v===91?t.attempt(O9,p,d?f:h)(v):d?p(v):h(v)}function f(v){return t.attempt(L9,p,h)(v)}function p(v){return e(v)}function h(v){return l._balanced=!0,n(v)}}function P9(t,e,n){return i;function i(h){return t.enter("resource"),t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),o}function o(h){return Ut(h)?Nu(t,l)(h):l(h)}function l(h){return h===41?p(h):d3(t,d,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function d(h){return Ut(h)?Nu(t,u)(h):p(h)}function a(h){return n(h)}function u(h){return h===34||h===39||h===40?h3(t,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return Ut(h)?Nu(t,p)(h):p(h)}function p(h){return h===41?(t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),t.exit("resource"),e):n(h)}}function F9(t,e,n){const i=this;return o;function o(a){return f3.call(i,t,l,d,"reference","referenceMarker","referenceString")(a)}function l(a){return i.parser.defined.includes(Ti(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function d(a){return n(a)}}function H9(t,e,n){return i;function i(l){return t.enter("reference"),t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),o}function o(l){return l===93?(t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),t.exit("reference"),e):n(l)}}const U9={name:"labelStartImage",resolveAll:cv.resolveAll,tokenize:$9};function $9(t,e,n){const i=this;return o;function o(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),l}function l(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),d):n(a)}function d(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const q9={name:"labelStartLink",resolveAll:cv.resolveAll,tokenize:V9};function V9(t,e,n){const i=this;return o;function o(d){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelLink"),l}function l(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):e(d)}}const cg={name:"lineEnding",tokenize:W9};function W9(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Et(t,e,"linePrefix")}}const Df={name:"thematicBreak",tokenize:G9};function G9(t,e,n){let i=0,o;return l;function l(f){return t.enter("thematicBreak"),d(f)}function d(f){return o=f,a(f)}function a(f){return f===o?(t.enter("thematicBreakSequence"),u(f)):i>=3&&(f===null||nt(f))?(t.exit("thematicBreak"),e(f)):n(f)}function u(f){return f===o?(t.consume(f),i++,u):(t.exit("thematicBreakSequence"),xt(f)?Et(t,a,"whitespace")(f):a(f))}}const gr={continuation:{tokenize:Q9},exit:J9,name:"list",tokenize:X9},K9={partial:!0,tokenize:eI},Y9={partial:!0,tokenize:Z9};function X9(t,e,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,d=0;return a;function a(S){const C=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Xg(S)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Df,n,f)(S):f(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(S)}return n(S)}function u(S){return Xg(S)&&++d<10?(t.consume(S),u):(!i.interrupt||d<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),f(S)):n(S)}function f(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(ud,i.interrupt?n:p,t.attempt(K9,v,h))}function p(S){return i.containerState.initialBlankLine=!0,l++,v(S)}function h(S){return xt(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),v):n(S)}function v(S){return i.containerState.size=l+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(S)}}function Q9(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(ud,o,l);function o(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Et(t,e,"listItemIndent",i.containerState.size+1)(a)}function l(a){return i.containerState.furtherBlankLines||!xt(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,d(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(Y9,e,d)(a))}function d(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,Et(t,t.attempt(gr,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Z9(t,e,n){const i=this;return Et(t,o,"listItemIndent",i.containerState.size+1);function o(l){const d=i.events[i.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===i.containerState.size?e(l):n(l)}}function J9(t){t.exit(this.containerState.type)}function eI(t,e,n){const i=this;return Et(t,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const d=i.events[i.events.length-1];return!xt(l)&&d&&d[1].type==="listItemPrefixWhitespace"?e(l):n(l)}}const tx={name:"setextUnderline",resolveTo:tI,tokenize:nI};function tI(t,e){let n=t.length,i,o,l;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(o=n)}else t[n][1].type==="content"&&t.splice(n,1),!l&&t[n][1].type==="definition"&&(l=n);const d={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",l?(t.splice(o,0,["enter",d,e]),t.splice(l+1,0,["exit",t[i][1],e]),t[i][1].end={...t[l][1].end}):t[i][1]=d,t.push(["exit",d,e]),t}function nI(t,e,n){const i=this;let o;return l;function l(f){let p=i.events.length,h;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){h=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||h)?(t.enter("setextHeadingLine"),o=f,d(f)):n(f)}function d(f){return t.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===o?(t.consume(f),a):(t.exit("setextHeadingLineSequence"),xt(f)?Et(t,u,"lineSuffix")(f):u(f))}function u(f){return f===null||nt(f)?(t.exit("setextHeadingLine"),e(f)):n(f)}}const rI={tokenize:iI};function iI(t){const e=this,n=t.attempt(ud,i,t.attempt(this.parser.constructs.flowInitial,o,Et(t,t.attempt(this.parser.constructs.flow,o,t.attempt(c9,o)),"linePrefix")));return n;function i(l){if(l===null){t.consume(l);return}return t.enter("lineEndingBlank"),t.consume(l),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function o(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const sI={resolveAll:m3()},oI=p3("string"),aI=p3("text");function p3(t){return{resolveAll:m3(t==="text"?lI:void 0),tokenize:e};function e(n){const i=this,o=this.parser.constructs[t],l=n.attempt(o,d,a);return d;function d(p){return f(p)?l(p):a(p)}function a(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),u}function u(p){return f(p)?(n.exit("data"),l(p)):(n.consume(p),u)}function f(p){if(p===null)return!0;const h=o[p];let v=-1;if(h)for(;++v<h.length;){const S=h[v];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function m3(t){return e;function e(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return t?t(n,i):n}}function lI(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],o=e.sliceStream(i);let l=o.length,d=-1,a=0,u;for(;l--;){const f=o[l];if(typeof f=="string"){for(d=f.length;f.charCodeAt(d-1)===32;)a++,d--;if(d)break;d=-1}else if(f===-2)u=!0,a++;else if(f!==-1){l++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const f={type:n===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?d:i.start._bufferIndex+d,_index:i.start._index+l,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(t.splice(n,0,["enter",f,e],["exit",f,e]),n+=2)}n++}return t}const cI={42:gr,43:gr,45:gr,48:gr,49:gr,50:gr,51:gr,52:gr,53:gr,54:gr,55:gr,56:gr,57:gr,62:a3},uI={91:p9},dI={[-2]:lg,[-1]:lg,32:lg},fI={35:b9,42:Df,45:[tx,Df],60:C9,61:tx,95:Df,96:Jb,126:Jb},hI={38:c3,92:l3},pI={[-5]:cg,[-4]:cg,[-3]:cg,33:U9,38:c3,42:Qg,60:[qL,D9],91:q9,92:[_9,l3],93:cv,95:Qg,96:r9},mI={null:[Qg,sI]},gI={null:[42,95]},vI={null:[]},_I=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:gI,contentInitial:uI,disable:vI,document:cI,flow:fI,flowInitial:dI,insideSpan:mI,string:hI,text:pI},Symbol.toStringTag,{value:"Module"}));function yI(t,e,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let d=[],a=[];const u={attempt:M(N),check:M(A),consume:y,enter:x,exit:k,interrupt:M(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:C,parser:t,previous:null,sliceSerialize:v,sliceStream:S,write:h};let p=e.tokenize.call(f,u);return e.resolveAll&&l.push(e),f;function h(z){return d=si(d,z),_(),d[d.length-1]!==null?[]:(T(e,0),f.events=Uh(l,f.events,f),f.events)}function v(z,q){return xI(S(z),q)}function S(z){return bI(d,z)}function C(){const{_bufferIndex:z,_index:q,line:$,column:V,offset:K}=i;return{_bufferIndex:z,_index:q,line:$,column:V,offset:K}}function w(z){o[z.line]=z.column,O()}function _(){let z;for(;i._index<d.length;){const q=d[i._index];if(typeof q=="string")for(z=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===z&&i._bufferIndex<q.length;)b(q.charCodeAt(i._bufferIndex));else b(q)}}function b(z){p=p(z)}function y(z){nt(z)?(i.line++,i.column=1,i.offset+=z===-3?2:1,O()):z!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===d[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=z}function x(z,q){const $=q||{};return $.type=z,$.start=C(),f.events.push(["enter",$,f]),a.push($),$}function k(z){const q=a.pop();return q.end=C(),f.events.push(["exit",q,f]),q}function N(z,q){T(z,q.from)}function A(z,q){q.restore()}function M(z,q){return $;function $(V,K,G){let Y,Q,I,L;return Array.isArray(V)?H(V):"tokenize"in V?H([V]):B(V);function B(Z){return W;function W(U){const te=U!==null&&Z[U],ie=U!==null&&Z.null,ae=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ae)(U)}}function H(Z){return Y=Z,Q=0,Z.length===0?G:F(Z[Q])}function F(Z){return W;function W(U){return L=j(),I=Z,Z.partial||(f.currentConstruct=Z),Z.name&&f.parser.constructs.disable.null.includes(Z.name)?ne():Z.tokenize.call(q?Object.assign(Object.create(f),q):f,u,J,ne)(U)}}function J(Z){return z(I,L),K}function ne(Z){return L.restore(),++Q<Y.length?F(Y[Q]):G}}}function T(z,q){z.resolveAll&&!l.includes(z)&&l.push(z),z.resolve&&Hr(f.events,q,f.events.length-q,z.resolve(f.events.slice(q),f)),z.resolveTo&&(f.events=z.resolveTo(f.events,f))}function j(){const z=C(),q=f.previous,$=f.currentConstruct,V=f.events.length,K=Array.from(a);return{from:V,restore:G};function G(){i=z,f.previous=q,f.currentConstruct=$,f.events.length=V,a=K,O()}}function O(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function bI(t,e){const n=e.start._index,i=e.start._bufferIndex,o=e.end._index,l=e.end._bufferIndex;let d;if(n===o)d=[t[n].slice(i,l)];else{if(d=t.slice(n,o),i>-1){const a=d[0];typeof a=="string"?d[0]=a.slice(i):d.shift()}l>0&&d.push(t[o].slice(0,l))}return d}function xI(t,e){let n=-1;const i=[];let o;for(;++n<t.length;){const l=t[n];let d;if(typeof l=="string")d=l;else switch(l){case-5:{d="\r";break}case-4:{d=`
536
- `;break}case-3:{d=`\r
537
- `;break}case-2:{d=e?" ":" ";break}case-1:{if(!e&&o)continue;d=" ";break}default:d=String.fromCharCode(l)}o=l===-2,i.push(d)}return i.join("")}function SI(t){const i={constructs:s3([_I,...(t||{}).extensions||[]]),content:o(BL),defined:[],document:o(PL),flow:o(rI),lazy:{},string:o(oI),text:o(aI)};return i;function o(l){return d;function d(a){return yI(i,l,a)}}}function wI(t){for(;!u3(t););return t}const nx=/[\0\t\n\r]/g;function CI(){let t=1,e="",n=!0,i;return o;function o(l,d,a){const u=[];let f,p,h,v,S;for(l=e+(typeof l=="string"?l.toString():new TextDecoder(d||void 0).decode(l)),h=0,e="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(nx.lastIndex=h,f=nx.exec(l),v=f&&f.index!==void 0?f.index:l.length,S=l.charCodeAt(v),!f){e=l.slice(h);break}if(S===10&&h===v&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),h<v&&(u.push(l.slice(h,v)),t+=v-h),S){case 0:{u.push(65533),t++;break}case 9:{for(p=Math.ceil(t/4)*4,u.push(-2);t++<p;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:i=!0,t=1}h=v+1}return a&&(i&&u.push(-5),e&&u.push(e),u.push(null)),u}}const kI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EI(t){return t.replace(kI,AI)}function AI(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return o3(n.slice(l?2:1),l?16:10)}return lv(n)||t}const g3={}.hasOwnProperty;function RI(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),TI(n)(wI(SI(n).document().write(CI()(t,e,!0))))}function TI(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ze),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Me),blockQuote:l(ie),characterEscape:j,characterReference:j,codeFenced:l(ae),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:l(ae,d),codeText:l(se,d),codeTextData:j,data:j,codeFlowValue:j,definition:l(ge),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:l(Te),hardBreakEscape:l(Ke),hardBreakTrailing:l(Ke),htmlFlow:l(Re,d),htmlFlowData:j,htmlText:l(Re,d),htmlTextData:j,image:l(et),label:d,link:l(Ze),listItem:l(rt),listItemValue:v,listOrdered:l(Ge,h),listUnordered:l(Ge),paragraph:l(ue),reference:F,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:l(Me),strong:l(ct),thematicBreak:l(ut)},exit:{atxHeading:u(),atxHeadingSequence:N,autolink:u(),autolinkEmail:te,autolinkProtocol:U,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:Z,characterReference:W,codeFenced:u(_),codeFencedFence:w,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:u(b),codeText:u(K),codeTextData:O,data:O,definition:u(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u($),htmlFlowData:O,htmlText:u(V),htmlTextData:O,image:u(Y),label:I,labelText:Q,lineEnding:z,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:J,resourceDestinationString:L,resourceTitleString:B,resource:H,setextHeading:u(T),setextHeadingLineSequence:M,setextHeadingText:A,strong:u(),thematicBreak:u()}};v3(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ce){let be={type:"root",children:[]};const ke={stack:[be],tokenStack:[],config:e,enter:a,exit:f,buffer:d,resume:p,data:n},je=[];let Le=-1;for(;++Le<ce.length;)if(ce[Le][1].type==="listOrdered"||ce[Le][1].type==="listUnordered")if(ce[Le][0]==="enter")je.push(Le);else{const lt=je.pop();Le=o(ce,lt,Le)}for(Le=-1;++Le<ce.length;){const lt=e[ce[Le][0]];g3.call(lt,ce[Le][1].type)&&lt[ce[Le][1].type].call(Object.assign({sliceSerialize:ce[Le][2].sliceSerialize},ke),ce[Le][1])}if(ke.tokenStack.length>0){const lt=ke.tokenStack[ke.tokenStack.length-1];(lt[1]||rx).call(ke,void 0,lt[0])}for(be.position={start:Ao(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Ao(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<e.transforms.length;)be=e.transforms[Le](be)||be;return be}function o(ce,be,ke){let je=be-1,Le=-1,lt=!1,xe,ze,Ve,_t;for(;++je<=ke;){const _e=ce[je];switch(_e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_e[0]==="enter"?Le++:Le--,_t=void 0;break}case"lineEndingBlank":{_e[0]==="enter"&&(xe&&!_t&&!Le&&!Ve&&(Ve=je),_t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_t=void 0}if(!Le&&_e[0]==="enter"&&_e[1].type==="listItemPrefix"||Le===-1&&_e[0]==="exit"&&(_e[1].type==="listUnordered"||_e[1].type==="listOrdered")){if(xe){let Ye=je;for(ze=void 0;Ye--;){const st=ce[Ye];if(st[1].type==="lineEnding"||st[1].type==="lineEndingBlank"){if(st[0]==="exit")continue;ze&&(ce[ze][1].type="lineEndingBlank",lt=!0),st[1].type="lineEnding",ze=Ye}else if(!(st[1].type==="linePrefix"||st[1].type==="blockQuotePrefix"||st[1].type==="blockQuotePrefixWhitespace"||st[1].type==="blockQuoteMarker"||st[1].type==="listItemIndent"))break}Ve&&(!ze||Ve<ze)&&(xe._spread=!0),xe.end=Object.assign({},ze?ce[ze][1].start:_e[1].end),ce.splice(ze||je,0,["exit",xe,_e[2]]),je++,ke++}if(_e[1].type==="listItemPrefix"){const Ye={type:"listItem",_spread:!1,start:Object.assign({},_e[1].start),end:void 0};xe=Ye,ce.splice(je,0,["enter",Ye,_e[2]]),je++,ke++,Ve=void 0,_t=!0}}}return ce[be][1]._spread=lt,ke}function l(ce,be){return ke;function ke(je){a.call(this,ce(je),je),be&&be.call(this,je)}}function d(){this.stack.push({type:"fragment",children:[]})}function a(ce,be,ke){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([be,ke||void 0]),ce.position={start:Ao(be.start),end:void 0}}function u(ce){return be;function be(ke){ce&&ce.call(this,ke),f.call(this,ke)}}function f(ce,be){const ke=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==ce.type&&(be?be.call(this,ce,je[0]):(je[1]||rx).call(this,ce,je[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Tu({start:ce.start,end:ce.end})+"): it’s not open");ke.position.end=Ao(ce.end)}function p(){return av(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function v(ce){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.lang=ce}function C(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.meta=ce}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.value=ce.replace(/(\r?\n|\r)$/g,"")}function y(ce){const be=this.resume(),ke=this.stack[this.stack.length-1];ke.label=be,ke.identifier=Ti(this.sliceSerialize(ce)).toLowerCase()}function x(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.title=ce}function k(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.url=ce}function N(ce){const be=this.stack[this.stack.length-1];if(!be.depth){const ke=this.sliceSerialize(ce).length;be.depth=ke}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(ce){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function j(ce){const ke=this.stack[this.stack.length-1].children;let je=ke[ke.length-1];(!je||je.type!=="text")&&(je=it(),je.position={start:Ao(ce.start),end:void 0},ke.push(je)),this.stack.push(je)}function O(ce){const be=this.stack.pop();be.value+=this.sliceSerialize(ce),be.position.end=Ao(ce.end)}function z(ce){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=be.children[be.children.length-1];ke.position.end=Ao(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(be.type)&&(j.call(this,ce),O.call(this,ce))}function q(){this.data.atHardBreak=!0}function $(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.value=ce}function V(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.value=ce}function K(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.value=ce}function G(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=be,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Y(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=be,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Q(ce){const be=this.sliceSerialize(ce),ke=this.stack[this.stack.length-2];ke.label=EI(be),ke.identifier=Ti(be).toLowerCase()}function I(){const ce=this.stack[this.stack.length-1],be=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const je=ce.children;ke.children=je}else ke.alt=be}function L(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.url=ce}function B(){const ce=this.resume(),be=this.stack[this.stack.length-1];be.title=ce}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function J(ce){const be=this.resume(),ke=this.stack[this.stack.length-1];ke.label=be,ke.identifier=Ti(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function ne(ce){this.data.characterReferenceType=ce.type}function Z(ce){const be=this.sliceSerialize(ce),ke=this.data.characterReferenceType;let je;ke?(je=o3(be,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=lv(be);const Le=this.stack[this.stack.length-1];Le.value+=je}function W(ce){const be=this.stack.pop();be.position.end=Ao(ce.end)}function U(ce){O.call(this,ce);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(ce)}function te(ce){O.call(this,ce);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(ce)}function ie(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Te(){return{type:"emphasis",children:[]}}function Me(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function Re(){return{type:"html",value:""}}function et(){return{type:"image",title:null,url:"",alt:null}}function Ze(){return{type:"link",title:null,url:"",children:[]}}function Ge(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function rt(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function ue(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function Ao(t){return{line:t.line,column:t.column,offset:t.offset}}function v3(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?v3(t,i):NI(t,i)}}function NI(t,e){let n;for(n in e)if(g3.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function rx(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Tu({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Tu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Tu({start:e.start,end:e.end})+") is still open")}function DI(t){const e=this;e.parser=n;function n(i){return RI(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function MI(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function jI(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
538
- `}]}function OI(t,e){const n=e.value?e.value+`
539
- `:"",i={},o=e.lang?e.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(l.data={meta:e.meta}),t.patch(e,l),l=t.applyData(e,l),l={type:"element",tagName:"pre",properties:{},children:[l]},t.patch(e,l),l}function LI(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function II(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function BI(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),o=Cc(i.toLowerCase()),l=t.footnoteOrder.indexOf(i);let d,a=t.footnoteCounts.get(i);a===void 0?(a=0,t.footnoteOrder.push(i),d=t.footnoteOrder.length):d=l+1,a+=1,t.footnoteCounts.set(i,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};t.patch(e,u);const f={type:"element",tagName:"sup",properties:{},children:[u]};return t.patch(e,f),t.applyData(e,f)}function zI(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function PI(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function _3(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const o=t.all(e),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const d=o[o.length-1];return d&&d.type==="text"?d.value+=i:o.push({type:"text",value:i}),o}function FI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return _3(t,e);const o={src:Cc(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return t.patch(e,l),t.applyData(e,l)}function HI(t,e){const n={src:Cc(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function UI(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function $I(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return _3(t,e);const o={href:Cc(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function qI(t,e){const n={href:Cc(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function VI(t,e,n){const i=t.all(e),o=n?WI(n):y3(e),l={},d=[];if(typeof e.checked=="boolean"){const p=i[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},i.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const p=i[a];(o||a!==0||p.type!=="element"||p.tagName!=="p")&&d.push({type:"text",value:`
540
- `}),p.type==="element"&&p.tagName==="p"&&!o?d.push(...p.children):d.push(p)}const u=i[i.length-1];u&&(o||u.type!=="element"||u.tagName!=="p")&&d.push({type:"text",value:`
541
- `});const f={type:"element",tagName:"li",properties:l,children:d};return t.patch(e,f),t.applyData(e,f)}function WI(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=y3(n[i])}return e}function y3(t){const e=t.spread;return e==null?t.children.length>1:e}function GI(t,e){const n={},i=t.all(e);let o=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++o<i.length;){const d=i[o];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,l),t.applyData(e,l)}function KI(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function YI(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function XI(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function QI(t,e){const n=t.all(e),i=n.shift(),o=[];if(i){const d={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],d),o.push(d)}if(n.length>0){const d={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=rv(e.children[1]),u=ZC(e.children[e.children.length-1]);a&&u&&(d.position={start:a,end:u}),o.push(d)}const l={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(e,l),t.applyData(e,l)}function ZI(t,e,n){const i=n?n.children:void 0,l=(i?i.indexOf(e):1)===0?"th":"td",d=n&&n.type==="table"?n.align:void 0,a=d?d.length:e.children.length;let u=-1;const f=[];for(;++u<a;){const h=e.children[u],v={},S=d?d[u]:void 0;S&&(v.align=S);let C={type:"element",tagName:l,properties:v,children:[]};h&&(C.children=t.all(h),t.patch(h,C),C=t.applyData(h,C)),f.push(C)}const p={type:"element",tagName:"tr",properties:{},children:t.wrap(f,!0)};return t.patch(e,p),t.applyData(e,p)}function JI(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const ix=9,sx=32;function eB(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),o=0;const l=[];for(;i;)l.push(ox(e.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(e);return l.push(ox(e.slice(o),o>0,!1)),l.join("")}function ox(t,e,n){let i=0,o=t.length;if(e){let l=t.codePointAt(i);for(;l===ix||l===sx;)i++,l=t.codePointAt(i)}if(n){let l=t.codePointAt(o-1);for(;l===ix||l===sx;)o--,l=t.codePointAt(o-1)}return o>i?t.slice(i,o):""}function tB(t,e){const n={type:"text",value:eB(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function nB(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const rB={blockquote:MI,break:jI,code:OI,delete:LI,emphasis:II,footnoteReference:BI,heading:zI,html:PI,imageReference:FI,image:HI,inlineCode:UI,linkReference:$I,link:qI,listItem:VI,list:GI,paragraph:KI,root:YI,strong:XI,table:QI,tableCell:JI,tableRow:ZI,text:tB,thematicBreak:nB,toml:xf,yaml:xf,definition:xf,footnoteDefinition:xf};function xf(){}const b3=-1,$h=0,Du=1,Qf=2,uv=3,dv=4,fv=5,hv=6,x3=7,S3=8,ax=typeof self=="object"?self:globalThis,iB=(t,e)=>{const n=(o,l)=>(t.set(l,o),o),i=o=>{if(t.has(o))return t.get(o);const[l,d]=e[o];switch(l){case $h:case b3:return n(d,o);case Du:{const a=n([],o);for(const u of d)a.push(i(u));return a}case Qf:{const a=n({},o);for(const[u,f]of d)a[i(u)]=i(f);return a}case uv:return n(new Date(d),o);case dv:{const{source:a,flags:u}=d;return n(new RegExp(a,u),o)}case fv:{const a=n(new Map,o);for(const[u,f]of d)a.set(i(u),i(f));return a}case hv:{const a=n(new Set,o);for(const u of d)a.add(i(u));return a}case x3:{const{name:a,message:u}=d;return n(new ax[a](u),o)}case S3:return n(BigInt(d),o);case"BigInt":return n(Object(BigInt(d)),o);case"ArrayBuffer":return n(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:a}=new Uint8Array(d);return n(new DataView(a),d)}}return n(new ax[l](d),o)};return i},lx=t=>iB(new Map,t)(0),Vl="",{toString:sB}={},{keys:oB}=Object,xu=t=>{const e=typeof t;if(e!=="object"||!t)return[$h,e];const n=sB.call(t).slice(8,-1);switch(n){case"Array":return[Du,Vl];case"Object":return[Qf,Vl];case"Date":return[uv,Vl];case"RegExp":return[dv,Vl];case"Map":return[fv,Vl];case"Set":return[hv,Vl];case"DataView":return[Du,n]}return n.includes("Array")?[Du,n]:n.includes("Error")?[x3,n]:[Qf,n]},Sf=([t,e])=>t===$h&&(e==="function"||e==="symbol"),aB=(t,e,n,i)=>{const o=(d,a)=>{const u=i.push(d)-1;return n.set(a,u),u},l=d=>{if(n.has(d))return n.get(d);let[a,u]=xu(d);switch(a){case $h:{let p=d;switch(u){case"bigint":a=S3,p=d.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return o([b3],d)}return o([a,p],d)}case Du:{if(u){let v=d;return u==="DataView"?v=new Uint8Array(d.buffer):u==="ArrayBuffer"&&(v=new Uint8Array(d)),o([u,[...v]],d)}const p=[],h=o([a,p],d);for(const v of d)p.push(l(v));return h}case Qf:{if(u)switch(u){case"BigInt":return o([u,d.toString()],d);case"Boolean":case"Number":case"String":return o([u,d.valueOf()],d)}if(e&&"toJSON"in d)return l(d.toJSON());const p=[],h=o([a,p],d);for(const v of oB(d))(t||!Sf(xu(d[v])))&&p.push([l(v),l(d[v])]);return h}case uv:return o([a,d.toISOString()],d);case dv:{const{source:p,flags:h}=d;return o([a,{source:p,flags:h}],d)}case fv:{const p=[],h=o([a,p],d);for(const[v,S]of d)(t||!(Sf(xu(v))||Sf(xu(S))))&&p.push([l(v),l(S)]);return h}case hv:{const p=[],h=o([a,p],d);for(const v of d)(t||!Sf(xu(v)))&&p.push(l(v));return h}}const{message:f}=d;return o([a,{name:u,message:f}],d)};return l},cx=(t,{json:e,lossy:n}={})=>{const i=[];return aB(!(e||n),!!e,new Map,i)(t),i},Zf=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?lx(cx(t,e)):structuredClone(t):(t,e)=>lx(cx(t,e));function lB(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function cB(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function uB(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||lB,i=t.options.footnoteBackLabel||cB,o=t.options.footnoteLabel||"Footnotes",l=t.options.footnoteLabelTagName||"h2",d=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<t.footnoteOrder.length;){const f=t.footnoteById.get(t.footnoteOrder[u]);if(!f)continue;const p=t.all(f),h=String(f.identifier).toUpperCase(),v=Cc(h.toLowerCase());let S=0;const C=[],w=t.footnoteCounts.get(h);for(;w!==void 0&&++S<=w;){C.length>0&&C.push({type:"text",value:" "});let y=typeof n=="string"?n:n(u,S);typeof y=="string"&&(y={type:"text",value:y}),C.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+v+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,S),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const _=p[p.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const y=_.children[_.children.length-1];y&&y.type==="text"?y.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...C)}else p.push(...C);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+v},children:t.wrap(p,!0)};t.patch(f,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Zf(d),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
542
- `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
543
- `}]}}const qh=(function(t){if(t==null)return pB;if(typeof t=="function")return Vh(t);if(typeof t=="object")return Array.isArray(t)?dB(t):fB(t);if(typeof t=="string")return hB(t);throw new Error("Expected function, string, or object as test")});function dB(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=qh(t[n]);return Vh(i);function i(...o){let l=-1;for(;++l<e.length;)if(e[l].apply(this,o))return!0;return!1}}function fB(t){const e=t;return Vh(n);function n(i){const o=i;let l;for(l in t)if(o[l]!==e[l])return!1;return!0}}function hB(t){return Vh(e);function e(n){return n&&n.type===t}}function Vh(t){return e;function e(n,i,o){return!!(mB(n)&&t.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function pB(){return!0}function mB(t){return t!==null&&typeof t=="object"&&"type"in t}const w3=[],gB=!0,Zg=!1,vB="skip";function C3(t,e,n,i){let o;typeof e=="function"&&typeof n!="function"?(i=n,n=e):o=e;const l=qh(o),d=i?-1:1;a(t,void 0,[])();function a(u,f,p){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const S=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(u.type+(S?"<"+S+">":""))+")"})}return v;function v(){let S=w3,C,w,_;if((!e||l(u,f,p[p.length-1]||void 0))&&(S=_B(n(u,p)),S[0]===Zg))return S;if("children"in u&&u.children){const b=u;if(b.children&&S[0]!==vB)for(w=(i?b.children.length:-1)+d,_=p.concat(b);w>-1&&w<b.children.length;){const y=b.children[w];if(C=a(y,w,_)(),C[0]===Zg)return C;w=typeof C[1]=="number"?C[1]:w+d}}return S}}}function _B(t){return Array.isArray(t)?t:typeof t=="number"?[gB,t]:t==null?w3:[t]}function pv(t,e,n,i){let o,l,d;typeof e=="function"&&typeof n!="function"?(l=void 0,d=e,o=n):(l=e,d=n,o=i),C3(t,l,a,o);function a(u,f){const p=f[f.length-1],h=p?p.children.indexOf(u):void 0;return d(u,h,p)}}const Jg={}.hasOwnProperty,yB={};function bB(t,e){const n=e||yB,i=new Map,o=new Map,l=new Map,d={...rB,...n.handlers},a={all:f,applyData:SB,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:d,one:u,options:n,patch:xB,wrap:CB};return pv(t,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?i:o,v=String(p.identifier).toUpperCase();h.has(v)||h.set(v,p)}}),a;function u(p,h){const v=p.type,S=a.handlers[v];if(Jg.call(a.handlers,v)&&S)return S(a,p,h);if(a.options.passThrough&&a.options.passThrough.includes(v)){if("children"in p){const{children:w,..._}=p,b=Zf(_);return b.children=a.all(p),b}return Zf(p)}return(a.options.unknownHandler||wB)(a,p,h)}function f(p){const h=[];if("children"in p){const v=p.children;let S=-1;for(;++S<v.length;){const C=a.one(v[S],p);if(C){if(S&&v[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=ux(C.value)),!Array.isArray(C)&&C.type==="element")){const w=C.children[0];w&&w.type==="text"&&(w.value=ux(w.value))}Array.isArray(C)?h.push(...C):h.push(C)}}}return h}}function xB(t,e){t.position&&(e.position=cL(t))}function SB(t,e){let n=e;if(t&&t.data){const i=t.data.hName,o=t.data.hChildren,l=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const d="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:d}}n.type==="element"&&l&&Object.assign(n.properties,Zf(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function wB(t,e){const n=e.data||{},i="value"in e&&!(Jg.call(n,"hProperties")||Jg.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function CB(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
544
- `});++i<t.length;)i&&n.push({type:"text",value:`
545
- `}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
546
- `}),n}function ux(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function dx(t,e){const n=bB(t,e),i=n.one(t,void 0),o=uB(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
547
- `},o),l}function kB(t,e){return t&&"run"in t?async function(n,i){const o=dx(n,{file:i,...e});await t.run(o,i)}:function(n,i){return dx(n,{file:i,...t||e})}}function fx(t){if(t)throw t}var ug,hx;function EB(){if(hx)return ug;hx=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):e.call(f)==="[object Array]"},l=function(f){if(!f||e.call(f)!=="[object Object]")return!1;var p=t.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&t.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var v;for(v in f);return typeof v>"u"||t.call(f,v)},d=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},a=function(f,p){if(p==="__proto__")if(t.call(f,p)){if(i)return i(f,p).value}else return;return f[p]};return ug=function u(){var f,p,h,v,S,C,w=arguments[0],_=1,b=arguments.length,y=!1;for(typeof w=="boolean"&&(y=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<b;++_)if(f=arguments[_],f!=null)for(p in f)h=a(w,p),v=a(f,p),w!==v&&(y&&v&&(l(v)||(S=o(v)))?(S?(S=!1,C=h&&o(h)?h:[]):C=h&&l(h)?h:{},d(w,{name:p,newValue:u(y,C,v)})):typeof v<"u"&&d(w,{name:p,newValue:v}));return w},ug}var AB=EB();const dg=eh(AB);function e1(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function RB(){const t=[],e={run:n,use:i};return e;function n(...o){let l=-1;const d=o.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);a(null,...o);function a(u,...f){const p=t[++l];let h=-1;if(u){d(u);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,p?TB(p,a)(...f):d(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),e}}function TB(t,e){let n;return i;function i(...d){const a=t.length>d.length;let u;a&&d.push(o);try{u=t.apply(this,d)}catch(f){const p=f;if(a&&n)throw p;return o(p)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,o):u instanceof Error?o(u):l(u))}function o(d,...a){n||(n=!0,e(d,...a))}function l(d){o(null,d)}}const Yi={basename:NB,dirname:DB,extname:MB,join:jB,sep:"/"};function NB(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');dd(t);let n=0,i=-1,o=t.length,l;if(e===void 0||e.length===0||e.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let d=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else d<0&&(l=!0,d=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(i=o):(a=-1,i=d));return n===i?i=d:i<0&&(i=t.length),t.slice(n,i)}function DB(t){if(dd(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function MB(t){dd(t);let e=t.length,n=-1,i=0,o=-1,l=0,d;for(;e--;){const a=t.codePointAt(e);if(a===47){if(d){i=e+1;break}continue}n<0&&(d=!0,n=e+1),a===46?o<0?o=e:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":t.slice(o,n)}function jB(...t){let e=-1,n;for(;++e<t.length;)dd(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":OB(n)}function OB(t){dd(t);const e=t.codePointAt(0)===47;let n=LB(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function LB(t,e){let n="",i=0,o=-1,l=0,d=-1,a,u;for(;++d<=t.length;){if(d<t.length)a=t.codePointAt(d);else{if(a===47)break;a=47}if(a===47){if(!(o===d-1||l===1))if(o!==d-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",i=0):(n=n.slice(0,u),i=n.length-1-n.lastIndexOf("/")),o=d,l=0;continue}}else if(n.length>0){n="",i=0,o=d,l=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(o+1,d):n=t.slice(o+1,d),i=d-o-1;o=d,l=0}else a===46&&l>-1?l++:l=-1}return n}function dd(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const IB={cwd:BB};function BB(){return"/"}function t1(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function zB(t){if(typeof t=="string")t=new URL(t);else if(!t1(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return PB(t)}function PB(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(e)}const fg=["history","path","basename","stem","extname","dirname"];class k3{constructor(e){let n;e?t1(e)?n={path:e}:typeof e=="string"||FB(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":IB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<fg.length;){const l=fg[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)fg.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Yi.basename(this.path):void 0}set basename(e){pg(e,"basename"),hg(e,"basename"),this.path=Yi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Yi.dirname(this.path):void 0}set dirname(e){px(this.basename,"dirname"),this.path=Yi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Yi.extname(this.path):void 0}set extname(e){if(hg(e,"extname"),px(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){t1(e)&&(e=zB(e)),pg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Yi.basename(this.path,this.extname):void 0}set stem(e){pg(e,"stem"),hg(e,"stem"),this.path=Yi.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const o=this.message(e,n,i);throw o.fatal=!0,o}info(e,n,i){const o=this.message(e,n,i);return o.fatal=void 0,o}message(e,n,i){const o=new Xn(e,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function hg(t,e){if(t&&t.includes(Yi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Yi.sep+"`")}function pg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function px(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function FB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const HB=(function(t){const i=this.constructor.prototype,o=i[t],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),UB={}.hasOwnProperty;class mv extends HB{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=RB()}copy(){const e=new mv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(dg(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(vg("data",this.frozen),this.namespace[e]=n,this):UB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(vg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(e,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=wf(e),i=this.parser||this.Parser;return mg("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),mg("process",this.parser||this.Parser),gg("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,d){const a=wf(e),u=i.parse(a);i.run(u,a,function(p,h,v){if(p||!h||!v)return f(p);const S=h,C=i.stringify(S,v);VB(C)?v.value=C:v.result=C,f(p,v)});function f(p,h){p||!h?d(p):l?l(h):n(void 0,h)}}}processSync(e){let n=!1,i;return this.freeze(),mg("processSync",this.parser||this.Parser),gg("processSync",this.compiler||this.Compiler),this.process(e,o),gx("processSync","process",n),i;function o(l,d){n=!0,fx(l),i=d}}run(e,n,i){mx(e),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(d,a){const u=wf(n);o.run(e,u,f);function f(p,h,v){const S=h||e;p?a(p):d?d(S):i(void 0,S,v)}}}runSync(e,n){let i=!1,o;return this.run(e,n,l),gx("runSync","run",i),o;function l(d,a){fx(d),o=a,i=!0}}stringify(e,n){this.freeze();const i=wf(n),o=this.compiler||this.Compiler;return gg("stringify",o),mx(e),o(e,i)}use(e,...n){const i=this.attachers,o=this.namespace;if(vg("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):d(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function l(f){if(typeof f=="function")u(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;u(p,h)}else d(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function d(f){if(!("plugins"in f)&&!("settings"in f))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");a(f.plugins),f.settings&&(o.settings=dg(!0,o.settings,f.settings))}function a(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const h=f[p];l(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function u(f,p){let h=-1,v=-1;for(;++h<i.length;)if(i[h][0]===f){v=h;break}if(v===-1)i.push([f,...p]);else if(p.length>0){let[S,...C]=p;const w=i[v][1];e1(w)&&e1(S)&&(S=dg(!0,w,S)),i[v]=[f,S,...C]}}}}const $B=new mv().freeze();function mg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function gg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function vg(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mx(t){if(!e1(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function gx(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function wf(t){return qB(t)?t:new k3(t)}function qB(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function VB(t){return typeof t=="string"||WB(t)}function WB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const GB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vx=[],_x={allowDangerousHtml:!0},KB=/^(https?|ircs?|mailto|xmpp)$/i,YB=[{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 XB(t){const e=QB(t),n=ZB(t);return JB(e.runSync(e.parse(n),n),t)}function QB(t){const e=t.rehypePlugins||vx,n=t.remarkPlugins||vx,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,..._x}:_x;return $B().use(DI).use(n).use(kB,i).use(e)}function ZB(t){const e=t.children||"",n=new k3;return typeof e=="string"&&(n.value=e),n}function JB(t,e){const n=e.allowedElements,i=e.allowElement,o=e.components,l=e.disallowedElements,d=e.skipHtml,a=e.unwrapDisallowed,u=e.urlTransform||ez;for(const p of YB)Object.hasOwn(e,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+GB+p.id,void 0);return pv(t,f),pL(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(p,h,v){if(p.type==="raw"&&v&&typeof h=="number")return d?v.children.splice(h,1):v.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let S;for(S in ag)if(Object.hasOwn(ag,S)&&Object.hasOwn(p.properties,S)){const C=p.properties[S],w=ag[S];(w===null||w.includes(p.tagName))&&(p.properties[S]=u(String(C||""),S,p))}}if(p.type==="element"){let S=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!S&&i&&typeof h=="number"&&(S=!i(p,h,v)),S&&v&&typeof h=="number")return a&&p.children?v.children.splice(h,1,...p.children):v.children.splice(h,1),h}}}function ez(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),o=t.indexOf("/");return e===-1||o!==-1&&e>o||n!==-1&&e>n||i!==-1&&e>i||KB.test(t.slice(0,e))?t:""}function yx(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(e);for(;o!==-1;)i++,o=n.indexOf(e,o+e.length);return i}function tz(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nz(t,e,n){const o=qh((n||{}).ignore||[]),l=rz(e);let d=-1;for(;++d<l.length;)C3(t,"text",a);function a(f,p){let h=-1,v;for(;++h<p.length;){const S=p[h],C=v?v.children:void 0;if(o(S,C?C.indexOf(S):void 0,v))return;v=S}if(v)return u(f,p)}function u(f,p){const h=p[p.length-1],v=l[d][0],S=l[d][1];let C=0;const _=h.children.indexOf(f);let b=!1,y=[];v.lastIndex=0;let x=v.exec(f.value);for(;x;){const k=x.index,N={index:x.index,input:x.input,stack:[...p,f]};let A=S(...x,N);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?v.lastIndex=k+1:(C!==k&&y.push({type:"text",value:f.value.slice(C,k)}),Array.isArray(A)?y.push(...A):A&&y.push(A),C=k+x[0].length,b=!0),!v.global)break;x=v.exec(f.value)}return b?(C<f.value.length&&y.push({type:"text",value:f.value.slice(C)}),h.children.splice(_,1,...y)):y=[f],_+y.length}}function rz(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const o=n[i];e.push([iz(o[0]),sz(o[1])])}return e}function iz(t){return typeof t=="string"?new RegExp(tz(t),"g"):t}function sz(t){return typeof t=="function"?t:function(){return t}}const _g="phrasing",yg=["autolink","link","image","label"];function oz(){return{transforms:[hz],enter:{literalAutolink:lz,literalAutolinkEmail:bg,literalAutolinkHttp:bg,literalAutolinkWww:bg},exit:{literalAutolink:fz,literalAutolinkEmail:dz,literalAutolinkHttp:cz,literalAutolinkWww:uz}}}function az(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_g,notInConstruct:yg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_g,notInConstruct:yg},{character:":",before:"[ps]",after:"\\/",inConstruct:_g,notInConstruct:yg}]}}function lz(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function bg(t){this.config.enter.autolinkProtocol.call(this,t)}function cz(t){this.config.exit.autolinkProtocol.call(this,t)}function uz(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function dz(t){this.config.exit.autolinkEmail.call(this,t)}function fz(t){this.exit(t)}function hz(t){nz(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pz],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),mz]],{ignore:["link","linkReference"]})}function pz(t,e,n,i,o){let l="";if(!E3(o)||(/^w/i.test(e)&&(n=e+n,e="",l="http://"),!gz(n)))return!1;const d=vz(n+i);if(!d[0])return!1;const a={type:"link",title:null,url:l+e+d[0],children:[{type:"text",value:e+d[0]}]};return d[1]?[a,{type:"text",value:d[1]}]:a}function mz(t,e,n,i){return!E3(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function gz(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function vz(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const o=yx(t,"(");let l=yx(t,")");for(;i!==-1&&o>l;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[t,n]}function E3(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ia(n)||Hh(n))&&(!e||n!==47)}A3.peek=Ez;function _z(){this.buffer()}function yz(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function bz(){this.buffer()}function xz(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Sz(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(t)).toLowerCase(),n.label=e}function wz(t){this.exit(t)}function Cz(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ti(this.sliceSerialize(t)).toLowerCase(),n.label=e}function kz(t){this.exit(t)}function Ez(){return"["}function A3(t,e,n,i){const o=n.createTracker(i);let l=o.move("[^");const d=n.enter("footnoteReference"),a=n.enter("reference");return l+=o.move(n.safe(n.associationId(t),{after:"]",before:l})),a(),d(),l+=o.move("]"),l}function Az(){return{enter:{gfmFootnoteCallString:_z,gfmFootnoteCall:yz,gfmFootnoteDefinitionLabelString:bz,gfmFootnoteDefinition:xz},exit:{gfmFootnoteCallString:Sz,gfmFootnoteCall:wz,gfmFootnoteDefinitionLabelString:Cz,gfmFootnoteDefinition:kz}}}function Rz(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:A3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,d){const a=l.createTracker(d);let u=a.move("[^");const f=l.enter("footnoteDefinition"),p=l.enter("label");return u+=a.move(l.safe(l.associationId(i),{before:u,after:"]"})),p(),u+=a.move("]:"),i.children&&i.children.length>0&&(a.shift(4),u+=a.move((e?`
548
- `:" ")+l.indentLines(l.containerFlow(i,a.current()),e?R3:Tz))),f(),u}}function Tz(t,e,n){return e===0?t:R3(t,e,n)}function R3(t,e,n){return(n?"":" ")+t}const Nz=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];T3.peek=Lz;function Dz(){return{canContainEols:["delete"],enter:{strikethrough:jz},exit:{strikethrough:Oz}}}function Mz(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Nz}],handlers:{delete:T3}}}function jz(t){this.enter({type:"delete",children:[]},t)}function Oz(t){this.exit(t)}function T3(t,e,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let d=o.move("~~");return d+=n.containerPhrasing(t,{...o.current(),before:d,after:"~"}),d+=o.move("~~"),l(),d}function Lz(){return"~"}function Iz(t){return t.length}function Bz(t,e){const n=e||{},i=(n.align||[]).concat(),o=n.stringLength||Iz,l=[],d=[],a=[],u=[];let f=0,p=-1;for(;++p<t.length;){const w=[],_=[];let b=-1;for(t[p].length>f&&(f=t[p].length);++b<t[p].length;){const y=zz(t[p][b]);if(n.alignDelimiters!==!1){const x=o(y);_[b]=x,(u[b]===void 0||x>u[b])&&(u[b]=x)}w.push(y)}d[p]=w,a[p]=_}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<f;)l[h]=bx(i[h]);else{const w=bx(i);for(;++h<f;)l[h]=w}h=-1;const v=[],S=[];for(;++h<f;){const w=l[h];let _="",b="";w===99?(_=":",b=":"):w===108?_=":":w===114&&(b=":");let y=n.alignDelimiters===!1?1:Math.max(1,u[h]-_.length-b.length);const x=_+"-".repeat(y)+b;n.alignDelimiters!==!1&&(y=_.length+y+b.length,y>u[h]&&(u[h]=y),S[h]=y),v[h]=x}d.splice(1,0,v),a.splice(1,0,S),p=-1;const C=[];for(;++p<d.length;){const w=d[p],_=a[p];h=-1;const b=[];for(;++h<f;){const y=w[h]||"";let x="",k="";if(n.alignDelimiters!==!1){const N=u[h]-(_[h]||0),A=l[h];A===114?x=" ".repeat(N):A===99?N%2?(x=" ".repeat(N/2+.5),k=" ".repeat(N/2-.5)):(x=" ".repeat(N/2),k=x):k=" ".repeat(N)}n.delimiterStart!==!1&&!h&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||h)&&b.push(" "),n.alignDelimiters!==!1&&b.push(x),b.push(y),n.alignDelimiters!==!1&&b.push(k),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&b.push("|")}C.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return C.join(`
549
- `)}function zz(t){return t==null?"":String(t)}function bx(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Pz(t,e,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const d=n.indentLines(n.containerFlow(t,l.current()),Fz);return o(),d}function Fz(t,e,n){return">"+(n?"":" ")+t}function Hz(t,e){return xx(t,e.inConstruct,!0)&&!xx(t,e.notInConstruct,!1)}function xx(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function Sx(t,e,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
550
- `&&Hz(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
551
- `}function Uz(t,e){const n=String(t);let i=n.indexOf(e),o=i,l=0,d=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>d&&(d=l):l=1,o=i+e.length,i=n.indexOf(e,o);return d}function $z(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function qz(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Vz(t,e,n,i){const o=qz(n),l=t.value||"",d=o==="`"?"GraveAccent":"Tilde";if($z(t,n)){const h=n.enter("codeIndented"),v=n.indentLines(l,Wz);return h(),v}const a=n.createTracker(i),u=o.repeat(Math.max(Uz(l,o)+1,3)),f=n.enter("codeFenced");let p=a.move(u);if(t.lang){const h=n.enter(`codeFencedLang${d}`);p+=a.move(n.safe(t.lang,{before:p,after:" ",encode:["`"],...a.current()})),h()}if(t.lang&&t.meta){const h=n.enter(`codeFencedMeta${d}`);p+=a.move(" "),p+=a.move(n.safe(t.meta,{before:p,after:`
552
- `,encode:["`"],...a.current()})),h()}return p+=a.move(`
553
- `),l&&(p+=a.move(l+`
554
- `)),p+=a.move(u),f(),p}function Wz(t,e,n){return(n?"":" ")+t}function gv(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function Gz(t,e,n,i){const o=gv(n),l=o==='"'?"Quote":"Apostrophe",d=n.enter("definition");let a=n.enter("label");const u=n.createTracker(i);let f=u.move("[");return f+=u.move(n.safe(n.associationId(t),{before:f,after:"]",...u.current()})),f+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(a=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":`
555
- `,...u.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=u.move(" "+o),f+=u.move(n.safe(t.title,{before:f,after:o,...u.current()})),f+=u.move(o),a()),d(),f}function Kz(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function qu(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Jf(t,e,n){const i=ac(t),o=ac(e);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}N3.peek=Yz;function N3(t,e,n,i){const o=Kz(n),l=n.enter("emphasis"),d=n.createTracker(i),a=d.move(o);let u=d.move(n.containerPhrasing(t,{after:o,before:a,...d.current()}));const f=u.charCodeAt(0),p=Jf(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(u=qu(f)+u.slice(1));const h=u.charCodeAt(u.length-1),v=Jf(i.after.charCodeAt(0),h,o);v.inside&&(u=u.slice(0,-1)+qu(h));const S=d.move(o);return l(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},a+u+S}function Yz(t,e,n){return n.options.emphasis||"*"}function Xz(t,e){let n=!1;return pv(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Zg}),!!((!t.depth||t.depth<3)&&av(t)&&(e.options.setext||n))}function Qz(t,e,n,i){const o=Math.max(Math.min(6,t.depth||1),1),l=n.createTracker(i);if(Xz(t,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),v=n.containerPhrasing(t,{...l.current(),before:`
556
- `,after:`
557
- `});return h(),p(),v+`
558
- `+(o===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
559
- `))+1))}const d="#".repeat(o),a=n.enter("headingAtx"),u=n.enter("phrasing");l.move(d+" ");let f=n.containerPhrasing(t,{before:"# ",after:`
560
- `,...l.current()});return/^[\t ]/.test(f)&&(f=qu(f.charCodeAt(0))+f.slice(1)),f=f?d+" "+f:d,n.options.closeAtx&&(f+=" "+d),u(),a(),f}D3.peek=Zz;function D3(t){return t.value||""}function Zz(){return"<"}M3.peek=Jz;function M3(t,e,n,i){const o=gv(n),l=o==='"'?"Quote":"Apostrophe",d=n.enter("image");let a=n.enter("label");const u=n.createTracker(i);let f=u.move("![");return f+=u.move(n.safe(t.alt,{before:f,after:"]",...u.current()})),f+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(a=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=u.move(" "+o),f+=u.move(n.safe(t.title,{before:f,after:o,...u.current()})),f+=u.move(o),a()),f+=u.move(")"),d(),f}function Jz(){return"!"}j3.peek=eP;function j3(t,e,n,i){const o=t.referenceType,l=n.enter("imageReference");let d=n.enter("label");const a=n.createTracker(i);let u=a.move("![");const f=n.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(f+"]["),d();const p=n.stack;n.stack=[],d=n.enter("reference");const h=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return d(),n.stack=p,l(),o==="full"||!f||f!==h?u+=a.move(h+"]"):o==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function eP(){return"!"}O3.peek=tP;function O3(t,e,n){let i=t.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const d=n.unsafe[l],a=n.compilePattern(d);let u;if(d.atBreak)for(;u=a.exec(i);){let f=u.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(u.index+1)}}return o+i+o}function tP(){return"`"}function L3(t,e){const n=av(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}I3.peek=nP;function I3(t,e,n,i){const o=gv(n),l=o==='"'?"Quote":"Apostrophe",d=n.createTracker(i);let a,u;if(L3(t,n)){const p=n.stack;n.stack=[],a=n.enter("autolink");let h=d.move("<");return h+=d.move(n.containerPhrasing(t,{before:h,after:">",...d.current()})),h+=d.move(">"),a(),n.stack=p,h}a=n.enter("link"),u=n.enter("label");let f=d.move("[");return f+=d.move(n.containerPhrasing(t,{before:f,after:"](",...d.current()})),f+=d.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":")",...d.current()}))),u(),t.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(t.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),f+=d.move(")"),a(),f}function nP(t,e,n){return L3(t,n)?"<":"["}B3.peek=rP;function B3(t,e,n,i){const o=t.referenceType,l=n.enter("linkReference");let d=n.enter("label");const a=n.createTracker(i);let u=a.move("[");const f=n.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(f+"]["),d();const p=n.stack;n.stack=[],d=n.enter("reference");const h=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return d(),n.stack=p,l(),o==="full"||!f||f!==h?u+=a.move(h+"]"):o==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function rP(){return"["}function vv(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function iP(t){const e=vv(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sP(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function z3(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function oP(t,e,n,i){const o=n.enter("list"),l=n.bulletCurrent;let d=t.ordered?sP(n):vv(n);const a=t.ordered?d==="."?")":".":iP(n);let u=e&&n.bulletLastUsed?d===n.bulletLastUsed:!1;if(!t.ordered){const p=t.children?t.children[0]:void 0;if((d==="*"||d==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),z3(n)===d&&p){let h=-1;for(;++h<t.children.length;){const v=t.children[h];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(d=a),n.bulletCurrent=d;const f=n.containerFlow(t,i);return n.bulletLastUsed=d,n.bulletCurrent=l,o(),f}function aP(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function lP(t,e,n,i){const o=aP(n);let l=n.bulletCurrent||vv(n);e&&e.type==="list"&&e.ordered&&(l=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+l);let d=l.length+1;(o==="tab"||o==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(d=Math.ceil(d/4)*4);const a=n.createTracker(i);a.move(l+" ".repeat(d-l.length)),a.shift(d);const u=n.enter("listItem"),f=n.indentLines(n.containerFlow(t,a.current()),p);return u(),f;function p(h,v,S){return v?(S?"":" ".repeat(d))+h:(S?l:l+" ".repeat(d-l.length))+h}}function cP(t,e,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),d=n.containerPhrasing(t,i);return l(),o(),d}const uP=qh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dP(t,e,n,i){return(t.children.some(function(d){return uP(d)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function fP(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}P3.peek=hP;function P3(t,e,n,i){const o=fP(n),l=n.enter("strong"),d=n.createTracker(i),a=d.move(o+o);let u=d.move(n.containerPhrasing(t,{after:o,before:a,...d.current()}));const f=u.charCodeAt(0),p=Jf(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(u=qu(f)+u.slice(1));const h=u.charCodeAt(u.length-1),v=Jf(i.after.charCodeAt(0),h,o);v.inside&&(u=u.slice(0,-1)+qu(h));const S=d.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:v.outside,before:p.outside},a+u+S}function hP(t,e,n){return n.options.strong||"*"}function pP(t,e,n,i){return n.safe(t.value,i)}function mP(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function gP(t,e,n){const i=(z3(n)+(n.options.ruleSpaces?" ":"")).repeat(mP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const F3={blockquote:Pz,break:Sx,code:Vz,definition:Gz,emphasis:N3,hardBreak:Sx,heading:Qz,html:D3,image:M3,imageReference:j3,inlineCode:O3,link:I3,linkReference:B3,list:oP,listItem:lP,paragraph:cP,root:dP,strong:P3,text:pP,thematicBreak:gP};function vP(){return{enter:{table:_P,tableData:wx,tableHeader:wx,tableRow:bP},exit:{codeText:xP,table:yP,tableData:xg,tableHeader:xg,tableRow:xg}}}function _P(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function yP(t){this.exit(t),this.data.inTable=void 0}function bP(t){this.enter({type:"tableRow",children:[]},t)}function xg(t){this.exit(t)}function wx(t){this.enter({type:"tableCell",children:[]},t)}function xP(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,SP));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function SP(t,e){return e==="|"?e:t}function wP(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,o=e.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
561
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:d,tableCell:u,tableRow:a}};function d(S,C,w,_){return f(p(S,w,_),S.align)}function a(S,C,w,_){const b=h(S,w,_),y=f([b]);return y.slice(0,y.indexOf(`
562
- `))}function u(S,C,w,_){const b=w.enter("tableCell"),y=w.enter("phrasing"),x=w.containerPhrasing(S,{..._,before:l,after:l});return y(),b(),x}function f(S,C){return Bz(S,{align:C,alignDelimiters:i,padding:n,stringLength:o})}function p(S,C,w){const _=S.children;let b=-1;const y=[],x=C.enter("table");for(;++b<_.length;)y[b]=h(_[b],C,w);return x(),y}function h(S,C,w){const _=S.children;let b=-1;const y=[],x=C.enter("tableRow");for(;++b<_.length;)y[b]=u(_[b],S,C,w);return x(),y}function v(S,C,w){let _=F3.inlineCode(S,C,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function CP(){return{exit:{taskListCheckValueChecked:Cx,taskListCheckValueUnchecked:Cx,paragraph:EP}}}function kP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AP}}}function Cx(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function EP(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=e.children;let l=-1,d;for(;++l<o.length;){const a=o[l];if(a.type==="paragraph"){d=a;break}}d===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function AP(t,e,n,i){const o=t.children[0],l=typeof t.checked=="boolean"&&o&&o.type==="paragraph",d="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);l&&a.move(d);let u=F3.listItem(t,e,n,{...i,...a.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),u;function f(p){return p+d}}function RP(){return[oz(),Az(),Dz(),vP(),CP()]}function TP(t){return{extensions:[az(),Rz(t),Mz(),wP(t),kP()]}}const NP={tokenize:IP,partial:!0},H3={tokenize:BP,partial:!0},U3={tokenize:zP,partial:!0},$3={tokenize:PP,partial:!0},DP={tokenize:FP,partial:!0},q3={name:"wwwAutolink",tokenize:OP,previous:W3},V3={name:"protocolAutolink",tokenize:LP,previous:G3},Hs={name:"emailAutolink",tokenize:jP,previous:K3},ns={};function MP(){return{text:ns}}let Ra=48;for(;Ra<123;)ns[Ra]=Hs,Ra++,Ra===58?Ra=65:Ra===91&&(Ra=97);ns[43]=Hs;ns[45]=Hs;ns[46]=Hs;ns[95]=Hs;ns[72]=[Hs,V3];ns[104]=[Hs,V3];ns[87]=[Hs,q3];ns[119]=[Hs,q3];function jP(t,e,n){const i=this;let o,l;return d;function d(h){return!n1(h)||!K3.call(i,i.previous)||_v(i.events)?n(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(h))}function a(h){return n1(h)?(t.consume(h),a):h===64?(t.consume(h),u):n(h)}function u(h){return h===46?t.check(DP,p,f)(h):h===45||h===95||Yn(h)?(l=!0,t.consume(h),u):p(h)}function f(h){return t.consume(h),o=!0,u}function p(h){return l&&o&&tr(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):n(h)}}function OP(t,e,n){const i=this;return o;function o(d){return d!==87&&d!==119||!W3.call(i,i.previous)||_v(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(NP,t.attempt(H3,t.attempt(U3,l),n),n)(d))}function l(d){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(d)}}function LP(t,e,n){const i=this;let o="",l=!1;return d;function d(h){return(h===72||h===104)&&G3.call(i,i.previous)&&!_v(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),t.consume(h),a):n(h)}function a(h){if(tr(h)&&o.length<5)return o+=String.fromCodePoint(h),t.consume(h),a;if(h===58){const v=o.toLowerCase();if(v==="http"||v==="https")return t.consume(h),u}return n(h)}function u(h){return h===47?(t.consume(h),l?f:(l=!0,u)):n(h)}function f(h){return h===null||Xf(h)||Ut(h)||Ia(h)||Hh(h)?n(h):t.attempt(H3,t.attempt(U3,p),n)(h)}function p(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function IP(t,e,n){let i=0;return o;function o(d){return(d===87||d===119)&&i<3?(i++,t.consume(d),o):d===46&&i===3?(t.consume(d),l):n(d)}function l(d){return d===null?n(d):e(d)}}function BP(t,e,n){let i,o,l;return d;function d(f){return f===46||f===95?t.check($3,u,a)(f):f===null||Ut(f)||Ia(f)||f!==45&&Hh(f)?u(f):(l=!0,t.consume(f),d)}function a(f){return f===95?i=!0:(o=i,i=void 0),t.consume(f),d}function u(f){return o||i||!l?n(f):e(f)}}function zP(t,e){let n=0,i=0;return o;function o(d){return d===40?(n++,t.consume(d),o):d===41&&i<n?l(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?t.check($3,e,l)(d):d===null||Ut(d)||Ia(d)?e(d):(t.consume(d),o)}function l(d){return d===41&&i++,t.consume(d),o}}function PP(t,e,n){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),i):a===38?(t.consume(a),l):a===93?(t.consume(a),o):a===60||a===null||Ut(a)||Ia(a)?e(a):n(a)}function o(a){return a===null||a===40||a===91||Ut(a)||Ia(a)?e(a):i(a)}function l(a){return tr(a)?d(a):n(a)}function d(a){return a===59?(t.consume(a),i):tr(a)?(t.consume(a),d):n(a)}}function FP(t,e,n){return i;function i(l){return t.consume(l),o}function o(l){return Yn(l)?n(l):e(l)}}function W3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ut(t)}function G3(t){return!tr(t)}function K3(t){return!(t===47||n1(t))}function n1(t){return t===43||t===45||t===46||t===95||Yn(t)}function _v(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const HP={tokenize:YP,partial:!0};function UP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:WP,continuation:{tokenize:GP},exit:KP}},text:{91:{name:"gfmFootnoteCall",tokenize:VP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$P,resolveTo:qP}}}}function $P(t,e,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let d;for(;o--;){const u=i.events[o][1];if(u.type==="labelImage"){d=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!d||!d._balanced)return n(u);const f=Ti(i.sliceSerialize({start:d.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function qP(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",o,e],["exit",o,e],["enter",l,e],["enter",d,e],["exit",d,e],["exit",l,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function VP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,d;return a;function a(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?n(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",f)}function f(h){if(l>999||h===93&&!d||h===null||h===91||Ut(h))return n(h);if(h===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return o.includes(Ti(i.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return Ut(h)||(d=!0),l++,t.consume(h),h===92?p:f}function p(h){return h===91||h===92||h===93?(t.consume(h),l++,f):f(h)}}function WP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,d=0,a;return u;function u(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",p):n(C)}function p(C){if(d>999||C===93&&!a||C===null||C===91||Ut(C))return n(C);if(C===93){t.exit("chunkString");const w=t.exit("gfmFootnoteDefinitionLabelString");return l=Ti(i.sliceSerialize(w)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return Ut(C)||(a=!0),d++,t.consume(C),C===92?h:p}function h(C){return C===91||C===92||C===93?(t.consume(C),d++,p):p(C)}function v(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),o.includes(l)||o.push(l),Et(t,S,"gfmFootnoteDefinitionWhitespace")):n(C)}function S(C){return e(C)}}function GP(t,e,n){return t.check(ud,e,t.attempt(HP,e,n))}function KP(t){t.exit("gfmFootnoteDefinition")}function YP(t,e,n){const i=this;return Et(t,o,"gfmFootnoteDefinitionIndent",5);function o(l){const d=i.events[i.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?e(l):n(l)}}function XP(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(d,a){let u=-1;for(;++u<d.length;)if(d[u][0]==="enter"&&d[u][1].type==="strikethroughSequenceTemporary"&&d[u][1]._close){let f=u;for(;f--;)if(d[f][0]==="exit"&&d[f][1].type==="strikethroughSequenceTemporary"&&d[f][1]._open&&d[u][1].end.offset-d[u][1].start.offset===d[f][1].end.offset-d[f][1].start.offset){d[u][1].type="strikethroughSequence",d[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},d[f][1].start),end:Object.assign({},d[u][1].end)},h={type:"strikethroughText",start:Object.assign({},d[f][1].end),end:Object.assign({},d[u][1].start)},v=[["enter",p,a],["enter",d[f][1],a],["exit",d[f][1],a],["enter",h,a]],S=a.parser.constructs.insideSpan.null;S&&Hr(v,v.length,0,Uh(S,d.slice(f+1,u),a)),Hr(v,v.length,0,[["exit",h,a],["enter",d[u][1],a],["exit",d[u][1],a],["exit",p,a]]),Hr(d,f-1,u-f+3,v),u=f+v.length-2;break}}for(u=-1;++u<d.length;)d[u][1].type==="strikethroughSequenceTemporary"&&(d[u][1].type="data");return d}function l(d,a,u){const f=this.previous,p=this.events;let h=0;return v;function v(C){return f===126&&p[p.length-1][1].type!=="characterEscape"?u(C):(d.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const w=ac(f);if(C===126)return h>1?u(C):(d.consume(C),h++,S);if(h<2&&!n)return u(C);const _=d.exit("strikethroughSequenceTemporary"),b=ac(C);return _._open=!b||b===2&&!!w,_._close=!w||w===2&&!!b,a(C)}}}class QP{constructor(){this.map=[]}add(e,n,i){ZP(this,e,n,i)}consume(e){if(this.map.sort(function(l,d){return l[0]-d[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push(e.slice()),e.length=0;let o=i.pop();for(;o;){for(const l of o)e.push(l);o=i.pop()}this.map.length=0}}function ZP(t,e,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<t.map.length;){if(t.map[o][0]===e){t.map[o][1]+=n,t.map[o][2].push(...i);return}o+=1}t.map.push([e,n,i])}}function JP(t,e){let n=!1;const i=[];for(;e<t.length;){const o=t[e];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function eF(){return{flow:{null:{name:"table",tokenize:tF,resolveAll:nF}}}}function tF(t,e,n){const i=this;let o=0,l=0,d;return a;function a(O){let z=i.events.length-1;for(;z>-1;){const V=i.events[z][1].type;if(V==="lineEnding"||V==="linePrefix")z--;else break}const q=z>-1?i.events[z][1].type:null,$=q==="tableHead"||q==="tableRow"?A:u;return $===A&&i.parser.lazy[i.now().line]?n(O):$(O)}function u(O){return t.enter("tableHead"),t.enter("tableRow"),f(O)}function f(O){return O===124||(d=!0,l+=1),p(O)}function p(O){return O===null?n(O):nt(O)?l>1?(l=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):n(O):xt(O)?Et(t,p,"whitespace")(O):(l+=1,d&&(d=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),d=!0,p):(t.enter("data"),h(O)))}function h(O){return O===null||O===124||Ut(O)?(t.exit("data"),p(O)):(t.consume(O),O===92?v:h)}function v(O){return O===92||O===124?(t.consume(O),h):h(O)}function S(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(O):(t.enter("tableDelimiterRow"),d=!1,xt(O)?Et(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?_(O):O===124?(d=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),w):N(O)}function w(O){return xt(O)?Et(t,_,"whitespace")(O):_(O)}function _(O){return O===58?(l+=1,d=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),b):O===45?(l+=1,b(O)):O===null||nt(O)?k(O):N(O)}function b(O){return O===45?(t.enter("tableDelimiterFiller"),y(O)):N(O)}function y(O){return O===45?(t.consume(O),y):O===58?(d=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),x):(t.exit("tableDelimiterFiller"),x(O))}function x(O){return xt(O)?Et(t,k,"whitespace")(O):k(O)}function k(O){return O===124?C(O):O===null||nt(O)?!d||o!==l?N(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(O)):N(O)}function N(O){return n(O)}function A(O){return t.enter("tableRow"),M(O)}function M(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),M):O===null||nt(O)?(t.exit("tableRow"),e(O)):xt(O)?Et(t,M,"whitespace")(O):(t.enter("data"),T(O))}function T(O){return O===null||O===124||Ut(O)?(t.exit("data"),M(O)):(t.consume(O),O===92?j:T)}function j(O){return O===92||O===124?(t.consume(O),T):T(O)}}function nF(t,e){let n=-1,i=!0,o=0,l=[0,0,0,0],d=[0,0,0,0],a=!1,u=0,f,p,h;const v=new QP;for(;++n<t.length;){const S=t[n],C=S[1];S[0]==="enter"?C.type==="tableHead"?(a=!1,u!==0&&(kx(v,e,u,f,p),p=void 0,u=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(n,0,[["enter",f,e]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,h=void 0,l=[0,0,0,0],d=[0,n+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(n,0,[["enter",p,e]])),o=C.type==="tableDelimiterRow"?2:p?3:1):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,d[2]===0&&(l[1]!==0&&(d[0]=d[1],h=Cf(v,e,l,o,void 0,h),l=[0,0,0,0]),d[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(d[0]=d[1],h=Cf(v,e,l,o,void 0,h)),l=d,d=[l[1],n,0,0])):C.type==="tableHead"?(a=!0,u=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(u=n,l[1]!==0?(d[0]=d[1],h=Cf(v,e,l,o,n,h)):d[1]!==0&&(h=Cf(v,e,d,o,n,h)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(d[3]=n)}for(u!==0&&kx(v,e,u,f,p),v.consume(e.events),n=-1;++n<e.events.length;){const S=e.events[n];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=JP(e.events,n))}return t}function Cf(t,e,n,i,o,l){const d=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(l.end=Object.assign({},Kl(e.events,n[0])),t.add(n[0],0,[["exit",l,e]]));const u=Kl(e.events,n[1]);if(l={type:d,start:Object.assign({},u),end:Object.assign({},u)},t.add(n[1],0,[["enter",l,e]]),n[2]!==0){const f=Kl(e.events,n[2]),p=Kl(e.events,n[3]),h={type:a,start:Object.assign({},f),end:Object.assign({},p)};if(t.add(n[2],0,[["enter",h,e]]),i!==2){const v=e.events[n[2]],S=e.events[n[3]];if(v[1].end=Object.assign({},S[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,w=n[3]-n[2]-1;t.add(C,w,[])}}t.add(n[3]+1,0,[["exit",h,e]])}return o!==void 0&&(l.end=Object.assign({},Kl(e.events,o)),t.add(o,0,[["exit",l,e]]),l=void 0),l}function kx(t,e,n,i,o){const l=[],d=Kl(e.events,n);o&&(o.end=Object.assign({},d),l.push(["exit",o,e])),i.end=Object.assign({},d),l.push(["exit",i,e]),t.add(n+1,0,l)}function Kl(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const rF={name:"tasklistCheck",tokenize:sF};function iF(){return{text:{91:rF}}}function sF(t,e,n){const i=this;return o;function o(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),l)}function l(u){return Ut(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),d):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),d):n(u)}function d(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(u)}function a(u){return nt(u)?e(u):xt(u)?t.check({tokenize:oF},e,n)(u):n(u)}}function oF(t,e,n){return Et(t,i,"whitespace");function i(o){return o===null?n(o):e(o)}}function aF(t){return s3([MP(),UP(),XP(t),eF(),iF()])}const lF={};function cF(t){const e=this,n=t||lF,i=e.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),d=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(aF(n)),l.push(RP()),d.push(TP(n))}function uF(t){const e=me.c(11),{children:n,className:i,inverted:o}=t,l=o===void 0?!1:o;let d;e[0]!==i?(d=Ee("visualization-container markdown-render overflow-x-auto wrap-break-words break",i),e[0]=i,e[1]=d):d=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[cF],e[2]=a):a=e[2];let u;e[3]!==l?(u={code(h){const{className:v,children:S,...C}=h,w=/language-(\w+)/.exec(v||""),_=w?w[1]:"",b=!_,y=Array.isArray(S)?S.join(""):String(S);return!b&&_?g.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:g.jsx(ev,{theme:l?Uu.nightOwl:Uu.oneDark,code:y.trim(),language:_,children:dF})}):g.jsx("code",{className:Ee("px-1.5 py-0.5 rounded text-sm font-mono",l?"bg-primary-foreground/20 text-primary-foreground":"bg-muted",v),...C,children:S})},a(h){const{href:v,children:S,...C}=h;return g.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:Ee("underline underline-offset-2 transition-colors",l?"text-primary-foreground/80 hover:text-primary-foreground":"text-primary hover:text-primary/80"),...C,children:S})},p(h){const{children:v}=h;return g.jsx("p",{className:"last:mb-0 leading-relaxed wrap-break-words",children:v})},ul(h){const{children:v}=h;return g.jsx("ul",{className:"list-outside list-disc pl-8",children:v})},ol(h){const{children:v}=h;return g.jsx("ol",{className:"list-outside list-decimal pl-8",children:v})},li(h){const{children:v,className:S}=h,C=S==null?void 0:S.includes("nested");return g.jsx("li",{className:Ee("leading-snug",C&&"ml-8"),children:v})},h1(h){const{children:v}=h;return g.jsx("h1",{className:"text-lg font-semibold mb-1.5 mt-3 first:mt-0",children:v})},h2(h){const{children:v}=h;return g.jsx("h2",{className:"text-base font-semibold mb-1.5 mt-2.5 first:mt-0",children:v})},h3(h){const{children:v}=h;return g.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:v})},blockquote(h){const{children:v}=h;return g.jsx("blockquote",{className:Ee("border-l-2 pl-3 my-1.5 italic",l?"border-primary-foreground/40 text-primary-foreground/70":"border-muted-foreground/40 text-muted-foreground"),children:v})},strong(h){const{children:v}=h;return g.jsx("strong",{className:Ee("font-semibold",l&&"text-primary-foreground"),children:v})},em(h){const{children:v}=h;return g.jsx("em",{className:"italic",children:v})},hr(){return g.jsx("hr",{className:Ee("my-3",l?"border-primary-foreground/30":"border-border")})},table(h){const{children:v}=h;return g.jsx("div",{className:"my-2 overflow-x-auto max-w-full",children:g.jsx("table",{className:"w-full border-collapse text-sm",children:v})})},th(h){const{children:v}=h;return g.jsx("th",{className:Ee("border border-border px-2 py-1.5 text-left font-semibold",l?"bg-primary-foreground/10 text-primary-foreground":"bg-muted"),children:v})},td(h){const{children:v}=h;return g.jsx("td",{className:Ee("border px-2 py-1.5",l?"border-primary-foreground/20":"border-border"),children:v})}},e[3]=l,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=g.jsx(XB,{remarkPlugins:a,components:u,children:n}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let p;return e[8]!==d||e[9]!==f?(p=g.jsx("div",{className:d,children:f}),e[8]=d,e[9]=f,e[10]=p):p=e[10],p}function dF(t){const{className:e,style:n,tokens:i,getLineProps:o,getTokenProps:l}=t;return g.jsx("pre",{className:Ee("rounded-lg text-sm p-3",e),style:n,children:i.map((d,a)=>g.jsx("div",{...o({line:d}),children:d.map((u,f)=>g.jsx("span",{...l({token:u})},f))},a))})}function Ex(t){return t.filter(e=>e.type==="text").map(e=>e.text).join("")}function fF(t,e){const n=e.findIndex(i=>i.message.id===t);if(n<=0)return null;for(let i=n-1;i>=0;i--){const o=e[i];if(o.message.role==="assistant"&&o.message.status!=="streaming")return o.message.id}return null}function hF(t,e){const n=t.map(d=>({message:d.message,parts:d.parts,isQueued:!1})),i=e.map(d=>({message:{id:d.id,role:"user",sessionId:d.sessionId,createdAt:d.createdAt},parts:[{id:`${d.id}-part`,messageId:d.id,createdAt:d.createdAt,type:"text",text:d.content}],isQueued:!0,queueId:d.id})),o=[...n].sort((d,a)=>d.message.createdAt-a.message.createdAt),l=[...i].sort((d,a)=>d.message.createdAt-a.message.createdAt);return[...o,...l]}function pF(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-muted-foreground bg-muted/50 rounded-lg px-3 py-2 border border-border",children:[g.jsx(Hx,{className:"size-4 animate-pulse"}),g.jsx("span",{children:"Compacting conversation..."})]}),t[0]=e):e=t[0],e}function mF(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-green-600 dark:text-green-400 bg-green-500/10 rounded-lg px-3 py-2 border border-green-500/20",children:[g.jsx(ZE,{className:"size-4"}),g.jsx("span",{children:"Compaction complete"})]}),t[0]=e):e=t[0],e}function gF(t){const e=me.c(8),{message:n,textContent:i,onRetry:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsxs("div",{className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-destructive ml-3",children:[g.jsx(ju,{className:"size-3"}),"Compaction Failed"]}),e[0]=l):l=e[0];const d=i||n.error||"Compaction failed. The conversation could not be summarized.";let a;e[1]!==d?(a=g.jsx("p",{className:"text-sm text-destructive/90",children:d}),e[1]=d,e[2]=a):a=e[2];let u;e[3]!==o?(u=o&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:o,className:"mt-2 h-7 text-xs gap-1.5",children:[g.jsx($x,{className:"size-3"}),"Retry"]}),e[3]=o,e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==u?(f=g.jsxs("div",{className:"flex flex-col gap-1 mb-4 animate-slide-up min-w-0",children:[l,g.jsxs("div",{className:"rounded-2xl px-4 py-3 max-w-full bg-destructive/10 border border-destructive/30 rounded-bl-md",children:[a,u]})]}),e[5]=a,e[6]=u,e[7]=f):f=e[7],f}function vF(t){const e=me.c(15),{part:n}=t,[i,o]=D.useState(!1),l=n.overflow?"overflow":n.auto?"auto":"manual";let d;e[0]!==i?(d=()=>o(!i),e[0]=i,e[1]=d):d=e[1];let a;e[2]!==i?(a=i?g.jsx(lc,{className:"size-3"}):g.jsx(Ni,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];const u=l==="overflow"?"Context overflow":l==="auto"?"Auto":"Manual";let f;e[4]!==u?(f=g.jsxs("span",{className:"border-b border-dashed border-muted-foreground/40 pb-px",children:[u," compaction"]}),e[4]=u,e[5]=f):f=e[5];let p;e[6]!==d||e[7]!==a||e[8]!==f?(p=g.jsxs("button",{onClick:d,className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[a,f]}),e[6]=d,e[7]=a,e[8]=f,e[9]=p):p=e[9];let h;e[10]!==i?(h=i&&g.jsx("div",{className:"mt-2 text-xs text-muted-foreground italic",children:"Summary available in the assistant message below"}),e[10]=i,e[11]=h):h=e[11];let v;return e[12]!==p||e[13]!==h?(v=g.jsxs("div",{className:"flex flex-col items-center my-4",children:[p,h]}),e[12]=p,e[13]=h,e[14]=v):v=e[14],v}function _F(t){const e=me.c(13),{parts:n,pendingPermissions:i,onPermissionResponse:o,onNavigateToSubagent:l,inverted:d}=t,a=d===void 0?!1:d;let u;if(e[0]!==a||e[1]!==l||e[2]!==o||e[3]!==n||e[4]!==i){const p=[...n].sort(yF);let h;e[6]!==a||e[7]!==l||e[8]!==o||e[9]!==i?(h=v=>{switch(v.type){case"text":return g.jsx("div",{className:"min-w-0",children:g.jsx(uF,{inverted:a,children:v.text||"..."})},v.id);case"reasoning":return g.jsx("div",{className:"visualization-container text-muted-foreground text-sm italic border-l-2 border-muted-foreground/30 pl-3 my-2 wrap-break-word",children:v.text},v.id);case"tool":return g.jsx(T7,{part:v,pendingPermissions:i,onPermissionResponse:o,onNavigateToSubagent:l},v.id);case"image":return g.jsx("img",{src:v.url,alt:"",className:"max-w-full rounded-lg mt-2"},v.id);case"file":return g.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-sm",children:v.filename||"unnamed"},v.id);default:return null}},e[6]=a,e[7]=l,e[8]=o,e[9]=i,e[10]=h):h=e[10],u=p.map(h),e[0]=a,e[1]=l,e[2]=o,e[3]=n,e[4]=i,e[5]=u}else u=e[5];let f;return e[11]!==u?(f=g.jsx(g.Fragment,{children:u}),e[11]=u,e[12]=f):f=e[12],f}function yF(t,e){return t.createdAt-e.createdAt}function bF(t){const e=me.c(70),{session:n,messagesWithParts:i,queuedMessages:o,preconfigs:l,prompts:d,models:a,connectedProviderIds:u,connectableProviderIds:f,defaultModel:p,onSendMessage:h,onRemoveFromQueue:v,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,pendingPermissions:_,onPermissionResponse:b,onRename:y,usage:x,modelName:k,onNavigateToSubagent:N,onNavigateBack:A,isStreaming:M,onInterrupt:T,onRevert:j,onFork:O,onCompact:z,isCompacting:q,compactionSuccess:$,onClearCompactionSuccess:V,serverUrl:K,apiToken:G,selectedVariant:Y,variants:Q,inputRef:I}=t,B=!n.parentId&&n.status==="active";let H,F;e[0]!==$||e[1]!==V?(H=()=>{if($){const xe=setTimeout(()=>{V==null||V()},3e3);return()=>clearTimeout(xe)}},F=[$,V],e[0]=$,e[1]=V,e[2]=H,e[3]=F):(H=e[2],F=e[3]),D.useEffect(H,F);const J=D.useRef(null),[ne,Z]=D.useState(!0),W=hF(i,o);let U;e[4]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{Z(!0),J.current&&(J.current.scrollTop=J.current.scrollHeight)},e[4]=U):U=e[4];let te;e[5]!==n.id?(te=[n.id],e[5]=n.id,e[6]=te):te=e[6],D.useEffect(U,te);let ie;e[7]!==ne?(ie=()=>{J.current&&ne&&(J.current.scrollTop=J.current.scrollHeight)},e[7]=ne,e[8]=ie):ie=e[8];let ae;e[9]!==ne||e[10]!==i?(ae=[i,ne],e[9]=ne,e[10]=i,e[11]=ae):ae=e[11],D.useEffect(ie,ae);let se,ge;e[12]===Symbol.for("react.memo_cache_sentinel")?(se=()=>{const xe=J.current;if(!xe)return;const ze=()=>{const{scrollHeight:Ve,scrollTop:_t,clientHeight:_e}=xe,Ye=Ve-_t-_e;Z(Ye<150)};return xe.addEventListener("scroll",ze,{passive:!0}),()=>xe.removeEventListener("scroll",ze)},ge=[],e[12]=se,e[13]=ge):(se=e[12],ge=e[13]),D.useEffect(se,ge);let Te;e[14]!==i||e[15]!==n.id?(Te=xe=>xe.sessionId!==n.id?!1:!i.some(ze=>ze.parts.some(Ve=>Ve.type==="tool"&&Ve.callId===xe.toolCallId)),e[14]=i,e[15]=n.id,e[16]=Te):Te=e[16];const Me=_.filter(Te),Ke="flex flex-col flex-1 min-h-0",Re=i.length>=4;let et;e[17]!==f||e[18]!==u||e[19]!==p||e[20]!==q||e[21]!==M||e[22]!==k||e[23]!==a||e[24]!==C||e[25]!==S||e[26]!==w||e[27]!==z||e[28]!==T||e[29]!==A||e[30]!==y||e[31]!==l||e[32]!==Y||e[33]!==n||e[34]!==Re||e[35]!==x||e[36]!==Q?(et=g.jsx(tO,{session:n,preconfigs:l,models:a,defaultModel:p,usage:x,modelName:k,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,onRename:y,onNavigateBack:A,isStreaming:M,onInterrupt:T,onCompact:z,isCompacting:q,canCompact:Re,connectedProviderIds:u,connectableProviderIds:f,selectedVariant:Y,variants:Q}),e[17]=f,e[18]=u,e[19]=p,e[20]=q,e[21]=M,e[22]=k,e[23]=a,e[24]=C,e[25]=S,e[26]=w,e[27]=z,e[28]=T,e[29]=A,e[30]=y,e[31]=l,e[32]=Y,e[33]=n,e[34]=Re,e[35]=x,e[36]=Q,e[37]=et):et=e[37];let Ze;e[38]!==q?(Ze=q&&g.jsx(pF,{}),e[38]=q,e[39]=Ze):Ze=e[39];let Ge;e[40]!==$?(Ge=$&&g.jsx(mF,{}),e[40]=$,e[41]=Ge):Ge=e[41];let rt;e[42]!==n.status?(rt=n.status==="closed"&&g.jsx(Tf,{className:"mx-4 mt-4",children:g.jsx(Nf,{children:"This session is archived. You can reopen it from the sidebar."})}),e[42]=n.status,e[43]=rt):rt=e[43];const ue=Sc,ct="flex-1 min-h-0",it="p-4",ut=W.length===0?g.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[g.jsx("p",{className:"text-lg mb-2",children:"Start a conversation"}),g.jsx("p",{className:"text-sm",children:"Send a message below to begin."})]}):W.map(xe=>{const ze=xe.parts.find(xF);if(Bj(xe.message)&&xe.message.mode==="compact_failed")return g.jsx(gF,{message:xe.message,textContent:Ex(xe.parts),onRetry:B&&!q?z:void 0},xe.message.id);if(ze)return g.jsx(vF,{part:ze},xe.message.id);const _t=!xe.isQueued&&xe.message.role==="user",_e=_t?fF(xe.message.id,i):null;return g.jsx(nO,{message:xe.message,textContent:Ex(xe.parts),isQueued:xe.isQueued,onRemove:xe.isQueued?()=>v(xe.queueId):void 0,canRevert:_t&&_e!==null,onRevert:_e?()=>j==null?void 0:j(n.id,_e):void 0,canFork:_t&&_e!==null,onFork:_e?()=>O==null?void 0:O(n.id,xe.message.id):void 0,children:xe.parts.length===0?g.jsx("span",{className:"opacity-50",children:"..."}):g.jsx(_F,{parts:xe.parts,pendingPermissions:_,onPermissionResponse:b,onNavigateToSubagent:N,inverted:xe.message.role==="user"})},xe.message.id)}),ce=Me.length>0&&g.jsx("div",{className:"mt-4 flex flex-col gap-2",children:Me.map(xe=>{var Ve;const ze=typeof((Ve=xe.args)==null?void 0:Ve.command)=="string"?xe.args.command:JSON.stringify(xe.args,null,2);return g.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/30 rounded-lg flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-sm font-medium",children:xe.toolName}),g.jsx("span",{className:"text-xs text-muted-foreground",children:xe.permissionType})]}),g.jsx("p",{className:"text-sm",children:xe.message}),g.jsxs(Lo,{children:[g.jsx(Io,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(Ni,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Bo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words",children:ze})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>b(xe.toolCallId,!1,!1),children:"Deny"}),g.jsx(Pe,{variant:"secondary",size:"sm",onClick:()=>b(xe.toolCallId,!0,!1),children:"Approve"}),g.jsx(Pe,{size:"sm",onClick:()=>b(xe.toolCallId,!0,!0),children:"Always Allow"})]})]},xe.toolCallId)})});let be;e[44]!==ut||e[45]!==ce?(be=g.jsxs("div",{className:it,children:[ut,ce]}),e[44]=ut,e[45]=ce,e[46]=be):be=e[46];let ke;e[47]!==ue||e[48]!==be?(ke=g.jsx(ue,{className:ct,ref:J,children:be}),e[47]=ue,e[48]=be,e[49]=ke):ke=e[49];let je;e[50]!==G||e[51]!==I||e[52]!==q||e[53]!==h||e[54]!==d||e[55]!==K||e[56]!==n.parentId||e[57]!==n.status||e[58]!==n.workspaceId?(je=n.status==="active"&&!n.parentId&&g.jsx(L7,{ref:I,onSendMessage:h,disabled:q,workspaceId:n.workspaceId,serverUrl:K,apiToken:G,prompts:d}),e[50]=G,e[51]=I,e[52]=q,e[53]=h,e[54]=d,e[55]=K,e[56]=n.parentId,e[57]=n.status,e[58]=n.workspaceId,e[59]=je):je=e[59];let Le;e[60]!==n.parentId?(Le=n.parentId&&g.jsxs("div",{className:"p-4 border-t border-border bg-muted/50 text-center flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[g.jsx(j4,{className:"size-4"}),"This is a subagent session (read-only)"]}),e[60]=n.parentId,e[61]=Le):Le=e[61];let lt;return e[62]!==et||e[63]!==Ze||e[64]!==Ge||e[65]!==rt||e[66]!==ke||e[67]!==je||e[68]!==Le?(lt=g.jsxs("div",{className:Ke,children:[et,Ze,Ge,rt,ke,je,Le]}),e[62]=et,e[63]=Ze,e[64]=Ge,e[65]=rt,e[66]=ke,e[67]=je,e[68]=Le,e[69]=lt):lt=e[69],lt}function xF(t){return t.type==="compaction"}function SF(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"horizontal":o;let d;e[4]!==n?(d=Ee("group/tabs flex gap-2 data-horizontal:flex-col",n),e[4]=n,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==i||e[8]!==d?(a=g.jsx(BD,{"data-slot":"tabs","data-orientation":l,className:d,...i}),e[6]=l,e[7]=i,e[8]=d,e[9]=a):a=e[9],a}const wF=fc("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function CF(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"default":o;let d;e[4]!==n||e[5]!==l?(d=Ee(wF({variant:l}),n),e[4]=n,e[5]=l,e[6]=d):d=e[6];let a;return e[7]!==i||e[8]!==d||e[9]!==l?(a=g.jsx(zD,{"data-slot":"tabs-list","data-variant":l,className:d,...i}),e[7]=i,e[8]=d,e[9]=l,e[10]=a):a=e[10],a}function Su(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(PD,{"data-slot":"tabs-trigger",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function wu(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex-1 text-sm outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(FD,{"data-slot":"tabs-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ax(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Rx(t){const e=me.c(29),{permission:n,onRevoke:i}=t,o=!!n.revokedAt,l=o?"outline":"secondary";let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Vx,{className:"size-3","data-icon":"inline-start"}),e[0]=d):d=e[0];let a;e[1]!==n.permissionType||e[2]!==l?(a=g.jsxs(Kn,{variant:l,children:[d,n.permissionType]}),e[1]=n.permissionType,e[2]=l,e[3]=a):a=e[3];let u;e[4]!==o?(u=o&&g.jsx(Kn,{variant:"outline",className:"text-muted-foreground",children:"Revoked"}),e[4]=o,e[5]=u):u=e[5];let f;e[6]!==a||e[7]!==u?(f=g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a,u]}),e[6]=a,e[7]=u,e[8]=f):f=e[8];let p;e[9]!==n.permissionKey?(p=g.jsx("p",{className:"text-sm font-mono truncate text-muted-foreground",children:n.permissionKey}),e[9]=n.permissionKey,e[10]=p):p=e[10];let h;e[11]!==n.grantedAt?(h=Ax(n.grantedAt),e[11]=n.grantedAt,e[12]=h):h=e[12];let v;e[13]!==n.revokedAt?(v=n.revokedAt&&` • Revoked ${Ax(n.revokedAt)}`,e[13]=n.revokedAt,e[14]=v):v=e[14];let S;e[15]!==h||e[16]!==v?(S=g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",h,v]}),e[15]=h,e[16]=v,e[17]=S):S=e[17];let C;e[18]!==f||e[19]!==p||e[20]!==S?(C=g.jsxs("div",{className:"flex-1 min-w-0",children:[f,p,S]}),e[18]=f,e[19]=p,e[20]=S,e[21]=C):C=e[21];let w;e[22]!==o||e[23]!==i||e[24]!==n.id?(w=!o&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>i(n.id),className:"size-8 text-destructive hover:text-destructive",children:g.jsx(uc,{className:"size-4"})}),e[22]=o,e[23]=i,e[24]=n.id,e[25]=w):w=e[25];let _;return e[26]!==C||e[27]!==w?(_=g.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border last:border-0",children:[C,w]}),e[26]=C,e[27]=w,e[28]=_):_=e[28],_}function kF(t){const e=me.c(30),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:d,cancelLabel:a,variant:u,onConfirm:f,onCancel:p}=t,h=d===void 0?"Confirm":d,v=a===void 0?"Cancel":a,S=u===void 0?"default":u;let C;e[0]!==p||e[1]!==i?(C=()=>{p==null||p(),i(!1)},e[0]=p,e[1]=i,e[2]=C):C=e[2];const w=C;let _;e[3]!==f||e[4]!==i?(_=()=>{f(),i(!1)},e[3]=f,e[4]=i,e[5]=_):_=e[5];const b=_;let y;e[6]!==o?(y=g.jsx(xc,{children:o}),e[6]=o,e[7]=y):y=e[7];let x;e[8]!==l?(x=g.jsx(sd,{children:l}),e[8]=l,e[9]=x):x=e[9];let k;e[10]!==y||e[11]!==x?(k=g.jsxs(bc,{children:[y,x]}),e[10]=y,e[11]=x,e[12]=k):k=e[12];let N;e[13]!==v||e[14]!==w?(N=g.jsx(Pe,{variant:"outline",onClick:w,children:v}),e[13]=v,e[14]=w,e[15]=N):N=e[15];const A=S==="destructive"?"destructive":"default";let M;e[16]!==h||e[17]!==b||e[18]!==A?(M=g.jsx(Pe,{variant:A,onClick:b,children:h}),e[16]=h,e[17]=b,e[18]=A,e[19]=M):M=e[19];let T;e[20]!==M||e[21]!==N?(T=g.jsxs(Nh,{children:[N,M]}),e[20]=M,e[21]=N,e[22]=T):T=e[22];let j;e[23]!==T||e[24]!==k?(j=g.jsxs(yc,{className:"sm:max-w-[425px]",children:[k,T]}),e[23]=T,e[24]=k,e[25]=j):j=e[25];let O;return e[26]!==i||e[27]!==n||e[28]!==j?(O=g.jsx(_c,{open:n,onOpenChange:i,children:j}),e[26]=i,e[27]=n,e[28]=j,e[29]=O):O=e[29],O}function EF(t){const e=me.c(48),{provider:n,onConnect:i,onDisconnect:o}=t,[l,d]=D.useState(!1);let a,u;e[0]!==n.connected||e[1]!==n.error?(a=()=>{(n.error||n.connected)&&d(!1)},u=[n.error,n.connected],e[0]=n.connected,e[1]=n.error,e[2]=a,e[3]=u):(a=e[2],u=e[3]),D.useEffect(a,u);let f,p;e[4]!==n.authorizationUrl?(f=()=>{n.authorizationUrl&&d(!1)},p=[n.authorizationUrl],e[4]=n.authorizationUrl,e[5]=f,e[6]=p):(f=e[5],p=e[6]),D.useEffect(f,p);let h;e[7]!==i?(h=()=>{d(!0),i()},e[7]=i,e[8]=h):h=e[8];const v=h;let S;e[9]!==o?(S=()=>{o()},e[9]=o,e[10]=S):S=e[10];const C=S,w=`size-2 rounded-full ${n.connected?"bg-green-500":"bg-muted-foreground"}`;let _;e[11]!==w?(_=g.jsx("div",{className:w}),e[11]=w,e[12]=_):_=e[12];const b=n.displayName||n.provider;let y;e[13]!==b?(y=g.jsx("span",{className:"text-sm font-medium",children:b}),e[13]=b,e[14]=y):y=e[14];let x;e[15]!==y||e[16]!==_?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[_,y]}),e[15]=y,e[16]=_,e[17]=x):x=e[17];let k;e[18]!==n.connected?(k=n.connected&&g.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"}),e[18]=n.connected,e[19]=k):k=e[19];let N;e[20]!==x||e[21]!==k?(N=g.jsxs("div",{className:"flex items-center justify-between",children:[x,k]}),e[20]=x,e[21]=k,e[22]=N):N=e[22];let A;e[23]!==n.error?(A=n.error&&g.jsx("p",{className:"text-xs text-destructive",children:n.error}),e[23]=n.error,e[24]=A):A=e[24];let M;e[25]!==n.connected||e[26]!==n.connectedAt?(M=n.connected&&n.connectedAt&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Connected ",new Date(n.connectedAt).toLocaleDateString()]}),e[25]=n.connected,e[26]=n.connectedAt,e[27]=M):M=e[27];let T;e[28]!==v||e[29]!==l||e[30]!==n.authorizationUrl||e[31]!==n.connected?(T=!n.connected&&!n.authorizationUrl&&g.jsxs(Pe,{size:"sm",onClick:v,disabled:l,children:[l?g.jsx(zr,{className:"size-3 animate-spin","data-icon":"inline-start"}):null,"Connect"]}),e[28]=v,e[29]=l,e[30]=n.authorizationUrl,e[31]=n.connected,e[32]=T):T=e[32];let j;e[33]!==n.authorizationUrl||e[34]!==n.connected?(j=!n.connected&&n.authorizationUrl&&g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("a",{href:n.authorizationUrl,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs text-blue-500 underline break-all",children:n.authorizationUrl}),g.jsxs(Pe,{variant:"outline",size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.authorizationUrl)}catch{}},children:[g.jsx(Mu,{className:"size-3","data-icon":"inline-start"}),"Copy URL"]})]}),e[33]=n.authorizationUrl,e[34]=n.connected,e[35]=j):j=e[35];let O;e[36]!==C||e[37]!==n.connected?(O=n.connected&&g.jsxs(Pe,{variant:"destructive",size:"sm",onClick:C,children:[g.jsx(_5,{className:"size-3","data-icon":"inline-start"}),"Disconnect"]}),e[36]=C,e[37]=n.connected,e[38]=O):O=e[38];let z;e[39]!==T||e[40]!==j||e[41]!==O?(z=g.jsxs("div",{className:"flex gap-2",children:[T,j,O]}),e[39]=T,e[40]=j,e[41]=O,e[42]=z):z=e[42];let q;return e[43]!==N||e[44]!==A||e[45]!==M||e[46]!==z?(q=g.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border p-4",children:[N,A,M,z]}),e[43]=N,e[44]=A,e[45]=M,e[46]=z,e[47]=q):q=e[47],q}function AF(t){const e=me.c(10),{token:n,onLogout:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("span",{className:"text-muted-foreground",children:"Token:"}),e[0]=o):o=e[0];let l;e[1]!==n?(l=H5(n),e[1]=n,e[2]=l):l=e[2];let d;e[3]!==l?(d=g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o,g.jsx("code",{className:"font-mono text-foreground bg-background px-1.5 py-0.5 rounded text-[10px]",children:l})]}),e[3]=l,e[4]=d):d=e[4];let a;e[5]!==i?(a=g.jsx(Pe,{variant:"destructive",size:"sm",onClick:i,title:"Disconnect and clear token",children:"Logout"}),e[5]=i,e[6]=a):a=e[6];let u;return e[7]!==d||e[8]!==a?(u=g.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md bg-muted",children:[d,a]}),e[7]=d,e[8]=a,e[9]=u):u=e[9],u}const RF={neutral:{label:"Neutral",colors:["bg-zinc-400","bg-zinc-600","bg-zinc-800"]},ocean:{label:"Ocean",colors:["bg-sky-300","bg-sky-500","bg-slate-700"]},forest:{label:"Forest",colors:["bg-emerald-300","bg-emerald-500","bg-green-800"]},sunset:{label:"Sunset",colors:["bg-orange-300","bg-amber-500","bg-orange-800"]},amethyst:{label:"Amethyst",colors:["bg-violet-300","bg-violet-500","bg-purple-800"]}};function Cu(t){const e=me.c(15),{scheme:n,currentScheme:i,onClick:o}=t,l=n===i,d=RF[n];let a;e[0]!==o||e[1]!==n?(a=()=>o(n),e[0]=o,e[1]=n,e[2]=a):a=e[2];const u=`
563
- flex flex-col items-center gap-1.5 p-2 rounded-lg border transition-all
564
- ${l?"border-primary bg-primary/5":"border-border bg-transparent hover:bg-muted/50"}
565
- `,f=d.label;let p;e[3]!==d.colors?(p=d.colors.map(TF),e[3]=d.colors,e[4]=p):p=e[4];let h;e[5]!==p?(h=g.jsx("div",{className:"flex gap-0.5",children:p}),e[5]=p,e[6]=h):h=e[6];let v;e[7]!==n?(v=g.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:n}),e[7]=n,e[8]=v):v=e[8];let S;return e[9]!==d.label||e[10]!==a||e[11]!==u||e[12]!==h||e[13]!==v?(S=g.jsxs("button",{type:"button",onClick:a,className:u,title:f,children:[h,v]}),e[9]=d.label,e[10]=a,e[11]=u,e[12]=h,e[13]=v,e[14]=S):S=e[14],S}function TF(t,e){return g.jsx("div",{className:`w-4 h-4 rounded-full ${t}`},e)}function NF(t){var Me;const e=me.c(218),{open:n,onOpenChange:i,permissions:o,onRefreshPermissions:l,onRevokePermission:d,onRevokeAllPermissions:a,apiToken:u,onLogout:f,providerStatuses:p,onConnectProvider:h,onDisconnectProvider:v,chatFinishSoundEnabled:S,onChatFinishSoundEnabledChange:C,permissionSoundEnabled:w,onPermissionSoundEnabledChange:_}=t,{mode:b,scheme:y,setMode:x,setScheme:k}=kE(),[N,A]=D.useState(!1),T=((Me=navigator.userAgentData)==null?void 0:Me.platform)==="macOS"||/mac|iphone|ipad|ipod/i.test(navigator.userAgent)?"⌘":"Ctrl";let j,O,z,q,$,V,K,G,Y,Q,I,L,B,H,F,J,ne,Z,W;if(e[0]!==u||e[1]!==S||e[2]!==b||e[3]!==C||e[4]!==h||e[5]!==v||e[6]!==f||e[7]!==i||e[8]!==_||e[9]!==l||e[10]!==d||e[11]!==n||e[12]!==w||e[13]!==o||e[14]!==p||e[15]!==y||e[16]!==x||e[17]!==k){const Ke=[{keys:[T,"1"],description:"Open session list"},{keys:[T,"T"],description:"Open terminal"},{keys:[T,"O"],description:"Toggle overview mode"},{keys:[T,"N"],description:"New session"},{keys:[T,"Shift","N"],description:"New window"},{keys:["Shift","Esc"],description:"Close focused panel"},{keys:["Shift","Enter"],description:"New line in input"},{keys:["Enter"],description:"Send message"},{keys:["↑","↓","←","→"],description:"Navigate sessions"},{keys:["Esc"],description:"Focus chat input"},{keys:["Esc","Esc"],description:"Stop streaming (chat input focused)"}];let Re,et,Ze,Ge,rt,ue,ct,it,ut,ce,be;if(e[37]!==u||e[38]!==S||e[39]!==b||e[40]!==C||e[41]!==f||e[42]!==i||e[43]!==_||e[44]!==l||e[45]!==d||e[46]!==n||e[47]!==w||e[48]!==o||e[49]!==y||e[50]!==x||e[51]!==k){const xe=o.filter(jF),ze=o.filter(MF);q=_c,Q=n,I=i,z=yc,G="sm:max-w-[700px] max-h-[80vh]",e[75]===Symbol.for("react.memo_cache_sentinel")?(Y=g.jsxs(bc,{children:[g.jsx(xc,{children:"Settings"}),g.jsx(sd,{children:"Manage your preferences and permissions"})]}),e[75]=Y):Y=e[75],O=SF,F="account",J="mt-4";let Ve;e[76]===Symbol.for("react.memo_cache_sentinel")?(Ve=g.jsxs(Su,{value:"account",children:[g.jsx(Gx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Account"})]}),e[76]=Ve):Ve=e[76];let _t;e[77]===Symbol.for("react.memo_cache_sentinel")?(_t=g.jsxs(Su,{value:"appearance",children:[g.jsx(U4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Appearance"})]}),e[77]=_t):_t=e[77];let _e,Ye;e[78]===Symbol.for("react.memo_cache_sentinel")?(_e=g.jsx(Vx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),Ye=g.jsx("span",{className:"hidden sm:inline",children:"Permissions"}),e[78]=_e,e[79]=Ye):(_e=e[78],Ye=e[79]);const st=xe.length>0&&g.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex size-3.5 items-center justify-center rounded-full bg-primary text-[8px] font-bold leading-none text-primary-foreground sm:static sm:flex sm:size-auto sm:ml-1.5 sm:px-1.5 sm:py-0.5 sm:text-xs sm:font-medium sm:leading-normal",children:xe.length});let St;e[80]!==st?(St=g.jsxs(Su,{value:"permissions",children:[_e,Ye,st]}),e[80]=st,e[81]=St):St=e[81];let Pt;e[82]===Symbol.for("react.memo_cache_sentinel")?(Pt=g.jsxs(Su,{value:"providers",children:[g.jsx(N4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Providers"})]}),e[82]=Pt):Pt=e[82];let Ft;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ft=g.jsxs(Su,{value:"keybinds",children:[g.jsx(C4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Keybinds"})]}),e[83]=Ft):Ft=e[83],e[84]!==St?(ne=g.jsxs(CF,{className:"grid w-full grid-cols-5",children:[Ve,_t,St,Pt,Ft]}),e[84]=St,e[85]=ne):ne=e[85];let Gt,$t;e[86]===Symbol.for("react.memo_cache_sentinel")?(Gt=g.jsx(Ri,{className:"text-sm font-medium",children:"Session"}),$t=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),e[86]=Gt,e[87]=$t):(Gt=e[86],$t=e[87]),e[88]!==u||e[89]!==f?(Z=g.jsx(wu,{value:"account",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[Gt,$t,u?g.jsx(AF,{token:u,onLogout:f}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]})})}),e[88]=u,e[89]=f,e[90]=Z):Z=e[90];let Tn,Nn;e[91]===Symbol.for("react.memo_cache_sentinel")?(Tn=g.jsx(Ri,{className:"text-sm font-medium",children:"Mode"}),Nn=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose light, dark, or system theme"}),e[91]=Tn,e[92]=Nn):(Tn=e[91],Nn=e[92]);const Xt=b==="light"?"default":"outline";let an;e[93]!==x?(an=()=>x("light"),e[93]=x,e[94]=an):an=e[94];let Kt;e[95]===Symbol.for("react.memo_cache_sentinel")?(Kt=g.jsx(d5,{className:"size-4","data-icon":"inline-start"}),e[95]=Kt):Kt=e[95];let Un;e[96]!==Xt||e[97]!==an?(Un=g.jsxs(Pe,{variant:Xt,className:"justify-start",onClick:an,children:[Kt,"Light"]}),e[96]=Xt,e[97]=an,e[98]=Un):Un=e[98];const li=b==="dark"?"default":"outline";let rr;e[99]!==x?(rr=()=>x("dark"),e[99]=x,e[100]=rr):rr=e[100];let ci;e[101]===Symbol.for("react.memo_cache_sentinel")?(ci=g.jsx(F4,{className:"size-4","data-icon":"inline-start"}),e[101]=ci):ci=e[101];let $r;e[102]!==li||e[103]!==rr?($r=g.jsxs(Pe,{variant:li,className:"justify-start",onClick:rr,children:[ci,"Dark"]}),e[102]=li,e[103]=rr,e[104]=$r):$r=e[104];const ui=b==="system"?"default":"outline";let qr;e[105]!==x?(qr=()=>x("system"),e[105]=x,e[106]=qr):qr=e[106];let pn;e[107]===Symbol.for("react.memo_cache_sentinel")?(pn=g.jsx(z4,{className:"size-4","data-icon":"inline-start"}),e[107]=pn):pn=e[107];let Cn;e[108]!==ui||e[109]!==qr?(Cn=g.jsxs(Pe,{variant:ui,className:"justify-start",onClick:qr,children:[pn,"System"]}),e[108]=ui,e[109]=qr,e[110]=Cn):Cn=e[110];let Qt;e[111]!==Un||e[112]!==$r||e[113]!==Cn?(Qt=g.jsxs("div",{children:[Tn,Nn,g.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[Un,$r,Cn]})]}),e[111]=Un,e[112]=$r,e[113]=Cn,e[114]=Qt):Qt=e[114];let Nt,Zt;e[115]===Symbol.for("react.memo_cache_sentinel")?(Nt=g.jsx(To,{}),Zt=g.jsx(Ri,{className:"text-sm font-medium mb-3 block",children:"Notification Sounds"}),e[115]=Nt,e[116]=Zt):(Nt=e[115],Zt=e[116]);let Dn;e[117]===Symbol.for("react.memo_cache_sentinel")?(Dn=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(x5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Chat completion"})]}),e[117]=Dn):Dn=e[117];let Mn;e[118]!==S||e[119]!==C?(Mn=()=>C(!S),e[118]=S,e[119]=C,e[120]=Mn):Mn=e[120];const di=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-primary":"bg-muted"}`,Vr=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`;let _r;e[121]!==Vr?(_r=g.jsx("span",{className:Vr}),e[121]=Vr,e[122]=_r):_r=e[122];let $n;e[123]!==Mn||e[124]!==di||e[125]!==_r?($n=g.jsxs("div",{className:"flex items-center justify-between",children:[Dn,g.jsx("button",{type:"button",onClick:Mn,className:di,children:_r})]}),e[123]=Mn,e[124]=di,e[125]=_r,e[126]=$n):$n=e[126];let yr;e[127]===Symbol.for("react.memo_cache_sentinel")?(yr=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(w5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Permission requests"})]}),e[127]=yr):yr=e[127];let jn;e[128]!==_||e[129]!==w?(jn=()=>_(!w),e[128]=_,e[129]=w,e[130]=jn):jn=e[130];const Qn=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${w?"bg-primary":"bg-muted"}`,ir=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${w?"translate-x-6":"translate-x-1"}`;let qn;e[131]!==ir?(qn=g.jsx("span",{className:ir}),e[131]=ir,e[132]=qn):qn=e[132];let Mt;e[133]!==jn||e[134]!==Qn||e[135]!==qn?(Mt=g.jsxs("div",{className:"flex items-center justify-between",children:[yr,g.jsx("button",{type:"button",onClick:jn,className:Qn,children:qn})]}),e[133]=jn,e[134]=Qn,e[135]=qn,e[136]=Mt):Mt=e[136];let br;e[137]!==$n||e[138]!==Mt?(br=g.jsxs("div",{children:[Zt,g.jsxs("div",{className:"flex flex-col gap-3",children:[$n,Mt]})]}),e[137]=$n,e[138]=Mt,e[139]=br):br=e[139];let Oi,Vn,mn;e[140]===Symbol.for("react.memo_cache_sentinel")?(Oi=g.jsx(To,{}),Vn=g.jsx(Ri,{className:"text-sm font-medium",children:"Color Scheme"}),mn=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color palette"}),e[140]=Oi,e[141]=Vn,e[142]=mn):(Oi=e[140],Vn=e[141],mn=e[142]);let xr;e[143]!==y||e[144]!==k?(xr=g.jsxs("div",{children:[Vn,mn,g.jsxs("div",{className:"grid grid-cols-5 gap-2",children:[g.jsx(Cu,{scheme:"neutral",currentScheme:y,onClick:k}),g.jsx(Cu,{scheme:"ocean",currentScheme:y,onClick:k}),g.jsx(Cu,{scheme:"forest",currentScheme:y,onClick:k}),g.jsx(Cu,{scheme:"sunset",currentScheme:y,onClick:k}),g.jsx(Cu,{scheme:"amethyst",currentScheme:y,onClick:k})]})]}),e[143]=y,e[144]=k,e[145]=xr):xr=e[145],e[146]!==Qt||e[147]!==br||e[148]!==xr?(W=g.jsx(wu,{value:"appearance",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[Qt,Nt,br,Oi,xr]})}),e[146]=Qt,e[147]=br,e[148]=xr,e[149]=W):W=e[149],et=wu,ce="permissions",be="mt-4",ct="flex flex-col gap-4";let Wr;e[150]===Symbol.for("react.memo_cache_sentinel")?(Wr=g.jsxs("div",{children:[g.jsx(Ri,{className:"text-sm font-medium",children:"Always-allowed Operations"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Tools you've approved to run without asking"})]}),e[150]=Wr):Wr=e[150];let Gr;e[151]===Symbol.for("react.memo_cache_sentinel")?(Gr=g.jsx(Xl,{className:"size-4"}),e[151]=Gr):Gr=e[151];let Sr;e[152]!==l?(Sr=g.jsx(Pe,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:Gr}),e[152]=l,e[153]=Sr):Sr=e[153];const wr=xe.length>0&&g.jsxs(Pe,{variant:"destructive",size:"sm",onClick:()=>A(!0),children:[g.jsx(uc,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]});e[154]!==Sr||e[155]!==wr?(it=g.jsxs("div",{className:"flex items-center justify-between",children:[Wr,g.jsxs("div",{className:"flex gap-2",children:[Sr,wr]})]}),e[154]=Sr,e[155]=wr,e[156]=it):it=e[156],e[157]===Symbol.for("react.memo_cache_sentinel")?(ut=g.jsx(To,{}),e[157]=ut):ut=e[157],Re=Sc,Ze="h-[300px]",Ge=xe.length===0&&ze.length===0&&g.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:["No permissions granted yet.",g.jsx("br",{}),'Approve tool requests with "Always allow" to add them here.']}),rt=xe.length>0&&g.jsxs("div",{className:"mb-4",children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Active (",xe.length,")"]}),xe.map(Zn=>g.jsx(Rx,{permission:Zn,onRevoke:d},Zn.id))]}),ue=ze.length>0&&g.jsxs("div",{children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",ze.length,")"]}),ze.map(Zn=>g.jsx(Rx,{permission:Zn,onRevoke:d},Zn.id))]}),e[37]=u,e[38]=S,e[39]=b,e[40]=C,e[41]=f,e[42]=i,e[43]=_,e[44]=l,e[45]=d,e[46]=n,e[47]=w,e[48]=o,e[49]=y,e[50]=x,e[51]=k,e[52]=O,e[53]=z,e[54]=q,e[55]=Re,e[56]=et,e[57]=G,e[58]=Y,e[59]=Q,e[60]=I,e[61]=Ze,e[62]=Ge,e[63]=rt,e[64]=ue,e[65]=ct,e[66]=it,e[67]=ut,e[68]=ce,e[69]=be,e[70]=F,e[71]=J,e[72]=ne,e[73]=Z,e[74]=W}else O=e[52],z=e[53],q=e[54],Re=e[55],et=e[56],G=e[57],Y=e[58],Q=e[59],I=e[60],Ze=e[61],Ge=e[62],rt=e[63],ue=e[64],ct=e[65],it=e[66],ut=e[67],ce=e[68],be=e[69],F=e[70],J=e[71],ne=e[72],Z=e[73],W=e[74];let ke;e[158]!==Re||e[159]!==Ze||e[160]!==Ge||e[161]!==rt||e[162]!==ue?(ke=g.jsxs(Re,{className:Ze,children:[Ge,rt,ue]}),e[158]=Re,e[159]=Ze,e[160]=Ge,e[161]=rt,e[162]=ue,e[163]=ke):ke=e[163];let je;e[164]!==ct||e[165]!==it||e[166]!==ut||e[167]!==ke?(je=g.jsxs("div",{className:ct,children:[it,ut,ke]}),e[164]=ct,e[165]=it,e[166]=ut,e[167]=ke,e[168]=je):je=e[168],e[169]!==et||e[170]!==ce||e[171]!==be||e[172]!==je?(V=g.jsx(et,{value:ce,className:be,children:je}),e[169]=et,e[170]=ce,e[171]=be,e[172]=je,e[173]=V):V=e[173];let Le;e[174]===Symbol.for("react.memo_cache_sentinel")?(Le=g.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect subscription-based providers to use models without API keys."}),e[174]=Le):Le=e[174];let lt;if(e[175]!==h||e[176]!==v||e[177]!==p){let xe;e[179]!==h||e[180]!==v?(xe=ze=>g.jsx(EF,{provider:ze,onConnect:()=>h(ze.provider),onDisconnect:()=>v(ze.provider)},ze.provider),e[179]=h,e[180]=v,e[181]=xe):xe=e[181],lt=p.map(xe),e[175]=h,e[176]=v,e[177]=p,e[178]=lt}else lt=e[178];e[182]!==lt?(K=g.jsx(wu,{value:"providers",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[Le,g.jsx("div",{className:"flex flex-col gap-3",children:lt})]})})}),e[182]=lt,e[183]=K):K=e[183],j=wu,B="keybinds",H="mt-4",$="flex flex-col gap-2",L=Ke.map(DF),e[0]=u,e[1]=S,e[2]=b,e[3]=C,e[4]=h,e[5]=v,e[6]=f,e[7]=i,e[8]=_,e[9]=l,e[10]=d,e[11]=n,e[12]=w,e[13]=o,e[14]=p,e[15]=y,e[16]=x,e[17]=k,e[18]=j,e[19]=O,e[20]=z,e[21]=q,e[22]=$,e[23]=V,e[24]=K,e[25]=G,e[26]=Y,e[27]=Q,e[28]=I,e[29]=L,e[30]=B,e[31]=H,e[32]=F,e[33]=J,e[34]=ne,e[35]=Z,e[36]=W}else j=e[18],O=e[19],z=e[20],q=e[21],$=e[22],V=e[23],K=e[24],G=e[25],Y=e[26],Q=e[27],I=e[28],L=e[29],B=e[30],H=e[31],F=e[32],J=e[33],ne=e[34],Z=e[35],W=e[36];let U;e[184]!==$||e[185]!==L?(U=g.jsx("div",{className:$,children:L}),e[184]=$,e[185]=L,e[186]=U):U=e[186];let te;e[187]!==j||e[188]!==U||e[189]!==B||e[190]!==H?(te=g.jsx(j,{value:B,className:H,children:U}),e[187]=j,e[188]=U,e[189]=B,e[190]=H,e[191]=te):te=e[191];let ie;e[192]!==O||e[193]!==V||e[194]!==K||e[195]!==te||e[196]!==F||e[197]!==J||e[198]!==ne||e[199]!==Z||e[200]!==W?(ie=g.jsxs(O,{defaultValue:F,className:J,children:[ne,Z,W,V,K,te]}),e[192]=O,e[193]=V,e[194]=K,e[195]=te,e[196]=F,e[197]=J,e[198]=ne,e[199]=Z,e[200]=W,e[201]=ie):ie=e[201];let ae;e[202]!==z||e[203]!==G||e[204]!==Y||e[205]!==ie?(ae=g.jsxs(z,{className:G,children:[Y,ie]}),e[202]=z,e[203]=G,e[204]=Y,e[205]=ie,e[206]=ae):ae=e[206];let se;e[207]!==a?(se=()=>{a(),A(!1)},e[207]=a,e[208]=se):se=e[208];let ge;e[209]!==N||e[210]!==se?(ge=g.jsx(kF,{open:N,onOpenChange:A,title:"Revoke All Permissions",description:"This will revoke all always-allowed permissions for this workspace. You'll need to approve these tools again when they're used.",confirmLabel:"Revoke All",variant:"destructive",onConfirm:se}),e[209]=N,e[210]=se,e[211]=ge):ge=e[211];let Te;return e[212]!==q||e[213]!==Q||e[214]!==I||e[215]!==ae||e[216]!==ge?(Te=g.jsxs(q,{open:Q,onOpenChange:I,children:[ae,ge]}),e[212]=q,e[213]=Q,e[214]=I,e[215]=ae,e[216]=ge,e[217]=Te):Te=e[217],Te}function DF(t,e){return g.jsxs("div",{className:"flex items-center justify-between py-1",children:[g.jsx("div",{className:"flex items-center gap-1",children:t.keys.map((n,i)=>g.jsxs("span",{children:[g.jsx("kbd",{className:"font-mono bg-muted rounded px-2 py-1 text-xs",children:n}),i<t.keys.length-1&&g.jsx("span",{className:"mx-1 text-muted-foreground",children:"+"})]},i))}),g.jsx("span",{className:"text-sm text-muted-foreground",children:t.description})]},e)}function MF(t){return t.revokedAt}function jF(t){return!t.revokedAt}function OF(t){const e=me.c(6),{status:n}=t;switch(n.status){case"connected":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"default",className:"bg-green-600",children:[g.jsx(Vu,{className:"size-3 mr-1"}),"Connected"]}),e[0]=i):i=e[0],i}case"disabled":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"secondary",children:[g.jsx(nh,{className:"size-3 mr-1"}),"Disabled"]}),e[1]=i):i=e[1],i}case"failed":{let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"destructive",children:[g.jsx(Ru,{className:"size-3 mr-1"}),"Failed"]}),e[2]=i):i=e[2],i}case"needs_auth":{let i;return e[3]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"outline",className:"border-yellow-500 text-yellow-600",children:[g.jsx(Ru,{className:"size-3 mr-1"}),"Needs Auth"]}),e[3]=i):i=e[3],i}case"needs_client_registration":{let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"outline",className:"border-orange-500 text-orange-600",children:[g.jsx(Ru,{className:"size-3 mr-1"}),"Needs Registration"]}),e[4]=i):i=e[4],i}default:{let i;return e[5]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(Kn,{variant:"secondary",children:"Unknown"}),e[5]=i):i=e[5],i}}}function LF({open:t,onOpenChange:e,workspaceId:n,workspacePath:i,serverUrl:o,apiToken:l}){const{fetchWithAuth:d}=id(),[a,u]=D.useState({}),[f,p]=D.useState(!1),[h,v]=D.useState(null),[S,C]=D.useState(null),w=D.useCallback(async()=>{if(n){p(!0),C(null);try{const k=await d(`/api/workspaces/${n}/mcp/status`,{},{serverUrl:o,token:l});if(!k.ok)throw new Error("Failed to load MCP status");const N=await k.json();u(N.status||{})}catch(k){const N=k instanceof Error?k.message:"Unknown error";C(N)}finally{p(!1)}}},[n,d,o,l]);D.useEffect(()=>{t&&n&&w()},[t,n,w]);const _=async k=>{if(n){v(k);try{if(!(await d(`/api/workspaces/${n}/mcp/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l})).ok)throw new Error("Failed to connect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{v(null)}}},b=async k=>{if(n){v(k);try{if(!(await d(`/api/workspaces/${n}/mcp/disconnect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l})).ok)throw new Error("Failed to disconnect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{v(null)}}},y=async k=>{if(n){v(k);try{const N=await d(`/api/workspaces/${n}/mcp/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l});if(!N.ok)throw new Error("Failed to start auth");const A=await N.json();A.authorizationUrl&&window.open(A.authorizationUrl,"_blank"),await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{v(null)}}},x=Object.entries(a);return g.jsx(_c,{open:t,onOpenChange:e,children:g.jsxs(yc,{className:"sm:max-w-[600px] max-h-[80vh]",children:[g.jsxs(bc,{children:[g.jsxs(xc,{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-5"}),"MCP Servers"]}),g.jsx(sd,{children:"Manage Model Context Protocol servers for this workspace"})]}),g.jsxs("div",{className:"mt-4 space-y-4",children:[S&&g.jsxs(Tf,{variant:"destructive",children:[g.jsx(Ru,{className:"size-4"}),g.jsx(Nf,{children:S})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Configure servers in ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})]}),g.jsx(Pe,{variant:"outline",size:"sm",onClick:w,disabled:f,children:g.jsx(Xl,{className:`size-4 ${f?"animate-spin":""}`})})]}),g.jsx(Sc,{className:"h-[400px]",children:f&&x.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsx(zr,{className:"size-6 animate-spin text-muted-foreground"})}):x.length===0?g.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[g.jsx(Na,{className:"size-12 mx-auto mb-3 opacity-50"}),g.jsx("p",{className:"font-medium",children:"No MCP servers configured"}),g.jsxs("p",{className:"text-sm mt-1",children:["Create ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})," in your workspace to add servers."]})]}):g.jsx("div",{className:"space-y-3",children:x.map(([k,{config:N,status:A}])=>{var M;return g.jsxs("div",{className:"border rounded-lg p-4",children:[g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(Na,{className:"size-5 text-muted-foreground mt-0.5"}),g.jsxs("div",{children:[g.jsx("div",{className:"font-medium",children:k}),g.jsx("div",{className:"text-sm text-muted-foreground",children:(N==null?void 0:N.type)==="local"?g.jsxs("span",{children:["Local - ",((M=N.command)==null?void 0:M[0])||"command"]}):(N==null?void 0:N.type)==="remote"?g.jsxs("span",{className:"flex items-center gap-1",children:["Remote - ",N.url]}):"Unknown type"}),A.status==="failed"&&"error"in A&&g.jsx(Tf,{variant:"destructive",className:"mt-2 py-2",children:g.jsx(Nf,{className:"text-xs",children:A.error})}),A.status==="needs_client_registration"&&"error"in A&&g.jsx(Tf,{className:"mt-2 py-2 border-orange-500",children:g.jsx(Nf,{className:"text-xs",children:A.error})})]})]}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(OF,{status:A})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",children:[A.status==="connected"&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>b(k),disabled:h===k,children:[h===k?g.jsx(zr,{className:"size-4 animate-spin"}):g.jsx(Y4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Disconnect"})]}),(A.status==="disabled"||A.status==="failed")&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>_(k),disabled:h===k,children:[h===k?g.jsx(zr,{className:"size-4 animate-spin"}):g.jsx(Q4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Connect"})]}),A.status==="needs_auth"&&g.jsxs(Pe,{variant:"default",size:"sm",onClick:()=>y(k),disabled:h===k,children:[h===k?g.jsx(zr,{className:"size-4 animate-spin"}):g.jsx(Cg,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},k)})})})]})]})})}function Tx(t){const e=me.c(3),{message:n}=t,i=n===void 0?"Connecting to server...":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(zr,{className:"size-8 animate-spin"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 text-muted-foreground",children:[o,g.jsx("p",{className:"text-sm",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const IF=t=>{const e=me.c(26),{serverUrl:n,authError:i,retryCount:o,nextRetryIn:l,onRetry:d,onLogout:a}=t;let u,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Kx,{className:"size-12 text-destructive mb-4"}),f=g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Unable to connect to server"}),e[0]=u,e[1]=f):(u=e[0],f=e[1]);const p=i||"Please check that the server is running.";let h;e[2]!==p?(h=g.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[400px]",children:p}),e[2]=p,e[3]=h):h=e[3];let v;e[4]!==n?(v=n&&g.jsx("p",{className:"text-xs text-muted-foreground mb-6 font-mono bg-muted px-3 py-1.5 rounded",children:n}),e[4]=n,e[5]=v):v=e[5];let S;e[6]!==l?(S=g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Retrying in ",l,"s..."]}),e[6]=l,e[7]=S):S=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Xl,{className:"size-4 mr-2","data-icon":"inline-start"}),e[8]=C):C=e[8];let w;e[9]!==d?(w=g.jsxs(Pe,{onClick:d,variant:"default",children:[C,"Retry Now"]}),e[9]=d,e[10]=w):w=e[10];let _;e[11]!==a?(_=g.jsx(Pe,{onClick:a,variant:"ghost",children:"Change Server"}),e[11]=a,e[12]=_):_=e[12];let b;e[13]!==w||e[14]!==_?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[w,_]}),e[13]=w,e[14]=_,e[15]=b):b=e[15];let y;e[16]!==o?(y=o>0&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retry attempt: ",o]}),e[16]=o,e[17]=y):y=e[17];let x;e[18]!==b||e[19]!==y||e[20]!==S?(x=g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[S,b,y]}),e[18]=b,e[19]=y,e[20]=S,e[21]=x):x=e[21];let k;return e[22]!==x||e[23]!==h||e[24]!==v?(k=g.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[u,f,h,v,x]}),e[22]=x,e[23]=h,e[24]=v,e[25]=k):k=e[25],k};function Nx(t){const e=me.c(40),{onServerAdded:n,error:i}=t,[o,l]=D.useState(""),[d,a]=D.useState("localhost:8742"),[u,f]=D.useState(""),[p,h]=D.useState(!1),[v,S]=D.useState(null);let C;e[0]!==o||e[1]!==n||e[2]!==u||e[3]!==d?(C=I=>{I.preventDefault();const L=o.trim(),B=d.trim(),H=u.trim();if(!L){S("Please enter a server name");return}if(!B){S("Please enter a server URL");return}if(!H){S("Please enter an API token");return}if(!Xx(H)){S("Invalid token format. Token should be 64 hex characters (0-9, a-f).");return}const F=Mf(B),J={id:crypto.randomUUID(),name:L,url:F,token:H,createdAt:new Date().toISOString()};n(J)},e[0]=o,e[1]=n,e[2]=u,e[3]=d,e[4]=C):C=e[4];const w=C;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsxs("div",{className:"px-6 pt-6 pb-4 text-center border-b border-border",children:[g.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Add your first server"}),g.jsx("p",{className:"text-muted-foreground mt-1",children:"Connect to a Jean2 server to get started"})]}),e[5]=_):_=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx("label",{htmlFor:"serverName",className:"text-sm font-medium text-foreground",children:"Server Name"}),e[6]=b):b=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=I=>{l(I.target.value),S(null)},e[7]=y):y=e[7];let x;e[8]!==o?(x=g.jsxs("div",{className:"space-y-2",children:[b,g.jsx("input",{id:"serverName",type:"text",value:o,onChange:y,placeholder:"Production",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[8]=o,e[9]=x):x=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx("label",{htmlFor:"serverUrl",className:"text-sm font-medium text-foreground",children:"Server URL"}),e[10]=k):k=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=I=>{a(I.target.value),S(null)},e[11]=N):N=e[11];let A;e[12]!==d?(A=g.jsxs("div",{className:"space-y-2",children:[k,g.jsx("input",{id:"serverUrl",type:"text",value:d,onChange:N,placeholder:"localhost:8742",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[12]=d,e[13]=A):A=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx("label",{htmlFor:"token",className:"text-sm font-medium text-foreground",children:"API Token"}),e[14]=M):M=e[14];const T=p?"text":"password";let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=I=>{f(I.target.value),S(null)},e[15]=j):j=e[15];let O;e[16]!==T||e[17]!==u?(O=g.jsx("input",{id:"token",type:T,value:u,onChange:j,placeholder:"Enter your 64-character token",className:"w-full px-3 py-2 pr-10 bg-background border border-input rounded-lg text-foreground font-mono text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"}),e[16]=T,e[17]=u,e[18]=O):O=e[18];let z;e[19]!==p?(z=()=>h(!p),e[19]=p,e[20]=z):z=e[20];const q=p?"Hide token":"Show token";let $;e[21]!==p?($=p?g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):g.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),e[21]=p,e[22]=$):$=e[22];let V;e[23]!==z||e[24]!==q||e[25]!==$?(V=g.jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":q,children:$}),e[23]=z,e[24]=q,e[25]=$,e[26]=V):V=e[26];let K;e[27]!==O||e[28]!==V?(K=g.jsxs("div",{className:"space-y-2",children:[M,g.jsxs("div",{className:"relative",children:[O,V]})]}),e[27]=O,e[28]=V,e[29]=K):K=e[29];let G;e[30]!==i||e[31]!==v?(G=(v||i)&&g.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:v||i}),e[30]=i,e[31]=v,e[32]=G):G=e[32];let Y;e[33]===Symbol.for("react.memo_cache_sentinel")?(Y=g.jsx("button",{type:"submit",className:"w-full py-2.5 bg-primary text-primary-foreground font-medium rounded-lg hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors",children:"Add Server"}),e[33]=Y):Y=e[33];let Q;return e[34]!==w||e[35]!==K||e[36]!==G||e[37]!==x||e[38]!==A?(Q=g.jsx("div",{className:"w-full h-full flex items-center justify-center bg-background dark:bg-gradient-to-br dark:from-muted dark:via-background dark:to-muted p-4",children:g.jsx("div",{className:"w-full max-w-md",children:g.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl overflow-hidden",children:[_,g.jsxs("form",{onSubmit:w,className:"p-6 space-y-4",children:[x,A,K,G,Y]})]})})}),e[34]=w,e[35]=K,e[36]=G,e[37]=x,e[38]=A,e[39]=Q):Q=e[39],Q}function Dx(t){const e=me.c(17),{onServerSwitch:n,onSelectWorkspace:i}=t,[o,l]=D.useState(!1),d=D.useRef(!1),a=ad(),{quickConnections:u,switchServer:f,removeFromQuickConnections:p,isSwitching:h}=dc(),v=O=>{f(O.serverId)&&(d.current=!0,n==null||n(),O.workspaceId&&i&&i(O.workspaceId))};let S,C;e[0]!==h||e[1]!==o?(S=()=>{!h&&o&&d.current&&(l(!1),d.current=!1)},C=[h,o],e[0]=h,e[1]=o,e[2]=S,e[3]=C):(S=e[2],C=e[3]),D.useEffect(S,C);let w;e[4]!==p?(w=(O,z)=>{O.stopPropagation(),p(z)},e[4]=p,e[5]=w):w=e[5];const _=w,b=()=>g.jsx(W1,{children:g.jsx(G1,{className:"max-h-[50vh] overflow-y-auto",children:u.length>0?g.jsx(zu,{heading:"Quick Switch",children:u.map(O=>g.jsxs(Jl,{onSelect:()=>v(O),className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-4 text-muted-foreground"}),g.jsxs("span",{children:[O.serverName,O.workspaceName&&g.jsxs("span",{className:"text-muted-foreground",children:[" / ",O.workspaceName]})]})]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity p-1 rounded hover:bg-destructive/10",onClick:z=>_(z,O.id),children:g.jsx(uc,{className:"size-3 text-destructive"})})]},O.id))}):g.jsx(K1,{className:"py-6",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[g.jsx(Im,{className:"size-8"}),g.jsx("p",{className:"text-sm font-medium",children:"No favorites yet"}),g.jsx("p",{className:"text-xs",children:"Star a workspace to add it here"})]})})})});if(a){let O;e[6]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(F8,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Im,{className:"size-4"})})}),e[6]=O):O=e[6];let z;return e[7]===Symbol.for("react.memo_cache_sentinel")?(z=g.jsx(Ih,{children:g.jsx(Bh,{children:"Quick Switch"})}),e[7]=z):z=e[7],g.jsxs(Oh,{open:o,onOpenChange:l,children:[O,g.jsxs(Lh,{side:"bottom",className:"max-h-[80vh]",children:[z,g.jsx("div",{className:"mt-4",children:b()})]})]})}const y=Mh;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(Y1,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Im,{className:"size-4"})})}),e[8]=x):x=e[8];const k=jh,N="w-[300px] p-0",A="start",M=b();let T;e[9]!==k||e[10]!==M?(T=g.jsx(k,{className:N,align:A,children:M}),e[9]=k,e[10]=M,e[11]=T):T=e[11];let j;return e[12]!==y||e[13]!==o||e[14]!==x||e[15]!==T?(j=g.jsxs(y,{open:o,onOpenChange:l,children:[x,T]}),e[12]=y,e[13]=o,e[14]=x,e[15]=T,e[16]=j):j=e[16],j}function Mx(t){const e=me.c(13),{viewMode:n,onViewModeChange:i}=t;let o;e[0]!==i||e[1]!==n?(o=()=>{i(n==="overview"?"default":"overview")},e[0]=i,e[1]=n,e[2]=o):o=e[2];const l=o,d=n==="overview";let a;e[3]!==d?(a=d?g.jsx(R4,{className:"h-4 w-4"}):g.jsx(E4,{className:"h-4 w-4"}),e[3]=d,e[4]=a):a=e[4];let u;e[5]!==a||e[6]!==l?(u=g.jsx(Fu,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:l,children:a})}),e[5]=a,e[6]=l,e[7]=u):u=e[7];const f=d?"Single workspace":"Overview";let p;e[8]!==f?(p=g.jsx(Hu,{children:f}),e[8]=f,e[9]=p):p=e[9];let h;return e[10]!==u||e[11]!==p?(h=g.jsx(Vf,{children:g.jsxs(Pu,{children:[u,p]})}),e[10]=u,e[11]=p,e[12]=h):h=e[12],h}function BF(t){const e=me.c(70),{open:n,onOpenChange:i,editServer:o}=t,{prepareForServerAdd:l,addServer:d,editServer:a}=dc(),[u,f]=D.useState(""),[p,h]=D.useState(""),[v,S]=D.useState(""),[C,w]=D.useState(!1),[_,b]=D.useState(null),y=o!=null;let x;e[0]!==o?(x=()=>{o?(f(o.name),h(o.url),S(o.token)):(f(""),h("localhost:8742"),S("")),b(null),w(!1)},e[0]=o,e[1]=x):x=e[1];let k;e[2]!==o||e[3]!==n?(k=[o,n],e[2]=o,e[3]=n,e[4]=k):k=e[4],D.useEffect(x,k);let N;e[5]!==d||e[6]!==o||e[7]!==y||e[8]!==u||e[9]!==i||e[10]!==l||e[11]!==v||e[12]!==a||e[13]!==p?(N=Me=>{Me.preventDefault(),b(null);const Ke=u.trim(),Re=p.trim(),et=v.trim();if(!Ke){b("Name is required");return}if(!Re){b("Server URL is required");return}if(!et){b("API token is required");return}if(!Xx(et)){b("Token must be 64 hexadecimal characters");return}const Ze=Mf(Re);y?a(o.id,{name:Ke,url:Ze,token:et}):(l(),d(Ke,Ze,et)),i(!1)},e[5]=d,e[6]=o,e[7]=y,e[8]=u,e[9]=i,e[10]=l,e[11]=v,e[12]=a,e[13]=p,e[14]=N):N=e[14];const A=N,M=y?"Edit Server":"Add Server";let T;e[15]!==M?(T=g.jsx(xc,{children:M}),e[15]=M,e[16]=T):T=e[16];const j=y?"Update server details":"Enter your server details";let O;e[17]!==j?(O=g.jsx(sd,{children:j}),e[17]=j,e[18]=O):O=e[18];let z;e[19]!==T||e[20]!==O?(z=g.jsxs(bc,{children:[T,O]}),e[19]=T,e[20]=O,e[21]=z):z=e[21];let q;e[22]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(Ri,{htmlFor:"server-name",children:"Name"}),e[22]=q):q=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=Me=>f(Me.target.value),e[23]=$):$=e[23];let V;e[24]!==u?(V=g.jsxs("div",{className:"grid gap-2",children:[q,g.jsx(Rf,{id:"server-name",value:u,onChange:$,placeholder:"My Server"})]}),e[24]=u,e[25]=V):V=e[25];let K;e[26]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsx(Ri,{htmlFor:"server-url",children:"Server URL"}),e[26]=K):K=e[26];let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=Me=>h(Me.target.value),e[27]=G):G=e[27];let Y;e[28]!==p?(Y=g.jsxs("div",{className:"grid gap-2",children:[K,g.jsx(Rf,{id:"server-url",value:p,onChange:G,placeholder:"localhost:8742"})]}),e[28]=p,e[29]=Y):Y=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=g.jsx(Ri,{htmlFor:"server-token",children:"API Token"}),e[30]=Q):Q=e[30];const I=C?"text":"password";let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=Me=>S(Me.target.value),e[31]=L):L=e[31];let B;e[32]!==I||e[33]!==v?(B=g.jsx(Rf,{id:"server-token",type:I,value:v,onChange:L,placeholder:"64-character hex string",className:"pr-10"}),e[32]=I,e[33]=v,e[34]=B):B=e[34];let H;e[35]!==C?(H=()=>w(!C),e[35]=C,e[36]=H):H=e[36];let F;e[37]!==C?(F=C?g.jsx(u4,{className:"size-4 text-muted-foreground"}):g.jsx(f4,{className:"size-4 text-muted-foreground"}),e[37]=C,e[38]=F):F=e[38];let J;e[39]!==H||e[40]!==F?(J=g.jsx("button",{type:"button",onClick:H,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-transparent",children:F}),e[39]=H,e[40]=F,e[41]=J):J=e[41];let ne;e[42]!==B||e[43]!==J?(ne=g.jsxs("div",{className:"grid gap-2",children:[Q,g.jsxs("div",{className:"relative",children:[B,J]})]}),e[42]=B,e[43]=J,e[44]=ne):ne=e[44];let Z;e[45]!==_?(Z=_&&g.jsx("p",{className:"text-sm text-destructive",children:_}),e[45]=_,e[46]=Z):Z=e[46];let W;e[47]!==V||e[48]!==Y||e[49]!==ne||e[50]!==Z?(W=g.jsxs("div",{className:"grid gap-4 py-4",children:[V,Y,ne,Z]}),e[47]=V,e[48]=Y,e[49]=ne,e[50]=Z,e[51]=W):W=e[51];let U;e[52]!==i?(U=g.jsx(Pe,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e[52]=i,e[53]=U):U=e[53];const te=y?"Save":"Add";let ie;e[54]!==te?(ie=g.jsx(Pe,{type:"submit",children:te}),e[54]=te,e[55]=ie):ie=e[55];let ae;e[56]!==U||e[57]!==ie?(ae=g.jsxs(Nh,{children:[U,ie]}),e[56]=U,e[57]=ie,e[58]=ae):ae=e[58];let se;e[59]!==A||e[60]!==W||e[61]!==ae?(se=g.jsxs("form",{onSubmit:A,children:[W,ae]}),e[59]=A,e[60]=W,e[61]=ae,e[62]=se):se=e[62];let ge;e[63]!==se||e[64]!==z?(ge=g.jsxs(yc,{className:"sm:max-w-[425px]",children:[z,se]}),e[63]=se,e[64]=z,e[65]=ge):ge=e[65];let Te;return e[66]!==i||e[67]!==n||e[68]!==ge?(Te=g.jsx(_c,{open:n,onOpenChange:i,children:ge}),e[66]=i,e[67]=n,e[68]=ge,e[69]=Te):Te=e[69],Te}const zF=400,PF=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window);function FF(){const t=['[data-slot="dialog-overlay"][data-state="open"]','[data-slot="dialog-content"][data-state="open"]','[role="dialog"][data-state="open"]'];for(const n of t)if(document.querySelector(n))return!0;const e=document.querySelectorAll('[role="dialog"]');for(const n of e)if(n instanceof HTMLElement&&HF(n))return!0;return!1}function HF(t){if(!t.isConnected)return!1;const e=window.getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity)>0&&t.getBoundingClientRect().width>0&&t.getBoundingClientRect().height>0}function UF(){var e,n;const t=document.activeElement;return t?!!((e=t.hasAttribute)!=null&&e.call(t,"data-chat-input")||(n=t.closest)!=null&&n.call(t,'[data-chat-input="true"]')):!1}function $F(t){const e=me.c(5),n=D.useRef(t);let i;e[0]!==t?(i=()=>{n.current=t},e[0]=t,e[1]=i):i=e[1],D.useLayoutEffect(i);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={lastEscTime:0,armed:!1},e[2]=o):o=e[2];const l=D.useRef(o);let d,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{const u=f=>{if(f.isComposing||f.repeat||f.key==="Escape"&&FF())return;const{onCloseFocusedPanel:p,onFocusChatInput:h,onStopStreaming:v,onOpenSidebar:S,onOpenTerminal:C,onNewWindow:w,onNewSession:_,onToggleViewMode:b}=n.current;if(f.shiftKey&&f.key==="Escape"){f.preventDefault(),p();return}if(f.key==="Escape"&&!f.metaKey&&!f.ctrlKey){const N=UF(),A=Date.now(),{lastEscTime:M,armed:T}=l.current,j=A-M;if(N&&T&&j<zF){f.preventDefault(),l.current={lastEscTime:0,armed:!1},v();return}if(N){l.current={lastEscTime:A,armed:!0};return}f.preventDefault(),h();return}const y=f.target,x=y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable,k=f.metaKey||f.ctrlKey;if(!(x&&!k)){if(!PF){if(k&&f.code==="Digit1"){f.preventDefault(),S();return}if(k&&f.code==="KeyT"){f.preventDefault(),C();return}}if(k&&f.shiftKey&&f.code==="KeyN"){f.preventDefault(),w();return}if(k&&f.code==="KeyN"){f.preventDefault(),_();return}if(k&&f.code==="KeyO"){f.preventDefault(),b();return}}};return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},a=[],e[3]=d,e[4]=a):(d=e[3],a=e[4]),D.useEffect(d,a)}const qF="/assets/chat-finish-Kb8mnIhV.mp3",VF="/assets/chat-permission-BltPnMpz.mp3";function WF(){const t=me.c(3),e=D.useRef(null),n=D.useRef(null);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{try{e.current||(e.current=new Audio(qF));const u=e.current;u.currentTime=0,u.play().catch(KF)}catch(u){const f=u,p=f instanceof Error?f.message:String(f);console.debug("Error initializing notification sound:",p)}},t[0]=i):i=t[0];const o=i;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{try{n.current||(n.current=new Audio(VF));const u=n.current;u.currentTime=0,u.play().catch(GF)}catch(u){const f=u,p=f instanceof Error?f.message:String(f);console.debug("Error initializing permission sound:",p)}},t[1]=l):l=t[1];const d=l;let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a={playChatFinishSound:o,playPermissionSound:d},t[2]=a):a=t[2],a}function GF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play permission sound:",e)}function KF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play notification sound:",e)}const YF=(t,e)=>t&&e?`ws://${e}/ws?token=${t}`:null,Sg=t=>t?`http://${t}/api`:null;function XF(t){const e=me.c(24),{onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseTerminal:l,focusChatInput:d,setTerminalOpen:a,sidebarRef:u,terminalPanelRef:f,onStopStreaming:p}=t,{setOpen:h}=ld();let v;e[0]!==h||e[1]!==u?(v=()=>{h(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=u.current)==null||O.focusSessionPanel()})})},e[0]=h,e[1]=u,e[2]=v):v=e[2];const S=v;let C;e[3]!==a||e[4]!==f?(C=()=>{a(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=f.current)==null||O.focus()})})},e[3]=a,e[4]=f,e[5]=C):C=e[5];const w=C,_=D.useRef(S);let b;e[6]!==S?(b=()=>{_.current=S},e[6]=S,e[7]=b):b=e[7],D.useLayoutEffect(b);const y=D.useRef(w);let x;e[8]!==w?(x=()=>{y.current=w},e[8]=w,e[9]=x):x=e[9],D.useLayoutEffect(x);let k,N;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=()=>_.current(),N=()=>y.current(),e[10]=k,e[11]=N):(k=e[10],N=e[11]);let A;e[12]!==l||e[13]!==h?(A=()=>{const O=document.activeElement;O!=null&&O.closest("[data-terminal-panel]")?l():O!=null&&O.closest('[data-sidebar="sidebar"]')&&h(!1)},e[12]=l,e[13]=h,e[14]=A):A=e[14];let M;e[15]!==d||e[16]!==n||e[17]!==i||e[18]!==p||e[19]!==o||e[20]!==A?(M={onOpenSidebar:k,onOpenTerminal:N,onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseFocusedPanel:A,onFocusChatInput:d,onStopStreaming:p},e[15]=d,e[16]=n,e[17]=i,e[18]=p,e[19]=o,e[20]=A,e[21]=M):M=e[21],$F(M);let T,j;return e[22]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{if(!(typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)))return;let z=!1;const q=[];return(async()=>{try{const V=await zy("jean2://accelerator/open-sidebar",()=>{_.current()});if(z){V();return}q.push(V)}catch(V){console.error("Failed to register open-sidebar accelerator listener:",V)}try{const V=await zy("jean2://accelerator/open-terminal",()=>{y.current()});if(z){V();return}q.push(V)}catch(V){console.error("Failed to register open-terminal accelerator listener:",V)}})(),()=>{z=!0,q.forEach(QF)}},T=[],e[22]=T,e[23]=j):(T=e[22],j=e[23]),D.useEffect(j,T),null}function QF(t){return t()}function ZF(){var ms,_l,Mc,Ui,jc,Oc,Lc,fd,hd,pd,Ic;const t=me.c(415),{servers:e,activeServer:n,addServer:i,removeServer:o,isSwitching:l,clearSwitchingState:d,quickConnections:a,isAddingServerRef:u,prepareForServerAdd:f,removeFromQuickConnectionsByWorkspace:p}=dc();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const[v,S]=D.useState(h);let C;t[1]===Symbol.for("react.memo_cache_sentinel")?(C=[],t[1]=C):C=t[1];const[w,_]=D.useState(C);let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],t[2]=b):b=t[2];const[y,x]=D.useState(b),[k,N]=D.useState(null);let A;t[3]===Symbol.for("react.memo_cache_sentinel")?(A={},t[3]=A):A=t[3];const[M,T]=D.useState(A);let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j={},t[4]=j):j=t[4];const[O,z]=D.useState(j),[q,$]=D.useState(null),V=D.useRef(null),K=D.useRef(null),G=D.useRef(null),Y=D.useRef(null),Q=D.useRef(null),[I,L]=D.useState(!1);let B;t[5]===Symbol.for("react.memo_cache_sentinel")?(B=[],t[5]=B):B=t[5];const H=D.useRef(B),[F,J]=D.useState(null);let ne;t[6]===Symbol.for("react.memo_cache_sentinel")?(ne={promptTokens:0,completionTokens:0,totalTokens:0},t[6]=ne):ne=t[6];const[Z,W]=D.useState(ne),[U,te]=D.useState("gpt-4o"),[ie,ae]=D.useState(null);let se;t[7]===Symbol.for("react.memo_cache_sentinel")?(se=[],t[7]=se):se=t[7];const[ge,Te]=D.useState(se),[Me,Ke]=D.useState("gpt-4o");let Re,et;t[8]!==U||t[9]!==ge||t[10]!==ie?(Re=()=>{var Ne;const ee=(Ne=ge.find(tt=>tt.id===U))==null?void 0:Ne.variants;ie&&ee&&!ee[ie]&&ae(null)},et=[U,ie,ge],t[8]=U,t[9]=ge,t[10]=ie,t[11]=Re,t[12]=et):(Re=t[11],et=t[12]),D.useEffect(Re,et);let Ze;t[13]===Symbol.for("react.memo_cache_sentinel")?(Ze=[],t[13]=Ze):Ze=t[13];const[Ge,rt]=D.useState(Ze),[ue,ct]=D.useState(null),[it,ut]=D.useState(!1),[ce,be]=D.useState(!1),[ke,je]=D.useState(!1),[Le,lt]=D.useState(!1),[xe,ze]=D.useState(jH),[Ve,_t]=D.useState(MH),[_e,Ye]=D.useState(DH);let st;t[14]===Symbol.for("react.memo_cache_sentinel")?(st=[],t[14]=st):st=t[14];const[St,Pt]=D.useState(st);let Ft;t[15]===Symbol.for("react.memo_cache_sentinel")?(Ft=[],t[15]=Ft):Ft=t[15];const[Gt,$t]=D.useState(Ft);let Tn;t[16]===Symbol.for("react.memo_cache_sentinel")?(Tn={},t[16]=Tn):Tn=t[16];const[Nn,Xt]=D.useState(Tn);let an;t[17]===Symbol.for("react.memo_cache_sentinel")?(an=[],t[17]=an):an=t[17];const[Kt,Un]=D.useState(an),[li,rr]=D.useState(null),[ci,$r]=D.useState(!1),[ui,qr]=D.useState(null),[pn,Cn]=D.useState(!1),[Qt,Nt]=D.useState(0),[Zt,Dn]=D.useState(0),[Mn,di]=D.useState(0),Vr=(ms=k==null?void 0:k.compacting)!=null?ms:!1,[_r,$n]=D.useState(!1);let yr;t[18]===Symbol.for("react.memo_cache_sentinel")?(yr=new Set,t[18]=yr):yr=t[18];const[jn,Qn]=D.useState(yr);let ir;t[19]===Symbol.for("react.memo_cache_sentinel")?(ir=new Set,t[19]=ir):ir=t[19];const qn=D.useRef(ir),{playChatFinishSound:Mt,playPermissionSound:br}=WF(),Oi=D.useRef(!1),Vn=D.useRef(null),mn=D.useRef(!1);let xr,Wr;t[20]!==Ve||t[21]!==Mt||t[22]!==v||t[23]!==F?(xr=()=>{if(Oi.current&&Vn.current!==null&&F===null&&!mn.current){const ee=v.find(Ne=>Ne.id===Vn.current);(ee==null?void 0:ee.parentId)===null&&Ve&&Mt()}Vn.current=F,mn.current=!1,Oi.current=!0},Wr=[F,Mt,v,Ve],t[20]=Ve,t[21]=Mt,t[22]=v,t[23]=F,t[24]=xr,t[25]=Wr):(xr=t[24],Wr=t[25]),D.useEffect(xr,Wr);let Gr,Sr;t[26]!==xe?(Gr=()=>{localStorage.setItem("jean2_sidebar_view",xe)},Sr=[xe],t[26]=xe,t[27]=Gr,t[28]=Sr):(Gr=t[27],Sr=t[28]),D.useEffect(Gr,Sr);let wr,Zn;t[29]!==Ve?(wr=()=>{localStorage.setItem("jean2_sound_chat_finish_enabled",String(Ve))},Zn=[Ve],t[29]=Ve,t[30]=wr,t[31]=Zn):(wr=t[30],Zn=t[31]),D.useEffect(wr,Zn);let sr,On;t[32]!==_e?(sr=()=>{localStorage.setItem("jean2_sound_permission_enabled",String(_e))},On=[_e],t[32]=_e,t[33]=sr,t[34]=On):(sr=t[33],On=t[34]),D.useEffect(sr,On);const qo=D.useRef(null),Ua=D.useRef(null),$a=D.useRef(null),[,qa]=D.useState(!1),Xe=(_l=n==null?void 0:n.token)!=null?_l:null,Qe=(Mc=n==null?void 0:n.url)!=null?Mc:null;let Ln,Us;t[35]!==q?(Ln=()=>{V.current=q},Us=[q],t[35]=q,t[36]=Ln,t[37]=Us):(Ln=t[36],Us=t[37]),D.useEffect(Ln,Us);let Vo;t[38]!==(k==null?void 0:k.id)?(Vo=()=>{var ee;K.current=(ee=k==null?void 0:k.id)!=null?ee:null},t[38]=k==null?void 0:k.id,t[39]=Vo):Vo=t[39];let $s;t[40]!==k?($s=[k],t[40]=k,t[41]=$s):$s=t[41],D.useEffect(Vo,$s);const fi=D.useRef(null),Wo=D.useRef(!1);let Go;t[42]!==i||t[43]!==f?(Go=ee=>{f(),i(ee.name,ee.url,ee.token)},t[42]=i,t[43]=f,t[44]=Go):Go=t[44];const hi=Go;let Va;t[45]!==n||t[46]!==o?(Va=()=>{n&&o(n.id),V.current&&V.current.close(),$(null),L(!1),Cn(!1),Nt(0),Dn(0)},t[45]=n,t[46]=o,t[47]=Va):Va=t[47];const gn=Va;let Ko;t[48]===Symbol.for("react.memo_cache_sentinel")?(Ko=()=>{Nt(NH),Cn(!1),Dn(0)},t[48]=Ko):Ko=t[48];const kc=Ko;let Wa;t[49]===Symbol.for("react.memo_cache_sentinel")?(Wa=()=>{V.current&&V.current.close(),$(null),L(!1),Cn(!1),Nt(0),Dn(0),mn.current=!0,S([]),_([]),N(null),T({}),z({}),J(null),W({promptTokens:0,completionTokens:0,totalTokens:0}),te("gpt-4o"),Te([]),rt([]),ct(null),Pt([]),$t([]),Xt({}),di(TH)},t[49]=Wa):Wa=t[49];const Yo=Wa;let rs;t[50]!==(n==null?void 0:n.id)||t[51]!==u?(rs=()=>{var ee;(n==null?void 0:n.id)!==$a.current&&u.current&&(u.current=!1,$a.current=(ee=n==null?void 0:n.id)!=null?ee:null,Yo())},t[50]=n==null?void 0:n.id,t[51]=u,t[52]=rs):rs=t[52];let or;t[53]!==n||t[54]!==u?(or=[n,Yo,u],t[53]=n,t[54]=u,t[55]=or):or=t[55],D.useEffect(rs,or);let qs;t[56]!==Xe||t[57]!==gn?(qs=async(ee,Ne)=>{const tt=Ne===void 0?{}:Ne;if(!Xe)throw new Error("No API token available");const ot=new Headers(tt.headers||{});ot.set("Authorization",`Bearer ${Xe}`);const ve=await fetch(ee,{...tt,signal:tt.signal,headers:ot});if(ve.status===401)throw rr("Authentication failed. Your token may have been regenerated."),gn(),new Error("Unauthorized");return ve},t[56]=Xe,t[57]=gn,t[58]=qs):qs=t[58];const nn=qs;let pi;t[59]!==M||t[60]!==O?(pi=ee=>{const Ne=M[ee]||[],tt=O[ee]||{};return Ne.map(ot=>({message:ot,parts:(tt[ot.id]||[]).sort(RH)}))},t[59]=M,t[60]=O,t[61]=pi):pi=t[61];const Li=pi;let Xo;t[62]!==Xe||t[63]!==gn||t[64]!==Qe?(Xo=()=>{if(!Xe||!Qe)return;const ee=YF(Xe,Qe);if(!ee)return;const Ne=new WebSocket(ee);return Ne.onopen=()=>{L(!0),rr(null),Nt(0),Cn(!1),$t([]),K.current&&Ne.send(JSON.stringify({type:"session.resume",sessionId:K.current})),Ne.send(JSON.stringify({type:"permissions.sync"}))},Ne.onclose=tt=>{L(!1),(tt.code===1008||tt.code===401)&&(rr("Authentication failed. Please check your token."),gn())},Ne.onerror=AH,Ne.onmessage=tt=>{var ve;const ot=JSON.parse(tt.data);(ve=fi.current)==null||ve.call(fi,ot)},$(Ne),()=>Ne.close()},t[62]=Xe,t[63]=gn,t[64]=Qe,t[65]=Xo):Xo=t[65];let Vs;t[66]!==Xe||t[67]!==gn||t[68]!==Mn||t[69]!==Qe?(Vs=[Xe,Qe,gn,Mn],t[66]=Xe,t[67]=gn,t[68]=Mn,t[69]=Qe,t[70]=Vs):Vs=t[70],D.useEffect(Xo,Vs);let Qo,Ii;t[71]!==Xe||t[72]!==I||t[73]!==pn||t[74]!==Qe?(Qo=()=>{if(Xe&&Qe&&!I&&!pn){const ee=setTimeout(()=>{I||Cn(!0)},1e4);return()=>clearTimeout(ee)}},Ii=[Xe,Qe,I,pn],t[71]=Xe,t[72]=I,t[73]=pn,t[74]=Qe,t[75]=Qo,t[76]=Ii):(Qo=t[75],Ii=t[76]),D.useEffect(Qo,Ii);let ar,Ws;t[77]!==Xe||t[78]!==I||t[79]!==pn||t[80]!==Qt||t[81]!==Qe?(ar=()=>{if(pn&&!I&&Xe&&Qe){const ee=Math.min(1e3*Math.pow(2,Qt),3e4);let Ne=Math.floor(ee/1e3);Dn(Ne);const tt=setInterval(()=>{Ne=Ne-1,Dn(Math.max(0,Ne))},1e3),ot=setTimeout(()=>{Nt(EH),di(kH)},ee);return()=>{clearInterval(tt),clearTimeout(ot)}}},Ws=[pn,I,Xe,Qe,Qt],t[77]=Xe,t[78]=I,t[79]=pn,t[80]=Qt,t[81]=Qe,t[82]=ar,t[83]=Ws):(ar=t[82],Ws=t[83]),D.useEffect(ar,Ws);let Bi,Cr;t[84]!==Xe||t[85]!==Qe?(Bi=()=>{const ee=()=>{if(document.visibilityState!=="visible")return;const Ne=V.current;!Ne||!Xe||!Qe||(Ne.readyState===WebSocket.OPEN?(Ne.onclose=null,Ne.close(),L(!1),Nt(0),Cn(!1),di(CH)):(Ne.readyState===WebSocket.CLOSED||Ne.readyState===WebSocket.CLOSING)&&(L(!1),Nt(0),Cn(!1),di(wH)))};return document.addEventListener("visibilitychange",ee),()=>document.removeEventListener("visibilitychange",ee)},Cr=[Xe,Qe],t[84]=Xe,t[85]=Qe,t[86]=Bi,t[87]=Cr):(Bi=t[86],Cr=t[87]),D.useEffect(Bi,Cr);let Gs,is;t[88]!==Xe||t[89]!==Qe?(Gs=()=>{const ee=()=>{if(!Xe||!Qe)return;const Ne=V.current;Ne&&Ne.readyState===WebSocket.OPEN||(L(!1),Nt(0),Cn(!1),di(SH))};return window.addEventListener("online",ee),()=>window.removeEventListener("online",ee)},is=[Xe,Qe],t[88]=Xe,t[89]=Qe,t[90]=Gs,t[91]=is):(Gs=t[90],is=t[91]),D.useEffect(Gs,is);let Zo;t[92]!==Xe||t[93]!==d||t[94]!==nn||t[95]!==Qe?(Zo=()=>{var tt;if(!Xe||!Qe)return;(tt=qo.current)==null||tt.abort(),qo.current=new AbortController;const ee=qo.current.signal,Ne=Sg(Qe);if(Ne)return qa(!0),Promise.all([nn(`${Ne}/sessions`,{signal:ee}).then(xH),nn(`${Ne}/preconfigs`,{signal:ee}).then(bH),nn(`${Ne}/prompts`,{signal:ee}).then(yH),nn(`${Ne}/models`,{signal:ee}).then(_H),nn(`${Ne}/workspaces`,{signal:ee}).then(vH),nn(`${Ne}/providers`,{signal:ee}).then(gH)]).then(ot=>{const[ve,Ae,We,At,rn,In]=ot;S(ve.sessions||[]),_(Ae.preconfigs||[]),x(We.prompts||[]),Te(At.models||[]),Ke(At.defaultModel||"gpt-4o"),Un(In.providers||[]);const Jt=rn.workspaces||[];if(rt(Jt),Ua.current){const Qr=Jt.find(Er=>Er.id===Ua.current);Qr&&ct(Qr),Ua.current=null}else{const Qr=localStorage.getItem("activeWorkspaceId"),Er=Jt.find(Zr=>Zr.id===Qr);ct(Er||Jt[0])}d(),qa(!1)}).catch(ot=>{var ve;if(ot.name==="AbortError"){console.log("Fetch aborted due to server switch");return}console.error("Failed to load server data:",ot),qa(!1),(ve=ot.message)!=null&&ve.includes("Unauthorized")||rr("Failed to connect to server")}),()=>{var ot;(ot=qo.current)==null||ot.abort()}},t[92]=Xe,t[93]=d,t[94]=nn,t[95]=Qe,t[96]=Zo):Zo=t[96];let ss;t[97]!==Xe||t[98]!==d||t[99]!==nn||t[100]!==Mn||t[101]!==Qe?(ss=[Xe,Qe,nn,d,Mn],t[97]=Xe,t[98]=d,t[99]=nn,t[100]=Mn,t[101]=Qe,t[102]=ss):ss=t[102],D.useEffect(Zo,ss);let os,Jo;t[103]!==ue?(os=()=>{ue&&localStorage.setItem("activeWorkspaceId",ue.id)},Jo=[ue],t[103]=ue,t[104]=os,t[105]=Jo):(os=t[104],Jo=t[105]),D.useEffect(os,Jo);let vn;t[106]!==nn||t[107]!==Qe?(vn=async(ee,Ne,tt)=>{const ot=Sg(Qe);if(!ot)return;const We=(await(await nn(`${ot}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ee,path:Ne,isVirtual:tt})})).json()).workspace;return rt(At=>[...At,We]),ct(We),N(null),We},t[106]=nn,t[107]=Qe,t[108]=vn):vn=t[108];const lr=vn;let as;t[109]===Symbol.for("react.memo_cache_sentinel")?(as=ee=>{ct(ee),N(null)},t[109]=as):as=t[109];const ea=as;let Ga;t[110]===Symbol.for("react.memo_cache_sentinel")?(Ga=ee=>{Ua.current=ee},t[110]=Ga):Ga=t[110];const Ka=Ga;let Ks;t[111]!==(ue==null?void 0:ue.id)||t[112]!==k||t[113]!==nn||t[114]!==p||t[115]!==Qe?(Ks=async ee=>{const Ne=Sg(Qe);if(!Ne)return;const tt=await nn(`${Ne}/workspaces/${ee}`,{method:"DELETE"});if(!tt.ok){const ve=await tt.json().catch(mH);console.error("Failed to delete workspace:",ve.message);return}const{deletedSessions:ot}=await tt.json();p(ee),k&&(k.workspaceId===ee||ot.includes(k.id))&&N(null),S(ve=>ve.filter(Ae=>!ot.includes(Ae.id))),T(ve=>{const Ae={...ve};return ot.forEach(We=>delete Ae[We]),Ae}),z(ve=>{const Ae={...ve};return ot.forEach(We=>delete Ae[We]),Ae}),rt(ve=>{const Ae=ve.filter(We=>We.id!==ee);return(ue==null?void 0:ue.id)===ee&&ct(Ae[0]||null),Ae})},t[111]=ue==null?void 0:ue.id,t[112]=k,t[113]=nn,t[114]=p,t[115]=Qe,t[116]=Ks):Ks=t[116];const mi=Ks;let ls;t[117]!==lr||t[118]!==Ge.length?(ls=async()=>{const ee=`Workspace ${Ge.length+1}`,Ne=`~/.jean2/workspaces/${crypto.randomUUID()}`;await lr(ee,Ne,!0)},t[117]=lr,t[118]=Ge.length,t[119]=ls):ls=t[119];const Ys=ls;let Ya;t[120]!==lr?(Ya=async ee=>{const Ne=ee.split("/").pop()||ee.split("\\").pop()||"Workspace";await lr(Ne,ee,!1)},t[120]=lr,t[121]=Ya):Ya=t[121];const ta=Ya;let Xa;t[122]!==(k==null?void 0:k.id)||t[123]!==Me||t[124]!==jn||t[125]!==ge||t[126]!==_e||t[127]!==br||t[128]!==F?(Xa=ee=>{var Ne,tt,ot;e:switch(ee.type){case"session.created":{S(ve=>[ee.session,...ve]),Wo.current&&(N(ee.session),T(ve=>({...ve,[ee.session.id]:[]})),z(ve=>({...ve,[ee.session.id]:{}})),W({promptTokens:0,completionTokens:0,totalTokens:0}),te(ee.session.selectedModel||Me),ae((Ne=ee.session.selectedVariant)!=null?Ne:null),Wo.current=!1);break e}case"session.resumed":{N(ee.session),Qn(We=>{const At=new Set(We);return At.delete(ee.session.id),At}),ee.isRunning?J(ee.session.id):(mn.current=!0,J(We=>We===ee.session.id?null:We)),ee.messages&&(T(We=>({...We,[ee.session.id]:ee.messages.map(pH)})),z(We=>{const At={...We};At[ee.session.id]={};for(const rn of ee.messages)At[ee.session.id][rn.message.id]=rn.parts;return At})),W((tt=ee.usage)!=null?tt:{promptTokens:0,completionTokens:0,totalTokens:0}),te(ee.session.selectedModel||Me),ae(ee.session.selectedVariant||null);const ve=ee.session.selectedModel||Me,Ae=(ot=ge.find(We=>We.id===ve))==null?void 0:ot.variants;ee.session.selectedVariant&&Ae&&!Ae[ee.session.selectedVariant]&&ae(null);break e}case"message.created":{T(ve=>({...ve,[ee.message.sessionId]:[...ve[ee.message.sessionId]||[],ee.message]})),z(ve=>({...ve,[ee.message.sessionId]:{...ve[ee.message.sessionId],[ee.message.id]:[]}})),"status"in ee.message&&ee.message.status==="streaming"&&(J(ee.message.sessionId),Qn(ve=>{const Ae=new Set(ve);return Ae.delete(ee.message.sessionId),Ae}));break e}case"message.updated":{T(ve=>({...ve,[ee.message.sessionId]:(ve[ee.message.sessionId]||[]).map(Ae=>Ae.id===ee.message.id?ee.message:Ae)})),"status"in ee.message&&ee.message.status!=="streaming"&&J(ve=>ve===ee.message.sessionId?null:ve);break e}case"part.created":{z(ve=>{const Ae=ve[ee.sessionId]||{},We=Ae[ee.part.messageId]||[];return{...ve,[ee.sessionId]:{...Ae,[ee.part.messageId]:[...We,ee.part]}}});break e}case"part.updated":{z(ve=>{const Ae=ve[ee.sessionId]||{},We=Ae[ee.part.messageId]||[];return{...ve,[ee.sessionId]:{...Ae,[ee.part.messageId]:We.map(At=>At.id===ee.part.id?ee.part:At)}}});break e}case"part.append":{jn.has(ee.sessionId)||J(ee.sessionId),z(ve=>{const Ae=ve[ee.sessionId]||{};for(const We of Object.keys(Ae)){const At=Ae[We],rn=At.findIndex(In=>In.id===ee.partId);if(rn!==-1){const In=At[rn];if(In.type==="text"||In.type==="reasoning"){const Jt=[...At];return Jt[rn]={...In,text:In.text+ee.delta},{...ve,[ee.sessionId]:{...Ae,[We]:Jt}}}}}return ve});break e}case"chat.usage":{if(ee.sessionId!==(k==null?void 0:k.id))return;W({promptTokens:ee.usage.promptTokens,completionTokens:ee.usage.completionTokens,totalTokens:ee.usage.totalTokens}),te(ee.model);break e}case"error":{console.error("Server error:",ee.code,ee.message);break e}case"session.closed":{S(ve=>ve.map(Ae=>Ae.id===ee.sessionId?{...Ae,status:"closed"}:Ae)),T(ve=>{const Ae={...ve};return delete Ae[ee.sessionId],Ae}),z(ve=>{const Ae={...ve};return delete Ae[ee.sessionId],Ae}),(k==null?void 0:k.id)===ee.sessionId&&N(null);break e}case"session.reopened":{S(ve=>ve.map(Ae=>Ae.id===ee.session.id?ee.session:Ae)),(k==null?void 0:k.id)===ee.session.id&&N(ee.session);break e}case"session.deleted":{S(ve=>ve.filter(Ae=>Ae.id!==ee.sessionId)),T(ve=>{const Ae={...ve};return delete Ae[ee.sessionId],Ae}),z(ve=>{const Ae={...ve};return delete Ae[ee.sessionId],Ae}),Qn(ve=>{const Ae=new Set(ve);return Ae.delete(ee.sessionId),Ae}),(k==null?void 0:k.id)===ee.sessionId&&N(null);break e}case"session.updated":{S(ve=>ve.map(Ae=>Ae.id===ee.session.id?ee.session:Ae)),(k==null?void 0:k.id)===ee.session.id&&(N(ee.session),ee.session.selectedVariant!==void 0&&ae(ee.session.selectedVariant));break e}case"session.renamed":{S(ve=>ve.map(Ae=>Ae.id===ee.session.id?ee.session:Ae)),(k==null?void 0:k.id)===ee.session.id&&N(ee.session);break e}case"permission.list":{Pt(ee.permissions);break e}case"permissions.sync":{$t(ve=>{const Ae=new Set(ve.map(hH)),We=ee.approvals.filter(At=>!Ae.has(At.toolCallId)).map(fH);return[...ve,...We]});break e}case"permission.revoked":{Pt(ve=>ve.map(Ae=>Ae.id===ee.permissionId?{...Ae,revokedAt:new Date().toISOString()}:Ae));break e}case"permission.all_revoked":{Pt(dH);break e}case"permission.request":{const ve={toolCallId:ee.toolCallId,sessionId:ee.sessionId,toolName:ee.toolName,args:ee.args,permissionType:ee.permissionType,permissionKey:ee.permissionKey,message:ee.message,details:ee.details,dangerous:ee.dangerous,childSessionId:ee.childSessionId,subagentName:ee.subagentName};$t(We=>[...We,ve]);const Ae=H.current.find(We=>We.id===ee.sessionId);(Ae==null?void 0:Ae.parentId)===null&&_e&&!qn.current.has(ee.toolCallId)&&(br(),qn.current.add(ee.toolCallId));break e}case"permission.granted":{$t(ve=>ve.filter(Ae=>Ae.toolCallId!==ee.toolCallId));break e}case"session.interrupted":{Qn(ve=>new Set(ve).add(ee.sessionId)),F===ee.sessionId&&(mn.current=!0,J(null)),ee.result.cascadedTo.length>0&&console.log(`Session ${ee.sessionId} interrupted. Cascaded to:`,ee.result.cascadedTo);break e}case"queue.list":{Xt(ve=>({...ve,[ee.sessionId]:ee.messages}));break e}case"queue.added":{Xt(ve=>({...ve,[ee.sessionId]:[...ve[ee.sessionId]||[],ee.message]}));break e}case"queue.removed":{Xt(ve=>({...ve,[ee.sessionId]:(ve[ee.sessionId]||[]).filter(Ae=>Ae.id!==ee.queueId)}));break e}case"queue.sending":{Xt(ve=>({...ve,[ee.sessionId]:(ve[ee.sessionId]||[]).filter(Ae=>Ae.id!==ee.queueId)}));break e}case"session.reverted":{console.log(`Session reverted to message ${ee.revertedTo.messageId}, removed ${ee.removed.messageIds.length} messages`);break e}case"compaction.complete":{ee.sessionId===(k==null?void 0:k.id)&&$n(!0);break e}case"session.forked":{const{forkedSession:ve,messages:Ae}=ee;S(We=>[ve,...We]),T(We=>({...We,[ve.id]:Ae.map(uH)})),z(We=>{const At={...We};At[ve.id]={};for(const rn of Ae)At[ve.id][rn.message.id]=rn.parts;return At}),N(ve),W({promptTokens:0,completionTokens:0,totalTokens:0});break e}case"session.state":{T(ve=>({...ve,[ee.sessionId]:ee.messages.map(cH)})),z(ve=>{const Ae={...ve};Ae[ee.sessionId]={};for(const We of ee.messages)Ae[ee.sessionId][We.message.id]=We.parts;return Ae}),F===ee.sessionId&&(mn.current=!0,J(null));break e}case"provider.status":{Un(ve=>ve.find(We=>We.provider===ee.provider)?ve.map(We=>We.provider===ee.provider?{...We,connected:ee.connected,authorizationUrl:ee.authorizationUrl,error:ee.error}:We):[...ve,{provider:ee.provider,connected:ee.connected,authorizationUrl:ee.authorizationUrl,error:ee.error}]);break e}case"provider.connected":Un(ve=>ve.map(Ae=>Ae.provider===ee.provider?{...Ae,connected:ee.connected,connectedAt:ee.connectedAt,accountId:ee.accountId}:Ae))}},t[122]=k==null?void 0:k.id,t[123]=Me,t[124]=jn,t[125]=ge,t[126]=_e,t[127]=br,t[128]=F,t[129]=Xa):Xa=t[129];const Xs=Xa;let Qa,Za;t[130]!==v?(Qa=()=>{H.current=v},Za=[v],t[130]=v,t[131]=Qa,t[132]=Za):(Qa=t[131],Za=t[132]),D.useLayoutEffect(Qa,Za);let Ja,el;t[133]!==Xs?(Ja=()=>{fi.current=Xs},el=[Xs],t[133]=Xs,t[134]=Ja,t[135]=el):(Ja=t[134],el=t[135]),D.useEffect(Ja,el);let tl;t[136]!==q?(tl=(ee,Ne)=>{q&&q.readyState===WebSocket.OPEN&&q.send(JSON.stringify({type:ee,...Ne}))},t[136]=q,t[137]=tl):tl=t[137];const Ie=tl;let nl;t[138]!==(ue==null?void 0:ue.id)||t[139]!==Ie?(nl=(ee,Ne)=>{Wo.current=!0,Ie("session.create",{preconfigId:ee,title:Ne,workspaceId:ue==null?void 0:ue.id})},t[138]=ue==null?void 0:ue.id,t[139]=Ie,t[140]=nl):nl=t[140];const zi=nl;let rl;t[141]!==(ue==null?void 0:ue.id)||t[142]!==Ie||t[143]!==v||t[144]!==Ge?(rl=ee=>{$t(tt=>tt.filter(ot=>ot.sessionId!==ee)),mn.current=!0,J(null),$n(!1);const Ne=v.find(tt=>tt.id===ee);if(Ne!=null&&Ne.workspaceId&&Ne.workspaceId!==(ue==null?void 0:ue.id)){const tt=Ge.find(ot=>ot.id===Ne.workspaceId);tt&&ct(tt)}Ie("session.resume",{sessionId:ee})},t[141]=ue==null?void 0:ue.id,t[142]=Ie,t[143]=v,t[144]=Ge,t[145]=rl):rl=t[145];const gi=rl;let Qs;t[146]!==Ie?(Qs=ee=>{Ie("session.close",{sessionId:ee})},t[146]=Ie,t[147]=Qs):Qs=t[147];const na=Qs;let il;t[148]!==Ie?(il=(ee,Ne)=>{Ie("session.revert",{sessionId:ee,messageId:Ne})},t[148]=Ie,t[149]=il):il=t[149];const Ec=il;let ra;t[150]!==Ie?(ra=(ee,Ne)=>{Ie("session.fork",{sessionId:ee,messageId:Ne})},t[150]=Ie,t[151]=ra):ra=t[151];const Ac=ra;let sl;t[152]!==Ie?(sl=ee=>{Ie("session.compact",{sessionId:ee})},t[152]=Ie,t[153]=sl):sl=t[153];const Rc=sl;let ol;t[154]!==Ie?(ol=ee=>{Ie("session.reopen",{sessionId:ee})},t[154]=Ie,t[155]=ol):ol=t[155];const ia=ol;let al;t[156]!==Ie?(al=ee=>{Ie("session.delete",{sessionId:ee})},t[156]=Ie,t[157]=al):al=t[157];const sa=al;let ll;t[158]!==k||t[159]!==Ie?(ll=ee=>{k&&Ie("session.update",{sessionId:k.id,preconfigId:ee})},t[158]=k,t[159]=Ie,t[160]=ll):ll=t[160];const Tc=ll;let Zs;t[161]!==k||t[162]!==Ie?(Zs=(ee,Ne)=>{te(ee),ae(null),k&&Ie("session.update_model",{sessionId:k.id,modelId:ee,providerId:Ne})},t[161]=k,t[162]=Ie,t[163]=Zs):Zs=t[163];const cs=Zs;let cl;t[164]!==U||t[165]!==k||t[166]!==Ie?(cl=ee=>{k&&(Ie("session.update_model",{sessionId:k.id,modelId:k.selectedModel||U,providerId:k.selectedProvider||"openai",variant:ee}),ae(ee))},t[164]=U,t[165]=k,t[166]=Ie,t[167]=cl):cl=t[167];const ul=cl;let oa;t[168]!==Ie?(oa=(ee,Ne)=>{Ie("session.rename",{sessionId:ee,title:Ne})},t[168]=Ie,t[169]=oa):oa=t[169];const us=oa;let aa;t[170]!==k||t[171]!==gi?(aa=()=>{k!=null&&k.parentId&&gi(k.parentId)},t[170]=k,t[171]=gi,t[172]=aa):aa=t[172];const dl=aa;let vi;t[173]!==Ie?(vi=(ee,Ne)=>{Ie("queue.add",{sessionId:ee,content:Ne})},t[173]=Ie,t[174]=vi):vi=t[174];const Nc=vi;let fl;t[175]!==Ie?(fl=ee=>{Ie("queue.remove",{queueId:ee})},t[175]=Ie,t[176]=fl):fl=t[176];const Dc=fl;let la;t[177]!==Nc||t[178]!==k||t[179]!==Vr||t[180]!==Ie||t[181]!==F?(la=ee=>{!k||Vr||(k.runningAt||F===k.id?Nc(k.id,ee):Ie("chat.message",{sessionId:k.id,content:ee}))},t[177]=Nc,t[178]=k,t[179]=Vr,t[180]=Ie,t[181]=F,t[182]=la):la=t[182];const hl=la;let Pi;t[183]!==Ie?(Pi=(ee,Ne,tt)=>{$t(ot=>ot.filter(ve=>ve.toolCallId!==ee)),Ie("permission.response",{toolCallId:ee,allowed:Ne,alwaysAllow:tt})},t[183]=Ie,t[184]=Pi):Pi=t[184];const ds=Pi;let pl;t[185]!==k||t[186]!==Ie?(pl=()=>{k&&Ie("session.interrupt",{sessionId:k.id})},t[185]=k,t[186]=Ie,t[187]=pl):pl=t[187];const _i=pl;let ca;t[188]!==ue||t[189]!==Ie?(ca=()=>{ue&&Ie("permission.list",{workspaceId:ue.id})},t[188]=ue,t[189]=Ie,t[190]=ca):ca=t[190];const ml=ca;let Js;t[191]!==Ie?(Js=ee=>{Ie("provider.connect",{provider:ee})},t[191]=Ie,t[192]=Js):Js=t[192];const ua=Js;let da;t[193]!==Ie?(da=ee=>{Ie("provider.disconnect",{provider:ee})},t[193]=Ie,t[194]=da):da=t[194];const gl=da;let fa;if(t[195]!==(ue==null?void 0:ue.id)||t[196]!==v){let ee;t[198]!==(ue==null?void 0:ue.id)?(ee=Ne=>Ne.workspaceId===(ue==null?void 0:ue.id),t[198]=ue==null?void 0:ue.id,t[199]=ee):ee=t[199],fa=v.filter(ee),t[195]=ue==null?void 0:ue.id,t[196]=v,t[197]=fa}else fa=t[197];const ha=fa;let vl;if(t[200]!==(n==null?void 0:n.id)||t[201]!==a){let ee;t[203]!==(n==null?void 0:n.id)?(ee=Ne=>Ne.serverId===(n==null?void 0:n.id)&&Ne.workspaceId,t[203]=n==null?void 0:n.id,t[204]=ee):ee=t[204],vl=a.filter(ee).map(lH),t[200]=n==null?void 0:n.id,t[201]=a,t[202]=vl}else vl=t[202];const pa=vl;let eo,dt,ln,cr,yi,bi,fs,hs,Kr,Fi;if(t[205]!==n||t[206]!==ue||t[207]!==Xe||t[208]!==li||t[209]!==na||t[210]!==Rc||t[211]!==_r||t[212]!==I||t[213]!==pn||t[214]!==zi||t[215]!==U||t[216]!==k||t[217]!==Me||t[218]!==mi||t[219]!==pa||t[220]!==Ac||t[221]!==Li||t[222]!==ta||t[223]!==Ys||t[224]!==hi||t[225]!==_i||t[226]!==gn||t[227]!==dl||t[228]!==ds||t[229]!==us||t[230]!==Vr||t[231]!==l||t[232]!==ge||t[233]!==Zt||t[234]!==Gt||t[235]!==sa||t[236]!==w||t[237]!==y||t[238]!==Kt||t[239]!==Nn||t[240]!==Dc||t[241]!==ia||t[242]!==gi||t[243]!==Qt||t[244]!==Ec||t[245]!==ie||t[246]!==hl||t[247]!==Ie||t[248]!==Qe||t[249]!==e.length||t[250]!==Z||t[251]!==v||t[252]!==ce||t[253]!==ke||t[254]!==xe||t[255]!==F||t[256]!==cs||t[257]!==Tc||t[258]!==ul||t[259]!==ha||t[260]!==Ge){const ee=k?Li(k.id):[],Ne=k&&(Ui=ue==null?void 0:ue.name)!=null?Ui:"Jean2";let tt;t[271]!==w?(tt=w.filter(aH),t[271]=w,t[272]=tt):tt=t[272];const ot=tt;let ve;t[273]!==((jc=ot[0])==null?void 0:jc.id)||t[274]!==Ie||t[275]!==Ge?(ve=Lt=>{var Tr;ct(Ge.find(wi=>wi.id===Lt)||null),Wo.current=!0;const kn=(Tr=ot[0])==null?void 0:Tr.id;Ie("session.create",{preconfigId:kn,workspaceId:Lt})},t[273]=(Oc=ot[0])==null?void 0:Oc.id,t[274]=Ie,t[275]=Ge,t[276]=ve):ve=t[276];const Ae=ve;let We;t[277]===Symbol.for("react.memo_cache_sentinel")?(We=Lt=>{ze(Lt),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var kn;(kn=Q.current)==null||kn.focusSessionPanel()})})},t[277]=We):We=t[277];const At=We;let rn,In;t[278]===Symbol.for("react.memo_cache_sentinel")?(rn=()=>je(!1),In=()=>{var Lt;return(Lt=G.current)==null?void 0:Lt.focus()},t[278]=rn,t[279]=In):(rn=t[278],In=t[279]);let Jt;t[280]!==ue||t[281]!==zi||t[282]!==((Lc=ot[0])==null?void 0:Lc.id)?(Jt=()=>{var Lt;ue&&zi((Lt=ot[0])==null?void 0:Lt.id)},t[280]=ue,t[281]=zi,t[282]=(fd=ot[0])==null?void 0:fd.id,t[283]=Jt):Jt=t[283];let Qr;t[284]===Symbol.for("react.memo_cache_sentinel")?(Qr=()=>At(iH),t[284]=Qr):Qr=t[284];let Er;t[285]!==_i||t[286]!==Jt?(Er={onCloseTerminal:rn,focusChatInput:In,onNewSession:Jt,onNewWindow:sH,onToggleViewMode:Qr,setTerminalOpen:je,sidebarRef:Q,terminalPanelRef:Y,onStopStreaming:_i},t[285]=_i,t[286]=Jt,t[287]=Er):Er=t[287];const Zr=Er,Wh=!(k!=null&&k.parentId);dt=!!n;const Jn=()=>{var Lt;return e.length===0?g.jsx(Nx,{onServerAdded:hi,error:li||void 0}):dt?l?g.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:g.jsx(Tx,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!I&&v.length===0?pn?g.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:g.jsx(IF,{serverUrl:Qe,authError:li,retryCount:Qt,nextRetryIn:Zt,onRetry:kc,onLogout:gn})}):g.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[g.jsx(Tx,{}),g.jsx(Pe,{variant:"ghost",size:"sm",onClick:gn,className:"text-muted-foreground",children:"Change Server"})]}):g.jsx(g.Fragment,{children:k?g.jsx(bF,{inputRef:G,session:k,messagesWithParts:ee,queuedMessages:Nn[k.id]||[],preconfigs:Wh?ot:w,prompts:y,models:ge,connectedProviderIds:new Set(Kt.filter(rH).map(nH)),connectableProviderIds:new Set(Kt.filter(tH).map(eH)),defaultModel:Me,onSendMessage:hl,onRemoveFromQueue:Dc,onChangePreconfig:Tc,onChangeModel:cs,onChangeVariant:ul,selectedVariant:ie,variants:(Lt=ge.find(kn=>kn.id===U))==null?void 0:Lt.variants,pendingPermissions:Gt,onPermissionResponse:ds,onRename:us,usage:Z,modelName:U,onNavigateToSubagent:gi,onNavigateBack:dl,isStreaming:F===k.id||!!k.runningAt,onInterrupt:_i,onRevert:Ec,onFork:Ac,onCompact:ee.filter(JF).length>=4?()=>Rc(k.id):void 0,isCompacting:Vr,compactionSuccess:_r,onClearCompactionSuccess:()=>$n(!1),serverUrl:Qe!=null?Qe:void 0,apiToken:Xe!=null?Xe:void 0}):g.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center text-muted-foreground px-6",children:[g.jsx("h2",{className:"mb-2",children:"Select or create a session"}),g.jsx("p",{children:"Choose a session from the sidebar or create a new one to start chatting."})]})}):g.jsx(Nx,{onServerAdded:hi,error:li||void 0})};eo=Y8,hs=!0,t[288]!==Zr?(Kr=g.jsx(XF,{...Zr}),t[288]=Zr,t[289]=Kr):Kr=t[289],t[290]!==ue||t[291]!==na||t[292]!==I||t[293]!==zi||t[294]!==Ae||t[295]!==k||t[296]!==mi||t[297]!==pa||t[298]!==ta||t[299]!==Ys||t[300]!==us||t[301]!==dt||t[302]!==Gt||t[303]!==sa||t[304]!==((hd=ot[0])==null?void 0:hd.id)||t[305]!==ia||t[306]!==gi||t[307]!==v||t[308]!==xe||t[309]!==F||t[310]!==ha||t[311]!==Ge?(Fi=dt&&g.jsx(fj,{ref:Q,allSessions:v,viewMode:xe,favoritedWorkspaceIds:pa,sessions:ha,currentSession:k,currentSessionId:(pd=k==null?void 0:k.id)!=null?pd:null,streamingSessionId:F,connected:I,workspaces:Ge,activeWorkspace:ue,onCreateSession:()=>{var Lt;return zi((Lt=ot[0])==null?void 0:Lt.id)},onResumeSession:gi,onCloseSession:na,onReopenSession:ia,onDeleteSession:sa,onRenameSession:us,onSelectWorkspace:ea,onCreateVirtualWorkspace:Ys,onCreatePhysicalWorkspace:ta,onDeleteWorkspace:mi,onOpenSettings:()=>ut(!0),onOpenMCP:()=>lt(!0),onOpenAddServer:()=>$r(!0),onServerSwitch:Yo,onEscape:()=>{var Lt;k&&((Lt=G.current)==null||Lt.focus())},onCreateSessionInWorkspace:Ae,pendingPermissions:Gt}),t[290]=ue,t[291]=na,t[292]=I,t[293]=zi,t[294]=Ae,t[295]=k,t[296]=mi,t[297]=pa,t[298]=ta,t[299]=Ys,t[300]=us,t[301]=dt,t[302]=Gt,t[303]=sa,t[304]=(Ic=ot[0])==null?void 0:Ic.id,t[305]=ia,t[306]=gi,t[307]=v,t[308]=xe,t[309]=F,t[310]=ha,t[311]=Ge,t[312]=Fi):Fi=t[312],ln="flex-1 flex flex-col overflow-hidden",t[313]===Symbol.for("react.memo_cache_sentinel")?(cr={paddingTop:"env(safe-area-inset-top, 0)",paddingBottom:"env(safe-area-inset-bottom, 0)"},t[313]=cr):cr=t[313];let $i;t[314]!==dt?($i=dt&&g.jsx(Eb,{}),t[314]=dt,t[315]=$i):$i=t[315];let Wn;t[316]!==Ne?(Wn=g.jsx("span",{className:"font-semibold",children:Ne}),t[316]=Ne,t[317]=Wn):Wn=t[317];let gs;t[318]!==$i||t[319]!==Wn?(gs=g.jsxs("div",{className:"flex items-center gap-2",children:[$i,Wn]}),t[318]=$i,t[319]=Wn,t[320]=gs):gs=t[320];let xi;t[321]!==dt?(xi=dt&&g.jsx(Dx,{onServerSwitch:Yo,onSelectWorkspace:Ka}),t[321]=dt,t[322]=xi):xi=t[322];let ur;t[323]!==dt||t[324]!==xe?(ur=dt&&g.jsx(Mx,{viewMode:xe,onViewModeChange:At}),t[323]=dt,t[324]=xe,t[325]=ur):ur=t[325];let qi;t[326]!==ue||t[327]!==dt||t[328]!==ce?(qi=dt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>be(!ce),title:ce?"Hide Files":"Show Files",children:g.jsx(kg,{className:"w-4 h-4"})}),t[326]=ue,t[327]=dt,t[328]=ce,t[329]=qi):qi=t[329];let vs;t[330]!==ue||t[331]!==dt||t[332]!==ke?(vs=dt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>je(!ke),title:ke?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[330]=ue,t[331]=dt,t[332]=ke,t[333]=vs):vs=t[333];let Vi;t[334]!==xi||t[335]!==ur||t[336]!==qi||t[337]!==vs?(Vi=g.jsxs("div",{className:"flex items-center gap-1",children:[xi,ur,qi,vs]}),t[334]=xi,t[335]=ur,t[336]=qi,t[337]=vs,t[338]=Vi):Vi=t[338],t[339]!==gs||t[340]!==Vi?(yi=g.jsxs("header",{className:"md:hidden flex items-center justify-between p-3 border-b border-border bg-background sticky top-0 z-10",children:[gs,Vi]}),t[339]=gs,t[340]=Vi,t[341]=yi):yi=t[341];let _s;t[342]!==dt?(_s=dt&&g.jsx(Eb,{}),t[342]=dt,t[343]=_s):_s=t[343];let _n;t[344]!==Ne?(_n=g.jsx("span",{className:"font-semibold",children:Ne}),t[344]=Ne,t[345]=_n):_n=t[345];let Ar;t[346]!==_s||t[347]!==_n?(Ar=g.jsxs("div",{className:"flex items-center gap-2",children:[_s,_n]}),t[346]=_s,t[347]=_n,t[348]=Ar):Ar=t[348];let Rr;t[349]!==dt?(Rr=dt&&g.jsx(Dx,{onServerSwitch:Yo,onSelectWorkspace:Ka}),t[349]=dt,t[350]=Rr):Rr=t[350];let Si;t[351]!==dt||t[352]!==xe?(Si=dt&&g.jsx(Mx,{viewMode:xe,onViewModeChange:At}),t[351]=dt,t[352]=xe,t[353]=Si):Si=t[353];let Jr;t[354]!==ue||t[355]!==dt||t[356]!==ce?(Jr=dt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>be(!ce),title:ce?"Hide Files":"Show Files",children:g.jsx(kg,{className:"w-4 h-4"})}),t[354]=ue,t[355]=dt,t[356]=ce,t[357]=Jr):Jr=t[357];let yn;t[358]!==ue||t[359]!==dt||t[360]!==ke?(yn=dt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>je(!ke),title:ke?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[358]=ue,t[359]=dt,t[360]=ke,t[361]=yn):yn=t[361];let bn;t[362]!==Rr||t[363]!==Si||t[364]!==Jr||t[365]!==yn?(bn=g.jsxs("div",{className:"flex items-center gap-2",children:[Rr,Si,Jr,yn]}),t[362]=Rr,t[363]=Si,t[364]=Jr,t[365]=yn,t[366]=bn):bn=t[366],t[367]!==Ar||t[368]!==bn?(bi=g.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[Ar,bn]}),t[367]=Ar,t[368]=bn,t[369]=bi):bi=t[369],fs=Jn(),t[205]=n,t[206]=ue,t[207]=Xe,t[208]=li,t[209]=na,t[210]=Rc,t[211]=_r,t[212]=I,t[213]=pn,t[214]=zi,t[215]=U,t[216]=k,t[217]=Me,t[218]=mi,t[219]=pa,t[220]=Ac,t[221]=Li,t[222]=ta,t[223]=Ys,t[224]=hi,t[225]=_i,t[226]=gn,t[227]=dl,t[228]=ds,t[229]=us,t[230]=Vr,t[231]=l,t[232]=ge,t[233]=Zt,t[234]=Gt,t[235]=sa,t[236]=w,t[237]=y,t[238]=Kt,t[239]=Nn,t[240]=Dc,t[241]=ia,t[242]=gi,t[243]=Qt,t[244]=Ec,t[245]=ie,t[246]=hl,t[247]=Ie,t[248]=Qe,t[249]=e.length,t[250]=Z,t[251]=v,t[252]=ce,t[253]=ke,t[254]=xe,t[255]=F,t[256]=cs,t[257]=Tc,t[258]=ul,t[259]=ha,t[260]=Ge,t[261]=eo,t[262]=dt,t[263]=ln,t[264]=cr,t[265]=yi,t[266]=bi,t[267]=fs,t[268]=hs,t[269]=Kr,t[270]=Fi}else eo=t[261],dt=t[262],ln=t[263],cr=t[264],yi=t[265],bi=t[266],fs=t[267],hs=t[268],Kr=t[269],Fi=t[270];let kr;t[370]!==(ue==null?void 0:ue.id)||t[371]!==(ue==null?void 0:ue.name)||t[372]!==(ue==null?void 0:ue.path)||t[373]!==Xe||t[374]!==dt||t[375]!==Qe||t[376]!==ke?(kr=dt&&g.jsx(Lj,{ref:Y,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,workspaceName:ue==null?void 0:ue.name,serverUrl:Qe!=null?Qe:void 0,apiToken:Xe!=null?Xe:void 0,isOpen:ke,onClose:()=>je(!1)}),t[370]=ue==null?void 0:ue.id,t[371]=ue==null?void 0:ue.name,t[372]=ue==null?void 0:ue.path,t[373]=Xe,t[374]=dt,t[375]=Qe,t[376]=ke,t[377]=kr):kr=t[377];let Hi;t[378]!==ln||t[379]!==cr||t[380]!==yi||t[381]!==bi||t[382]!==fs||t[383]!==kr?(Hi=g.jsxs("main",{className:ln,style:cr,children:[yi,bi,fs,kr]}),t[378]=ln,t[379]=cr,t[380]=yi,t[381]=bi,t[382]=fs,t[383]=kr,t[384]=Hi):Hi=t[384];let Yr;t[385]!==(ue==null?void 0:ue.id)||t[386]!==(ue==null?void 0:ue.path)||t[387]!==Xe||t[388]!==Ve||t[389]!==ua||t[390]!==gl||t[391]!==gn||t[392]!==dt||t[393]!==_e||t[394]!==St||t[395]!==Kt||t[396]!==ml||t[397]!==Ie||t[398]!==Qe||t[399]!==ce||t[400]!==Le||t[401]!==it?(Yr=dt&&g.jsxs(g.Fragment,{children:[g.jsx(bj,{workspaceId:ue==null?void 0:ue.id,serverUrl:Qe!=null?Qe:void 0,apiToken:Xe!=null?Xe:void 0,isOpen:ce,onClose:()=>be(!1)}),g.jsx(NF,{open:it,onOpenChange:ut,permissions:St,onRefreshPermissions:ml,onRevokePermission:ee=>{Ie("permission.revoke",{permissionId:ee})},onRevokeAllPermissions:()=>{Ie("permission.revoke_all",{workspaceId:ue==null?void 0:ue.id})},apiToken:Xe,onLogout:gn,providerStatuses:Kt,onConnectProvider:ua,onDisconnectProvider:gl,chatFinishSoundEnabled:Ve,onChatFinishSoundEnabledChange:_t,permissionSoundEnabled:_e,onPermissionSoundEnabledChange:Ye}),g.jsx(LF,{open:Le,onOpenChange:lt,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,serverUrl:Qe!=null?Qe:void 0,apiToken:Xe!=null?Xe:void 0})]}),t[385]=ue==null?void 0:ue.id,t[386]=ue==null?void 0:ue.path,t[387]=Xe,t[388]=Ve,t[389]=ua,t[390]=gl,t[391]=gn,t[392]=dt,t[393]=_e,t[394]=St,t[395]=Kt,t[396]=ml,t[397]=Ie,t[398]=Qe,t[399]=ce,t[400]=Le,t[401]=it,t[402]=Yr):Yr=t[402];let to;t[403]===Symbol.for("react.memo_cache_sentinel")?(to=ee=>{$r(ee),ee||qr(null)},t[403]=to):to=t[403];let ps;t[404]!==ui||t[405]!==ci?(ps=g.jsx(BF,{open:ci,onOpenChange:to,editServer:ui}),t[404]=ui,t[405]=ci,t[406]=ps):ps=t[406];let Xr;return t[407]!==eo||t[408]!==hs||t[409]!==Kr||t[410]!==Fi||t[411]!==Hi||t[412]!==Yr||t[413]!==ps?(Xr=g.jsxs(eo,{defaultOpen:hs,children:[Kr,Fi,Hi,Yr,ps]}),t[407]=eo,t[408]=hs,t[409]=Kr,t[410]=Fi,t[411]=Hi,t[412]=Yr,t[413]=ps,t[414]=Xr):Xr=t[414],Xr}function JF(t){return t.message.role!=="system"}function eH(t){return t.provider}function tH(t){return t.connectable}function nH(t){return t.provider}function rH(t){return t.connected}function iH(t){return t==="overview"?"default":"overview"}function sH(){o1("create_new_window").catch(oH)}function oH(){}function aH(t){return t.mode!=="subagent"}function lH(t){return t.workspaceId}function cH(t){return t.message}function uH(t){return t.message}function dH(t){const e=new Date().toISOString();return t.map(n=>({...n,revokedAt:e}))}function fH(t){return{toolCallId:t.toolCallId,sessionId:t.sessionId,toolName:t.toolName,args:t.args,permissionType:t.permissionType,permissionKey:t.permissionKey,message:t.message,details:t.details,dangerous:t.dangerous,childSessionId:t.childSessionId,subagentName:t.subagentName}}function hH(t){return t.toolCallId}function pH(t){return t.message}function mH(){return{message:"Failed to delete workspace"}}function gH(t){return t.json()}function vH(t){return t.json()}function _H(t){return t.json()}function yH(t){return t.json()}function bH(t){return t.json()}function xH(t){return t.json()}function SH(t){return t+1}function wH(t){return t+1}function CH(t){return t+1}function kH(t){return t+1}function EH(t){return t+1}function AH(t){console.error("WebSocket error:",t)}function RH(t,e){return t.createdAt-e.createdAt}function TH(t){return t+1}function NH(t){return t+1}function DH(){const t=localStorage.getItem("jean2_sound_permission_enabled");return t!==null?t==="true":!0}function MH(){const t=localStorage.getItem("jean2_sound_chat_finish_enabled");return t!==null?t==="true":!0}function jH(){return localStorage.getItem("jean2_sidebar_view")||"default"}function OH(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(U5,{children:g.jsx(ZF,{})}),t[0]=e):e=t[0],e}bE.createRoot(document.getElementById("root")).render(g.jsx(D.StrictMode,{children:g.jsx(CE,{defaultMode:"system",defaultScheme:"neutral",children:g.jsx(OH,{})})}));