@jean2/client 0.6.5 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,571 @@
1
+ function wE(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 u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).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 sh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dm={exports:{}},vu={};/**
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 yy;function CE(){if(yy)return vu;yy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+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:u,ref:o!==void 0?o:null,props:l}}return vu.Fragment=e,vu.jsx=n,vu.jsxs=n,vu}var by;function kE(){return by||(by=1,Dm.exports=CE()),Dm.exports}var g=kE(),Mm={exports:{}},pt={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var xy;function EE(){if(xy)return pt;xy=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"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.iterator;function S(z){return z===null||typeof z!="object"?null:(z=_&&z[_]||z["@@iterator"],typeof z=="function"?z:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function b(z,H,F){this.props=z,this.context=H,this.refs=v,this.updater=F||C}b.prototype.isReactComponent={},b.prototype.setState=function(z,H){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,H,"setState")},b.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(z,H,F){this.props=z,this.context=H,this.refs=v,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(z,H,F){var Q=F.ref;return{$$typeof:t,type:z,key:H,ref:Q!==void 0?Q:null,props:F}}function O(z,H){return j(z.type,H,z.props)}function I(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function V(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(F){return H[F]})}var U=/\/+/g;function W(z,H){return typeof z=="object"&&z!==null&&z.key!=null?V(""+z.key):H.toString(36)}function K(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(H){z.status==="pending"&&(z.status="fulfilled",z.value=H)},function(H){z.status==="pending"&&(z.status="rejected",z.reason=H)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function G(z,H,F,Q,te){var X=typeof z;(X==="undefined"||X==="boolean")&&(z=null);var q=!1;if(z===null)q=!0;else switch(X){case"bigint":case"string":case"number":q=!0;break;case"object":switch(z.$$typeof){case t:case e:q=!0;break;case p:return q=z._init,G(q(z._payload),H,F,Q,te)}}if(q)return te=te(z),q=Q===""?"."+W(z,0):Q,N(te)?(F="",q!=null&&(F=q.replace(U,"$&/")+"/"),G(te,H,F,"",function(ie){return ie})):te!=null&&(I(te)&&(te=O(te,F+(te.key==null||z&&z.key===te.key?"":(""+te.key).replace(U,"$&/")+"/")+q)),H.push(te)),1;q=0;var $=Q===""?".":Q+":";if(N(z))for(var ne=0;ne<z.length;ne++)Q=z[ne],X=$+W(Q,ne),q+=G(Q,H,F,X,te);else if(ne=S(z),typeof ne=="function")for(z=ne.call(z),ne=0;!(Q=z.next()).done;)Q=Q.value,X=$+W(Q,ne++),q+=G(Q,H,F,X,te);else if(X==="object"){if(typeof z.then=="function")return G(K(z),H,F,Q,te);throw H=String(z),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function Z(z,H,F){if(z==null)return z;var Q=[],te=0;return G(z,Q,"","",function(X){return H.call(F,X,te++)}),Q}function ee(z){if(z._status===-1){var H=z._result;H=H(),H.then(function(F){(z._status===0||z._status===-1)&&(z._status=1,z._result=F)},function(F){(z._status===0||z._status===-1)&&(z._status=2,z._result=F)}),z._status===-1&&(z._status=0,z._result=H)}if(z._status===1)return z._result.default;throw z._result}var B=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},L={map:Z,forEach:function(z,H,F){Z(z,function(){H.apply(this,arguments)},F)},count:function(z){var H=0;return Z(z,function(){H++}),H},toArray:function(z){return Z(z,function(H){return H})||[]},only:function(z){if(!I(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return pt.Activity=h,pt.Children=L,pt.Component=b,pt.Fragment=n,pt.Profiler=o,pt.PureComponent=x,pt.StrictMode=i,pt.Suspense=d,pt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,pt.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},pt.cache=function(z){return function(){return z.apply(null,arguments)}},pt.cacheSignal=function(){return null},pt.cloneElement=function(z,H,F){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var Q=w({},z.props),te=z.key;if(H!=null)for(X in H.key!==void 0&&(te=""+H.key),H)!T.call(H,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&H.ref===void 0||(Q[X]=H[X]);var X=arguments.length-2;if(X===1)Q.children=F;else if(1<X){for(var q=Array(X),$=0;$<X;$++)q[$]=arguments[$+2];Q.children=q}return j(z.type,te,Q)},pt.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},pt.createElement=function(z,H,F){var Q,te={},X=null;if(H!=null)for(Q in H.key!==void 0&&(X=""+H.key),H)T.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(te[Q]=H[Q]);var q=arguments.length-2;if(q===1)te.children=F;else if(1<q){for(var $=Array(q),ne=0;ne<q;ne++)$[ne]=arguments[ne+2];te.children=$}if(z&&z.defaultProps)for(Q in q=z.defaultProps,q)te[Q]===void 0&&(te[Q]=q[Q]);return j(z,X,te)},pt.createRef=function(){return{current:null}},pt.forwardRef=function(z){return{$$typeof:a,render:z}},pt.isValidElement=I,pt.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:ee}},pt.memo=function(z,H){return{$$typeof:f,type:z,compare:H===void 0?null:H}},pt.startTransition=function(z){var H=M.T,F={};M.T=F;try{var Q=z(),te=M.S;te!==null&&te(F,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(A,B)}catch(X){B(X)}finally{H!==null&&F.types!==null&&(H.types=F.types),M.T=H}},pt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},pt.use=function(z){return M.H.use(z)},pt.useActionState=function(z,H,F){return M.H.useActionState(z,H,F)},pt.useCallback=function(z,H){return M.H.useCallback(z,H)},pt.useContext=function(z){return M.H.useContext(z)},pt.useDebugValue=function(){},pt.useDeferredValue=function(z,H){return M.H.useDeferredValue(z,H)},pt.useEffect=function(z,H){return M.H.useEffect(z,H)},pt.useEffectEvent=function(z){return M.H.useEffectEvent(z)},pt.useId=function(){return M.H.useId()},pt.useImperativeHandle=function(z,H,F){return M.H.useImperativeHandle(z,H,F)},pt.useInsertionEffect=function(z,H){return M.H.useInsertionEffect(z,H)},pt.useLayoutEffect=function(z,H){return M.H.useLayoutEffect(z,H)},pt.useMemo=function(z,H){return M.H.useMemo(z,H)},pt.useOptimistic=function(z,H){return M.H.useOptimistic(z,H)},pt.useReducer=function(z,H,F){return M.H.useReducer(z,H,F)},pt.useRef=function(z){return M.H.useRef(z)},pt.useState=function(z){return M.H.useState(z)},pt.useSyncExternalStore=function(z,H,F){return M.H.useSyncExternalStore(z,H,F)},pt.useTransition=function(){return M.H.useTransition()},pt.version="19.2.4",pt}var Sy;function oh(){return Sy||(Sy=1,Mm.exports=EE()),Mm.exports}var D=oh();const ni=sh(D),Fx=wE({__proto__:null,default:ni},[D]);var jm={exports:{}},_u={},Om={exports:{}},Lm={};/**
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 wy;function AE(){return wy||(wy=1,(function(t){function e(G,Z){var ee=G.length;G.push(Z);e:for(;0<ee;){var B=ee-1>>>1,L=G[B];if(0<o(L,Z))G[B]=Z,G[ee]=L,ee=B;else break e}}function n(G){return G.length===0?null:G[0]}function i(G){if(G.length===0)return null;var Z=G[0],ee=G.pop();if(ee!==Z){G[0]=ee;e:for(var B=0,L=G.length,z=L>>>1;B<z;){var H=2*(B+1)-1,F=G[H],Q=H+1,te=G[Q];if(0>o(F,ee))Q<L&&0>o(te,F)?(G[B]=te,G[Q]=ee,B=Q):(G[B]=F,G[H]=ee,B=H);else if(Q<L&&0>o(te,ee))G[B]=te,G[Q]=ee,B=Q;else break e}}return Z}function o(G,Z){var ee=G.sortIndex-Z.sortIndex;return ee!==0?ee:G.id-Z.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 u=Date,a=u.now();t.unstable_now=function(){return u.now()-a}}var d=[],f=[],p=1,h=null,_=3,S=!1,C=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function k(G){for(var Z=n(f);Z!==null;){if(Z.callback===null)i(f);else if(Z.startTime<=G)i(f),Z.sortIndex=Z.expirationTime,e(d,Z);else break;Z=n(f)}}function N(G){if(w=!1,k(G),!C)if(n(d)!==null)C=!0,A||(A=!0,V());else{var Z=n(f);Z!==null&&K(N,Z.startTime-G)}}var A=!1,M=-1,T=5,j=-1;function O(){return v?!0:!(t.unstable_now()-j<T)}function I(){if(v=!1,A){var G=t.unstable_now();j=G;var Z=!0;try{e:{C=!1,w&&(w=!1,y(M),M=-1),S=!0;var ee=_;try{t:{for(k(G),h=n(d);h!==null&&!(h.expirationTime>G&&O());){var B=h.callback;if(typeof B=="function"){h.callback=null,_=h.priorityLevel;var L=B(h.expirationTime<=G);if(G=t.unstable_now(),typeof L=="function"){h.callback=L,k(G),Z=!0;break t}h===n(d)&&i(d),k(G)}else i(d);h=n(d)}if(h!==null)Z=!0;else{var z=n(f);z!==null&&K(N,z.startTime-G),Z=!1}}break e}finally{h=null,_=ee,S=!1}Z=void 0}}finally{Z?V():A=!1}}}var V;if(typeof x=="function")V=function(){x(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,W=U.port2;U.port1.onmessage=I,V=function(){W.postMessage(null)}}else V=function(){b(I,0)};function K(G,Z){M=b(function(){G(t.unstable_now())},Z)}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 _},t.unstable_next=function(G){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var ee=_;_=Z;try{return G()}finally{_=ee}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ee=_;_=G;try{return Z()}finally{_=ee}},t.unstable_scheduleCallback=function(G,Z,ee){var B=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?B+ee:B):ee=B,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=ee+L,G={id:p++,callback:Z,priorityLevel:G,startTime:ee,expirationTime:L,sortIndex:-1},ee>B?(G.sortIndex=ee,e(f,G),n(d)===null&&G===n(f)&&(w?(y(M),M=-1):w=!0,K(N,ee-B))):(G.sortIndex=L,e(d,G),C||S||(C=!0,A||(A=!0,V()))),G},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(G){var Z=_;return function(){var ee=_;_=Z;try{return G.apply(this,arguments)}finally{_=ee}}}})(Lm)),Lm}var Cy;function RE(){return Cy||(Cy=1,Om.exports=AE()),Om.exports}var Im={exports:{}},Wn={};/**
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 ky;function TE(){if(ky)return Wn;ky=1;var t=oh();function e(d){var f="https://react.dev/errors/"+d;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 #"+d+"; 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(d,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:d,containerInfo:f,implementation:p}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Wn.createPortal=function(d,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(d,f,null,p)},Wn.flushSync=function(d){var f=u.T,p=i.p;try{if(u.T=null,i.p=2,d)return d()}finally{u.T=f,i.p=p,i.d.f()}},Wn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(d,f))},Wn.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Wn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin),_=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:_,fetchPriority:S}):p==="script"&&i.d.X(d,{crossOrigin:h,integrity:_,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Wn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=a(f.as,f.crossOrigin);i.d.M(d,{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(d)},Wn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin);i.d.L(d,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})}},Wn.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=a(f.as,f.crossOrigin);i.d.m(d,{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(d)},Wn.requestFormReset=function(d){i.d.r(d)},Wn.unstable_batchedUpdates=function(d,f){return d(f)},Wn.useFormState=function(d,f,p){return u.H.useFormState(d,f,p)},Wn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Wn.version="19.2.4",Wn}var Ey;function Hx(){if(Ey)return Im.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(),Im.exports=TE(),Im.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 Ay;function NE(){if(Ay)return _u;Ay=1;var t=RE(),e=oh(),n=Hx();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 u(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 d(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 d(E),r;if(R===m)return d(E),s;R=R.sibling}throw Error(i(188))}if(c.return!==m.return)c=E,m=R;else{for(var P=!1,Y=E.child;Y;){if(Y===c){P=!0,c=E,m=R;break}if(Y===m){P=!0,m=E,c=R;break}Y=Y.sibling}if(!P){for(Y=R.child;Y;){if(Y===c){P=!0,c=R,m=E;break}if(Y===m){P=!0,m=R,c=E;break}Y=Y.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,_=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),v=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"),I=Symbol.iterator;function V(r){return r===null||typeof r!="object"?null:(r=I&&r[I]||r["@@iterator"],typeof r=="function"?r:null)}var U=Symbol.for("react.client.reference");function W(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===U?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case b:return"Profiler";case v: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:W(r.type)||"Memo";case T:s=r._payload,r=r._init;try{return W(r(s))}catch{}}return null}var K=Array.isArray,G=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},B=[],L=-1;function z(r){return{current:r}}function H(r){0>L||(r.current=B[L],B[L]=null,L--)}function F(r,s){L++,B[L]=r.current,r.current=s}var Q=z(null),te=z(null),X=z(null),q=z(null);function $(r,s){switch(F(X,s),F(te,r),F(Q,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?U_(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=U_(s),r=$_(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(Q),F(Q,r)}function ne(){H(Q),H(te),H(X)}function ie(r){r.memoizedState!==null&&F(q,r);var s=Q.current,c=$_(s,r.type);s!==c&&(F(te,r),F(Q,c))}function ae(r){te.current===r&&(H(Q),H(te)),q.current===r&&(H(q),hu._currentValue=ee)}var se,ye;function Re(r){if(se===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);se=s&&s[1]||"",ye=-1<c.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+se+r+ye}var je=!1;function Be(r,s){if(!r||je)return"";je=!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(ve){var pe=ve}Reflect.construct(r,[],we)}else{try{we.call()}catch(ve){pe=ve}r.call(we.prototype)}}else{try{throw Error()}catch(ve){pe=ve}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(ve){if(ve&&pe&&typeof ve.stack=="string")return[ve.stack,pe.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],Y=R[1];if(P&&Y){var re=P.split(`
44
+ `),he=Y.split(`
45
+ `);for(E=m=0;m<re.length&&!re[m].includes("DetermineComponentFrameRoot");)m++;for(;E<he.length&&!he[E].includes("DetermineComponentFrameRoot");)E++;if(m===re.length||E===he.length)for(m=re.length-1,E=he.length-1;1<=m&&0<=E&&re[m]!==he[E];)E--;for(;1<=m&&0<=E;m--,E--)if(re[m]!==he[E]){if(m!==1||E!==1)do if(m--,E--,0>E||re[m]!==he[E]){var be=`
46
+ `+re[m].replace(" at new "," at ");return r.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",r.displayName)),be}while(1<=m&&0<=E);break}}}finally{je=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?Re(c):""}function De(r,s){switch(r.tag){case 26:case 27:case 5:return Re(r.type);case 16:return Re("Lazy");case 13:return r.child!==s&&s!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Be(r.type,!1);case 11:return Be(r.type.render,!1);case 1:return Be(r.type,!0);case 31:return Re("Activity");default:return""}}function et(r){try{var s="",c=null;do s+=De(r,c),c=r,r=r.return;while(r);return s}catch(m){return`
47
+ Error generating stack: `+m.message+`
48
+ `+m.stack}}var it=Object.prototype.hasOwnProperty,ut=t.unstable_scheduleCallback,ot=t.unstable_cancelCallback,mt=t.unstable_shouldYield,Ze=t.unstable_requestPaint,tt=t.unstable_now,ue=t.unstable_getCurrentPriorityLevel,de=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,_e=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,We=t.log,Fe=t.unstable_setDisableYieldValue,He=null,dt=null;function ft(r){if(typeof We=="function"&&Fe(r),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(He,r)}catch{}}var ke=Math.clz32?Math.clz32:bt,Ue=Math.log,ct=Math.LN2;function bt(r){return r>>>=0,r===0?32:31-(Ue(r)/ct|0)|0}var qt=256,Ut=262144,on=4194304;function Zt(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 Nn(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 Y=m&134217727;return Y!==0?(m=Y&~R,m!==0?E=Zt(m):(P&=Y,P!==0?E=Zt(P):c||(c=Y&~r,c!==0&&(E=Zt(c))))):(Y=m&~R,Y!==0?E=Zt(Y):P!==0?E=Zt(P):c||(c=m&~r,c!==0&&(E=Zt(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 tn(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Wt(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 un(){var r=on;return on<<=1,(on&62914560)===0&&(on=4194304),r}function dn(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function $n(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ri(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 Y=r.entanglements,re=r.expirationTimes,he=r.hiddenUpdates;for(c=P&~c;0<c;){var be=31-ke(c),we=1<<be;Y[be]=0,re[be]=-1;var pe=he[be];if(pe!==null)for(he[be]=null,be=0;be<pe.length;be++){var ve=pe[be];ve!==null&&(ve.lane&=-536870913)}c&=~we}m!==0&&Dn(r,m,0),R!==0&&E===0&&r.tag!==0&&(r.suspendedLanes|=R&~(P&~s))}function Dn(r,s,c){r.pendingLanes|=s,r.suspendedLanes&=~s;var m=31-ke(s);r.entangledLanes|=s,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function ai(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var m=31-ke(c),E=1<<m;E&s|r[m]&s&&(r[m]|=s),c&=~E}}function Xn(r,s){var c=s&-s;return c=(c&42)!==0?1:$r(c),(c&(r.suspendedLanes|s))!==0?0:c}function $r(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 ir(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Ti(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:fy(r.type))}function Cr(r,s){var c=Z.p;try{return Z.p=r,s()}finally{Z.p=c}}var sr=Math.random().toString(36).slice(2),Et="__reactFiber$"+sr,Bt="__reactProps$"+sr,an="__reactContainer$"+sr,vn="__reactEvents$"+sr,Ni="__reactListeners$"+sr,Vr="__reactHandles$"+sr,or="__reactResources$"+sr,En="__reactMarker$"+sr;function ar(r){delete r[Et],delete r[Bt],delete r[vn],delete r[Ni],delete r[Vr]}function lr(r){var s=r[Et];if(s)return s;for(var c=r.parentNode;c;){if(s=c[an]||c[Et]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=X_(r);r!==null;){if(c=r[Et])return c;r=X_(r)}return s}r=c,c=r.parentNode}return null}function Mn(r){if(r=r[Et]||r[an]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function jn(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[or];return s||(s=r[or]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Lt(r){r[En]=!0}var li=new Set,ts={};function _n(r,s){Dt(r,s),Dt(r+"Capture",s)}function Dt(r,s){for(ts[r]=s,r=0;r<s.length;r++)li.add(s[r])}var kr=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]*$"),ci={},Di={};function ui(r){return it.call(Di,r)?!0:it.call(ci,r)?!1:kr.test(r)?Di[r]=!0:(ci[r]=!0,!1)}function Zn(r,s,c){if(ui(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 cr(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 nn(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 Yt(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function di(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function qr(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 Fs(r){if(!r._valueTracker){var s=di(r)?"checked":"value";r._valueTracker=qr(r,s,""+r[s])}}function Go(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return r&&(m=di(r)?r.checked?"true":"false":r.value),r=m,r!==c?(s.setValue(r),!0):!1}function ns(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 Ka=/[\n"\\]/g;function On(r){return r.replace(Ka,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Hs(r,s,c,m,E,R,P,Y){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=""+Yt(s)):r.value!==""+Yt(s)&&(r.value=""+Yt(s)):P!=="submit"&&P!=="reset"||r.removeAttribute("value"),s!=null?Us(r,P,Yt(s)):c!=null?Us(r,P,Yt(c)):m!=null&&r.removeAttribute("value"),E==null&&R!=null&&(r.defaultChecked=!!R),E!=null&&(r.checked=E&&typeof E!="function"&&typeof E!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?r.name=""+Yt(Y):r.removeAttribute("name")}function Ko(r,s,c,m,E,R,P,Y){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)){Fs(r);return}c=c!=null?""+Yt(c):"",s=s!=null?""+Yt(s):c,Y||s===r.value||(r.value=s),r.defaultValue=s}m=m!=null?m:E,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=Y?r.checked:!!m,r.defaultChecked=!!m,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(r.name=P),Fs(r)}function Us(r,s,c){s==="number"&&ns(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=""+Yt(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 Dc(r,s,c){if(s!=null&&(s=""+Yt(s),s!==r.value&&(r.value=s),c==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=c!=null?""+Yt(c):""}function Ya(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=Yt(s),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),Fs(r)}function Qe(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var Je=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 Yo(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||Je.has(s)?s==="float"?r.cssFloat=c:r[s]=(""+c).trim():r[s]=c+"px"}function Xo(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&&Yo(r,E,m)}else for(var R in s)s.hasOwnProperty(R)&&Yo(r,R,s[R])}function $s(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 Xa=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"]]),Qa=/^[\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 Qa.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ur(){}var Vs=null;function qs(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Jt=null,hi=null;function md(r){var s=Mn(r);if(s&&(r=s.stateNode)){var c=r[Bt]||null;e:switch(r=s.stateNode,s.type){case"input":if(Hs(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="'+On(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==r&&m.form===r.form){var E=m[Bt]||null;if(!E)throw Error(i(90));Hs(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&&Go(m)}break e;case"textarea":Dc(r,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&fi(r,!!c.multiple,s,!1)}}}var Ws=!1;function Gs(r,s,c){if(Ws)return r(s,c);Ws=!0;try{var m=r(s);return m}finally{if(Ws=!1,(Jt!==null||hi!==null)&&(Gd(),Jt&&(s=Jt,r=hi,hi=Jt=null,md(s),r)))for(s=0;s<r.length;s++)md(r[s])}}function Mi(r,s){var c=r.stateNode;if(c===null)return null;var m=c[Bt]||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 dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=!1;if(dr)try{var en={};Object.defineProperty(en,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",en,en),window.removeEventListener("test",en,en)}catch{Ks=!1}var Er=null,Qo=null,is=null;function Zo(){if(is)return is;var r,s=Qo,c=s.length,m,E="value"in Er?Er.value:Er.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 yn(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 Y in r)r.hasOwnProperty(Y)&&(c=r[Y],this[Y]=c?c(R):R[Y]);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 Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=yn(Wr),ji=h({},Wr,{view:0,detail:0}),Za=yn(ji),Ys,Xs,Oi,ls=h({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Js,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!==Oi&&(Oi&&r.type==="mousemove"?(Ys=r.screenX-Oi.screenX,Xs=r.screenY-Oi.screenY):Xs=Ys=0,Oi=r),Ys)},movementY:function(r){return"movementY"in r?r.movementY:Xs}}),ea=yn(ls),Qs=h({},ls,{dataTransfer:0}),Ja=yn(Qs),Qh=h({},ji,{relatedTarget:0}),Zs=yn(Qh),gd=h({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),el=yn(gd),ta=h({},Wr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),tl=yn(ta),na=h({},Wr,{data:0}),ra=yn(na),ia={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nl={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 il(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=rl[r])?!!s[r]:!1}function Js(){return il}var sl=h({},ji,{key:function(r){if(r.key){var s=ia[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"?nl[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Js,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}}),ol=yn(sl),al=h({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ze=yn(al),ll=h({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Js}),Li=yn(ll),cl=h({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pi=yn(cl),ul=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}),sa=yn(ul),dl=h({},Wr,{newState:0,oldState:0}),Mc=yn(dl),fl=[9,13,27,32],oa=dr&&"CompositionEvent"in window,Ii=null;dr&&"documentMode"in document&&(Ii=document.documentMode);var jc=dr&&"TextEvent"in window&&!Ii,aa=dr&&(!oa||Ii&&8<Ii&&11>=Ii),eo=" ",la=!1;function to(r,s){switch(r){case"keyup":return fl.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ca(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var zi=!1;function hl(r,s){switch(r){case"compositionend":return ca(s);case"keypress":return s.which!==32?null:(la=!0,eo);case"textInput":return r=s.data,r===eo&&la?null:r;default:return null}}function Oc(r,s){if(zi)return r==="compositionend"||!oa&&to(r,s)?(r=Zo(),is=Qo=Er=null,zi=!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 aa&&s.locale!=="ko"?null:s.data;default:return null}}var pl={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 ml(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!pl[r.type]:s==="textarea"}function ua(r,s,c,m){Jt?hi?hi.push(m):hi=[m]:Jt=m,s=ef(s,"onChange"),0<s.length&&(c=new as("onChange","change",null,c,m),r.push({event:c,listeners:s}))}var Gr=null,Bi=null;function Lc(r){I_(r,0)}function cs(r){var s=jn(r);if(Go(s))return r}function gl(r,s){if(r==="change")return s}var da=!1;if(dr){var fa;if(dr){var no="oninput"in document;if(!no){var vl=document.createElement("div");vl.setAttribute("oninput","return;"),no=typeof vl.oninput=="function"}fa=no}else fa=!1;da=fa&&(!document.documentMode||9<document.documentMode)}function ha(){Gr&&(Gr.detachEvent("onpropertychange",_l),Bi=Gr=null)}function _l(r){if(r.propertyName==="value"&&cs(Bi)){var s=[];ua(s,Bi,r,qs(r)),Gs(Lc,s)}}function yl(r,s,c){r==="focusin"?(ha(),Gr=s,Bi=c,Gr.attachEvent("onpropertychange",_l)):r==="focusout"&&ha()}function ro(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return cs(Bi)}function bl(r,s){if(r==="click")return cs(s)}function Ic(r,s){if(r==="input"||r==="change")return cs(s)}function xl(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Ln=typeof Object.is=="function"?Object.is:xl;function Pi(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(!it.call(s,E)||!Ln(r[E],s[E]))return!1}return!0}function Sl(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function pa(r,s){var c=Sl(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=Sl(c)}}function io(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?io(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function ma(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=ns(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=ns(r.document)}return s}function us(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 so=dr&&"documentMode"in document&&11>=document.documentMode,lt=null,Fi=null,fr=null,Kr=!1;function mi(r,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Kr||lt==null||lt!==ns(m)||(m=lt,"selectionStart"in m&&us(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}),fr&&Pi(fr,m)||(fr=m,m=ef(Fi,"onSelect"),0<m.length&&(s=new as("onSelect","select",null,s,c),r.push({event:s,listeners:m}),s.target=lt)))}function hr(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var Ar={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},Yr={},gi={};dr&&(gi=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function pr(r){if(Yr[r])return Yr[r];if(!Ar[r])return r;var s=Ar[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in gi)return Yr[r]=s[c];return r}var ds=pr("animationend"),fs=pr("animationiteration"),ga=pr("animationstart"),oo=pr("transitionrun"),wl=pr("transitionstart"),vd=pr("transitioncancel"),zc=pr("transitionend"),Bc=new Map,Cl="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(" ");Cl.push("scrollEnd");function mr(r,s){Bc.set(r,s),_n(s,[r])}var va=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)},Jn=[],hs=0,kl=0;function _a(){for(var r=hs,s=kl=hs=0;s<r;){var c=Jn[s];Jn[s++]=null;var m=Jn[s];Jn[s++]=null;var E=Jn[s];Jn[s++]=null;var R=Jn[s];if(Jn[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&&Ge(c,E,R)}}function ya(r,s,c,m){Jn[hs++]=r,Jn[hs++]=s,Jn[hs++]=c,Jn[hs++]=m,kl|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function J(r,s,c,m){return ya(r,s,c,m),Ke(r)}function Ae(r,s){return ya(r,null,null,s),Ke(r)}function Ge(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-ke(c),r=R.hiddenUpdates,m=r[E],m===null?r[E]=[s]:m.push(s),s.lane=c|536870912),R):null}function Ke(r){if(50<ou)throw ou=0,tm=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var le={};function me(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 Me(r,s,c,m){return new me(r,s,c,m)}function rt(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Tt(r,s){var c=r.alternate;return c===null?(c=Me(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 Xr(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 Vn(r,s,c,m,E,R){var P=0;if(m=r,typeof r=="function")rt(r)&&(P=1);else if(typeof r=="string")P=dE(r,c,Q.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=Me(31,c,s,E),r.elementType=j,r.lanes=R,r;case w:return In(c.children,E,R,s);case v:P=8,E|=24;break;case b:return r=Me(12,c,s,E|2),r.elementType=b,r.lanes=R,r;case N:return r=Me(13,c,s,E),r.elementType=N,r.lanes=R,r;case A:return r=Me(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=Me(P,c,s,E),s.elementType=r,s.type=m,s.lanes=R,s}function In(r,s,c,m){return r=Me(7,r,m,s),r.lanes=c,r}function Qr(r,s,c){return r=Me(6,r,null,s),r.lanes=c,r}function ao(r){var s=Me(18,null,null,0);return s.stateNode=r,s}function Pc(r,s,c){return s=Me(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var _d=new WeakMap;function bn(r,s){if(typeof r=="object"&&r!==null){var c=_d.get(r);return c!==void 0?c:(s={value:r,source:s,stack:et(s)},_d.set(r,s),s)}return{value:r,source:s,stack:et(s)}}var Rr=[],Tr=0,vi=null,Zr=0,xn=[],Sn=0,er=null,zn=1,Bn="";function qn(r,s){Rr[Tr++]=Zr,Rr[Tr++]=vi,vi=r,Zr=s}function ps(r,s,c){xn[Sn++]=zn,xn[Sn++]=Bn,xn[Sn++]=er,er=r;var m=zn;r=Bn;var E=32-ke(m)-1;m&=~(1<<E),c+=1;var R=32-ke(s)+E;if(30<R){var P=E-E%5;R=(m&(1<<P)-1).toString(32),m>>=P,E-=P,zn=1<<32-ke(s)+E|c<<E|m,Bn=R+r}else zn=1<<R|c<<E|m,Bn=r}function Hi(r){r.return!==null&&(qn(r,1),ps(r,1,0))}function Ui(r){for(;r===vi;)vi=Rr[--Tr],Rr[Tr]=null,Zr=Rr[--Tr],Rr[Tr]=null;for(;r===er;)er=xn[--Sn],xn[Sn]=null,Bn=xn[--Sn],xn[Sn]=null,zn=xn[--Sn],xn[Sn]=null}function ms(r,s){xn[Sn++]=zn,xn[Sn++]=Bn,xn[Sn++]=er,zn=s.id,Bn=s.overflow,er=r}var Xt=null,ht=null,gt=!1,_i=null,gr=!1,Zh=Error(i(519));function lo(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fc(bn(s,r)),Zh}function wv(r){var s=r.stateNode,c=r.type,m=r.memoizedProps;switch(s[Et]=r,s[Bt]=m,c){case"dialog":Ct("cancel",s),Ct("close",s);break;case"iframe":case"object":case"embed":Ct("load",s);break;case"video":case"audio":for(c=0;c<lu.length;c++)Ct(lu[c],s);break;case"source":Ct("error",s);break;case"img":case"image":case"link":Ct("error",s),Ct("load",s);break;case"details":Ct("toggle",s);break;case"input":Ct("invalid",s),Ko(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ct("invalid",s);break;case"textarea":Ct("invalid",s),Ya(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||F_(s.textContent,c)?(m.popover!=null&&(Ct("beforetoggle",s),Ct("toggle",s)),m.onScroll!=null&&Ct("scroll",s),m.onScrollEnd!=null&&Ct("scrollend",s),m.onClick!=null&&(s.onclick=ur),s=!0):s=!1,s||lo(r,!0)}function Cv(r){for(Xt=r.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:gr=!1;return;case 27:case 3:gr=!0;return;default:Xt=Xt.return}}function El(r){if(r!==Xt)return!1;if(!gt)return Cv(r),gt=!0,!1;var s=r.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||gm(r.type,r.memoizedProps)),c=!c),c&&ht&&lo(r),Cv(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ht=Y_(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ht=Y_(r)}else s===27?(s=ht,wo(r.type)?(r=xm,xm=null,ht=r):ht=s):ht=Xt?ei(r.stateNode.nextSibling):null;return!0}function ba(){ht=Xt=null,gt=!1}function Jh(){var r=_i;return r!==null&&(br===null?br=r:br.push.apply(br,r),_i=null),r}function Fc(r){_i===null?_i=[r]:_i.push(r)}var ep=z(null),xa=null,gs=null;function co(r,s,c){F(ep,s._currentValue),s._currentValue=c}function vs(r){r._currentValue=ep.current,H(ep)}function tp(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 np(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 Y=R;R=E;for(var re=0;re<s.length;re++)if(Y.context===s[re]){R.lanes|=c,Y=R.alternate,Y!==null&&(Y.lanes|=c),tp(R.return,c,r),m||(P=null);break e}R=Y.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),tp(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 Al(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 Y=E.type;Ln(E.pendingProps.value,P.value)||(r!==null?r.push(Y):r=[Y])}}else if(E===q.current){if(P=E.alternate,P===null)throw Error(i(387));P.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(r!==null?r.push(hu):r=[hu])}E=E.return}r!==null&&np(s,r,c,m),s.flags|=262144}function yd(r){for(r=r.firstContext;r!==null;){if(!Ln(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Sa(r){xa=r,gs=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Pn(r){return kv(xa,r)}function bd(r,s){return xa===null&&Sa(r),kv(r,s)}function kv(r,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},gs===null){if(r===null)throw Error(i(308));gs=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else gs=gs.next=s;return c}var ak=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()})}},lk=t.unstable_scheduleCallback,ck=t.unstable_NormalPriority,fn={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rp(){return{controller:new ak,data:new Map,refCount:0}}function Hc(r){r.refCount--,r.refCount===0&&lk(ck,function(){r.controller.abort()})}var Uc=null,ip=0,Rl=0,Tl=null;function uk(r,s){if(Uc===null){var c=Uc=[];ip=0,Rl=am(),Tl={status:"pending",value:void 0,then:function(m){c.push(m)}}}return ip++,s.then(Ev,Ev),s}function Ev(){if(--ip===0&&Uc!==null){Tl!==null&&(Tl.status="fulfilled");var r=Uc;Uc=null,Rl=0,Tl=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function dk(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 Av=G.S;G.S=function(r,s){u_=tt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&uk(r,s),Av!==null&&Av(r,s)};var wa=z(null);function sp(){var r=wa.current;return r!==null?r:$t.pooledCache}function xd(r,s){s===null?F(wa,wa.current):F(wa,s.pool)}function Rv(){var r=sp();return r===null?null:{parent:fn._currentValue,pool:r}}var Nl=Error(i(460)),op=Error(i(474)),Sd=Error(i(542)),wd={then:function(){}};function Tv(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Nv(r,s,c){switch(c=r[c],c===void 0?r.push(s):c!==s&&(s.then(ur,ur),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Mv(r),r;default:if(typeof s.status=="string")s.then(ur,ur);else{if(r=$t,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,Mv(r),r}throw ka=s,Nl}}function Ca(r){try{var s=r._init;return s(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ka=c,Nl):c}}var ka=null;function Dv(){if(ka===null)throw Error(i(459));var r=ka;return ka=null,r}function Mv(r){if(r===Nl||r===Sd)throw Error(i(483))}var Dl=null,$c=0;function Cd(r){var s=$c;return $c+=1,Dl===null&&(Dl=[]),Nv(Dl,r,s)}function Vc(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function kd(r,s){throw s.$$typeof===_?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function jv(r){function s(ce,oe){if(r){var fe=ce.deletions;fe===null?(ce.deletions=[oe],ce.flags|=16):fe.push(oe)}}function c(ce,oe){if(!r)return null;for(;oe!==null;)s(ce,oe),oe=oe.sibling;return null}function m(ce){for(var oe=new Map;ce!==null;)ce.key!==null?oe.set(ce.key,ce):oe.set(ce.index,ce),ce=ce.sibling;return oe}function E(ce,oe){return ce=Tt(ce,oe),ce.index=0,ce.sibling=null,ce}function R(ce,oe,fe){return ce.index=fe,r?(fe=ce.alternate,fe!==null?(fe=fe.index,fe<oe?(ce.flags|=67108866,oe):fe):(ce.flags|=67108866,oe)):(ce.flags|=1048576,oe)}function P(ce){return r&&ce.alternate===null&&(ce.flags|=67108866),ce}function Y(ce,oe,fe,Se){return oe===null||oe.tag!==6?(oe=Qr(fe,ce.mode,Se),oe.return=ce,oe):(oe=E(oe,fe),oe.return=ce,oe)}function re(ce,oe,fe,Se){var nt=fe.type;return nt===w?be(ce,oe,fe.props.children,Se,fe.key):oe!==null&&(oe.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===T&&Ca(nt)===oe.type)?(oe=E(oe,fe.props),Vc(oe,fe),oe.return=ce,oe):(oe=Vn(fe.type,fe.key,fe.props,null,ce.mode,Se),Vc(oe,fe),oe.return=ce,oe)}function he(ce,oe,fe,Se){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==fe.containerInfo||oe.stateNode.implementation!==fe.implementation?(oe=Pc(fe,ce.mode,Se),oe.return=ce,oe):(oe=E(oe,fe.children||[]),oe.return=ce,oe)}function be(ce,oe,fe,Se,nt){return oe===null||oe.tag!==7?(oe=In(fe,ce.mode,Se,nt),oe.return=ce,oe):(oe=E(oe,fe),oe.return=ce,oe)}function we(ce,oe,fe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=Qr(""+oe,ce.mode,fe),oe.return=ce,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return fe=Vn(oe.type,oe.key,oe.props,null,ce.mode,fe),Vc(fe,oe),fe.return=ce,fe;case C:return oe=Pc(oe,ce.mode,fe),oe.return=ce,oe;case T:return oe=Ca(oe),we(ce,oe,fe)}if(K(oe)||V(oe))return oe=In(oe,ce.mode,fe,null),oe.return=ce,oe;if(typeof oe.then=="function")return we(ce,Cd(oe),fe);if(oe.$$typeof===x)return we(ce,bd(ce,oe),fe);kd(ce,oe)}return null}function pe(ce,oe,fe,Se){var nt=oe!==null?oe.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return nt!==null?null:Y(ce,oe,""+fe,Se);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case S:return fe.key===nt?re(ce,oe,fe,Se):null;case C:return fe.key===nt?he(ce,oe,fe,Se):null;case T:return fe=Ca(fe),pe(ce,oe,fe,Se)}if(K(fe)||V(fe))return nt!==null?null:be(ce,oe,fe,Se,null);if(typeof fe.then=="function")return pe(ce,oe,Cd(fe),Se);if(fe.$$typeof===x)return pe(ce,oe,bd(ce,fe),Se);kd(ce,fe)}return null}function ve(ce,oe,fe,Se,nt){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ce=ce.get(fe)||null,Y(oe,ce,""+Se,nt);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case S:return ce=ce.get(Se.key===null?fe:Se.key)||null,re(oe,ce,Se,nt);case C:return ce=ce.get(Se.key===null?fe:Se.key)||null,he(oe,ce,Se,nt);case T:return Se=Ca(Se),ve(ce,oe,fe,Se,nt)}if(K(Se)||V(Se))return ce=ce.get(fe)||null,be(oe,ce,Se,nt,null);if(typeof Se.then=="function")return ve(ce,oe,fe,Cd(Se),nt);if(Se.$$typeof===x)return ve(ce,oe,fe,bd(oe,Se),nt);kd(oe,Se)}return null}function $e(ce,oe,fe,Se){for(var nt=null,Mt=null,Ye=oe,_t=oe=0,Rt=null;Ye!==null&&_t<fe.length;_t++){Ye.index>_t?(Rt=Ye,Ye=null):Rt=Ye.sibling;var jt=pe(ce,Ye,fe[_t],Se);if(jt===null){Ye===null&&(Ye=Rt);break}r&&Ye&&jt.alternate===null&&s(ce,Ye),oe=R(jt,oe,_t),Mt===null?nt=jt:Mt.sibling=jt,Mt=jt,Ye=Rt}if(_t===fe.length)return c(ce,Ye),gt&&qn(ce,_t),nt;if(Ye===null){for(;_t<fe.length;_t++)Ye=we(ce,fe[_t],Se),Ye!==null&&(oe=R(Ye,oe,_t),Mt===null?nt=Ye:Mt.sibling=Ye,Mt=Ye);return gt&&qn(ce,_t),nt}for(Ye=m(Ye);_t<fe.length;_t++)Rt=ve(Ye,ce,_t,fe[_t],Se),Rt!==null&&(r&&Rt.alternate!==null&&Ye.delete(Rt.key===null?_t:Rt.key),oe=R(Rt,oe,_t),Mt===null?nt=Rt:Mt.sibling=Rt,Mt=Rt);return r&&Ye.forEach(function(Ro){return s(ce,Ro)}),gt&&qn(ce,_t),nt}function at(ce,oe,fe,Se){if(fe==null)throw Error(i(151));for(var nt=null,Mt=null,Ye=oe,_t=oe=0,Rt=null,jt=fe.next();Ye!==null&&!jt.done;_t++,jt=fe.next()){Ye.index>_t?(Rt=Ye,Ye=null):Rt=Ye.sibling;var Ro=pe(ce,Ye,jt.value,Se);if(Ro===null){Ye===null&&(Ye=Rt);break}r&&Ye&&Ro.alternate===null&&s(ce,Ye),oe=R(Ro,oe,_t),Mt===null?nt=Ro:Mt.sibling=Ro,Mt=Ro,Ye=Rt}if(jt.done)return c(ce,Ye),gt&&qn(ce,_t),nt;if(Ye===null){for(;!jt.done;_t++,jt=fe.next())jt=we(ce,jt.value,Se),jt!==null&&(oe=R(jt,oe,_t),Mt===null?nt=jt:Mt.sibling=jt,Mt=jt);return gt&&qn(ce,_t),nt}for(Ye=m(Ye);!jt.done;_t++,jt=fe.next())jt=ve(Ye,ce,_t,jt.value,Se),jt!==null&&(r&&jt.alternate!==null&&Ye.delete(jt.key===null?_t:jt.key),oe=R(jt,oe,_t),Mt===null?nt=jt:Mt.sibling=jt,Mt=jt);return r&&Ye.forEach(function(SE){return s(ce,SE)}),gt&&qn(ce,_t),nt}function Ht(ce,oe,fe,Se){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case S:e:{for(var nt=fe.key;oe!==null;){if(oe.key===nt){if(nt=fe.type,nt===w){if(oe.tag===7){c(ce,oe.sibling),Se=E(oe,fe.props.children),Se.return=ce,ce=Se;break e}}else if(oe.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===T&&Ca(nt)===oe.type){c(ce,oe.sibling),Se=E(oe,fe.props),Vc(Se,fe),Se.return=ce,ce=Se;break e}c(ce,oe);break}else s(ce,oe);oe=oe.sibling}fe.type===w?(Se=In(fe.props.children,ce.mode,Se,fe.key),Se.return=ce,ce=Se):(Se=Vn(fe.type,fe.key,fe.props,null,ce.mode,Se),Vc(Se,fe),Se.return=ce,ce=Se)}return P(ce);case C:e:{for(nt=fe.key;oe!==null;){if(oe.key===nt)if(oe.tag===4&&oe.stateNode.containerInfo===fe.containerInfo&&oe.stateNode.implementation===fe.implementation){c(ce,oe.sibling),Se=E(oe,fe.children||[]),Se.return=ce,ce=Se;break e}else{c(ce,oe);break}else s(ce,oe);oe=oe.sibling}Se=Pc(fe,ce.mode,Se),Se.return=ce,ce=Se}return P(ce);case T:return fe=Ca(fe),Ht(ce,oe,fe,Se)}if(K(fe))return $e(ce,oe,fe,Se);if(V(fe)){if(nt=V(fe),typeof nt!="function")throw Error(i(150));return fe=nt.call(fe),at(ce,oe,fe,Se)}if(typeof fe.then=="function")return Ht(ce,oe,Cd(fe),Se);if(fe.$$typeof===x)return Ht(ce,oe,bd(ce,fe),Se);kd(ce,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,oe!==null&&oe.tag===6?(c(ce,oe.sibling),Se=E(oe,fe),Se.return=ce,ce=Se):(c(ce,oe),Se=Qr(fe,ce.mode,Se),Se.return=ce,ce=Se),P(ce)):c(ce,oe)}return function(ce,oe,fe,Se){try{$c=0;var nt=Ht(ce,oe,fe,Se);return Dl=null,nt}catch(Ye){if(Ye===Nl||Ye===Sd)throw Ye;var Mt=Me(29,Ye,null,ce.mode);return Mt.lanes=Se,Mt.return=ce,Mt}finally{}}}var Ea=jv(!0),Ov=jv(!1),uo=!1;function ap(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lp(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 fo(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ho(r,s,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Ot&2)!==0){var E=m.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),m.pending=s,s=Ke(r),Ge(r,null,c),s}return ya(r,m,s,c),Ke(r)}function qc(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,ai(r,c)}}function cp(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 up=!1;function Wc(){if(up){var r=Tl;if(r!==null)throw r}}function Gc(r,s,c,m){up=!1;var E=r.updateQueue;uo=!1;var R=E.firstBaseUpdate,P=E.lastBaseUpdate,Y=E.shared.pending;if(Y!==null){E.shared.pending=null;var re=Y,he=re.next;re.next=null,P===null?R=he:P.next=he,P=re;var be=r.alternate;be!==null&&(be=be.updateQueue,Y=be.lastBaseUpdate,Y!==P&&(Y===null?be.firstBaseUpdate=he:Y.next=he,be.lastBaseUpdate=re))}if(R!==null){var we=E.baseState;P=0,be=he=re=null,Y=R;do{var pe=Y.lane&-536870913,ve=pe!==Y.lane;if(ve?(At&pe)===pe:(m&pe)===pe){pe!==0&&pe===Rl&&(up=!0),be!==null&&(be=be.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var $e=r,at=Y;pe=s;var Ht=c;switch(at.tag){case 1:if($e=at.payload,typeof $e=="function"){we=$e.call(Ht,we,pe);break e}we=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=at.payload,pe=typeof $e=="function"?$e.call(Ht,we,pe):$e,pe==null)break e;we=h({},we,pe);break e;case 2:uo=!0}}pe=Y.callback,pe!==null&&(r.flags|=64,ve&&(r.flags|=8192),ve=E.callbacks,ve===null?E.callbacks=[pe]:ve.push(pe))}else ve={lane:pe,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},be===null?(he=be=ve,re=we):be=be.next=ve,P|=pe;if(Y=Y.next,Y===null){if(Y=E.shared.pending,Y===null)break;ve=Y,Y=ve.next,ve.next=null,E.lastBaseUpdate=ve,E.shared.pending=null}}while(!0);be===null&&(re=we),E.baseState=re,E.firstBaseUpdate=he,E.lastBaseUpdate=be,R===null&&(E.shared.lanes=0),_o|=P,r.lanes=P,r.memoizedState=we}}function Lv(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function Iv(r,s){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)Lv(c[r],s)}var Ml=z(null),Ed=z(0);function zv(r,s){r=Es,F(Ed,r),F(Ml,s),Es=r|s.baseLanes}function dp(){F(Ed,Es),F(Ml,Ml.current)}function fp(){Es=Ed.current,H(Ml),H(Ed)}var Nr=z(null),Jr=null;function po(r){var s=r.alternate;F(ln,ln.current&1),F(Nr,r),Jr===null&&(s===null||Ml.current!==null||s.memoizedState!==null)&&(Jr=r)}function hp(r){F(ln,ln.current),F(Nr,r),Jr===null&&(Jr=r)}function Bv(r){r.tag===22?(F(ln,ln.current),F(Nr,r),Jr===null&&(Jr=r)):mo()}function mo(){F(ln,ln.current),F(Nr,Nr.current)}function Dr(r){H(Nr),Jr===r&&(Jr=null),H(ln)}var ln=z(0);function Ad(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ym(c)||bm(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 _s=0,vt=null,Pt=null,hn=null,Rd=!1,jl=!1,Aa=!1,Td=0,Kc=0,Ol=null,fk=0;function rn(){throw Error(i(321))}function pp(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 mp(r,s,c,m,E,R){return _s=R,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,G.H=r===null||r.memoizedState===null?x0:Np,Aa=!1,R=c(m,E),Aa=!1,jl&&(R=Fv(s,c,m,E)),Pv(r),R}function Pv(r){G.H=Qc;var s=Pt!==null&&Pt.next!==null;if(_s=0,hn=Pt=vt=null,Rd=!1,Kc=0,Ol=null,s)throw Error(i(300));r===null||pn||(r=r.dependencies,r!==null&&yd(r)&&(pn=!0))}function Fv(r,s,c,m){vt=r;var E=0;do{if(jl&&(Ol=null),Kc=0,jl=!1,25<=E)throw Error(i(301));if(E+=1,hn=Pt=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=S0,R=s(c,m)}while(jl);return R}function hk(){var r=G.H,s=r.useState()[0];return s=typeof s.then=="function"?Yc(s):s,r=r.useState()[0],(Pt!==null?Pt.memoizedState:null)!==r&&(vt.flags|=1024),s}function gp(){var r=Td!==0;return Td=0,r}function vp(r,s,c){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~c}function _p(r){if(Rd){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Rd=!1}_s=0,hn=Pt=vt=null,jl=!1,Kc=Td=0,Ol=null}function tr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?vt.memoizedState=hn=r:hn=hn.next=r,hn}function cn(){if(Pt===null){var r=vt.alternate;r=r!==null?r.memoizedState:null}else r=Pt.next;var s=hn===null?vt.memoizedState:hn.next;if(s!==null)hn=s,Pt=r;else{if(r===null)throw vt.alternate===null?Error(i(467)):Error(i(310));Pt=r,r={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},hn===null?vt.memoizedState=hn=r:hn=hn.next=r}return hn}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yc(r){var s=Kc;return Kc+=1,Ol===null&&(Ol=[]),r=Nv(Ol,r,s),s=vt,(hn===null?s.memoizedState:hn.next)===null&&(s=s.alternate,G.H=s===null||s.memoizedState===null?x0:Np),r}function Dd(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Yc(r);if(r.$$typeof===x)return Pn(r)}throw Error(i(438,String(r)))}function yp(r){var s=null,c=vt.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var m=vt.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=Nd(),vt.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 ys(r,s){return typeof s=="function"?s(r):s}function Md(r){var s=cn();return bp(s,Pt,r)}function bp(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 Y=P=null,re=null,he=s,be=!1;do{var we=he.lane&-536870913;if(we!==he.lane?(At&we)===we:(_s&we)===we){var pe=he.revertLane;if(pe===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),we===Rl&&(be=!0);else if((_s&pe)===pe){he=he.next,pe===Rl&&(be=!0);continue}else we={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},re===null?(Y=re=we,P=R):re=re.next=we,vt.lanes|=pe,_o|=pe;we=he.action,Aa&&c(R,we),R=he.hasEagerState?he.eagerState:c(R,we)}else pe={lane:we,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},re===null?(Y=re=pe,P=R):re=re.next=pe,vt.lanes|=we,_o|=we;he=he.next}while(he!==null&&he!==s);if(re===null?P=R:re.next=Y,!Ln(R,r.memoizedState)&&(pn=!0,be&&(c=Tl,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 xp(r){var s=cn(),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)||(pn=!0),s.memoizedState=R,s.baseQueue===null&&(s.baseState=R),c.lastRenderedState=R}return[R,m]}function Hv(r,s,c){var m=vt,E=cn(),R=gt;if(R){if(c===void 0)throw Error(i(407));c=c()}else c=s();var P=!Ln((Pt||E).memoizedState,c);if(P&&(E.memoizedState=c,pn=!0),E=E.queue,Cp(Vv.bind(null,m,E,r),[r]),E.getSnapshot!==s||P||hn!==null&&hn.memoizedState.tag&1){if(m.flags|=2048,Ll(9,{destroy:void 0},$v.bind(null,m,E,c,s),null),$t===null)throw Error(i(349));R||(_s&127)!==0||Uv(m,s,c)}return c}function Uv(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=vt.updateQueue,s===null?(s=Nd(),vt.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function $v(r,s,c,m){s.value=c,s.getSnapshot=m,qv(s)&&Wv(r)}function Vv(r,s,c){return c(function(){qv(s)&&Wv(r)})}function qv(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!Ln(r,c)}catch{return!0}}function Wv(r){var s=Ae(r,2);s!==null&&xr(s,r,2)}function Sp(r){var s=tr();if(typeof r=="function"){var c=r;if(r=c(),Aa){ft(!0);try{c()}finally{ft(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:r},s}function Gv(r,s,c,m){return r.baseState=c,bp(r,Pt,typeof m=="function"?m:ys)}function pk(r,s,c,m,E){if(Ld(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,Kv(s,R)):(R.next=c.next,s.pending=c.next=R)}}function Kv(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 Y=c(E,m),re=G.S;re!==null&&re(P,Y),Yv(r,s,Y)}catch(he){wp(r,s,he)}finally{R!==null&&P.types!==null&&(R.types=P.types),G.T=R}}else try{R=c(E,m),Yv(r,s,R)}catch(he){wp(r,s,he)}}function Yv(r,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){Xv(r,s,m)},function(m){return wp(r,s,m)}):Xv(r,s,c)}function Xv(r,s,c){s.status="fulfilled",s.value=c,Qv(s),r.state=c,s=r.pending,s!==null&&(c=s.next,c===s?r.pending=null:(c=c.next,s.next=c,Kv(r,c)))}function wp(r,s,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=c,Qv(s),s=s.next;while(s!==m)}r.action=null}function Qv(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Zv(r,s){return s}function Jv(r,s){if(gt){var c=$t.formState;if(c!==null){e:{var m=vt;if(gt){if(ht){t:{for(var E=ht,R=gr;E.nodeType!==8;){if(!R){E=null;break t}if(E=ei(E.nextSibling),E===null){E=null;break t}}R=E.data,E=R==="F!"||R==="F"?E:null}if(E){ht=ei(E.nextSibling),m=E.data==="F!";break e}}lo(m)}m=!1}m&&(s=c[0])}}return c=tr(),c.memoizedState=c.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zv,lastRenderedState:s},c.queue=m,c=_0.bind(null,vt,m),m.dispatch=c,m=Sp(!1),R=Tp.bind(null,vt,!1,m.queue),m=tr(),E={state:s,dispatch:null,action:r,pending:null},m.queue=E,c=pk.bind(null,vt,E,R,c),E.dispatch=c,m.memoizedState=r,[s,c,!1]}function e0(r){var s=cn();return t0(s,Pt,r)}function t0(r,s,c){if(s=bp(r,s,Zv)[0],r=Md(ys)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Yc(s)}catch(P){throw P===Nl?Sd:P}else m=s;s=cn();var E=s.queue,R=E.dispatch;return c!==s.memoizedState&&(vt.flags|=2048,Ll(9,{destroy:void 0},mk.bind(null,E,c),null)),[m,R,r]}function mk(r,s){r.action=s}function n0(r){var s=cn(),c=Pt;if(c!==null)return t0(s,c,r);cn(),s=s.memoizedState,c=cn();var m=c.queue.dispatch;return c.memoizedState=r,[s,m,!1]}function Ll(r,s,c,m){return r={tag:r,create:c,deps:m,inst:s,next:null},s=vt.updateQueue,s===null&&(s=Nd(),vt.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 r0(){return cn().memoizedState}function jd(r,s,c,m){var E=tr();vt.flags|=r,E.memoizedState=Ll(1|s,{destroy:void 0},c,m===void 0?null:m)}function Od(r,s,c,m){var E=cn();m=m===void 0?null:m;var R=E.memoizedState.inst;Pt!==null&&m!==null&&pp(m,Pt.memoizedState.deps)?E.memoizedState=Ll(s,R,c,m):(vt.flags|=r,E.memoizedState=Ll(1|s,R,c,m))}function i0(r,s){jd(8390656,8,r,s)}function Cp(r,s){Od(2048,8,r,s)}function gk(r){vt.flags|=4;var s=vt.updateQueue;if(s===null)s=Nd(),vt.updateQueue=s,s.events=[r];else{var c=s.events;c===null?s.events=[r]:c.push(r)}}function s0(r){var s=cn().memoizedState;return gk({ref:s,nextImpl:r}),function(){if((Ot&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function o0(r,s){return Od(4,2,r,s)}function a0(r,s){return Od(4,4,r,s)}function l0(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 c0(r,s,c){c=c!=null?c.concat([r]):null,Od(4,4,l0.bind(null,s,r),c)}function kp(){}function u0(r,s){var c=cn();s=s===void 0?null:s;var m=c.memoizedState;return s!==null&&pp(s,m[1])?m[0]:(c.memoizedState=[r,s],r)}function d0(r,s){var c=cn();s=s===void 0?null:s;var m=c.memoizedState;if(s!==null&&pp(s,m[1]))return m[0];if(m=r(),Aa){ft(!0);try{r()}finally{ft(!1)}}return c.memoizedState=[m,s],m}function Ep(r,s,c){return c===void 0||(_s&1073741824)!==0&&(At&261930)===0?r.memoizedState=s:(r.memoizedState=c,r=f_(),vt.lanes|=r,_o|=r,c)}function f0(r,s,c,m){return Ln(c,s)?c:Ml.current!==null?(r=Ep(r,c,m),Ln(r,s)||(pn=!0),r):(_s&42)===0||(_s&1073741824)!==0&&(At&261930)===0?(pn=!0,r.memoizedState=c):(r=f_(),vt.lanes|=r,_o|=r,s)}function h0(r,s,c,m,E){var R=Z.p;Z.p=R!==0&&8>R?R:8;var P=G.T,Y={};G.T=Y,Tp(r,!1,s,c);try{var re=E(),he=G.S;if(he!==null&&he(Y,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var be=dk(re,m);Xc(r,s,be,Or(r))}else Xc(r,s,m,Or(r))}catch(we){Xc(r,s,{then:function(){},status:"rejected",reason:we},Or())}finally{Z.p=R,P!==null&&Y.types!==null&&(P.types=Y.types),G.T=P}}function vk(){}function Ap(r,s,c,m){if(r.tag!==5)throw Error(i(476));var E=p0(r).queue;h0(r,E,s,ee,c===null?vk:function(){return m0(r),c(m)})}function p0(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:ee},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:c},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function m0(r){var s=p0(r);s.next===null&&(s=r.alternate.memoizedState),Xc(r,s.next.queue,{},Or())}function Rp(){return Pn(hu)}function g0(){return cn().memoizedState}function v0(){return cn().memoizedState}function _k(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var c=Or();r=fo(c);var m=ho(s,r,c);m!==null&&(xr(m,s,c),qc(m,s,c)),s={cache:rp()},r.payload=s;return}s=s.return}}function yk(r,s,c){var m=Or();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Ld(r)?y0(s,c):(c=J(r,s,c,m),c!==null&&(xr(c,r,m),b0(c,s,m)))}function _0(r,s,c){var m=Or();Xc(r,s,c,m)}function Xc(r,s,c,m){var E={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Ld(r))y0(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,Y=R(P,c);if(E.hasEagerState=!0,E.eagerState=Y,Ln(Y,P))return ya(r,s,E,0),$t===null&&_a(),!1}catch{}finally{}if(c=J(r,s,E,m),c!==null)return xr(c,r,m),b0(c,s,m),!0}return!1}function Tp(r,s,c,m){if(m={lane:2,revertLane:am(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Ld(r)){if(s)throw Error(i(479))}else s=J(r,c,m,2),s!==null&&xr(s,r,2)}function Ld(r){var s=r.alternate;return r===vt||s!==null&&s===vt}function y0(r,s){jl=Rd=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function b0(r,s,c){if((c&4194048)!==0){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,ai(r,c)}}var Qc={readContext:Pn,use:Dd,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useLayoutEffect:rn,useInsertionEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useSyncExternalStore:rn,useId:rn,useHostTransitionStatus:rn,useFormState:rn,useActionState:rn,useOptimistic:rn,useMemoCache:rn,useCacheRefresh:rn};Qc.useEffectEvent=rn;var x0={readContext:Pn,use:Dd,useCallback:function(r,s){return tr().memoizedState=[r,s===void 0?null:s],r},useContext:Pn,useEffect:i0,useImperativeHandle:function(r,s,c){c=c!=null?c.concat([r]):null,jd(4194308,4,l0.bind(null,s,r),c)},useLayoutEffect:function(r,s){return jd(4194308,4,r,s)},useInsertionEffect:function(r,s){jd(4,2,r,s)},useMemo:function(r,s){var c=tr();s=s===void 0?null:s;var m=r();if(Aa){ft(!0);try{r()}finally{ft(!1)}}return c.memoizedState=[m,s],m},useReducer:function(r,s,c){var m=tr();if(c!==void 0){var E=c(s);if(Aa){ft(!0);try{c(s)}finally{ft(!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=yk.bind(null,vt,r),[m.memoizedState,r]},useRef:function(r){var s=tr();return r={current:r},s.memoizedState=r},useState:function(r){r=Sp(r);var s=r.queue,c=_0.bind(null,vt,s);return s.dispatch=c,[r.memoizedState,c]},useDebugValue:kp,useDeferredValue:function(r,s){var c=tr();return Ep(c,r,s)},useTransition:function(){var r=Sp(!1);return r=h0.bind(null,vt,r.queue,!0,!1),tr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,c){var m=vt,E=tr();if(gt){if(c===void 0)throw Error(i(407));c=c()}else{if(c=s(),$t===null)throw Error(i(349));(At&127)!==0||Uv(m,s,c)}E.memoizedState=c;var R={value:c,getSnapshot:s};return E.queue=R,i0(Vv.bind(null,m,R,r),[r]),m.flags|=2048,Ll(9,{destroy:void 0},$v.bind(null,m,R,c,s),null),c},useId:function(){var r=tr(),s=$t.identifierPrefix;if(gt){var c=Bn,m=zn;c=(m&~(1<<32-ke(m)-1)).toString(32)+c,s="_"+s+"R_"+c,c=Td++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=fk++,s="_"+s+"r_"+c.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Rp,useFormState:Jv,useActionState:Jv,useOptimistic:function(r){var s=tr();s.memoizedState=s.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Tp.bind(null,vt,!0,c),c.dispatch=s,[r,s]},useMemoCache:yp,useCacheRefresh:function(){return tr().memoizedState=_k.bind(null,vt)},useEffectEvent:function(r){var s=tr(),c={impl:r};return s.memoizedState=c,function(){if((Ot&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},Np={readContext:Pn,use:Dd,useCallback:u0,useContext:Pn,useEffect:Cp,useImperativeHandle:c0,useInsertionEffect:o0,useLayoutEffect:a0,useMemo:d0,useReducer:Md,useRef:r0,useState:function(){return Md(ys)},useDebugValue:kp,useDeferredValue:function(r,s){var c=cn();return f0(c,Pt.memoizedState,r,s)},useTransition:function(){var r=Md(ys)[0],s=cn().memoizedState;return[typeof r=="boolean"?r:Yc(r),s]},useSyncExternalStore:Hv,useId:g0,useHostTransitionStatus:Rp,useFormState:e0,useActionState:e0,useOptimistic:function(r,s){var c=cn();return Gv(c,Pt,r,s)},useMemoCache:yp,useCacheRefresh:v0};Np.useEffectEvent=s0;var S0={readContext:Pn,use:Dd,useCallback:u0,useContext:Pn,useEffect:Cp,useImperativeHandle:c0,useInsertionEffect:o0,useLayoutEffect:a0,useMemo:d0,useReducer:xp,useRef:r0,useState:function(){return xp(ys)},useDebugValue:kp,useDeferredValue:function(r,s){var c=cn();return Pt===null?Ep(c,r,s):f0(c,Pt.memoizedState,r,s)},useTransition:function(){var r=xp(ys)[0],s=cn().memoizedState;return[typeof r=="boolean"?r:Yc(r),s]},useSyncExternalStore:Hv,useId:g0,useHostTransitionStatus:Rp,useFormState:n0,useActionState:n0,useOptimistic:function(r,s){var c=cn();return Pt!==null?Gv(c,Pt,r,s):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:yp,useCacheRefresh:v0};S0.useEffectEvent=s0;function Dp(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 Mp={enqueueSetState:function(r,s,c){r=r._reactInternals;var m=Or(),E=fo(m);E.payload=s,c!=null&&(E.callback=c),s=ho(r,E,m),s!==null&&(xr(s,r,m),qc(s,r,m))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var m=Or(),E=fo(m);E.tag=1,E.payload=s,c!=null&&(E.callback=c),s=ho(r,E,m),s!==null&&(xr(s,r,m),qc(s,r,m))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=Or(),m=fo(c);m.tag=2,s!=null&&(m.callback=s),s=ho(r,m,c),s!==null&&(xr(s,r,c),qc(s,r,c))}};function w0(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?!Pi(c,m)||!Pi(E,R):!0}function C0(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&&Mp.enqueueReplaceState(s,s.state,null)}function Ra(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 k0(r){va(r)}function E0(r){console.error(r)}function A0(r){va(r)}function Id(r,s){try{var c=r.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function R0(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 jp(r,s,c){return c=fo(c),c.tag=3,c.payload={element:null},c.callback=function(){Id(r,s)},c}function T0(r){return r=fo(r),r.tag=3,r}function N0(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(){R0(s,c,m)}}var P=c.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(r.callback=function(){R0(s,c,m),typeof E!="function"&&(yo===null?yo=new Set([this]):yo.add(this));var Y=m.stack;this.componentDidCatch(m.value,{componentStack:Y!==null?Y:""})})}function bk(r,s,c,m,E){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=c.alternate,s!==null&&Al(s,c,E,!0),c=Nr.current,c!==null){switch(c.tag){case 31:case 13:return Jr===null?Kd():c.alternate===null&&sn===0&&(sn=3),c.flags&=-257,c.flags|=65536,c.lanes=E,m===wd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([m]):s.add(m),im(r,m,E)),!1;case 22:return c.flags|=65536,m===wd?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)),im(r,m,E)),!1}throw Error(i(435,c.tag))}return im(r,m,E),Kd(),!1}if(gt)return s=Nr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,m!==Zh&&(r=Error(i(422),{cause:m}),Fc(bn(r,c)))):(m!==Zh&&(s=Error(i(423),{cause:m}),Fc(bn(s,c))),r=r.current.alternate,r.flags|=65536,E&=-E,r.lanes|=E,m=bn(m,c),E=jp(r.stateNode,m,E),cp(r,E),sn!==4&&(sn=2)),!1;var R=Error(i(520),{cause:m});if(R=bn(R,c),su===null?su=[R]:su.push(R),sn!==4&&(sn=2),s===null)return!0;m=bn(m,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,r=E&-E,c.lanes|=r,r=jp(c.stateNode,m,r),cp(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"&&(yo===null||!yo.has(R))))return c.flags|=65536,E&=-E,c.lanes|=E,E=T0(E),N0(E,r,c,m),cp(c,E),!1}c=c.return}while(c!==null);return!1}var Op=Error(i(461)),pn=!1;function Fn(r,s,c,m){s.child=r===null?Ov(s,null,c,m):Ea(s,r.child,c,m)}function D0(r,s,c,m,E){c=c.render;var R=s.ref;if("ref"in m){var P={};for(var Y in m)Y!=="ref"&&(P[Y]=m[Y])}else P=m;return Sa(s),m=mp(r,s,c,P,R,E),Y=gp(),r!==null&&!pn?(vp(r,s,E),bs(r,s,E)):(gt&&Y&&Hi(s),s.flags|=1,Fn(r,s,m,E),s.child)}function M0(r,s,c,m,E){if(r===null){var R=c.type;return typeof R=="function"&&!rt(R)&&R.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=R,j0(r,s,R,m,E)):(r=Vn(c.type,null,m,s,s.mode,E),r.ref=s.ref,r.return=s,s.child=r)}if(R=r.child,!Up(r,E)){var P=R.memoizedProps;if(c=c.compare,c=c!==null?c:Pi,c(P,m)&&r.ref===s.ref)return bs(r,s,E)}return s.flags|=1,r=Tt(R,m),r.ref=s.ref,r.return=s,s.child=r}function j0(r,s,c,m,E){if(r!==null){var R=r.memoizedProps;if(Pi(R,m)&&r.ref===s.ref)if(pn=!1,s.pendingProps=m=R,Up(r,E))(r.flags&131072)!==0&&(pn=!0);else return s.lanes=r.lanes,bs(r,s,E)}return Lp(r,s,c,m,E)}function O0(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 L0(r,s,R,c,m)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&xd(s,R!==null?R.cachePool:null),R!==null?zv(s,R):dp(),Bv(s);else return m=s.lanes=536870912,L0(r,s,R!==null?R.baseLanes|c:c,c,m)}else R!==null?(xd(s,R.cachePool),zv(s,R),mo(),s.memoizedState=null):(r!==null&&xd(s,null),dp(),mo());return Fn(r,s,E,c),s.child}function Zc(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function L0(r,s,c,m,E){var R=sp();return R=R===null?null:{parent:fn._currentValue,pool:R},s.memoizedState={baseLanes:c,cachePool:R},r!==null&&xd(s,null),dp(),Bv(s),r!==null&&Al(r,s,m,!0),s.childLanes=E,null}function zd(r,s){return s=Pd({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function I0(r,s,c){return Ea(s,r.child,null,c),r=zd(s,s.pendingProps),r.flags|=2,Dr(s),s.memoizedState=null,r}function xk(r,s,c){var m=s.pendingProps,E=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(gt){if(m.mode==="hidden")return r=zd(s,m),s.lanes=536870912,Zc(null,r);if(hp(s),(r=ht)?(r=K_(r,gr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:er!==null?{id:zn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},c=ao(r),c.return=s,s.child=c,Xt=s,ht=null)):r=null,r===null)throw lo(s);return s.lanes=536870912,null}return zd(s,m)}var R=r.memoizedState;if(R!==null){var P=R.dehydrated;if(hp(s),E)if(s.flags&256)s.flags&=-257,s=I0(r,s,c);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(pn||Al(r,s,c,!1),E=(c&r.childLanes)!==0,pn||E){if(m=$t,m!==null&&(P=Xn(m,c),P!==0&&P!==R.retryLane))throw R.retryLane=P,Ae(r,P),xr(m,r,P),Op;Kd(),s=I0(r,s,c)}else r=R.treeContext,ht=ei(P.nextSibling),Xt=s,gt=!0,_i=null,gr=!1,r!==null&&ms(s,r),s=zd(s,m),s.flags|=4096;return s}return r=Tt(r.child,{mode:m.mode,children:m.children}),r.ref=s.ref,s.child=r,r.return=s,r}function Bd(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 Lp(r,s,c,m,E){return Sa(s),c=mp(r,s,c,m,void 0,E),m=gp(),r!==null&&!pn?(vp(r,s,E),bs(r,s,E)):(gt&&m&&Hi(s),s.flags|=1,Fn(r,s,c,E),s.child)}function z0(r,s,c,m,E,R){return Sa(s),s.updateQueue=null,c=Fv(s,m,c,E),Pv(r),m=gp(),r!==null&&!pn?(vp(r,s,R),bs(r,s,R)):(gt&&m&&Hi(s),s.flags|=1,Fn(r,s,c,R),s.child)}function B0(r,s,c,m,E){if(Sa(s),s.stateNode===null){var R=le,P=c.contextType;typeof P=="object"&&P!==null&&(R=Pn(P)),R=new c(m,R),s.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Mp,s.stateNode=R,R._reactInternals=s,R=s.stateNode,R.props=m,R.state=s.memoizedState,R.refs={},ap(s),P=c.contextType,R.context=typeof P=="object"&&P!==null?Pn(P):le,R.state=s.memoizedState,P=c.getDerivedStateFromProps,typeof P=="function"&&(Dp(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&&Mp.enqueueReplaceState(R,R.state,null),Gc(s,m,R,E),Wc(),R.state=s.memoizedState),typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(r===null){R=s.stateNode;var Y=s.memoizedProps,re=Ra(c,Y);R.props=re;var he=R.context,be=c.contextType;P=le,typeof be=="object"&&be!==null&&(P=Pn(be));var we=c.getDerivedStateFromProps;be=typeof we=="function"||typeof R.getSnapshotBeforeUpdate=="function",Y=s.pendingProps!==Y,be||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(Y||he!==P)&&C0(s,R,m,P),uo=!1;var pe=s.memoizedState;R.state=pe,Gc(s,m,R,E),Wc(),he=s.memoizedState,Y||pe!==he||uo?(typeof we=="function"&&(Dp(s,c,we,m),he=s.memoizedState),(re=uo||w0(s,c,re,m,pe,he,P))?(be||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=he),R.props=m,R.state=he,R.context=P,m=re):(typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{R=s.stateNode,lp(r,s),P=s.memoizedProps,be=Ra(c,P),R.props=be,we=s.pendingProps,pe=R.context,he=c.contextType,re=le,typeof he=="object"&&he!==null&&(re=Pn(he)),Y=c.getDerivedStateFromProps,(he=typeof Y=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==we||pe!==re)&&C0(s,R,m,re),uo=!1,pe=s.memoizedState,R.state=pe,Gc(s,m,R,E),Wc();var ve=s.memoizedState;P!==we||pe!==ve||uo||r!==null&&r.dependencies!==null&&yd(r.dependencies)?(typeof Y=="function"&&(Dp(s,c,Y,m),ve=s.memoizedState),(be=uo||w0(s,c,be,m,pe,ve,re)||r!==null&&r.dependencies!==null&&yd(r.dependencies))?(he||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(m,ve,re),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(m,ve,re)),typeof R.componentDidUpdate=="function"&&(s.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof R.componentDidUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=ve),R.props=m,R.state=ve,R.context=re,m=be):(typeof R.componentDidUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=1024),m=!1)}return R=m,Bd(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=Ea(s,r.child,null,E),s.child=Ea(s,null,c,E)):Fn(r,s,c,E),s.memoizedState=R.state,r=s.child):r=bs(r,s,E),r}function P0(r,s,c,m){return ba(),s.flags|=256,Fn(r,s,c,m),s.child}var Ip={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zp(r){return{baseLanes:r,cachePool:Rv()}}function Bp(r,s,c){return r=r!==null?r.childLanes&~c:0,s&&(r|=jr),r}function F0(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:(ln.current&2)!==0),P&&(E=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,r===null){if(gt){if(E?po(s):mo(),(r=ht)?(r=K_(r,gr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:er!==null?{id:zn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},c=ao(r),c.return=s,s.child=c,Xt=s,ht=null)):r=null,r===null)throw lo(s);return bm(r)?s.lanes=32:s.lanes=536870912,null}var Y=m.children;return m=m.fallback,E?(mo(),E=s.mode,Y=Pd({mode:"hidden",children:Y},E),m=In(m,E,c,null),Y.return=s,m.return=s,Y.sibling=m,s.child=Y,m=s.child,m.memoizedState=zp(c),m.childLanes=Bp(r,P,c),s.memoizedState=Ip,Zc(null,m)):(po(s),Pp(s,Y))}var re=r.memoizedState;if(re!==null&&(Y=re.dehydrated,Y!==null)){if(R)s.flags&256?(po(s),s.flags&=-257,s=Fp(r,s,c)):s.memoizedState!==null?(mo(),s.child=r.child,s.flags|=128,s=null):(mo(),Y=m.fallback,E=s.mode,m=Pd({mode:"visible",children:m.children},E),Y=In(Y,E,c,null),Y.flags|=2,m.return=s,Y.return=s,m.sibling=Y,s.child=m,Ea(s,r.child,null,c),m=s.child,m.memoizedState=zp(c),m.childLanes=Bp(r,P,c),s.memoizedState=Ip,s=Zc(null,m));else if(po(s),bm(Y)){if(P=Y.nextSibling&&Y.nextSibling.dataset,P)var he=P.dgst;P=he,m=Error(i(419)),m.stack="",m.digest=P,Fc({value:m,source:null,stack:null}),s=Fp(r,s,c)}else if(pn||Al(r,s,c,!1),P=(c&r.childLanes)!==0,pn||P){if(P=$t,P!==null&&(m=Xn(P,c),m!==0&&m!==re.retryLane))throw re.retryLane=m,Ae(r,m),xr(P,r,m),Op;ym(Y)||Kd(),s=Fp(r,s,c)}else ym(Y)?(s.flags|=192,s.child=r.child,s=null):(r=re.treeContext,ht=ei(Y.nextSibling),Xt=s,gt=!0,_i=null,gr=!1,r!==null&&ms(s,r),s=Pp(s,m.children),s.flags|=4096);return s}return E?(mo(),Y=m.fallback,E=s.mode,re=r.child,he=re.sibling,m=Tt(re,{mode:"hidden",children:m.children}),m.subtreeFlags=re.subtreeFlags&65011712,he!==null?Y=Tt(he,Y):(Y=In(Y,E,c,null),Y.flags|=2),Y.return=s,m.return=s,m.sibling=Y,s.child=m,Zc(null,m),m=s.child,Y=r.child.memoizedState,Y===null?Y=zp(c):(E=Y.cachePool,E!==null?(re=fn._currentValue,E=E.parent!==re?{parent:re,pool:re}:E):E=Rv(),Y={baseLanes:Y.baseLanes|c,cachePool:E}),m.memoizedState=Y,m.childLanes=Bp(r,P,c),s.memoizedState=Ip,Zc(r.child,m)):(po(s),c=r.child,r=c.sibling,c=Tt(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 Pp(r,s){return s=Pd({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Pd(r,s){return r=Me(22,r,null,s),r.lanes=0,r}function Fp(r,s,c){return Ea(s,r.child,null,c),r=Pp(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function H0(r,s,c){r.lanes|=s;var m=r.alternate;m!==null&&(m.lanes|=s),tp(r.return,s,c)}function Hp(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 U0(r,s,c){var m=s.pendingProps,E=m.revealOrder,R=m.tail;m=m.children;var P=ln.current,Y=(P&2)!==0;if(Y?(P=P&1|2,s.flags|=128):P&=1,F(ln,P),Fn(r,s,m,c),m=gt?Zr:0,!Y&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&H0(r,c,s);else if(r.tag===19)H0(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&&Ad(r)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Hp(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&&Ad(r)===null){s.child=E;break}r=E.sibling,E.sibling=c,c=E,E=r}Hp(s,!0,c,null,R,m);break;case"together":Hp(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function bs(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),_o|=s.lanes,(c&s.childLanes)===0)if(r!==null){if(Al(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=Tt(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=Tt(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function Up(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&yd(r)))}function Sk(r,s,c){switch(s.tag){case 3:$(s,s.stateNode.containerInfo),co(s,fn,r.memoizedState.cache),ba();break;case 27:case 5:ie(s);break;case 4:$(s,s.stateNode.containerInfo);break;case 10:co(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,hp(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(po(s),s.flags|=128,null):(c&s.child.childLanes)!==0?F0(r,s,c):(po(s),r=bs(r,s,c),r!==null?r.sibling:null);po(s);break;case 19:var E=(r.flags&128)!==0;if(m=(c&s.childLanes)!==0,m||(Al(r,s,c,!1),m=(c&s.childLanes)!==0),E){if(m)return U0(r,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),F(ln,ln.current),m)break;return null;case 22:return s.lanes=0,O0(r,s,c,s.pendingProps);case 24:co(s,fn,r.memoizedState.cache)}return bs(r,s,c)}function $0(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps)pn=!0;else{if(!Up(r,c)&&(s.flags&128)===0)return pn=!1,Sk(r,s,c);pn=(r.flags&131072)!==0}else pn=!1,gt&&(s.flags&1048576)!==0&&ps(s,Zr,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(r=Ca(s.elementType),s.type=r,typeof r=="function")rt(r)?(m=Ra(r,m),s.tag=1,s=B0(null,s,r,m,c)):(s.tag=0,s=Lp(null,s,r,m,c));else{if(r!=null){var E=r.$$typeof;if(E===k){s.tag=11,s=D0(null,s,r,m,c);break e}else if(E===M){s.tag=14,s=M0(null,s,r,m,c);break e}}throw s=W(r)||r,Error(i(306,s,""))}}return s;case 0:return Lp(r,s,s.type,s.pendingProps,c);case 1:return m=s.type,E=Ra(m,s.pendingProps),B0(r,s,m,E,c);case 3:e:{if($(s,s.stateNode.containerInfo),r===null)throw Error(i(387));m=s.pendingProps;var R=s.memoizedState;E=R.element,lp(r,s),Gc(s,m,null,c);var P=s.memoizedState;if(m=P.cache,co(s,fn,m),m!==R.cache&&np(s,[fn],c,!0),Wc(),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=P0(r,s,m,c);break e}else if(m!==E){E=bn(Error(i(424)),s),Fc(E),s=P0(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(ht=ei(r.firstChild),Xt=s,gt=!0,_i=null,gr=!0,c=Ov(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ba(),m===E){s=bs(r,s,c);break e}Fn(r,s,m,c)}s=s.child}return s;case 26:return Bd(r,s),r===null?(c=ey(s.type,null,s.pendingProps,null))?s.memoizedState=c:gt||(c=s.type,r=s.pendingProps,m=tf(X.current).createElement(c),m[Et]=s,m[Bt]=r,Hn(m,c,r),Lt(m),s.stateNode=m):s.memoizedState=ey(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return ie(s),r===null&&gt&&(m=s.stateNode=Q_(s.type,s.pendingProps,X.current),Xt=s,gr=!0,E=ht,wo(s.type)?(xm=E,ht=ei(m.firstChild)):ht=E),Fn(r,s,s.pendingProps.children,c),Bd(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&gt&&((E=m=ht)&&(m=Zk(m,s.type,s.pendingProps,gr),m!==null?(s.stateNode=m,Xt=s,ht=ei(m.firstChild),gr=!1,E=!0):E=!1),E||lo(s)),ie(s),E=s.type,R=s.pendingProps,P=r!==null?r.memoizedProps:null,m=R.children,gm(E,R)?m=null:P!==null&&gm(E,P)&&(s.flags|=32),s.memoizedState!==null&&(E=mp(r,s,hk,null,null,c),hu._currentValue=E),Bd(r,s),Fn(r,s,m,c),s.child;case 6:return r===null&&gt&&((r=c=ht)&&(c=Jk(c,s.pendingProps,gr),c!==null?(s.stateNode=c,Xt=s,ht=null,r=!0):r=!1),r||lo(s)),null;case 13:return F0(r,s,c);case 4:return $(s,s.stateNode.containerInfo),m=s.pendingProps,r===null?s.child=Ea(s,null,m,c):Fn(r,s,m,c),s.child;case 11:return D0(r,s,s.type,s.pendingProps,c);case 7:return Fn(r,s,s.pendingProps,c),s.child;case 8:return Fn(r,s,s.pendingProps.children,c),s.child;case 12:return Fn(r,s,s.pendingProps.children,c),s.child;case 10:return m=s.pendingProps,co(s,s.type,m.value),Fn(r,s,m.children,c),s.child;case 9:return E=s.type._context,m=s.pendingProps.children,Sa(s),E=Pn(E),m=m(E),s.flags|=1,Fn(r,s,m,c),s.child;case 14:return M0(r,s,s.type,s.pendingProps,c);case 15:return j0(r,s,s.type,s.pendingProps,c);case 19:return U0(r,s,c);case 31:return xk(r,s,c);case 22:return O0(r,s,c,s.pendingProps);case 24:return Sa(s),m=Pn(fn),r===null?(E=sp(),E===null&&(E=$t,R=rp(),E.pooledCache=R,R.refCount++,R!==null&&(E.pooledCacheLanes|=c),E=R),s.memoizedState={parent:m,cache:E},ap(s),co(s,fn,E)):((r.lanes&c)!==0&&(lp(r,s),Gc(s,null,null,c),Wc()),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),co(s,fn,m)):(m=R.cache,co(s,fn,m),m!==E.cache&&np(s,[fn],c,!0))),Fn(r,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function xs(r){r.flags|=4}function $p(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(g_())r.flags|=8192;else throw ka=wd,op}else r.flags&=-16777217}function V0(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!sy(s))if(g_())r.flags|=8192;else throw ka=wd,op}function Fd(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?un():536870912,r.lanes|=s,Pl|=s)}function Jc(r,s){if(!gt)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 Kt(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 wk(r,s,c){var m=s.pendingProps;switch(Ui(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(s),null;case 1:return Kt(s),null;case 3:return c=s.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),vs(fn),ne(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(El(s)?xs(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Jh())),Kt(s),null;case 26:var E=s.type,R=s.memoizedState;return r===null?(xs(s),R!==null?(Kt(s),V0(s,R)):(Kt(s),$p(s,E,null,m,c))):R?R!==r.memoizedState?(xs(s),Kt(s),V0(s,R)):(Kt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==m&&xs(s),Kt(s),$p(s,E,r,m,c)),null;case 27:if(ae(s),c=X.current,E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&xs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Kt(s),null}r=Q.current,El(s)?wv(s):(r=Q_(E,m,c),s.stateNode=r,xs(s))}return Kt(s),null;case 5:if(ae(s),E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&xs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Kt(s),null}if(R=Q.current,El(s))wv(s);else{var P=tf(X.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[Et]=s,R[Bt]=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(Hn(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&&xs(s)}}return Kt(s),$p(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,c),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==m&&xs(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(i(166));if(r=X.current,El(s)){if(r=s.stateNode,c=s.memoizedProps,m=null,E=Xt,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}r[Et]=s,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||F_(r.nodeValue,c)),r||lo(s,!0)}else r=tf(r).createTextNode(m),r[Et]=s,s.stateNode=r}return Kt(s),null;case 31:if(c=s.memoizedState,r===null||r.memoizedState!==null){if(m=El(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[Et]=s}else ba(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),r=!1}else c=Jh(),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 Kt(s),null;case 13:if(m=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(E=El(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[Et]=s}else ba(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),E=!1}else E=Jh(),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),Fd(s,s.updateQueue),Kt(s),null);case 4:return ne(),r===null&&dm(s.stateNode.containerInfo),Kt(s),null;case 10:return vs(s.type),Kt(s),null;case 19:if(H(ln),m=s.memoizedState,m===null)return Kt(s),null;if(E=(s.flags&128)!==0,R=m.rendering,R===null)if(E)Jc(m,!1);else{if(sn!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(R=Ad(r),R!==null){for(s.flags|=128,Jc(m,!1),r=R.updateQueue,s.updateQueue=r,Fd(s,r),s.subtreeFlags=0,r=c,c=s.child;c!==null;)Xr(c,r),c=c.sibling;return F(ln,ln.current&1|2),gt&&qn(s,m.treeForkCount),s.child}r=r.sibling}m.tail!==null&&tt()>qd&&(s.flags|=128,E=!0,Jc(m,!1),s.lanes=4194304)}else{if(!E)if(r=Ad(R),r!==null){if(s.flags|=128,E=!0,r=r.updateQueue,s.updateQueue=r,Fd(s,r),Jc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!R.alternate&&!gt)return Kt(s),null}else 2*tt()-m.renderingStartTime>qd&&c!==536870912&&(s.flags|=128,E=!0,Jc(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=tt(),r.sibling=null,c=ln.current,F(ln,E?c&1|2:c&1),gt&&qn(s,m.treeForkCount),r):(Kt(s),null);case 22:case 23:return Dr(s),fp(),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&&(Kt(s),s.subtreeFlags&6&&(s.flags|=8192)):Kt(s),c=s.updateQueue,c!==null&&Fd(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(wa),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),vs(fn),Kt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function Ck(r,s){switch(Ui(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return vs(fn),ne(),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));ba()}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));ba()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(ln),null;case 4:return ne(),null;case 10:return vs(s.type),null;case 22:case 23:return Dr(s),fp(),r!==null&&H(wa),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return vs(fn),null;case 25:return null;default:return null}}function q0(r,s){switch(Ui(s),s.tag){case 3:vs(fn),ne();break;case 26:case 27:case 5:ae(s);break;case 4:ne();break;case 31:s.memoizedState!==null&&Dr(s);break;case 13:Dr(s);break;case 19:H(ln);break;case 10:vs(s.type);break;case 22:case 23:Dr(s),fp(),r!==null&&H(wa);break;case 24:vs(fn)}}function eu(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(Y){zt(s,s.return,Y)}}function go(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,Y=P.destroy;if(Y!==void 0){P.destroy=void 0,E=s;var re=c,he=Y;try{he()}catch(be){zt(E,re,be)}}}m=m.next}while(m!==R)}}catch(be){zt(s,s.return,be)}}function W0(r){var s=r.updateQueue;if(s!==null){var c=r.stateNode;try{Iv(s,c)}catch(m){zt(r,r.return,m)}}}function G0(r,s,c){c.props=Ra(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){zt(r,s,m)}}function tu(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){zt(r,s,E)}}function $i(r,s){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(E){zt(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){zt(r,s,E)}else c.current=null}function K0(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){zt(r,r.return,E)}}function Vp(r,s,c){try{var m=r.stateNode;Wk(m,r.type,c,s),m[Bt]=s}catch(E){zt(r,r.return,E)}}function Y0(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&wo(r.type)||r.tag===4}function qp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Y0(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&&wo(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 Wp(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=ur));else if(m!==4&&(m===27&&wo(r.type)&&(c=r.stateNode,s=null),r=r.child,r!==null))for(Wp(r,s,c),r=r.sibling;r!==null;)Wp(r,s,c),r=r.sibling}function Hd(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&&wo(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(Hd(r,s,c),r=r.sibling;r!==null;)Hd(r,s,c),r=r.sibling}function X0(r){var s=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);Hn(s,m,c),s[Et]=r,s[Bt]=c}catch(R){zt(r,r.return,R)}}var Ss=!1,mn=!1,Gp=!1,Q0=typeof WeakSet=="function"?WeakSet:Set,An=null;function kk(r,s){if(r=r.containerInfo,pm=cf,r=ma(r),us(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,Y=-1,re=-1,he=0,be=0,we=r,pe=null;t:for(;;){for(var ve;we!==c||E!==0&&we.nodeType!==3||(Y=P+E),we!==R||m!==0&&we.nodeType!==3||(re=P+m),we.nodeType===3&&(P+=we.nodeValue.length),(ve=we.firstChild)!==null;)pe=we,we=ve;for(;;){if(we===r)break t;if(pe===c&&++he===E&&(Y=P),pe===R&&++be===m&&(re=P),(ve=we.nextSibling)!==null)break;we=pe,pe=we.parentNode}we=ve}c=Y===-1||re===-1?null:{start:Y,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(mm={focusedElem:r,selectionRange:c},cf=!1,An=s;An!==null;)if(s=An,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,An=r;else for(;An!==null;){switch(s=An,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 $e=Ra(c.type,E);r=m.getSnapshotBeforeUpdate($e,R),m.__reactInternalSnapshotBeforeUpdate=r}catch(at){zt(c,c.return,at)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,c=r.nodeType,c===9)_m(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":_m(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,An=r;break}An=s.return}}function Z0(r,s,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:Cs(r,c),m&4&&eu(5,c);break;case 1:if(Cs(r,c),m&4)if(r=c.stateNode,s===null)try{r.componentDidMount()}catch(P){zt(c,c.return,P)}else{var E=Ra(c.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(E,s,r.__reactInternalSnapshotBeforeUpdate)}catch(P){zt(c,c.return,P)}}m&64&&W0(c),m&512&&tu(c,c.return);break;case 3:if(Cs(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{Iv(r,s)}catch(P){zt(c,c.return,P)}}break;case 27:s===null&&m&4&&X0(c);case 26:case 5:Cs(r,c),s===null&&m&4&&K0(c),m&512&&tu(c,c.return);break;case 12:Cs(r,c);break;case 31:Cs(r,c),m&4&&t_(r,c);break;case 13:Cs(r,c),m&4&&n_(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=Ok.bind(null,c),eE(r,c))));break;case 22:if(m=c.memoizedState!==null||Ss,!m){s=s!==null&&s.memoizedState!==null||mn,E=Ss;var R=mn;Ss=m,(mn=s)&&!R?ks(r,c,(c.subtreeFlags&8772)!==0):Cs(r,c),Ss=E,mn=R}break;case 30:break;default:Cs(r,c)}}function J0(r){var s=r.alternate;s!==null&&(r.alternate=null,J0(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&ar(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 Qt=null,vr=!1;function ws(r,s,c){for(c=c.child;c!==null;)e_(r,s,c),c=c.sibling}function e_(r,s,c){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(He,c)}catch{}switch(c.tag){case 26:mn||$i(c,s),ws(r,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:mn||$i(c,s);var m=Qt,E=vr;wo(c.type)&&(Qt=c.stateNode,vr=!1),ws(r,s,c),uu(c.stateNode),Qt=m,vr=E;break;case 5:mn||$i(c,s);case 6:if(m=Qt,E=vr,Qt=null,ws(r,s,c),Qt=m,vr=E,Qt!==null)if(vr)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(c.stateNode)}catch(R){zt(c,s,R)}else try{Qt.removeChild(c.stateNode)}catch(R){zt(c,s,R)}break;case 18:Qt!==null&&(vr?(r=Qt,W_(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),Gl(r)):W_(Qt,c.stateNode));break;case 4:m=Qt,E=vr,Qt=c.stateNode.containerInfo,vr=!0,ws(r,s,c),Qt=m,vr=E;break;case 0:case 11:case 14:case 15:go(2,c,s),mn||go(4,c,s),ws(r,s,c);break;case 1:mn||($i(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"&&G0(c,s,m)),ws(r,s,c);break;case 21:ws(r,s,c);break;case 22:mn=(m=mn)||c.memoizedState!==null,ws(r,s,c),mn=m;break;default:ws(r,s,c)}}function t_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Gl(r)}catch(c){zt(s,s.return,c)}}}function n_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Gl(r)}catch(c){zt(s,s.return,c)}}function Ek(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Q0),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Q0),s;default:throw Error(i(435,r.tag))}}function Ud(r,s){var c=Ek(r);s.forEach(function(m){if(!c.has(m)){c.add(m);var E=Lk.bind(null,r,m);m.then(E,E)}})}function _r(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,Y=P;e:for(;Y!==null;){switch(Y.tag){case 27:if(wo(Y.type)){Qt=Y.stateNode,vr=!1;break e}break;case 5:Qt=Y.stateNode,vr=!1;break e;case 3:case 4:Qt=Y.stateNode.containerInfo,vr=!0;break e}Y=Y.return}if(Qt===null)throw Error(i(160));e_(R,P,E),Qt=null,vr=!1,R=E.alternate,R!==null&&(R.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)r_(s,r),s=s.sibling}var yi=null;function r_(r,s){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:_r(s,r),yr(r),m&4&&(go(3,r,r.return),eu(3,r),go(5,r,r.return));break;case 1:_r(s,r),yr(r),m&512&&(mn||c===null||$i(c,c.return)),m&64&&Ss&&(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=yi;if(_r(s,r),yr(r),m&512&&(mn||c===null||$i(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[En]||R[Et]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=E.createElement(m),E.head.insertBefore(R,E.querySelector("head > title"))),Hn(R,m,c),R[Et]=r,Lt(R),m=R;break e;case"link":var P=ry("link","href",E).get(m+(c.href||""));if(P){for(var Y=0;Y<P.length;Y++)if(R=P[Y],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(Y,1);break t}}R=E.createElement(m),Hn(R,m,c),E.head.appendChild(R);break;case"meta":if(P=ry("meta","content",E).get(m+(c.content||""))){for(Y=0;Y<P.length;Y++)if(R=P[Y],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(Y,1);break t}}R=E.createElement(m),Hn(R,m,c),E.head.appendChild(R);break;default:throw Error(i(468,m))}R[Et]=r,Lt(R),m=R}r.stateNode=m}else iy(E,r.type,r.stateNode);else r.stateNode=ny(E,m,r.memoizedProps);else R!==m?(R===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):R.count--,m===null?iy(E,r.type,r.stateNode):ny(E,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Vp(r,r.memoizedProps,c.memoizedProps)}break;case 27:_r(s,r),yr(r),m&512&&(mn||c===null||$i(c,c.return)),c!==null&&m&4&&Vp(r,r.memoizedProps,c.memoizedProps);break;case 5:if(_r(s,r),yr(r),m&512&&(mn||c===null||$i(c,c.return)),r.flags&32){E=r.stateNode;try{Qe(E,"")}catch($e){zt(r,r.return,$e)}}m&4&&r.stateNode!=null&&(E=r.memoizedProps,Vp(r,E,c!==null?c.memoizedProps:E)),m&1024&&(Gp=!0);break;case 6:if(_r(s,r),yr(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch($e){zt(r,r.return,$e)}}break;case 3:if(sf=null,E=yi,yi=nf(s.containerInfo),_r(s,r),yi=E,yr(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Gl(s.containerInfo)}catch($e){zt(r,r.return,$e)}Gp&&(Gp=!1,i_(r));break;case 4:m=yi,yi=nf(r.stateNode.containerInfo),_r(s,r),yr(r),yi=m;break;case 12:_r(s,r),yr(r);break;case 31:_r(s,r),yr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Ud(r,m)));break;case 13:_r(s,r),yr(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Vd=tt()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Ud(r,m)));break;case 22:E=r.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,he=Ss,be=mn;if(Ss=he||E,mn=be||re,_r(s,r),mn=be,Ss=he,yr(r),m&8192)e:for(s=r.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(c===null||re||Ss||mn||Ta(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{Y=re.stateNode;var we=re.memoizedProps.style,pe=we!=null&&we.hasOwnProperty("display")?we.display:null;Y.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch($e){zt(re,re.return,$e)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=E?"":re.memoizedProps}catch($e){zt(re,re.return,$e)}}}else if(s.tag===18){if(c===null){re=s;try{var ve=re.stateNode;E?G_(ve,!0):G_(re.stateNode,!1)}catch($e){zt(re,re.return,$e)}}}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,Ud(r,c))));break;case 19:_r(s,r),yr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Ud(r,m)));break;case 30:break;case 21:break;default:_r(s,r),yr(r)}}function yr(r){var s=r.flags;if(s&2){try{for(var c,m=r.return;m!==null;){if(Y0(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var E=c.stateNode,R=qp(r);Hd(r,R,E);break;case 5:var P=c.stateNode;c.flags&32&&(Qe(P,""),c.flags&=-33);var Y=qp(r);Hd(r,Y,P);break;case 3:case 4:var re=c.stateNode.containerInfo,he=qp(r);Wp(r,he,re);break;default:throw Error(i(161))}}catch(be){zt(r,r.return,be)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function i_(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;i_(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function Cs(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Z0(r,s.alternate,s),s=s.sibling}function Ta(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:go(4,s,s.return),Ta(s);break;case 1:$i(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&G0(s,s.return,c),Ta(s);break;case 27:uu(s.stateNode);case 26:case 5:$i(s,s.return),Ta(s);break;case 22:s.memoizedState===null&&Ta(s);break;case 30:Ta(s);break;default:Ta(s)}r=r.sibling}}function ks(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:ks(E,R,c),eu(4,R);break;case 1:if(ks(E,R,c),m=R,E=m.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(he){zt(m,m.return,he)}if(m=R,E=m.updateQueue,E!==null){var Y=m.stateNode;try{var re=E.shared.hiddenCallbacks;if(re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<re.length;E++)Lv(re[E],Y)}catch(he){zt(m,m.return,he)}}c&&P&64&&W0(R),tu(R,R.return);break;case 27:X0(R);case 26:case 5:ks(E,R,c),c&&m===null&&P&4&&K0(R),tu(R,R.return);break;case 12:ks(E,R,c);break;case 31:ks(E,R,c),c&&P&4&&t_(E,R);break;case 13:ks(E,R,c),c&&P&4&&n_(E,R);break;case 22:R.memoizedState===null&&ks(E,R,c),tu(R,R.return);break;case 30:break;default:ks(E,R,c)}s=s.sibling}}function Kp(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&&Hc(c))}function Yp(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Hc(r))}function bi(r,s,c,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)s_(r,s,c,m),s=s.sibling}function s_(r,s,c,m){var E=s.flags;switch(s.tag){case 0:case 11:case 15:bi(r,s,c,m),E&2048&&eu(9,s);break;case 1:bi(r,s,c,m);break;case 3:bi(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&&Hc(r)));break;case 12:if(E&2048){bi(r,s,c,m),r=s.stateNode;try{var R=s.memoizedProps,P=R.id,Y=R.onPostCommit;typeof Y=="function"&&Y(P,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(re){zt(s,s.return,re)}}else bi(r,s,c,m);break;case 31:bi(r,s,c,m);break;case 13:bi(r,s,c,m);break;case 23:break;case 22:R=s.stateNode,P=s.alternate,s.memoizedState!==null?R._visibility&2?bi(r,s,c,m):nu(r,s):R._visibility&2?bi(r,s,c,m):(R._visibility|=2,Il(r,s,c,m,(s.subtreeFlags&10256)!==0||!1)),E&2048&&Kp(P,s);break;case 24:bi(r,s,c,m),E&2048&&Yp(s.alternate,s);break;default:bi(r,s,c,m)}}function Il(r,s,c,m,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var R=r,P=s,Y=c,re=m,he=P.flags;switch(P.tag){case 0:case 11:case 15:Il(R,P,Y,re,E),eu(8,P);break;case 23:break;case 22:var be=P.stateNode;P.memoizedState!==null?be._visibility&2?Il(R,P,Y,re,E):nu(R,P):(be._visibility|=2,Il(R,P,Y,re,E)),E&&he&2048&&Kp(P.alternate,P);break;case 24:Il(R,P,Y,re,E),E&&he&2048&&Yp(P.alternate,P);break;default:Il(R,P,Y,re,E)}s=s.sibling}}function nu(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:nu(c,m),E&2048&&Kp(m.alternate,m);break;case 24:nu(c,m),E&2048&&Yp(m.alternate,m);break;default:nu(c,m)}s=s.sibling}}var ru=8192;function zl(r,s,c){if(r.subtreeFlags&ru)for(r=r.child;r!==null;)o_(r,s,c),r=r.sibling}function o_(r,s,c){switch(r.tag){case 26:zl(r,s,c),r.flags&ru&&r.memoizedState!==null&&fE(c,yi,r.memoizedState,r.memoizedProps);break;case 5:zl(r,s,c);break;case 3:case 4:var m=yi;yi=nf(r.stateNode.containerInfo),zl(r,s,c),yi=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=ru,ru=16777216,zl(r,s,c),ru=m):zl(r,s,c));break;default:zl(r,s,c)}}function a_(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 iu(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];An=m,c_(m,r)}a_(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)l_(r),r=r.sibling}function l_(r){switch(r.tag){case 0:case 11:case 15:iu(r),r.flags&2048&&go(9,r,r.return);break;case 3:iu(r);break;case 12:iu(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,$d(r)):iu(r);break;default:iu(r)}}function $d(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];An=m,c_(m,r)}a_(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:go(8,s,s.return),$d(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,$d(s));break;default:$d(s)}r=r.sibling}}function c_(r,s){for(;An!==null;){var c=An;switch(c.tag){case 0:case 11:case 15:go(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:Hc(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,An=m;else e:for(c=r;An!==null;){m=An;var E=m.sibling,R=m.return;if(J0(m),m===c){An=null;break e}if(E!==null){E.return=R,An=E;break e}An=R}}}var Ak={getCacheForType:function(r){var s=Pn(fn),c=s.data.get(r);return c===void 0&&(c=r(),s.data.set(r,c)),c},cacheSignal:function(){return Pn(fn).controller.signal}},Rk=typeof WeakMap=="function"?WeakMap:Map,Ot=0,$t=null,wt=null,At=0,It=0,Mr=null,vo=!1,Bl=!1,Xp=!1,Es=0,sn=0,_o=0,Na=0,Qp=0,jr=0,Pl=0,su=null,br=null,Zp=!1,Vd=0,u_=0,qd=1/0,Wd=null,yo=null,wn=0,bo=null,Fl=null,As=0,Jp=0,em=null,d_=null,ou=0,tm=null;function Or(){return(Ot&2)!==0&&At!==0?At&-At:G.T!==null?am():Ti()}function f_(){if(jr===0)if((At&536870912)===0||gt){var r=Ut;Ut<<=1,(Ut&3932160)===0&&(Ut=262144),jr=r}else jr=536870912;return r=Nr.current,r!==null&&(r.flags|=32),jr}function xr(r,s,c){(r===$t&&(It===2||It===9)||r.cancelPendingCommit!==null)&&(Hl(r,0),xo(r,At,jr,!1)),$n(r,c),((Ot&2)===0||r!==$t)&&(r===$t&&((Ot&2)===0&&(Na|=c),sn===4&&xo(r,At,jr,!1)),Vi(r))}function h_(r,s,c){if((Ot&6)!==0)throw Error(i(327));var m=!c&&(s&127)===0&&(s&r.expiredLanes)===0||tn(r,s),E=m?Dk(r,s):rm(r,s,!0),R=m;do{if(E===0){Bl&&!m&&xo(r,s,0,!1);break}else{if(c=r.current.alternate,R&&!Tk(c)){E=rm(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 Y=r;E=su;var re=Y.current.memoizedState.isDehydrated;if(re&&(Hl(Y,P).flags|=256),P=rm(Y,P,!1),P!==2){if(Xp&&!re){Y.errorRecoveryDisabledLanes|=R,Na|=R,E=4;break e}R=br,br=E,R!==null&&(br===null?br=R:br.push.apply(br,R))}E=P}if(R=!1,E!==2)continue}}if(E===1){Hl(r,0),xo(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:xo(m,s,jr,!vo);break e;case 2:br=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(E=Vd+300-tt(),10<E)){if(xo(m,s,jr,!vo),Nn(m,0,!0)!==0)break e;As=s,m.timeoutHandle=V_(p_.bind(null,m,c,br,Wd,Zp,s,jr,Na,Pl,vo,R,"Throttled",-0,0),E);break e}p_(m,c,br,Wd,Zp,s,jr,Na,Pl,vo,R,null,-0,0)}}break}while(!0);Vi(r)}function p_(r,s,c,m,E,R,P,Y,re,he,be,we,pe,ve){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:ur},o_(s,R,we);var $e=(R&62914560)===R?Vd-tt():(R&4194048)===R?u_-tt():0;if($e=hE(we,$e),$e!==null){As=R,r.cancelPendingCommit=$e(S_.bind(null,r,s,R,c,m,E,P,Y,re,be,we,null,pe,ve)),xo(r,R,P,!he);return}}S_(r,s,R,c,m,E,P,Y,re)}function Tk(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 xo(r,s,c,m){s&=~Qp,s&=~Na,r.suspendedLanes|=s,r.pingedLanes&=~s,m&&(r.warmLanes|=s),m=r.expirationTimes;for(var E=s;0<E;){var R=31-ke(E),P=1<<R;m[R]=-1,E&=~P}c!==0&&Dn(r,c,s)}function Gd(){return(Ot&6)===0?(au(0),!1):!0}function nm(){if(wt!==null){if(It===0)var r=wt.return;else r=wt,gs=xa=null,_p(r),Dl=null,$c=0,r=wt;for(;r!==null;)q0(r.alternate,r),r=r.return;wt=null}}function Hl(r,s){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,Yk(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),As=0,nm(),$t=r,wt=c=Tt(r.current,null),At=s,It=0,Mr=null,vo=!1,Bl=tn(r,s),Xp=!1,Pl=jr=Qp=Na=_o=sn=0,br=su=null,Zp=!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-ke(m),R=1<<E;s|=r[E],m&=~R}return Es=s,_a(),c}function m_(r,s){vt=null,G.H=Qc,s===Nl||s===Sd?(s=Dv(),It=3):s===op?(s=Dv(),It=4):It=s===Op?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Mr=s,wt===null&&(sn=1,Id(r,bn(s,r.current)))}function g_(){var r=Nr.current;return r===null?!0:(At&4194048)===At?Jr===null:(At&62914560)===At||(At&536870912)!==0?r===Jr:!1}function v_(){var r=G.H;return G.H=Qc,r===null?Qc:r}function __(){var r=G.A;return G.A=Ak,r}function Kd(){sn=4,vo||(At&4194048)!==At&&Nr.current!==null||(Bl=!0),(_o&134217727)===0&&(Na&134217727)===0||$t===null||xo($t,At,jr,!1)}function rm(r,s,c){var m=Ot;Ot|=2;var E=v_(),R=__();($t!==r||At!==s)&&(Wd=null,Hl(r,s)),s=!1;var P=sn;e:do try{if(It!==0&&wt!==null){var Y=wt,re=Mr;switch(It){case 8:nm(),P=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(s=!0);var he=It;if(It=0,Mr=null,Ul(r,Y,re,he),c&&Bl){P=0;break e}break;default:he=It,It=0,Mr=null,Ul(r,Y,re,he)}}Nk(),P=sn;break}catch(be){m_(r,be)}while(!0);return s&&r.shellSuspendCounter++,gs=xa=null,Ot=m,G.H=E,G.A=R,wt===null&&($t=null,At=0,_a()),P}function Nk(){for(;wt!==null;)y_(wt)}function Dk(r,s){var c=Ot;Ot|=2;var m=v_(),E=__();$t!==r||At!==s?(Wd=null,qd=tt()+500,Hl(r,s)):Bl=tn(r,s);e:do try{if(It!==0&&wt!==null){s=wt;var R=Mr;t:switch(It){case 1:It=0,Mr=null,Ul(r,s,R,1);break;case 2:case 9:if(Tv(R)){It=0,Mr=null,b_(s);break}s=function(){It!==2&&It!==9||$t!==r||(It=7),Vi(r)},R.then(s,s);break e;case 3:It=7;break e;case 4:It=5;break e;case 7:Tv(R)?(It=0,Mr=null,b_(s)):(It=0,Mr=null,Ul(r,s,R,7));break;case 5:var P=null;switch(wt.tag){case 26:P=wt.memoizedState;case 5:case 27:var Y=wt;if(P?sy(P):Y.stateNode.complete){It=0,Mr=null;var re=Y.sibling;if(re!==null)wt=re;else{var he=Y.return;he!==null?(wt=he,Yd(he)):wt=null}break t}}It=0,Mr=null,Ul(r,s,R,5);break;case 6:It=0,Mr=null,Ul(r,s,R,6);break;case 8:nm(),sn=6;break e;default:throw Error(i(462))}}Mk();break}catch(be){m_(r,be)}while(!0);return gs=xa=null,G.H=m,G.A=E,Ot=c,wt!==null?0:($t=null,At=0,_a(),sn)}function Mk(){for(;wt!==null&&!mt();)y_(wt)}function y_(r){var s=$0(r.alternate,r,Es);r.memoizedProps=r.pendingProps,s===null?Yd(r):wt=s}function b_(r){var s=r,c=s.alternate;switch(s.tag){case 15:case 0:s=z0(c,s,s.pendingProps,s.type,void 0,At);break;case 11:s=z0(c,s,s.pendingProps,s.type.render,s.ref,At);break;case 5:_p(s);default:q0(c,s),s=wt=Xr(s,Es),s=$0(c,s,Es)}r.memoizedProps=r.pendingProps,s===null?Yd(r):wt=s}function Ul(r,s,c,m){gs=xa=null,_p(s),Dl=null,$c=0;var E=s.return;try{if(bk(r,E,s,c,At)){sn=1,Id(r,bn(c,r.current)),wt=null;return}}catch(R){if(E!==null)throw wt=E,R;sn=1,Id(r,bn(c,r.current)),wt=null;return}s.flags&32768?(gt||m===1?r=!0:Bl||(At&536870912)!==0?r=!1:(vo=r=!0,(m===2||m===9||m===3||m===6)&&(m=Nr.current,m!==null&&m.tag===13&&(m.flags|=16384))),x_(s,r)):Yd(s)}function Yd(r){var s=r;do{if((s.flags&32768)!==0){x_(s,vo);return}r=s.return;var c=wk(s.alternate,s,Es);if(c!==null){wt=c;return}if(s=s.sibling,s!==null){wt=s;return}wt=s=r}while(s!==null);sn===0&&(sn=5)}function x_(r,s){do{var c=Ck(r.alternate,r);if(c!==null){c.flags&=32767,wt=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(r=r.sibling,r!==null)){wt=r;return}wt=r=c}while(r!==null);sn=6,wt=null}function S_(r,s,c,m,E,R,P,Y,re){r.cancelPendingCommit=null;do Xd();while(wn!==0);if((Ot&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(R=s.lanes|s.childLanes,R|=kl,Ri(r,c,R,P,Y,re),r===$t&&(wt=$t=null,At=0),Fl=s,bo=r,As=c,Jp=R,em=E,d_=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Ik(_e,function(){return A_(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=G.T,G.T=null,E=Z.p,Z.p=2,P=Ot,Ot|=4;try{kk(r,s,c)}finally{Ot=P,Z.p=E,G.T=m}}wn=1,w_(),C_(),k_()}}function w_(){if(wn===1){wn=0;var r=bo,s=Fl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=G.T,G.T=null;var m=Z.p;Z.p=2;var E=Ot;Ot|=4;try{r_(s,r);var R=mm,P=ma(r.containerInfo),Y=R.focusedElem,re=R.selectionRange;if(P!==Y&&Y&&Y.ownerDocument&&io(Y.ownerDocument.documentElement,Y)){if(re!==null&&us(Y)){var he=re.start,be=re.end;if(be===void 0&&(be=he),"selectionStart"in Y)Y.selectionStart=he,Y.selectionEnd=Math.min(be,Y.value.length);else{var we=Y.ownerDocument||document,pe=we&&we.defaultView||window;if(pe.getSelection){var ve=pe.getSelection(),$e=Y.textContent.length,at=Math.min(re.start,$e),Ht=re.end===void 0?at:Math.min(re.end,$e);!ve.extend&&at>Ht&&(P=Ht,Ht=at,at=P);var ce=pa(Y,at),oe=pa(Y,Ht);if(ce&&oe&&(ve.rangeCount!==1||ve.anchorNode!==ce.node||ve.anchorOffset!==ce.offset||ve.focusNode!==oe.node||ve.focusOffset!==oe.offset)){var fe=we.createRange();fe.setStart(ce.node,ce.offset),ve.removeAllRanges(),at>Ht?(ve.addRange(fe),ve.extend(oe.node,oe.offset)):(fe.setEnd(oe.node,oe.offset),ve.addRange(fe))}}}}for(we=[],ve=Y;ve=ve.parentNode;)ve.nodeType===1&&we.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<we.length;Y++){var Se=we[Y];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}cf=!!pm,mm=pm=null}finally{Ot=E,Z.p=m,G.T=c}}r.current=s,wn=2}}function C_(){if(wn===2){wn=0;var r=bo,s=Fl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=G.T,G.T=null;var m=Z.p;Z.p=2;var E=Ot;Ot|=4;try{Z0(r,s.alternate,s)}finally{Ot=E,Z.p=m,G.T=c}}wn=3}}function k_(){if(wn===4||wn===3){wn=0,Ze();var r=bo,s=Fl,c=As,m=d_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?wn=5:(wn=0,Fl=bo=null,E_(r,r.pendingLanes));var E=r.pendingLanes;if(E===0&&(yo=null),ir(c),s=s.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(He,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=G.T,E=Z.p,Z.p=2,G.T=null;try{for(var R=r.onRecoverableError,P=0;P<m.length;P++){var Y=m[P];R(Y.value,{componentStack:Y.stack})}}finally{G.T=s,Z.p=E}}(As&3)!==0&&Xd(),Vi(r),E=r.pendingLanes,(c&261930)!==0&&(E&42)!==0?r===tm?ou++:(ou=0,tm=r):ou=0,au(0)}}function E_(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Hc(s)))}function Xd(){return w_(),C_(),k_(),A_()}function A_(){if(wn!==5)return!1;var r=bo,s=Jp;Jp=0;var c=ir(As),m=G.T,E=Z.p;try{Z.p=32>c?32:c,G.T=null,c=em,em=null;var R=bo,P=As;if(wn=0,Fl=bo=null,As=0,(Ot&6)!==0)throw Error(i(331));var Y=Ot;if(Ot|=4,l_(R.current),s_(R,R.current,P,c),Ot=Y,au(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(He,R)}catch{}return!0}finally{Z.p=E,G.T=m,E_(r,s)}}function R_(r,s,c){s=bn(c,s),s=jp(r.stateNode,s,2),r=ho(r,s,2),r!==null&&($n(r,2),Vi(r))}function zt(r,s,c){if(r.tag===3)R_(r,r,c);else for(;s!==null;){if(s.tag===3){R_(s,r,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(yo===null||!yo.has(m))){r=bn(c,r),c=T0(2),m=ho(s,c,2),m!==null&&(N0(c,m,s,r),$n(m,2),Vi(m));break}}s=s.return}}function im(r,s,c){var m=r.pingCache;if(m===null){m=r.pingCache=new Rk;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)||(Xp=!0,E.add(c),r=jk.bind(null,r,s,c),s.then(r,r))}function jk(r,s,c){var m=r.pingCache;m!==null&&m.delete(s),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,$t===r&&(At&c)===c&&(sn===4||sn===3&&(At&62914560)===At&&300>tt()-Vd?(Ot&2)===0&&Hl(r,0):Qp|=c,Pl===At&&(Pl=0)),Vi(r)}function T_(r,s){s===0&&(s=un()),r=Ae(r,s),r!==null&&($n(r,s),Vi(r))}function Ok(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),T_(r,c)}function Lk(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),T_(r,c)}function Ik(r,s){return ut(r,s)}var Qd=null,$l=null,sm=!1,Zd=!1,om=!1,So=0;function Vi(r){r!==$l&&r.next===null&&($l===null?Qd=$l=r:$l=$l.next=r),Zd=!0,sm||(sm=!0,Bk())}function au(r,s){if(!om&&Zd){om=!0;do for(var c=!1,m=Qd;m!==null;){if(r!==0){var E=m.pendingLanes;if(E===0)var R=0;else{var P=m.suspendedLanes,Y=m.pingedLanes;R=(1<<31-ke(42|r)+1)-1,R&=E&~(P&~Y),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(c=!0,j_(m,R))}else R=At,R=Nn(m,m===$t?R:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(R&3)===0||tn(m,R)||(c=!0,j_(m,R));m=m.next}while(c);om=!1}}function zk(){N_()}function N_(){Zd=sm=!1;var r=0;So!==0&&Kk()&&(r=So);for(var s=tt(),c=null,m=Qd;m!==null;){var E=m.next,R=D_(m,s);R===0?(m.next=null,c===null?Qd=E:c.next=E,E===null&&($l=c)):(c=m,(r!==0||(R&3)!==0)&&(Zd=!0)),m=E}wn!==0&&wn!==5||au(r),So!==0&&(So=0)}function D_(r,s){for(var c=r.suspendedLanes,m=r.pingedLanes,E=r.expirationTimes,R=r.pendingLanes&-62914561;0<R;){var P=31-ke(R),Y=1<<P,re=E[P];re===-1?((Y&c)===0||(Y&m)!==0)&&(E[P]=Wt(Y,s)):re<=s&&(r.expiredLanes|=Y),R&=~Y}if(s=$t,c=At,c=Nn(r,r===s?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===s&&(It===2||It===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&ot(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||tn(r,c)){if(s=c&-c,s===r.callbackPriority)return s;switch(m!==null&&ot(m),ir(c)){case 2:case 8:c=xe;break;case 32:c=_e;break;case 268435456:c=Oe;break;default:c=_e}return m=M_.bind(null,r),c=ut(c,m),r.callbackPriority=s,r.callbackNode=c,s}return m!==null&&m!==null&&ot(m),r.callbackPriority=2,r.callbackNode=null,2}function M_(r,s){if(wn!==0&&wn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Xd()&&r.callbackNode!==c)return null;var m=At;return m=Nn(r,r===$t?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(h_(r,m,s),D_(r,tt()),r.callbackNode!=null&&r.callbackNode===c?M_.bind(null,r):null)}function j_(r,s){if(Xd())return null;h_(r,s,!0)}function Bk(){Xk(function(){(Ot&6)!==0?ut(de,zk):N_()})}function am(){if(So===0){var r=Rl;r===0&&(r=qt,qt<<=1,(qt&261888)===0&&(qt=256)),So=r}return So}function O_(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:rs(""+r)}function L_(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 Pk(r,s,c,m,E){if(s==="submit"&&c&&c.stateNode===E){var R=O_((E[Bt]||null).action),P=m.submitter;P&&(s=(s=P[Bt]||null)?O_(s.formAction):P.getAttribute("formAction"),s!==null&&(R=s,P=null));var Y=new as("action","action",null,m,E);r.push({event:Y,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(So!==0){var re=P?L_(E,P):new FormData(E);Ap(c,{pending:!0,data:re,method:E.method,action:R},null,re)}}else typeof R=="function"&&(Y.preventDefault(),re=P?L_(E,P):new FormData(E),Ap(c,{pending:!0,data:re,method:E.method,action:R},R,re))},currentTarget:E}]})}}for(var lm=0;lm<Cl.length;lm++){var cm=Cl[lm],Fk=cm.toLowerCase(),Hk=cm[0].toUpperCase()+cm.slice(1);mr(Fk,"on"+Hk)}mr(ds,"onAnimationEnd"),mr(fs,"onAnimationIteration"),mr(ga,"onAnimationStart"),mr("dblclick","onDoubleClick"),mr("focusin","onFocus"),mr("focusout","onBlur"),mr(oo,"onTransitionRun"),mr(wl,"onTransitionStart"),mr(vd,"onTransitionCancel"),mr(zc,"onTransitionEnd"),Dt("onMouseEnter",["mouseout","mouseover"]),Dt("onMouseLeave",["mouseout","mouseover"]),Dt("onPointerEnter",["pointerout","pointerover"]),Dt("onPointerLeave",["pointerout","pointerover"]),_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_n("onBeforeInput",["compositionend","keypress","textInput","paste"]),_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="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(" "),Uk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function I_(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 Y=m[P],re=Y.instance,he=Y.currentTarget;if(Y=Y.listener,re!==R&&E.isPropagationStopped())break e;R=Y,E.currentTarget=he;try{R(E)}catch(be){va(be)}E.currentTarget=null,R=re}else for(P=0;P<m.length;P++){if(Y=m[P],re=Y.instance,he=Y.currentTarget,Y=Y.listener,re!==R&&E.isPropagationStopped())break e;R=Y,E.currentTarget=he;try{R(E)}catch(be){va(be)}E.currentTarget=null,R=re}}}}function Ct(r,s){var c=s[vn];c===void 0&&(c=s[vn]=new Set);var m=r+"__bubble";c.has(m)||(z_(s,r,2,!1),c.add(m))}function um(r,s,c){var m=0;s&&(m|=4),z_(c,r,m,s)}var Jd="_reactListening"+Math.random().toString(36).slice(2);function dm(r){if(!r[Jd]){r[Jd]=!0,li.forEach(function(c){c!=="selectionchange"&&(Uk.has(c)||um(c,!1,r),um(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Jd]||(s[Jd]=!0,um("selectionchange",!1,s))}}function z_(r,s,c,m){switch(fy(s)){case 2:var E=gE;break;case 8:E=vE;break;default:E=Em}c=E.bind(null,s,c,r),E=void 0,!Ks||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 fm(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 Y=m.stateNode.containerInfo;if(Y===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(;Y!==null;){if(P=lr(Y),P===null)return;if(re=P.tag,re===5||re===6||re===26||re===27){m=R=P;continue e}Y=Y.parentNode}}m=m.return}Gs(function(){var he=R,be=qs(c),we=[];e:{var pe=Bc.get(r);if(pe!==void 0){var ve=as,$e=r;switch(r){case"keypress":if(ss(c)===0)break e;case"keydown":case"keyup":ve=ol;break;case"focusin":$e="focus",ve=Zs;break;case"focusout":$e="blur",ve=Zs;break;case"beforeblur":case"afterblur":ve=Zs;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":ve=ea;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=Ja;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=Li;break;case ds:case fs:case ga:ve=el;break;case zc:ve=pi;break;case"scroll":case"scrollend":ve=Za;break;case"wheel":ve=sa;break;case"copy":case"cut":case"paste":ve=tl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=ze;break;case"toggle":case"beforetoggle":ve=Mc}var at=(s&4)!==0,Ht=!at&&(r==="scroll"||r==="scrollend"),ce=at?pe!==null?pe+"Capture":null:pe;at=[];for(var oe=he,fe;oe!==null;){var Se=oe;if(fe=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||fe===null||ce===null||(Se=Mi(oe,ce),Se!=null&&at.push(cu(oe,Se,fe))),Ht)break;oe=oe.return}0<at.length&&(pe=new ve(pe,$e,null,c,be),we.push({event:pe,listeners:at}))}}if((s&7)===0){e:{if(pe=r==="mouseover"||r==="pointerover",ve=r==="mouseout"||r==="pointerout",pe&&c!==Vs&&($e=c.relatedTarget||c.fromElement)&&(lr($e)||$e[an]))break e;if((ve||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ve?($e=c.relatedTarget||c.toElement,ve=he,$e=$e?lr($e):null,$e!==null&&(Ht=l($e),at=$e.tag,$e!==Ht||at!==5&&at!==27&&at!==6)&&($e=null)):(ve=null,$e=he),ve!==$e)){if(at=ea,Se="onMouseLeave",ce="onMouseEnter",oe="mouse",(r==="pointerout"||r==="pointerover")&&(at=ze,Se="onPointerLeave",ce="onPointerEnter",oe="pointer"),Ht=ve==null?pe:jn(ve),fe=$e==null?pe:jn($e),pe=new at(Se,oe+"leave",ve,c,be),pe.target=Ht,pe.relatedTarget=fe,Se=null,lr(be)===he&&(at=new at(ce,oe+"enter",$e,c,be),at.target=fe,at.relatedTarget=Ht,Se=at),Ht=Se,ve&&$e)t:{for(at=$k,ce=ve,oe=$e,fe=0,Se=ce;Se;Se=at(Se))fe++;Se=0;for(var nt=oe;nt;nt=at(nt))Se++;for(;0<fe-Se;)ce=at(ce),fe--;for(;0<Se-fe;)oe=at(oe),Se--;for(;fe--;){if(ce===oe||oe!==null&&ce===oe.alternate){at=ce;break t}ce=at(ce),oe=at(oe)}at=null}else at=null;ve!==null&&B_(we,pe,ve,at,!1),$e!==null&&Ht!==null&&B_(we,Ht,$e,at,!0)}}e:{if(pe=he?jn(he):window,ve=pe.nodeName&&pe.nodeName.toLowerCase(),ve==="select"||ve==="input"&&pe.type==="file")var Mt=gl;else if(ml(pe))if(da)Mt=Ic;else{Mt=ro;var Ye=yl}else ve=pe.nodeName,!ve||ve.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?he&&$s(he.elementType)&&(Mt=gl):Mt=bl;if(Mt&&(Mt=Mt(r,he))){ua(we,Mt,c,be);break e}Ye&&Ye(r,pe,he),r==="focusout"&&he&&pe.type==="number"&&he.memoizedProps.value!=null&&Us(pe,"number",pe.value)}switch(Ye=he?jn(he):window,r){case"focusin":(ml(Ye)||Ye.contentEditable==="true")&&(lt=Ye,Fi=he,fr=null);break;case"focusout":fr=Fi=lt=null;break;case"mousedown":Kr=!0;break;case"contextmenu":case"mouseup":case"dragend":Kr=!1,mi(we,c,be);break;case"selectionchange":if(so)break;case"keydown":case"keyup":mi(we,c,be)}var _t;if(oa)e:{switch(r){case"compositionstart":var Rt="onCompositionStart";break e;case"compositionend":Rt="onCompositionEnd";break e;case"compositionupdate":Rt="onCompositionUpdate";break e}Rt=void 0}else zi?to(r,c)&&(Rt="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Rt="onCompositionStart");Rt&&(aa&&c.locale!=="ko"&&(zi||Rt!=="onCompositionStart"?Rt==="onCompositionEnd"&&zi&&(_t=Zo()):(Er=be,Qo="value"in Er?Er.value:Er.textContent,zi=!0)),Ye=ef(he,Rt),0<Ye.length&&(Rt=new ra(Rt,r,null,c,be),we.push({event:Rt,listeners:Ye}),_t?Rt.data=_t:(_t=ca(c),_t!==null&&(Rt.data=_t)))),(_t=jc?hl(r,c):Oc(r,c))&&(Rt=ef(he,"onBeforeInput"),0<Rt.length&&(Ye=new ra("onBeforeInput","beforeinput",null,c,be),we.push({event:Ye,listeners:Rt}),Ye.data=_t)),Pk(we,r,he,c,be)}I_(we,s)})}function cu(r,s,c){return{instance:r,listener:s,currentTarget:c}}function ef(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=Mi(r,c),E!=null&&m.unshift(cu(r,E,R)),E=Mi(r,s),E!=null&&m.push(cu(r,E,R))),r.tag===3)return m;r=r.return}return[]}function $k(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function B_(r,s,c,m,E){for(var R=s._reactName,P=[];c!==null&&c!==m;){var Y=c,re=Y.alternate,he=Y.stateNode;if(Y=Y.tag,re!==null&&re===m)break;Y!==5&&Y!==26&&Y!==27||he===null||(re=he,E?(he=Mi(c,R),he!=null&&P.unshift(cu(c,he,re))):E||(he=Mi(c,R),he!=null&&P.push(cu(c,he,re)))),c=c.return}P.length!==0&&r.push({event:s,listeners:P})}var Vk=/\r\n?/g,qk=/\u0000|\uFFFD/g;function P_(r){return(typeof r=="string"?r:""+r).replace(Vk,`
49
+ `).replace(qk,"")}function F_(r,s){return s=P_(s),P_(r)===s}function Ft(r,s,c,m,E,R){switch(c){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Qe(r,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Qe(r,""+m);break;case"className":cr(r,"class",m);break;case"tabIndex":cr(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":cr(r,c,m);break;case"style":Xo(r,m,R);break;case"data":if(s!=="object"){cr(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"&&Ft(r,s,"name",E.name,E,null),Ft(r,s,"formEncType",E.formEncType,E,null),Ft(r,s,"formMethod",E.formMethod,E,null),Ft(r,s,"formTarget",E.formTarget,E,null)):(Ft(r,s,"encType",E.encType,E,null),Ft(r,s,"method",E.method,E,null),Ft(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=ur);break;case"onScroll":m!=null&&Ct("scroll",r);break;case"onScrollEnd":m!=null&&Ct("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":Ct("beforetoggle",r),Ct("toggle",r),Zn(r,"popover",m);break;case"xlinkActuate":nn(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":nn(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":nn(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":nn(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":nn(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":nn(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":nn(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":nn(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":nn(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Zn(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=Xa.get(c)||c,Zn(r,c,m))}}function hm(r,s,c,m,E,R){switch(c){case"style":Xo(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"?Qe(r,m):(typeof m=="number"||typeof m=="bigint")&&Qe(r,""+m);break;case"onScroll":m!=null&&Ct("scroll",r);break;case"onScrollEnd":m!=null&&Ct("scrollend",r);break;case"onClick":m!=null&&(r.onclick=ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ts.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[Bt]||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,""):Zn(r,c,m)}}}function Hn(r,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ct("error",r),Ct("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:Ft(r,s,R,P,c,null)}}E&&Ft(r,s,"srcSet",c.srcSet,c,null),m&&Ft(r,s,"src",c.src,c,null);return;case"input":Ct("invalid",r);var Y=R=P=E=null,re=null,he=null;for(m in c)if(c.hasOwnProperty(m)){var be=c[m];if(be!=null)switch(m){case"name":E=be;break;case"type":P=be;break;case"checked":re=be;break;case"defaultChecked":he=be;break;case"value":R=be;break;case"defaultValue":Y=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(i(137,s));break;default:Ft(r,s,m,be,c,null)}}Ko(r,R,Y,re,he,P,E,!1);return;case"select":Ct("invalid",r),m=P=R=null;for(E in c)if(c.hasOwnProperty(E)&&(Y=c[E],Y!=null))switch(E){case"value":R=Y;break;case"defaultValue":P=Y;break;case"multiple":m=Y;default:Ft(r,s,E,Y,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":Ct("invalid",r),R=E=m=null;for(P in c)if(c.hasOwnProperty(P)&&(Y=c[P],Y!=null))switch(P){case"value":m=Y;break;case"defaultValue":E=Y;break;case"children":R=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(91));break;default:Ft(r,s,P,Y,c,null)}Ya(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:Ft(r,s,re,m,c,null)}return;case"dialog":Ct("beforetoggle",r),Ct("toggle",r),Ct("cancel",r),Ct("close",r);break;case"iframe":case"object":Ct("load",r);break;case"video":case"audio":for(m=0;m<lu.length;m++)Ct(lu[m],r);break;case"image":Ct("error",r),Ct("load",r);break;case"details":Ct("toggle",r);break;case"embed":case"source":case"link":Ct("error",r),Ct("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(he in c)if(c.hasOwnProperty(he)&&(m=c[he],m!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Ft(r,s,he,m,c,null)}return;default:if($s(s)){for(be in c)c.hasOwnProperty(be)&&(m=c[be],m!==void 0&&hm(r,s,be,m,c,void 0));return}}for(Y in c)c.hasOwnProperty(Y)&&(m=c[Y],m!=null&&Ft(r,s,Y,m,c,null))}function Wk(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,Y=null,re=null,he=null,be=null;for(ve in c){var we=c[ve];if(c.hasOwnProperty(ve)&&we!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":re=we;default:m.hasOwnProperty(ve)||Ft(r,s,ve,null,m,we)}}for(var pe in m){var ve=m[pe];if(we=c[pe],m.hasOwnProperty(pe)&&(ve!=null||we!=null))switch(pe){case"type":R=ve;break;case"name":E=ve;break;case"checked":he=ve;break;case"defaultChecked":be=ve;break;case"value":P=ve;break;case"defaultValue":Y=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(i(137,s));break;default:ve!==we&&Ft(r,s,pe,ve,m,we)}}Hs(r,P,Y,re,he,be,R,E);return;case"select":ve=P=Y=pe=null;for(R in c)if(re=c[R],c.hasOwnProperty(R)&&re!=null)switch(R){case"value":break;case"multiple":ve=re;default:m.hasOwnProperty(R)||Ft(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":pe=R;break;case"defaultValue":Y=R;break;case"multiple":P=R;default:R!==re&&Ft(r,s,E,R,m,re)}s=Y,c=P,m=ve,pe!=null?fi(r,!!c,pe,!1):!!m!=!!c&&(s!=null?fi(r,!!c,s,!0):fi(r,!!c,c?[]:"",!1));return;case"textarea":ve=pe=null;for(Y in c)if(E=c[Y],c.hasOwnProperty(Y)&&E!=null&&!m.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:Ft(r,s,Y,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":pe=E;break;case"defaultValue":ve=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:E!==R&&Ft(r,s,P,E,m,R)}Dc(r,pe,ve);return;case"option":for(var $e in c)if(pe=c[$e],c.hasOwnProperty($e)&&pe!=null&&!m.hasOwnProperty($e))switch($e){case"selected":r.selected=!1;break;default:Ft(r,s,$e,null,m,pe)}for(re in m)if(pe=m[re],ve=c[re],m.hasOwnProperty(re)&&pe!==ve&&(pe!=null||ve!=null))switch(re){case"selected":r.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Ft(r,s,re,pe,m,ve)}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)pe=c[at],c.hasOwnProperty(at)&&pe!=null&&!m.hasOwnProperty(at)&&Ft(r,s,at,null,m,pe);for(he in m)if(pe=m[he],ve=c[he],m.hasOwnProperty(he)&&pe!==ve&&(pe!=null||ve!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,s));break;default:Ft(r,s,he,pe,m,ve)}return;default:if($s(s)){for(var Ht in c)pe=c[Ht],c.hasOwnProperty(Ht)&&pe!==void 0&&!m.hasOwnProperty(Ht)&&hm(r,s,Ht,void 0,m,pe);for(be in m)pe=m[be],ve=c[be],!m.hasOwnProperty(be)||pe===ve||pe===void 0&&ve===void 0||hm(r,s,be,pe,m,ve);return}}for(var ce in c)pe=c[ce],c.hasOwnProperty(ce)&&pe!=null&&!m.hasOwnProperty(ce)&&Ft(r,s,ce,null,m,pe);for(we in m)pe=m[we],ve=c[we],!m.hasOwnProperty(we)||pe===ve||pe==null&&ve==null||Ft(r,s,we,pe,m,ve)}function H_(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gk(){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,Y=E.duration;if(R&&Y&&H_(P)){for(P=0,Y=E.responseEnd,m+=1;m<c.length;m++){var re=c[m],he=re.startTime;if(he>Y)break;var be=re.transferSize,we=re.initiatorType;be&&H_(we)&&(re=re.responseEnd,P+=be*(re<Y?1:(Y-he)/(re-he)))}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 pm=null,mm=null;function tf(r){return r.nodeType===9?r:r.ownerDocument}function U_(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 $_(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 gm(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 vm=null;function Kk(){var r=window.event;return r&&r.type==="popstate"?r===vm?!1:(vm=r,!0):(vm=null,!1)}var V_=typeof setTimeout=="function"?setTimeout:void 0,Yk=typeof clearTimeout=="function"?clearTimeout:void 0,q_=typeof Promise=="function"?Promise:void 0,Xk=typeof queueMicrotask=="function"?queueMicrotask:typeof q_<"u"?function(r){return q_.resolve(null).then(r).catch(Qk)}:V_;function Qk(r){setTimeout(function(){throw r})}function wo(r){return r==="head"}function W_(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),Gl(s);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")uu(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,uu(c);for(var R=c.firstChild;R;){var P=R.nextSibling,Y=R.nodeName;R[En]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&R.rel.toLowerCase()==="stylesheet"||c.removeChild(R),R=P}}else c==="body"&&uu(r.ownerDocument.body);c=E}while(c);Gl(s)}function G_(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 _m(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":_m(c),ar(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function Zk(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[En])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=ei(r.nextSibling),r===null)break}return null}function Jk(r,s,c){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=ei(r.nextSibling),r===null))return null;return r}function K_(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=ei(r.nextSibling),r===null))return null;return r}function ym(r){return r.data==="$?"||r.data==="$~"}function bm(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function eE(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 ei(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 xm=null;function Y_(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(s===0)return ei(r.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}r=r.nextSibling}return null}function X_(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 Q_(r,s,c){switch(s=tf(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 uu(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);ar(r)}var ti=new Map,Z_=new Set;function nf(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Rs=Z.d;Z.d={f:tE,r:nE,D:rE,C:iE,L:sE,m:oE,X:lE,S:aE,M:cE};function tE(){var r=Rs.f(),s=Gd();return r||s}function nE(r){var s=Mn(r);s!==null&&s.tag===5&&s.type==="form"?m0(s):Rs.r(r)}var Vl=typeof document>"u"?null:document;function J_(r,s,c){var m=Vl;if(m&&typeof s=="string"&&s){var E=On(s);E='link[rel="'+r+'"][href="'+E+'"]',typeof c=="string"&&(E+='[crossorigin="'+c+'"]'),Z_.has(E)||(Z_.add(E),r={rel:r,crossOrigin:c,href:s},m.querySelector(E)===null&&(s=m.createElement("link"),Hn(s,"link",r),Lt(s),m.head.appendChild(s)))}}function rE(r){Rs.D(r),J_("dns-prefetch",r,null)}function iE(r,s){Rs.C(r,s),J_("preconnect",r,s)}function sE(r,s,c){Rs.L(r,s,c);var m=Vl;if(m&&r&&s){var E='link[rel="preload"][as="'+On(s)+'"]';s==="image"&&c&&c.imageSrcSet?(E+='[imagesrcset="'+On(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(E+='[imagesizes="'+On(c.imageSizes)+'"]')):E+='[href="'+On(r)+'"]';var R=E;switch(s){case"style":R=ql(r);break;case"script":R=Wl(r)}ti.has(R)||(r=h({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:r,as:s},c),ti.set(R,r),m.querySelector(E)!==null||s==="style"&&m.querySelector(du(R))||s==="script"&&m.querySelector(fu(R))||(s=m.createElement("link"),Hn(s,"link",r),Lt(s),m.head.appendChild(s)))}}function oE(r,s){Rs.m(r,s);var c=Vl;if(c&&r){var m=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+On(m)+'"][href="'+On(r)+'"]',R=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Wl(r)}if(!ti.has(R)&&(r=h({rel:"modulepreload",href:r},s),ti.set(R,r),c.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(fu(R)))return}m=c.createElement("link"),Hn(m,"link",r),Lt(m),c.head.appendChild(m)}}}function aE(r,s,c){Rs.S(r,s,c);var m=Vl;if(m&&r){var E=Qn(m).hoistableStyles,R=ql(r);s=s||"default";var P=E.get(R);if(!P){var Y={loading:0,preload:null};if(P=m.querySelector(du(R)))Y.loading=5;else{r=h({rel:"stylesheet",href:r,"data-precedence":s},c),(c=ti.get(R))&&Sm(r,c);var re=P=m.createElement("link");Lt(re),Hn(re,"link",r),re._p=new Promise(function(he,be){re.onload=he,re.onerror=be}),re.addEventListener("load",function(){Y.loading|=1}),re.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,rf(P,s,m)}P={type:"stylesheet",instance:P,count:1,state:Y},E.set(R,P)}}}function lE(r,s){Rs.X(r,s);var c=Vl;if(c&&r){var m=Qn(c).hoistableScripts,E=Wl(r),R=m.get(E);R||(R=c.querySelector(fu(E)),R||(r=h({src:r,async:!0},s),(s=ti.get(E))&&wm(r,s),R=c.createElement("script"),Lt(R),Hn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(E,R))}}function cE(r,s){Rs.M(r,s);var c=Vl;if(c&&r){var m=Qn(c).hoistableScripts,E=Wl(r),R=m.get(E);R||(R=c.querySelector(fu(E)),R||(r=h({src:r,async:!0,type:"module"},s),(s=ti.get(E))&&wm(r,s),R=c.createElement("script"),Lt(R),Hn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(E,R))}}function ey(r,s,c,m){var E=(E=X.current)?nf(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=ql(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=ql(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(du(r)))&&!R._p&&(P.instance=R,P.state.loading=5),ti.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},ti.set(r,c),R||uE(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=Wl(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 ql(r){return'href="'+On(r)+'"'}function du(r){return'link[rel="stylesheet"]['+r+"]"}function ty(r){return h({},r,{"data-precedence":r.precedence,precedence:null})}function uE(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}),Hn(s,"link",c),Lt(s),r.head.appendChild(s))}function Wl(r){return'[src="'+On(r)+'"]'}function fu(r){return"script[async]"+r}function ny(r,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var m=r.querySelector('style[data-href~="'+On(c.href)+'"]');if(m)return s.instance=m,Lt(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"),Lt(m),Hn(m,"style",E),rf(m,c.precedence,r),s.instance=m;case"stylesheet":E=ql(c.href);var R=r.querySelector(du(E));if(R)return s.state.loading|=4,s.instance=R,Lt(R),R;m=ty(c),(E=ti.get(E))&&Sm(m,E),R=(r.ownerDocument||r).createElement("link"),Lt(R);var P=R;return P._p=new Promise(function(Y,re){P.onload=Y,P.onerror=re}),Hn(R,"link",m),s.state.loading|=4,rf(R,c.precedence,r),s.instance=R;case"script":return R=Wl(c.src),(E=r.querySelector(fu(R)))?(s.instance=E,Lt(E),E):(m=c,(E=ti.get(R))&&(m=h({},c),wm(m,E)),r=r.ownerDocument||r,E=r.createElement("script"),Lt(E),Hn(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,rf(m,c.precedence,r));return s.instance}function rf(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 Y=m[P];if(Y.dataset.precedence===s)R=Y;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 Sm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function wm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var sf=null;function ry(r,s,c){if(sf===null){var m=new Map,E=sf=new Map;E.set(c,m)}else E=sf,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[En]||R[Et]||r==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var P=R.getAttribute(s)||"";P=r+P;var Y=m.get(P);Y?Y.push(R):m.set(P,[R])}}return m}function iy(r,s,c){r=r.ownerDocument||r,r.head.insertBefore(c,s==="title"?r.querySelector("head > title"):null)}function dE(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 sy(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function fE(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=ql(m.href),R=s.querySelector(du(E));if(R){s=R._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=of.bind(r),s.then(r,r)),c.state.loading|=4,c.instance=R,Lt(R);return}R=s.ownerDocument||s,m=ty(m),(E=ti.get(E))&&Sm(m,E),R=R.createElement("link"),Lt(R);var P=R;P._p=new Promise(function(Y,re){P.onload=Y,P.onerror=re}),Hn(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=of.bind(r),s.addEventListener("load",c),s.addEventListener("error",c))}}var Cm=0;function hE(r,s){return r.stylesheets&&r.count===0&&lf(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&lf(r,r.stylesheets),r.unsuspend){var R=r.unsuspend;r.unsuspend=null,R()}},6e4+s);0<r.imgBytes&&Cm===0&&(Cm=62500*Gk());var E=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&lf(r,r.stylesheets),r.unsuspend)){var R=r.unsuspend;r.unsuspend=null,R()}},(r.imgBytes>Cm?50:800)+s);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(E)}}:null}function of(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lf(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var af=null;function lf(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,af=new Map,s.forEach(pE,r),af=null,of.call(r))}function pE(r,s){if(!(s.state.loading&4)){var c=af.get(r);if(c)var m=c.get(null);else{c=new Map,af.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=of.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 hu={$$typeof:x,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function mE(r,s,c,m,E,R,P,Y,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=dn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dn(0),this.hiddenUpdates=dn(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 oy(r,s,c,m,E,R,P,Y,re,he,be,we){return r=new mE(r,s,c,P,re,he,be,we,Y),s=1,R===!0&&(s|=24),R=Me(3,null,null,s),r.current=R,R.stateNode=r,s=rp(),s.refCount++,r.pooledCache=s,s.refCount++,R.memoizedState={element:m,isDehydrated:c,cache:s},ap(R),r}function ay(r){return r?(r=le,r):le}function ly(r,s,c,m,E,R){E=ay(E),m.context===null?m.context=E:m.pendingContext=E,m=fo(s),m.payload={element:c},R=R===void 0?null:R,R!==null&&(m.callback=R),c=ho(r,m,s),c!==null&&(xr(c,r,s),qc(c,r,s))}function cy(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function km(r,s){cy(r,s),(r=r.alternate)&&cy(r,s)}function uy(r){if(r.tag===13||r.tag===31){var s=Ae(r,67108864);s!==null&&xr(s,r,67108864),km(r,67108864)}}function dy(r){if(r.tag===13||r.tag===31){var s=Or();s=$r(s);var c=Ae(r,s);c!==null&&xr(c,r,s),km(r,s)}}var cf=!0;function gE(r,s,c,m){var E=G.T;G.T=null;var R=Z.p;try{Z.p=2,Em(r,s,c,m)}finally{Z.p=R,G.T=E}}function vE(r,s,c,m){var E=G.T;G.T=null;var R=Z.p;try{Z.p=8,Em(r,s,c,m)}finally{Z.p=R,G.T=E}}function Em(r,s,c,m){if(cf){var E=Am(m);if(E===null)fm(r,s,m,uf,c),hy(r,m);else if(yE(E,r,s,c,m))m.stopPropagation();else if(hy(r,m),s&4&&-1<_E.indexOf(r)){for(;E!==null;){var R=Mn(E);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var P=Zt(R.pendingLanes);if(P!==0){var Y=R;for(Y.pendingLanes|=2,Y.entangledLanes|=2;P;){var re=1<<31-ke(P);Y.entanglements[1]|=re,P&=~re}Vi(R),(Ot&6)===0&&(qd=tt()+500,au(0))}}break;case 31:case 13:Y=Ae(R,2),Y!==null&&xr(Y,R,2),Gd(),km(R,2)}if(R=Am(m),R===null&&fm(r,s,m,uf,c),R===E)break;E=R}E!==null&&m.stopPropagation()}else fm(r,s,m,null,c)}}function Am(r){return r=qs(r),Rm(r)}var uf=null;function Rm(r){if(uf=null,r=lr(r),r!==null){var s=l(r);if(s===null)r=null;else{var c=s.tag;if(c===13){if(r=u(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 uf=r,null}function fy(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(ue()){case de:return 2;case xe:return 8;case _e:case Te:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var Tm=!1,Co=null,ko=null,Eo=null,pu=new Map,mu=new Map,Ao=[],_E="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 hy(r,s){switch(r){case"focusin":case"focusout":Co=null;break;case"dragenter":case"dragleave":ko=null;break;case"mouseover":case"mouseout":Eo=null;break;case"pointerover":case"pointerout":pu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(s.pointerId)}}function gu(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=Mn(s),s!==null&&uy(s)),r):(r.eventSystemFlags|=m,s=r.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),r)}function yE(r,s,c,m,E){switch(s){case"focusin":return Co=gu(Co,r,s,c,m,E),!0;case"dragenter":return ko=gu(ko,r,s,c,m,E),!0;case"mouseover":return Eo=gu(Eo,r,s,c,m,E),!0;case"pointerover":var R=E.pointerId;return pu.set(R,gu(pu.get(R)||null,r,s,c,m,E)),!0;case"gotpointercapture":return R=E.pointerId,mu.set(R,gu(mu.get(R)||null,r,s,c,m,E)),!0}return!1}function py(r){var s=lr(r.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=u(c),s!==null){r.blockedOn=s,Cr(r.priority,function(){dy(c)});return}}else if(s===31){if(s=a(c),s!==null){r.blockedOn=s,Cr(r.priority,function(){dy(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 df(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=Am(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Vs=m,c.target.dispatchEvent(m),Vs=null}else return s=Mn(c),s!==null&&uy(s),r.blockedOn=c,!1;s.shift()}return!0}function my(r,s,c){df(r)&&c.delete(s)}function bE(){Tm=!1,Co!==null&&df(Co)&&(Co=null),ko!==null&&df(ko)&&(ko=null),Eo!==null&&df(Eo)&&(Eo=null),pu.forEach(my),mu.forEach(my)}function ff(r,s){r.blockedOn===s&&(r.blockedOn=null,Tm||(Tm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bE)))}var hf=null;function gy(r){hf!==r&&(hf=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){hf===r&&(hf=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(Rm(m||c)===null)continue;break}var R=Mn(c);R!==null&&(r.splice(s,3),s-=3,Ap(R,{pending:!0,data:E,method:c.method,action:m},m,E))}}))}function Gl(r){function s(re){return ff(re,r)}Co!==null&&ff(Co,r),ko!==null&&ff(ko,r),Eo!==null&&ff(Eo,r),pu.forEach(s),mu.forEach(s);for(var c=0;c<Ao.length;c++){var m=Ao[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<Ao.length&&(c=Ao[0],c.blockedOn===null);)py(c),c.blockedOn===null&&Ao.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[Bt]||null;if(typeof R=="function")P||gy(c);else if(P){var Y=null;if(R&&R.hasAttribute("formAction")){if(E=R,P=R[Bt]||null)Y=P.formAction;else if(Rm(E)!==null)continue}else Y=P.action;typeof Y=="function"?c[m+1]=Y:(c.splice(m,3),m-=3),gy(c)}}}function vy(){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 Nm(r){this._internalRoot=r}pf.prototype.render=Nm.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var c=s.current,m=Or();ly(c,m,r,s,null,null)},pf.prototype.unmount=Nm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;ly(r.current,2,null,r,null,null),Gd(),s[an]=null}};function pf(r){this._internalRoot=r}pf.prototype.unstable_scheduleHydration=function(r){if(r){var s=Ti();r={blockedOn:null,target:r,priority:s};for(var c=0;c<Ao.length&&s!==0&&s<Ao[c].priority;c++);Ao.splice(c,0,r),c===0&&py(r)}};var _y=e.version;if(_y!=="19.2.4")throw Error(i(527,_y,"19.2.4"));Z.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 xE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mf.isDisabled&&mf.supportsFiber)try{He=mf.inject(xE),dt=mf}catch{}}return _u.createRoot=function(r,s){if(!o(r))throw Error(i(299));var c=!1,m="",E=k0,R=E0,P=A0;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=oy(r,1,!1,null,null,c,m,null,E,R,P,vy),r[an]=s.current,dm(r),new Nm(s)},_u.hydrateRoot=function(r,s,c){if(!o(r))throw Error(i(299));var m=!1,E="",R=k0,P=E0,Y=A0,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&&(Y=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=oy(r,1,!0,s,c!=null?c:null,m,E,re,R,P,Y,vy),s.context=ay(null),c=s.current,m=Or(),m=$r(m),E=fo(m),E.callback=null,ho(c,E,m),c=m,s.current.lanes=c,$n(s,c),Vi(s),r[an]=s.current,dm(r),new pf(s)},_u.version="19.2.4",_u}var Ry;function DE(){if(Ry)return jm.exports;Ry=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=NE(),jm.exports}var ME=DE();const Ty="jean2-theme",a1="neutral",Ux="system",jE={mode:Ux,scheme:a1,setMode:()=>null,setScheme:()=>null,resolvedMode:"dark"},$x=D.createContext(jE);function OE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ny(t){return t==="system"?OE():t}function LE(t){const e=localStorage.getItem(Ty);if(!e||!["light","dark","system"].includes(e))return null;const i={mode:e,scheme:a1};return localStorage.setItem(t,JSON.stringify(i)),localStorage.removeItem(Ty),i}function IE({children:t,defaultMode:e=Ux,defaultScheme:n=a1,storageKey:i="jean2-theme-settings",...o}){const[l,u]=D.useState(()=>{const S=LE(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,d]=D.useState(()=>Ny(l.mode)),f=D.useCallback((S,C)=>{const w=window.document.documentElement,v=Ny(S);w.classList.remove("light","dark"),w.classList.remove("neutral","ocean","forest","sunset","amethyst"),w.classList.add(v),w.classList.add(C),d(v)},[]);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};u(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),h=D.useCallback(S=>{const C={...l,scheme:S};u(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),_={mode:l.mode,scheme:l.scheme,setMode:p,setScheme:h,resolvedMode:a};return g.jsx($x.Provider,{...o,value:_,children:t})}const zE=()=>{const t=D.useContext($x);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var zm={exports:{}},Bm={};/**
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 Dy;function BE(){if(Dy)return Bm;Dy=1;var t=oh().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Bm.c=function(e){return t.H.useMemoCache(e)},Bm}var My;function PE(){return My||(My=1,zm.exports=BE()),zm.exports}var ge=PE();/**
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 Vx=(...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 FE=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 HE=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 jy=t=>{const e=HE(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 UE={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 $E=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 VE=D.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:u,...a},d)=>D.createElement("svg",{ref:d,...UE,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:Vx("lucide",o),...!l&&!$E(a)&&{"aria-hidden":"true"},...a},[...u.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 Ie=(t,e)=>{const n=D.forwardRef(({className:i,...o},l)=>D.createElement(VE,{ref:l,iconNode:e,className:Vx(`lucide-${FE(jy(t))}`,`lucide-${t}`,i),...o}));return n.displayName=jy(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 qE=[["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"}]],WE=Ie("archive",qE);/**
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 GE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],KE=Ie("arrow-left",GE);/**
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 YE=[["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"}]],XE=Ie("bot",YE);/**
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 QE=[["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"}]],Ag=Ie("box",QE);/**
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 ZE=[["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"}]],Oy=Ie("brain",ZE);/**
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 JE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],js=Ie("check",JE);/**
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 e4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pc=Ie("chevron-down",e4);/**
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 t4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],n4=Ie("chevron-left",t4);/**
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 r4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ci=Ie("chevron-right",r4);/**
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 i4=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],s4=Ie("chevron-up",i4);/**
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 o4=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],qx=Ie("chevrons-up-down",o4);/**
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 a4=[["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"}]],Du=Ie("circle-alert",a4);/**
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 l4=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ku=Ie("circle-check-big",l4);/**
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 c4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],u4=Ie("circle-check",c4);/**
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 d4=[["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"}]],ah=Ie("circle-x",d4);/**
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 f4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],h4=Ie("circle",f4);/**
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 p4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Wx=Ie("clock",p4);/**
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 m4=[["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"}]],g4=Ie("cog",m4);/**
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 v4=[["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"}]],Lu=Ie("copy",v4);/**
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 _4=[["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"}]],Ly=Ie("cpu",_4);/**
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 y4=[["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"}]],Gx=Ie("ellipsis",y4);/**
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 b4=[["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"}]],Rg=Ie("external-link",b4);/**
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 x4=[["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"}]],S4=Ie("eye-off",x4);/**
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 w4=[["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"}]],C4=Ie("eye",w4);/**
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 k4=[["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"}]],E4=Ie("file-pen",k4);/**
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 A4=[["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"}]],l1=Ie("file-text",A4);/**
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 R4=[["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"}]],qi=Ie("file",R4);/**
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 T4=[["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"}]],Tg=Ie("folder-open",T4);/**
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 N4=[["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"}]],Ds=Ie("folder",N4);/**
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 D4=[["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"}]],M4=Ie("git-branch",D4);/**
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 j4=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],O4=Ie("hard-drive",j4);/**
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 L4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],I4=Ie("info",L4);/**
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 z4=[["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"}]],B4=Ie("keyboard",z4);/**
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 P4=[["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"}]],F4=Ie("layout-grid",P4);/**
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 H4=[["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"}]],U4=Ie("layout-list",H4);/**
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 $4=[["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"}]],V4=Ie("link-2",$4);/**
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 q4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Br=Ie("loader-circle",q4);/**
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 W4=[["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"}]],G4=Ie("lock",W4);/**
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 K4=[["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"}]],Y4=Ie("message-square",K4);/**
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 X4=[["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"}]],Kx=Ie("minimize-2",X4);/**
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 Q4=[["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=Ie("monitor",Q4);/**
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 J4=[["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"}]],e5=Ie("moon",J4);/**
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 t5=[["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"}]],n5=Ie("palette",t5);/**
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 r5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],i5=Ie("panel-left",r5);/**
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 s5=[["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"}]],Yx=Ie("pause",s5);/**
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 o5=[["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"}]],a5=Ie("pencil",o5);/**
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 l5=[["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"}]],c5=Ie("plug-zap",l5);/**
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 u5=[["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"}]],d5=Ie("plug",u5);/**
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 f5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],mc=Ie("plus",f5);/**
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 h5=[["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"}]],La=Ie("refresh-cw",h5);/**
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 p5=[["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"}]],Xx=Ie("rotate-ccw",p5);/**
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 m5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],c1=Ie("search",m5);/**
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 g5=[["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"}]],v5=Ie("send",g5);/**
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 _5=[["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"}]],Ia=Ie("server",_5);/**
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 y5=[["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=Ie("settings",y5);/**
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 b5=[["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"}]],Zx=Ie("shield",b5);/**
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 x5=[["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"}]],Iy=Ie("square-terminal",x5);/**
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 S5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Jx=Ie("square",S5);/**
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 w5=[["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"}]],zy=Ie("star",w5);/**
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 C5=[["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"}]],k5=Ie("sun",C5);/**
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 E5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],By=Ie("terminal",E5);/**
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 A5=[["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"}]],gc=Ie("trash-2",A5);/**
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 R5=[["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"}]],Iu=Ie("triangle-alert",R5);/**
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 T5=[["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"}]],N5=Ie("undo-2",T5);/**
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 D5=[["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"}]],M5=Ie("unplug",D5);/**
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 j5=[["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"}]],eS=Ie("user",j5);/**
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 O5=[["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"}]],L5=Ie("volume-2",O5);/**
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 I5=[["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"}]],z5=Ie("volume-x",I5);/**
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 B5=[["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"}]],tS=Ie("wifi-off",B5);/**
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 P5=[["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"}]],F5=Ie("wifi",P5);/**
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 H5=[["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"}]],U5=Ie("wrench",H5);/**
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 $5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ms=Ie("x",$5);/**
458
+ * @license lucide-react v0.577.0 - ISC
459
+ *
460
+ * This source code is licensed under the ISC license.
461
+ * See the LICENSE file in the root directory of this source tree.
462
+ */const V5=[["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"}]],Pm=Ie("zap",V5);function q5(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function u1(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var Py;(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"})(Py||(Py={}));async function W5(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await u1("plugin:event|unlisten",{event:t,eventId:e})}async function Fy(t,e,n){var i;const o=(i=void 0)!==null&&i!==void 0?i:{kind:"Any"};return u1("plugin:event|listen",{event:t,target:o,handler:q5(e)}).then(l=>async()=>W5(t,l))}const Pr={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function Ns(){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 G5(t){return Ns().find(n=>n.id===t)||null}function K5(t){try{const e=Ns();e.push(t),localStorage.setItem(Pr.SERVERS,JSON.stringify(e))}catch(e){console.error("Error saving server to localStorage:",e)}}function Y5(t,e){try{const n=Ns(),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 X5(t){try{const n=Ns().filter(u=>u.id!==t);localStorage.setItem(Pr.SERVERS,JSON.stringify(n));const o=Si().filter(u=>u.serverId!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(o)),nS()===t&&localStorage.removeItem(Pr.ACTIVE_SERVER_ID)}catch(e){console.error("Error deleting server from localStorage:",e)}}function nS(){try{return localStorage.getItem(Pr.ACTIVE_SERVER_ID)}catch(t){return console.error("Error reading active server ID from localStorage:",t),null}}function Fm(t){try{localStorage.setItem(Pr.ACTIVE_SERVER_ID,t)}catch(e){console.error("Error setting active server ID in localStorage:",e)}}function Hy(){const t=nS();return t?G5(t):null}function Si(){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 Q5(t){const e=Si(),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=Si().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 J5(t){try{const n=Si().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 eA(t){try{const e=Si(),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 rS(t){return/^[a-f0-9]{64}$/.test(t)}function tA(t){return t.length<12?t:`${t.slice(0,4)}...${t.slice(-4)}`}function If(t){let e=t.trim();return e=e.replace(/^(https?:\/\/|wss?:\/\/)/i,""),e=e.replace(/\/+$/,""),e}const iS=D.createContext(null),nA=t=>{const e=ge.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),[u,a]=D.useState(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[1]=d):d=e[1];const[f,p]=D.useState(d),[h,_]=D.useState(!1),S=D.useRef(null),C=D.useRef(!1);let w,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{const Q=Ns(),te=Hy(),X=Si();l(Q),a(te),p(X)},v=[],e[2]=w,e[3]=v):(w=e[2],v=e[3]),D.useEffect(w,v);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=(Q,te,X)=>{const q=If(te),$={id:crypto.randomUUID(),name:Q,url:q,token:X,createdAt:new Date().toISOString()};return K5($),l(Ns()),Fm($.id),a($),$},e[5]=x):x=e[5];const k=x;let N;e[6]!==(u==null?void 0:u.id)?(N=(Q,te)=>{const X={...te,...te.url&&{url:If(te.url)}};Y5(Q,X),l(Ns()),(u==null?void 0:u.id)===Q&&a(Hy())},e[6]=u==null?void 0:u.id,e[7]=N):N=e[7];const A=N;let M;e[8]!==(u==null?void 0:u.id)?(M=Q=>{const te=(u==null?void 0:u.id)===Q;if(X5(Q),l(Ns()),te){const X=Ns(),q=X.length>0?X[0]:null;q?(Fm(q.id),a(q)):a(null)}p(Si())},e[8]=u==null?void 0:u.id,e[9]=M):M=e[9];const T=M;let j;e[10]!==(u==null?void 0:u.id)||e[11]!==h||e[12]!==o?(j=Q=>(S.current&&(clearTimeout(S.current),S.current=null),h&&(u==null?void 0:u.id)===Q?!1:(h&&_(!1),_(!0),S.current=setTimeout(()=>{Fm(Q);const te=o.find(X=>X.id===Q)||null;a(te),_(!1)},100),!0)),e[10]=u==null?void 0:u.id,e[11]=h,e[12]=o,e[13]=j):j=e[13];const O=j;let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{_(!1)},e[14]=I):I=e[14];const V=I;let U;e[15]===Symbol.for("react.memo_cache_sentinel")?(U=(Q,te,X,q)=>{Q5({serverId:Q,serverName:te,workspaceId:X,workspaceName:q}),p(Si())},e[15]=U):U=e[15];const W=U;let K;e[16]===Symbol.for("react.memo_cache_sentinel")?(K=Q=>{Z5(Q),p(Si())},e[16]=K):K=e[16];const G=K;let Z;e[17]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{J5(Q),p(Si())},e[17]=Z):Z=e[17];const ee=Z;let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=Q=>{eA(Q),p(Si())},e[18]=B):B=e[18];const L=B;let z;e[19]!==u||e[20]!==A||e[21]!==h||e[22]!==f||e[23]!==T||e[24]!==o||e[25]!==O?(z={servers:o,activeServer:u,quickConnections:f,isSwitching:h,isAddingServerRef:C,prepareForServerAdd:y,addServer:k,editServer:A,removeServer:T,switchServer:O,clearSwitchingState:V,addToQuickConnections:W,removeFromQuickConnections:G,removeFromQuickConnectionsByWorkspace:ee,reorderQuick:L},e[19]=u,e[20]=A,e[21]=h,e[22]=f,e[23]=T,e[24]=o,e[25]=O,e[26]=z):z=e[26];const H=z;let F;return e[27]!==n||e[28]!==H?(F=g.jsx(iS.Provider,{value:H,children:n}),e[27]=n,e[28]=H,e[29]=F):F=e[29],F},vc=()=>{const t=D.useContext(iS);if(t===null)throw new Error("useServerContext must be used within a ServerProvider");return t};function sS(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=sS(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function lh(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=sS(t))&&(i&&(i+=" "),i+=e);return i}const Uy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,$y=lh,_c=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return $y(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=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 _=Uy(p)||Uy(h);return o[f][_]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,_]=p;return _===void 0||(f[h]=_),f},{}),d=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:h,className:_,...S}=p;return Object.entries(S).every(C=>{let[w,v]=C;return Array.isArray(v)?v.includes({...l,...a}[w]):{...l,...a}[w]===v})?[...f,h,_]:f},[]);return $y(t,u,d,n==null?void 0:n.class,n==null?void 0:n.className)};var Yu=Hx();const rA=sh(Yu);function Vy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Os(...t){return e=>{let n=!1;const i=t.map(o=>{const l=Vy(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():Vy(t[o],null)}}}}function St(...t){return D.useCallback(Os(...t),t)}function Oo(t){const e=iA(t),n=D.forwardRef((i,o)=>{const{children:l,...u}=i,a=D.Children.toArray(l),d=a.find(oA);if(d){const f=d.props.children,p=a.map(h=>h===d?D.Children.count(f)>1?D.Children.only(null):D.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...u,ref:o,children:D.isValidElement(f)?D.cloneElement(f,void 0,p):null})}return g.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}var Xu=Oo("Slot");function iA(t){const e=D.forwardRef((n,i)=>{const{children:o,...l}=n;if(D.isValidElement(o)){const u=lA(o),a=aA(l,o.props);return o.type!==D.Fragment&&(a.ref=i?Os(i,u):u),D.cloneElement(o,a)}return D.Children.count(o)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var oS=Symbol("radix.slottable");function sA(t){const e=({children:n})=>g.jsx(g.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=oS,e}function oA(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===oS}function aA(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 d=l(...a);return o(...a),d}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function lA(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 cA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xe=cA.reduce((t,e)=>{const n=Oo(`Primitive.${e}`),i=D.forwardRef((o,l)=>{const{asChild:u,...a}=o,d=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...a,ref:l})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function aS(t,e){t&&Yu.flushSync(()=>t.dispatchEvent(e))}var lS=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"}),uA="VisuallyHidden",cS=D.forwardRef((t,e)=>g.jsx(Xe.span,{...t,ref:e,style:{...lS,...t.style}}));cS.displayName=uA;var dA=cS;function fA(t,e){const n=D.createContext(e),i=l=>{const{children:u,...a}=l,d=D.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:d,children:u})};i.displayName=t+"Provider";function o(l){const u=D.useContext(n);if(u)return u;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,u){const a=D.createContext(u),d=n.length;n=[...n,u];const f=h=>{var b;const{scope:_,children:S,...C}=h,w=((b=_==null?void 0:_[t])==null?void 0:b[d])||a,v=D.useMemo(()=>C,Object.values(C));return g.jsx(w.Provider,{value:v,children:S})};f.displayName=l+"Provider";function p(h,_){var w;const S=((w=_==null?void 0:_[t])==null?void 0:w[d])||a,C=D.useContext(S);if(C)return C;if(u!==void 0)return u;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(u=>D.createContext(u));return function(a){const d=(a==null?void 0:a[t])||l;return D.useMemo(()=>({[`__scope${t}`]:{...a,[t]:d}}),[a,d])}};return o.scopeName=t,[i,hA(o,...e)]}function hA(...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 u=i.reduce((a,{useScope:d,scopeName:f})=>{const h=d(l)[`__scope${f}`];return{...a,...h}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function d1(t){const e=t+"CollectionProvider",[n,i]=Ur(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:v,children:b}=w,y=ni.useRef(null),x=ni.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:x,collectionRef:y,children:b})};u.displayName=e;const a=t+"CollectionSlot",d=Oo(a),f=ni.forwardRef((w,v)=>{const{scope:b,children:y}=w,x=l(a,b),k=St(v,x.collectionRef);return g.jsx(d,{ref:k,children:y})});f.displayName=a;const p=t+"CollectionItemSlot",h="data-radix-collection-item",_=Oo(p),S=ni.forwardRef((w,v)=>{const{scope:b,children:y,...x}=w,k=ni.useRef(null),N=St(v,k),A=l(p,b);return ni.useEffect(()=>(A.itemMap.set(k,{ref:k,...x}),()=>void A.itemMap.delete(k))),g.jsx(_,{[h]:"",ref:N,children:y})});S.displayName=p;function C(w){const v=l(t+"CollectionConsumer",w);return ni.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((A,M)=>x.indexOf(A.ref.current)-x.indexOf(M.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:u,Slot:f,ItemSlot:S},C,i]}function Le(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 Rn=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},pA=Fx[" useInsertionEffect ".trim().toString()]||Rn;function Ls({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[o,l,u]=mA({defaultProp:e,onChange:n}),a=t!==void 0,d=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 _=gA(p)?p(t):p;_!==t&&((h=u.current)==null||h.call(u,_))}else l(p)},[a,t,l,u]);return[d,f]}function mA({defaultProp:t,onChange:e}){const[n,i]=D.useState(t),o=D.useRef(n),l=D.useRef(e);return pA(()=>{l.current=e},[e]),D.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,i,l]}function gA(t){return typeof t=="function"}function vA(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var Tn=t=>{const{present:e,children:n}=t,i=_A(e),o=typeof n=="function"?n({present:i.isPresent}):D.Children.only(n),l=St(i.ref,yA(o));return typeof n=="function"||i.isPresent?D.cloneElement(o,{ref:l}):null};Tn.displayName="Presence";function _A(t){const[e,n]=D.useState(),i=D.useRef(null),o=D.useRef(t),l=D.useRef("none"),u=t?"mounted":"unmounted",[a,d]=vA(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const f=gf(i.current);l.current=a==="mounted"?f:"none"},[a]),Rn(()=>{const f=i.current,p=o.current;if(p!==t){const _=l.current,S=gf(f);t?d("MOUNT"):S==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&_!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),Rn(()=>{var f;if(e){let p;const h=(f=e.ownerDocument.defaultView)!=null?f:window,_=C=>{const v=gf(i.current).includes(CSS.escape(C.animationName));if(C.target===e&&v&&(d("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=gf(i.current))};return e.addEventListener("animationstart",S),e.addEventListener("animationcancel",_),e.addEventListener("animationend",_),()=>{h.clearTimeout(p),e.removeEventListener("animationstart",S),e.removeEventListener("animationcancel",_),e.removeEventListener("animationend",_)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:D.useCallback(f=>{i.current=f?getComputedStyle(f):null,n(f)},[])}}function gf(t){return(t==null?void 0:t.animationName)||"none"}function yA(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 bA=Fx[" useId ".trim().toString()]||(()=>{}),xA=0;function kn(t){const[e,n]=D.useState(bA());return Rn(()=>{n(i=>i!=null?i:String(xA++))},[t]),e?`radix-${e}`:""}var ch="Collapsible",[SA]=Ur(ch),[wA,f1]=SA(ch),uS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:o,disabled:l,onOpenChange:u,...a}=t,[d,f]=Ls({prop:i,defaultProp:o!=null?o:!1,onChange:u,caller:ch});return g.jsx(wA,{scope:n,disabled:l,contentId:kn(),open:d,onOpenToggle:D.useCallback(()=>f(p=>!p),[f]),children:g.jsx(Xe.div,{"data-state":p1(d),"data-disabled":l?"":void 0,...a,ref:e})})});uS.displayName=ch;var dS="CollapsibleTrigger",fS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,o=f1(dS,n);return g.jsx(Xe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":p1(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:e,onClick:Le(t.onClick,o.onOpenToggle)})});fS.displayName=dS;var h1="CollapsibleContent",hS=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=f1(h1,t.__scopeCollapsible);return g.jsx(Tn,{present:n||o.open,children:({present:l})=>g.jsx(CA,{...i,ref:e,present:l})})});hS.displayName=h1;var CA=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:o,...l}=t,u=f1(h1,n),[a,d]=D.useState(i),f=D.useRef(null),p=St(e,f),h=D.useRef(0),_=h.current,S=D.useRef(0),C=S.current,w=u.open||a,v=D.useRef(w),b=D.useRef(void 0);return D.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Rn(()=>{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,v.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),d(i)}},[u.open,i]),g.jsx(Xe.div,{"data-state":p1(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...l,ref:p,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:w&&o})});function p1(t){return t?"open":"closed"}var kA=uS,EA=D.createContext(void 0);function Qu(t){const e=D.useContext(EA);return t||e||"ltr"}function Un(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 AA(t,e=globalThis==null?void 0:globalThis.document){const n=Un(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 RA="DismissableLayer",Ng="dismissableLayer.update",TA="dismissableLayer.pointerDownOutside",NA="dismissableLayer.focusOutside",qy,pS=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yc=D.forwardRef((t,e)=>{var M;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:a,...d}=t,f=D.useContext(pS),[p,h]=D.useState(null),_=(M=p==null?void 0:p.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,S]=D.useState({}),C=St(e,T=>h(T)),w=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(v),y=p?w.indexOf(p):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=y>=b,N=jA(T=>{const j=T.target,O=[...f.branches].some(I=>I.contains(j));!k||O||(o==null||o(T),u==null||u(T),T.defaultPrevented||a==null||a())},_),A=OA(T=>{const j=T.target;[...f.branches].some(I=>I.contains(j))||(l==null||l(T),u==null||u(T),T.defaultPrevented||a==null||a())},_);return AA(T=>{y===f.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},_),D.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qy=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Wy(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=qy)}},[p,_,n,f]),D.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Wy())},[p,f]),D.useEffect(()=>{const T=()=>S({});return document.addEventListener(Ng,T),()=>document.removeEventListener(Ng,T)},[]),g.jsx(Xe.div,{...d,ref:C,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Le(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Le(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Le(t.onPointerDownCapture,N.onPointerDownCapture)})});yc.displayName=RA;var DA="DismissableLayerBranch",MA=D.forwardRef((t,e)=>{const n=D.useContext(pS),i=D.useRef(null),o=St(e,i);return D.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),g.jsx(Xe.div,{...t,ref:o})});MA.displayName=DA;function jA(t,e=globalThis==null?void 0:globalThis.document){const n=Un(t),i=D.useRef(!1),o=D.useRef(()=>{});return D.useEffect(()=>{const l=a=>{if(a.target&&!i.current){let d=function(){mS(TA,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=d,e.addEventListener("click",o.current,{once:!0})):d()}else e.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function OA(t,e=globalThis==null?void 0:globalThis.document){const n=Un(t),i=D.useRef(!1);return D.useEffect(()=>{const o=l=>{l.target&&!i.current&&mS(NA,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 Wy(){const t=new CustomEvent(Ng);document.dispatchEvent(t)}function mS(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?aS(o,l):o.dispatchEvent(l)}var Hm="focusScope.autoFocusOnMount",Um="focusScope.autoFocusOnUnmount",Gy={bubbles:!1,cancelable:!0},LA="FocusScope",Zu=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=t,[a,d]=D.useState(null),f=Un(o),p=Un(l),h=D.useRef(null),_=St(e,w=>d(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:jo(h.current,{select:!0})},v=function(x){if(S.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||jo(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const N of x)N.removedNodes.length>0&&jo(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",v);const y=new MutationObserver(b);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",v),y.disconnect()}}},[i,a,S.paused]),D.useEffect(()=>{if(a){Yy.add(S);const w=document.activeElement;if(!a.contains(w)){const b=new CustomEvent(Hm,Gy);a.addEventListener(Hm,f),a.dispatchEvent(b),b.defaultPrevented||(IA(HA(gS(a)),{select:!0}),document.activeElement===w&&jo(a))}return()=>{a.removeEventListener(Hm,f),setTimeout(()=>{const b=new CustomEvent(Um,Gy);a.addEventListener(Um,p),a.dispatchEvent(b),b.defaultPrevented||jo(w!=null?w:document.body,{select:!0}),a.removeEventListener(Um,p),Yy.remove(S)},0)}}},[a,f,p,S]);const C=D.useCallback(w=>{if(!n&&!i||S.paused)return;const v=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,b=document.activeElement;if(v&&b){const y=w.currentTarget,[x,k]=zA(y);x&&k?!w.shiftKey&&b===k?(w.preventDefault(),n&&jo(x,{select:!0})):w.shiftKey&&b===x&&(w.preventDefault(),n&&jo(k,{select:!0})):b===y&&w.preventDefault()}},[n,i,S.paused]);return g.jsx(Xe.div,{tabIndex:-1,...u,ref:_,onKeyDown:C})});Zu.displayName=LA;function IA(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(jo(i,{select:e}),document.activeElement!==n)return}function zA(t){const e=gS(t),n=Ky(e,t),i=Ky(e.reverse(),t);return[n,i]}function gS(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 Ky(t,e){for(const n of t)if(!BA(n,{upTo:e}))return n}function BA(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 PA(t){return t instanceof HTMLInputElement&&"select"in t}function jo(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&PA(t)&&e&&t.select()}}var Yy=FA();function FA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Xy(t,e),t.unshift(e)},remove(e){var n;t=Xy(t,e),(n=t[0])==null||n.resume()}}}function Xy(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function HA(t){return t.filter(e=>e.tagName!=="A")}var UA="Portal",bc=D.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[o,l]=D.useState(!1);Rn(()=>l(!0),[]);const u=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return u?rA.createPortal(g.jsx(Xe.div,{...i,ref:e}),u):null});bc.displayName=UA;var $m=0;function uh(){D.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!=null?e:Qy()),document.body.insertAdjacentElement("beforeend",(n=t[1])!=null?n:Qy()),$m++,()=>{$m===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),$m--}},[])}function Qy(){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 Gi=function(){return Gi=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},Gi.apply(this,arguments)};function vS(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 $A(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 Tf="right-scroll-bar-position",Nf="width-before-scroll-bar",VA="with-scroll-bars-hidden",qA="--removed-body-scroll-bar-size";function Vm(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function WA(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 GA=typeof window<"u"?D.useLayoutEffect:D.useEffect,Zy=new WeakMap;function KA(t,e){var n=WA(null,function(i){return t.forEach(function(o){return Vm(o,i)})});return GA(function(){var i=Zy.get(n);if(i){var o=new Set(i),l=new Set(t),u=n.current;o.forEach(function(a){l.has(a)||Vm(a,null)}),l.forEach(function(a){o.has(a)||Vm(a,u)})}Zy.set(n,t)},[t]),n}function YA(t){return t}function XA(t,e){e===void 0&&(e=YA);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 u=e(l,i);return n.push(u),function(){n=n.filter(function(a){return a!==u})}},assignSyncMedium:function(l){for(i=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(a){return l(a)},filter:function(){return n}}},assignMedium:function(l){i=!0;var u=[];if(n.length){var a=n;n=[],a.forEach(l),u=n}var d=function(){var p=u;u=[],p.forEach(l)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){u.push(p),f()},filter:function(p){return u=u.filter(p),n}}}};return o}function QA(t){t===void 0&&(t={});var e=XA(null);return e.options=Gi({async:!0,ssr:!1},t),e}var _S=function(t){var e=t.sideCar,n=vS(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,Gi({},n))};_S.isSideCarExport=!0;function ZA(t,e){return t.useMedium(e),_S}var yS=QA(),qm=function(){},dh=D.forwardRef(function(t,e){var n=D.useRef(null),i=D.useState({onScrollCapture:qm,onWheelCapture:qm,onTouchMoveCapture:qm}),o=i[0],l=i[1],u=t.forwardProps,a=t.children,d=t.className,f=t.removeScrollBar,p=t.enabled,h=t.shards,_=t.sideCar,S=t.noRelative,C=t.noIsolation,w=t.inert,v=t.allowPinchZoom,b=t.as,y=b===void 0?"div":b,x=t.gapMode,k=vS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=_,A=KA([n,e]),M=Gi(Gi({},k),o);return D.createElement(D.Fragment,null,p&&D.createElement(N,{sideCar:yS,removeScrollBar:f,shards:h,noRelative:S,noIsolation:C,inert:w,setCallbacks:l,allowPinchZoom:!!v,lockRef:n,gapMode:x}),u?D.cloneElement(D.Children.only(a),Gi(Gi({},M),{ref:A})):D.createElement(y,Gi({},M,{className:d,ref:A}),a))});dh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dh.classNames={fullWidth:Nf,zeroRight:Tf};var JA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eR(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=JA();return e&&t.setAttribute("nonce",e),t}function tR(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function nR(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var rR=function(){var t=0,e=null;return{add:function(n){t==0&&(e=eR())&&(tR(e,n),nR(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},iR=function(){var t=rR();return function(e,n){D.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},bS=function(){var t=iR(),e=function(n){var i=n.styles,o=n.dynamic;return t(i,o),null};return e},sR={left:0,top:0,right:0,gap:0},Wm=function(t){return parseInt(t||"",10)||0},oR=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[Wm(n),Wm(i),Wm(o)]},aR=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return sR;var e=oR(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])}},lR=bS(),rc="data-scroll-locked",cR=function(t,e,n,i){var o=t.left,l=t.top,u=t.right,a=t.gap;return n===void 0&&(n="margin"),`
463
+ .`.concat(VA,` {
464
+ overflow: hidden `).concat(i,`;
465
+ padding-right: `).concat(a,"px ").concat(i,`;
466
+ }
467
+ body[`).concat(rc,`] {
468
+ overflow: hidden `).concat(i,`;
469
+ overscroll-behavior: contain;
470
+ `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
471
+ padding-left: `.concat(o,`px;
472
+ padding-top: `).concat(l,`px;
473
+ padding-right: `).concat(u,`px;
474
+ margin-left:0;
475
+ margin-top:0;
476
+ margin-right: `).concat(a,"px ").concat(i,`;
477
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
478
+ }
479
+
480
+ .`).concat(Tf,` {
481
+ right: `).concat(a,"px ").concat(i,`;
482
+ }
483
+
484
+ .`).concat(Nf,` {
485
+ margin-right: `).concat(a,"px ").concat(i,`;
486
+ }
487
+
488
+ .`).concat(Tf," .").concat(Tf,` {
489
+ right: 0 `).concat(i,`;
490
+ }
491
+
492
+ .`).concat(Nf," .").concat(Nf,` {
493
+ margin-right: 0 `).concat(i,`;
494
+ }
495
+
496
+ body[`).concat(rc,`] {
497
+ `).concat(qA,": ").concat(a,`px;
498
+ }
499
+ `)},Jy=function(){var t=parseInt(document.body.getAttribute(rc)||"0",10);return isFinite(t)?t:0},uR=function(){D.useEffect(function(){return document.body.setAttribute(rc,(Jy()+1).toString()),function(){var t=Jy()-1;t<=0?document.body.removeAttribute(rc):document.body.setAttribute(rc,t.toString())}},[])},dR=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,o=i===void 0?"margin":i;uR();var l=D.useMemo(function(){return aR(o)},[o]);return D.createElement(lR,{styles:cR(l,!e,o,n?"":"!important")})},Dg=!1;if(typeof window<"u")try{var vf=Object.defineProperty({},"passive",{get:function(){return Dg=!0,!0}});window.addEventListener("test",vf,vf),window.removeEventListener("test",vf,vf)}catch{Dg=!1}var Kl=Dg?{passive:!1}:!1,fR=function(t){return t.tagName==="TEXTAREA"},xS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!fR(t)&&n[e]==="visible")},hR=function(t){return xS(t,"overflowY")},pR=function(t){return xS(t,"overflowX")},eb=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=SS(t,i);if(o){var l=wS(t,i),u=l[1],a=l[2];if(u>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},mR=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},gR=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},SS=function(t,e){return t==="v"?hR(e):pR(e)},wS=function(t,e){return t==="v"?mR(e):gR(e)},vR=function(t,e){return t==="h"&&e==="rtl"?-1:1},_R=function(t,e,n,i,o){var l=vR(t,window.getComputedStyle(e).direction),u=l*i,a=n.target,d=e.contains(a),f=!1,p=u>0,h=0,_=0;do{if(!a)break;var S=wS(t,a),C=S[0],w=S[1],v=S[2],b=w-v-l*C;(C||b)&&SS(t,a)&&(h+=b,_+=C);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&a!==document.body||d&&(e.contains(a)||e===a));return(p&&Math.abs(h)<1||!p&&Math.abs(_)<1)&&(f=!0),f},_f=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},tb=function(t){return[t.deltaX,t.deltaY]},nb=function(t){return t&&"current"in t?t.current:t},yR=function(t,e){return t[0]===e[0]&&t[1]===e[1]},bR=function(t){return`
500
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
501
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
502
+ `)},xR=0,Yl=[];function SR(t){var e=D.useRef([]),n=D.useRef([0,0]),i=D.useRef(),o=D.useState(xR++)[0],l=D.useState(bS)[0],u=D.useRef(t);D.useEffect(function(){u.current=t},[t]),D.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var w=$A([t.lockRef.current],(t.shards||[]).map(nb),!0).filter(Boolean);return w.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=D.useCallback(function(w,v){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var b=_f(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 I=eb(M,A);if(!I)return!0;if(I?N=M:(N=M==="v"?"h":"v",I=eb(M,A)),!I)return!1;if(!i.current&&"changedTouches"in w&&(x||k)&&(i.current=N),!N)return!0;var V=i.current||N;return _R(V,v,w,V==="h"?x:k)},[]),d=D.useCallback(function(w){var v=w;if(!(!Yl.length||Yl[Yl.length-1]!==l)){var b="deltaY"in v?tb(v):_f(v),y=e.current.filter(function(N){return N.name===v.type&&(N.target===v.target||v.target===N.shadowParent)&&yR(N.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(u.current.shards||[]).map(nb).filter(Boolean).filter(function(N){return N.contains(v.target)}),k=x.length>0?a(v,x[0]):!u.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),f=D.useCallback(function(w,v,b,y){var x={name:w,delta:v,target:b,should:y,shadowParent:wR(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=_f(w),i.current=void 0},[]),h=D.useCallback(function(w){f(w.type,tb(w),w.target,a(w,t.lockRef.current))},[]),_=D.useCallback(function(w){f(w.type,_f(w),w.target,a(w,t.lockRef.current))},[]);D.useEffect(function(){return Yl.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:_}),document.addEventListener("wheel",d,Kl),document.addEventListener("touchmove",d,Kl),document.addEventListener("touchstart",p,Kl),function(){Yl=Yl.filter(function(w){return w!==l}),document.removeEventListener("wheel",d,Kl),document.removeEventListener("touchmove",d,Kl),document.removeEventListener("touchstart",p,Kl)}},[]);var S=t.removeScrollBar,C=t.inert;return D.createElement(D.Fragment,null,C?D.createElement(l,{styles:bR(o)}):null,S?D.createElement(dR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function wR(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const CR=ZA(yS,SR);var Ju=D.forwardRef(function(t,e){return D.createElement(dh,Gi({},t,{ref:e,sideCar:CR}))});Ju.classNames=dh.classNames;var kR=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Xl=new WeakMap,yf=new WeakMap,bf={},Gm=0,CS=function(t){return t&&(t.host||CS(t.parentNode))},ER=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=CS(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})},AR=function(t,e,n,i){var o=ER(e,Array.isArray(t)?t:[t]);bf[n]||(bf[n]=new WeakMap);var l=bf[n],u=[],a=new Set,d=new Set(o),f=function(h){!h||a.has(h)||(a.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(_){if(a.has(_))p(_);else try{var S=_.getAttribute(i),C=S!==null&&S!=="false",w=(Xl.get(_)||0)+1,v=(l.get(_)||0)+1;Xl.set(_,w),l.set(_,v),u.push(_),w===1&&C&&yf.set(_,!0),v===1&&_.setAttribute(n,"true"),C||_.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",_,b)}})};return p(e),a.clear(),Gm++,function(){u.forEach(function(h){var _=Xl.get(h)-1,S=l.get(h)-1;Xl.set(h,_),l.set(h,S),_||(yf.has(h)||h.removeAttribute(i),yf.delete(h)),S||h.removeAttribute(n)}),Gm--,Gm||(Xl=new WeakMap,Xl=new WeakMap,yf=new WeakMap,bf={})}},fh=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),o=kR(t);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),AR(i,o,n,"aria-hidden")):function(){return null}},hh="Dialog",[kS]=Ur(hh),[RR,Ai]=kS(hh),ES=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!0}=t,a=D.useRef(null),d=D.useRef(null),[f,p]=Ls({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:hh});return g.jsx(RR,{scope:e,triggerRef:a,contentRef:d,contentId:kn(),titleId:kn(),descriptionId:kn(),open:f,onOpenChange:p,onOpenToggle:D.useCallback(()=>p(h=>!h),[p]),modal:u,children:n})};ES.displayName=hh;var AS="DialogTrigger",RS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ai(AS,n),l=St(e,o.triggerRef);return g.jsx(Xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":v1(o.open),...i,ref:l,onClick:Le(t.onClick,o.onOpenToggle)})});RS.displayName=AS;var m1="DialogPortal",[TR,TS]=kS(m1,{forceMount:void 0}),NS=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:o}=t,l=Ai(m1,e);return g.jsx(TR,{scope:e,forceMount:n,children:D.Children.map(i,u=>g.jsx(Tn,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:u})}))})};NS.displayName=m1;var zf="DialogOverlay",DS=D.forwardRef((t,e)=>{const n=TS(zf,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=Ai(zf,t.__scopeDialog);return l.modal?g.jsx(Tn,{present:i||l.open,children:g.jsx(DR,{...o,ref:e})}):null});DS.displayName=zf;var NR=Oo("DialogOverlay.RemoveScroll"),DR=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ai(zf,n);return g.jsx(Ju,{as:NR,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Xe.div,{"data-state":v1(o.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),za="DialogContent",MS=D.forwardRef((t,e)=>{const n=TS(za,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=Ai(za,t.__scopeDialog);return g.jsx(Tn,{present:i||l.open,children:l.modal?g.jsx(MR,{...o,ref:e}):g.jsx(jR,{...o,ref:e})})});MS.displayName=za;var MR=D.forwardRef((t,e)=>{const n=Ai(za,t.__scopeDialog),i=D.useRef(null),o=St(e,n.contentRef,i);return D.useEffect(()=>{const l=i.current;if(l)return fh(l)},[]),g.jsx(jS,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(t.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Le(t.onPointerDownOutside,l=>{const u=l.detail.originalEvent,a=u.button===0&&u.ctrlKey===!0;(u.button===2||a)&&l.preventDefault()}),onFocusOutside:Le(t.onFocusOutside,l=>l.preventDefault())})}),jR=D.forwardRef((t,e)=>{const n=Ai(za,t.__scopeDialog),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(jS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,a;(u=t.onCloseAutoFocus)==null||u.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 d,f;(d=t.onInteractOutside)==null||d.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),jS=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=t,a=Ai(za,n),d=D.useRef(null),f=St(e,d);return uh(),g.jsxs(g.Fragment,{children:[g.jsx(Zu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(yc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":v1(a.open),...u,ref:f,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(OR,{titleId:a.titleId}),g.jsx(IR,{contentRef:d,descriptionId:a.descriptionId})]})]})}),g1="DialogTitle",OS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ai(g1,n);return g.jsx(Xe.h2,{id:o.titleId,...i,ref:e})});OS.displayName=g1;var LS="DialogDescription",IS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ai(LS,n);return g.jsx(Xe.p,{id:o.descriptionId,...i,ref:e})});IS.displayName=LS;var zS="DialogClose",BS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ai(zS,n);return g.jsx(Xe.button,{type:"button",...i,ref:e,onClick:Le(t.onClick,()=>o.onOpenChange(!1))})});BS.displayName=zS;function v1(t){return t?"open":"closed"}var PS="DialogTitleWarning",[sU,FS]=fA(PS,{contentName:za,titleName:g1,docsSlug:"dialog"}),OR=({titleId:t})=>{const e=FS(PS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
503
+
504
+ If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
505
+
506
+ 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},LR="DialogDescriptionWarning",IR=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${FS(LR).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},_1=ES,zR=RS,y1=NS,b1=DS,x1=MS,HS=OS,US=IS,ph=BS;function BR(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 PR(t){const[e,n]=D.useState(void 0);return Rn(()=>{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 u,a;if("borderBoxSize"in l){const d=l.borderBoxSize,f=Array.isArray(d)?d[0]:d;u=f.inlineSize,a=f.blockSize}else u=t.offsetWidth,a=t.offsetHeight;n({width:u,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}const FR=["top","right","bottom","left"],Lo=Math.min,zr=Math.max,Bf=Math.round,xf=Math.floor,Xi=t=>({x:t,y:t}),HR={left:"right",right:"left",bottom:"top",top:"bottom"};function Mg(t,e,n){return zr(t,Lo(e,n))}function Is(t,e){return typeof t=="function"?t(e):t}function zs(t){return t.split("-")[0]}function xc(t){return t.split("-")[1]}function S1(t){return t==="x"?"y":"x"}function w1(t){return t==="y"?"height":"width"}function Ki(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function C1(t){return S1(Ki(t))}function UR(t,e,n){n===void 0&&(n=!1);const i=xc(t),o=C1(t),l=w1(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=Pf(u)),[u,Pf(u)]}function $R(t){const e=Pf(t);return[jg(t),e,jg(e)]}function jg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const rb=["left","right"],ib=["right","left"],VR=["top","bottom"],qR=["bottom","top"];function WR(t,e,n){switch(t){case"top":case"bottom":return n?e?ib:rb:e?rb:ib;case"left":case"right":return e?VR:qR;default:return[]}}function GR(t,e,n,i){const o=xc(t);let l=WR(zs(t),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),e&&(l=l.concat(l.map(jg)))),l}function Pf(t){const e=zs(t);return HR[e]+t.slice(e.length)}function KR(t){return{top:0,right:0,bottom:0,left:0,...t}}function $S(t){return typeof t!="number"?KR(t):{top:t,right:t,bottom:t,left:t}}function Ff(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 sb(t,e,n){let{reference:i,floating:o}=t;const l=Ki(e),u=C1(e),a=w1(u),d=zs(e),f=l==="y",p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,_=i[a]/2-o[a]/2;let S;switch(d){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(xc(e)){case"start":S[u]-=_*(n&&f?-1:1);break;case"end":S[u]+=_*(n&&f?-1:1);break}return S}async function YR(t,e){var n;e===void 0&&(e={});const{x:i,y:o,platform:l,rects:u,elements:a,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:_=!1,padding:S=0}=Is(e,t),C=$S(S),v=a[_?h==="floating"?"reference":"floating":h],b=Ff(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(v)))==null||n?v:v.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:d})),y=h==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.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=Ff(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:d}):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 XR=50,QR=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,a=u.detectOverflow?u:{...u,detectOverflow:YR},d=await(u.isRTL==null?void 0:u.isRTL(e));let f=await u.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:h}=sb(f,i,d),_=i,S=0;const C={};for(let w=0;w<l.length;w++){const v=l[w];if(!v)continue;const{name:b,fn:y}=v,{x,y:k,data:N,reset:A}=await y({x:p,y:h,initialPlacement:i,placement:_,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<XR&&(S++,typeof A=="object"&&(A.placement&&(_=A.placement),A.rects&&(f=A.rects===!0?await u.getElementRects({reference:t,floating:e,strategy:o}):A.rects),{x:p,y:h}=sb(f,_,d)),w=-1)}return{x:p,y:h,placement:_,strategy:o,middlewareData:C}},ZR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:l,platform:u,elements:a,middlewareData:d}=e,{element:f,padding:p=0}=Is(t,e)||{};if(f==null)return{};const h=$S(p),_={x:n,y:i},S=C1(o),C=w1(S),w=await u.getDimensions(f),v=S==="y",b=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",k=l.reference[C]+l.reference[S]-_[S]-l.floating[C],N=_[S]-l.reference[S],A=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f));let M=A?A[x]:0;(!M||!await(u.isElement==null?void 0:u.isElement(A)))&&(M=a.floating[x]||l.floating[C]);const T=k/2-N/2,j=M/2-w[C]/2-1,O=Lo(h[b],j),I=Lo(h[y],j),V=O,U=M-w[C]-I,W=M/2-w[C]/2+T,K=Mg(V,W,U),G=!d.arrow&&xc(o)!=null&&W!==K&&l.reference[C]/2-(W<V?O:I)-w[C]/2<0,Z=G?W<V?W-V:W-U:0;return{[S]:_[S]+Z,data:{[S]:K,centerOffset:W-K-Z,...G&&{alignmentOffset:Z}},reset:G}}}),JR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:a,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:_,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,...v}=Is(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const b=zs(o),y=Ki(a),x=zs(a)===a,k=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=_||(x||!w?[Pf(a)]:$R(a)),A=C!=="none";!_&&A&&N.push(...GR(a,w,C,k));const M=[a,...N],T=await d.detectOverflow(e,v),j=[];let O=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&j.push(T[b]),h){const W=UR(o,u,k);j.push(T[W[0]],T[W[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(W=>W<=0)){var I,V;const W=(((I=l.flip)==null?void 0:I.index)||0)+1,K=M[W];if(K&&(!(h==="alignment"?y!==Ki(K):!1)||O.every(ee=>Ki(ee.placement)===y?ee.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:K}};let G=(V=O.filter(Z=>Z.overflows[0]<=0).sort((Z,ee)=>Z.overflows[1]-ee.overflows[1])[0])==null?void 0:V.placement;if(!G)switch(S){case"bestFit":{var U;const Z=(U=O.filter(ee=>{if(A){const B=Ki(ee.placement);return B===y||B==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((ee,B)=>ee[1]-B[1])[0])==null?void 0:U[0];Z&&(G=Z);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function ob(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ab(t){return FR.some(e=>t[e]>=0)}const eT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:o="referenceHidden",...l}=Is(t,e);switch(o){case"referenceHidden":{const u=await i.detectOverflow(e,{...l,elementContext:"reference"}),a=ob(u,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ab(a)}}}case"escaped":{const u=await i.detectOverflow(e,{...l,altBoundary:!0}),a=ob(u,n.floating);return{data:{escapedOffsets:a,escaped:ab(a)}}}default:return{}}}}},VS=new Set(["left","top"]);async function tT(t,e){const{placement:n,platform:i,elements:o}=t,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=zs(n),a=xc(n),d=Ki(n)==="y",f=VS.has(u)?-1:1,p=l&&d?-1:1,h=Is(e,t);let{mainAxis:_,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),d?{x:S*p,y:_*f}:{x:_*f,y:S*p}}const nT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:l,placement:u,middlewareData:a}=e,d=await tT(e,t);return u===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+d.x,y:l+d.y,data:{...d,placement:u}}}}},rT=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:u=!0,crossAxis:a=!1,limiter:d={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...f}=Is(t,e),p={x:n,y:i},h=await l.detectOverflow(e,f),_=Ki(zs(o)),S=S1(_);let C=p[S],w=p[_];if(u){const b=S==="y"?"top":"left",y=S==="y"?"bottom":"right",x=C+h[b],k=C-h[y];C=Mg(x,C,k)}if(a){const b=_==="y"?"top":"left",y=_==="y"?"bottom":"right",x=w+h[b],k=w-h[y];w=Mg(x,w,k)}const v=d.fn({...e,[S]:C,[_]:w});return{...v,data:{x:v.x-n,y:v.y-i,enabled:{[S]:u,[_]:a}}}}}},iT=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=e,{offset:a=0,mainAxis:d=!0,crossAxis:f=!0}=Is(t,e),p={x:n,y:i},h=Ki(o),_=S1(h);let S=p[_],C=p[h];const w=Is(a,e),v=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const x=_==="y"?"height":"width",k=l.reference[_]-l.floating[x]+v.mainAxis,N=l.reference[_]+l.reference[x]-v.mainAxis;S<k?S=k:S>N&&(S=N)}if(f){var b,y;const x=_==="y"?"width":"height",k=VS.has(zs(o)),N=l.reference[h]-l.floating[x]+(k&&((b=u.offset)==null?void 0:b[h])||0)+(k?0:v.crossAxis),A=l.reference[h]+l.reference[x]+(k?0:((y=u.offset)==null?void 0:y[h])||0)-(k?v.crossAxis:0);C<N?C=N:C>A&&(C=A)}return{[_]:S,[h]:C}}}},sT=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:l,platform:u,elements:a}=e,{apply:d=()=>{},...f}=Is(t,e),p=await u.detectOverflow(e,f),h=zs(o),_=xc(o),S=Ki(o)==="y",{width:C,height:w}=l.floating;let v,b;h==="top"||h==="bottom"?(v=h,b=_===(await(u.isRTL==null?void 0:u.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=Lo(w-p[v],y),N=Lo(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&&!_){const O=zr(p.left,0),I=zr(p.right,0),V=zr(p.top,0),U=zr(p.bottom,0);S?T=C-2*(O!==0||I!==0?O+I:zr(p.left,p.right)):M=w-2*(V!==0||U!==0?V+U:zr(p.top,p.bottom))}await d({...e,availableWidth:T,availableHeight:M});const j=await u.getDimensions(a.floating);return C!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function mh(){return typeof window<"u"}function Sc(t){return qS(t)?(t.nodeName||"").toLowerCase():"#document"}function Fr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zi(t){var e;return(e=(qS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qS(t){return mh()?t instanceof Node||t instanceof Fr(t).Node:!1}function ki(t){return mh()?t instanceof Element||t instanceof Fr(t).Element:!1}function Bs(t){return mh()?t instanceof HTMLElement||t instanceof Fr(t).HTMLElement:!1}function lb(t){return!mh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fr(t).ShadowRoot}function ed(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=Ei(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function oT(t){return/^(table|td|th)$/.test(Sc(t))}function gh(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const aT=/transform|translate|scale|rotate|perspective|filter/,lT=/paint|layout|strict|content/,Da=t=>!!t&&t!=="none";let Km;function k1(t){const e=ki(t)?Ei(t):t;return Da(e.transform)||Da(e.translate)||Da(e.scale)||Da(e.rotate)||Da(e.perspective)||!E1()&&(Da(e.backdropFilter)||Da(e.filter))||aT.test(e.willChange||"")||lT.test(e.contain||"")}function cT(t){let e=Io(t);for(;Bs(e)&&!lc(e);){if(k1(e))return e;if(gh(e))return null;e=Io(e)}return null}function E1(){return Km==null&&(Km=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Km}function lc(t){return/^(html|body|#document)$/.test(Sc(t))}function Ei(t){return Fr(t).getComputedStyle(t)}function vh(t){return ki(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Io(t){if(Sc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||lb(t)&&t.host||Zi(t);return lb(e)?e.host:e}function WS(t){const e=Io(t);return lc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Bs(e)&&ed(e)?e:WS(e)}function zu(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=WS(t),l=o===((i=t.ownerDocument)==null?void 0:i.body),u=Fr(o);if(l){const a=Og(u);return e.concat(u,u.visualViewport||[],ed(o)?o:[],a&&n?zu(a):[])}else return e.concat(o,zu(o,[],n))}function Og(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function GS(t){const e=Ei(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=Bs(t),l=o?t.offsetWidth:n,u=o?t.offsetHeight:i,a=Bf(n)!==l||Bf(i)!==u;return a&&(n=l,i=u),{width:n,height:i,$:a}}function A1(t){return ki(t)?t:t.contextElement}function ic(t){const e=A1(t);if(!Bs(e))return Xi(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:l}=GS(e);let u=(l?Bf(n.width):n.width)/i,a=(l?Bf(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!a||!Number.isFinite(a))&&(a=1),{x:u,y:a}}const uT=Xi(0);function KS(t){const e=Fr(t);return!E1()||!e.visualViewport?uT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function dT(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Fr(t)?!1:e}function Ba(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=A1(t);let u=Xi(1);e&&(i?ki(i)&&(u=ic(i)):u=ic(t));const a=dT(l,n,i)?KS(l):Xi(0);let d=(o.left+a.x)/u.x,f=(o.top+a.y)/u.y,p=o.width/u.x,h=o.height/u.y;if(l){const _=Fr(l),S=i&&ki(i)?Fr(i):i;let C=_,w=Og(C);for(;w&&i&&S!==C;){const v=ic(w),b=w.getBoundingClientRect(),y=Ei(w),x=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*v.x,k=b.top+(w.clientTop+parseFloat(y.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,h*=v.y,d+=x,f+=k,C=Fr(w),w=Og(C)}}return Ff({width:p,height:h,x:d,y:f})}function _h(t,e){const n=vh(t).scrollLeft;return e?e.left+n:Ba(Zi(t)).left+n}function YS(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-_h(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function fT(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const l=o==="fixed",u=Zi(i),a=e?gh(e.floating):!1;if(i===u||a&&l)return n;let d={scrollLeft:0,scrollTop:0},f=Xi(1);const p=Xi(0),h=Bs(i);if((h||!h&&!l)&&((Sc(i)!=="body"||ed(u))&&(d=vh(i)),h)){const S=Ba(i);f=ic(i),p.x=S.x+i.clientLeft,p.y=S.y+i.clientTop}const _=u&&!h&&!l?YS(u,d):Xi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+_.x,y:n.y*f.y-d.scrollTop*f.y+p.y+_.y}}function hT(t){return Array.from(t.getClientRects())}function pT(t){const e=Zi(t),n=vh(t),i=t.ownerDocument.body,o=zr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),l=zr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+_h(t);const a=-n.scrollTop;return Ei(i).direction==="rtl"&&(u+=zr(e.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:a}}const cb=25;function mT(t,e){const n=Fr(t),i=Zi(t),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,a=0,d=0;if(o){l=o.width,u=o.height;const p=E1();(!p||p&&e==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const f=_h(i);if(f<=0){const p=i.ownerDocument,h=p.body,_=getComputedStyle(h),S=p.compatMode==="CSS1Compat"&&parseFloat(_.marginLeft)+parseFloat(_.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-S);C<=cb&&(l-=C)}else f<=cb&&(l+=f);return{width:l,height:u,x:a,y:d}}function gT(t,e){const n=Ba(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,l=Bs(t)?ic(t):Xi(1),u=t.clientWidth*l.x,a=t.clientHeight*l.y,d=o*l.x,f=i*l.y;return{width:u,height:a,x:d,y:f}}function ub(t,e,n){let i;if(e==="viewport")i=mT(t,n);else if(e==="document")i=pT(Zi(t));else if(ki(e))i=gT(e,n);else{const o=KS(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Ff(i)}function XS(t,e){const n=Io(t);return n===e||!ki(n)||lc(n)?!1:Ei(n).position==="fixed"||XS(n,e)}function vT(t,e){const n=e.get(t);if(n)return n;let i=zu(t,[],!1).filter(a=>ki(a)&&Sc(a)!=="body"),o=null;const l=Ei(t).position==="fixed";let u=l?Io(t):t;for(;ki(u)&&!lc(u);){const a=Ei(u),d=k1(u);!d&&a.position==="fixed"&&(o=null),(l?!d&&!o:!d&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ed(u)&&!d&&XS(t,u))?i=i.filter(p=>p!==u):o=a,u=Io(u)}return e.set(t,i),i}function _T(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const u=[...n==="clippingAncestors"?gh(e)?[]:vT(e,this._c):[].concat(n),i],a=ub(e,u[0],o);let d=a.top,f=a.right,p=a.bottom,h=a.left;for(let _=1;_<u.length;_++){const S=ub(e,u[_],o);d=zr(S.top,d),f=Lo(S.right,f),p=Lo(S.bottom,p),h=zr(S.left,h)}return{width:f-h,height:p-d,x:h,y:d}}function yT(t){const{width:e,height:n}=GS(t);return{width:e,height:n}}function bT(t,e,n){const i=Bs(e),o=Zi(e),l=n==="fixed",u=Ba(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const d=Xi(0);function f(){d.x=_h(o)}if(i||!i&&!l)if((Sc(e)!=="body"||ed(o))&&(a=vh(e)),i){const S=Ba(e,!0,l,e);d.x=S.x+e.clientLeft,d.y=S.y+e.clientTop}else o&&f();l&&!i&&o&&f();const p=o&&!i&&!l?YS(o,a):Xi(0),h=u.left+a.scrollLeft-d.x-p.x,_=u.top+a.scrollTop-d.y-p.y;return{x:h,y:_,width:u.width,height:u.height}}function Ym(t){return Ei(t).position==="static"}function db(t,e){if(!Bs(t)||Ei(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Zi(t)===n&&(n=n.ownerDocument.body),n}function QS(t,e){const n=Fr(t);if(gh(t))return n;if(!Bs(t)){let o=Io(t);for(;o&&!lc(o);){if(ki(o)&&!Ym(o))return o;o=Io(o)}return n}let i=db(t,e);for(;i&&oT(i)&&Ym(i);)i=db(i,e);return i&&lc(i)&&Ym(i)&&!k1(i)?n:i||cT(t)||n}const xT=async function(t){const e=this.getOffsetParent||QS,n=this.getDimensions,i=await n(t.floating);return{reference:bT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ST(t){return Ei(t).direction==="rtl"}const wT={convertOffsetParentRelativeRectToViewportRelativeRect:fT,getDocumentElement:Zi,getClippingRect:_T,getOffsetParent:QS,getElementRects:xT,getClientRects:hT,getDimensions:yT,getScale:ic,isElement:ki,isRTL:ST};function ZS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function CT(t,e){let n=null,i;const o=Zi(t);function l(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function u(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),l();const f=t.getBoundingClientRect(),{left:p,top:h,width:_,height:S}=f;if(a||e(),!_||!S)return;const C=xf(h),w=xf(o.clientWidth-(p+_)),v=xf(o.clientHeight-(h+S)),b=xf(p),x={rootMargin:-C+"px "+-w+"px "+-v+"px "+-b+"px",threshold:zr(0,Lo(1,d))||1};let k=!0;function N(A){const M=A[0].intersectionRatio;if(M!==d){if(!k)return u();M?u(!1,M):i=setTimeout(()=>{u(!1,1e-7)},1e3)}M===1&&!ZS(f,t.getBoundingClientRect())&&u(),k=!1}try{n=new IntersectionObserver(N,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,x)}n.observe(t)}return u(!0),l}function kT(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=A1(t),p=o||l?[...f?zu(f):[],...e?zu(e):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),l&&b.addEventListener("resize",n)});const h=f&&a?CT(f,n):null;let _=-1,S=null;u&&(S=new ResizeObserver(b=>{let[y]=b;y&&y.target===f&&S&&e&&(S.unobserve(e),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var x;(x=S)==null||x.observe(e)})),n()}),f&&!d&&S.observe(f),e&&S.observe(e));let C,w=d?Ba(t):null;d&&v();function v(){const b=Ba(t);w&&!ZS(w,b)&&n(),w=b,C=requestAnimationFrame(v)}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,d&&cancelAnimationFrame(C)}}const ET=nT,AT=rT,RT=JR,TT=sT,NT=eT,fb=ZR,DT=iT,MT=(t,e,n)=>{const i=new Map,o={platform:wT,...n},l={...o.platform,_c:i};return QR(t,e,{...o,platform:l})};var jT=typeof document<"u",OT=function(){},Df=jT?D.useLayoutEffect:OT;function Hf(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(!Hf(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)&&!Hf(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function JS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hb(t,e){const n=JS(t);return Math.round(e*n)/n}function Xm(t){const e=D.useRef(t);return Df(()=>{e.current=t}),e}function LT(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:a=!0,whileElementsMounted:d,open:f}=t,[p,h]=D.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[_,S]=D.useState(i);Hf(_,i)||S(i);const[C,w]=D.useState(null),[v,b]=D.useState(null),y=D.useCallback(ee=>{ee!==A.current&&(A.current=ee,w(ee))},[]),x=D.useCallback(ee=>{ee!==M.current&&(M.current=ee,b(ee))},[]),k=l||C,N=u||v,A=D.useRef(null),M=D.useRef(null),T=D.useRef(p),j=d!=null,O=Xm(d),I=Xm(o),V=Xm(f),U=D.useCallback(()=>{if(!A.current||!M.current)return;const ee={placement:e,strategy:n,middleware:_};I.current&&(ee.platform=I.current),MT(A.current,M.current,ee).then(B=>{const L={...B,isPositioned:V.current!==!1};W.current&&!Hf(T.current,L)&&(T.current=L,Yu.flushSync(()=>{h(L)}))})},[_,e,n,I,V]);Df(()=>{f===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(ee=>({...ee,isPositioned:!1})))},[f]);const W=D.useRef(!1);Df(()=>(W.current=!0,()=>{W.current=!1}),[]),Df(()=>{if(k&&(A.current=k),N&&(M.current=N),k&&N){if(O.current)return O.current(k,N,U);U()}},[k,N,U,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]),Z=D.useMemo(()=>{const ee={position:n,left:0,top:0};if(!G.floating)return ee;const B=hb(G.floating,p.x),L=hb(G.floating,p.y);return a?{...ee,transform:"translate("+B+"px, "+L+"px)",...JS(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:L}},[n,a,G.floating,p.x,p.y]);return D.useMemo(()=>({...p,update:U,refs:K,elements:G,floatingStyles:Z}),[p,U,K,G,Z])}const IT=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?fb({element:i.current,padding:o}).fn(n):{}:i?fb({element:i,padding:o}).fn(n):{}}}},zT=(t,e)=>{const n=ET(t);return{name:n.name,fn:n.fn,options:[t,e]}},BT=(t,e)=>{const n=AT(t);return{name:n.name,fn:n.fn,options:[t,e]}},PT=(t,e)=>({fn:DT(t).fn,options:[t,e]}),FT=(t,e)=>{const n=RT(t);return{name:n.name,fn:n.fn,options:[t,e]}},HT=(t,e)=>{const n=TT(t);return{name:n.name,fn:n.fn,options:[t,e]}},UT=(t,e)=>{const n=NT(t);return{name:n.name,fn:n.fn,options:[t,e]}},$T=(t,e)=>{const n=IT(t);return{name:n.name,fn:n.fn,options:[t,e]}};var VT="Arrow",e2=D.forwardRef((t,e)=>{const{children:n,width:i=10,height:o=5,...l}=t;return g.jsx(Xe.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"})})});e2.displayName=VT;var qT=e2,R1="Popper",[t2,Ho]=Ur(R1),[WT,n2]=t2(R1),r2=t=>{const{__scopePopper:e,children:n}=t,[i,o]=D.useState(null);return g.jsx(WT,{scope:e,anchor:i,onAnchorChange:o,children:n})};r2.displayName=R1;var i2="PopperAnchor",s2=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...o}=t,l=n2(i2,n),u=D.useRef(null),a=St(e,u),d=D.useRef(null);return D.useEffect(()=>{const f=d.current;d.current=(i==null?void 0:i.current)||u.current,f!==d.current&&l.onAnchorChange(d.current)}),i?null:g.jsx(Xe.div,{...o,ref:a})});s2.displayName=i2;var T1="PopperContent",[GT,KT]=t2(T1),o2=D.forwardRef((t,e)=>{var q,$,ne,ie,ae,se,ye,Re;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:_=!1,updatePositionStrategy:S="optimized",onPlaced:C,...w}=t,v=n2(T1,n),[b,y]=D.useState(null),x=St(e,je=>y(je)),[k,N]=D.useState(null),A=PR(k),M=(q=A==null?void 0:A.width)!=null?q:0,T=($=A==null?void 0:A.height)!=null?$:0,j=i+(l!=="center"?"-"+l:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(f)?f:[f],V=I.length>0,U={padding:O,boundary:I.filter(XT),altBoundary:V},{refs:W,floatingStyles:K,placement:G,isPositioned:Z,middlewareData:ee}=LT({strategy:"fixed",placement:j,whileElementsMounted:(...je)=>kT(...je,{animationFrame:S==="always"}),elements:{reference:v.anchor},middleware:[zT({mainAxis:o+T,alignmentAxis:u}),d&&BT({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?PT():void 0,...U}),d&&FT({...U}),HT({...U,apply:({elements:je,rects:Be,availableWidth:De,availableHeight:et})=>{const{width:it,height:ut}=Be.reference,ot=je.floating.style;ot.setProperty("--radix-popper-available-width",`${De}px`),ot.setProperty("--radix-popper-available-height",`${et}px`),ot.setProperty("--radix-popper-anchor-width",`${it}px`),ot.setProperty("--radix-popper-anchor-height",`${ut}px`)}}),k&&$T({element:k,padding:a}),QT({arrowWidth:M,arrowHeight:T}),_&&UT({strategy:"referenceHidden",...U})]}),[B,L]=c2(G),z=Un(C);Rn(()=>{Z&&(z==null||z())},[Z,z]);const H=(ne=ee.arrow)==null?void 0:ne.x,F=(ie=ee.arrow)==null?void 0:ie.y,Q=((ae=ee.arrow)==null?void 0:ae.centerOffset)!==0,[te,X]=D.useState();return Rn(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Z?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(se=ee.transformOrigin)==null?void 0:se.x,(ye=ee.transformOrigin)==null?void 0:ye.y].join(" "),...((Re=ee.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(GT,{scope:n,placedSide:B,onArrowChange:N,arrowX:H,arrowY:F,shouldHideArrow:Q,children:g.jsx(Xe.div,{"data-side":B,"data-align":L,...w,ref:x,style:{...w.style,animation:Z?void 0:"none"}})})})});o2.displayName=T1;var a2="PopperArrow",YT={top:"bottom",right:"left",bottom:"top",left:"right"},l2=D.forwardRef(function(e,n){const{__scopePopper:i,...o}=e,l=KT(a2,i),u=YT[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]: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(qT,{...o,ref:n,style:{...o.style,display:"block"}})})});l2.displayName=a2;function XT(t){return t!==null}var QT=t=>({name:"transformOrigin",options:t,fn(e){var v,b,y,x,k;const{placement:n,rects:i,middlewareData:o}=e,u=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=u?0:t.arrowWidth,d=u?0:t.arrowHeight,[f,p]=c2(n),h={start:"0%",center:"50%",end:"100%"}[p],_=((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)+d/2;let C="",w="";return f==="bottom"?(C=u?h:`${_}px`,w=`${-d}px`):f==="top"?(C=u?h:`${_}px`,w=`${i.floating.height+d}px`):f==="right"?(C=`${-d}px`,w=u?h:`${S}px`):f==="left"&&(C=`${i.floating.width+d}px`,w=u?h:`${S}px`),{data:{x:C,y:w}}}});function c2(t){const[e,n="center"]=t.split("-");return[e,n]}var yh=r2,td=s2,bh=o2,xh=l2,Qm="rovingFocusGroup.onEntryFocus",ZT={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[Lg,u2,JT]=d1(nd),[e6,Sh]=Ur(nd,[JT]),[t6,n6]=e6(nd),d2=D.forwardRef((t,e)=>g.jsx(Lg.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(Lg.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx(r6,{...t,ref:e})})}));d2.displayName=nd;var r6=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=t,_=D.useRef(null),S=St(e,_),C=Qu(l),[w,v]=Ls({prop:u,defaultProp:a!=null?a:null,onChange:d,caller:nd}),[b,y]=D.useState(!1),x=Un(f),k=u2(n),N=D.useRef(!1),[A,M]=D.useState(0);return D.useEffect(()=>{const T=_.current;if(T)return T.addEventListener(Qm,x),()=>T.removeEventListener(Qm,x)},[x]),g.jsx(t6,{scope:n,orientation:i,dir:C,loop:o,currentTabStopId:w,onItemFocus:D.useCallback(T=>v(T),[v]),onItemShiftTab:D.useCallback(()=>y(!0),[]),onFocusableItemAdd:D.useCallback(()=>M(T=>T+1),[]),onFocusableItemRemove:D.useCallback(()=>M(T=>T-1),[]),children:g.jsx(Xe.div,{tabIndex:b||A===0?-1:0,"data-orientation":i,...h,ref:S,style:{outline:"none",...t.style},onMouseDown:Le(t.onMouseDown,()=>{N.current=!0}),onFocus:Le(t.onFocus,T=>{const j=!N.current;if(T.target===T.currentTarget&&j&&!b){const O=new CustomEvent(Qm,ZT);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const I=k().filter(G=>G.focusable),V=I.find(G=>G.active),U=I.find(G=>G.id===w),K=[V,U,...I].filter(Boolean).map(G=>G.ref.current);p2(K,p)}}N.current=!1}),onBlur:Le(t.onBlur,()=>y(!1))})})}),f2="RovingFocusGroupItem",h2=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:u,...a}=t,d=kn(),f=l||d,p=n6(f2,n),h=p.currentTabStopId===f,_=u2(n),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:w}=p;return D.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),g.jsx(Lg.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:g.jsx(Xe.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...a,ref:e,onMouseDown:Le(t.onMouseDown,v=>{i?p.onItemFocus(f):v.preventDefault()}),onFocus:Le(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:Le(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=o6(v,p.orientation,p.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=_().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(v.currentTarget);x=p.loop?a6(x,k+1):x.slice(k+1)}setTimeout(()=>p2(x))}}),children:typeof u=="function"?u({isCurrentTabStop:h,hasTabStop:w!=null}):u})})});h2.displayName=f2;var i6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s6(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function o6(t,e,n){const i=s6(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return i6[i]}function p2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function a6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var m2=d2,g2=h2,Ig=["Enter"," "],l6=["ArrowDown","PageUp","Home"],v2=["ArrowUp","PageDown","End"],c6=[...l6,...v2],u6={ltr:[...Ig,"ArrowRight"],rtl:[...Ig,"ArrowLeft"]},d6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rd="Menu",[Bu,f6,h6]=d1(rd),[$a,_2]=Ur(rd,[h6,Ho,Sh]),wh=Ho(),y2=Sh(),[p6,Va]=$a(rd),[m6,id]=$a(rd),b2=t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:o,onOpenChange:l,modal:u=!0}=t,a=wh(e),[d,f]=D.useState(null),p=D.useRef(!1),h=Un(l),_=Qu(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(yh,{...a,children:g.jsx(p6,{scope:e,open:n,onOpenChange:h,content:d,onContentChange:f,children:g.jsx(m6,{scope:e,onClose:D.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:_,modal:u,children:i})})})};b2.displayName=rd;var g6="MenuAnchor",N1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=wh(n);return g.jsx(td,{...o,...i,ref:e})});N1.displayName=g6;var D1="MenuPortal",[v6,x2]=$a(D1,{forceMount:void 0}),S2=t=>{const{__scopeMenu:e,forceMount:n,children:i,container:o}=t,l=Va(D1,e);return g.jsx(v6,{scope:e,forceMount:n,children:g.jsx(Tn,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};S2.displayName=D1;var si="MenuContent",[_6,M1]=$a(si),w2=D.forwardRef((t,e)=>{const n=x2(si,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=Va(si,t.__scopeMenu),u=id(si,t.__scopeMenu);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(Tn,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:u.modal?g.jsx(y6,{...o,ref:e}):g.jsx(b6,{...o,ref:e})})})})}),y6=D.forwardRef((t,e)=>{const n=Va(si,t.__scopeMenu),i=D.useRef(null),o=St(e,i);return D.useEffect(()=>{const l=i.current;if(l)return fh(l)},[]),g.jsx(j1,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Le(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),b6=D.forwardRef((t,e)=>{const n=Va(si,t.__scopeMenu);return g.jsx(j1,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),x6=Oo("MenuContent.ScrollLock"),j1=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:a,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:_,onDismiss:S,disableOutsideScroll:C,...w}=t,v=Va(si,n),b=id(si,n),y=wh(n),x=y2(n),k=f6(n),[N,A]=D.useState(null),M=D.useRef(null),T=St(e,M,v.onContentChange),j=D.useRef(0),O=D.useRef(""),I=D.useRef(0),V=D.useRef(null),U=D.useRef("right"),W=D.useRef(0),K=C?Ju:D.Fragment,G=C?{as:x6,allowPinchZoom:!0}:void 0,Z=B=>{var q,$;const L=O.current+B,z=k().filter(ne=>!ne.disabled),H=document.activeElement,F=(q=z.find(ne=>ne.ref.current===H))==null?void 0:q.textValue,Q=z.map(ne=>ne.textValue),te=j6(Q,L,F),X=($=z.find(ne=>ne.textValue===te))==null?void 0:$.ref.current;(function ne(ie){O.current=ie,window.clearTimeout(j.current),ie!==""&&(j.current=window.setTimeout(()=>ne(""),1e3))})(L),X&&setTimeout(()=>X.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),uh();const ee=D.useCallback(B=>{var z,H;return U.current===((z=V.current)==null?void 0:z.side)&&L6(B,(H=V.current)==null?void 0:H.area)},[]);return g.jsx(_6,{scope:n,searchRef:O,onItemEnter:D.useCallback(B=>{ee(B)&&B.preventDefault()},[ee]),onItemLeave:D.useCallback(B=>{var L;ee(B)||((L=M.current)==null||L.focus(),A(null))},[ee]),onTriggerLeave:D.useCallback(B=>{ee(B)&&B.preventDefault()},[ee]),pointerGraceTimerRef:I,onPointerGraceIntentChange:D.useCallback(B=>{V.current=B},[]),children:g.jsx(K,{...G,children:g.jsx(Zu,{asChild:!0,trapped:o,onMountAutoFocus:Le(l,B=>{var L;B.preventDefault(),(L=M.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:g.jsx(yc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:_,onDismiss:S,children:g.jsx(m2,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:Le(d,B=>{b.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(bh,{role:"menu","aria-orientation":"vertical","data-state":P2(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...w,ref:T,style:{outline:"none",...w.style},onKeyDown:Le(w.onKeyDown,B=>{const z=B.target.closest("[data-radix-menu-content]")===B.currentTarget,H=B.ctrlKey||B.altKey||B.metaKey,F=B.key.length===1;z&&(B.key==="Tab"&&B.preventDefault(),!H&&F&&Z(B.key));const Q=M.current;if(B.target!==Q||!c6.includes(B.key))return;B.preventDefault();const X=k().filter(q=>!q.disabled).map(q=>q.ref.current);v2.includes(B.key)&&X.reverse(),D6(X)}),onBlur:Le(t.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:Le(t.onPointerMove,Pu(B=>{const L=B.target,z=W.current!==B.clientX;if(B.currentTarget.contains(L)&&z){const H=B.clientX>W.current?"right":"left";U.current=H,W.current=B.clientX}}))})})})})})})});w2.displayName=si;var S6="MenuGroup",O1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{role:"group",...i,ref:e})});O1.displayName=S6;var w6="MenuLabel",C2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{...i,ref:e})});C2.displayName=w6;var Uf="MenuItem",pb="menu.itemSelect",Ch=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:i,...o}=t,l=D.useRef(null),u=id(Uf,t.__scopeMenu),a=M1(Uf,t.__scopeMenu),d=St(e,l),f=D.useRef(!1),p=()=>{const h=l.current;if(!n&&h){const _=new CustomEvent(pb,{bubbles:!0,cancelable:!0});h.addEventListener(pb,S=>i==null?void 0:i(S),{once:!0}),aS(h,_),_.defaultPrevented?f.current=!1:u.onClose()}};return g.jsx(k2,{...o,ref:d,disabled:n,onClick:Le(t.onClick,p),onPointerDown:h=>{var _;(_=t.onPointerDown)==null||_.call(t,h),f.current=!0},onPointerUp:Le(t.onPointerUp,h=>{var _;f.current||(_=h.currentTarget)==null||_.click()}),onKeyDown:Le(t.onKeyDown,h=>{const _=a.searchRef.current!=="";n||_&&h.key===" "||Ig.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Ch.displayName=Uf;var k2=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=t,u=M1(Uf,n),a=y2(n),d=D.useRef(null),f=St(e,d),[p,h]=D.useState(!1),[_,S]=D.useState("");return D.useEffect(()=>{var w;const C=d.current;C&&S(((w=C.textContent)!=null?w:"").trim())},[l.children]),g.jsx(Bu.ItemSlot,{scope:n,disabled:i,textValue:o!=null?o:_,children:g.jsx(g2,{asChild:!0,...a,focusable:!i,children:g.jsx(Xe.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:f,onPointerMove:Le(t.onPointerMove,Pu(C=>{i?u.onItemLeave(C):(u.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Le(t.onPointerLeave,Pu(C=>u.onItemLeave(C))),onFocus:Le(t.onFocus,()=>h(!0)),onBlur:Le(t.onBlur,()=>h(!1))})})})}),C6="MenuCheckboxItem",E2=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:i,...o}=t;return g.jsx(D2,{scope:t.__scopeMenu,checked:n,children:g.jsx(Ch,{role:"menuitemcheckbox","aria-checked":$f(n)?"mixed":n,...o,ref:e,"data-state":I1(n),onSelect:Le(o.onSelect,()=>i==null?void 0:i($f(n)?!0:!n),{checkForDefaultPrevented:!1})})})});E2.displayName=C6;var A2="MenuRadioGroup",[k6,E6]=$a(A2,{value:void 0,onValueChange:()=>{}}),R2=D.forwardRef((t,e)=>{const{value:n,onValueChange:i,...o}=t,l=Un(i);return g.jsx(k6,{scope:t.__scopeMenu,value:n,onValueChange:l,children:g.jsx(O1,{...o,ref:e})})});R2.displayName=A2;var T2="MenuRadioItem",N2=D.forwardRef((t,e)=>{const{value:n,...i}=t,o=E6(T2,t.__scopeMenu),l=n===o.value;return g.jsx(D2,{scope:t.__scopeMenu,checked:l,children:g.jsx(Ch,{role:"menuitemradio","aria-checked":l,...i,ref:e,"data-state":I1(l),onSelect:Le(i.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});N2.displayName=T2;var L1="MenuItemIndicator",[D2,A6]=$a(L1,{checked:!1}),M2=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:i,...o}=t,l=A6(L1,n);return g.jsx(Tn,{present:i||$f(l.checked)||l.checked===!0,children:g.jsx(Xe.span,{...o,ref:e,"data-state":I1(l.checked)})})});M2.displayName=L1;var R6="MenuSeparator",j2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});j2.displayName=R6;var T6="MenuArrow",O2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=wh(n);return g.jsx(xh,{...o,...i,ref:e})});O2.displayName=T6;var N6="MenuSub",[oU,L2]=$a(N6),Ru="MenuSubTrigger",I2=D.forwardRef((t,e)=>{const n=Va(Ru,t.__scopeMenu),i=id(Ru,t.__scopeMenu),o=L2(Ru,t.__scopeMenu),l=M1(Ru,t.__scopeMenu),u=D.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:d}=l,f={__scopeMenu:t.__scopeMenu},p=D.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return D.useEffect(()=>p,[p]),D.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),d(null)}},[a,d]),g.jsx(N1,{asChild:!0,...f,children:g.jsx(k2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":P2(n.open),...t,ref:Os(e,o.onTriggerChange),onClick:h=>{var _;(_=t.onClick)==null||_.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Le(t.onPointerMove,Pu(h=>{l.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Le(t.onPointerLeave,Pu(h=>{var S,C;p();const _=(S=n.content)==null?void 0:S.getBoundingClientRect();if(_){const w=(C=n.content)==null?void 0:C.dataset.side,v=w==="right",b=v?-5:5,y=_[v?"left":"right"],x=_[v?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:y,y:_.top},{x,y:_.top},{x,y:_.bottom},{x:y,y:_.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:Le(t.onKeyDown,h=>{var S;const _=l.searchRef.current!=="";t.disabled||_&&h.key===" "||u6[i.dir].includes(h.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),h.preventDefault())})})})});I2.displayName=Ru;var z2="MenuSubContent",B2=D.forwardRef((t,e)=>{const n=x2(si,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=Va(si,t.__scopeMenu),u=id(si,t.__scopeMenu),a=L2(z2,t.__scopeMenu),d=D.useRef(null),f=St(e,d);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(Tn,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:g.jsx(j1,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:f,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var h;u.isUsingKeyboardRef.current&&((h=d.current)==null||h.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Le(t.onFocusOutside,p=>{p.target!==a.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Le(t.onEscapeKeyDown,p=>{u.onClose(),p.preventDefault()}),onKeyDown:Le(t.onKeyDown,p=>{var S;const h=p.currentTarget.contains(p.target),_=d6[u.dir].includes(p.key);h&&_&&(l.onOpenChange(!1),(S=a.trigger)==null||S.focus(),p.preventDefault())})})})})})});B2.displayName=z2;function P2(t){return t?"open":"closed"}function $f(t){return t==="indeterminate"}function I1(t){return $f(t)?"indeterminate":t?"checked":"unchecked"}function D6(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function M6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function j6(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 u=M6(t,Math.max(l,0));o.length===1&&(u=u.filter(f=>f!==n));const d=u.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function O6(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const a=e[l],d=e[u],f=a.x,p=a.y,h=d.x,_=d.y;p>i!=_>i&&n<(h-f)*(i-p)/(_-p)+f&&(o=!o)}return o}function L6(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return O6(n,e)}function Pu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var I6=b2,z6=N1,B6=S2,P6=w2,F6=O1,H6=C2,U6=Ch,$6=E2,V6=R2,q6=N2,W6=M2,G6=j2,K6=O2,Y6=I2,X6=B2,kh="DropdownMenu",[Q6]=Ur(kh,[_2]),rr=_2(),[Z6,F2]=Q6(kh),H2=t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:u,modal:a=!0}=t,d=rr(e),f=D.useRef(null),[p,h]=Ls({prop:o,defaultProp:l!=null?l:!1,onChange:u,caller:kh});return g.jsx(Z6,{scope:e,triggerId:kn(),triggerRef:f,contentId:kn(),open:p,onOpenChange:h,onOpenToggle:D.useCallback(()=>h(_=>!_),[h]),modal:a,children:g.jsx(I6,{...d,open:p,onOpenChange:h,dir:i,modal:a,children:n})})};H2.displayName=kh;var U2="DropdownMenuTrigger",$2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=t,l=F2(U2,n),u=rr(n);return g.jsx(z6,{asChild:!0,...u,children:g.jsx(Xe.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:Os(e,l.triggerRef),onPointerDown:Le(t.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(l.onOpenToggle(),l.open||a.preventDefault())}),onKeyDown:Le(t.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&l.onOpenToggle(),a.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});$2.displayName=U2;var J6="DropdownMenuPortal",V2=t=>{const{__scopeDropdownMenu:e,...n}=t,i=rr(e);return g.jsx(B6,{...i,...n})};V2.displayName=J6;var q2="DropdownMenuContent",W2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=F2(q2,n),l=rr(n),u=D.useRef(!1);return g.jsx(P6,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:e,onCloseAutoFocus:Le(t.onCloseAutoFocus,a=>{var d;u.current||(d=o.triggerRef.current)==null||d.focus(),u.current=!1,a.preventDefault()}),onInteractOutside:Le(t.onInteractOutside,a=>{const d=a.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,p=d.button===2||f;(!o.modal||p)&&(u.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)"}})});W2.displayName=q2;var eN="DropdownMenuGroup",tN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(F6,{...o,...i,ref:e})});tN.displayName=eN;var nN="DropdownMenuLabel",rN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(H6,{...o,...i,ref:e})});rN.displayName=nN;var iN="DropdownMenuItem",G2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(U6,{...o,...i,ref:e})});G2.displayName=iN;var sN="DropdownMenuCheckboxItem",oN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx($6,{...o,...i,ref:e})});oN.displayName=sN;var aN="DropdownMenuRadioGroup",lN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(V6,{...o,...i,ref:e})});lN.displayName=aN;var cN="DropdownMenuRadioItem",uN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(q6,{...o,...i,ref:e})});uN.displayName=cN;var dN="DropdownMenuItemIndicator",fN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(W6,{...o,...i,ref:e})});fN.displayName=dN;var hN="DropdownMenuSeparator",pN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(G6,{...o,...i,ref:e})});pN.displayName=hN;var mN="DropdownMenuArrow",gN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(K6,{...o,...i,ref:e})});gN.displayName=mN;var vN="DropdownMenuSubTrigger",_N=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(Y6,{...o,...i,ref:e})});_N.displayName=vN;var yN="DropdownMenuSubContent",bN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=rr(n);return g.jsx(X6,{...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)"}})});bN.displayName=yN;var xN=H2,SN=$2,wN=V2,CN=W2,kN=G2,EN="Label",K2=D.forwardRef((t,e)=>g.jsx(Xe.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())}}));K2.displayName=EN;var AN=K2;function zg(t,[e,n]){return Math.min(n,Math.max(e,t))}var Eh="Popover",[Y2]=Ur(Eh,[Ho]),sd=Ho(),[RN,Uo]=Y2(Eh),X2=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!1}=t,a=sd(e),d=D.useRef(null),[f,p]=D.useState(!1),[h,_]=Ls({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:Eh});return g.jsx(yh,{...a,children:g.jsx(RN,{scope:e,contentId:kn(),triggerRef:d,open:h,onOpenChange:_,onOpenToggle:D.useCallback(()=>_(S=>!S),[_]),hasCustomAnchor:f,onCustomAnchorAdd:D.useCallback(()=>p(!0),[]),onCustomAnchorRemove:D.useCallback(()=>p(!1),[]),modal:u,children:n})})};X2.displayName=Eh;var Q2="PopoverAnchor",Z2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Uo(Q2,n),l=sd(n),{onCustomAnchorAdd:u,onCustomAnchorRemove:a}=o;return D.useEffect(()=>(u(),()=>a()),[u,a]),g.jsx(td,{...l,...i,ref:e})});Z2.displayName=Q2;var J2="PopoverTrigger",ew=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Uo(J2,n),l=sd(n),u=St(e,o.triggerRef),a=g.jsx(Xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sw(o.open),...i,ref:u,onClick:Le(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:g.jsx(td,{asChild:!0,...l,children:a})});ew.displayName=J2;var z1="PopoverPortal",[TN,NN]=Y2(z1,{forceMount:void 0}),tw=t=>{const{__scopePopover:e,forceMount:n,children:i,container:o}=t,l=Uo(z1,e);return g.jsx(TN,{scope:e,forceMount:n,children:g.jsx(Tn,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};tw.displayName=z1;var cc="PopoverContent",nw=D.forwardRef((t,e)=>{const n=NN(cc,t.__scopePopover),{forceMount:i=n.forceMount,...o}=t,l=Uo(cc,t.__scopePopover);return g.jsx(Tn,{present:i||l.open,children:l.modal?g.jsx(MN,{...o,ref:e}):g.jsx(jN,{...o,ref:e})})});nw.displayName=cc;var DN=Oo("PopoverContent.RemoveScroll"),MN=D.forwardRef((t,e)=>{const n=Uo(cc,t.__scopePopover),i=D.useRef(null),o=St(e,i),l=D.useRef(!1);return D.useEffect(()=>{const u=i.current;if(u)return fh(u)},[]),g.jsx(Ju,{as:DN,allowPinchZoom:!0,children:g.jsx(rw,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(t.onCloseAutoFocus,u=>{var a;u.preventDefault(),l.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Le(t.onPointerDownOutside,u=>{const a=u.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,f=a.button===2||d;l.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Le(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),jN=D.forwardRef((t,e)=>{const n=Uo(cc,t.__scopePopover),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(rw,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,a;(u=t.onCloseAutoFocus)==null||u.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 d,f;(d=t.onInteractOutside)==null||d.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),rw=D.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,...h}=t,_=Uo(cc,n),S=sd(n);return uh(),g.jsx(Zu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(yc,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>_.onOpenChange(!1),children:g.jsx(bh,{"data-state":sw(_.open),role:"dialog",id:_.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)"}})})})}),iw="PopoverClose",ON=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Uo(iw,n);return g.jsx(Xe.button,{type:"button",...i,ref:e,onClick:Le(t.onClick,()=>o.onOpenChange(!1))})});ON.displayName=iw;var LN="PopoverArrow",IN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=sd(n);return g.jsx(xh,{...o,...i,ref:e})});IN.displayName=LN;function sw(t){return t?"open":"closed"}var zN=X2,BN=Z2,PN=ew,FN=tw,HN=nw,B1="Progress",P1=100,[UN]=Ur(B1),[$N,VN]=UN(B1),ow=D.forwardRef((t,e)=>{const{__scopeProgress:n,value:i=null,max:o,getValueLabel:l=qN,...u}=t;(o||o===0)&&!mb(o)&&console.error(WN(`${o}`,"Progress"));const a=mb(o)?o:P1;i!==null&&!gb(i,a)&&console.error(GN(`${i}`,"Progress"));const d=gb(i,a)?i:null,f=Vf(d)?l(d,a):void 0;return g.jsx($N,{scope:n,value:d,max:a,children:g.jsx(Xe.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Vf(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":cw(d,a),"data-value":d!=null?d:void 0,"data-max":a,...u,ref:e})})});ow.displayName=B1;var aw="ProgressIndicator",lw=D.forwardRef((t,e)=>{var l;const{__scopeProgress:n,...i}=t,o=VN(aw,n);return g.jsx(Xe.div,{"data-state":cw(o.value,o.max),"data-value":(l=o.value)!=null?l:void 0,"data-max":o.max,...i,ref:e})});lw.displayName=aw;function qN(t,e){return`${Math.round(t/e*100)}%`}function cw(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Vf(t){return typeof t=="number"}function mb(t){return Vf(t)&&!isNaN(t)&&t>0}function gb(t,e){return Vf(t)&&!isNaN(t)&&t<=e&&t>=0}function WN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${P1}\`.`}function GN(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
507
+ - a positive number
508
+ - less than the value passed to \`max\` (or ${P1} if no \`max\` prop is set)
509
+ - \`null\` or \`undefined\` if the progress is indeterminate.
510
+
511
+ Defaulting to \`null\`.`}var KN=ow,YN=lw;function XN(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var F1="ScrollArea",[uw]=Ur(F1),[QN,oi]=uw(F1),dw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:i="hover",dir:o,scrollHideDelay:l=600,...u}=t,[a,d]=D.useState(null),[f,p]=D.useState(null),[h,_]=D.useState(null),[S,C]=D.useState(null),[w,v]=D.useState(null),[b,y]=D.useState(0),[x,k]=D.useState(0),[N,A]=D.useState(!1),[M,T]=D.useState(!1),j=St(e,I=>d(I)),O=Qu(o);return g.jsx(QN,{scope:n,type:i,dir:O,scrollHideDelay:l,scrollArea:a,viewport:f,onViewportChange:p,content:h,onContentChange:_,scrollbarX:S,onScrollbarXChange:C,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:v,scrollbarYEnabled:M,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:k,children:g.jsx(Xe.div,{dir:O,...u,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});dw.displayName=F1;var fw="ScrollAreaViewport",hw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:o,...l}=t,u=oi(fw,n),a=D.useRef(null),d=St(e,a,u.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(Xe.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});hw.displayName=fw;var Ji="ScrollAreaScrollbar",pw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=oi(Ji,t.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=o,a=t.orientation==="horizontal";return D.useEffect(()=>(a?l(!0):u(!0),()=>{a?l(!1):u(!1)}),[a,l,u]),o.type==="hover"?g.jsx(ZN,{...i,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(JN,{...i,ref:e,forceMount:n}):o.type==="auto"?g.jsx(mw,{...i,ref:e,forceMount:n}):o.type==="always"?g.jsx(H1,{...i,ref:e}):null});pw.displayName=Ji;var ZN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=oi(Ji,t.__scopeScrollArea),[l,u]=D.useState(!1);return D.useEffect(()=>{const a=o.scrollArea;let d=0;if(a){const f=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(Tn,{present:n||l,children:g.jsx(mw,{"data-state":l?"visible":"hidden",...i,ref:e})})}),JN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=oi(Ji,t.__scopeScrollArea),l=t.orientation==="horizontal",u=Rh(()=>d("SCROLL_END"),100),[a,d]=XN("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(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,o.scrollHideDelay,d]),D.useEffect(()=>{const f=o.viewport,p=l?"scrollLeft":"scrollTop";if(f){let h=f[p];const _=()=>{const S=f[p];h!==S&&(d("SCROLL"),u()),h=S};return f.addEventListener("scroll",_),()=>f.removeEventListener("scroll",_)}},[o.viewport,l,d,u]),g.jsx(Tn,{present:n||a!=="hidden",children:g.jsx(H1,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:Le(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Le(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),mw=D.forwardRef((t,e)=>{const n=oi(Ji,t.__scopeScrollArea),{forceMount:i,...o}=t,[l,u]=D.useState(!1),a=t.orientation==="horizontal",d=Rh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(a?f:p)}},10);return uc(n.viewport,d),uc(n.content,d),g.jsx(Tn,{present:i||l,children:g.jsx(H1,{"data-state":l?"visible":"hidden",...o,ref:e})})}),H1=D.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,o=oi(Ji,t.__scopeScrollArea),l=D.useRef(null),u=D.useRef(0),[a,d]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=bw(a.viewport,a.content),p={...i,sizes:a,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:_=>l.current=_,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:_=>u.current=_};function h(_,S){return sD(_,u.current,a,S)}return n==="horizontal"?g.jsx(eD,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const _=o.viewport.scrollLeft,S=vb(_,a,o.dir);l.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollLeft=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollLeft=h(_,o.dir))}}):n==="vertical"?g.jsx(tD,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const _=o.viewport.scrollTop,S=vb(_,a);l.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:_=>{o.viewport&&(o.viewport.scrollTop=_)},onDragScroll:_=>{o.viewport&&(o.viewport.scrollTop=h(_))}}):null}),eD=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=oi(Ji,t.__scopeScrollArea),[u,a]=D.useState(),d=D.useRef(null),f=St(e,d,l.onScrollbarXChange);return D.useEffect(()=>{d.current&&a(getComputedStyle(d.current))},[d]),g.jsx(vw,{"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":Ah(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const _=l.viewport.scrollLeft+p.deltaX;t.onWheelScroll(_),Sw(_,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&u&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Wf(u.paddingLeft),paddingEnd:Wf(u.paddingRight)}})}})}),tD=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=oi(Ji,t.__scopeScrollArea),[u,a]=D.useState(),d=D.useRef(null),f=St(e,d,l.onScrollbarYChange);return D.useEffect(()=>{d.current&&a(getComputedStyle(d.current))},[d]),g.jsx(vw,{"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":Ah(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const _=l.viewport.scrollTop+p.deltaY;t.onWheelScroll(_),Sw(_,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&u&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Wf(u.paddingTop),paddingEnd:Wf(u.paddingBottom)}})}})}),[nD,gw]=uw(Ji),vw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:o,onThumbChange:l,onThumbPointerUp:u,onThumbPointerDown:a,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:h,..._}=t,S=oi(Ji,n),[C,w]=D.useState(null),v=St(e,j=>w(j)),b=D.useRef(null),y=D.useRef(""),x=S.viewport,k=i.content-i.viewport,N=Un(p),A=Un(d),M=Rh(h,10);function T(j){if(b.current){const O=j.clientX-b.current.left,I=j.clientY-b.current.top;f({x:O,y:I})}}return D.useEffect(()=>{const j=O=>{const I=O.target;(C==null?void 0:C.contains(I))&&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]),uc(C,M),uc(S.content,M),g.jsx(nD,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Un(l),onThumbPointerUp:Un(u),onThumbPositionChange:A,onThumbPointerDown:Un(a),children:g.jsx(Xe.div,{..._,ref:v,style:{position:"absolute",..._.style},onPointerDown:Le(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:Le(t.onPointerMove,T),onPointerUp:Le(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})})})}),qf="ScrollAreaThumb",_w=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=gw(qf,t.__scopeScrollArea);return g.jsx(Tn,{present:n||o.hasThumb,children:g.jsx(rD,{ref:e,...i})})}),rD=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...o}=t,l=oi(qf,n),u=gw(qf,n),{onThumbPositionChange:a}=u,d=St(e,h=>u.onThumbChange(h)),f=D.useRef(void 0),p=Rh(()=>{f.current&&(f.current(),f.current=void 0)},100);return D.useEffect(()=>{const h=l.viewport;if(h){const _=()=>{if(p(),!f.current){const S=oD(h,a);f.current=S,a()}};return a(),h.addEventListener("scroll",_),()=>h.removeEventListener("scroll",_)}},[l.viewport,p,a]),g.jsx(Xe.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Le(t.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),C=h.clientX-S.left,w=h.clientY-S.top;u.onThumbPointerDown({x:C,y:w})}),onPointerUp:Le(t.onPointerUp,u.onThumbPointerUp)})});_w.displayName=qf;var U1="ScrollAreaCorner",yw=D.forwardRef((t,e)=>{const n=oi(U1,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?g.jsx(iD,{...t,ref:e}):null});yw.displayName=U1;var iD=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,o=oi(U1,n),[l,u]=D.useState(0),[a,d]=D.useState(0),f=!!(l&&a);return uc(o.scrollbarX,()=>{var h;const p=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(p),d(p)}),uc(o.scrollbarY,()=>{var h;const p=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(p),u(p)}),f?g.jsx(Xe.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 Wf(t){return t?parseInt(t,10):0}function bw(t,e){const n=t/e;return isNaN(n)?0:n}function Ah(t){const e=bw(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function sD(t,e,n,i="ltr"){const o=Ah(n),l=o/2,u=e||l,a=o-u,d=n.scrollbar.paddingStart+u,f=n.scrollbar.size-n.scrollbar.paddingEnd-a,p=n.content-n.viewport,h=i==="ltr"?[0,p]:[p*-1,0];return xw([d,f],h)(t)}function vb(t,e,n="ltr"){const i=Ah(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=e.scrollbar.size-o,u=e.content-e.viewport,a=l-i,d=n==="ltr"?[0,u]:[u*-1,0],f=zg(t,d);return xw([0,u],[0,a])(f)}function xw(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 Sw(t,e){return t>0&&t<e}var oD=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},i=0;return(function o(){const l={left:t.scrollLeft,top:t.scrollTop},u=n.left!==l.left,a=n.top!==l.top;(u||a)&&e(),n=l,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function Rh(t,e){const n=Un(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 uc(t,e){const n=Un(e);Rn(()=>{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 aD=dw,lD=hw,cD=yw,uD=[" ","Enter","ArrowUp","ArrowDown"],dD=[" ","Enter"],Pa="Select",[Th,Nh,fD]=d1(Pa),[wc]=Ur(Pa,[fD,Ho]),Dh=Ho(),[hD,$o]=wc(Pa),[pD,mD]=wc(Pa),ww=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:o,onOpenChange:l,value:u,defaultValue:a,onValueChange:d,dir:f,name:p,autoComplete:h,disabled:_,required:S,form:C}=t,w=Dh(e),[v,b]=D.useState(null),[y,x]=D.useState(null),[k,N]=D.useState(!1),A=Qu(f),[M,T]=Ls({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:Pa}),[j,O]=Ls({prop:u,defaultProp:a,onChange:d,caller:Pa}),I=D.useRef(null),V=v?C||!!v.closest("form"):!0,[U,W]=D.useState(new Set),K=Array.from(U).map(G=>G.props.value).join(";");return g.jsx(yh,{...w,children:g.jsxs(hD,{required:S,scope:e,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:kn(),value:j,onValueChange:O,open:M,onOpenChange:T,dir:A,triggerPointerDownPosRef:I,disabled:_,children:[g.jsx(Th.Provider,{scope:e,children:g.jsx(pD,{scope:t.__scopeSelect,onNativeOptionAdd:D.useCallback(G=>{W(Z=>new Set(Z).add(G))},[]),onNativeOptionRemove:D.useCallback(G=>{W(Z=>{const ee=new Set(Z);return ee.delete(G),ee})},[]),children:n})}),V?g.jsxs(Gw,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:j,onChange:G=>O(G.target.value),disabled:_,form:C,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from(U)]},K):null]})})};ww.displayName=Pa;var Cw="SelectTrigger",kw=D.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...o}=t,l=Dh(n),u=$o(Cw,n),a=u.disabled||i,d=St(e,u.onTriggerChange),f=Nh(n),p=D.useRef("touch"),[h,_,S]=Yw(w=>{const v=f().filter(x=>!x.disabled),b=v.find(x=>x.value===u.value),y=Xw(v,w,b);y!==void 0&&u.onValueChange(y.value)}),C=w=>{a||(u.onOpenChange(!0),S()),w&&(u.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(td,{asChild:!0,...l,children:g.jsx(Xe.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Kw(u.value)?"":void 0,...o,ref:d,onClick:Le(o.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&C(w)}),onPointerDown:Le(o.onPointerDown,w=>{p.current=w.pointerType;const v=w.target;v.hasPointerCapture(w.pointerId)&&v.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(C(w),w.preventDefault())}),onKeyDown:Le(o.onKeyDown,w=>{const v=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&_(w.key),!(v&&w.key===" ")&&uD.includes(w.key)&&(C(),w.preventDefault())})})})});kw.displayName=Cw;var Ew="SelectValue",Aw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:u="",...a}=t,d=$o(Ew,n),{onValueNodeHasChildrenChange:f}=d,p=l!==void 0,h=St(e,d.onValueNodeChange);return Rn(()=>{f(p)},[f,p]),g.jsx(Xe.span,{...a,ref:h,style:{pointerEvents:"none"},children:Kw(d.value)?g.jsx(g.Fragment,{children:u}):l})});Aw.displayName=Ew;var gD="SelectIcon",Rw=D.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...o}=t;return g.jsx(Xe.span,{"aria-hidden":!0,...o,ref:e,children:i||"▼"})});Rw.displayName=gD;var vD="SelectPortal",Tw=t=>g.jsx(bc,{asChild:!0,...t});Tw.displayName=vD;var Fa="SelectContent",Nw=D.forwardRef((t,e)=>{const n=$o(Fa,t.__scopeSelect),[i,o]=D.useState();if(Rn(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?Yu.createPortal(g.jsx(Dw,{scope:t.__scopeSelect,children:g.jsx(Th.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(Mw,{...t,ref:e})});Nw.displayName=Fa;var xi=10,[Dw,Vo]=wc(Fa),_D="SelectContentImpl",yD=Oo("SelectContent.RemoveScroll"),Mw=D.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:u,side:a,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:_,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v,...b}=t,y=$o(Fa,n),[x,k]=D.useState(null),[N,A]=D.useState(null),M=St(e,q=>k(q)),[T,j]=D.useState(null),[O,I]=D.useState(null),V=Nh(n),[U,W]=D.useState(!1),K=D.useRef(!1);D.useEffect(()=>{if(x)return fh(x)},[x]),uh();const G=D.useCallback(q=>{const[$,...ne]=V().map(se=>se.ref.current),[ie]=ne.slice(-1),ae=document.activeElement;for(const se of q)if(se===ae||(se==null||se.scrollIntoView({block:"nearest"}),se===$&&N&&(N.scrollTop=0),se===ie&&N&&(N.scrollTop=N.scrollHeight),se==null||se.focus(),document.activeElement!==ae))return},[V,N]),Z=D.useCallback(()=>G([T,x]),[G,T,x]);D.useEffect(()=>{U&&Z()},[U,Z]);const{onOpenChange:ee,triggerPointerDownPosRef:B}=y;D.useEffect(()=>{if(x){let q={x:0,y:0};const $=ie=>{var ae,se,ye,Re;q={x:Math.abs(Math.round(ie.pageX)-((se=(ae=B.current)==null?void 0:ae.x)!=null?se:0)),y:Math.abs(Math.round(ie.pageY)-((Re=(ye=B.current)==null?void 0:ye.y)!=null?Re:0))}},ne=ie=>{q.x<=10&&q.y<=10?ie.preventDefault():x.contains(ie.target)||ee(!1),document.removeEventListener("pointermove",$),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",$),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",$),document.removeEventListener("pointerup",ne,{capture:!0})}}},[x,ee,B]),D.useEffect(()=>{const q=()=>ee(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[ee]);const[L,z]=Yw(q=>{const $=V().filter(ae=>!ae.disabled),ne=$.find(ae=>ae.ref.current===document.activeElement),ie=Xw($,q,ne);ie&&setTimeout(()=>ie.ref.current.focus())}),H=D.useCallback((q,$,ne)=>{const ie=!K.current&&!ne;(y.value!==void 0&&y.value===$||ie)&&(j(q),ie&&(K.current=!0))},[y.value]),F=D.useCallback(()=>x==null?void 0:x.focus(),[x]),Q=D.useCallback((q,$,ne)=>{const ie=!K.current&&!ne;(y.value!==void 0&&y.value===$||ie)&&I(q)},[y.value]),te=i==="popper"?Bg:jw,X=te===Bg?{side:a,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:_,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v}:{};return g.jsx(Dw,{scope:n,content:x,viewport:N,onViewportChange:A,itemRefCallback:H,selectedItem:T,onItemLeave:F,itemTextRefCallback:Q,focusSelectedItem:Z,selectedItemText:O,position:i,isPositioned:U,searchRef:L,children:g.jsx(Ju,{as:yD,allowPinchZoom:!0,children:g.jsx(Zu,{asChild:!0,trapped:y.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:Le(o,q=>{var $;($=y.trigger)==null||$.focus({preventScroll:!0}),q.preventDefault()}),children:g.jsx(yc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:g.jsx(te,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:q=>q.preventDefault(),...b,...X,onPlaced:()=>W(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Le(b.onKeyDown,q=>{const $=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!$&&q.key.length===1&&z(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let ie=V().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(q.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const ae=q.target,se=ie.indexOf(ae);ie=ie.slice(se+1)}setTimeout(()=>G(ie)),q.preventDefault()}})})})})})})});Mw.displayName=_D;var bD="SelectItemAlignedPosition",jw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...o}=t,l=$o(Fa,n),u=Vo(Fa,n),[a,d]=D.useState(null),[f,p]=D.useState(null),h=St(e,M=>p(M)),_=Nh(n),S=D.useRef(!1),C=D.useRef(!0),{viewport:w,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=u,x=D.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&f&&w&&v&&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,ye=M.left-se,Re=M.width+ye,je=Math.max(Re,T.width),Be=window.innerWidth-xi,De=zg(se,[xi,Math.max(xi,Be-je)]);a.style.minWidth=Re+"px",a.style.left=De+"px"}else{const ae=T.right-O.right,se=window.innerWidth-j.right-ae,ye=window.innerWidth-M.right-se,Re=M.width+ye,je=Math.max(Re,T.width),Be=window.innerWidth-xi,De=zg(se,[xi,Math.max(xi,Be-je)]);a.style.minWidth=Re+"px",a.style.right=De+"px"}const I=_(),V=window.innerHeight-xi*2,U=w.scrollHeight,W=window.getComputedStyle(f),K=parseInt(W.borderTopWidth,10),G=parseInt(W.paddingTop,10),Z=parseInt(W.borderBottomWidth,10),ee=parseInt(W.paddingBottom,10),B=K+G+U+ee+Z,L=Math.min(v.offsetHeight*5,B),z=window.getComputedStyle(w),H=parseInt(z.paddingTop,10),F=parseInt(z.paddingBottom,10),Q=M.top+M.height/2-xi,te=V-Q,X=v.offsetHeight/2,q=v.offsetTop+X,$=K+G+q,ne=B-$;if($<=Q){const ae=I.length>0&&v===I[I.length-1].ref.current;a.style.bottom="0px";const se=f.clientHeight-w.offsetTop-w.offsetHeight,ye=Math.max(te,X+(ae?F:0)+se+Z),Re=$+ye;a.style.height=Re+"px"}else{const ae=I.length>0&&v===I[0].ref.current;a.style.top="0px";const ye=Math.max(Q,K+w.offsetTop+(ae?H:0)+X)+ne;a.style.height=ye+"px",w.scrollTop=$-Q+w.offsetTop}a.style.margin=`${xi}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=V+"px",i==null||i(),requestAnimationFrame(()=>S.current=!0)}},[_,l.trigger,l.valueNode,a,f,w,v,b,l.dir,i]);Rn(()=>x(),[x]);const[k,N]=D.useState();Rn(()=>{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(SD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:S,onScrollButtonChange:A,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:g.jsx(Xe.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jw.displayName=bD;var xD="SelectPopperPosition",Bg=D.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=xi,...l}=t,u=Dh(n);return g.jsx(bh,{...u,...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)"}})});Bg.displayName=xD;var[SD,$1]=wc(Fa,{}),Pg="SelectViewport",Ow=D.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...o}=t,l=Vo(Pg,n),u=$1(Pg,n),a=St(e,l.onViewportChange),d=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(Th.Slot,{scope:n,children:g.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Le(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:_}=u;if(_!=null&&_.current&&h){const S=Math.abs(d.current-p.scrollTop);if(S>0){const C=window.innerHeight-xi*2,w=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),b=Math.max(w,v);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")}}}d.current=p.scrollTop})})})]})});Ow.displayName=Pg;var Lw="SelectGroup",[wD,CD]=wc(Lw),Iw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=kn();return g.jsx(wD,{scope:n,id:o,children:g.jsx(Xe.div,{role:"group","aria-labelledby":o,...i,ref:e})})});Iw.displayName=Lw;var zw="SelectLabel",Bw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=CD(zw,n);return g.jsx(Xe.div,{id:o.id,...i,ref:e})});Bw.displayName=zw;var Gf="SelectItem",[kD,Pw]=wc(Gf),Fw=D.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...u}=t,a=$o(Gf,n),d=Vo(Gf,n),f=a.value===i,[p,h]=D.useState(l!=null?l:""),[_,S]=D.useState(!1),C=St(e,y=>{var x;return(x=d.itemRefCallback)==null?void 0:x.call(d,y,i,o)}),w=kn(),v=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(kD,{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(Th.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:g.jsx(Xe.div,{role:"option","aria-labelledby":w,"data-highlighted":_?"":void 0,"aria-selected":f&&_,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:C,onFocus:Le(u.onFocus,()=>S(!0)),onBlur:Le(u.onBlur,()=>S(!1)),onClick:Le(u.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:Le(u.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:Le(u.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:Le(u.onPointerMove,y=>{var x;v.current=y.pointerType,o?(x=d.onItemLeave)==null||x.call(d):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Le(u.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=d.onItemLeave)==null||x.call(d))}),onKeyDown:Le(u.onKeyDown,y=>{var k;((k=d.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(dD.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});Fw.displayName=Gf;var Tu="SelectItemText",Hw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,...l}=t,u=$o(Tu,n),a=Vo(Tu,n),d=Pw(Tu,n),f=mD(Tu,n),[p,h]=D.useState(null),_=St(e,b=>h(b),d.onItemTextChange,b=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,b,d.value,d.disabled)}),S=p==null?void 0:p.textContent,C=D.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:S},d.value),[d.disabled,d.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:v}=f;return Rn(()=>(w(C),()=>v(C)),[w,v,C]),g.jsxs(g.Fragment,{children:[g.jsx(Xe.span,{id:d.textId,...l,ref:_}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Yu.createPortal(l.children,u.valueNode):null]})});Hw.displayName=Tu;var Uw="SelectItemIndicator",$w=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Pw(Uw,n).isSelected?g.jsx(Xe.span,{"aria-hidden":!0,...i,ref:e}):null});$w.displayName=Uw;var Fg="SelectScrollUpButton",Vw=D.forwardRef((t,e)=>{const n=Vo(Fg,t.__scopeSelect),i=$1(Fg,t.__scopeSelect),[o,l]=D.useState(!1),u=St(e,i.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollTop>0;l(f)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Ww,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Vw.displayName=Fg;var Hg="SelectScrollDownButton",qw=D.forwardRef((t,e)=>{const n=Vo(Hg,t.__scopeSelect),i=$1(Hg,t.__scopeSelect),[o,l]=D.useState(!1),u=St(e,i.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;l(p)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Ww,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});qw.displayName=Hg;var Ww=D.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=t,l=Vo("SelectScrollButton",n),u=D.useRef(null),a=Nh(n),d=D.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return D.useEffect(()=>()=>d(),[d]),Rn(()=>{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(Xe.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:Le(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Le(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Le(o.onPointerLeave,()=>{d()})})}),ED="SelectSeparator",AD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return g.jsx(Xe.div,{"aria-hidden":!0,...i,ref:e})});AD.displayName=ED;var Ug="SelectArrow",RD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=Dh(n),l=$o(Ug,n),u=Vo(Ug,n);return l.open&&u.position==="popper"?g.jsx(xh,{...o,...i,ref:e}):null});RD.displayName=Ug;var TD="SelectBubbleInput",Gw=D.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const o=D.useRef(null),l=St(i,o),u=BR(e);return D.useEffect(()=>{const a=o.current;if(!a)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==e&&p){const h=new Event("change",{bubbles:!0});p.call(a,e),a.dispatchEvent(h)}},[u,e]),g.jsx(Xe.select,{...n,style:{...lS,...n.style},ref:l,defaultValue:e})});Gw.displayName=TD;function Kw(t){return t===""||t===void 0}function Yw(t){const e=Un(t),n=D.useRef(""),i=D.useRef(0),o=D.useCallback(u=>{const a=n.current+u;e(a),(function d(f){n.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(a)},[e]),l=D.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function Xw(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 u=ND(t,Math.max(l,0));o.length===1&&(u=u.filter(f=>f!==n));const d=u.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function ND(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var DD=ww,MD=kw,jD=Aw,OD=Rw,LD=Tw,ID=Nw,zD=Ow,BD=Iw,PD=Bw,FD=Fw,HD=Hw,UD=$w,$D=Vw,VD=qw,qD="Separator",_b="horizontal",WD=["horizontal","vertical"],Qw=D.forwardRef((t,e)=>{const{decorative:n,orientation:i=_b,...o}=t,l=GD(i)?i:_b,a=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return g.jsx(Xe.div,{"data-orientation":l,...a,...o,ref:e})});Qw.displayName=qD;function GD(t){return WD.includes(t)}var KD=Qw,Mh="Tabs",[YD]=Ur(Mh,[Sh]),Zw=Sh(),[XD,V1]=YD(Mh),Jw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:u="horizontal",dir:a,activationMode:d="automatic",...f}=t,p=Qu(a),[h,_]=Ls({prop:i,onChange:o,defaultProp:l!=null?l:"",caller:Mh});return g.jsx(XD,{scope:n,baseId:kn(),value:h,onValueChange:_,orientation:u,dir:p,activationMode:d,children:g.jsx(Xe.div,{dir:p,"data-orientation":u,...f,ref:e})})});Jw.displayName=Mh;var eC="TabsList",tC=D.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...o}=t,l=V1(eC,n),u=Zw(n);return g.jsx(m2,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:g.jsx(Xe.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:e})})});tC.displayName=eC;var nC="TabsTrigger",rC=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=t,u=V1(nC,n),a=Zw(n),d=oC(u.baseId,i),f=aC(u.baseId,i),p=i===u.value;return g.jsx(g2,{asChild:!0,...a,focusable:!o,active:p,children:g.jsx(Xe.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...l,ref:e,onMouseDown:Le(t.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?u.onValueChange(i):h.preventDefault()}),onKeyDown:Le(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&u.onValueChange(i)}),onFocus:Le(t.onFocus,()=>{const h=u.activationMode!=="manual";!p&&!o&&h&&u.onValueChange(i)})})})});rC.displayName=nC;var iC="TabsContent",sC=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...u}=t,a=V1(iC,n),d=oC(a.baseId,i),f=aC(a.baseId,i),p=i===a.value,h=D.useRef(p);return D.useEffect(()=>{const _=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(_)},[]),g.jsx(Tn,{present:o||p,children:({present:_})=>g.jsx(Xe.div,{"data-state":p?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":d,hidden:!_,id:f,tabIndex:0,...u,ref:e,style:{...t.style,animationDuration:h.current?"0s":void 0},children:_&&l})})});sC.displayName=iC;function oC(t,e){return`${t}-trigger-${e}`}function aC(t,e){return`${t}-content-${e}`}var QD=Jw,ZD=tC,JD=rC,eM=sC,[jh]=Ur("Tooltip",[Ho]),Oh=Ho(),lC="TooltipProvider",tM=700,$g="tooltip.open",[nM,q1]=jh(lC),cC=t=>{const{__scopeTooltip:e,delayDuration:n=tM,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=t,u=D.useRef(!0),a=D.useRef(!1),d=D.useRef(0);return D.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(nM,{scope:e,isOpenDelayedRef:u,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:D.useCallback(f=>{a.current=f},[]),disableHoverableContent:o,children:l})};cC.displayName=lC;var Fu="Tooltip",[rM,od]=jh(Fu),uC=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:o,onOpenChange:l,disableHoverableContent:u,delayDuration:a}=t,d=q1(Fu,t.__scopeTooltip),f=Oh(e),[p,h]=D.useState(null),_=kn(),S=D.useRef(0),C=u!=null?u:d.disableHoverableContent,w=a!=null?a:d.delayDuration,v=D.useRef(!1),[b,y]=Ls({prop:i,defaultProp:o!=null?o:!1,onChange:M=>{M?(d.onOpen(),document.dispatchEvent(new CustomEvent($g))):d.onClose(),l==null||l(M)},caller:Fu}),x=D.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),k=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,v.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(()=>{v.current=!0,y(!0),S.current=0},w)},[w,y]);return D.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(yh,{...f,children:g.jsx(rM,{scope:e,contentId:_,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:D.useCallback(()=>{d.isOpenDelayedRef.current?A():k()},[d.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})})};uC.displayName=Fu;var Vg="TooltipTrigger",dC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=od(Vg,n),l=q1(Vg,n),u=Oh(n),a=D.useRef(null),d=St(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(td,{asChild:!0,...u,children:g.jsx(Xe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:d,onPointerMove:Le(t.onPointerMove,_=>{_.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Le(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Le(t.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Le(t.onFocus,()=>{f.current||o.onOpen()}),onBlur:Le(t.onBlur,o.onClose),onClick:Le(t.onClick,o.onClose)})})});dC.displayName=Vg;var W1="TooltipPortal",[iM,sM]=jh(W1,{forceMount:void 0}),fC=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:o}=t,l=od(W1,e);return g.jsx(iM,{scope:e,forceMount:n,children:g.jsx(Tn,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};fC.displayName=W1;var dc="TooltipContent",hC=D.forwardRef((t,e)=>{const n=sM(dc,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=t,u=od(dc,t.__scopeTooltip);return g.jsx(Tn,{present:i||u.open,children:u.disableHoverableContent?g.jsx(pC,{side:o,...l,ref:e}):g.jsx(oM,{side:o,...l,ref:e})})}),oM=D.forwardRef((t,e)=>{const n=od(dc,t.__scopeTooltip),i=q1(dc,t.__scopeTooltip),o=D.useRef(null),l=St(e,o),[u,a]=D.useState(null),{trigger:d,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=i,_=D.useCallback(()=>{a(null),h(!1)},[h]),S=D.useCallback((C,w)=>{const v=C.currentTarget,b={x:C.clientX,y:C.clientY},y=uM(b,v.getBoundingClientRect()),x=dM(b,y),k=fM(w.getBoundingClientRect()),N=pM([...x,...k]);a(N),h(!0)},[h]);return D.useEffect(()=>()=>_(),[_]),D.useEffect(()=>{if(d&&p){const C=v=>S(v,p),w=v=>S(v,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",w),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",w)}}},[d,p,S,_]),D.useEffect(()=>{if(u){const C=w=>{const v=w.target,b={x:w.clientX,y:w.clientY},y=(d==null?void 0:d.contains(v))||(p==null?void 0:p.contains(v)),x=!hM(b,u);y?_():x&&(_(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,f,_]),g.jsx(pC,{...t,ref:l})}),[aM,lM]=jh(Fu,{isInside:!1}),cM=sA("TooltipContent"),pC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...a}=t,d=od(dc,n),f=Oh(n),{onClose:p}=d;return D.useEffect(()=>(document.addEventListener($g,p),()=>document.removeEventListener($g,p)),[p]),D.useEffect(()=>{if(d.trigger){const h=_=>{const S=_.target;S!=null&&S.contains(d.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,p]),g.jsx(yc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:g.jsxs(bh,{"data-state":d.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(cM,{children:i}),g.jsx(aM,{scope:n,isInside:!0,children:g.jsx(dA,{id:d.contentId,role:"tooltip",children:o||i})})]})})});hC.displayName=dc;var mC="TooltipArrow",gC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=Oh(n);return lM(mC,n).isInside?null:g.jsx(xh,{...o,...i,ref:e})});gC.displayName=mC;function uM(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 dM(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 fM(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 hM(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const a=e[l],d=e[u],f=a.x,p=a.y,h=d.x,_=d.y;p>i!=_>i&&n<(h-f)*(i-p)/(_-p)+f&&(o=!o)}return o}function pM(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),mM(e)}function mM(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],u=e[e.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.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],u=n[n.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.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 gM=cC,vM=uC,_M=dC,yM=fC,bM=hC,xM=gC;const SM=(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},wM=(t,e)=>({classGroupId:t,validator:e}),vC=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Kf="-",yb=[],CM="arbitrary..",kM=t=>{const e=AM(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return EM(u);const a=u.split(Kf),d=a[0]===""&&a.length>1?1:0;return _C(a,d,e)},getConflictingClassGroupIds:(u,a)=>{if(a){const d=i[u],f=n[u];return d?f?SM(f,d):d:f||yb}return n[u]||yb}}},_C=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const f=_C(t,e+1,l);if(f)return f}const u=n.validators;if(u===null)return;const a=e===0?t.join(Kf):t.slice(e).join(Kf),d=u.length;for(let f=0;f<d;f++){const p=u[f];if(p.validator(a))return p.classGroupId}},EM=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?CM+i:void 0})(),AM=t=>{const{theme:e,classGroups:n}=t;return RM(n,e)},RM=(t,e)=>{const n=vC();for(const i in t){const o=t[i];G1(o,n,i,e)}return n},G1=(t,e,n,i)=>{const o=t.length;for(let l=0;l<o;l++){const u=t[l];TM(u,e,n,i)}},TM=(t,e,n,i)=>{if(typeof t=="string"){NM(t,e,n);return}if(typeof t=="function"){DM(t,e,n,i);return}MM(t,e,n,i)},NM=(t,e,n)=>{const i=t===""?e:yC(e,t);i.classGroupId=n},DM=(t,e,n,i)=>{if(jM(t)){G1(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(wM(n,t))},MM=(t,e,n,i)=>{const o=Object.entries(t),l=o.length;for(let u=0;u<l;u++){const[a,d]=o[u];G1(d,yC(e,a),n,i)}},yC=(t,e)=>{let n=t;const i=e.split(Kf),o=i.length;for(let l=0;l<o;l++){const u=i[l];let a=n.nextPart.get(u);a||(a=vC(),n.nextPart.set(u,a)),n=a}return n},jM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,OM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=i[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},qg="!",bb=":",LM=[],xb=(t,e,n,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),IM=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=o=>{const l=[];let u=0,a=0,d=0,f;const p=o.length;for(let w=0;w<p;w++){const v=o[w];if(u===0&&a===0){if(v===bb){l.push(o.slice(d,w)),d=w+1;continue}if(v==="/"){f=w;continue}}v==="["?u++:v==="]"?u--:v==="("?a++:v===")"&&a--}const h=l.length===0?o:o.slice(d);let _=h,S=!1;h.endsWith(qg)?(_=h.slice(0,-1),S=!0):h.startsWith(qg)&&(_=h.slice(1),S=!0);const C=f&&f>d?f-d:void 0;return xb(l,S,_,C)};if(e){const o=e+bb,l=i;i=u=>u.startsWith(o)?l(u.slice(o.length)):xb(LM,!1,u,void 0,!0)}if(n){const o=i;i=l=>n({className:l,parseClassName:o})}return i},zM=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 u=n[l],a=u[0]==="[",d=e.has(u);a||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(u)):o.push(u)}return o.length>0&&(o.sort(),i.push(...o)),i}},BM=t=>({cache:OM(t.cacheSize),parseClassName:IM(t),sortModifiers:zM(t),...kM(t)}),PM=/\s+/,FM=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],a=t.trim().split(PM);let d="";for(let f=a.length-1;f>=0;f-=1){const p=a[f],{isExternal:h,modifiers:_,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:w}=n(p);if(h){d=p+(d.length>0?" "+d:d);continue}let v=!!w,b=i(v?C.substring(0,w):C);if(!b){if(!v){d=p+(d.length>0?" "+d:d);continue}if(b=i(C),!b){d=p+(d.length>0?" "+d:d);continue}v=!1}const y=_.length===0?"":_.length===1?_[0]:l(_).join(":"),x=S?y+qg:y,k=x+b;if(u.indexOf(k)>-1)continue;u.push(k);const N=o(b,v);for(let A=0;A<N.length;++A){const M=N[A];u.push(x+M)}d=p+(d.length>0?" "+d:d)}return d},HM=(...t)=>{let e=0,n,i,o="";for(;e<t.length;)(n=t[e++])&&(i=bC(n))&&(o&&(o+=" "),o+=i);return o},bC=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=bC(t[i]))&&(n&&(n+=" "),n+=e);return n},UM=(t,...e)=>{let n,i,o,l;const u=d=>{const f=e.reduce((p,h)=>h(p),t());return n=BM(f),i=n.cache.get,o=n.cache.set,l=a,a(d)},a=d=>{const f=i(d);if(f)return f;const p=FM(d,n);return o(d,p),p};return l=u,(...d)=>l(HM(...d))},$M=[],Cn=t=>{const e=n=>n[t]||$M;return e.isThemeGetter=!0,e},xC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WM=/\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$/,GM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,To=t=>VM.test(t),xt=t=>!!t&&!Number.isNaN(Number(t)),No=t=>!!t&&Number.isInteger(Number(t)),Zm=t=>t.endsWith("%")&&xt(t.slice(0,-1)),Ts=t=>qM.test(t),wC=()=>!0,XM=t=>WM.test(t)&&!GM.test(t),K1=()=>!1,QM=t=>KM.test(t),ZM=t=>YM.test(t),JM=t=>!Ve(t)&&!qe(t),ej=t=>qo(t,EC,K1),Ve=t=>xC.test(t),Ma=t=>qo(t,AC,XM),Sb=t=>qo(t,lj,xt),tj=t=>qo(t,TC,wC),nj=t=>qo(t,RC,K1),wb=t=>qo(t,CC,K1),rj=t=>qo(t,kC,ZM),Sf=t=>qo(t,NC,QM),qe=t=>SC.test(t),yu=t=>qa(t,AC),ij=t=>qa(t,RC),Cb=t=>qa(t,CC),sj=t=>qa(t,EC),oj=t=>qa(t,kC),wf=t=>qa(t,NC,!0),aj=t=>qa(t,TC,!0),qo=(t,e,n)=>{const i=xC.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},qa=(t,e,n=!1)=>{const i=SC.exec(t);return i?i[1]?e(i[1]):n:!1},CC=t=>t==="position"||t==="percentage",kC=t=>t==="image"||t==="url",EC=t=>t==="length"||t==="size"||t==="bg-size",AC=t=>t==="length",lj=t=>t==="number",RC=t=>t==="family-name",TC=t=>t==="number"||t==="weight",NC=t=>t==="shadow",cj=()=>{const t=Cn("color"),e=Cn("font"),n=Cn("text"),i=Cn("font-weight"),o=Cn("tracking"),l=Cn("leading"),u=Cn("breakpoint"),a=Cn("container"),d=Cn("spacing"),f=Cn("radius"),p=Cn("shadow"),h=Cn("inset-shadow"),_=Cn("text-shadow"),S=Cn("drop-shadow"),C=Cn("blur"),w=Cn("perspective"),v=Cn("aspect"),b=Cn("ease"),y=Cn("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(),qe,Ve],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],T=()=>[qe,Ve,d],j=()=>[To,"full","auto",...T()],O=()=>[No,"none","subgrid",qe,Ve],I=()=>["auto",{span:["full",No,qe,Ve]},No,qe,Ve],V=()=>[No,"auto",qe,Ve],U=()=>["auto","min","max","fr",qe,Ve],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],Z=()=>[To,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],ee=()=>[To,"screen","full","dvw","lvw","svw","min","max","fit",...T()],B=()=>[To,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[t,qe,Ve],z=()=>[...k(),Cb,wb,{position:[qe,Ve]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",sj,ej,{size:[qe,Ve]}],Q=()=>[Zm,yu,Ma],te=()=>["","none","full",f,qe,Ve],X=()=>["",xt,yu,Ma],q=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[xt,Zm,Cb,wb],ie=()=>["","none",C,qe,Ve],ae=()=>["none",xt,qe,Ve],se=()=>["none",xt,qe,Ve],ye=()=>[xt,qe,Ve],Re=()=>[To,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ts],breakpoint:[Ts],color:[wC],container:[Ts],"drop-shadow":[Ts],ease:["in","out","in-out"],font:[JM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ts],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ts],shadow:[Ts],spacing:["px",xt],text:[Ts],"text-shadow":[Ts],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",To,Ve,qe,v]}],container:["container"],columns:[{columns:[xt,Ve,qe,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:[No,"auto",qe,Ve]}],basis:[{basis:[To,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,To,"auto","initial","none",Ve]}],grow:[{grow:["",xt,qe,Ve]}],shrink:[{shrink:["",xt,qe,Ve]}],order:[{order:[No,"first","last","none",qe,Ve]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"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:Z()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[u]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,yu,Ma]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,aj,tj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zm,Ve]}],"font-family":[{font:[ij,nj,e]}],"font-features":[{"font-features":[Ve]}],"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,qe,Ve]}],"line-clamp":[{"line-clamp":[xt,"none",qe,Sb]}],leading:[{leading:[l,...T()]}],"list-image":[{"list-image":["none",qe,Ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",qe,Ve]}],"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:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",qe,Ma]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[xt,"auto",qe,Ve]}],"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",qe,Ve]}],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",qe,Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},No,qe,Ve],radial:["",qe,Ve],conic:[No,qe,Ve]},oj,rj]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"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:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,qe,Ve]}],"outline-w":[{outline:["",xt,yu,Ma]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",p,wf,Sf]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,wf,Sf]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[xt,Ma]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",_,wf,Sf]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[xt,qe,Ve]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"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":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"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":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"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":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"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":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"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":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"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":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[qe,Ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"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":[xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"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:z()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",qe,Ve]}],filter:[{filter:["","none",qe,Ve]}],blur:[{blur:ie()}],brightness:[{brightness:[xt,qe,Ve]}],contrast:[{contrast:[xt,qe,Ve]}],"drop-shadow":[{"drop-shadow":["","none",S,wf,Sf]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",xt,qe,Ve]}],"hue-rotate":[{"hue-rotate":[xt,qe,Ve]}],invert:[{invert:["",xt,qe,Ve]}],saturate:[{saturate:[xt,qe,Ve]}],sepia:[{sepia:["",xt,qe,Ve]}],"backdrop-filter":[{"backdrop-filter":["","none",qe,Ve]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[xt,qe,Ve]}],"backdrop-contrast":[{"backdrop-contrast":[xt,qe,Ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,qe,Ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,qe,Ve]}],"backdrop-invert":[{"backdrop-invert":["",xt,qe,Ve]}],"backdrop-opacity":[{"backdrop-opacity":[xt,qe,Ve]}],"backdrop-saturate":[{"backdrop-saturate":[xt,qe,Ve]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,qe,Ve]}],"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",qe,Ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",qe,Ve]}],ease:[{ease:["linear","initial",b,qe,Ve]}],delay:[{delay:[xt,qe,Ve]}],animate:[{animate:["none",y,qe,Ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,qe,Ve]}],"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:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[qe,Ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Re()}],"translate-x":[{"translate-x":Re()}],"translate-y":[{"translate-y":Re()}],"translate-z":[{"translate-z":Re()}],"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",qe,Ve]}],"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",qe,Ve]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[xt,yu,Ma,Sb]}],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"]}},uj=UM(cj);function Ee(...t){return uj(lh(t))}const dj=_c("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=ge.c(16);let n,i,o,l,u;e[0]!==t?({className:n,variant:o,size:l,asChild:u,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5]);const a=o===void 0?"default":o,d=l===void 0?"default":l,p=(u===void 0?!1:u)?Xu:"button";let h;e[6]!==n||e[7]!==d||e[8]!==a?(h=Ee(dj({variant:a,size:d,className:n})),e[6]=n,e[7]=d,e[8]=a,e[9]=h):h=e[9];let _;return e[10]!==p||e[11]!==i||e[12]!==d||e[13]!==h||e[14]!==a?(_=g.jsx(p,{"data-slot":"button","data-variant":a,"data-size":d,className:h,...i}),e[10]=p,e[11]=i,e[12]=d,e[13]=h,e[14]=a,e[15]=_):_=e[15],_}function ad(){const t=ge.c(1),e=fj;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={fetchWithAuth:e},t[0]=n):n=t[0],n}async function fj(t,e,n){const i=e===void 0?{}:e,{serverUrl:o,token:l}=n||{};let u=t;t.startsWith("/")&&o&&(u=`http://${o}${t}`);const a=new Headers(i.headers||{});return l&&a.set("Authorization",`Bearer ${l}`),fetch(u,{...i,headers:a})}function hj(...t){return t.map((e,n)=>n===0?e.replace(/\/+$/,""):e.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function Cc(t){const e=ge.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(_1,{"data-slot":"dialog",...n}),e[2]=n,e[3]=i):i=e[3],i}function pj(t){const e=ge.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(y1,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function mj(t){const e=ge.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(ph,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=i):i=e[3],i}function gj(t){const e=ge.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(b1,{"data-slot":"dialog-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function kc(t){const e=ge.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 u=l===void 0?!0:l;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(gj,{}),e[5]=a):a=e[5];let d;e[6]!==i?(d=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]=d):d=e[7];let f;e[8]!==u?(f=u&&g.jsx(ph,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[g.jsx(Ms,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[8]=u,e[9]=f):f=e[9];let p;return e[10]!==n||e[11]!==o||e[12]!==d||e[13]!==f?(p=g.jsxs(pj,{children:[a,g.jsxs(x1,{"data-slot":"dialog-content",className:d,...o,children:[n,f]})]}),e[10]=n,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function Ec(t){const e=ge.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 Lh(t){const e=ge.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 u=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 d;e[7]!==u?(d=u&&g.jsx(ph,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:"Close"})}),e[7]=u,e[8]=d):d=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==d?(f=g.jsxs("div",{"data-slot":"dialog-footer",className:a,...o,children:[n,d]}),e[9]=n,e[10]=o,e[11]=a,e[12]=d,e[13]=f):f=e[13],f}function Ac(t){const e=ge.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(HS,{"data-slot":"dialog-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ld(t){const e=ge.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(US,{"data-slot":"dialog-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Mf(t){const e=ge.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 u;return e[6]!==i||e[7]!==l||e[8]!==o?(u=g.jsx("input",{type:o,"data-slot":"input",className:l,...i}),e[6]=i,e[7]=l,e[8]=o,e[9]=u):u=e[9],u}const Rc=D.forwardRef((t,e)=>{const n=ge.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 u;n[4]!==o?(u=Ee("relative overflow-hidden",o),n[4]=o,n[5]=u):u=n[5];let a;n[6]===Symbol.for("react.memo_cache_sentinel")?(a={WebkitOverflowScrolling:"touch"},n[6]=a):a=n[6];let d;n[7]!==i||n[8]!==e?(d=g.jsx(lD,{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]=d):d=n[9];let f,p;n[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(vj,{}),p=g.jsx(cD,{}),n[10]=f,n[11]=p):(f=n[10],p=n[11]);let h;return n[12]!==l||n[13]!==u||n[14]!==d?(h=g.jsxs(aD,{"data-slot":"scroll-area",className:u,...l,children:[d,f,p]}),n[12]=l,n[13]=u,n[14]=d,n[15]=h):h=n[15],h});Rc.displayName="ScrollArea";function vj(t){const e=ge.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 u;e[4]!==n?(u=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]=u):u=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(_w,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==i||e[9]!==u?(d=g.jsx(pw,{"data-slot":"scroll-area-scrollbar","data-orientation":l,orientation:l,className:u,...i,children:a}),e[7]=l,e[8]=i,e[9]=u,e[10]=d):d=e[10],d}function _j({open:t,onOpenChange:e,onSelect:n,initialPath:i,title:o="Select Folder"}){var F;const[l,u]=D.useState(i||""),[a,d]=D.useState([]),[f,p]=D.useState(!1),[h,_]=D.useState(0),[S,C]=D.useState(null),[w,v]=D.useState(""),[b,y]=D.useState(!1),[x,k]=D.useState([]),[N,A]=D.useState(!1),M=D.useRef(null),T=D.useRef(null),{fetchWithAuth:j}=ad(),{activeServer:O}=vc(),I=D.useCallback(async Q=>{var te;p(!0),C(null),_(0),v(""),A(!1);try{const X=await j(`/api/fs/browse?path=${encodeURIComponent(Q)}`,{},{serverUrl:O==null?void 0:O.url,token:O==null?void 0:O.token}),q=await X.json();if(!X.ok)throw new Error(q.message||"Failed to browse directory");const $=q.files.filter(ne=>ne.type==="directory");d($),u(q.currentPath),y((te=q.isRoot)!=null?te:!1)}catch(X){C(X instanceof Error?X.message:"Failed to load directory"),d([])}finally{p(!1)}},[j,O]),V=D.useCallback(async()=>{try{const te=await(await j("/api/fs/drives",{},{serverUrl:O==null?void 0:O.url,token:O==null?void 0:O.token})).json();k(te.drives||[])}catch{}},[j,O]);D.useEffect(()=>{t&&(I(i||""),V())},[t,i,I,V]),D.useEffect(()=>{_(0)},[w]);const U=a.filter(Q=>Q.name.toLowerCase().includes(w.toLowerCase())),W=(F=U[h])!=null?F:null,K=D.useCallback(Q=>hj(l,Q.name),[l]),G=W?K(W):l,Z=!W,ee=async()=>{var Q;p(!0),C(null);try{const te=await j(`/api/fs/parent?path=${encodeURIComponent(l)}`,{},{serverUrl:O==null?void 0:O.url,token:O==null?void 0:O.token}),X=await te.json();if(!te.ok)throw new Error(X.message||"Failed to navigate up");const q=X.files.filter($=>$.type==="directory");d(q),u(X.currentPath),y((Q=X.isRoot)!=null?Q:!1),_(0),v("")}catch(te){C(te instanceof Error?te.message:"Failed to navigate up")}finally{p(!1)}},B=()=>{G&&(n(G),e(!1))},L=Q=>{const te=K(Q);I(te)},z=Q=>{if(U.length!==0)switch(Q.key){case"ArrowDown":Q.preventDefault(),_(te=>Math.min(te+1,U.length-1));break;case"ArrowRight":U[h]&&(Q.preventDefault(),L(U[h]));break;case"ArrowUp":Q.preventDefault(),_(te=>Math.max(te-1,0));break;case"Enter":Q.preventDefault(),B();break;case"Escape":w&&(Q.preventDefault(),v(""));break}};D.useEffect(()=>{if(T.current&&U.length>0){const Q=T.current.children[h];Q&&Q.scrollIntoView({block:"nearest"})}},[h,U.length]),D.useEffect(()=>{t&&setTimeout(()=>{var Q;return(Q=M.current)==null?void 0:Q.focus()},100)},[t]),D.useEffect(()=>{A(!1)},[l]);const H=(Q,te=50)=>{if(Q.length<=te)return Q;const X=Q.split(/[/\\]/);return X.length<=2?Q:".../"+X.slice(-2).join("/")};return g.jsx(Cc,{open:t,onOpenChange:e,children:g.jsxs(kc,{className:"sm:max-w-lg",onKeyDown:z,children:[g.jsx(Ec,{children:g.jsx(Ac,{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:ee,disabled:f||!l||b,children:g.jsx(n4,{className:"w-4 h-4"})}),x.length>1&&g.jsxs("div",{className:"relative",children:[g.jsx(Pe,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:()=>A(Q=>!Q),disabled:f,children:g.jsx(O4,{className:"w-4 h-4"})}),N&&g.jsx("div",{className:"absolute top-full left-0 mt-1 bg-popover border rounded-md shadow-md z-50 min-w-[120px]",children:x.map(Q=>g.jsxs("button",{onClick:()=>{I(Q),A(!1)},className:Ee("flex items-center gap-2 w-full px-3 py-1.5 text-sm text-left hover:bg-muted",l===Q&&"bg-primary/20 text-primary font-medium"),children:[g.jsx(Ds,{className:"w-3.5 h-3.5 text-amber-500"}),Q]},Q))})]}),g.jsx("span",{className:"flex-1 text-sm font-mono truncate",title:G,children:W?g.jsx("span",{className:"text-primary",children:H(K(W),45)}):H(l)||"Home"})]}),g.jsxs("div",{className:"relative",children:[g.jsx(c1,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),g.jsx(Mf,{ref:M,placeholder:"Filter folders...",value:w,onChange:Q=>v(Q.target.value),className:"pl-8"})]}),g.jsx(Rc,{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(Br,{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:()=>I(l),className:"mt-2",children:"Retry"})]}):U.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm",children:[g.jsx(Ds,{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:T,children:U.map((Q,te)=>g.jsxs("button",{onClick:()=>_(te),onDoubleClick:()=>L(Q),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",te===h&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(Ds,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:Q.name}),te===h&&g.jsx(js,{className:"w-4 h-4 text-primary"})]},Q.path))})}),S&&g.jsx("p",{className:"text-xs text-destructive",children:S})]}),g.jsxs(Lh,{children:[g.jsx(Pe,{variant:"outline",onClick:()=>e(!1),children:"Cancel"}),g.jsx(Pe,{onClick:B,disabled:!G||f,children:Z?"Use This Folder":"Add Selected Folder"})]})]})})}function Wg(t){const e=ge.c(26),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:u,cancelLabel:a,onConfirm:d,variant:f}=t,p=u===void 0?"Confirm":u,h=a===void 0?"Cancel":a,_=f===void 0?"default":f;let S;e[0]!==d||e[1]!==i?(S=()=>{d(),i(!1)},e[0]=d,e[1]=i,e[2]=S):S=e[2];const C=S;let w;e[3]!==o?(w=g.jsx(Ac,{children:o}),e[3]=o,e[4]=w):w=e[4];let v;e[5]!==l?(v=g.jsx(ld,{children:l}),e[5]=l,e[6]=v):v=e[6];let b;e[7]!==w||e[8]!==v?(b=g.jsxs(Ec,{children:[w,v]}),e[7]=w,e[8]=v,e[9]=b):b=e[9];let y;e[10]!==h?(y=g.jsx(mj,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:h})}),e[10]=h,e[11]=y):y=e[11];const x=_==="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(Lh,{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(kc,{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(Cc,{open:n,onOpenChange:i,children:A}),e[22]=i,e[23]=n,e[24]=A,e[25]=M):M=e[25],M}function DC(t){const e=ge.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(xN,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}function MC(t){const e=ge.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(SN,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function jC(t){const e=ge.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 u=o===void 0?"start":o,a=l===void 0?4:l;let d;e[5]!==n?(d=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]=d):d=e[6];let f;return e[7]!==u||e[8]!==i||e[9]!==a||e[10]!==d?(f=g.jsx(wN,{children:g.jsx(CN,{"data-slot":"dropdown-menu-content",sideOffset:a,align:u,className:d,...i})}),e[7]=u,e[8]=i,e[9]=a,e[10]=d,e[11]=f):f=e[11],f}function Nu(t){const e=ge.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 u=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 d;return e[7]!==i||e[8]!==o||e[9]!==a||e[10]!==u?(d=g.jsx(kN,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":u,className:a,...o}),e[7]=i,e[8]=o,e[9]=a,e[10]=u,e[11]=d):d=e[11],d}var kb=1,yj=.9,bj=.8,xj=.17,Jm=.1,eg=.999,Sj=.9999,wj=.99,Cj=/[\\\/_+.#"@\[\(\{&]/,kj=/[\\\/_+.#"@\[\(\{&]/g,Ej=/[\s-]/,OC=/[\s-]/g;function Gg(t,e,n,i,o,l,u){if(l===e.length)return o===t.length?kb:wj;var a=`${o},${l}`;if(u[a]!==void 0)return u[a];for(var d=i.charAt(l),f=n.indexOf(d,o),p=0,h,_,S,C;f>=0;)h=Gg(t,e,n,i,f+1,l+1,u),h>p&&(f===o?h*=kb:Cj.test(t.charAt(f-1))?(h*=bj,S=t.slice(o,f-1).match(kj),S&&o>0&&(h*=Math.pow(eg,S.length))):Ej.test(t.charAt(f-1))?(h*=yj,C=t.slice(o,f-1).match(OC),C&&o>0&&(h*=Math.pow(eg,C.length))):(h*=xj,o>0&&(h*=Math.pow(eg,f-o))),t.charAt(f)!==e.charAt(l)&&(h*=Sj)),(h<Jm&&n.charAt(f-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(f-1)!==i.charAt(l))&&(_=Gg(t,e,n,i,f+1,l+2,u),_*Jm>h&&(h=_*Jm)),h>p&&(p=h),f=n.indexOf(d,f+1);return u[a]=p,p}function Eb(t){return t.toLowerCase().replace(OC," ")}function Aj(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Gg(t,e,Eb(t),Eb(e),0,0,{})}var bu='[cmdk-group=""]',tg='[cmdk-group-items=""]',Rj='[cmdk-group-heading=""]',LC='[cmdk-item=""]',Ab=`${LC}:not([aria-disabled="true"])`,Kg="cmdk-item-select",Jl="data-value",Tj=(t,e,n)=>Aj(t,e,n),IC=D.createContext(void 0),cd=()=>D.useContext(IC),zC=D.createContext(void 0),Y1=()=>D.useContext(zC),BC=D.createContext(void 0),PC=D.forwardRef((t,e)=>{let n=ec(()=>{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=ec(()=>new Set),o=ec(()=>new Map),l=ec(()=>new Map),u=ec(()=>new Set),a=FC(t),{label:d,children:f,value:p,onValueChange:h,filter:_,shouldFilter:S,loop:C,disablePointerSelection:w=!1,vimBindings:v=!0,...b}=t,y=kn(),x=kn(),k=kn(),N=D.useRef(null),A=Fj();Ha(()=>{if(p!==void 0){let H=p.trim();n.current.value=H,M.emit()}},[p]),Ha(()=>{A(6,U)},[]);let M=D.useMemo(()=>({subscribe:H=>(u.current.add(H),()=>u.current.delete(H)),snapshot:()=>n.current,setState:(H,F,Q)=>{var te,X,q,$;if(!Object.is(n.current[H],F)){if(n.current[H]=F,H==="search")V(),O(),A(1,I);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(k);ne?ne.focus():(te=document.getElementById(y))==null||te.focus()}if(A(7,()=>{var ne;n.current.selectedItemId=(ne=W())==null?void 0:ne.id,M.emit()}),Q||A(5,U),((X=a.current)==null?void 0:X.value)!==void 0){let ne=F!=null?F:"";($=(q=a.current).onValueChange)==null||$.call(q,ne);return}}M.emit()}},emit:()=>{u.current.forEach(H=>H())}}),[]),T=D.useMemo(()=>({value:(H,F,Q)=>{var te;F!==((te=l.current.get(H))==null?void 0:te.value)&&(l.current.set(H,{value:F,keywords:Q}),n.current.filtered.items.set(H,j(F,Q)),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,()=>{V(),O(),n.current.value||I(),M.emit()}),()=>{l.current.delete(H),i.current.delete(H),n.current.filtered.items.delete(H);let Q=W();A(4,()=>{V(),(Q==null?void 0:Q.getAttribute("id"))===H&&I(),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:d||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:k,labelId:x,listInnerRef:N}),[]);function j(H,F){var Q,te;let X=(te=(Q=a.current)==null?void 0:Q.filter)!=null?te:Tj;return H?X(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(te=>{let X=o.current.get(te),q=0;X.forEach($=>{let ne=H.get($);q=Math.max(ne,q)}),F.push([te,q])});let Q=N.current;K().sort((te,X)=>{var q,$;let ne=te.getAttribute("id"),ie=X.getAttribute("id");return((q=H.get(ie))!=null?q:0)-(($=H.get(ne))!=null?$:0)}).forEach(te=>{let X=te.closest(tg);X?X.appendChild(te.parentElement===X?te:te.closest(`${tg} > *`)):Q.appendChild(te.parentElement===Q?te:te.closest(`${tg} > *`))}),F.sort((te,X)=>X[1]-te[1]).forEach(te=>{var X;let q=(X=N.current)==null?void 0:X.querySelector(`${bu}[${Jl}="${encodeURIComponent(te[0])}"]`);q==null||q.parentElement.appendChild(q)})}function I(){let H=K().find(Q=>Q.getAttribute("aria-disabled")!=="true"),F=H==null?void 0:H.getAttribute(Jl);M.setState("value",F||void 0)}function V(){var H,F,Q,te;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let q of i.current){let $=(F=(H=l.current.get(q))==null?void 0:H.value)!=null?F:"",ne=(te=(Q=l.current.get(q))==null?void 0:Q.keywords)!=null?te:[],ie=j($,ne);n.current.filtered.items.set(q,ie),ie>0&&X++}for(let[q,$]of o.current)for(let ne of $)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(q);break}n.current.filtered.count=X}function U(){var H,F,Q;let te=W();te&&(((H=te.parentElement)==null?void 0:H.firstChild)===te&&((Q=(F=te.closest(bu))==null?void 0:F.querySelector(Rj))==null||Q.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function W(){var H;return(H=N.current)==null?void 0:H.querySelector(`${LC}[aria-selected="true"]`)}function K(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(Ab))||[])}function G(H){let F=K()[H];F&&M.setState("value",F.getAttribute(Jl))}function Z(H){var F;let Q=W(),te=K(),X=te.findIndex($=>$===Q),q=te[X+H];(F=a.current)!=null&&F.loop&&(q=X+H<0?te[te.length-1]:X+H===te.length?te[0]:te[X+H]),q&&M.setState("value",q.getAttribute(Jl))}function ee(H){let F=W(),Q=F==null?void 0:F.closest(bu),te;for(;Q&&!te;)Q=H>0?Bj(Q,bu):Pj(Q,bu),te=Q==null?void 0:Q.querySelector(Ab);te?M.setState("value",te.getAttribute(Jl)):Z(H)}let B=()=>G(K().length-1),L=H=>{H.preventDefault(),H.metaKey?B():H.altKey?ee(1):Z(1)},z=H=>{H.preventDefault(),H.metaKey?G(0):H.altKey?ee(-1):Z(-1)};return D.createElement(Xe.div,{ref:e,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:H=>{var F;(F=b.onKeyDown)==null||F.call(b,H);let Q=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||Q))switch(H.key){case"n":case"j":{v&&H.ctrlKey&&L(H);break}case"ArrowDown":{L(H);break}case"p":case"k":{v&&H.ctrlKey&&z(H);break}case"ArrowUp":{z(H);break}case"Home":{H.preventDefault(),G(0);break}case"End":{H.preventDefault(),B();break}case"Enter":{H.preventDefault();let te=W();if(te){let X=new Event(Kg);te.dispatchEvent(X)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Uj},d),Ih(t,H=>D.createElement(zC.Provider,{value:M},D.createElement(IC.Provider,{value:T},H))))}),Nj=D.forwardRef((t,e)=>{var n,i;let o=kn(),l=D.useRef(null),u=D.useContext(BC),a=cd(),d=FC(t),f=(i=(n=d.current)==null?void 0:n.forceMount)!=null?i:u==null?void 0:u.forceMount;Ha(()=>{if(!f)return a.item(o,u==null?void 0:u.id)},[f]);let p=HC(o,l,[t.value,t.children,l],t.keywords),h=Y1(),_=zo(A=>A.value&&A.value===p.current),S=zo(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(Kg,C),()=>A.removeEventListener(Kg,C)},[S,t.onSelect,t.disabled]);function C(){var A,M;w(),(M=(A=d.current).onSelect)==null||M.call(A,p.current)}function w(){h.setState("value",p.current,!0)}if(!S)return null;let{disabled:v,value:b,onSelect:y,forceMount:x,keywords:k,...N}=t;return D.createElement(Xe.div,{ref:Os(l,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!_,"data-disabled":!!v,"data-selected":!!_,onPointerMove:v||a.getDisablePointerSelection()?void 0:w,onClick:v?void 0:C},t.children)}),Dj=D.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:o,...l}=t,u=kn(),a=D.useRef(null),d=D.useRef(null),f=kn(),p=cd(),h=zo(S=>o||p.filter()===!1?!0:S.search?S.filtered.groups.has(u):!0);Ha(()=>p.group(u),[]),HC(u,a,[t.value,t.heading,d]);let _=D.useMemo(()=>({id:u,forceMount:o}),[o]);return D.createElement(Xe.div,{ref:Os(a,e),...l,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&D.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Ih(t,S=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},D.createElement(BC.Provider,{value:_},S))))}),Mj=D.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,o=D.useRef(null),l=zo(u=>!u.search);return!n&&!l?null:D.createElement(Xe.div,{ref:Os(o,e),...i,"cmdk-separator":"",role:"separator"})}),jj=D.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,o=t.value!=null,l=Y1(),u=zo(f=>f.search),a=zo(f=>f.selectedItemId),d=cd();return D.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),D.createElement(Xe.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":a,id:d.inputId,type:"text",value:o?t.value:u,onChange:f=>{o||l.setState("search",f.target.value),n==null||n(f.target.value)}})}),Oj=D.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...o}=t,l=D.useRef(null),u=D.useRef(null),a=zo(f=>f.selectedItemId),d=cd();return D.useEffect(()=>{if(u.current&&l.current){let f=u.current,p=l.current,h,_=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let S=f.offsetHeight;p.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return _.observe(f),()=>{cancelAnimationFrame(h),_.unobserve(f)}}},[]),D.createElement(Xe.div,{ref:Os(l,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:d.listId},Ih(t,f=>D.createElement("div",{ref:Os(u,d.listInnerRef),"cmdk-list-sizer":""},f)))}),Lj=D.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:l,container:u,...a}=t;return D.createElement(_1,{open:n,onOpenChange:i},D.createElement(y1,{container:u},D.createElement(b1,{"cmdk-overlay":"",className:o}),D.createElement(x1,{"aria-label":t.label,"cmdk-dialog":"",className:l},D.createElement(PC,{ref:e,...a}))))}),Ij=D.forwardRef((t,e)=>zo(n=>n.filtered.count===0)?D.createElement(Xe.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),zj=D.forwardRef((t,e)=>{let{progress:n,children:i,label:o="Loading...",...l}=t;return D.createElement(Xe.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ih(t,u=>D.createElement("div",{"aria-hidden":!0},u)))}),Wa=Object.assign(PC,{List:Oj,Item:Nj,Input:jj,Group:Dj,Separator:Mj,Dialog:Lj,Empty:Ij,Loading:zj});function Bj(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Pj(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function FC(t){let e=D.useRef(t);return Ha(()=>{e.current=t}),e}var Ha=typeof window>"u"?D.useEffect:D.useLayoutEffect;function ec(t){let e=D.useRef();return e.current===void 0&&(e.current=t()),e}function zo(t){let e=Y1(),n=()=>t(e.snapshot());return D.useSyncExternalStore(e.subscribe,n,n)}function HC(t,e,n,i=[]){let o=D.useRef(),l=cd();return Ha(()=>{var u;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}})(),d=i.map(f=>f.trim());l.value(t,a,d),(u=e.current)==null||u.setAttribute(Jl,a),o.current=a}),o}var Fj=()=>{let[t,e]=D.useState(),n=ec(()=>new Map);return Ha(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,o)=>{n.current.set(i,o),e({})}};function Hj(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Ih({asChild:t,children:e},n){return t&&D.isValidElement(e)?D.cloneElement(Hj(e),{ref:e.ref},n(e.props.children)):n(e)}var Uj={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function $j(t){const e=ge.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 Vj(t){const e=ge.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 qj=_c("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 Wj(t){const e=ge.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 u;e[4]!==l||e[5]!==n?(u=Ee(qj({align:l}),n),e[4]=l,e[5]=n,e[6]=u):u=e[6];let a;return e[7]!==l||e[8]!==i||e[9]!==u?(a=g.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":l,className:u,onClick:Gj,...i}),e[7]=l,e[8]=i,e[9]=u,e[10]=a):a=e[10],a}function Gj(t){var e,n;t.target.closest("button")||(n=(e=t.currentTarget.parentElement)==null?void 0:e.querySelector("input"))==null||n.focus()}function X1(t){const e=ge.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(Wa,{"data-slot":"command",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function UC(t){const e=ge.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(Wa.Input,{"data-slot":"command-input",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Wj,{children:g.jsx(c1,{className:"size-4 shrink-0 opacity-50"})}),e[8]=u):u=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(Vj,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[l,u]})}),e[9]=l,e[10]=a):a=e[10],a}function Q1(t){const e=ge.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(Wa.List,{"data-slot":"command-list",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Z1(t){const e=ge.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(Wa.Empty,{"data-slot":"command-empty",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Hu(t){const e=ge.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(Wa.Group,{"data-slot":"command-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function $C(t){const e=ge.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(Wa.Separator,{"data-slot":"command-separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function sc(t){const e=ge.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 u=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 d;e[7]!==u?(d=u&&g.jsx(js,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"}),e[7]=u,e[8]=d):d=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==d?(f=g.jsxs(Wa.Item,{"data-slot":"command-item",className:a,...o,children:[n,d]}),e[9]=n,e[10]=o,e[11]=a,e[12]=d,e[13]=f):f=e[13],f}function zh(t){const e=ge.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(zN,{"data-slot":"popover",...n}),e[2]=n,e[3]=i):i=e[3],i}function J1(t){const e=ge.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(PN,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Bh(t){const e=ge.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 u=o===void 0?"center":o,a=l===void 0?4:l;let d;e[5]!==n?(d=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]=d):d=e[6];let f;return e[7]!==u||e[8]!==i||e[9]!==a||e[10]!==d?(f=g.jsx(FN,{children:g.jsx(HN,{"data-slot":"popover-content",align:u,sideOffset:a,className:d,...i})}),e[7]=u,e[8]=i,e[9]=a,e[10]=d,e[11]=f):f=e[11],f}function Kj(t){const e=ge.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(BN,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=i):i=e[3],i}function Yj(t){const e=ge.c(59),{workspaces:n,activeWorkspace:i,onSelectWorkspace:o,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:u,isWorkspaceFavorited:a,onToggleFavorite:d,onDeleteWorkspace:f}=t,[p,h]=D.useState(!1),[_,S]=D.useState(!1),[C,w]=D.useState(null);let v;e[0]!==(i==null?void 0:i.isVirtual)?(v=i!=null&&i.isVirtual?g.jsx(Ag,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Ds,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=i==null?void 0:i.isVirtual,e[1]=v):v=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]!==v||e[5]!==y?(x=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[v,y]}),e[4]=v,e[5]=y,e[6]=x):x=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(qx,{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(J1,{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(UC,{placeholder:"Search workspace..."}),e[11]=A):A=e[11];let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(Z1,{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]!==d||e[17]!==n){let X;e[19]!==(i==null?void 0:i.id)||e[20]!==a||e[21]!==o||e[22]!==d?(X=q=>g.jsxs(sc,{showCheck:!1,onSelect:()=>{o(q),h(!1)},children:[g.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[q.isVirtual?g.jsx(Ag,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Ds,{className:"size-4 flex-shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate",children:q.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:$=>{$.stopPropagation(),d(q.id,q.name)},title:a(q.id)?"Remove from favorites":"Add to favorites",children:a(q.id)?g.jsx(zy,{className:"size-4 fill-primary text-primary"}):g.jsx(zy,{className:"size-4 text-muted-foreground"})}),g.jsx(js,{className:Ee("size-4",(i==null?void 0:i.id)===q.id?"opacity-100":"opacity-0")}),g.jsxs(DC,{children:[g.jsx(MC,{asChild:!0,children:g.jsxs("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:Xj,children:[g.jsx(Gx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Workspace actions"})]})}),g.jsx(jC,{align:"end",children:g.jsxs(Nu,{onClick:$=>{$.stopPropagation(),w(q)},className:"text-destructive focus:text-destructive",children:[g.jsx(gc,{className:"size-4"}),"Delete workspace"]})})]})]})]},q.id),e[19]=i==null?void 0:i.id,e[20]=a,e[21]=o,e[22]=d,e[23]=X):X=e[23],T=n.map(X),e[13]=i==null?void 0:i.id,e[14]=a,e[15]=o,e[16]=d,e[17]=n,e[18]=T}else T=e[18];let j;e[24]!==T?(j=g.jsx(Hu,{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($C,{}),e[26]=O):O=e[26];let I;e[27]!==l?(I=()=>{l(),h(!1)},e[27]=l,e[28]=I):I=e[28];let V;e[29]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsx(mc,{className:"size-4","data-icon":"inline-start"}),e[29]=V):V=e[29];let U;e[30]!==I?(U=g.jsxs(sc,{onSelect:I,children:[V,"Create virtual workspace"]}),e[30]=I,e[31]=U):U=e[31];let W;e[32]===Symbol.for("react.memo_cache_sentinel")?(W=g.jsxs(sc,{onSelect:()=>{h(!1),S(!0)},children:[g.jsx(Ds,{className:"size-4","data-icon":"inline-start"}),"Add existing folder"]}),e[32]=W):W=e[32];let K;e[33]!==U?(K=g.jsxs(Hu,{children:[U,W]}),e[33]=U,e[34]=K):K=e[34];let G;e[35]!==j||e[36]!==K?(G=g.jsx(Bh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(X1,{children:[A,g.jsxs(Q1,{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 Z;e[38]!==p||e[39]!==G||e[40]!==N?(Z=g.jsxs(zh,{open:p,onOpenChange:h,children:[N,G]}),e[38]=p,e[39]=G,e[40]=N,e[41]=Z):Z=e[41];let ee;e[42]!==u?(ee=X=>{u(X),S(!1)},e[42]=u,e[43]=ee):ee=e[43];let B;e[44]!==_||e[45]!==ee?(B=g.jsx(_j,{open:_,onOpenChange:S,onSelect:ee,title:"Select Workspace Folder"}),e[44]=_,e[45]=ee,e[46]=B):B=e[46];const L=C!==null;let z;e[47]===Symbol.for("react.memo_cache_sentinel")?(z=X=>!X&&w(null),e[47]=z):z=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 Q;e[51]!==L||e[52]!==H||e[53]!==F?(Q=g.jsx(Wg,{open:L,onOpenChange:z,title:"Delete Workspace",description:H,confirmLabel:"Delete",variant:"destructive",onConfirm:F}),e[51]=L,e[52]=H,e[53]=F,e[54]=Q):Q=e[54];let te;return e[55]!==Z||e[56]!==B||e[57]!==Q?(te=g.jsxs(g.Fragment,{children:[Z,B,Q]}),e[55]=Z,e[56]=B,e[57]=Q,e[58]=te):te=e[58],te}function Xj(t){return t.stopPropagation()}function Qj(t){const e=ge.c(33),{onOpenAddServer:n,onServerSwitch:i}=t,[o,l]=D.useState(!1),{servers:u,activeServer:a,switchServer:d}=vc();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(Ia,{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 _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(qx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[3]=_):_=e[3];let S;e[4]!==o||e[5]!==h?(S=g.jsx(J1,{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,_]})}),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(UC,{placeholder:"Search server..."}),e[7]=C):C=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(Z1,{children:"No server found."}),e[8]=w):w=e[8];let v;if(e[9]!==(a==null?void 0:a.id)||e[10]!==i||e[11]!==u||e[12]!==d){let T;e[14]!==(a==null?void 0:a.id)||e[15]!==i||e[16]!==d?(T=j=>g.jsxs(sc,{onSelect:()=>{d(j.id),i==null||i(),l(!1)},className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ia,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:j.name})]}),g.jsx(js,{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]=d,e[17]=T):T=e[17],v=u.map(T),e[9]=a==null?void 0:a.id,e[10]=i,e[11]=u,e[12]=d,e[13]=v}else v=e[13];let b;e[18]!==v?(b=g.jsx(Hu,{heading:"Servers",children:v}),e[18]=v,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx($C,{}),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(mc,{className:"size-4","data-icon":"inline-start"}),e[23]=k):k=e[23];let N;e[24]!==x?(N=g.jsx(Hu,{children:g.jsxs(sc,{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(Bh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(X1,{children:[C,g.jsxs(Q1,{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(zh,{open:o,onOpenChange:l,children:[S,A]}),e[29]=o,e[30]=A,e[31]=S,e[32]=M):M=e[32],M}const ng=640,rg=1300;function ud(){const t=ge.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: ${ng-1}px)`),u=()=>{n(window.innerWidth<ng)};return l.addEventListener("change",u),n(window.innerWidth<ng),()=>l.removeEventListener("change",u)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function Zj(){const t=ge.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: ${rg-1}px)`),u=()=>{n(window.innerWidth<rg)};return l.addEventListener("change",u),n(window.innerWidth<rg),()=>l.removeEventListener("change",u)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function Yi(t){const e=ge.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 u=o===void 0?"horizontal":o,a=l===void 0?!0:l;let d;e[5]!==n?(d=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]=d):d=e[6];let f;return e[7]!==a||e[8]!==u||e[9]!==i||e[10]!==d?(f=g.jsx(KD,{"data-slot":"separator",decorative:a,orientation:u,className:d,...i}),e[7]=a,e[8]=u,e[9]=i,e[10]=d,e[11]=f):f=e[11],f}function Ph(t){const e=ge.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(_1,{"data-slot":"sheet",...n}),e[2]=n,e[3]=i):i=e[3],i}function Jj(t){const e=ge.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(zR,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function e8(t){const e=ge.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(y1,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function t8(t){const e=ge.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(b1,{"data-slot":"sheet-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Fh(t){const e=ge.c(24);let n,i,o,l,u,a;e[0]!==t?({className:i,children:n,side:u,showCloseButton:a,style:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6]);const d=u===void 0?"right":u,f=a===void 0?!0:a;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(t8,{}),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 _;e[10]!==d?(_=d==="left"||d==="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))"}:d==="top"?{top:"env(safe-area-inset-top, 0px)"}:d==="bottom"?{bottom:"env(safe-area-inset-bottom, 0px)"}:void 0,e[10]=d,e[11]=_):_=e[11];const S=_;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 v;e[15]!==f?(v=f&&g.jsx(ph,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[g.jsx(Ms,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[15]=f,e[16]=v):v=e[16];let b;return e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==h||e[21]!==w||e[22]!==v?(b=g.jsxs(e8,{children:[p,g.jsxs(x1,{"data-slot":"sheet-content","data-side":d,className:h,style:w,...o,children:[n,v]})]}),e[17]=n,e[18]=o,e[19]=d,e[20]=h,e[21]=w,e[22]=v,e[23]=b):b=e[23],b}function Hh(t){const e=ge.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 Uh(t){const e=ge.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(HS,{"data-slot":"sheet-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function n8(t){const e=ge.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(US,{"data-slot":"sheet-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ig(t){const e=ge.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("animate-pulse rounded-md bg-muted",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":"skeleton",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Yf(t){const e=ge.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(gM,{"data-slot":"tooltip-provider",delayDuration:o,...n}),e[3]=o,e[4]=n,e[5]=l):l=e[5],l}function Uu(t){const e=ge.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(vM,{"data-slot":"tooltip",...n}),e[2]=n,e[3]=i):i=e[3],i}function $u(t){const e=ge.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(_M,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Vu(t){const e=ge.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 u=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 d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(xM,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),e[7]=d):d=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==a?(f=g.jsx(yM,{children:g.jsxs(bM,{"data-slot":"tooltip-content",sideOffset:u,className:a,...o,children:[n,d]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=a,e[12]=f):f=e[12],f}const r8="sidebar_state",i8=3600*24*7,s8="16rem",o8="18rem",a8="3rem",VC=D.createContext(null);function dd(){const t=D.useContext(VC);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function l8(t){const e=ge.c(33);let n,i,o,l,u,a,d;e[0]!==t?({defaultOpen:d,open:o,onOpenChange:u,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]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=d===void 0?!0:d,p=ud(),[h,_]=D.useState(!1),[S,C]=D.useState(f),w=o!=null?o:S;let v;e[8]!==w||e[9]!==u?(v=V=>{const U=typeof V=="function"?V(w):V;u?u(U):C(U),document.cookie=`${r8}=${U}; path=/; max-age=${i8}`},e[8]=w,e[9]=u,e[10]=v):v=e[10];const b=v;let y;e[11]!==p||e[12]!==b?(y=()=>p?_(u8):b(c8),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:_,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":s8,"--sidebar-width-icon":a8,...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 I;return e[30]!==A||e[31]!==O?(I=g.jsx(VC.Provider,{value:A,children:O}),e[30]=A,e[31]=O,e[32]=I):I=e[32],I}function c8(t){return!t}function u8(t){return!t}function d8(t){const e=ge.c(49);let n,i,o,l,u,a,d;e[0]!==t?({side:u,variant:a,collapsible:d,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]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=u===void 0?"left":u,p=a===void 0?"sidebar":a,h=d===void 0?"offcanvas":d,{isMobile:_,state:S,openMobile:C,setOpenMobile:w}=dd();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 I;return e[10]!==n||e[11]!==l||e[12]!==O?(I=g.jsx("div",{"data-slot":"sidebar",className:O,...l,children:n}),e[10]=n,e[11]=l,e[12]=O,e[13]=I):I=e[13],I}if(_){let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={"--sidebar-width":o8},e[14]=O):O=e[14];let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsxs(Hh,{className:"sr-only",children:[g.jsx(Uh,{children:"Sidebar"}),g.jsx(n8,{children:"Displays the mobile sidebar."})]}),e[15]=I):I=e[15];let V;e[16]!==n?(V=g.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[16]=n,e[17]=V):V=e[17];let U;e[18]!==o||e[19]!==f||e[20]!==V?(U=g.jsxs(Fh,{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:[I,V]}),e[18]=o,e[19]=f,e[20]=V,e[21]=U):U=e[21];let W;return e[22]!==C||e[23]!==l||e[24]!==w||e[25]!==U?(W=g.jsx(Ph,{open:C,onOpenChange:w,...l,children:U}),e[22]=C,e[23]=l,e[24]=w,e[25]=U,e[26]=W):W=e[26],W}const v=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]!==v||e[46]!==x||e[47]!==p?(j=g.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":S,"data-collapsible":v,"data-variant":p,"data-side":f,"data-slot":"sidebar",children:[x,T]}),e[42]=f,e[43]=S,e[44]=T,e[45]=v,e[46]=x,e[47]=p,e[48]=j):j=e[48],j}function Rb(t){const e=ge.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}=dd();let u;e[4]!==n?(u=Ee(n),e[4]=n,e[5]=u):u=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 d,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(i5,{}),f=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=f):(d=e[9],f=e[10]);let p;return e[11]!==o||e[12]!==u||e[13]!==a?(p=g.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:u,onClick:a,...o,children:[d,f]}),e[11]=o,e[12]=u,e[13]=a,e[14]=p):p=e[14],p}function f8(t){const e=ge.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 h8(t){const e=ge.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 p8(t){const e=ge.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(Yi,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const m8=D.forwardRef((t,e)=>{const n=ge.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 u;return n[5]!==o||n[6]!==e||n[7]!==l?(u=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]=u):u=n[8],u});function Xf(t){const e=ge.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 Qf(t){const e=ge.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 u=(o===void 0?!1:o)?Xu:"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 d;return e[6]!==u||e[7]!==i||e[8]!==a?(d=g.jsx(u,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:a,...i}),e[6]=u,e[7]=i,e[8]=a,e[9]=d):d=e[9],d}function Zf(t){const e=ge.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 nc(t){const e=ge.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 Oa(t){const e=ge.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 g8=_c("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 oc(t){const e=ge.c(28);let n,i,o,l,u,a,d;e[0]!==t?({asChild:o,isActive:l,variant:u,size:a,tooltip:d,className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=o===void 0?!1:o,p=l===void 0?!1:l,h=u===void 0?"default":u,_=a===void 0?"default":a,S=f?Xu:"button",{isMobile:C,state:w}=dd();let v;e[8]!==n||e[9]!==_||e[10]!==h?(v=Ee(g8({variant:h,size:_}),n),e[8]=n,e[9]=_,e[10]=h,e[11]=v):v=e[11];let b;e[12]!==S||e[13]!==p||e[14]!==i||e[15]!==_||e[16]!==v?(b=g.jsx(S,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":_,"data-active":p,className:v,...i}),e[12]=S,e[13]=p,e[14]=i,e[15]=_,e[16]=v,e[17]=b):b=e[17];const y=b;if(!d)return y;if(typeof d=="string"){let M;e[18]!==d?(M={children:d},e[18]=d,e[19]=M):M=e[19],d=M}let x;e[20]!==y?(x=g.jsx($u,{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]!==d?(N=g.jsx(Vu,{side:"right",align:"center",hidden:k,...d}),e[22]=k,e[23]=d,e[24]=N):N=e[24];let A;return e[25]!==x||e[26]!==N?(A=g.jsxs(Uu,{children:[x,N]}),e[25]=x,e[26]=N,e[27]=A):A=e[27],A}function v8(t){const e=ge.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 u=o===void 0?!1:o,a=l===void 0?!1:l,d=u?Xu:"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]!==d||e[9]!==i||e[10]!==p?(h=g.jsx(d,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:p,...i}),e[8]=d,e[9]=i,e[10]=p,e[11]=h):h=e[11],h}function _8(t){const e=ge.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 Bo(t){const e=ge.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(kA,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=i):i=e[3],i}function Po(t){const e=ge.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(fS,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Fo(t){const e=ge.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(hS,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=i):i=e[3],i}function y8(t,e){const n=ge.c(6),[i,o]=D.useState(null),l=D.useRef(!1),u=D.useRef(null);let a,d;n[0]!==e||n[1]!==t?(a=()=>(l.current&&!e&&t&&(o(t),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{o(null),u.current=null},5e3)),l.current=e,()=>{u.current&&clearTimeout(u.current)}),d=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=d):(a=n[2],d=n[3]),D.useEffect(a,d);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 Tb=ni.memo(function(e){const n=ge.c(13),{isClosed:i,isEditing:o,onRename:l,onReopen:u,onClose:a,onDelete:d}=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(MC,{asChild:!0,children:g.jsxs(v8,{showOnHover:!0,children:[g.jsx(Gx,{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(a5,{className:"size-4"}),n[2]=p):p=n[2];let h;n[3]!==l?(h=g.jsxs(Nu,{onClick:l,children:[p,"Rename"]}),n[3]=l,n[4]=h):h=n[4];let _;n[5]!==i||n[6]!==a||n[7]!==d||n[8]!==u?(_=i?g.jsxs(g.Fragment,{children:[g.jsxs(Nu,{onClick:u,children:[g.jsx(Xx,{className:"size-4"}),"Restore"]}),g.jsxs(Nu,{onClick:d,className:"text-destructive focus:text-destructive",children:[g.jsx(gc,{className:"size-4"}),"Delete permanently"]})]}):g.jsxs(Nu,{onClick:a,children:[g.jsx(Ms,{className:"size-4"}),"Archive"]}),n[5]=i,n[6]=a,n[7]=d,n[8]=u,n[9]=_):_=n[9];let S;return n[10]!==h||n[11]!==_?(S=g.jsxs(DC,{children:[f,g.jsxs(jC,{align:"end",children:[h,_]})]}),n[10]=h,n[11]=_,n[12]=S):S=n[12],S}),Nb=ni.memo(function(e){const n=ge.c(4),{status:i,isStreaming:o,runningAt:l}=e;if(o||i==="running"||!!l){let d;return n[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Br,{className:"size-3.5 animate-spin shrink-0"}),n[0]=d):d=n[0],d}if(i==="error"){let d;return n[1]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(ah,{className:"size-3.5 shrink-0"}),n[1]=d):d=n[1],d}if(i==="interrupted"){let d;return n[2]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Yx,{className:"size-3.5 shrink-0"}),n[2]=d):d=n[2],d}let a;return n[3]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(Ku,{className:"size-3.5 shrink-0"}),n[3]=a):a=n[3],a}),Yg=ni.memo(function t({session:e,allSessions:n,isActive:i,currentSessionId:o,streamingSessionIds:l,pendingPermissions:u,onResumeSession:a,onCloseSession:d,onReopenSession:f,onDeleteSession:p,onRename:h}){const[_,S]=D.useState(!1),[C,w]=D.useState(e.title||""),v=D.useRef(null),b=D.useMemo(()=>n.filter(W=>W.parentId===e.id),[n,e.id]),y=b.length>0,x=e.status==="closed",k=D.useRef(!1);D.useEffect(()=>{_&&v.current?k.current||(v.current.focus(),v.current.select(),k.current=!0):k.current=!1},[_]),D.useEffect(()=>{_||w(e.title||"")},[_,e.title]);const N=()=>{w(e.title||""),S(!0)},A=()=>{const W=C.trim();W&&W!==e.title&&h(e.id,W),S(!1)},M=()=>{S(!1),w(e.title||"")},T=W=>{W.key==="Enter"?(W.preventDefault(),A()):W.key==="Escape"&&(W.preventDefault(),M())},j=D.useMemo(()=>b.some(W=>W.id===o),[b,o]),O=l.has(e.id),I=u.some(W=>W.sessionId===e.id),V=O||e.subagentStatus==="running"||!!e.runningAt,{isFlashing:U}=y8(e.id,V);return y?g.jsx(Yf,{delayDuration:300,children:g.jsx(Bo,{defaultOpen:i||j,className:"group/collapsible",children:g.jsxs(Oa,{children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx(Po,{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(Ci,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),_?g.jsx("input",{ref:v,type:"text",value:C,onChange:W=>w(W.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(oc,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",U&&"animate-completion-flash rounded-md"),children:g.jsxs(Uu,{children:[g.jsx($u,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Nb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),I&&g.jsx(Iu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Vu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Tb,{isClosed:x,isEditing:_,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]}),g.jsx(Fo,{children:g.jsx(_8,{children:b.map(W=>g.jsx(t,{session:W,allSessions:n,isActive:o===W.id,currentSessionId:o,streamingSessionIds:l,pendingPermissions:u,onResumeSession:a,onCloseSession:d,onReopenSession:f,onDeleteSession:p,onRename:h},W.id))})})]})})}):g.jsx(Yf,{delayDuration:300,children:g.jsx(Oa,{children:g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:"shrink-0 size-7 p-1"}),_?g.jsx("input",{ref:v,type:"text",value:C,onChange:W=>w(W.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(oc,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",U&&"animate-completion-flash rounded-md"),children:g.jsxs(Uu,{children:[g.jsx($u,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Nb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),I&&g.jsx(Iu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Vu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Tb,{isClosed:x,isEditing:_,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]})})})}),b8=_c("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 Gn(t){const e=ge.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 u=o===void 0?"default":o,d=(l===void 0?!1:l)?Xu:"span";let f;e[5]!==n||e[6]!==u?(f=Ee(b8({variant:u}),n),e[5]=n,e[6]=u,e[7]=f):f=e[7];let p;return e[8]!==d||e[9]!==i||e[10]!==f||e[11]!==u?(p=g.jsx(d,{"data-slot":"badge","data-variant":u,className:f,...i}),e[8]=d,e[9]=i,e[10]=f,e[11]=u,e[12]=p):p=e[12],p}const x8=ni.memo(function(e){const n=ge.c(45),{allSessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,favoritedWorkspaceIds:d,workspaces:f,activeWorkspace:p,onSelectWorkspace:h,onResumeSession:_,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRenameSession:v,onCreateSessionInWorkspace:b,connected:y}=e;let x;if(n[0]!==d||n[1]!==f){const j=new Map(f.map(S8));x=d.map(O=>j.get(O)).filter(w8),n[0]=d,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(I=>I.workspaceId===j.id&&I.status==="active"&&I.parentId===null).sort(C8);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(Qf,{children:"Overview"}),n[6]=j):j=n[6];let O;return n[7]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsxs(Xf,{children:[j,g.jsx(Zf,{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]!==v||n[19]!==C||n[20]!==_||n[21]!==h||n[22]!==a||n[23]!==u||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]!==v||n[36]!==C||n[37]!==_||n[38]!==h||n[39]!==a||n[40]!==u||n[41]!==A?(j=O=>{const I=O.id===(p==null?void 0:p.id),V=(o==null?void 0:o.workspaceId)===O.id,U=A.get(O.id)||[];return g.jsx(Bo,{defaultOpen:I,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(Po,{className:"flex items-center justify-between w-full",onClick:()=>h(O),children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ci,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),O.isVirtual?g.jsx(Ag,{className:"size-3.5"}):g.jsx(Ds,{className:"size-3.5"}),g.jsx("span",{className:V?"truncate text-sidebar-foreground font-medium":"truncate",children:O.name})]}),g.jsx(Gn,{variant:"secondary",children:U.length})]})}),g.jsx(Fo,{children:g.jsxs(Zf,{children:[g.jsx(nc,{children:g.jsx(Oa,{children:g.jsxs(oc,{onClick:()=>b(O.id),disabled:!y,className:"w-full",children:[g.jsx(mc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),g.jsx(p8,{}),g.jsx(nc,{children:U.length===0?g.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground",children:"(no active sessions)"}):U.map(W=>g.jsx(Yg,{session:W,allSessions:i,isActive:(o==null?void 0:o.id)===W.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:_,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRename:v},W.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]=v,n[36]=C,n[37]=_,n[38]=h,n[39]=a,n[40]=u,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]=v,n[19]=C,n[20]=_,n[21]=h,n[22]=a,n[23]=u,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 S8(t){return[t.id,t]}function w8(t){return t!==void 0}function C8(t,e){return new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}const k8=D.forwardRef((t,e)=>{const n=ge.c(92),{sessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,connected:d,workspaces:f,activeWorkspace:p,allSessions:h,viewMode:_,favoritedWorkspaceIds:S,onCreateSession:C,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:y,onRenameSession:x,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,onDeleteWorkspace:M,onCreateSessionInWorkspace:T,onOpenSettings:j,onOpenMCP:O,onOpenAddServer:I,onServerSwitch:V,onEscape:U}=t,{quickConnections:W,addToQuickConnections:K,removeFromQuickConnections:G,activeServer:Z}=vc();dd();const ee=D.useRef(null),B=D.useRef(null);let L,z;n[0]!==l?(L=()=>{B.current=l},z=[l],n[0]=l,n[1]=L,n[2]=z):(L=n[1],z=n[2]),D.useEffect(L,z);let H;n[3]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{var bt;const ke=ee.current;if(!ke)return;const Ue=Array.from(ke.querySelectorAll('[data-sidebar="menu-button"]'));if(Ue.length===0){ke.focus();return}const ct=Ue.find(qt=>qt.getAttribute("data-session-id")===B.current);ct?ct.focus():(bt=Ue[0])==null||bt.focus()},n[3]=H):H=n[3];const F=H;let Q,te;n[4]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>({focusSessionPanel:F}),te=[F],n[4]=Q,n[5]=te):(Q=n[4],te=n[5]),D.useImperativeHandle(e,Q,te);let X;n[6]!==U?(X=ke=>{var Ut,on,Zt,Nn,tn;const Ue=ee.current;if(!Ue)return;const ct=document.activeElement;if(ct instanceof HTMLInputElement||ct instanceof HTMLTextAreaElement||ct instanceof HTMLElement&&ct.contentEditable==="true")return;const bt=Array.from(Ue.querySelectorAll('[data-sidebar="menu-button"]')),qt=bt.indexOf(document.activeElement);e:switch(ke.key){case"ArrowDown":{ke.preventDefault();const Wt=qt<bt.length-1?qt+1:0;(Ut=bt[Wt])==null||Ut.focus();break e}case"ArrowUp":{ke.preventDefault();const Wt=qt>0?qt-1:bt.length-1;(on=bt[Wt])==null||on.focus();break e}case"ArrowRight":{const Wt=(Zt=document.activeElement)==null?void 0:Zt.parentElement;if(!Wt)break e;const un=Wt.querySelector('button[aria-label="Toggle child sessions"]');if(!un)break e;const dn=Wt.closest("[data-state]");(dn==null?void 0:dn.dataset.state)==="closed"&&(ke.preventDefault(),un.click());break e}case"ArrowLeft":{const Wt=(Nn=document.activeElement)==null?void 0:Nn.parentElement;if(!Wt)break e;const un=Wt.querySelector('button[aria-label="Toggle child sessions"]');if(!un)break e;const dn=Wt.closest("[data-state]");(dn==null?void 0:dn.dataset.state)==="open"&&(ke.preventDefault(),un.click());break e}case"Enter":{document.activeElement instanceof HTMLButtonElement&&document.activeElement.click();break e}case"Escape":ke.preventDefault(),(tn=document.activeElement)==null||tn.blur(),U==null||U()}},n[6]=U,n[7]=X):X=n[7];const q=X;let $,ne;if(n[8]!==i){const ke=i.filter(E8);$=ke.filter(A8),ne=ke.filter(R8),n[8]=i,n[9]=$,n[10]=ne}else $=n[9],ne=n[10];let ie;n[11]!==$||n[12]!==ne?(ie={activeSessions:$,archivedSessions:ne},n[11]=$,n[12]=ne,n[13]=ie):ie=n[13];const{activeSessions:ae,archivedSessions:se}=ie;let ye;n[14]!==(Z==null?void 0:Z.id)||n[15]!==W?(ye=ke=>W.some(Ue=>Ue.workspaceId===ke&&Ue.serverId===(Z==null?void 0:Z.id)),n[14]=Z==null?void 0:Z.id,n[15]=W,n[16]=ye):ye=n[16];const Re=ye;let je;n[17]!==Z||n[18]!==K||n[19]!==W||n[20]!==G?(je=(ke,Ue)=>{if(!Z)return;const ct=W.find(bt=>bt.workspaceId===ke&&bt.serverId===Z.id);ct?G(ct.id):K(Z.id,Z.name,ke,Ue)},n[17]=Z,n[18]=K,n[19]=W,n[20]=G,n[21]=je):je=n[21];const Be=je;let De;n[22]!==I||n[23]!==V?(De=g.jsx(Qj,{onOpenAddServer:I,onServerSwitch:V}),n[22]=I,n[23]=V,n[24]=De):De=n[24];let et;n[25]!==p||n[26]!==Be||n[27]!==Re||n[28]!==A||n[29]!==N||n[30]!==M||n[31]!==k||n[32]!==_||n[33]!==f?(et=_!=="overview"&&g.jsx(Yj,{workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,isWorkspaceFavorited:Re,onToggleFavorite:Be,onDeleteWorkspace:M}),n[25]=p,n[26]=Be,n[27]=Re,n[28]=A,n[29]=N,n[30]=M,n[31]=k,n[32]=_,n[33]=f,n[34]=et):et=n[34];let it;n[35]!==De||n[36]!==et?(it=g.jsxs("div",{className:"p-2 space-y-2",children:[De,et]}),n[35]=De,n[36]=et,n[37]=it):it=n[37];let ut;n[38]!==d||n[39]!==C||n[40]!==_?(ut=_!=="overview"&&g.jsx(nc,{children:g.jsx(Oa,{children:g.jsxs(oc,{onClick:C,disabled:!d,className:"w-full",children:[g.jsx(mc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),n[38]=d,n[39]=C,n[40]=_,n[41]=ut):ut=n[41];let ot;n[42]!==it||n[43]!==ut?(ot=g.jsxs(f8,{children:[it,ut]}),n[42]=it,n[43]=ut,n[44]=ot):ot=n[44];let mt;n[45]!==ae||n[46]!==p||n[47]!==h||n[48]!==se||n[49]!==d||n[50]!==o||n[51]!==l||n[52]!==S||n[53]!==v||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]!==u||n[63]!==_||n[64]!==f?(mt=_==="overview"?g.jsx(x8,{allSessions:h,currentSession:o,currentSessionId:l,streamingSessionIds:u,favoritedWorkspaceIds:S,workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:y,onRenameSession:x,onCreateSessionInWorkspace:T,connected:d,pendingPermissions:a}):g.jsxs(g.Fragment,{children:[ae.length>0&&g.jsx(Bo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(Po,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ci,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),g.jsx(Gn,{variant:"secondary",children:ae.length})]})}),g.jsx(Fo,{children:g.jsx(Zf,{children:g.jsx(nc,{children:ae.map(ke=>g.jsx(Yg,{session:ke,allSessions:i,isActive:(o==null?void 0:o.id)===ke.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:y,onRename:x},ke.id))})})})]})}),se.length>0&&g.jsx(Bo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(Po,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ci,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),g.jsx(Gn,{variant:"secondary",children:se.length})]})}),g.jsx(Fo,{children:g.jsx(Zf,{children:g.jsx(nc,{children:se.map(ke=>g.jsx(Yg,{session:ke,allSessions:i,isActive:(o==null?void 0:o.id)===ke.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:y,onRename:x},ke.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]=d,n[50]=o,n[51]=l,n[52]=S,n[53]=v,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]=u,n[63]=_,n[64]=f,n[65]=mt):mt=n[65];let Ze;n[66]!==q||n[67]!==mt?(Ze=g.jsx(m8,{ref:ee,tabIndex:-1,onKeyDown:q,className:"outline-none",children:mt}),n[66]=q,n[67]=mt,n[68]=Ze):Ze=n[68];let tt;n[69]!==d?(tt=d?g.jsx(F5,{className:"size-3.5 text-success"}):g.jsx(tS,{className:"size-3.5 text-destructive"}),n[69]=d,n[70]=tt):tt=n[70];const ue=d?"Connected":"Disconnected";let de;n[71]!==ue?(de=g.jsx("span",{className:"text-xs text-muted-foreground",children:ue}),n[71]=ue,n[72]=de):de=n[72];let xe;n[73]!==tt||n[74]!==de?(xe=g.jsx(Oa,{children:g.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[tt,de]})}),n[73]=tt,n[74]=de,n[75]=xe):xe=n[75];let _e,Te;n[76]===Symbol.for("react.memo_cache_sentinel")?(_e=g.jsx(Ia,{className:"size-4","data-icon":"inline-start"}),Te=g.jsx("span",{children:"MCP Servers"}),n[76]=_e,n[77]=Te):(_e=n[76],Te=n[77]);let Oe;n[78]!==O?(Oe=g.jsx(Oa,{children:g.jsxs(oc,{onClick:O,children:[_e,Te]})}),n[78]=O,n[79]=Oe):Oe=n[79];let We,Fe;n[80]===Symbol.for("react.memo_cache_sentinel")?(We=g.jsx(Qx,{className:"size-4","data-icon":"inline-start"}),Fe=g.jsx("span",{children:"Settings"}),n[80]=We,n[81]=Fe):(We=n[80],Fe=n[81]);let He;n[82]!==j?(He=g.jsx(Oa,{children:g.jsx("div",{className:"flex items-center gap-1",children:g.jsxs(oc,{onClick:j,children:[We,Fe]})})}),n[82]=j,n[83]=He):He=n[83];let dt;n[84]!==xe||n[85]!==Oe||n[86]!==He?(dt=g.jsx(h8,{className:"pb-4",children:g.jsxs(nc,{children:[xe,Oe,He]})}),n[84]=xe,n[85]=Oe,n[86]=He,n[87]=dt):dt=n[87];let ft;return n[88]!==ot||n[89]!==Ze||n[90]!==dt?(ft=g.jsxs(d8,{collapsible:"offcanvas",children:[ot,Ze,dt]}),n[88]=ot,n[89]=Ze,n[90]=dt,n[91]=ft):ft=n[91],ft});function E8(t){return!t.parentId}function A8(t){return t.status==="active"}function R8(t){return t.status==="closed"}const T8={".ts":{icon:qi,color:"text-blue-500"},".tsx":{icon:qi,color:"text-blue-500"},".js":{icon:qi,color:"text-yellow-500"},".jsx":{icon:qi,color:"text-yellow-500"},".json":{icon:qi,color:"text-yellow-600"},".md":{icon:qi,color:"text-gray-500"},".css":{icon:qi,color:"text-purple-500"},".html":{icon:qi,color:"text-orange-500"}};function qC({entry:t,workspaceId:e,parentPath:n,depth:i,onFileSelect:o,showHidden:l=!0,serverUrl:u,apiToken:a}){const{fetchWithAuth:d}=ad(),[f,p]=D.useState(!1),[h,_]=D.useState([]),[S,C]=D.useState(!1),[w,v]=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 d(`/api/workspaces/${e}/files?path=${encodeURIComponent(b)}&showHidden=${l}`,{},{serverUrl:u,token:a})).json();_(O.files||[]),v(!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?T8[t.extension]:null,M=y?f?Tg:Ds:(A==null?void 0:A.icon)||qi,T=y?"text-amber-500":(A==null?void 0:A.color)||"text-muted-foreground";return y?g.jsxs(Bo,{open:f,onOpenChange:k,children:[g.jsx(Po,{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(Br,{className:"w-3 h-3 animate-spin shrink-0"}):g.jsx(Ci,{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(Fo,{children:h.map(j=>g.jsx(qC,{entry:j,workspaceId:e,parentPath:b,depth:i+1,onFileSelect:o,showHidden:l,serverUrl:u,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 Db({workspaceId:t,serverUrl:e,apiToken:n,onFileSelect:i,showHidden:o=!0}){const[l,u]=D.useState([]),[a,d]=D.useState(""),[f,p]=D.useState(!0),[h,_]=D.useState(null),{fetchWithAuth:S}=ad(),C=D.useCallback(async()=>{p(!0),_(null);try{const w=await S(`/api/workspaces/${t}/files?showHidden=${o}`,{},{serverUrl:e,token:n}),v=await w.json();if(!w.ok)throw new Error(v.message||"Failed to load files");u(v.files),d(v.currentPath)}catch(w){_(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(Br,{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(La,{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(La,{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(La,{className:"w-3 h-3"})})]}),g.jsx(Rc,{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(qC,{entry:w,workspaceId:t,parentPath:a,depth:0,onFileSelect:i,showHidden:o,serverUrl:e,apiToken:n},w.path))})})})]})}function N8(t){const e=ge.c(33),{workspaceId:n,searchQuery:i,selectedIndex:o,onSelect:l,onFilesChange:u,showHidden:a,serverUrl:d,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[_,S]=D.useState(h),[C,w]=D.useState(!1),[v,b]=D.useState(i),{fetchWithAuth:y}=ad(),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]!==v||e[6]!==y||e[7]!==u||e[8]!==d||e[9]!==p||e[10]!==n?(A=()=>{if(!v||v.length<2){S([]),u([]);return}const K=x.current=x.current+1;w(!0);const G=new AbortController;return y(`/api/workspaces/${n}/files?search=${encodeURIComponent(v)}&showHidden=${p}`,{signal:G.signal},{serverUrl:d,token:f}).then(M8).then(Z=>{if(K!==x.current)return;const ee=Z.files||[];S(ee),u(ee)}).catch(D8).finally(()=>{K===x.current&&w(!1)}),()=>G.abort()},M=[n,v,u,p,y,d,f],e[4]=f,e[5]=v,e[6]=y,e[7]=u,e[8]=d,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(Br,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}),e[14]=K):K=e[14],K}if(_.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]!==_||e[18]!==l||e[19]!==o){let K;e[21]!==l||e[22]!==o?(K=(G,Z)=>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",Z===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[G.type==="directory"?g.jsx(Ds,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):g.jsx(qi,{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=_.map(K),e[17]=_,e[18]=l,e[19]=o,e[20]=T}else T=e[20];const j=_.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 I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[25]=I):I=e[25];let V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[26]=V):V=e[26];let U;e[27]!==_.length||e[28]!==j?(U=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[_.length," result",j," •",O," navigate",I," select",V," close"]}),e[27]=_.length,e[28]=j,e[29]=U):U=e[29];let W;return e[30]!==U||e[31]!==T?(W=g.jsxs("div",{className:"p-1",children:[T,U]}),e[30]=U,e[31]=T,e[32]=W):W=e[32],W}function D8(t){t.name!=="AbortError"&&console.error("File search failed:",t)}function M8(t){return t.json()}function j8(t){const e=ge.c(40),{workspaceId:n,serverUrl:i,apiToken:o,isOpen:l,onClose:u}=t,a=ud();if(!n)return null;if(a){let k;e[0]!==u?(k=V=>!V&&u(),e[0]=u,e[1]=k):k=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(Hh,{className:"sr-only",children:g.jsx(Uh,{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(Ms,{className:"w-4 h-4"}),e[4]=M):M=e[4];let T;e[5]!==u?(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:u,children:M})]}),e[5]=u,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(Db,{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(Fh,{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 I;return e[14]!==l||e[15]!==k||e[16]!==O?(I=g.jsx(Ph,{open:l,onOpenChange:k,children:O}),e[14]=l,e[15]=k,e[16]=O,e[17]=I):I=e[17],I}const d=!l&&"w-0";let f;e[18]!==d?(f=Ee("relative w-64 bg-transparent transition-[width] duration-200 ease-linear",d),e[18]=d,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 _;e[22]!==h?(_=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]=_):_=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(Ms,{className:"w-4 h-4"}),e[26]=w):w=e[26];let v;e[27]!==u?(v=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:u,children:w})]}),e[27]=u,e[28]=v):v=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(Db,{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]!==_||e[35]!==v?(y=g.jsxs("div",{className:_,style:S,children:[v,b]}),e[33]=b,e[34]=_,e[35]=v,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 sg={exports:{}},Mb;function O8(){return Mb||(Mb=1,(function(t,e){(function(n,i){t.exports=i()})(globalThis,(()=>(()=>{var n={4567:function(u,a,d){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=d(9042),_=d(9924),S=d(844),C=d(4725),w=d(2585),v=d(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 _.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(`
512
+ `)))),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,v.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===`
513
+ `&&(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(),I=this._rowElements[A];I&&(j.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=j,this._rowColumns.set(I,T)),I.setAttribute("aria-posinset",O),I.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:I,offset:V})=>{const U=I instanceof Text?I.parentNode:I;let W=parseInt(U==null?void 0:U.getAttribute("aria-posinset"),10)-1;if(isNaN(W))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get(U);if(!K)return console.warn("columns is null. Race condition?"),null;let G=V<K.length?K[V]:K.slice(-1)[0]+1;return G>=this._terminal.cols&&(++W,G=0),{row:W,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:(u,a)=>{function d(_){return _.replace(/\r?\n/g,"\r")}function f(_,S){return S?"\x1B[200~"+_+"\x1B[201~":_}function p(_,S,C,w){_=f(_=d(_),C.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(_,!0),S.value=""}function h(_,S,C){const w=C.getBoundingClientRect(),v=_.clientX-w.left-10,b=_.clientY-w.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${v}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=d,a.bracketTextForPaste=f,a.copyHandler=function(_,S){_.clipboardData&&_.clipboardData.setData("text/plain",S.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,S,C,w){_.stopPropagation(),_.clipboardData&&p(_.clipboardData.getData("text/plain"),S,C,w)},a.paste=p,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(_,S,C,w,v){h(_,S,C),v&&w.rightClickSelect(_),S.value=w.selectionText,S.select()}},7239:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=d(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(p,h,_){this._css.set(p,h,_)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,_){this._color.set(p,h,_)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,f,p,h){d.addEventListener(f,p,h);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(f,p,h))}}}},3551:function(u,a,d){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=d(3656),_=d(8460),S=d(844),C=d(2585),w=d(4725);let v=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 _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.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,I;if(this._isMouseOut)return;const j=T==null?void 0:T.map((V=>({link:V})));(O=this._activeProviderReplies)==null||O.set(A,j),x=this._checkLinkProviderResult(A,b,x),((I=this._activeProviderReplies)==null?void 0:I.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=v=f([p(1,w.IMouseService),p(2,w.IRenderService),p(3,C.IBufferService),p(4,w.ILinkProviderService)],v)},9042:(u,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(u,a,d){var f=this&&this.__decorate||function(w,v,b,y){var x,k=arguments.length,N=k<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,y){v(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=d(511),_=d(2585);let S=a.OscLinkProvider=class{constructor(w,v,b){this._bufferService=w,this._optionsService=v,this._oscLinkService=b}provideLinks(w,v){var j;const b=this._bufferService.buffer.lines.get(w-1);if(!b)return void v(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 I=(j=this._oscLinkService.getLinkData(A))==null?void 0:j.uri;if(I){const V={start:{x:M+1,y:w},end:{x:O+(T||O!==N-1?0:1),y:w}};let U=!1;if(!(x!=null&&x.allowNonHttpProtocols))try{const W=new URL(I);["http:","https:"].includes(W.protocol)||(U=!0)}catch{U=!0}U||y.push({text:I,range:V,activate:(W,K)=>x?x.activate(W,K,V):C(0,K),hover:(W,K)=>{var G;return(G=x==null?void 0:x.hover)==null?void 0:G.call(x,W,K,V)},leave:(W,K)=>{var G;return(G=x==null?void 0:x.leave)==null?void 0:G.call(x,W,K,V)}})}T=!1,k.hasExtendedAttrs()&&k.extended.urlId?(M=O,A=k.extended.urlId):(M=-1,A=-1)}}v(y)}};function C(w,v){if(confirm(`Do you want to navigate to ${v}?
514
+
515
+ WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([p(0,_.IBufferService),p(1,_.IOptionsService),p(2,_.IOscLinkService)],S)},6193:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,f){this._renderCallback=d,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,f,p){this._rowCount=p,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,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 d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=d(3614),p=d(3656),h=d(3551),_=d(9042),S=d(3730),C=d(1680),w=d(3107),v=d(5744),b=d(2950),y=d(1296),x=d(428),k=d(4269),N=d(5114),A=d(8934),M=d(3230),T=d(9312),j=d(4725),O=d(6731),I=d(8055),V=d(8969),U=d(8460),W=d(844),K=d(6114),G=d(8437),Z=d(2584),ee=d(7399),B=d(5941),L=d(9074),z=d(2585),H=d(5435),F=d(4567),Q=d(779);class te extends V.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(q={}){super(q),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Q.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((($,ne)=>this.refresh($,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport(($=>this._reportWindowsOptions($)))),this.register(this._inputHandler.onColor(($=>this._handleColorEvent($)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(($=>this._afterResize($.cols,$.rows)))),this.register((0,W.toDisposable)((()=>{var $,ne;this._customKeyEventHandler=void 0,(ne=($=this.element)==null?void 0:$.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const $ of q){let ne,ie="";switch($.index){case 256:ne="foreground",ie="10";break;case 257:ne="background",ie="11";break;case 258:ne="cursor",ie="12";break;default:ne="ansi",ie="4;"+$.index}switch($.type){case 0:const ae=I.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ie};${(0,B.toRgbString)(ae)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((se=>se.ansi[$.index]=I.channels.toColor(...$.color)));else{const se=ne;this._themeService.modifyColors((ye=>ye[se]=I.channels.toColor(...$.color)))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.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 q=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(q);if(!$)return;const ne=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ae=$.getWidth(ne),se=this._renderService.dimensions.css.cell.width*ae,ye=this.buffer.y*this._renderService.dimensions.css.cell.height,Re=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Re+"px",this.textarea.style.top=ye+"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",($=>{this.hasSelection()&&(0,f.copyHandler)($,this._selectionService)})));const q=$=>(0,f.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,p.addDisposableDomListener)(this.element,"paste",q)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",($=>{$.button===2&&(0,f.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",($=>{(0,f.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",($=>{$.button===1&&(0,f.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var ne,ie,ae;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.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),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.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=q.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($);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(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.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 q=this,$=this.element;function ne(se){const ye=q._mouseService.getMouseReportCoords(se,q.screenElement);if(!ye)return!1;let Re,je;switch(se.overrideType||se.type){case"mousemove":je=32,se.buttons===void 0?(Re=3,se.button!==void 0&&(Re=se.button<3?se.button:3)):Re=1&se.buttons?0:4&se.buttons?1:2&se.buttons?2:3;break;case"mouseup":je=0,Re=se.button<3?se.button:3;break;case"mousedown":je=1,Re=se.button<3?se.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(se)===!1||q.viewport.getLinesScrolled(se)===0)return!1;je=se.deltaY<0?0:1,Re=4;break;default:return!1}return!(je===void 0||Re===void 0||Re>4)&&q.coreMouseService.triggerMouseEvent({col:ye.col,row:ye.row,x:ye.x,y:ye.y,button:Re,action:je,ctrl:se.ctrlKey,alt:se.altKey,shift:se.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ae={mouseup:se=>(ne(se),se.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(se)),wheel:se=>(ne(se),this.cancel(se,!0)),mousedrag:se=>{se.buttons&&ne(se)},mousemove:se=>{se.buttons||ne(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||($.addEventListener("mousemove",ae.mousemove),ie.mousemove=ae.mousemove):($.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&se?ie.wheel||($.addEventListener("wheel",ae.wheel,{passive:!1}),ie.wheel=ae.wheel):($.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)($,"mousedown",(se=>{if(se.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(se))return ne(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)($,"wheel",(se=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(se)===!1)return!1;if(!this.buffer.hasScrollback){const ye=this.viewport.getLinesScrolled(se);if(ye===0)return;const Re=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(se.deltaY<0?"A":"B");let je="";for(let Be=0;Be<Math.abs(ye);Be++)je+=Re;return this.coreService.triggerDataEvent(je,!0),this.cancel(se,!0)}return this.viewport.handleWheel(se)?this.cancel(se):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)($,"touchstart",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(se),this.cancel(se)}),{passive:!0})),this.register((0,p.addDisposableDomListener)($,"touchmove",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(se)?void 0:this.cancel(se)}),{passive:!1}))}refresh(q,$){var ne;(ne=this._renderService)==null||ne.refreshRows(q,$)}updateCursorStyle(q){var $;($=this._selectionService)!=null&&$.shouldColumnSelect(q)?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(q,$,ne=0){var ie;ne===1?(super.scrollLines(q,$,ne),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,f.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,$,ne){this._selectionService.setSelection(q,$,ne)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,$){var ne;(ne=this._selectionService)==null||ne.selectLines(q,$)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!$&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,ee.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),ne.type===3||ne.type===2){const ie=this.rows-1;return this.scrollLines(ne.type===2?-ie:ie),this.cancel(q,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(ne.cancel&&this.cancel(q,!0),!ne.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==Z.C0.ETX&&ne.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,$){const ne=q.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||q.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||q.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?ne:ne&&(!$.keyCode||$.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)$=q.charCode;else if(q.which===null||q.which===void 0)$=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;$=q.which}return!(!$||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=q.data;return this.coreService.triggerDataEvent($,!0),this.cancel(q),!0}return!1}resize(q,$){q!==this.cols||$!==this.rows?super.resize(q,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,$){var ne,ie;(ne=this._charSizeService)==null||ne.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 $=1;$<this.rows;$++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var $,ne;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),ne=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[4;${ne};${$}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(`${Z.C0.ESC}[6;${ae};${ie}t`)}}cancel(q,$){if(this.options.cancelEvents||$)return q.preventDefault(),q.stopPropagation(),!1}}a.Terminal=te},9924:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,f=1e3){this._renderCallback=d,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,f,p){this._rowCount=p,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,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 _=h-this._lastRefreshMs,S=this._debounceThresholdMS-_;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 d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f)}}},1680:function(u,a,d){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=d(3656),_=d(4725),S=d(8460),C=d(844),w=d(2585);let v=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 I=(T=M.get(j+1))==null?void 0:T.isWrapped;if(k+=O.translateToString(!I),!I||j===M.length-1){const V=document.createElement("div");V.textContent=k,N.push(V),k.length>0&&(x=V),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=v=f([p(2,w.IBufferService),p(3,w.IOptionsService),p(4,_.ICharSizeService),p(5,_.IRenderService),p(6,_.ICoreBrowserService),p(7,_.IThemeService)],v)},3107:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,y){var x,k=arguments.length,N=k<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,y){v(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=d(4725),_=d(844),S=d(2585);let C=a.BufferDecorationRenderer=class extends _.Disposable{constructor(w,v,b,y,x){super(),this._screenElement=w,this._bufferService=v,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,_.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 v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((y=w==null?void 0:w.options)==null?void 0:y.layer)==="top"),v.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=(x=w.options.x)!=null?x:0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(w,v),v}_refreshStyle(w){const v=w.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=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=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(b)}}_refreshXPosition(w,v=w.element){var y;if(!v)return;const b=(y=w.options.x)!=null?y:0;(w.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var v;(v=this._decorationElements.get(w))==null||v.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:(u,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(d){if(d.options.overviewRulerOptions){for(const f of this._zones)if(f.color===d.options.overviewRulerOptions.color&&f.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,d.marker.line))return;if(this._lineAdjacentToZone(f,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(f,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,f){return f>=d.startBufferLine&&f<=d.endBufferLine}_lineAdjacentToZone(d,f,p){return f>=d.startBufferLine-this._linePadding[p||"full"]&&f<=d.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(d,f){d.startBufferLine=Math.min(d.startBufferLine,f),d.endBufferLine=Math.max(d.endBufferLine,f)}}},5744:function(u,a,d){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=d(5871),_=d(4725),S=d(844),C=d(2585),w={full:0,left:0,center:0,right:0},v={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 I;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(),(I=this._viewportElement.parentElement)==null||I.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 V;(V=this._canvas)==null||V.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);v.full=this._canvas.width,v.left=x,v.center=k,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.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),v[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,_.IRenderService),p(5,C.IOptionsService),p(6,_.ICoreBrowserService)],y)},2950:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,y){var x,k=arguments.length,N=k<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,y);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,y){v(b,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=d(4725),_=d(2585),S=d(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,v,b,y,x,k){this._textarea=w,this._compositionView=v,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 v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(w,"");this._dataAlreadySent=b,v.length>w.length?this._coreService.triggerDataEvent(b,!0):v.length<w.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):v.length===w.length&&v!==w&&this._coreService.triggerDataEvent(v,!0)}}),0)}updateCompositionElements(w){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=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=v*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,_.IBufferService),p(3,_.IOptionsService),p(4,_.ICoreService),p(5,h.IRenderService)],C)},9806:(u,a)=>{function d(f,p,h){const _=h.getBoundingClientRect(),S=f.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),w=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-_.left-C,p.clientY-_.top-w]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(f,p,h,_,S,C,w,v,b){if(!C)return;const y=d(f,p,h);return y?(y[0]=Math.ceil((y[0]+(b?w/2:0))/w),y[1]=Math.ceil(y[1]/v),y[0]=Math.min(Math.max(y[0],1),_+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),S),y):void 0}},9504:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=d(2584);function p(v,b,y,x){const k=v-h(v,y),N=b-h(b,y),A=Math.abs(k-N)-(function(M,T,j){let O=0;const I=M-h(M,j),V=T-h(T,j);for(let U=0;U<Math.abs(I-V);U++){const W=_(M,T)==="A"?-1:1,K=j.buffer.lines.get(I+W*U);K!=null&&K.isWrapped&&O++}return O})(v,b,y);return w(A,C(_(v,b),x))}function h(v,b){let y=0,x=b.buffer.lines.get(v),k=x==null?void 0:x.isWrapped;for(;k&&v>=0&&v<b.rows;)y++,x=b.buffer.lines.get(--v),k=x==null?void 0:x.isWrapped;return y}function _(v,b){return v>b?"A":"B"}function S(v,b,y,x,k,N){let A=v,M=b,T="";for(;A!==y||M!==x;)A+=k?1:-1,k&&A>N.cols-1?(T+=N.buffer.translateBufferLineToString(M,!1,v,A),A=0,v=0,M++):!k&&A<0&&(T+=N.buffer.translateBufferLineToString(M,!1,0,v+1),A=N.cols-1,v=A,M--);return T+N.buffer.translateBufferLineToString(M,!1,v,A)}function C(v,b){const y=b?"O":"[";return f.C0.ESC+y+v}function w(v,b){v=Math.floor(v);let y="";for(let x=0;x<v;x++)y+=b;return y}a.moveToCellSequence=function(v,b,y,x){const k=y.buffer.x,N=y.buffer.y;if(!y.buffer.hasScrollback)return(function(T,j,O,I,V,U){return p(j,I,V,U).length===0?"":w(S(T,j,T,j-h(j,V),!1,V).length,C("D",U))})(k,N,0,b,y,x)+p(N,b,y,x)+(function(T,j,O,I,V,U){let W;W=p(j,I,V,U).length>0?I-h(I,V):j;const K=I,G=(function(Z,ee,B,L,z,H){let F;return F=p(B,L,z,H).length>0?L-h(L,z):ee,Z<B&&F<=L||Z>=B&&F<L?"C":"D"})(T,j,O,I,V,U);return w(S(T,W,O,K,G==="C",V).length,C(G,U))})(k,N,v,b,y,x);let A;if(N===b)return A=k>v?"D":"C",w(Math.abs(k-v),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?v:k,y)+(M-1)*y.cols+1+((N>b?k:v)-1),C(A,x))}},1296:function(u,a,d){var f=this&&this.__decorate||function(U,W,K,G){var Z,ee=arguments.length,B=ee<3?W:G===null?G=Object.getOwnPropertyDescriptor(W,K):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(U,W,K,G);else for(var L=U.length-1;L>=0;L--)(Z=U[L])&&(B=(ee<3?Z(B):ee>3?Z(W,K,B):Z(W,K))||B);return ee>3&&B&&Object.defineProperty(W,K,B),B},p=this&&this.__param||function(U,W){return function(K,G){W(K,G,U)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=d(3787),_=d(2550),S=d(2223),C=d(6171),w=d(6052),v=d(4725),b=d(8055),y=d(8460),x=d(844),k=d(2585),N="xterm-dom-renderer-owner-",A="xterm-rows",M="xterm-fg-",T="xterm-bg-",j="xterm-focus",O="xterm-selection";let I=1,V=a.DomRenderer=class extends x.Disposable{constructor(U,W,K,G,Z,ee,B,L,z,H,F,Q,te){super(),this._terminal=U,this._document=W,this._element=K,this._screenElement=G,this._viewportElement=Z,this._helperContainer=ee,this._linkifier2=B,this._charSizeService=z,this._optionsService=H,this._bufferService=F,this._coreBrowserService=Q,this._themeService=te,this._terminalClass=I++,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((X=>this._injectCss(X)))),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((X=>this._handleLinkHover(X)))),this.register(this._linkifier2.onHideLinkUnderline((X=>this._handleLinkLeave(X)))),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 _.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 U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),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/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),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 W=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=W,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(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let W=`${this._terminalSelector} .${A} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;W+=`${this._terminalSelector} .${A} .xterm-dim { color: ${b.color.multiplyOpacity(U.foreground,.5).css};}`,W+=`${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}`,Z=`blink_block_${this._terminalClass}`;W+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,W+=`@keyframes ${G} { 50% { box-shadow: none; }}`,W+=`@keyframes ${Z} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,W+=`${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: ${Z} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,W+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,B]of U.ansi.entries())W+=`${this._terminalSelector} .${M}${ee} { color: ${B.css}; }${this._terminalSelector} .${M}${ee}.xterm-dim { color: ${b.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${B.css}; }`;W+=`${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(U.background).css}; }${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${T}${S.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=W}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,W){for(let K=this._rowElements.length;K<=W;K++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,W){this._refreshRowElements(U,W),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(U,W,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,W,K),this.renderRows(0,this._bufferService.rows-1),!U||!W)return;this._selectionRenderModel.update(this._terminal,U,W,K);const G=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(K){const z=U[0]>W[0];L.appendChild(this._createSelectionElement(ee,z?W[0]:U[0],z?U[0]:W[0],B-ee+1))}else{const z=G===ee?U[0]:0,H=ee===Z?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ee,z,H));const F=B-ee-1;if(L.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,F)),ee!==B){const Q=Z===B?W[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,Q))}}this._selectionContainer.appendChild(L)}_createSelectionElement(U,W,K,G=1){const Z=this._document.createElement("div"),ee=W*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(K-W);return ee+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-ee),Z.style.height=G*this.dimensions.css.cell.height+"px",Z.style.top=U*this.dimensions.css.cell.height+"px",Z.style.left=`${ee}px`,Z.style.width=`${B}px`,Z}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 U of this._rowElements)U.replaceChildren()}renderRows(U,W){const K=this._bufferService.buffer,G=K.ybase+K.y,Z=Math.min(K.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=U;z<=W;z++){const H=z+K.ydisp,F=this._rowElements[z],Q=K.lines.get(H);if(!F||!Q)break;F.replaceChildren(...this._rowFactory.createRow(Q,H,H===G,B,L,Z,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,W,K,G,Z,ee){K<0&&(U=0),G<0&&(W=0);const B=this._bufferService.rows-1;K=Math.max(Math.min(K,B),0),G=Math.max(Math.min(G,B),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,z=L.ybase+L.y,H=Math.min(L.x,Z-1),F=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,te=this._optionsService.rawOptions.cursorInactiveStyle;for(let X=K;X<=G;++X){const q=X+L.ydisp,$=this._rowElements[X],ne=L.lines.get(q);if(!$||!ne)break;$.replaceChildren(...this._rowFactory.createRow(ne,q,q===z,Q,te,H,F,this.dimensions.css.cell.width,this._widthCache,ee?X===K?U:0:-1,ee?(X===G?W:Z)-1:-1))}}};a.DomRenderer=V=f([p(7,k.IInstantiationService),p(8,v.ICharSizeService),p(9,k.IOptionsService),p(10,k.IBufferService),p(11,v.ICoreBrowserService),p(12,v.IThemeService)],V)},3787:function(u,a,d){var f=this&&this.__decorate||function(A,M,T,j){var O,I=arguments.length,V=I<3?M:j===null?j=Object.getOwnPropertyDescriptor(M,T):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(A,M,T,j);else for(var U=A.length-1;U>=0;U--)(O=A[U])&&(V=(I<3?O(V):I>3?O(M,T,V):O(M,T))||V);return I>3&&V&&Object.defineProperty(M,T,V),V},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=d(2223),_=d(643),S=d(511),C=d(2585),w=d(8055),v=d(4725),b=d(4269),y=d(6171),x=d(3734);let k=a.DomRendererRowFactory=class{constructor(A,M,T,j,O,I,V){this._document=A,this._characterJoinerService=M,this._optionsService=T,this._coreBrowserService=j,this._coreService=O,this._decorationService=I,this._themeService=V,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,I,V,U,W,K,G){const Z=[],ee=this._characterJoinerService.getJoinedCharacters(M),B=this._themeService.colors;let L,z=A.getNoBgTrimmedLength();T&&z<I+1&&(z=I+1);let H=0,F="",Q=0,te=0,X=0,q=!1,$=0,ne=!1,ie=0;const ae=[],se=K!==-1&&G!==-1;for(let ye=0;ye<z;ye++){A.loadCell(ye,this._workCell);let Re=this._workCell.getWidth();if(Re===0)continue;let je=!1,Be=ye,De=this._workCell;if(ee.length>0&&ye===ee[0][0]){je=!0;const Fe=ee.shift();De=new b.JoinedCellData(this._workCell,A.translateToString(!0,Fe[0],Fe[1]),Fe[1]-Fe[0]),Be=Fe[1]-1,Re=De.getWidth()}const et=this._isCellInSelection(ye,M),it=T&&ye===I,ut=se&&ye>=K&&ye<=G;let ot=!1;this._decorationService.forEachDecorationAtCell(ye,M,void 0,(Fe=>{ot=!0}));let mt=De.getChars()||_.WHITESPACE_CELL_CHAR;if(mt===" "&&(De.isUnderline()||De.isOverline())&&(mt=" "),ie=Re*U-W.get(mt,De.isBold(),De.isItalic()),L){if(H&&(et&&ne||!et&&!ne&&De.bg===Q)&&(et&&ne&&B.selectionForeground||De.fg===te)&&De.extended.ext===X&&ut===q&&ie===$&&!it&&!je&&!ot){De.isInvisible()?F+=_.WHITESPACE_CELL_CHAR:F+=mt,H++;continue}H&&(L.textContent=F),L=this._document.createElement("span"),H=0,F=""}else L=this._document.createElement("span");if(Q=De.bg,te=De.fg,X=De.extended.ext,q=ut,$=ie,ne=et,je&&I>=ye&&I<=Be&&(I=ye),!this._coreService.isCursorHidden&&it&&this._coreService.isCursorInitialized){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&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(De.isBold()&&ae.push("xterm-bold"),De.isItalic()&&ae.push("xterm-italic"),De.isDim()&&ae.push("xterm-dim"),F=De.isInvisible()?_.WHITESPACE_CELL_CHAR:De.getChars()||_.WHITESPACE_CELL_CHAR,De.isUnderline()&&(ae.push(`xterm-underline-${De.extended.underlineStyle}`),F===" "&&(F=" "),!De.isUnderlineColorDefault()))if(De.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(De.getUnderlineColor()).join(",")})`;else{let Fe=De.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&De.isBold()&&Fe<8&&(Fe+=8),L.style.textDecorationColor=B.ansi[Fe].css}De.isOverline()&&(ae.push("xterm-overline"),F===" "&&(F=" ")),De.isStrikethrough()&&ae.push("xterm-strikethrough"),ut&&(L.style.textDecoration="underline");let Ze=De.getFgColor(),tt=De.getFgColorMode(),ue=De.getBgColor(),de=De.getBgColorMode();const xe=!!De.isInverse();if(xe){const Fe=Ze;Ze=ue,ue=Fe;const He=tt;tt=de,de=He}let _e,Te,Oe,We=!1;switch(this._decorationService.forEachDecorationAtCell(ye,M,void 0,(Fe=>{Fe.options.layer!=="top"&&We||(Fe.backgroundColorRGB&&(de=50331648,ue=Fe.backgroundColorRGB.rgba>>8&16777215,_e=Fe.backgroundColorRGB),Fe.foregroundColorRGB&&(tt=50331648,Ze=Fe.foregroundColorRGB.rgba>>8&16777215,Te=Fe.foregroundColorRGB),We=Fe.options.layer==="top")})),!We&&et&&(_e=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,ue=_e.rgba>>8&16777215,de=50331648,We=!0,B.selectionForeground&&(tt=50331648,Ze=B.selectionForeground.rgba>>8&16777215,Te=B.selectionForeground)),We&&ae.push("xterm-decoration-top"),de){case 16777216:case 33554432:Oe=B.ansi[ue],ae.push(`xterm-bg-${ue}`);break;case 50331648:Oe=w.channels.toColor(ue>>16,ue>>8&255,255&ue),this._addStyle(L,`background-color:#${N((ue>>>0).toString(16),"0",6)}`);break;default:xe?(Oe=B.foreground,ae.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Oe=B.background}switch(_e||De.isDim()&&(_e=w.color.multiplyOpacity(Oe,.5)),tt){case 16777216:case 33554432:De.isBold()&&Ze<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ze+=8),this._applyMinimumContrast(L,Oe,B.ansi[Ze],De,_e,void 0)||ae.push(`xterm-fg-${Ze}`);break;case 50331648:const Fe=w.channels.toColor(Ze>>16&255,Ze>>8&255,255&Ze);this._applyMinimumContrast(L,Oe,Fe,De,_e,Te)||this._addStyle(L,`color:#${N(Ze.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Oe,B.foreground,De,_e,Te)||xe&&ae.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ae.length&&(L.className=ae.join(" "),ae.length=0),it||je||ot?L.textContent=F:H++,ie!==this.defaultSpacing&&(L.style.letterSpacing=`${ie}px`),Z.push(L),ye=Be}return L&&H&&(L.textContent=F),Z}_applyMinimumContrast(A,M,T,j,O,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const V=this._getContrastCache(j);let U;if(O||I||(U=V.getColor(M.rgba,T.rgba)),U===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);U=w.color.ensureContrastRatio(O||M,I||T,W),V.setColor((O||M).rgba,(I||T).rgba,U!=null?U:null)}return!!U&&(this._addStyle(A,`color:${U.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,v.ICharacterJoinerService),p(2,C.IOptionsService),p(3,v.ICoreBrowserService),p(4,C.ICoreService),p(5,C.IDecorationService),p(6,v.IThemeService)],k)},2550:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.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=d.createElement("span");p.classList.add("xterm-char-measure-element");const h=d.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const _=d.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const S=d.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[p,h,_,S],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(_),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(d,f,p,h){d===this._font&&f===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=d,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(d,f,p){let h=0;if(!f&&!p&&d.length===1&&(h=d.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(d,0);return C>0&&(this._flat[h]=C),C}let _=d;f&&(_+="B"),p&&(_+="I");let S=this._holey.get(_);if(S===void 0){let C=0;f&&(C|=1),p&&(C|=2),S=this._measure(d,C),S>0&&this._holey.set(_,S)}return S}_measure(d,f){const p=this._measureElements[f];return p.textContent=d.repeat(32),p.offsetWidth/32}}},2223:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(u,a)=>{function d(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=d,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=f,a.allowRescaling=function(p,h,_,S){return h===1&&_>Math.ceil(1.5*S)&&p!==void 0&&p>255&&!f(p)&&!d(p)&&!(function(C){return 57344<=C&&C<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return d(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,_=0){return(p-(2*Math.round(h)-_))%(2*Math.round(h))}},6052:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{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,_,S=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[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(v,p.rows-1);b>=p.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=w,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=h[0],this.endCol=_[0])}isCellSelected(p,h,_){return!!this.hasSelection&&(_-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,f=this.selectionEnd;return!(!d||!f)&&(d[1]>f[1]||d[1]===f[1]&&d[0]>f[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(u,a,d){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=d(2585),_=d(8460),S=d(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 _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(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 v 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(u,a,d){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=d(3734),_=d(643),S=d(511),C=d(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 v=a.CharacterJoinerService=class WC{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 I=0;I<x.getTrimmedLength();I++)if(x.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==j||this._workCell.bg!==O){if(I-A>1){const V=this._getJoinedRanges(N,T,M,x,A);for(let U=0;U<V.length;U++)k.push(V[U])}A=I,T=M,j=this._workCell.fg,O=this._workCell.bg}M+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const I=this._getJoinedRanges(N,T,M,x,A);for(let V=0;V<I.length;V++)k.push(I[V])}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 I=0;I<O.length;I++)WC._mergeRanges(T,O[I])}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),I=x.getString(j).length||_.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+=I}}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=v=f([p(0,C.IBufferService)],v)},5114:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=d(844),p=d(8460),h=d(3656);class _ extends f.Disposable{constructor(w,v,b){super(),this._textarea=w,this._window=v,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=_;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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=d(844);class p extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const S=this.linkProviders.indexOf(_);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=p},8934:function(u,a,d){var f=this&&this.__decorate||function(C,w,v,b){var y,x=arguments.length,k=x<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(C,w,v,b);else for(var N=C.length-1;N>=0;N--)(y=C[N])&&(k=(x<3?y(k):x>3?y(w,v,k):y(w,v))||k);return x>3&&k&&Object.defineProperty(w,v,k),k},p=this&&this.__param||function(C,w){return function(v,b){w(v,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=d(4725),_=d(9806);let S=a.MouseService=class{constructor(C,w){this._renderService=C,this._charSizeService=w}getCoords(C,w,v,b,y){return(0,_.getCoords)(window,C,w,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}getMouseReportCoords(C,w){const v=(0,_.getCoordsRelativeToElement)(window,C,w);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};a.MouseService=S=f([p(0,h.IRenderService),p(1,h.ICharSizeService)],S)},3230:function(u,a,d){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=d(6193),_=d(4725),S=d(8460),C=d(844),w=d(7226),v=d(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,I)=>this._renderRows(O,I)),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,v.IOptionsService),p(3,_.ICharSizeService),p(4,v.IDecorationService),p(5,v.IBufferService),p(6,_.ICoreBrowserService),p(7,_.IThemeService)],b)},9312:function(u,a,d){var f=this&&this.__decorate||function(T,j,O,I){var V,U=arguments.length,W=U<3?j:I===null?I=Object.getOwnPropertyDescriptor(j,O):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(T,j,O,I);else for(var K=T.length-1;K>=0;K--)(V=T[K])&&(W=(U<3?V(W):U>3?V(j,O,W):V(j,O))||W);return U>3&&W&&Object.defineProperty(j,O,W),W},p=this&&this.__param||function(T,j){return function(O,I){j(O,I,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=d(9806),_=d(9504),S=d(456),C=d(4725),w=d(8460),v=d(844),b=d(6114),y=d(4841),x=d(511),k=d(2585),N=" ",A=new RegExp(N,"g");let M=a.SelectionService=class extends v.Disposable{constructor(T,j,O,I,V,U,W,K,G){super(),this._element=T,this._screenElement=j,this._linkifier=O,this._bufferService=I,this._coreService=V,this._mouseService=U,this._optionsService=W,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=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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,I=[];if(this._activeSelectionMode===3){if(T[0]===j[0])return"";const V=T[0]<j[0]?T[0]:j[0],U=T[0]<j[0]?j[0]:T[0];for(let W=T[1];W<=j[1];W++){const K=O.translateBufferLineToString(W,!0,V,U);I.push(K)}}else{const V=T[1]===j[1]?j[0]:void 0;I.push(O.translateBufferLineToString(T[1],!0,T[0],V));for(let U=T[1]+1;U<=j[1]-1;U++){const W=O.lines.get(U),K=O.translateBufferLineToString(U,!0);W!=null&&W.isWrapped?I[I.length-1]+=K:I.push(K)}if(T[1]!==j[1]){const U=O.lines.get(j[1]),W=O.translateBufferLineToString(j[1],!0,0,j[0]);U&&U.isWrapped?I[I.length-1]+=W:I.push(W)}}return I.map((V=>V.replace(A," "))).join(b.isWindows?`\r
516
+ `:`
517
+ `)}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,I=this._model.finalSelectionEnd;return!!(O&&I&&j)&&this._areCoordsInSelection(j,O,I)}isCellInSelection(T,j){const O=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!O||!I)&&this._areCoordsInSelection([T,j],O,I)}_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 V,U;const O=(U=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:U.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 I=this._getMouseBufferCoords(T);return!!I&&(this._selectWordAt(I,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 I=O.lines.get(this._model.selectionEnd[1]);I&&I.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 I=(0,_.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!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 I=0;j>=I;I++){const V=T.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:V>1&&j!==I&&(O+=V-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,I=!0){if(T[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,U=V.lines.get(T[1]);if(!U)return;const W=V.translateBufferLineToString(T[1],!1);let K=this._convertViewportColToCharacterIndex(U,T[0]),G=K;const Z=T[0]-K;let ee=0,B=0,L=0,z=0;if(W.charAt(K)===" "){for(;K>0&&W.charAt(K-1)===" ";)K--;for(;G<W.length&&W.charAt(G+1)===" ";)G++}else{let Q=T[0],te=T[0];U.getWidth(Q)===0&&(ee++,Q--),U.getWidth(te)===2&&(B++,te++);const X=U.getString(te).length;for(X>1&&(z+=X-1,G+=X-1);Q>0&&K>0&&!this._isCharWordSeparator(U.loadCell(Q-1,this._workCell));){U.loadCell(Q-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,Q--):q>1&&(L+=q-1,K-=q-1),K--,Q--}for(;te<U.length&&G+1<W.length&&!this._isCharWordSeparator(U.loadCell(te+1,this._workCell));){U.loadCell(te+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,te++):q>1&&(z+=q-1,G+=q-1),G++,te++}}G++;let H=K+Z-ee+L,F=Math.min(this._bufferService.cols,G-K+ee+B-L-z);if(j||W.slice(K,G).trim()!==""){if(O&&H===0&&U.getCodePoint(0)!==32){const Q=V.lines.get(T[1]-1);if(Q&&U.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const te=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(te){const X=this._bufferService.cols-te.start;H-=X,F+=X}}}if(I&&H+F===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const Q=V.lines.get(T[1]+1);if(Q!=null&&Q.isWrapped&&Q.getCodePoint(0)!==32){const te=this._getWordAt([0,T[1]+1],!1,!1,!0);te&&(F+=te.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:(u,a,d)=>{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=d(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(u,a,d){var f=this&&this.__decorate||function(M,T,j,O){var I,V=arguments.length,U=V<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,j):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(M,T,j,O);else for(var W=M.length-1;W>=0;W--)(I=M[W])&&(U=(V<3?I(U):V>3?I(T,j,U):I(T,j))||U);return V>3&&U&&Object.defineProperty(T,j,U),U},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=d(7239),_=d(8055),S=d(8460),C=d(844),w=d(2585),v=_.css.toColor("#ffffff"),b=_.css.toColor("#000000"),y=_.css.toColor("#ffffff"),x=_.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let j=0;j<216;j++){const O=T[j/36%6|0],I=T[j/6%6|0],V=T[j%6];M.push({css:_.channels.toCss(O,I,V),rgba:_.channels.toRgba(O,I,V)})}for(let j=0;j<24;j++){const O=8+10*j;M.push({css:_.channels.toCss(O,O,O),rgba:_.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:v,background:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:_.color.blend(b,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:_.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,v),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=_.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(M.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=_.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=M.selectionForeground?A(M.selectionForeground,_.NULL_COLOR):void 0,T.selectionForeground===_.NULL_COLOR&&(T.selectionForeground=void 0),_.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=_.color.opacity(T.selectionBackgroundTransparent,.3)),_.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=_.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 _.css.toColor(M)}catch{}return T}a.ThemeService=N=f([p(0,w.IOptionsService)],N)},6349:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=d(8460),p=d(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 v=S;v<this._length-C;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let v=this._length-1;v>=S;v--)this._array[this._getCyclicIndex(v+w.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<w.length;v++)this._array[this._getCyclicIndex(S+v)]=w[v];if(w.length&&this.onInsertEmitter.fire({index:S,amount:w.length}),this._length+w.length>this._maxLength){const v=this._length+w.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}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 v=S+C+w-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<C;v++)this.set(S+v+w,this.get(S+v))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=h},1439:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(f,p=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const _ in f)h[_]=p<=1?f[_]:f[_]&&d(f[_],p-1);return h}},8055:(u,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 d=0,f=0,p=0,h=0;var _,S,C,w,v;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)}}})(_||(a.channels=_={})),(function(x){function k(N,A){return h=Math.round(255*A),[d,f,p]=v.toChannels(N.rgba),{css:_.toCss(d,f,p,h),rgba:_.toRgba(d,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,I=N.rgba>>16&255,V=N.rgba>>8&255;return d=O+Math.round((M-O)*h),f=I+Math.round((T-I)*h),p=V+Math.round((j-V)*h),{css:_.toCss(d,f,p),rgba:_.toRgba(d,f,p)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,A,M){const T=v.ensureContrastRatio(N.rgba,A.rgba,M);if(T)return _.toColor(T>>24&255,T>>16&255,T>>8&255)},x.opaque=function(N){const A=(255|N.rgba)>>>0;return[d,f,p]=v.toChannels(A),{css:_.toCss(d,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 d=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),_.toColor(d,f,p);case 5:return d=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),_.toColor(d,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 d=parseInt(M[1]),f=parseInt(M[2]),p=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),_.toColor(d,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),[d,f,p,h]=k.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(d,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,I=A>>8&255;let V=M>>24&255,U=M>>16&255,W=M>>8&255,K=y(w.relativeLuminance2(V,U,W),w.relativeLuminance2(j,O,I));for(;K<T&&(V>0||U>0||W>0);)V-=Math.max(0,Math.ceil(.1*V)),U-=Math.max(0,Math.ceil(.1*U)),W-=Math.max(0,Math.ceil(.1*W)),K=y(w.relativeLuminance2(V,U,W),w.relativeLuminance2(j,O,I));return(V<<24|U<<16|W<<8|255)>>>0}function N(A,M,T){const j=A>>24&255,O=A>>16&255,I=A>>8&255;let V=M>>24&255,U=M>>16&255,W=M>>8&255,K=y(w.relativeLuminance2(V,U,W),w.relativeLuminance2(j,O,I));for(;K<T&&(V<255||U<255||W<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),U=Math.min(255,U+Math.ceil(.1*(255-U))),W=Math.min(255,W+Math.ceil(.1*(255-W))),K=y(w.relativeLuminance2(V,U,W),w.relativeLuminance2(j,O,I));return(V<<24|U<<16|W<<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,I=A>>24&255,V=A>>16&255,U=A>>8&255;return d=I+Math.round((T-I)*h),f=V+Math.round((j-V)*h),p=U+Math.round((O-U)*h),_.toRgba(d,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 U=k(A,M,T),W=y(j,w.relativeLuminance(U>>8));if(W<T){const K=N(A,M,T);return W>y(j,w.relativeLuminance(K>>8))?U:K}return U}const I=N(A,M,T),V=y(j,w.relativeLuminance(I>>8));if(V<T){const U=k(A,M,T);return V>y(j,w.relativeLuminance(U>>8))?I:U}return I}},x.reduceLuminance=k,x.increaseLuminance=N,x.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(v||(a.rgba=v={})),a.toPaddedHex=b,a.contrastRatio=y},8969:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=d(844),p=d(2585),h=d(4348),_=d(7866),S=d(744),C=d(7302),w=d(6975),v=d(8460),b=d(1753),y=d(1480),x=d(7994),k=d(9282),N=d(5435),A=d(5981),M=d(2660);let T=!1;class j extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var V;(V=this._onScrollApi)==null||V.fire(I.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(I){for(const V in I)this.optionsService.options[V]=I[V]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(I)),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(_.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,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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((V=>{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((V=>{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(((V,U)=>this._inputHandler.parse(V,U)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,V){this._writeBuffer.write(I,V)}writeSync(I,V){this._logService.logLevel<=p.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(I,V)}input(I,V=!0){this.coreService.triggerDataEvent(I,V)}resize(I,V){isNaN(I)||isNaN(V)||(I=Math.max(I,S.MINIMUM_COLS),V=Math.max(V,S.MINIMUM_ROWS),this._bufferService.resize(I,V))}scroll(I,V=!1){this._bufferService.scroll(I,V)}scrollLines(I,V,U){this._bufferService.scrollLines(I,V,U)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const V=I-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(I,V){return this._inputHandler.registerEscHandler(I,V)}registerDcsHandler(I,V){return this._inputHandler.registerDcsHandler(I,V)}registerCsiHandler(I,V){return this._inputHandler.registerCsiHandler(I,V)}registerOscHandler(I,V){return this._inputHandler.registerOscHandler(I,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?I=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const V of I)V.dispose()}))}}}a.CoreTerminal=j},8460:(u,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=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===d)return void this._listeners.splice(f,1)}}})),this._event}fire(d,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,d,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,f){return d((p=>f.fire(p)))},a.runAndSubscribe=function(d,f){return f(void 0),d((p=>f(p)))}},5435:function(u,a,d){var f=this&&this.__decorate||function(ee,B,L,z){var H,F=arguments.length,Q=F<3?B:z===null?z=Object.getOwnPropertyDescriptor(B,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(ee,B,L,z);else for(var te=ee.length-1;te>=0;te--)(H=ee[te])&&(Q=(F<3?H(Q):F>3?H(B,L,Q):H(B,L))||Q);return F>3&&Q&&Object.defineProperty(B,L,Q),Q},p=this&&this.__param||function(ee,B){return function(L,z){B(L,z,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=d(2584),_=d(7116),S=d(2015),C=d(844),w=d(482),v=d(8437),b=d(8460),y=d(643),x=d(511),k=d(3734),N=d(2585),A=d(1480),M=d(6242),T=d(6351),j=d(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function V(ee,B){if(ee>24)return B.setWinLines||!1;switch(ee){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var U;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(a.WindowsOptionsReportType=U={}));let W=0;class K extends C.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,z,H,F,Q,te,X,q=new S.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=z,this._logService=H,this._optionsService=F,this._oscLinkService=Q,this._coreMouseService=te,this._unicodeService=X,this._parser=q,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.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(($=>this._activeBuffer=$.activeBuffer))),this._parser.setCsiHandlerFallback((($,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:ne.toArray()})})),this._parser.setEscHandlerFallback(($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})})),this._parser.setExecuteHandlerFallback(($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})})),this._parser.setOscHandlerFallback((($,ne,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:ne,data:ie})})),this._parser.setDcsHandlerFallback((($,ne,ie)=>{ne==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:ne,payload:ie})})),this._parser.setPrintHandler((($,ne,ie)=>this.print($,ne,ie))),this._parser.registerCsiHandler({final:"@"},($=>this.insertChars($))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},($=>this.scrollLeft($))),this._parser.registerCsiHandler({final:"A"},($=>this.cursorUp($))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},($=>this.scrollRight($))),this._parser.registerCsiHandler({final:"B"},($=>this.cursorDown($))),this._parser.registerCsiHandler({final:"C"},($=>this.cursorForward($))),this._parser.registerCsiHandler({final:"D"},($=>this.cursorBackward($))),this._parser.registerCsiHandler({final:"E"},($=>this.cursorNextLine($))),this._parser.registerCsiHandler({final:"F"},($=>this.cursorPrecedingLine($))),this._parser.registerCsiHandler({final:"G"},($=>this.cursorCharAbsolute($))),this._parser.registerCsiHandler({final:"H"},($=>this.cursorPosition($))),this._parser.registerCsiHandler({final:"I"},($=>this.cursorForwardTab($))),this._parser.registerCsiHandler({final:"J"},($=>this.eraseInDisplay($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},($=>this.eraseInDisplay($,!0))),this._parser.registerCsiHandler({final:"K"},($=>this.eraseInLine($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},($=>this.eraseInLine($,!0))),this._parser.registerCsiHandler({final:"L"},($=>this.insertLines($))),this._parser.registerCsiHandler({final:"M"},($=>this.deleteLines($))),this._parser.registerCsiHandler({final:"P"},($=>this.deleteChars($))),this._parser.registerCsiHandler({final:"S"},($=>this.scrollUp($))),this._parser.registerCsiHandler({final:"T"},($=>this.scrollDown($))),this._parser.registerCsiHandler({final:"X"},($=>this.eraseChars($))),this._parser.registerCsiHandler({final:"Z"},($=>this.cursorBackwardTab($))),this._parser.registerCsiHandler({final:"`"},($=>this.charPosAbsolute($))),this._parser.registerCsiHandler({final:"a"},($=>this.hPositionRelative($))),this._parser.registerCsiHandler({final:"b"},($=>this.repeatPrecedingCharacter($))),this._parser.registerCsiHandler({final:"c"},($=>this.sendDeviceAttributesPrimary($))),this._parser.registerCsiHandler({prefix:">",final:"c"},($=>this.sendDeviceAttributesSecondary($))),this._parser.registerCsiHandler({final:"d"},($=>this.linePosAbsolute($))),this._parser.registerCsiHandler({final:"e"},($=>this.vPositionRelative($))),this._parser.registerCsiHandler({final:"f"},($=>this.hVPosition($))),this._parser.registerCsiHandler({final:"g"},($=>this.tabClear($))),this._parser.registerCsiHandler({final:"h"},($=>this.setMode($))),this._parser.registerCsiHandler({prefix:"?",final:"h"},($=>this.setModePrivate($))),this._parser.registerCsiHandler({final:"l"},($=>this.resetMode($))),this._parser.registerCsiHandler({prefix:"?",final:"l"},($=>this.resetModePrivate($))),this._parser.registerCsiHandler({final:"m"},($=>this.charAttributes($))),this._parser.registerCsiHandler({final:"n"},($=>this.deviceStatus($))),this._parser.registerCsiHandler({prefix:"?",final:"n"},($=>this.deviceStatusPrivate($))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},($=>this.softReset($))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},($=>this.setCursorStyle($))),this._parser.registerCsiHandler({final:"r"},($=>this.setScrollRegion($))),this._parser.registerCsiHandler({final:"s"},($=>this.saveCursor($))),this._parser.registerCsiHandler({final:"t"},($=>this.windowOptions($))),this._parser.registerCsiHandler({final:"u"},($=>this.restoreCursor($))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},($=>this.insertColumns($))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},($=>this.deleteColumns($))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},($=>this.selectProtected($))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},($=>this.requestMode($,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},($=>this.requestMode($,!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(($=>(this.setTitle($),this.setIconName($),!0)))),this._parser.registerOscHandler(1,new M.OscHandler(($=>this.setIconName($)))),this._parser.registerOscHandler(2,new M.OscHandler(($=>this.setTitle($)))),this._parser.registerOscHandler(4,new M.OscHandler(($=>this.setOrReportIndexedColor($)))),this._parser.registerOscHandler(8,new M.OscHandler(($=>this.setHyperlink($)))),this._parser.registerOscHandler(10,new M.OscHandler(($=>this.setOrReportFgColor($)))),this._parser.registerOscHandler(11,new M.OscHandler(($=>this.setOrReportBgColor($)))),this._parser.registerOscHandler(12,new M.OscHandler(($=>this.setOrReportCursorColor($)))),this._parser.registerOscHandler(104,new M.OscHandler(($=>this.restoreIndexedColor($)))),this._parser.registerOscHandler(110,new M.OscHandler(($=>this.restoreFgColor($)))),this._parser.registerOscHandler(111,new M.OscHandler(($=>this.restoreBgColor($)))),this._parser.registerOscHandler(112,new M.OscHandler(($=>this.restoreCursorColor($)))),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 $ in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},(()=>this.selectCharset("("+$))),this._parser.registerEscHandler({intermediates:")",final:$},(()=>this.selectCharset(")"+$))),this._parser.registerEscHandler({intermediates:"*",final:$},(()=>this.selectCharset("*"+$))),this._parser.registerEscHandler({intermediates:"+",final:$},(()=>this.selectCharset("+"+$))),this._parser.registerEscHandler({intermediates:"-",final:$},(()=>this.selectCharset("-"+$))),this._parser.registerEscHandler({intermediates:".",final:$},(()=>this.selectCharset("."+$))),this._parser.registerEscHandler({intermediates:"/",final:$},(()=>this.selectCharset("/"+$)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler(($=>(this._logService.error("Parsing error: ",$),$))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler((($,ne)=>this.requestStatusString($,ne))))}_preserveStack(B,L,z,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=z,this._parseStack.position=H}_logSlowResolvingAsync(B){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,z)=>setTimeout((()=>z("#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(B,L){let z,H=this._activeBuffer.x,F=this._activeBuffer.y,Q=0;const te=this._parseStack.paused;if(te){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(z),z;H=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>I&&(Q=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,($=>String.fromCharCode($))).join("")}"`),typeof B=="string"?B.split("").map(($=>$.charCodeAt(0))):B),this._parseBuffer.length<B.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(B.length,I))),te||this._dirtyRowTracker.clearRange(),B.length>I)for(let $=Q;$<B.length;$+=I){const ne=$+I<B.length?$+I:B.length,ie=typeof B=="string"?this._stringDecoder.decode(B.substring($,ne),this._parseBuffer):this._utf8Decoder.decode(B.subarray($,ne),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,F,ie,$),this._logSlowResolvingAsync(z),z}else if(!te){const $=typeof B=="string"?this._stringDecoder.decode(B,this._parseBuffer):this._utf8Decoder.decode(B,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,$))return this._preserveStack(H,F,$,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===H&&this._activeBuffer.y===F||this._onCursorMove.fire();const X=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(X,this._bufferService.rows-1))}print(B,L,z){let H,F;const Q=this._charsetService.charset,te=this._optionsService.rawOptions.screenReaderMode,X=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,ne=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-L>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let ae=this._parser.precedingJoinState;for(let se=L;se<z;++se){if(H=B[se],H<127&&Q){const Be=Q[String.fromCharCode(H)];Be&&(H=Be.charCodeAt(0))}const ye=this._unicodeService.charProperties(H,ae);F=A.UnicodeService.extractWidth(ye);const Re=A.UnicodeService.extractShouldJoin(ye),je=Re?A.UnicodeService.extractWidth(ae):0;if(ae=ye,te&&this._onA11yChar.fire((0,w.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-je>X){if(q){const Be=ie;let De=this._activeBuffer.x-je;for(this._activeBuffer.x=je,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),je>0&&ie instanceof v.BufferLine&&ie.copyCellsFrom(Be,De,0,je,!1);De<X;)Be.setCellFromCodepoint(De++,0,1,ne)}else if(this._activeBuffer.x=X-1,F===2)continue}if(Re&&this._activeBuffer.x){const Be=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-Be,H,F);for(let De=F-je;--De>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if($&&(ie.insertCells(this._activeBuffer.x,F-je,this._activeBuffer.getNullCell(ne)),ie.getWidth(X-1)===2&&ie.setCellFromCodepoint(X-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,ne)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,F,ne),F>0)for(;--F;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=ae,this._activeBuffer.x<X&&z-L>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,(z=>!V(z.params[0],this._optionsService.rawOptions.windowOptions)||L(z)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new T.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,z,H=!1,F=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);Q.replaceCells(L,z,this._activeBuffer.getNullCell(this._eraseAttrData()),F),H&&(Q.isWrapped=!1)}_resetBufferLine(B,L=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),z.isWrapped=!1)}eraseInDisplay(B,L=!1){let z;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);z<this._bufferService.rows;z++)this._resetBufferLine(z,L);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,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(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=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(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(B){this._restrictCursor();let L=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=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(z,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(B){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(B){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(B){let L=B.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(B){let L=B.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(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=B.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=B.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=B.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);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(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=B.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);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(B){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(B.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(B){const L=this._parser.precedingJoinState;if(!L)return!0;const z=B.params[0]||1,H=A.UnicodeService.extractWidth(L),F=this._activeBuffer.x-H,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),te=new Uint32Array(Q.length*z);let X=0;for(let $=0;$<Q.length;){const ne=Q.codePointAt($)||0;te[X++]=ne,$+=ne>65535?2:1}let q=X;for(let $=1;$<z;++$)te.copyWithin(q,0,X),q+=X;return this.print(te,0,q),!0}sendDeviceAttributesPrimary(B){return B.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(B){return B.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(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;L<B.length;L++)switch(B.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(B){for(let L=0;L<B.length;L++)switch(B.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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(B){for(let L=0;L<B.length;L++)switch(B.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(B){for(let L=0;L<B.length;L++)switch(B.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(),B.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(B,L){const z=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:F}=this._coreMouseService,Q=this._coreService,{buffers:te,cols:X}=this._bufferService,{active:q,alt:$}=te,ne=this._optionsService.rawOptions,ie=Re=>Re?1:2,ae=B.params[0];return se=ae,ye=L?ae===2?4:ae===4?ie(Q.modes.insertMode):ae===12?3:ae===20?ie(ne.convertEol):0:ae===1?ie(z.applicationCursorKeys):ae===3?ne.windowOptions.setWinLines?X===80?2:X===132?1:0:0:ae===6?ie(z.origin):ae===7?ie(z.wraparound):ae===8?3:ae===9?ie(H==="X10"):ae===12?ie(ne.cursorBlink):ae===25?ie(!Q.isCursorHidden):ae===45?ie(z.reverseWraparound):ae===66?ie(z.applicationKeypad):ae===67?4:ae===1e3?ie(H==="VT200"):ae===1002?ie(H==="DRAG"):ae===1003?ie(H==="ANY"):ae===1004?ie(z.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(q===$):ae===2004?ie(z.bracketedPasteMode):0,Q.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${se};${ye}$y`),!0;var se,ye}_updateAttrColor(B,L,z,H,F){return L===2?(B|=50331648,B&=-16777216,B|=k.AttributeData.fromColorRGB([z,H,F])):L===5&&(B&=-50331904,B|=33554432|255&z),B}_extractColor(B,L,z){const H=[0,0,-1,0,0,0];let F=0,Q=0;do{if(H[Q+F]=B.params[L+Q],B.hasSubParams(L+Q)){const te=B.getSubParams(L+Q);let X=0;do H[1]===5&&(F=1),H[Q+X+1+F]=te[X];while(++X<te.length&&X+Q+1+F<H.length);break}if(H[1]===5&&Q+F>=2||H[1]===2&&Q+F>=5)break;H[1]&&(F=1)}while(++Q+L<B.length&&Q+F<H.length);for(let te=2;te<H.length;++te)H[te]===-1&&(H[te]=0);switch(H[0]){case 38:z.fg=this._updateAttrColor(z.fg,H[1],H[3],H[4],H[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,H[1],H[3],H[4],H[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,H[1],H[3],H[4],H[5])}return Q}_processUnderline(B,L){L.extended=L.extended.clone(),(!~B||B>5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=v.DEFAULT_ATTR_DATA.fg,B.bg=v.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let z;const H=this._curAttrData;for(let F=0;F<L;F++)z=B.params[F],z>=30&&z<=37?(H.fg&=-50331904,H.fg|=16777216|z-30):z>=40&&z<=47?(H.bg&=-50331904,H.bg|=16777216|z-40):z>=90&&z<=97?(H.fg&=-50331904,H.fg|=16777224|z-90):z>=100&&z<=107?(H.bg&=-50331904,H.bg|=16777224|z-100):z===0?this._processSGR0(H):z===1?H.fg|=134217728:z===3?H.bg|=67108864:z===4?(H.fg|=268435456,this._processUnderline(B.hasSubParams(F)?B.getSubParams(F)[0]:1,H)):z===5?H.fg|=536870912:z===7?H.fg|=67108864:z===8?H.fg|=1073741824:z===9?H.fg|=2147483648:z===2?H.bg|=134217728:z===21?this._processUnderline(2,H):z===22?(H.fg&=-134217729,H.bg&=-134217729):z===23?H.bg&=-67108865:z===24?(H.fg&=-268435457,this._processUnderline(0,H)):z===25?H.fg&=-536870913:z===27?H.fg&=-67108865:z===28?H.fg&=-1073741825:z===29?H.fg&=2147483647:z===39?(H.fg&=-67108864,H.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):z===49?(H.bg&=-67108864,H.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?F+=this._extractColor(B,F,H):z===53?H.bg|=1073741824:z===55?H.bg&=-1073741825:z===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):z===100?(H.fg&=-67108864,H.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${z}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${z}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(B){const L=B.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 z=L%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(B){const L=B.params[0]||1;let z;return(B.length<2||(z=B.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(B){if(!V(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],z=B.split(";");for(;z.length>1;){const H=z.shift(),F=z.shift();if(/^\d+$/.exec(H)){const Q=parseInt(H);if(Z(Q))if(F==="?")L.push({type:0,index:Q});else{const te=(0,j.parseColor)(F);te&&L.push({type:1,index:Q,color:te})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const z=B.split(":");let H;const F=z.findIndex((Q=>Q.startsWith("id=")));return F!==-1&&(H=z[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(B,L){const z=B.split(";");for(let H=0;H<z.length&&!(L>=this._specialColors.length);++H,++L)if(z[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const F=(0,j.parseColor)(z[H]);F&&this._onColor.fire([{type:1,index:this._specialColors[L],color:F}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],z=B.split(";");for(let H=0;H<z.length;++H)if(/^\d+$/.exec(z[H])){const F=parseInt(z[H]);Z(F)&&L.push({type:2,index:F})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){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,_.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(O[B[0]],_.CHARSETS[B[1]]||_.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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new x.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const z=this._activeBuffer.ybase+this._activeBuffer.y+L,H=this._activeBuffer.lines.get(z);H&&(H.fill(B),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(B,L){const z=this._bufferService.buffer,H=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${F}${h.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}a.InputHandler=K;let G=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,B){ee>B&&(W=ee,ee=B,B=W),ee<this.start&&(this.start=ee),B>this.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(ee){return 0<=ee&&ee<256}G=f([p(0,N.IBufferService)],G)},844:(u,a)=>{function d(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=d,a.getDisposeArrayDisposable=function(f){return{dispose:()=>d(f)}}},1505:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(p,h,_){this._data[p]||(this._data[p]={}),this._data[p][h]=_}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(f,p,h,_,S){this._data.get(f,p)||this._data.set(f,p,new d),this._data.get(f,p).set(h,_,S)}get(f,p,h,_){var S;return(S=this._data.get(f,p))==null?void 0:S.get(h,_)}clear(){this._data.clear()}}},6114:(u,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 d=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=d.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(d)},6106:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(d=this._search(this._getKey(f)),this._array.splice(d,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const p=this._getKey(f);if(p===void 0||(d=this._search(p),d===-1)||this._getKey(this._array[d])!==p)return!1;do if(this._array[d]===f)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===p);return!1}*getKeyIterator(f){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===f)}forEachByKey(f,p){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do p(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===f)}values(){return[...this._array].values()}_search(f){let p=0,h=this._array.length-1;for(;h>=p;){let _=p+h>>1;const S=this._getKey(this._array[_]);if(S>f)h=_-1;else{if(!(S<f)){for(;_>0&&this._getKey(this._array[_-1])===f;)_--;return _}p=_+1}}return p}}},7226:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=d(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,v=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 v-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-C))}ms`),void this._start();v=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(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=d(643);a.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),_=h==null?void 0:h.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&_&&(S.isWrapped=_[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&_[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{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 d;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=d;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,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=d(6349),p=d(7226),h=d(3734),_=d(8437),S=d(4634),C=d(511),w=d(643),v=d(4863),b=d(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=_.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 _.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=_.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(_.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 _.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 _.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(_.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(_.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 _.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(_.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 I=j[j.length-1].getTrimmedLength(),V=(0,S.reflowSmallerGetNewLineLengths)(j,this._cols,y),U=V.length-j.length;let W;W=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+U):Math.max(0,this.lines.length-this.lines.maxLength+U);const K=[];for(let z=0;z<U;z++){const H=this.getBlankLine(_.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=V.length-1,Z=V[G];Z===0&&(G--,Z=V[G]);let ee=j.length-U-1,B=I;for(;ee>=0;){const z=Math.min(B,Z);if(j[G]===void 0)break;if(j[G].copyCellsFrom(j[ee],B-z,Z-z,z,!0),Z-=z,Z===0&&(G--,Z=V[G]),B-=z,B===0){ee--;const H=Math.max(ee,0);B=(0,S.getWrappedLineTrimmedLength)(j,H,this._cols)}}for(let z=0;z<j.length;z++)V[z]<y&&j[z].setCell(V[z],k);let L=U-W;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+U,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,I=0,V=N[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let U=0;for(let G=Math.min(this.lines.maxLength-1,j+A-1);G>=0;G--)if(V&&V.start>O+U){for(let Z=V.newLines.length-1;Z>=0;Z--)this.lines.set(G--,V.newLines[Z]);G++,M.push({index:O+1,amount:V.newLines.length}),U+=V.newLines.length,V=N[++I]}else this.lines.set(G,T[O--]);let W=0;for(let G=M.length-1;G>=0;G--)M[G].index+=W,this.lines.onInsertEmitter.fire(M[G]),W+=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 v.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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=d(3734),p=d(511),h=d(643),_=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class C{constructor(v,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let k=0;k<v;++k)this.setCell(k,x);this.length=v}get(v){const b=this._data[3*v+0],y=2097151&b;return[this._data[3*v+1],2097152&b?this._combined[v]:y?(0,_.stringFromCodePoint)(y):"",b>>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):y]}set(v,b){this._data[3*v+1]=b[h.CHAR_DATA_ATTR_INDEX],b[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,_.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return S=3*v,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[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,y,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|y<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,y){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,_.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,_.stringFromCodePoint)(2097151&x)+(0,_.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*v+0]=x}insertCells(v,b,y){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b<this.length-v){const x=new p.CellData;for(let k=this.length-v-b-1;k>=0;--k)this.setCell(v+b+k,this.loadCell(v+k,x));for(let k=0;k<b;++k)this.setCell(v+k,y)}else for(let x=v;x<this.length;++x)this.setCell(x,y);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,y)}deleteCells(v,b,y){if(v%=this.length,b<this.length-v){const x=new p.CellData;for(let k=0;k<this.length-v-b;++k)this.setCell(v+k,this.loadCell(v+b+k,x));for(let k=this.length-b;k<this.length;++k)this.setCell(k,y)}else for(let x=v;x<this.length;++x)this.setCell(x,y);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,y)}replaceCells(v,b,y,x=!1){if(x)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,y);v<b&&v<this.length;)this.isProtected(v)||this.setCell(v,y),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,y);v<b&&v<this.length;)this.setCell(v++,y)}resize(v,b){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const y=3*v;if(v>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<v;++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>=v&&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>=v&&delete this._extendedAttrs[A]}}return this.length=v,4*y*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,b=!1){if(b)for(let y=0;y<this.length;++y)this.isProtected(y)||this.setCell(y,v);else{this._combined={},this._extendedAttrs={};for(let y=0;y<this.length;++y)this.setCell(y,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const b in v._combined)this._combined[b]=v._combined[b];this._extendedAttrs={};for(const b in v._extendedAttrs)this._extendedAttrs[b]=v._extendedAttrs[b];this.isWrapped=v.isWrapped}clone(){const v=new C(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const b in this._combined)v._combined[b]=this._combined[b];for(const b in this._extendedAttrs)v._extendedAttrs[b]=this._extendedAttrs[b];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,y,x,k){const N=v._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]=v._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]=v._extendedAttrs[b+M])}const A=Object.keys(v._combined);for(let M=0;M<A.length;M++){const T=parseInt(A[M],10);T>=b&&(this._combined[T-b+y]=v._combined[T])}}translateToString(v,b,y,x){b=b!=null?b:0,y=y!=null?y:this.length,v&&(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,_.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:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,f){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return f*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(u,a)=>{function d(f,p,h){if(p===f.length-1)return f[p].getTrimmedLength();const _=!f[p].hasContent(h-1)&&f[p].getWidth(h-1)===1,S=f[p+1].getWidth(0)===2;return _&&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,_,S){const C=[];for(let w=0;w<f.length-1;w++){let v=w,b=f.get(++v);if(!b.isWrapped)continue;const y=[f.get(w)];for(;v<f.length&&b.isWrapped;)y.push(b),b=f.get(++v);if(_>=w&&_<v){w+=y.length-1;continue}let x=0,k=d(y,x,p),N=1,A=0;for(;N<y.length;){const T=d(y,N,p),j=T-A,O=h-k,I=Math.min(j,O);y[x].copyCellsFrom(y[N],A,k,I,!1),k+=I,k===h&&(x++,k=0),A+=I,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 _=0,S=p[_],C=0;for(let w=0;w<f.length;w++)if(S===w){const v=p[++_];f.onDeleteEmitter.fire({index:w-C,amount:v}),w+=v-1,C+=v,S=p[++_]}else h.push(w);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,p){const h=[];for(let _=0;_<p.length;_++)h.push(f.get(p[_]));for(let _=0;_<h.length;_++)f.set(_,h[_]);f.length=p.length},a.reflowSmallerGetNewLineLengths=function(f,p,h){const _=[],S=f.map(((b,y)=>d(f,y,p))).reduce(((b,y)=>b+y));let C=0,w=0,v=0;for(;v<S;){if(S-v<h){_.push(S-v);break}C+=h;const b=d(f,w,p);C>b&&(C-=b,w++);const y=f[w].getWidth(C-1)===2;y&&C--;const x=y?h-1:h;_.push(x),v+=x}return _},a.getWrappedLineTrimmedLength=d},5295:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=d(8460),p=d(844),h=d(9092);class _ 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=_},511:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=d(482),p=d(643),h=d(3734);class _ 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 _;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 v=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-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=_},643:(u,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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=d(8460),p=d(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:(u,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:(u,a)=>{var d,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=`
518
+ `,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=""})(d||(a.C0=d={})),(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=`${d.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=d(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,_,S,C){const w={type:0,cancel:!1,key:void 0},v=(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=_?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?w.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?w.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(w.key=_?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;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"D",w.key===f.C0.ESC+"[1;3D"&&(w.key=f.C0.ESC+(S?"b":"[1;5D"))):w.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"C",w.key===f.C0.ESC+"[1;3C"&&(w.key=f.C0.ESC+(S?"f":"[1;5C"))):w.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"A",S||w.key!==f.C0.ESC+"[1;3A"||(w.key=f.C0.ESC+"[1;5A")):w.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"B",S||w.key!==f.C0.ESC+"[1;3B"||(w.key=f.C0.ESC+"[1;5B")):w.key=_?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=v?f.C0.ESC+"[3;"+(v+1)+"~":f.C0.ESC+"[3~";break;case 36:w.key=v?f.C0.ESC+"[1;"+(v+1)+"H":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:w.key=v?f.C0.ESC+"[1;"+(v+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?w.type=2:h.ctrlKey?w.key=f.C0.ESC+"[5;"+(v+1)+"~":w.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?w.type=3:h.ctrlKey?w.key=f.C0.ESC+"[6;"+(v+1)+"~":w.key=f.C0.ESC+"[6~";break;case 112:w.key=v?f.C0.ESC+"[1;"+(v+1)+"P":f.C0.ESC+"OP";break;case 113:w.key=v?f.C0.ESC+"[1;"+(v+1)+"Q":f.C0.ESC+"OQ";break;case 114:w.key=v?f.C0.ESC+"[1;"+(v+1)+"R":f.C0.ESC+"OR";break;case 115:w.key=v?f.C0.ESC+"[1;"+(v+1)+"S":f.C0.ESC+"OS";break;case 116:w.key=v?f.C0.ESC+"[15;"+(v+1)+"~":f.C0.ESC+"[15~";break;case 117:w.key=v?f.C0.ESC+"[17;"+(v+1)+"~":f.C0.ESC+"[17~";break;case 118:w.key=v?f.C0.ESC+"[18;"+(v+1)+"~":f.C0.ESC+"[18~";break;case 119:w.key=v?f.C0.ESC+"[19;"+(v+1)+"~":f.C0.ESC+"[19~";break;case 120:w.key=v?f.C0.ESC+"[20;"+(v+1)+"~":f.C0.ESC+"[20~";break;case 121:w.key=v?f.C0.ESC+"[21;"+(v+1)+"~":f.C0.ESC+"[21~";break;case 122:w.key=v?f.C0.ESC+"[23;"+(v+1)+"~":f.C0.ESC+"[23~";break;case 123:w.key=v?f.C0.ESC+"[24;"+(v+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:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,f=0,p=d.length){let h="";for(let _=f;_<p;++_){let S=d[_];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(d,f){const p=d.length;if(!p)return 0;let h=0,_=0;if(this._interim){const S=d.charCodeAt(_++);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=_;S<p;++S){const C=d.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=p)return this._interim=C,h;const w=d.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(d,f){const p=d.length;if(!p)return 0;let h,_,S,C,w=0,v=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=d[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=d[x])||128&(_=d[x+1])||128&(S=d[x+2])||128&(C=d[x+3]));)f[w++]=h,f[w++]=_,f[w++]=S,f[w++]=C,x+=4;if(h=d[x++],h<128)f[w++]=h;else if((224&h)==192){if(x>=p)return this.interim[0]=h,w;if(_=d[x++],(192&_)!=128){x--;continue}if(v=(31&h)<<6|63&_,v<128){x--;continue}f[w++]=v}else if((240&h)==224){if(x>=p)return this.interim[0]=h,w;if(_=d[x++],(192&_)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=_,w;if(S=d[x++],(192&S)!=128){x--;continue}if(v=(15&h)<<12|(63&_)<<6|63&S,v<2048||v>=55296&&v<=57343||v===65279)continue;f[w++]=v}else if((248&h)==240){if(x>=p)return this.interim[0]=h,w;if(_=d[x++],(192&_)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=_,w;if(S=d[x++],(192&S)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=S,w;if(C=d[x++],(192&C)!=128){x--;continue}if(v=(7&h)<<18|(63&_)<<12|(63&S)<<6|63&C,v<65536||v>1114111)continue;f[w++]=v}}return w}}},225:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=d(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 _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let S=0;S<p.length;++S)_.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?_[S]:(function(C,w){let v,b=0,y=w.length-1;if(C<w[0][0]||C>w[y][1])return!1;for(;y>=b;)if(v=b+y>>1,C>w[v][1])b=v+1;else{if(!(C<w[v][0]))return!0;y=v-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let w=this.wcwidth(S),v=w===0&&C!==0;if(v){const b=f.UnicodeService.extractWidth(C);b===0?v=!1:b>w&&(w=b)}return f.UnicodeService.createPropertyValue(0,w,v)}}},5981:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=d(8460),p=d(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 v=this._callbacks.shift();v&&v()}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 v=this._writeBuffer[this._bufferOffset],b=this._action(v,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-=v.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:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const d=/^([\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,_){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(_){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 _=h.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const S=d.exec(_);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(_.indexOf("#")===0&&(_=_.slice(1),f.exec(_)&&[3,6,9,12].includes(_.length))){const S=_.length/3,C=[0,0,0];for(let w=0;w<3;++w){const v=parseInt(_.slice(S*w,S*w+S),16);C[w]=S===1?v<<4:S===2?v:S===3?v>>4:v>>8}return C}},a.toRgbString=function(h,_=16){const[S,C,w]=h;return`rgb:${p(S,_)}/${p(C,_)}/${p(w,_)}`}},5770:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=d(482),p=d(8742),h=d(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const v=this._handlers[C];return v.push(w),{dispose:()=>{const b=v.indexOf(w);b!==-1&&v.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=_,this._ident=0}hook(C,w){if(this.reset(),this._ident=C,this._active=this._handlers[C]||_,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(C,w,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(C,w,v);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,w,v))}unhook(C,w=!0){if(this._active.length){let v=!1,b=this._active.length-1,y=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=w,y=this._stack.fallThrough,this._stack.paused=!1),!y&&v===!1){for(;b>=0&&(v=this._active[b].unhook(C),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",C);this._active=_,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,v){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,w,v),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((v=>(this._params=S,this._data="",this._hitLimit=!1,v)));return this._params=S,this._data="",this._hitLimit=!1,w}}},2015:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=d(844),p=d(8742),h=d(6242),_=d(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 v=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 v.setDefault(1,0),v.addMany(x,0,2,0),N)v.addMany([24,26,153,154],A,3,0),v.addMany(y(128,144),A,3,0),v.addMany(y(144,152),A,3,0),v.add(156,A,0,0),v.add(27,A,11,1),v.add(157,A,4,8),v.addMany([152,158,159],A,0,7),v.add(155,A,11,3),v.add(144,A,11,9);return v.addMany(k,0,3,0),v.addMany(k,1,3,1),v.add(127,1,0,1),v.addMany(k,8,0,8),v.addMany(k,3,3,3),v.add(127,3,0,3),v.addMany(k,4,3,4),v.add(127,4,0,4),v.addMany(k,6,3,6),v.addMany(k,5,3,5),v.add(127,5,0,5),v.addMany(k,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(x,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(y(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(x,7,0,7),v.addMany(k,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(y(64,127),3,7,0),v.addMany(y(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(y(48,60),4,8,4),v.addMany(y(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(y(32,64),6,0,6),v.add(127,6,0,6),v.addMany(y(64,127),6,0,0),v.addMany(y(32,48),3,9,5),v.addMany(y(32,48),5,9,5),v.addMany(y(48,64),5,0,6),v.addMany(y(64,127),5,7,0),v.addMany(y(32,48),4,9,5),v.addMany(y(32,48),1,9,2),v.addMany(y(32,48),2,9,2),v.addMany(y(48,127),2,10,0),v.addMany(y(48,80),1,10,0),v.addMany(y(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(y(96,127),1,10,0),v.add(80,1,11,9),v.addMany(k,9,0,9),v.add(127,9,0,9),v.addMany(y(28,32),9,0,9),v.addMany(y(32,48),9,9,12),v.addMany(y(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(k,11,0,11),v.addMany(y(32,128),11,0,11),v.addMany(y(28,32),11,0,11),v.addMany(k,10,0,10),v.add(127,10,0,10),v.addMany(y(28,32),10,0,10),v.addMany(y(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(y(32,48),10,9,12),v.addMany(k,12,0,12),v.add(127,12,0,12),v.addMany(y(28,32),12,0,12),v.addMany(y(32,48),12,9,12),v.addMany(y(48,64),12,0,11),v.addMany(y(64,127),12,12,13),v.addMany(y(64,127),10,12,13),v.addMany(y(64,127),9,12,13),v.addMany(k,13,13,13),v.addMany(x,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(C,0,2,0),v.add(C,8,5,8),v.add(C,6,0,6),v.add(C,11,0,11),v.add(C,13,13,13),v})();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 _.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 U=T+1;;++U){if(U>=y||(N=b[U])<32||N>126&&N<C){this._printHandler(b,T,U),T=U-1;break}if(++U>=y||(N=b[U])<32||N>126&&N<C){this._printHandler(b,T,U),T=U-1;break}if(++U>=y||(N=b[U])<32||N>126&&N<C){this._printHandler(b,T,U),T=U-1;break}if(++U>=y||(N=b[U])<32||N>126&&N<C){this._printHandler(b,T,U),T=U-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 I=this._escHandlers[this._collect<<8|N];let V=I?I.length-1:-1;for(;V>=0&&(k=I[V](),k!==!0);V--)if(k instanceof Promise)return this._preserveStack(4,I,V,A,T),k;V<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 U=T+1;;++U)if(U>=y||(N=b[U])===24||N===26||N===27||N>127&&N<C){this._dcsParser.put(b,T,U),T=U-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 U=T+1;;U++)if(U>=y||(N=b[U])<32||N>127&&N<C){this._oscParser.put(b,T,U),T=U-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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=d(5770),p=d(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(_,S){this._handlers[_]===void 0&&(this._handlers[_]=[]);const C=this._handlers[_];return C.push(S),{dispose:()=>{const w=C.indexOf(S);w!==-1&&C.splice(w,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].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 _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,S,C){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(_,S,C);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(_,S,C))}start(){this.reset(),this._state=1}put(_,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const w=_[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(_,S,C)}}end(_,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,v=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,C=S,v=this._stack.fallThrough,this._stack.paused=!1),!v&&C===!1){for(;w>=0&&(C=this._active[w].end(_),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",_);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,S,C){this._hitLimit||(this._data+=(0,p.utf32ToString)(_,S,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let S=!1;if(this._hitLimit)S=!1;else if(_&&(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:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const d=2147483647;class f{static fromArray(h){const _=new f;if(!h.length)return _;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)_.addSubParam(C[w]);else _.addParam(C)}return _}constructor(h=32,_=32){if(this.maxLength=h,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(_),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 _=0;_<this.length;++_){h.push(this.params[_]);const S=this._subParamsIdx[_]>>8,C=255&this._subParamsIdx[_];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>d?d: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>d?d:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const _=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-_>0?this._subParams.subarray(_,S):null}getSubParamsAll(){const h={};for(let _=0;_<this.length;++_){const S=this._subParamsIdx[_]>>8,C=255&this._subParamsIdx[_];C-S>0&&(h[_]=this._subParams.slice(S,C))}return h}addDigit(h){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[_-1];S[_-1]=~C?Math.min(10*C+h,d):h}}a.Params=f},5741:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,f){const p={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(p),f.dispose=()=>this._wrappedAddonDispose(p),f.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let f=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===d){f=p;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(f,1)}}},8771:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=d(3785),p=d(511);a.BufferApiView=class{constructor(h,_){this._buffer=h,this.type=_}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 _=this._buffer.lines.get(h);if(_)return new f.BufferLineApiView(_)}getNullCell(){return new p.CellData}}},3785:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=d(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,_){return this._line.translateToString(p,h,_)}}},8285:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=d(8771),p=d(8460),h=d(844);class _ 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=_},7975:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,f){return this._core.registerCsiHandler(d,(p=>f(p.toArray())))}addCsiHandler(d,f){return this.registerCsiHandler(d,f)}registerDcsHandler(d,f){return this._core.registerDcsHandler(d,((p,h)=>f(p,h.toArray())))}addDcsHandler(d,f){return this.registerDcsHandler(d,f)}registerEscHandler(d,f){return this._core.registerEscHandler(d,f)}addEscHandler(d,f){return this.registerEscHandler(d,f)}registerOscHandler(d,f){return this._core.registerOscHandler(d,f)}addOscHandler(d,f){return this.registerOscHandler(d,f)}}},7090:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(u,a,d){var f=this&&this.__decorate||function(v,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(v,b,y,x);else for(var M=v.length-1;M>=0;M--)(k=v[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(v,b){return function(y,x){b(y,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=d(8460),_=d(844),S=d(5295),C=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let w=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(v){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(v.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const y=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=y.getBlankLine(v,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(v,b,y){const x=this.buffer;if(v<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else v+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const k=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+v,x.ybase),0),k!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};a.BufferService=w=f([p(0,C.IOptionsService)],w)},7994:(u,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(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,f){this._charsets[d]=f,this.glevel===d&&(this.charset=f)}}},1753:function(u,a,d){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=d(2585),_=d(8460),S=d(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 v=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${v(k[0])}${v(k[1])}${v(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 _.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(u,a,d){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=d(1439),_=d(8460),S=d(844),C=d(2585),w=Object.freeze({insertMode:!1}),v=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 _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(v)}reset(){this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(v)}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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=d(8055),p=d(8460),h=d(844),_=d(6106);let S=0,C=0;class w extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.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 v(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 v 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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=d(2585),p=d(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(_,S){this._services.set(_,S)}getService(_){return this._services.get(_)}createInstance(_,...S){const C=(0,p.getServiceDependencies)(_).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] ${_.name} depends on UNKNOWN service ${b.id}.`);w.push(y)}const v=C.length>0?C[0].index:S.length;if(S.length!==v)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${v+1} conflicts with ${S.length} static arguments`);return new _(...S,...w)}}},7866:function(u,a,d){var f=this&&this.__decorate||function(v,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(v,b,y,x);else for(var M=v.length-1;M>=0;M--)(k=v[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(v,b){return function(y,x){b(y,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(844),_=d(2585),S={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let C,w=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;b<v.length;b++)typeof v[b]=="function"&&(v[b]=v[b]())}_log(v,b,y){this._evalLazyOptionalParams(y),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...y)}trace(v,...b){var y,x;this._logLevel<=_.LogLevelEnum.TRACE&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.trace.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}debug(v,...b){var y,x;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.debug.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}info(v,...b){var y,x;this._logLevel<=_.LogLevelEnum.INFO&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.info.bind(this._optionsService.options.logger))!=null?x:console.info,v,b)}warn(v,...b){var y,x;this._logLevel<=_.LogLevelEnum.WARN&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.warn.bind(this._optionsService.options.logger))!=null?x:console.warn,v,b)}error(v,...b){var y,x;this._logLevel<=_.LogLevelEnum.ERROR&&this._log((x=(y=this._optionsService.options.logger)==null?void 0:y.error.bind(this._optionsService.options.logger))!=null?x:console.error,v,b)}};a.LogService=w=f([p(0,_.IOptionsService)],w),a.setTraceLogger=function(v){C=v},a.traceCall=function(v,b,y){if(typeof y.value!="function")throw new Error("not supported");const x=y.value;y.value=function(...k){if(C.logLevel!==_.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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=d(8460),p=d(844),h=d(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 _=["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 v={...a.DEFAULT_OPTIONS};for(const b in w)if(b in v)try{const y=w[b];v[b]=this._sanitizeAndValidateOption(b,y)}catch(y){console.error(y)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,v){return this.onOptionChange((b=>{b===w&&v(this.rawOptions[w])}))}onMultipleOptionChange(w,v){return this.onOptionChange((b=>{w.indexOf(b)!==-1&&v()}))}_setupOptions(){const w=b=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(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:v.bind(this,b)};Object.defineProperty(this.options,b,y)}}_sanitizeAndValidateOption(w,v){switch(w){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[w]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${w}`);break;case"wordSeparator":v||(v=a.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=_.includes(v)?v:a.DEFAULT_OPTIONS[w];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${w} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${w} must be numeric, value: ${v}`);break;case"windowsPty":v=v!=null?v:{}}return v}}a.OptionsService=S},2660:function(u,a,d){var f=this&&this.__decorate||function(S,C,w,v){var b,y=arguments.length,x=y<3?C:v===null?v=Object.getOwnPropertyDescriptor(C,w):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,C,w,v);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,v){C(w,v,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=d(2585);let _=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,v=this._getEntryIdKey(w),b=this._entriesWithId.get(v);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((v=>v.line!==C))){const v=this._bufferService.buffer.addMarker(C);w.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(w,v)))}}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=_=f([p(0,h.IBufferService)],_)},8343:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="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(_,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,v,b){v[d]===v?v[f].push({id:w,index:b}):(v[f]=[{id:w,index:b}],v[d]=v)})(h,_,C)};return h.toString=()=>p,a.serviceRegistry.set(p,h),h}},2585:(u,a,d)=>{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=d(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:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=d(8460),p=d(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 v=S.length;for(let b=0;b<v;++b){let y=S.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=v)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(u){var a=i[u];if(a!==void 0)return a.exports;var d=i[u]={exports:{}};return n[u].call(d.exports,d,d.exports,o),d.exports}var l={};return(()=>{var u=l;Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const a=o(9042),d=o(3236),f=o(844),p=o(5741),h=o(8285),_=o(7975),S=o(7090),C=["cols","rows"];class w extends f.Disposable{constructor(b){super(),this._core=this.register(new d.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 _.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
519
+ `,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")}}u.Terminal=w})(),l})()))})(sg)),sg.exports}var L8=O8(),og={exports:{}},jb;function I8(){return jb||(jb=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 u=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=d-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),_=f-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-u;return{cols:Math.max(2,Math.floor(_/l.css.cell.width)),rows:Math.max(1,Math.floor(h/l.css.cell.height))}}}})(),n})()))})(og)),og.exports}var z8=I8(),ag={exports:{}},Ob;function B8(){return Ob||(Ob=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={6:(u,a)=>{function d(p){try{const h=new URL(p),_=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(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,h,_,S={}){this._terminal=p,this._regex=h,this._handler=_,this._options=S}provideLinks(p,h){const _=f.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(_))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(_,S)=>{if(this._options.hover){const{range:C}=h;this._options.hover(_,S,C)}},h)))}};class f{static computeLink(h,_,S,C){const w=new RegExp(_.source,(_.flags||"")+"g"),[v,b]=f._getWindowedLineStrings(h-1,S),y=v.join("");let x;const k=[];for(;x=w.exec(y);){const N=x[0];if(!d(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,_){let S,C=h,w=h,v=0,b="";const y=[];if(S=_.buffer.active.getLine(h)){const x=S.translateToString(!0);if(S.isWrapped&&x[0]!==" "){for(v=0;(S=_.buffer.active.getLine(--C))&&v<2048&&(b=S.translateToString(!0),v+=b.length,y.push(b),S.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),v=0;(S=_.buffer.active.getLine(++w))&&S.isWrapped&&v<2048&&(b=S.translateToString(!0),v+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,C]}static _mapStrIdx(h,_,S,C){const w=h.buffer.active,v=w.getNullCell();let b=S;for(;C;){const y=w.getLine(_);if(!y)return[-1,-1];for(let x=b;x<y.length;++x){y.getCell(x,v);const k=v.getChars();if(v.getWidth()&&(C-=k.length||1,x===y.length-1&&k==="")){const N=w.getLine(_+1);N&&N.isWrapped&&(N.getCell(0,v),v.getWidth()===2&&(C+=1))}if(C<0)return[_,x]}_++,b=0}return[_,b]}}a.LinkComputer=f}},i={};function o(u){var a=i[u];if(a!==void 0)return a.exports;var d=i[u]={exports:{}};return n[u](d,d.exports,o),d.exports}var l={};return(()=>{var u=l;Object.defineProperty(u,"__esModule",{value:!0}),u.WebLinksAddon=void 0;const a=o(6),d=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(p,h){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}u.WebLinksAddon=class{constructor(p=f,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,_=h.urlRegex||d;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,_,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),l})()))})(ag)),ag.exports}var P8=B8();const Do={INPUT:1,RESIZE:2,CLOSE:3,OUTPUT:4,EXIT:5,ERROR:6,INIT_ACK:7,TITLE:8};function lg(t,e){const n=new Uint8Array(1+e.length);return n[0]=t,n.set(e,1),n}function F8(t,e){const{serverUrl:n,apiToken:i,cwd:o}=e,l=D.useRef(null),u=D.useRef(null),a=D.useRef(null),d=D.useRef("disconnected"),f=D.useRef(!1),p=D.useRef(0),h=D.useRef(e.onStatusChange),_=D.useRef(e.onExit),S=D.useRef(e.onSessionInit),C=D.useRef(e.onTitleChange);D.useEffect(()=>{h.current=e.onStatusChange,_.current=e.onExit,S.current=e.onSessionInit,C.current=e.onTitleChange});const w=D.useRef(n),v=D.useRef(i),b=D.useRef(o),y=D.useRef(e.serverSessionId);D.useEffect(()=>{w.current=n,v.current=i,b.current=o,y.current=e.serverSessionId});const x=D.useCallback(j=>{var O;d.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 I=y.current,V=I?`ws://${w.current}/ws/terminal?token=${v.current}&cwd=${encodeURIComponent(b.current)}&sessionId=${I}`:`ws://${w.current}/ws/terminal?token=${v.current}&cwd=${encodeURIComponent(b.current)}`,U=new WebSocket(V);U.binaryType="arraybuffer",U.onopen=()=>{if(p.current!==j){U.close();return}if(a.current=U,l.current&&u.current)try{u.current.fit()}catch{}},U.onmessage=W=>{var ee,B,L,z,H,F,Q,te;if(p.current!==j||!(W.data instanceof ArrayBuffer))return;const K=new Uint8Array(W.data);if(K.length<1)return;const G=K[0],Z=K.slice(1);switch(G){case Do.OUTPUT:{const X=new TextDecoder().decode(Z);(ee=l.current)==null||ee.write(X);break}case Do.EXIT:{const{exitCode:X}=JSON.parse(new TextDecoder().decode(Z));x("exited"),(B=l.current)==null||B.writeln(`\r
520
+ [Process exited with code ${X}]`),(L=_.current)==null||L.call(_,X),U.close();break}case Do.ERROR:{const{message:X}=JSON.parse(new TextDecoder().decode(Z));x("disconnected"),(z=l.current)==null||z.writeln(`\r
521
+ [Error: ${X}]`);break}case Do.INIT_ACK:{const X=JSON.parse(new TextDecoder().decode(Z));(H=S.current)==null||H.call(S,X),X.isReconnect&&X.status==="exited"?(x("exited"),(F=l.current)==null||F.writeln(`\r
522
+ [Process exited with code ${X.exitCode} while disconnected]`),(Q=_.current)==null||Q.call(_,X.exitCode)):x("connected");break}case Do.TITLE:{const{title:X}=JSON.parse(new TextDecoder().decode(Z));(te=C.current)==null||te.call(C,X);break}}},U.onclose=()=>{var W;p.current===j&&(a.current=null,d.current==="connecting"?(x("disconnected"),(W=l.current)==null||W.writeln(`\r
523
+ [Connection failed]`)):d.current==="connected"&&x("disconnected"))},U.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 L8.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)"}}),I=new z8.FitAddon,V=new P8.WebLinksAddon;O.loadAddon(I),O.loadAddon(V);let U=!1;const W=requestAnimationFrame(()=>{if(!(U||!j.isConnected))if(O.open(j),O.cols<=1||O.rows<=1){const K=()=>{if(!U){try{if(I.fit(),O.cols>1&&O.rows>1)return}catch{}requestAnimationFrame(K)}};requestAnimationFrame(K)}else try{I.fit()}catch{}});return l.current=O,u.current=I,O.onData(K=>{const G=a.current;if(!G||G.readyState!==WebSocket.OPEN)return;const Z=new TextEncoder().encode(K);G.send(lg(Do.INPUT,Z))}),O.onResize(({cols:K,rows:G})=>{const Z=a.current;if(!Z||Z.readyState!==WebSocket.OPEN)return;const ee=new TextEncoder().encode(JSON.stringify({cols:K,rows:G}));Z.send(lg(Do.RESIZE,ee))}),k(),()=>{U=!0,cancelAnimationFrame(W),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,u.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=u.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(lg(Do.CLOSE,new Uint8Array(0)))}catch{}j.close(),a.current=null}(O=l.current)==null||O.dispose(),l.current=null,u.current=null,f.current=!0},[]);return{fit:A,focus:M,destroy:T}}const H8=D.forwardRef(function({serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:u,onSessionInit:a,onTitleChange:d},f){const p=D.useRef(null),h=D.useCallback(()=>p.current,[]),{fit:_,focus:S}=F8(h,{serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:u,onSessionInit:a,onTitleChange:d});return D.useImperativeHandle(f,()=>({focus:S}),[S]),D.useEffect(()=>{const C=p.current;if(!C)return;const w=new ResizeObserver(()=>{requestAnimationFrame(()=>_())});return w.observe(C),()=>{w.disconnect()}},[_]),D.useEffect(()=>{const C=p.current;if(!C)return;let w=0;const v=10,b=setInterval(()=>{if(w++,w>v){clearInterval(b);return}C.offsetParent!==null&&(clearInterval(b),requestAnimationFrame(()=>_()))},100);return()=>{clearInterval(b)}},[_]),g.jsx("div",{ref:p,className:"w-full h-full",onFocus:S})});function U8(){const t=ge.c(2),[e,n]=D.useState($8);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.visualViewport;if(!l)return;const u=()=>{n({height:l.height,offsetTop:l.offsetTop,scale:l.scale})};return u(),l.addEventListener("resize",u),l.addEventListener("scroll",u),()=>{l.removeEventListener("resize",u),l.removeEventListener("scroll",u)}},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),e}function $8(){return{height:typeof window<"u"?window.innerHeight:0,offsetTop:0,scale:1}}const V8=5,q8=300,W8=200,G8=.7,K8=D.forwardRef(function({workspaceId:e,workspacePath:n,workspaceName:i,serverUrl:o,apiToken:l,isOpen:u,onClose:a},d){var F,Q,te;const f=ud(),p=U8(),[h,_]=D.useState(new Map),[S,C]=D.useState(new Map),[w,v]=D.useState(q8),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&&(te=(Q=h.get(e))==null?void 0:Q.length)!=null?te:0)<V8,O=D.useCallback(async X=>{if(!(!o||!l||k.current.has(X))){k.current.add(X);try{const q=await fetch(`http://${o}/api/workspaces/${X}/terminals`,{headers:{Authorization:`Bearer ${l}`}});if(!q.ok)return;const $=await q.json();if(!$.sessions||$.sessions.length===0)return;const ne=$.sessions.map(ie=>({id:crypto.randomUUID(),serverSessionId:ie.id,workspaceId:X,workspacePath:ie.cwd,title:ie.title,status:"disconnected"}));_(ie=>{var je;const ae=(je=ie.get(X))!=null?je:[],se=new Set(ae.map(Be=>Be.serverSessionId).filter(Boolean)),ye=ne.filter(Be=>!se.has(Be.serverSessionId));if(ye.length===0)return ie;if(ae.length>0){for(const Be of ye)fetch(`http://${o}/api/workspaces/${X}/terminals/${Be.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{});return ie}const Re=new Map(ie);return Re.set(X,[...ae,...ye]),Re}),C(ie=>{const ae=new Map(ie);return ae.has(X)||ae.set(X,ne[0].id),ae})}catch(q){console.log("[TerminalPanel] fetchExistingSessions FAILED",q)}finally{k.current.delete(X)}}},[o,l]);D.useEffect(()=>{!e||!u||O(e)},[e,u,O]);const I=D.useCallback((X,q)=>{_($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,status:q}:ye);se.some(ye=>ye.id===X)&&ne.set(ie,se)}return ne})},[]),V=D.useCallback((X,q)=>{_($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,serverSessionId:q.sessionId,title:q.title||ye.title}:ye);se.some(ye=>ye.id===X)&&ne.set(ie,se)}return ne})},[]),U=D.useCallback((X,q)=>{_($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,title:q}:ye);se.some(ye=>ye.id===X)&&ne.set(ie,se)}return ne})},[]),W=D.useCallback(()=>{if(!e||!n||!j)return;const X={id:crypto.randomUUID(),serverSessionId:null,workspaceId:e,workspacePath:n,title:"main",status:"connecting"};_(q=>{var ie;const $=new Map(q),ne=(ie=$.get(e))!=null?ie:[];return $.set(e,[...ne,X]),$}),C(q=>{const $=new Map(q);return $.set(e,X.id),$})},[e,n,j]),K=D.useCallback(X=>{const q=[...h.values()].flat().find($=>$.id===X);q!=null&&q.serverSessionId&&o&&l&&fetch(`http://${o}/api/workspaces/${q.workspaceId}/terminals/${q.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{}),_($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.filter(ye=>ye.id!==X);se.length<ae.length&&ne.set(ie,se)}return ne}),C($=>{var ie,ae;const ne=new Map($);for(const[se,ye]of ne.entries())if(ye===X){const Re=(ae=(ie=h.get(se))==null?void 0:ie.filter(je=>je.id!==X))!=null?ae:[];Re.length>0?ne.set(se,Re[Re.length-1].id):ne.delete(se)}return ne})},[h,o,l]);D.useEffect(()=>{var q;if(!e||!n||!u)return;((q=h.get(e))!=null?q:[]).length===0&&W()},[u,e,n,h,W]);const G=D.useCallback(()=>{var X;(X=N.current.get(M!=null?M:""))==null||X.focus()},[M]);D.useImperativeHandle(d,()=>({focus:G}),[G]),D.useEffect(()=>{if(!u||A.length===0)return;const X=setTimeout(G,300);return()=>clearTimeout(X)},[u,A.length,G]);const Z=D.useCallback(X=>{X.preventDefault(),b.current=!0;const q="touches"in X?X.touches[0].clientY:X.clientY;y.current=q,x.current=w;const $=ie=>{if(!b.current)return;const ae="touches"in ie?ie.touches[0].clientY:ie.clientY,se=y.current-ae,ye=window.innerHeight*G8,Re=Math.min(Math.max(x.current+se,W8),ye);v(Re)},ne=()=>{b.current=!1,document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",ne),document.removeEventListener("touchmove",$),document.removeEventListener("touchend",ne)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",ne),document.addEventListener("touchmove",$,{passive:!1}),document.addEventListener("touchend",ne)},[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 B=`[${i||n.split("/").pop()||"ws"}]`,L=X=>{switch(X){case"connecting":return"bg-warning";case"connected":return"bg-success";case"disconnected":return"bg-muted-foreground";case"exited":return"bg-error"}},z=()=>g.jsxs("div",{className:"flex items-center gap-0.5 overflow-x-auto px-1 min-h-[32px]",children:[A.map(X=>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",X.id===M?"bg-accent text-accent-foreground border-border":"text-muted-foreground hover:bg-muted"),onClick:()=>C(q=>{const $=new Map(q);return $.set(e,X.id),$}),children:[g.jsx("span",{className:Ee("w-1.5 h-1.5 rounded-full shrink-0",L(X.status))}),g.jsxs("span",{children:[B," ",X.title]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:text-destructive transition-opacity ml-0.5",onClick:q=>{q.stopPropagation(),K(X.id)},children:g.jsx(Ms,{className:"w-3 h-3"})})]},X.id)),j&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:W,title:"New terminal tab",children:g.jsx(mc,{className:"w-3.5 h-3.5"})})]}),H=()=>g.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[A.map(X=>g.jsx("div",{className:Ee("w-full h-full",X.id!==M?"invisible absolute inset-0 pointer-events-none":"relative"),children:g.jsx(Y8,{tab:X,serverUrl:o,apiToken:l,onStatusChange:q=>I(X.id,q),onSessionInit:q=>V(X.id,q),onTitleChange:q=>U(X.id,q),onTerminalRef:q=>{q?N.current.set(X.id,q):N.current.delete(X.id)}},X.id)},X.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 q=p.height<window.innerHeight*.85?`calc(${p.height}px - env(safe-area-inset-top, 0px))`:Math.min(window.innerHeight*.7,p.height);return u?g.jsx(Ph,{open:u,onOpenChange:$=>!$&&a(),children:g.jsxs(Fh,{side:"top",className:"p-0 bg-background [&>button]:hidden flex flex-col",style:{height:q},children:[g.jsx(Hh,{className:"sr-only",children:g.jsx(Uh,{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(By,{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(Ms,{className:"w-4 h-4"})})]}),z(),H()]})}):null}return g.jsxs("div",{className:Ee(!u&&"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:Z,onTouchStart:Z,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(By,{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(Ms,{className:"w-3.5 h-3.5"})})]}),z(),H()]})]})});function Y8(t){const e=ge.c(13),{tab:n,serverUrl:i,apiToken:o,onStatusChange:l,onSessionInit:u,onTitleChange:a,onTerminalRef:d}=t,f=D.useRef(l),p=D.useRef(u),h=D.useRef(a);let _;e[0]!==u||e[1]!==l||e[2]!==a?(_=()=>{f.current=l,p.current=u,h.current=a},e[0]=u,e[1]=l,e[2]=a,e[3]=_):_=e[3],D.useEffect(_);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 v=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]!==d||e[9]!==i||e[10]!==n.serverSessionId||e[11]!==n.workspacePath?(x=g.jsx(H8,{ref:d,serverUrl:i,apiToken:o,cwd:n.workspacePath,serverSessionId:n.serverSessionId,onStatusChange:C,onSessionInit:v,onTitleChange:y}),e[7]=o,e[8]=d,e[9]=i,e[10]=n.serverSessionId,e[11]=n.workspacePath,e[12]=x):x=e[12],x}function X8(t){return t.role==="assistant"}const Q8=_c("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 jf(t){const e=ge.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(Q8({variant:o}),n),e[4]=n,e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==i||e[8]!==l?(u=g.jsx("div",{"data-slot":"alert",role:"alert",className:l,...i}),e[7]=i,e[8]=l,e[9]=u):u=e[9],u}function Of(t){const e=ge.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 Z8(t){const e=ge.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 u=`translateX(-${100-(o||0)}%)`;let a;e[6]!==u?(a=g.jsx(YN,{"data-slot":"progress-indicator",className:"size-full flex-1 bg-primary transition-all",style:{transform:u}}),e[6]=u,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==l||e[10]!==a?(d=g.jsx(KN,{"data-slot":"progress",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=d):d=e[11],d}function Cf(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()}function J8(t){return t>=60?"critical":t>=40?"warning":"normal"}function eO(t){const e=ge.c(41),{totalTokens:n,contextWindow:i,modelName:o,compact:l}=t,u=n===void 0?0:n,a=i===void 0?0:i,d=l===void 0?!1:l,f=u===0?0:a;let p;e[0]!==f||e[1]!==u?(p=f===0?0:Math.min(100,Math.round(u/f*100)),e[0]=f,e[1]=u,e[2]=p):p=e[2];const h=p;let _;e[3]!==h?(_=J8(h),e[3]=h,e[4]=_):_=e[4];const S=_;if(d){let O;e[5]!==u?(O=Cf(u),e[5]=u,e[6]=O):O=e[6];let I;e[7]!==f?(I=Cf(f),e[7]=f,e[8]=I):I=e[8];let V;e[9]!==O||e[10]!==I?(V=g.jsxs("span",{className:"text-xs font-mono",children:[O,"/",I]}),e[9]=O,e[10]=I,e[11]=V):V=e[11];let U;e[12]===Symbol.for("react.memo_cache_sentinel")?(U=g.jsx($u,{asChild:!0,children:g.jsx(I4,{className:"size-3 text-muted-foreground cursor-help"})}),e[12]=U):U=e[12];let W;e[13]!==h?(W=g.jsx(Yf,{children:g.jsxs(Uu,{children:[U,g.jsx(Vu,{side:"bottom",children:g.jsxs("p",{className:"text-xs",children:[h,"% of context window used"]})})]})}),e[13]=h,e[14]=W):W=e[14];let K;return e[15]!==W||e[16]!==V?(K=g.jsxs("div",{className:"flex items-center gap-1.5",children:[V,W]}),e[15]=W,e[16]=V,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]!==u?(w=Cf(u),e[19]=u,e[20]=w):w=e[20];let v;e[21]!==f?(v=Cf(f),e[21]=f,e[22]=v):v=e[22];let b;e[23]!==w||e[24]!==v?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[C,g.jsxs("span",{className:"text-xs font-mono",children:[w,"/",v]})]}),e[23]=w,e[24]=v,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(Z8,{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 ev(t){const e=ge.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(DD,{"data-slot":"select",...n}),e[2]=n,e[3]=i):i=e[3],i}function tO(t){const e=ge.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(BD,{"data-slot":"select-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function fc(t){const e=ge.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(jD,{"data-slot":"select-value",...n}),e[2]=n,e[3]=i):i=e[3],i}function tv(t){const e=ge.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 u=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 d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(OD,{asChild:!0,children:g.jsx(pc,{className:"pointer-events-none size-4 text-muted-foreground"})}),e[7]=d):d=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==a?(f=g.jsxs(MD,{"data-slot":"select-trigger","data-size":u,className:a,...o,children:[n,d]}),e[8]=n,e[9]=o,e[10]=u,e[11]=a,e[12]=f):f=e[12],f}function nv(t){const e=ge.c(24);let n,i,o,l,u;e[0]!==t?({className:i,children:n,position:l,align:u,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5]);const a=l===void 0?"item-aligned":l,d=u===void 0?"center":u,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 _;e[9]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(rO,{}),e[9]=_):_=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(zD,{"data-position":a,className:C,children:n}),e[12]=n,e[13]=a,e[14]=C,e[15]=w):w=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(iO,{}),e[16]=v):v=e[16];let b;return e[17]!==d||e[18]!==a||e[19]!==o||e[20]!==f||e[21]!==h||e[22]!==w?(b=g.jsx(LD,{children:g.jsxs(ID,{"data-slot":"select-content","data-align-trigger":f,className:h,position:a,align:d,...o,children:[_,w,v]})}),e[17]=d,e[18]=a,e[19]=o,e[20]=f,e[21]=h,e[22]=w,e[23]=b):b=e[23],b}function nO(t){const e=ge.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(PD,{"data-slot":"select-label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function $h(t){const e=ge.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 u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:g.jsx(UD,{children:g.jsx(js,{className:"pointer-events-none"})})}),e[6]=u):u=e[6];let a;e[7]!==n?(a=g.jsx(HD,{children:n}),e[7]=n,e[8]=a):a=e[8];let d;return e[9]!==o||e[10]!==l||e[11]!==a?(d=g.jsxs(FD,{"data-slot":"select-item",className:l,...o,children:[u,a]}),e[9]=o,e[10]=l,e[11]=a,e[12]=d):d=e[12],d}function rO(t){const e=ge.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(s4,{}),e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==o?(u=g.jsx($D,{"data-slot":"select-scroll-up-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=u):u=e[8],u}function iO(t){const e=ge.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(pc,{}),e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==o?(u=g.jsx(VD,{"data-slot":"select-scroll-down-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=u):u=e[8],u}function ii(t){const e=ge.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(AN,{"data-slot":"label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function sO(t){switch(t){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function oO(t){const e=ge.c(45),{models:n,selectedModelId:i,onChangeModel:o,disabled:l,compact:u,iconOnly:a,connectedProviderIds:d,connectableProviderIds:f}=t,p=u===void 0?!1:u,h=a===void 0?!1:a;let _,S,C,w,v,b,y,x,k;if(e[0]!==p||e[1]!==f||e[2]!==d||e[3]!==l||e[4]!==h||e[5]!==n||e[6]!==o||e[7]!==i){const T=n.reduce(aO,{});let j;e[17]!==n||e[18]!==o?(j=K=>{const G=n.find(Z=>Z.id===K);G&&o(K,G.providerId)},e[17]=n,e[18]=o,e[19]=j):j=e[19];const O=j,I=p&&!h;x="flex items-center gap-2",e[20]!==h||e[21]!==I?(k=!h&&g.jsx(ii,{className:"text-xs text-muted-foreground",children:I?g.jsx(Ly,{className:"size-3.5"}):"Model:"}),e[20]=h,e[21]=I,e[22]=k):k=e[22],S=ev,w=i||"",v=O,b=l;const V=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 U;e[23]!==h?(U=h&&g.jsxs(g.Fragment,{children:[g.jsx(Ly,{className:"size-4"}),g.jsx(fc,{className:"sr-only"})]}),e[23]=h,e[24]=U):U=e[24];let W;e[25]!==h?(W=!h&&g.jsx(fc,{placeholder:"Select model"}),e[25]=h,e[26]=W):W=e[26],e[27]!==V||e[28]!==U||e[29]!==W?(y=g.jsxs(tv,{className:V,children:[U,W]}),e[27]=V,e[28]=U,e[29]=W,e[30]=y):y=e[30],_=nv,C=Object.entries(T).map(K=>{const[G,Z]=K;return g.jsxs(tO,{children:[g.jsx(nO,{children:G}),Z.map(ee=>g.jsx($h,{value:ee.id,disabled:(f==null?void 0:f.has(ee.providerId))&&!(d!=null&&d.has(ee.providerId)),children:g.jsxs("span",{className:"flex items-center gap-2",children:[ee.name,g.jsx("span",{className:"text-muted-foreground text-xs",children:sO(ee.tier)}),(f==null?void 0:f.has(ee.providerId))&&(d==null?void 0:d.has(ee.providerId))&&g.jsx(Gn,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"Sub"}),(f==null?void 0:f.has(ee.providerId))&&!(d!=null&&d.has(ee.providerId))&&g.jsx(Gn,{variant:"outline",className:"text-[10px] px-1 py-0 h-4",children:"OAuth"})]})},ee.id))]},G)}),e[0]=p,e[1]=f,e[2]=d,e[3]=l,e[4]=h,e[5]=n,e[6]=o,e[7]=i,e[8]=_,e[9]=S,e[10]=C,e[11]=w,e[12]=v,e[13]=b,e[14]=y,e[15]=x,e[16]=k}else _=e[8],S=e[9],C=e[10],w=e[11],v=e[12],b=e[13],y=e[14],x=e[15],k=e[16];let N;e[31]!==_||e[32]!==C?(N=g.jsx(_,{children:C}),e[31]=_,e[32]=C,e[33]=N):N=e[33];let A;e[34]!==S||e[35]!==N||e[36]!==w||e[37]!==v||e[38]!==b||e[39]!==y?(A=g.jsxs(S,{value:w,onValueChange:v,disabled:b,children:[y,N]}),e[34]=S,e[35]=N,e[36]=w,e[37]=v,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 aO(t,e){return t[e.providerName]||(t[e.providerName]=[]),t[e.providerName].push(e),t}const lO={low:"Low",medium:"Medium",high:"High",xhigh:"X-High",minimal:"Minimal",max:"Max"};function cO(t){return lO[t]||t.charAt(0).toUpperCase()+t.slice(1)}function uO(t){const e=ge.c(45),{variants:n,selectedVariant:i,onChangeVariant:o,disabled:l,compact:u,iconOnly:a}=t,d=u===void 0?!1:u,f=a===void 0?!1:a,p=d&&!f;if(!n||Object.keys(n).length===0)return null;let h,_,S,C,w,v,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=W=>{o(W==="__none__"?null:W)},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(ii,{className:"text-xs text-muted-foreground",children:p?g.jsx(Oy,{className:"size-3.5"}):"Thinking:"}),e[18]=f,e[19]=p,e[20]=S):S=e[20],_=ev,v=i||"__none__",b=O,y=l;const I=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 V;e[21]!==f?(V=f&&g.jsxs(g.Fragment,{children:[g.jsx(Oy,{className:"size-4"}),g.jsx(fc,{className:"sr-only"})]}),e[21]=f,e[22]=V):V=e[22];let U;e[23]!==f?(U=!f&&g.jsx(fc,{placeholder:"Default"}),e[23]=f,e[24]=U):U=e[24],e[25]!==I||e[26]!==V||e[27]!==U?(x=g.jsxs(tv,{className:I,children:[V,U]}),e[25]=I,e[26]=V,e[27]=U,e[28]=x):x=e[28],h=nv,e[29]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx($h,{value:"__none__",children:"Default"}),e[29]=C):C=e[29],w=T.map(dO),e[0]=l,e[1]=f,e[2]=o,e[3]=i,e[4]=p,e[5]=n,e[6]=h,e[7]=_,e[8]=S,e[9]=C,e[10]=w,e[11]=v,e[12]=b,e[13]=y,e[14]=x,e[15]=k}else h=e[6],_=e[7],S=e[8],C=e[9],w=e[10],v=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]!==_||e[35]!==N||e[36]!==v||e[37]!==b||e[38]!==y||e[39]!==x?(A=g.jsxs(_,{value:v,onValueChange:b,disabled:y,children:[x,N]}),e[34]=_,e[35]=N,e[36]=v,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 dO(t){return g.jsx($h,{value:t,children:cO(t)},t)}function fO(t){const e=ge.c(24),{preconfigs:n,selectedPreconfigId:i,onChangePreconfig:o,disabled:l,compact:u,iconOnly:a}=t,d=u===void 0?!1:u,f=a===void 0?!1:a,p=d&&!f;let h;e[0]!==f||e[1]!==p?(h=!f&&g.jsx(ii,{className:"text-xs text-muted-foreground",children:p?g.jsx(g4,{className:"size-3.5"}):"Config:"}),e[0]=f,e[1]=p,e[2]=h):h=e[2];const _=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(fc,{className:"sr-only"})]}),e[3]=f,e[4]=C):C=e[4];let w;e[5]!==f?(w=!f&&g.jsx(fc,{placeholder:"Select config"}),e[5]=f,e[6]=w):w=e[6];let v;e[7]!==S||e[8]!==C||e[9]!==w?(v=g.jsxs(tv,{className:S,children:[C,w]}),e[7]=S,e[8]=C,e[9]=w,e[10]=v):v=e[10];let b;e[11]!==n?(b=n.map(hO),e[11]=n,e[12]=b):b=e[12];let y;e[13]!==b?(y=g.jsx(nv,{children:b}),e[13]=b,e[14]=y):y=e[14];let x;e[15]!==l||e[16]!==o||e[17]!==y||e[18]!==_||e[19]!==v?(x=g.jsxs(ev,{value:_,onValueChange:o,disabled:l,children:[v,y]}),e[15]=l,e[16]=o,e[17]=y,e[18]=_,e[19]=v,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 hO(t){return g.jsxs($h,{value:t.id,children:[t.name,t.isDefault&&g.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},t.id)}function pO(t){var Fe;const e=ge.c(104),{session:n,preconfigs:i,models:o,usage:l,modelName:u,onChangePreconfig:a,onChangeModel:d,onChangeVariant:f,onRename:p,onNavigateBack:h,isStreaming:_,onInterrupt:S,onCompact:C,isCompacting:w,canCompact:v,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=ud(),I=Zj();let V,U;e[0]!==N?(V=()=>{N&&j.current&&(j.current.focus(),j.current.select())},U=[N],e[0]=N,e[1]=V,e[2]=U):(V=e[1],U=e[2]),D.useEffect(V,U);let W;e[3]!==n.title?(W=()=>{T(n.title||""),A(!0)},e[3]=n.title,e[4]=W):W=e[4];const K=W;let G;e[5]!==M||e[6]!==p||e[7]!==n.id||e[8]!==n.title?(G=()=>{const He=M.trim();He&&He!==n.title&&p(n.id,He),A(!1)},e[5]=M,e[6]=p,e[7]=n.id,e[8]=n.title,e[9]=G):G=e[9];const Z=G;let ee;e[10]!==Z||e[11]!==n.title?(ee=He=>{He.key==="Enter"?Z():He.key==="Escape"&&(T(n.title||""),A(!1))},e[10]=Z,e[11]=n.title,e[12]=ee):ee=e[12];const B=ee;let L;e[13]!==u||e[14]!==i||e[15]!==n.preconfigId||e[16]!==n.selectedModel?(L=n.selectedModel||((Fe=i.find(He=>He.id===n.preconfigId))==null?void 0:Fe.model)||u,e[13]=u,e[14]=i,e[15]=n.preconfigId,e[16]=n.selectedModel,e[17]=L):L=e[17];const z=L;let H;if(e[18]!==o||e[19]!==z){let He;e[21]!==z?(He=dt=>dt.id===z,e[21]=z,e[22]=He):He=e[22],H=o.find(He),e[18]=o,e[19]=z,e[20]=H}else H=e[20];const F=H,Q=F==null?void 0:F.contextWindow;let te;e[23]!==h||e[24]!==n.parentId?(te=n.parentId&&h&&g.jsxs(Pe,{variant:"ghost",size:"sm",onClick:h,className:"h-7",children:[g.jsx(KE,{className:"size-4","data-icon":"inline-start"}),"Back"]}),e[23]=h,e[24]=n.parentId,e[25]=te):te=e[25];let X;e[26]!==M||e[27]!==B||e[28]!==K||e[29]!==Z||e[30]!==N||e[31]!==n.title?(X=N?g.jsx("input",{ref:j,type:"text",value:M,onChange:He=>T(He.target.value),onBlur:Z,onKeyDown:B,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]=B,e[28]=K,e[29]=Z,e[30]=N,e[31]=n.title,e[32]=X):X=e[32];let q;e[33]!==n.id?(q=n.id.slice(0,8),e[33]=n.id,e[34]=q):q=e[34];let $;e[35]!==q?($=g.jsx(Gn,{variant:"outline",className:"font-mono text-xs",children:q}),e[35]=q,e[36]=$):$=e[36];let ne;e[37]!==n.status?(ne=n.status==="closed"&&g.jsxs(Gn,{variant:"secondary",children:[g.jsx(WE,{className:"size-3","data-icon":"inline-start"}),"Archived"]}),e[37]=n.status,e[38]=ne):ne=e[38];let ie;e[39]!==$||e[40]!==ne||e[41]!==te||e[42]!==X?(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:[te,X,$,ne]})}),e[39]=$,e[40]=ne,e[41]=te,e[42]=X,e[43]=ie):ie=e[43];let ae;e[44]===Symbol.for("react.memo_cache_sentinel")?(ae=g.jsx(Yi,{}),e[44]=ae):ae=e[44];let se;e[45]!==Q||e[46]!==O||e[47]!==u||e[48]!==l.completionTokens||e[49]!==l.promptTokens||e[50]!==l.totalTokens?(se=g.jsx(eO,{promptTokens:l.promptTokens,completionTokens:l.completionTokens,totalTokens:l.totalTokens,contextWindow:Q,modelName:u,compact:O}),e[45]=Q,e[46]=O,e[47]=u,e[48]=l.completionTokens,e[49]=l.promptTokens,e[50]=l.totalTokens,e[51]=se):se=e[51];let ye;e[52]===Symbol.for("react.memo_cache_sentinel")?(ye=g.jsx(Yi,{orientation:"vertical",className:"hidden sm:block"}),e[52]=ye):ye=e[52];const Re=n.status==="closed"||!!n.parentId;let je;e[53]!==y||e[54]!==b||e[55]!==I||e[56]!==O||e[57]!==o||e[58]!==d||e[59]!==z||e[60]!==Re?(je=g.jsx(oO,{models:o,selectedModelId:z,onChangeModel:d,disabled:Re,compact:I,iconOnly:O,connectedProviderIds:b,connectableProviderIds:y}),e[53]=y,e[54]=b,e[55]=I,e[56]=O,e[57]=o,e[58]=d,e[59]=z,e[60]=Re,e[61]=je):je=e[61];const Be=n.status==="closed"||!!n.parentId;let De;e[62]!==I||e[63]!==O||e[64]!==f||e[65]!==x||e[66]!==Be||e[67]!==k?(De=g.jsx(uO,{variants:k,selectedVariant:x,onChangeVariant:f,disabled:Be,compact:I,iconOnly:O}),e[62]=I,e[63]=O,e[64]=f,e[65]=x,e[66]=Be,e[67]=k,e[68]=De):De=e[68];const et=n.status==="closed"||!!n.parentId;let it;e[69]!==I||e[70]!==O||e[71]!==a||e[72]!==i||e[73]!==n.preconfigId||e[74]!==et?(it=g.jsx(fO,{preconfigs:i,selectedPreconfigId:n.preconfigId,onChangePreconfig:a,disabled:et,compact:I,iconOnly:O}),e[69]=I,e[70]=O,e[71]=a,e[72]=i,e[73]=n.preconfigId,e[74]=et,e[75]=it):it=e[75];let ut;e[76]===Symbol.for("react.memo_cache_sentinel")?(ut=g.jsx(Yi,{orientation:"vertical",className:"hidden sm:block"}),e[76]=ut):ut=e[76];let ot;e[77]!==v||e[78]!==I||e[79]!==w||e[80]!==_||e[81]!==C?(ot=C&&g.jsxs(g.Fragment,{children:[g.jsxs(Pe,{variant:"outline",size:I?"icon":"sm",onClick:C,disabled:_||w||!v,title:w?"Compacting...":"Compact older messages",children:[g.jsx(Kx,{className:"size-4"}),!I&&g.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),g.jsx(Yi,{orientation:"vertical",className:"hidden sm:block"})]}),e[77]=v,e[78]=I,e[79]=w,e[80]=_,e[81]=C,e[82]=ot):ot=e[82];const mt=_?"destructive":"outline",Ze=I?"icon":"sm",tt=!S,ue=_?"":"opacity-60 hover:opacity-100",de=_?"Interrupt operation":"Interrupt (no active operation)";let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=g.jsx(Jx,{className:"size-4"}),e[83]=xe):xe=e[83];let _e;e[84]!==I?(_e=!I&&g.jsx("span",{className:"ml-1",children:"Stop"}),e[84]=I,e[85]=_e):_e=e[85];let Te;e[86]!==S||e[87]!==mt||e[88]!==Ze||e[89]!==tt||e[90]!==ue||e[91]!==de||e[92]!==_e?(Te=g.jsxs(Pe,{variant:mt,size:Ze,onClick:S,disabled:tt,className:ue,title:de,children:[xe,_e]}),e[86]=S,e[87]=mt,e[88]=Ze,e[89]=tt,e[90]=ue,e[91]=de,e[92]=_e,e[93]=Te):Te=e[93];let Oe;e[94]!==se||e[95]!==je||e[96]!==De||e[97]!==it||e[98]!==ot||e[99]!==Te?(Oe=g.jsxs("div",{className:"inline-flex align-middle items-center gap-3 sm:gap-4 px-4 py-2 flex-wrap",children:[se,ye,je,De,it,ut,ot,Te]}),e[94]=se,e[95]=je,e[96]=De,e[97]=it,e[98]=ot,e[99]=Te,e[100]=Oe):Oe=e[100];let We;return e[101]!==ie||e[102]!==Oe?(We=g.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[ie,ae,Oe]}),e[101]=ie,e[102]=Oe,e[103]=We):We=e[103],We}function mO(t){const e=ge.c(46),{message:n,textContent:i,children:o,isQueued:l,onRemove:u,onRevert:a,canRevert:d,onFork:f,canFork:p}=t,h=l===void 0?!1:l,_=d===void 0?!1:d,S=p===void 0?!1:p,[C,w]=D.useState(!1),[v,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 I;e[6]!==S||e[7]!==_||e[8]!==C||e[9]!==A||e[10]!==h||e[11]!==k||e[12]!==n.role||e[13]!==f||e[14]!==a?(I=k?g.jsxs(g.Fragment,{children:[!h&&g.jsxs(g.Fragment,{children:[_&&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(N5,{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(M4,{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(js,{className:"size-3"}):g.jsx(Lu,{className:"size-3"})})]}),g.jsx(eS,{className:"size-3"}),n.role]}):g.jsxs(g.Fragment,{children:[g.jsx(XE,{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(js,{className:"size-3"}):g.jsx(Lu,{className:"size-3"})})]}),e[6]=S,e[7]=_,e[8]=C,e[9]=A,e[10]=h,e[11]=k,e[12]=n.role,e[13]=f,e[14]=a,e[15]=I):I=e[15];let V;e[16]!==O||e[17]!==I?(V=g.jsx("div",{className:O,children:I}),e[16]=O,e[17]=I,e[18]=V):V=e[18];const U=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 W;e[19]!==U?(W=Ee("rounded-2xl px-4 py-3 max-w-full relative group min-w-0 overflow-hidden",U),e[19]=U,e[20]=W):W=e[20];let K;e[21]!==h||e[22]!==u?(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(Wx,{className:"size-3 animate-pulse"}),g.jsx("span",{children:"Pending"})]}),u&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:u,className:"size-6 text-muted-foreground hover:text-destructive hover:bg-destructive/10",title:"Remove from queue",children:g.jsx(Ms,{className:"size-3"})})]}),e[21]=h,e[22]=u,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 Z;e[26]!==W||e[27]!==K||e[28]!==G?(Z=g.jsxs("div",{className:W,children:[K,G]}),e[26]=W,e[27]=K,e[28]=G,e[29]=Z):Z=e[29];let ee;e[30]!==a?(ee=()=>{a==null||a()},e[30]=a,e[31]=ee):ee=e[31];let B;e[32]!==v||e[33]!==ee?(B=g.jsx(Wg,{open:v,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:ee,variant:"destructive"}),e[32]=v,e[33]=ee,e[34]=B):B=e[34];let L;e[35]!==f?(L=()=>{f==null||f()},e[35]=f,e[36]=L):L=e[36];let z;e[37]!==y||e[38]!==L?(z=g.jsx(Wg,{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]=z):z=e[39];let H;return e[40]!==V||e[41]!==Z||e[42]!==B||e[43]!==z||e[44]!==T?(H=g.jsxs("div",{className:T,children:[V,Z,B,z]}),e[40]=V,e[41]=Z,e[42]=B,e[43]=z,e[44]=T,e[45]=H):H=e[45],H}var gO=Object.create,Vh=Object.defineProperty,vO=Object.defineProperties,_O=Object.getOwnPropertyDescriptor,yO=Object.getOwnPropertyDescriptors,GC=Object.getOwnPropertyNames,Jf=Object.getOwnPropertySymbols,bO=Object.getPrototypeOf,rv=Object.prototype.hasOwnProperty,KC=Object.prototype.propertyIsEnumerable,Lb=(t,e,n)=>e in t?Vh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qi=(t,e)=>{for(var n in e||(e={}))rv.call(e,n)&&Lb(t,n,e[n]);if(Jf)for(var n of Jf(e))KC.call(e,n)&&Lb(t,n,e[n]);return t},qh=(t,e)=>vO(t,yO(e)),YC=(t,e)=>{var n={};for(var i in t)rv.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Jf)for(var i of Jf(t))e.indexOf(i)<0&&KC.call(t,i)&&(n[i]=t[i]);return n},xO=(t,e)=>function(){return e||(0,t[GC(t)[0]])((e={exports:{}}).exports,e),e.exports},SO=(t,e)=>{for(var n in e)Vh(t,n,{get:e[n],enumerable:!0})},wO=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of GC(e))!rv.call(t,o)&&o!==n&&Vh(t,o,{get:()=>e[o],enumerable:!(i=_O(e,o))||i.enumerable});return t},CO=(t,e,n)=>(n=t!=null?gO(bO(t)):{},wO(!t||!t.__esModule?Vh(n,"default",{value:t,enumerable:!0}):n,t)),kO=xO({"../../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={},u={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,v){v=v||{};var b,y;switch(u.util.type(w)){case"Object":if(y=u.util.objId(w),v[y])return v[y];b={},v[y]=b;for(var x in w)w.hasOwnProperty(x)&&(b[x]=C(w[x],v));return b;case"Array":return y=u.util.objId(w),v[y]?v[y]:(b=[],v[y]=b,w.forEach(function(k,N){b[N]=C(k,v)}),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,v){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!!v}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(C,w){var v=u.util.clone(u.languages[C]);for(var b in w)v[b]=w[b];return v},insertBefore:function(C,w,v,b){b=b||u.languages;var y=b[C],x={};for(var k in y)if(y.hasOwnProperty(k)){if(k==w)for(var N in v)v.hasOwnProperty(N)&&(x[N]=v[N]);v.hasOwnProperty(k)||(x[k]=y[k])}var A=b[C];return b[C]=x,u.languages.DFS(u.languages,function(M,T){T===A&&M!=C&&(this[M]=x)}),x},DFS:function C(w,v,b,y){y=y||{};var x=u.util.objId;for(var k in w)if(w.hasOwnProperty(k)){v.call(w,k,w[k],b||k);var N=w[k],A=u.util.type(N);A==="Object"&&!y[x(N)]?(y[x(N)]=!0,C(N,v,null,y)):A==="Array"&&!y[x(N)]&&(y[x(N)]=!0,C(N,v,k,y))}}},plugins:{},highlight:function(C,w,v){var b={code:C,grammar:w,language:v};if(u.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=u.tokenize(b.code,b.grammar),u.hooks.run("after-tokenize",b),a.stringify(u.util.encode(b.tokens),b.language)},tokenize:function(C,w){var v=w.rest;if(v){for(var b in v)w[b]=v[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 v=u.hooks.all;v[C]=v[C]||[],v[C].push(w)},run:function(C,w){var v=u.hooks.all[C];if(!(!v||!v.length))for(var b=0,y;y=v[b++];)y(w)}},Token:a};function a(C,w,v,b){this.type=C,this.content=w,this.alias=v,this.length=(b||"").length|0}a.stringify=function C(w,v){if(typeof w=="string")return w;if(Array.isArray(w)){var b="";return w.forEach(function(A){b+=C(A,v)}),b}var y={type:w.type,content:C(w.content,v),tag:"span",classes:["token",w.type],attributes:{},language:v},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(y.classes,x):y.classes.push(x)),u.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 d(C,w,v,b){C.lastIndex=w;var y=C.exec(v);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,v,b,y,x){for(var k in v)if(!(!v.hasOwnProperty(k)||!v[k])){var N=v[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,I=M.alias;if(O&&!M.pattern.global){var V=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,V+"g")}for(var U=M.pattern||M,W=b.next,K=y;W!==w.tail&&!(x&&K>=x.reach);K+=W.value.length,W=W.next){var G=W.value;if(w.length>C.length)return;if(!(G instanceof a)){var Z=1,ee;if(O){if(ee=d(U,K,C,j),!ee||ee.index>=C.length)break;var H=ee.index,B=ee.index+ee[0].length,L=K;for(L+=W.value.length;H>=L;)W=W.next,L+=W.value.length;if(L-=W.value.length,K=L,W.value instanceof a)continue;for(var z=W;z!==w.tail&&(L<B||typeof z.value=="string");z=z.next)Z++,L+=z.value.length;Z--,G=C.slice(K,L),ee.index-=K}else if(ee=d(U,0,G,j),!ee)continue;var H=ee.index,F=ee[0],Q=G.slice(0,H),te=G.slice(H+F.length),X=K+G.length;x&&X>x.reach&&(x.reach=X);var q=W.prev;Q&&(q=h(w,q,Q),K+=Q.length),_(w,q,Z);var $=new a(k,T?u.tokenize(F,T):F,I,F);if(W=h(w,q,$),te&&h(w,W,te),Z>1){var ne={cause:k+","+A,reach:X};f(C,w,v,W.prev,K,ne),x&&ne.reach>x.reach&&(x.reach=ne.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,v){var b=w.next,y={value:v,prev:w,next:b};return w.next=y,b.prev=y,C.length++,y}function _(C,w,v){for(var b=w.next,y=0;y<v&&b!==C.tail;y++)b=b.next;w.next=b,b.prev=w,C.length-=y}function S(C){for(var w=[],v=C.head.next;v!==C.tail;)w.push(v.value),v=v.next;return w}return u})();e.exports=n,n.default=n}}),Ce=CO(kO());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},u="doc-comment";if(a=t.languages[o]){var a,d=a[u];if((d=d||(a=t.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[u])instanceof RegExp&&(d=a[u]={pattern:d}),Array.isArray(d))for(var f=0,p=d.length;f<p;f++)d[f]instanceof RegExp&&(d[f]={pattern:d[f]}),l(d[f]);else l(d)}})}}),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 u(a,d){d=(d||"").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,d)}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:u(/\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:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(l),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?: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,u=(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 _=0,S=h.length;_<S;_++){var C,w=h[_];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,_=f.classes.length;h<_;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(v){return v=v.replace(u,""),v=v.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)),d(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 v=document.getElementById(C);v&&(v.innerHTML=t.highlight(v.textContent,t.languages[p],p))}))}}),RegExp(t.languages.markup.tag.pattern.source,"gi")),a={amp:"&",lt:"<",gt:">",quot:'"'},d=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=_(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var u=p(0);u.type==="variable"&&(S(u,"variable-input"),o.push(u.content))}n=l+1}if(h(["punctuation","property-query"])&&p(0).content==="{"&&(n++,S(p(0),"property-mutation"),0<o.length)){var a=_(/^\{$/,/^\}$/);if(a!==-1)for(var d=n;d<a;d++){var f=e[d];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 v=0;v<C.length;v++){var b=p(v+w);if(!b||b.type!==C[v])return}return 1}function _(C,w){for(var v=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))v++;else if(w.test(x)&&--v===0)return b}}return-1}function S(C,w){var v=C.alias;v?Array.isArray(v)||(C.alias=v=[v]):C.alias=v=[],v.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 u(h,_){if(t.languages[h])return{pattern:RegExp("((?:"+_+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,_,S){return h={code:h,grammar:_,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 d(h,_,S){var v=t.tokenize(h,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),C=0,w={},v=a(v.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(""),_,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,I,V=x[k];typeof V=="string"||typeof V.content=="string"?(N=b[C],(I=(O=typeof V=="string"?V:V.content).indexOf(N))!==-1&&(++C,A=O.substring(0,I),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(I+N.length),j=[],A&&j.push(A),j.push(M),T&&(y(O=[T]),j.push.apply(j,O)),typeof V=="string"?(x.splice.apply(x,[k,1].concat(j)),k+=j.length-1):V.content=j)):(I=V.content,Array.isArray(I)?y(I):y([I]))}})(v),new t.Token(S,v,"language-"+S,h)}t.languages.javascript["template-string"]=[u("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),u("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),u("svg",/\bsvg/.source),u("markdown",/\b(?:markdown|md)/.source),u("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),u("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 _(S){for(var C=0,w=S.length;C<w;C++){var v,b,y,x=S[C];typeof x!="string"&&(v=x.content,Array.isArray(v)?x.type==="template-string"?(x=v[1],v.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])&&(v[1]=d(b,y,x))):_(v):typeof v!="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(u,a){return RegExp(u.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(d,f){return d=d.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(d,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 u(d){for(var f=[],p=0;p<d.length;p++){var h=d[p],_=!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--:_=!0),(_||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(_=a(h),p<d.length-1&&(typeof d[p+1]=="string"||d[p+1].type==="plain-text")&&(_+=a(d[p+1]),d.splice(p+1,1)),0<p&&(typeof d[p-1]=="string"||d[p-1].type==="plain-text")&&(_=a(d[p-1])+_,d.splice(p-1,1),p--),d[p]=new t.Token("plain-text",_,null,_)),h.content&&typeof h.content!="string"&&u(h.content)}}var a=function(d){return d?typeof d=="string"?d:typeof d.content=="string"?d.content:d.content.map(a).join(""):""};t.hooks.add("after-tokenize",function(d){d.language!=="jsx"&&d.language!=="tsx"||u(d.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 qu={};SO(qu,{dracula:()=>AO,duotoneDark:()=>TO,duotoneLight:()=>DO,github:()=>jO,gruvboxMaterialDark:()=>l7,gruvboxMaterialLight:()=>u7,jettwaveDark:()=>e7,jettwaveLight:()=>n7,nightOwl:()=>LO,nightOwlLight:()=>zO,oceanicNext:()=>PO,okaidia:()=>HO,oneDark:()=>i7,oneLight:()=>o7,palenight:()=>$O,shadesOfPurple:()=>qO,synthwave84:()=>GO,ultramin:()=>YO,vsDark:()=>XC,vsLight:()=>ZO});var EO={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)"}}]},AO=EO,RO={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"}}]},TO=RO,NO={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"}}]},DO=NO,MO={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"}}]},jO=MO,OO={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)"}}]},LO=OO,IO={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)"}}]},zO=IO,Lr={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},BO={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}}]},PO=BO,FO={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"}}]},HO=FO,UO={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)"}}]},$O=UO,VO={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)"}}]},qO=VO,WO={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"}}]},GO=WO,KO={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)"}}]},YO=KO,XO={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)"}}]},XC=XO,QO={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)"}}]},ZO=QO,JO={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"}}]},e7=JO,t7={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"}}]},n7=t7,r7={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%)"}}]},i7=r7,s7={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%)"}}]},o7=s7,a7={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"}}]},l7=a7,c7={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"}}]},u7=c7,d7=t=>D.useCallback(e=>{var n=e,{className:i,style:o,line:l}=n,u=YC(n,["className","style","line"]);const a=qh(Qi({},u),{className:lh("token-line",i)});return typeof t=="object"&&"plain"in t&&(a.style=t.plain),typeof o=="object"&&(a.style=Qi(Qi({},a.style||{}),o)),a},[t]),f7=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:u}=i,a=YC(i,["token","className","style"]);const d=qh(Qi({},a),{className:lh("token",...o.types,l),children:o.content,style:e(o)});return u!=null&&(d.style=Qi(Qi({},d.style||{}),u)),d},[e])},h7=/\r\n|\r|\n/,Ib=t=>{t.length===0?t.push({types:["plain"],content:`
524
+ `,empty:!0}):t.length===1&&t[0].content===""&&(t[0].content=`
525
+ `,t[0].empty=!0)},zb=(t,e)=>{const n=t.length;return n>0&&t[n-1]===e?t:t.concat(e)},p7=t=>{const e=[[]],n=[t],i=[0],o=[t.length];let l=0,u=0,a=[];const d=[a];for(;u>-1;){for(;(l=i[u]++)<o[u];){let f,p=e[u];const _=n[u][l];if(typeof _=="string"?(p=u>0?p:["plain"],f=_):(p=zb(p,_.type),_.alias&&(p=zb(p,_.alias)),f=_.content),typeof f!="string"){u++,e.push(p),n.push(f),i.push(0),o.push(f.length);continue}const S=f.split(h7),C=S.length;a.push({types:p,content:S[0]});for(let w=1;w<C;w++)Ib(a),d.push(a=[]),a.push({types:p,content:S[w]})}u--,e.pop(),n.pop(),i.pop(),o.pop()}return Ib(a),d},Bb=p7,m7=({prism:t,code:e,grammar:n,language:i})=>D.useMemo(()=>{if(n==null)return Bb([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),Bb(o.tokens)},[e,n,i,t]),g7=(t,e)=>{const{plain:n}=t,i=t.styles.reduce((o,l)=>{const{languages:u,style:a}=l;return u&&!u.includes(e)||l.types.forEach(d=>{const f=Qi(Qi({},o[d]),a);o[d]=f}),o},{});return i.root=n,i.plain=qh(Qi({},n),{backgroundColor:void 0}),i},v7=g7,_7=({children:t,language:e,code:n,theme:i,prism:o})=>{const l=e.toLowerCase(),u=v7(i,l),a=d7(u),d=f7(u),f=o.languages[l],p=m7({prism:o,language:l,code:n,grammar:f});return t({tokens:p,className:`prism-code language-${l}`,style:u!=null?u.root:{},getLineProps:a,getTokenProps:d})},iv=t=>D.createElement(_7,qh(Qi({},t),{prism:t.prism||Ce,theme:t.theme||XC,code:t.code,language:t.language}));/*! Bundled license information:
526
+
527
+ prismjs/prism.js:
528
+ (**
529
+ * Prism: Lightweight, robust, elegant syntax highlighting
530
+ *
531
+ * @license MIT <https://opensource.org/licenses/MIT>
532
+ * @author Lea Verou <https://lea.verou.me>
533
+ * @namespace
534
+ * @public
535
+ *)
536
+ */function y7(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 b7=D.memo(function(e){const n=ge.c(28),{type:i,content:o,lineNumber:l,newLineNumber:u,language:a}=e,d=i==="added"&&"bg-green-500/20",f=i==="removed"&&"bg-red-500/20",p=i==="context"&&"bg-muted/30";let h;n[0]!==d||n[1]!==f||n[2]!==p?(h=Ee("flex font-mono text-xs",d,f,p),n[0]=d,n[1]=f,n[2]=p,n[3]=h):h=n[3];const _=h,S=i==="added"&&"text-green-400",C=i==="removed"&&"text-red-400",w=i==="context"&&"text-muted-foreground/50";let v;n[4]!==S||n[5]!==C||n[6]!==w?(v=Ee("font-bold w-4 select-none",S,C,w),n[4]=S,n[5]=C,n[6]=w,n[7]=v):v=n[7];const b=v,y=l!=null?l:"";let x;n[8]!==y?(x=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:y}),n[8]=y,n[9]=x):x=n[9];const k=u!=null?u:"";let N;n[10]!==k?(N=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:k}),n[10]=k,n[11]=N):N=n[11];const A=i==="added"&&"+",M=i==="removed"&&"-",T=i==="context"&&" ";let j;n[12]!==b||n[13]!==A||n[14]!==M||n[15]!==T?(j=g.jsxs("span",{className:b,children:[A,M,T]}),n[12]=b,n[13]=A,n[14]=M,n[15]=T,n[16]=j):j=n[16];let O;n[17]!==o||n[18]!==a?(O=g.jsx(iv,{theme:qu.oneDark,code:o,language:a,children:x7}),n[17]=o,n[18]=a,n[19]=O):O=n[19];let I;n[20]!==j||n[21]!==O?(I=g.jsxs("span",{className:"pl-2 flex-1 whitespace-pre flex",children:[j,O]}),n[20]=j,n[21]=O,n[22]=I):I=n[22];let V;return n[23]!==x||n[24]!==N||n[25]!==I||n[26]!==_?(V=g.jsxs("div",{className:_,children:[x,N,I]}),n[23]=x,n[24]=N,n[25]=I,n[26]=_,n[27]=V):V=n[27],V}),QC=D.memo(function(e){const n=ge.c(27),{hunks:i,path:o,language:l,additions:u,deletions:a}=e,[d,f]=D.useState(!0);let p;n[0]!==o||n[1]!==l?(p=l||y7(o),n[0]=o,n[1]=l,n[2]=p):p=n[2];const h=p;let _;n[3]!==d?(_=()=>f(!d),n[3]=d,n[4]=_):_=n[4];let S;n[5]!==d?(S=d?g.jsx(pc,{className:"size-3"}):g.jsx(Ci,{className:"size-3"}),n[5]=d,n[6]=S):S=n[6];let C;n[7]!==_||n[8]!==S?(C=g.jsx("button",{onClick:_,className:"px-1 py-1 hover:bg-muted rounded",children:S}),n[7]=_,n[8]=S,n[9]=C):C=n[9];let w;n[10]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(l1,{className:"size-3"}),n[10]=w):w=n[10];let v;n[11]!==o?(v=g.jsx("span",{className:"font-mono pr-2",children:o}),n[11]=o,n[12]=v):v=n[12];let b;n[13]!==u||n[14]!==a?(b=u!==void 0&&a!==void 0&&g.jsxs("span",{className:"ml-auto mr-2 text-muted-foreground",children:["+",u," -",a]}),n[13]=u,n[14]=a,n[15]=b):b=n[15];let y;n[16]!==C||n[17]!==v||n[18]!==b?(y=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[C,w,v,b]}),n[16]=C,n[17]=v,n[18]=b,n[19]=y):y=n[19];let x;n[20]!==d||n[21]!==i||n[22]!==h?(x=d&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:i.map((N,A)=>g.jsx("div",{className:"divide-y divide-white/5",children:N.changes.map((M,T)=>g.jsx(b7,{...M,language:h},T))},A))}),n[20]=d,n[21]=i,n[22]=h,n[23]=x):x=n[23];let k;return n[24]!==y||n[25]!==x?(k=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[y,x]})}),n[24]=y,n[25]=x,n[26]=k):k=n[26],k});function x7(t){const{tokens:e,getTokenProps:n}=t;return g.jsx(g.Fragment,{children:e.map((i,o)=>g.jsx("span",{children:i.map((l,u)=>g.jsx("span",{...n({token:l})},u))},o))})}const S7=20;function w7(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 C7=D.memo(t=>{const e=ge.c(40),{content:n,path:i,language:o,created:l,highlightLines:u}=t;let a;e[0]!==u?(a=u===void 0?[]:u,e[0]=u,e[1]=a):a=e[1];const d=a,[f,p]=D.useState(!1);let h;e[2]!==o||e[3]!==i?(h=o||w7(i),e[2]=o,e[3]=i,e[4]=h):h=e[4];const _=h;let S;e[5]!==d?(S=new Set(d),e[5]=d,e[6]=S):S=e[6];const C=S;let w;e[7]!==n?(w=n.split(`
537
+ `),e[7]=n,e[8]=w):w=e[8];const v=w.length;let b;e[9]!==f?(b=()=>p(!f),e[9]=f,e[10]=b):b=e[10];let y;e[11]!==f?(y=f?g.jsx(pc,{className:"size-3"}):g.jsx(Ci,{className:"size-3"}),e[11]=f,e[12]=y):y=e[12];let x;e[13]!==b||e[14]!==y?(x=g.jsx("button",{onClick:b,className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:y}),e[13]=b,e[14]=y,e[15]=x):x=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(l1,{className:"size-3"}),e[16]=k):k=e[16];let N;e[17]!==i?(N=g.jsx("span",{className:"font-mono pr-2",children:i}),e[17]=i,e[18]=N):N=e[18];let A;e[19]!==f||e[20]!==v?(A=!f&&g.jsxs("span",{className:"text-xs text-muted-foreground/70",children:[v," lines"]}),e[19]=f,e[20]=v,e[21]=A):A=e[21];let M;e[22]!==l?(M=l===!1?g.jsxs("span",{className:"flex items-center gap-1 text-warning ml-auto mr-2",children:[g.jsx(Du,{className:"size-3"}),"Overwrote"]}):g.jsxs("span",{className:"flex items-center gap-1 text-success ml-auto mr-2",children:[g.jsx(js,{className:"size-3"}),"Created"]}),e[22]=l,e[23]=M):M=e[23];let T;e[24]!==N||e[25]!==A||e[26]!==M||e[27]!==x?(T=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[x,k,N,A,M]}),e[24]=N,e[25]=A,e[26]=M,e[27]=x,e[28]=T):T=e[28];let j;e[29]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"#282c34"},e[29]=j):j=e[29];let O;e[30]!==f||e[31]!==C?(O=U=>{const{tokens:W,getTokenProps:K}=U,G=f?W:W.slice(0,S7);return g.jsx(g.Fragment,{children:G.map((Z,ee)=>g.jsxs("div",{className:`flex font-mono text-xs ${C.has(ee+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:ee+1}),g.jsx("span",{className:"pl-2 flex-1 whitespace-pre",children:Z.map((B,L)=>g.jsx("span",{...K({token:B})},L))})]},ee))})},e[30]=f,e[31]=C,e[32]=O):O=e[32];let I;e[33]!==n||e[34]!==_||e[35]!==O?(I=g.jsx("div",{style:j,children:g.jsx(iv,{theme:qu.oneDark,code:n,language:_,children:O})}),e[33]=n,e[34]=_,e[35]=O,e[36]=I):I=e[36];let V;return e[37]!==T||e[38]!==I?(V=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[T,I]})}),e[37]=T,e[38]=I,e[39]=V):V=e[39],V});function k7(t){const e=ge.c(3),{message:n}=t,i=n===void 0?"Success":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Ku,{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 E7={edit:E4,plus:mc,trash:gc,search:c1};function A7(t){const e=ge.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 u=l;let a;e[2]!==i?(a=i?g.jsx("span",{className:"text-success text-xs",children:"Copied!"}):g.jsx(Lu,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];let d;return e[4]!==u||e[5]!==a?(d=g.jsx("button",{onClick:u,className:"text-muted-foreground hover:text-foreground transition-colors",title:"Copy path",children:a}),e[4]=u,e[5]=a,e[6]=d):d=e[6],d}function R7(t){const e=ge.c(16),{title:n,groups:i,files:o,total:l}=t;let u;e[0]!==o?(u=o||[],e[0]=o,e[1]=u):u=e[1];let a;e[2]!==u?(a={label:"Files",files:u,icon:void 0},e[2]=u,e[3]=a):a=e[3];const d=a;let f;e[4]!==d||e[5]!==o||e[6]!==i?(f=i||(o?[d]:[]),e[4]=d,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 _;e[11]!==p?(_=p.map(T7),e[11]=p,e[12]=_):_=e[12];let S;return e[13]!==h||e[14]!==_?(S=g.jsxs("div",{className:"flex flex-col gap-3",children:[h,_]}),e[13]=h,e[14]=_,e[15]=S):S=e[15],S}function T7(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=E7[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(N7)})]},e)}function N7(t,e){return g.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[g.jsx(l1,{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(A7,{text:t.path})]},e)}function D7(t){const e=ge.c(15),{command:n,stdout:i,stderr:o,exitCode:l}=t,u=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 d;e[1]!==n?(d=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]=d):d=e[2];const f=`text-xs font-mono px-2 py-0.5 rounded ${u?"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]!==d||e[7]!==p?(h=g.jsxs("div",{className:"bg-muted px-3 py-2 flex items-center justify-between",children:[d,p]}),e[6]=d,e[7]=p,e[8]=h):h=e[8];let _;e[9]!==o||e[10]!==i?(_=(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]=_):_=e[11];let S;return e[12]!==h||e[13]!==_?(S=g.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[h,_]}),e[12]=h,e[13]=_,e[14]=S):S=e[14],S}const M7={pending:{icon:h4,color:"text-muted-foreground"},in_progress:{icon:Br,color:"text-warning",animate:!0},completed:{icon:Ku,color:"text-success"},cancelled:{icon:ah,color:"text-destructive"}},j7={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function O7(t){const e=ge.c(13),{title:n,items:i}=t;if(i.length===0)return null;let o;e[0]!==i?(o=i.filter(B7),e[0]=i,e[1]=o):o=e[1];const l=o.length;i.filter(z7),i.filter(I7);let u;e[2]!==l||e[3]!==i.length||e[4]!==n?(u=(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]=u):u=e[5];let a;e[6]!==i?(a=i.map(L7),e[6]=i,e[7]=a):a=e[7];let d;e[8]!==a?(d=g.jsx("div",{className:"flex flex-col gap-1 w-full",children:a}),e[8]=a,e[9]=d):d=e[9];let f;return e[10]!==u||e[11]!==d?(f=g.jsxs("div",{className:"flex flex-col gap-3 w-full overflow-hidden",children:[u,d]}),e[10]=u,e[11]=d,e[12]=f):f=e[12],f}function L7(t,e){const n=M7[t.status],i=n.icon,o=j7[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 I7(t){return t.status==="pending"}function z7(t){return t.status==="in_progress"}function B7(t){return t.status==="completed"}const P7=D.memo(function(e){const n=ge.c(38),{visualization:i}=e;if(!i)return null;switch(i.type){case"diff":{let o;return n[0]!==i.additions||n[1]!==i.deletions||n[2]!==i.hunks||n[3]!==i.language||n[4]!==i.matchInfo||n[5]!==i.path?(o=g.jsx(QC,{path:i.path,hunks:i.hunks,language:i.language,additions:i.additions,deletions:i.deletions,matchInfo:i.matchInfo}),n[0]=i.additions,n[1]=i.deletions,n[2]=i.hunks,n[3]=i.language,n[4]=i.matchInfo,n[5]=i.path,n[6]=o):o=n[6],o}case"diffs":{let o;n[7]!==i.items?(o=i.items.map(F7),n[7]=i.items,n[8]=o):o=n[8];let l;return n[9]!==o?(l=g.jsx("div",{className:"space-y-3",children:o}),n[9]=o,n[10]=l):l=n[10],l}case"code":{let o;return n[11]!==i.content||n[12]!==i.created||n[13]!==i.highlightLines||n[14]!==i.language||n[15]!==i.path?(o=g.jsx(C7,{path:i.path,content:i.content,language:i.language,created:i.created,highlightLines:i.highlightLines}),n[11]=i.content,n[12]=i.created,n[13]=i.highlightLines,n[14]=i.language,n[15]=i.path,n[16]=o):o=n[16],o}case"file-list":{let o;return n[17]!==i.files||n[18]!==i.groups||n[19]!==i.title||n[20]!==i.total?(o=g.jsx(R7,{title:i.title,groups:i.groups,files:i.files,total:i.total}),n[17]=i.files,n[18]=i.groups,n[19]=i.title,n[20]=i.total,n[21]=o):o=n[21],o}case"table":{let o;n[22]!==i.rows?(o=JSON.stringify(i.rows,null,2),n[22]=i.rows,n[23]=o):o=n[23];let l;return n[24]!==o?(l=g.jsx("pre",{className:"text-xs bg-muted/50 border rounded-md p-2 overflow-x-auto",children:o}),n[24]=o,n[25]=l):l=n[25],l}case"markdown":{let o;return n[26]!==i.content?(o=g.jsx("div",{className:"prose prose-sm dark:prose-invert",children:i.content}),n[26]=i.content,n[27]=o):o=n[27],o}case"none":{let o;return n[28]!==i.message?(o=g.jsx(k7,{message:i.message}),n[28]=i.message,n[29]=o):o=n[29],o}case"shell-output":{let o;return n[30]!==i.command||n[31]!==i.exitCode||n[32]!==i.stderr||n[33]!==i.stdout?(o=g.jsx(D7,{command:i.command,stdout:i.stdout,stderr:i.stderr,exitCode:i.exitCode}),n[30]=i.command,n[31]=i.exitCode,n[32]=i.stderr,n[33]=i.stdout,n[34]=o):o=n[34],o}case"todo-list":{let o;return n[35]!==i.items||n[36]!==i.title?(o=g.jsx(O7,{title:i.title,items:i.items}),n[35]=i.items,n[36]=i.title,n[37]=o):o=n[37],o}default:return null}});function F7(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 H7(t){switch(t){case"pending":return g.jsx(Wx,{className:"size-3 text-warning"});case"running":return g.jsx(Br,{className:"size-3 text-warning animate-spin"});case"completed":return g.jsx(Ku,{className:"size-3 text-success"});case"error":return g.jsx(ah,{className:"size-3 text-destructive"});case"interrupted":return g.jsx(Yx,{className:"size-3 text-warning"});default:return null}}function U7(t){if(t&&typeof t=="object"&&"_visualization"in t)return t._visualization}const $7=(t,e)=>{if(t.part!==e.part||t.onNavigateToSubagent!==e.onNavigateToSubagent)return!1;if(t.part.state.status!=="pending")return!0;const i=t.pendingPermissions.find(l=>l.toolCallId===t.part.callId),o=e.pendingPermissions.find(l=>l.toolCallId===e.part.callId);return i===o},V7=D.memo(function({part:e,pendingPermissions:n,onPermissionResponse:i,onNavigateToSubagent:o}){var b;const[l,u]=D.useState(!1),[a,d]=D.useState(!1),f=e.state,p=f.status,h=p==="completed"&&"output"in f?U7(f.output):void 0,_=p==="pending"?n.find(y=>y.toolCallId===e.callId):void 0,S=_?typeof((b=_.args)==null?void 0:b.command)=="string"?_.args.command:JSON.stringify(_.args,null,2):null;let C=null;if(e.name==="task"){if("childSessionId"in f&&f.childSessionId)C=f.childSessionId;else if(p==="completed"&&"output"in f){const x=(typeof f.output=="string"?f.output:"").match(/task_id:\s*([a-f0-9-]{36})/i);x&&(C=x[1])}}const w=async()=>{if("output"in f){const y=typeof f.output=="string"?f.output:JSON.stringify(f.output,null,2);await navigator.clipboard.writeText(y),d(!0),setTimeout(()=>d(!1),2e3)}},v=(()=>{try{const y=JSON.stringify(f.input);return y.length>50?y.slice(0,47)+"...":y}catch{return String(f.input)}})();return g.jsxs("div",{className:"my-1",children:[g.jsxs(Bo,{open:l,onOpenChange:u,children:[g.jsx(Po,{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:[l?g.jsx(pc,{className:"size-4 text-muted-foreground"}):g.jsx(Ci,{className:"size-4 text-muted-foreground"}),g.jsx(U5,{className:"size-3"}),g.jsx("span",{className:"text-xs truncate max-w-[120px] sm:max-w-none",children:e.name}),!l&&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:v}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[H7(p),C&&o&&g.jsxs(Pe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:y=>{y.stopPropagation(),o(C)},title:"View session",children:[g.jsx(Rg,{className:"size-3"}),g.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),g.jsx(Fo,{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(f.input,null,2)})]}),(p==="running"||p==="completed")&&C&&o&&g.jsxs(Pe,{variant:"outline",className:"w-full",size:"sm",onClick:()=>o(C),children:[g.jsx(Rg,{className:"size-4","data-icon":"inline-start"}),p==="running"?"Watch Subagent":"View Session"]}),p==="completed"&&"output"in f&&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:w,className:"size-6",children:a?g.jsx(js,{className:"size-3 text-success"}):g.jsx(Lu,{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 f.output=="string"?f.output:JSON.stringify(f.output,null,2)})]}),p==="error"&&"error"in f&&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:f.error})]})]})})]}),p==="pending"&&_&&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(Iu,{className:"size-4 text-warning"}),g.jsx(Gn,{variant:"outline",className:"text-warning border-warning",children:_.permissionType}),g.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:_.permissionKey})]}),_.message&&g.jsx("p",{className:"text-sm",children:_.message}),_.dangerous&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive font-medium",children:[g.jsx(Iu,{className:"size-4"}),"This operation is marked as dangerous"]}),S&&g.jsxs(Bo,{children:[g.jsx(Po,{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(Ci,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Fo,{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:S})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>i(e.callId,!1,!1),children:"Deny"}),g.jsx(Pe,{variant:"secondary",size:"sm",onClick:()=>i(e.callId,!0,!1),children:"Approve"}),g.jsx(Pe,{size:"sm",onClick:()=>i(e.callId,!0,!0),children:"Always Allow"})]})]}),p==="completed"&&h&&g.jsx("div",{className:"mt-2",children:g.jsx(P7,{visualization:h})})]})},$7);function q7(t){const e=ge.c(25),{prompts:n,query:i,selectedIndex:o,onSelect:l}=t;let u,a,d,f;if(e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==o){f=Symbol.for("react.early_return_sentinel");e:{let v;if(e[8]!==i?(v=y=>y.name.toLowerCase().includes(i.toLowerCase()),e[8]=i,e[9]=v):v=e[9],u=n.filter(v),u.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(Y4,{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],d=u.map(b)}e[0]=l,e[1]=n,e[2]=i,e[3]=o,e[4]=u,e[5]=a,e[6]=d,e[7]=f}else u=e[4],a=e[5],d=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=u.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 _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[16]=_):_=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]!==u.length||e[19]!==p?(C=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[u.length," prompt",p," •",h," navigate",_," select",S," close"]}),e[18]=u.length,e[19]=p,e[20]=C):C=e[20];let w;return e[21]!==a||e[22]!==d||e[23]!==C?(w=g.jsxs("div",{className:a,children:[d,C]}),e[21]=a,e[22]=d,e[23]=C,e[24]=w):w=e[24],w}function W7(t){const e=ge.c(9),{debounceMs:n}=t,[i,o]=D.useState(""),[l,u]=D.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[d,f]=D.useState(a);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=v=>{const b={type:"file",path:v.path,display:v.name};return f(y=>[...y,b]),u(!1),o(""),b},e[1]=p):p=e[1];const h=p,_=G7;let S;e[2]!==d?(S=v=>{const b=/@([^\s@]+)/g,y=[];let x;for(;(x=b.exec(v))!==null;){const k=x[1];d.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]=d,e[3]=S):S=e[3];const C=S;let w;return e[4]!==C||e[5]!==d||e[6]!==i||e[7]!==l?(w={query:i,setQuery:o,showAutocomplete:l,setShowAutocomplete:u,mentions:d,handleFileSelect:h,insertMention:_,extractMentions:C},e[4]=C,e[5]=d,e[6]=i,e[7]=l,e[8]=w):w=e[8],w}function G7(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 K7(t,e){return e?t.content.includes("ARG")?t.content.replace("ARG",e):`${t.content}
538
+ ${e}`:t.content}function Y7(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 X7=D.forwardRef(function(e,n){const i=ge.c(90),{onSendMessage:o,disabled:l,isStreaming:u,onStopStreaming:a,placeholder:d,workspaceId:f,serverUrl:p,apiToken:h,prompts:_}=e,S=d===void 0?"Type a message...":d;let C;i[0]!==_?(C=_===void 0?[]:_,i[0]=_,i[1]=C):C=i[1];const w=C,[v,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"),[I,V]=D.useState(""),U=D.useRef(null);let W,K;i[3]===Symbol.for("react.memo_cache_sentinel")?(W=()=>({focus:()=>{var ke;return(ke=U.current)==null?void 0:ke.focus()}}),K=[],i[3]=W,i[4]=K):(W=i[3],K=i[4]),D.useImperativeHandle(n,W,K);const G=f||"";let Z;i[5]!==G?(Z={workspaceId:G},i[5]=G,i[6]=Z):Z=i[6];const{query:ee,setQuery:B,showAutocomplete:L,setShowAutocomplete:z,handleFileSelect:H,insertMention:F}=W7(Z);let Q;i[7]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{T(0)},i[7]=Q):Q=i[7];let te;i[8]!==N||i[9]!==I||i[10]!==w?(te=[N,I,w],i[8]=N,i[9]=I,i[10]=w,i[11]=te):te=i[11],D.useEffect(Q,te);let X;i[12]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{const ke=U.current;ke&&(ke.style.height="auto",ke.style.height=`${Math.min(ke.scrollHeight,150)}px`)},i[12]=X):X=i[12];let q;i[13]!==v?(q=[v],i[13]=v,i[14]=q):q=i[14],D.useEffect(X,q);let $;if(i[15]!==I||i[16]!==w){let ke;i[18]!==I?(ke=Ue=>Ue.name.toLowerCase().includes(I.toLowerCase()),i[18]=I,i[19]=ke):ke=i[19],$=w.filter(ke),i[15]=I,i[16]=w,i[17]=$}else $=i[17];const ne=$,ie=j==="prompts"&&w.length>0,ae=j==="files"&&L&&!!f;let se;i[20]!==B||i[21]!==z?(se=ke=>{const Ue=ke.target.value,ct=ke.target.selectionStart||0;b(Ue),x(ct);const bt=Ue.lastIndexOf("/",ct);if(bt!==-1){const Ut=bt>0?Ue[bt-1]:`
539
+ `,on=Ue.slice(bt+1,ct);if((Ut===`
540
+ `||Ut===" "||Ut==="")&&!on.includes(" ")){V(on),O("prompts");return}}const qt=Ue.lastIndexOf("@",ct);if(qt!==-1){const Ut=Ue.slice(qt+1,ct);if(!Ut.includes(" ")){B(Ut),z(!0),O("files");return}}O("none"),z(!1)},i[20]=B,i[21]=z,i[22]=se):se=i[22];const ye=se;let Re;i[23]!==y||i[24]!==H||i[25]!==v||i[26]!==F||i[27]!==z?(Re=ke=>{const Ue=H(ke),ct=F(v,y,Ue);b(ct.text),O("none"),z(!1),A([]),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(ct.cursorPos,ct.cursorPos))},0)},i[23]=y,i[24]=H,i[25]=v,i[26]=F,i[27]=z,i[28]=Re):Re=i[28];const je=Re;let Be;i[29]!==y||i[30]!==v?(Be=ke=>{const Ue=v.lastIndexOf("/",y),ct=v.slice(0,Ue),bt=v.slice(Ue+1),qt=bt.indexOf(" "),Ut=qt!==-1?bt.slice(qt):"",on=`${ct}/${ke.name}${Ut}`,Zt=Ue+1+ke.name.length+0;b(on),O("none"),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(Zt,Zt))},0)},i[29]=y,i[30]=v,i[31]=Be):Be=i[31];const De=Be;let et;i[32]!==l||i[33]!==v||i[34]!==o||i[35]!==w?(et=ke=>{if(ke==null||ke.preventDefault(),!v.trim()||l)return;const Ue=Y7(v);if(Ue){const ct=w.find(bt=>bt.name===Ue.command);if(ct){const bt=K7(ct,Ue.rest);o(bt),b("");return}}o(v.trim()),b("")},i[32]=l,i[33]=v,i[34]=o,i[35]=w,i[36]=et):et=i[36];const it=et;let ut;i[37]!==N||i[38]!==ne||i[39]!==je||i[40]!==De||i[41]!==it||i[42]!==M||i[43]!==z||i[44]!==ae||i[45]!==ie?(ut=ke=>{if(!ke.nativeEvent.isComposing){if(ie&&ne.length>0)switch(ke.key){case"ArrowDown":{ke.preventDefault(),T(Ue=>Math.min(Ue+1,ne.length-1));return}case"ArrowUp":{ke.preventDefault(),T(Q7);return}case"Enter":{if(ke.shiftKey)return;ke.preventDefault(),ne[M]&&De(ne[M]);return}case"Tab":{ke.preventDefault(),ne[M]&&De(ne[M]);return}case"Escape":{ke.preventDefault(),O("none");return}}if(ae&&N.length>0)switch(ke.key){case"ArrowDown":{ke.preventDefault(),T(Ue=>Math.min(Ue+1,N.length-1));return}case"ArrowUp":{ke.preventDefault(),T(Z7);return}case"Enter":{ke.preventDefault(),N[M]&&je(N[M]);return}case"Escape":{ke.preventDefault(),z(!1),O("none");return}case"Tab":{ke.preventDefault(),N[M]&&je(N[M]);return}}ke.key==="Enter"&&!ke.shiftKey&&(ke.preventDefault(),it())}},i[37]=N,i[38]=ne,i[39]=je,i[40]=De,i[41]=it,i[42]=M,i[43]=z,i[44]=ae,i[45]=ie,i[46]=ut):ut=i[46];const ot=ut;let mt;i[47]===Symbol.for("react.memo_cache_sentinel")?(mt=ke=>{A(ke)},i[47]=mt):mt=i[47];const Ze=mt;if(u&&a){let ke;i[48]===Symbol.for("react.memo_cache_sentinel")?(ke=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]=ke):ke=i[48];let Ue;i[49]===Symbol.for("react.memo_cache_sentinel")?(Ue=g.jsx(Jx,{className:"size-4","data-icon":"inline-start"}),i[49]=Ue):Ue=i[49];let ct;return i[50]!==a?(ct=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:[ke,g.jsxs(Pe,{variant:"outline",size:"sm",onClick:a,children:[Ue,"Stop"]})]})}),i[50]=a,i[51]=ct):ct=i[51],ct}const tt=ie||ae;let ue;i[52]!==z?(ue=ke=>{ke||(O("none"),z(!1))},i[52]=z,i[53]=ue):ue=i[53];let de;i[54]===Symbol.for("react.memo_cache_sentinel")?(de=Ee("min-h-[44px] max-h-[150px] resize-none pr-12","focus-visible:ring-1"),i[54]=de):de=i[54];let xe;i[55]!==l||i[56]!==ye||i[57]!==ot||i[58]!==v||i[59]!==S?(xe=g.jsx(Kj,{asChild:!0,children:g.jsx($j,{ref:U,value:v,onChange:ye,onKeyDown:ot,placeholder:S,disabled:l,className:de,rows:1,"data-chat-input":"true"})}),i[55]=l,i[56]=ye,i[57]=ot,i[58]=v,i[59]=S,i[60]=xe):xe=i[60];let _e;i[61]!==h||i[62]!==je||i[63]!==De||i[64]!==I||i[65]!==w||i[66]!==ee||i[67]!==M||i[68]!==p||i[69]!==ae||i[70]!==f?(_e=g.jsx(Bh,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:J7,onCloseAutoFocus:eL,children:ae?g.jsx(N8,{workspaceId:f||"",searchQuery:ee,selectedIndex:M,onSelect:je,onFilesChange:Ze,serverUrl:p,apiToken:h}):g.jsx(q7,{prompts:w,query:I,selectedIndex:M,onSelect:De})}),i[61]=h,i[62]=je,i[63]=De,i[64]=I,i[65]=w,i[66]=ee,i[67]=M,i[68]=p,i[69]=ae,i[70]=f,i[71]=_e):_e=i[71];let Te;i[72]!==tt||i[73]!==ue||i[74]!==xe||i[75]!==_e?(Te=g.jsx("div",{className:"flex-1 relative",children:g.jsxs(zh,{open:tt,onOpenChange:ue,children:[xe,_e]})}),i[72]=tt,i[73]=ue,i[74]=xe,i[75]=_e,i[76]=Te):Te=i[76];let Oe;i[77]!==l||i[78]!==v?(Oe=!v.trim()||l,i[77]=l,i[78]=v,i[79]=Oe):Oe=i[79];let We;i[80]===Symbol.for("react.memo_cache_sentinel")?(We=g.jsx(v5,{className:"size-4"}),i[80]=We):We=i[80];let Fe;i[81]!==Oe?(Fe=g.jsx(Pe,{type:"submit",disabled:Oe,size:"default",className:"h-11",children:We}),i[81]=Oe,i[82]=Fe):Fe=i[82];let He;i[83]!==Te||i[84]!==Fe?(He=g.jsxs("div",{className:"flex gap-3 items-end",children:[Te,Fe]}),i[83]=Te,i[84]=Fe,i[85]=He):He=i[85];let dt;i[86]===Symbol.for("react.memo_cache_sentinel")?(dt=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]=dt):dt=i[86];let ft;return i[87]!==it||i[88]!==He?(ft=g.jsxs("form",{onSubmit:it,className:"p-4 border-t border-border bg-card",children:[He,dt]}),i[87]=it,i[88]=He,i[89]=ft):ft=i[89],ft});function Q7(t){return Math.max(t-1,0)}function Z7(t){return Math.max(t-1,0)}function J7(t){return t.preventDefault()}function eL(t){return t.preventDefault()}function tL(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iL={};function Pb(t,e){return(iL.jsx?rL:nL).test(t)}const sL=/[ \t\n\f\r]/g;function oL(t){return typeof t=="object"?t.type==="text"?Fb(t.value):!1:Fb(t)}function Fb(t){return t.replace(sL,"")===""}class fd{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}}fd.prototype.normal={};fd.prototype.property={};fd.prototype.space=void 0;function ZC(t,e){const n={},i={};for(const o of t)Object.assign(n,o.property),Object.assign(i,o.normal);return new fd(n,i,e)}function Xg(t){return t.toLowerCase()}class wr{constructor(e,n){this.attribute=n,this.property=e}}wr.prototype.attribute="";wr.prototype.booleanish=!1;wr.prototype.boolean=!1;wr.prototype.commaOrSpaceSeparated=!1;wr.prototype.commaSeparated=!1;wr.prototype.defined=!1;wr.prototype.mustUseProperty=!1;wr.prototype.number=!1;wr.prototype.overloadedBoolean=!1;wr.prototype.property="";wr.prototype.spaceSeparated=!1;wr.prototype.space=void 0;let aL=0;const yt=Ga(),gn=Ga(),Qg=Ga(),Ne=Ga(),Gt=Ga(),ac=Ga(),Ir=Ga();function Ga(){return 2**++aL}const Zg=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:gn,commaOrSpaceSeparated:Ir,commaSeparated:ac,number:Ne,overloadedBoolean:Qg,spaceSeparated:Gt},Symbol.toStringTag,{value:"Module"})),cg=Object.keys(Zg);class sv extends wr{constructor(e,n,i,o){let l=-1;if(super(e,n),Hb(this,"space",o),typeof i=="number")for(;++l<cg.length;){const u=cg[l];Hb(this,cg[l],(i&Zg[u])===Zg[u])}}}sv.prototype.defined=!0;function Hb(t,e,n){n&&(t[e]=n)}function Tc(t){const e={},n={};for(const[i,o]of Object.entries(t.properties)){const l=new sv(i,t.transform(t.attributes||{},i),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),e[i]=l,n[Xg(i)]=i,n[Xg(l.attribute)]=i}return new fd(e,n,t.space)}const JC=Tc({properties:{ariaActiveDescendant:null,ariaAtomic:gn,ariaAutoComplete:null,ariaBusy:gn,ariaChecked:gn,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:Gt,ariaCurrent:null,ariaDescribedBy:Gt,ariaDetails:null,ariaDisabled:gn,ariaDropEffect:Gt,ariaErrorMessage:null,ariaExpanded:gn,ariaFlowTo:Gt,ariaGrabbed:gn,ariaHasPopup:null,ariaHidden:gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gt,ariaLevel:Ne,ariaLive:null,ariaModal:gn,ariaMultiLine:gn,ariaMultiSelectable:gn,ariaOrientation:null,ariaOwns:Gt,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:gn,ariaReadOnly:gn,ariaRelevant:null,ariaRequired:gn,ariaRoleDescription:Gt,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:gn,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function e3(t,e){return e in t?t[e]:e}function t3(t,e){return e3(t,e.toLowerCase())}const lL=Tc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ac,acceptCharset:Gt,accessKey:Gt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Gt,autoFocus:yt,autoPlay:yt,blocking:Gt,capture:null,charSet:null,checked:yt,cite:null,className:Gt,cols:Ne,colSpan:null,content:null,contentEditable:gn,controls:yt,controlsList:Gt,coords:Ne|ac,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:Qg,draggable:gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Gt,height:Ne,hidden:Qg,high:Ne,href:null,hrefLang:null,htmlFor:Gt,httpEquiv:Gt,id:null,imageSizes:null,imageSrcSet:null,inert:yt,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Gt,itemRef:Gt,itemScope:yt,itemType:Gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yt,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:yt,muted:yt,name:null,nonce:null,noModule:yt,noValidate:yt,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:yt,optimum:Ne,pattern:null,ping:Gt,placeholder:null,playsInline:yt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Gt,required:yt,reversed:yt,rows:Ne,rowSpan:Ne,sandbox:Gt,scope:null,scoped:yt,seamless:yt,selected:yt,shadowRootClonable:yt,shadowRootDelegatesFocus:yt,shadowRootMode:null,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:yt,useMap:null,value:gn,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gt,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yt,declare:yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:yt,noHref:yt,noShade:yt,noWrap:yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:gn,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yt,disableRemotePlayback:yt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:t3}),cL=Tc({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:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:Gt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ac,g2:ac,glyphName:ac,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:Ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,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:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:Ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ir,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ir,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:e3}),n3=Tc({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()}}),r3=Tc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:t3}),i3=Tc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),uL={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"},dL=/[A-Z]/g,Ub=/-[a-z]/g,fL=/^data[-\w.:]+$/i;function hL(t,e){const n=Xg(e);let i=e,o=wr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fL.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Ub,mL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Ub.test(l)){let u=l.replace(dL,pL);u.charAt(0)!=="-"&&(u="-"+u),e="data"+u}}o=sv}return new o(i,e)}function pL(t){return"-"+t.toLowerCase()}function mL(t){return t.charAt(1).toUpperCase()}const gL=ZC([JC,lL,n3,r3,i3],"html"),ov=ZC([JC,cL,n3,r3,i3],"svg");function vL(t){return t.join(" ").trim()}var Ql={},ug,$b;function _L(){if($b)return ug;$b=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,a=/^\s+|\s+$/g,d=`
541
+ `,f="/",p="*",h="",_="comment",S="declaration";function C(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var y=1,x=1;function k(W){var K=W.match(e);K&&(y+=K.length);var G=W.lastIndexOf(d);x=~G?W.length-G:x+W.length}function N(){var W={line:y,column:x};return function(K){return K.position=new A(W),j(),K}}function A(W){this.start=W,this.end={line:y,column:x},this.source=b.source}A.prototype.content=v;function M(W){var K=new Error(b.source+":"+y+":"+x+": "+W);if(K.reason=W,K.filename=b.source,K.line=y,K.column=x,K.source=v,!b.silent)throw K}function T(W){var K=W.exec(v);if(K){var G=K[0];return k(G),v=v.slice(G.length),K}}function j(){T(n)}function O(W){var K;for(W=W||[];K=I();)K!==!1&&W.push(K);return W}function I(){var W=N();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var K=2;h!=v.charAt(K)&&(p!=v.charAt(K)||f!=v.charAt(K+1));)++K;if(K+=2,h===v.charAt(K-1))return M("End of comment missing");var G=v.slice(2,K-2);return x+=2,k(G),v=v.slice(K),x+=2,W({type:_,comment:G})}}function V(){var W=N(),K=T(i);if(K){if(I(),!T(o))return M("property missing ':'");var G=T(l),Z=W({type:S,property:w(K[0].replace(t,h)),value:G?w(G[0].replace(t,h)):h});return T(u),Z}}function U(){var W=[];O(W);for(var K;K=V();)K!==!1&&(W.push(K),O(W));return W}return j(),U()}function w(v){return v?v.replace(a,h):h}return ug=C,ug}var Vb;function yL(){if(Vb)return Ql;Vb=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(_L());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const u=(0,e.default)(i),a=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;a?o(f,p,d):p&&(l=l||{},l[f]=p)}),l}return Ql}var xu={},qb;function bL(){if(qb)return xu;qb=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.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)},u=function(f,p){return p.toUpperCase()},a=function(f,p){return"".concat(p,"-")},d=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,u))};return xu.camelCase=d,xu}var Su,Wb;function xL(){if(Wb)return Su;Wb=1;var t=Su&&Su.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},e=t(yL()),n=bL();function i(o,l){var u={};return!o||typeof o!="string"||(0,e.default)(o,function(a,d){a&&d&&(u[(0,n.camelCase)(a,l)]=d)}),u}return i.default=i,Su=i,Su}var SL=xL();const wL=sh(SL),s3=o3("end"),av=o3("start");function o3(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=av(t),n=s3(t);if(e&&n)return{start:e,end:n}}function Mu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Gb(t.position):"start"in t||"end"in t?Gb(t):"line"in t||"column"in t?Jg(t):""}function Jg(t){return Kb(t&&t.line)+":"+Kb(t&&t.column)}function Gb(t){return Jg(t&&t.start)+"-"+Jg(t&&t.end)}function Kb(t){return t&&typeof t=="number"?t:1}class Yn extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},u=!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&&(u=!0,o=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?l.ruleId=i:(l.source=i.slice(0,d),l.ruleId=i.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.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=Mu(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=u&&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}}Yn.prototype.file="";Yn.prototype.name="";Yn.prototype.reason="";Yn.prototype.message="";Yn.prototype.stack="";Yn.prototype.column=void 0;Yn.prototype.line=void 0;Yn.prototype.ancestors=void 0;Yn.prototype.cause=void 0;Yn.prototype.fatal=void 0;Yn.prototype.place=void 0;Yn.prototype.ruleId=void 0;Yn.prototype.source=void 0;const lv={}.hasOwnProperty,kL=new Map,EL=/[A-Z]/g,AL=new Set(["table","tbody","thead","tfoot","tr"]),RL=new Set(["td","th"]),a3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function TL(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=zL(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=IL(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"?ov:gL,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=l3(o,t,void 0);return l&&typeof l!="string"?l:o.create(t,o.Fragment,{children:l||void 0},void 0)}function l3(t,e,n){if(e.type==="element")return NL(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return DL(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return jL(t,e,n);if(e.type==="mdxjsEsm")return ML(t,e);if(e.type==="root")return OL(t,e,n);if(e.type==="text")return LL(t,e)}function NL(t,e,n){const i=t.schema;let o=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=ov,t.schema=o),t.ancestors.push(e);const l=u3(t,e.tagName,!1),u=BL(t,e);let a=uv(t,e);return AL.has(e.tagName)&&(a=a.filter(function(d){return typeof d=="string"?!oL(d):!0})),c3(t,u,l,e),cv(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function DL(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)}Wu(t,e.position)}function ML(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Wu(t,e.position)}function jL(t,e,n){const i=t.schema;let o=i;e.name==="svg"&&i.space==="html"&&(o=ov,t.schema=o),t.ancestors.push(e);const l=e.name===null?t.Fragment:u3(t,e.name,!0),u=PL(t,e),a=uv(t,e);return c3(t,u,l,e),cv(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function OL(t,e,n){const i={};return cv(i,uv(t,e)),t.create(e,t.Fragment,i,n)}function LL(t,e){return e.value}function c3(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function cv(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function IL(t,e,n){return i;function i(o,l,u,a){const f=Array.isArray(u.children)?n:e;return a?f(l,u,a):f(l,u)}}function zL(t,e){return n;function n(i,o,l,u){const a=Array.isArray(l.children),d=av(i);return e(o,l,u,a,{columnNumber:d?d.column-1:void 0,fileName:t,lineNumber:d?d.line:void 0},void 0)}}function BL(t,e){const n={};let i,o;for(o in e.properties)if(o!=="children"&&lv.call(e.properties,o)){const l=FL(t,o,e.properties[o]);if(l){const[u,a]=l;t.tableCellAlignToStyle&&u==="align"&&typeof a=="string"&&RL.has(e.tagName)?i=a:n[u]=a}}if(i){const l=n.style||(n.style={});l[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function PL(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 u=l.expression;u.type;const a=u.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else Wu(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 Wu(t,e.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function uv(t,e){const n=[];let i=-1;const o=t.passKeys?new Map:kL;for(;++i<e.children.length;){const l=e.children[i];let u;if(t.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const a=l3(t,l,u);a!==void 0&&n.push(a)}return n}function FL(t,e,n){const i=hL(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?tL(n):vL(n)),i.property==="style"){let o=typeof n=="object"?n:HL(t,String(n));return t.stylePropertyNameCase==="css"&&(o=UL(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&i.space?uL[i.property]||i.property:i.attribute,n]}}function HL(t,e){try{return wL(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,o=new Yn("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=a3+"#cannot-parse-style-attribute",o}}function u3(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const o=e.split(".");let l=-1,u;for(;++l<o.length;){const a=Pb(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};u=u?{type:"MemberExpression",object:u,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}i=u}else i=Pb(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const o=i.value;return lv.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(i);Wu(t)}function Wu(t,e){const n=new Yn("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=a3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UL(t){const e={};let n;for(n in t)lv.call(t,n)&&(e[$L(n)]=t[n]);return e}function $L(t){let e=t.replace(EL,VL);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function VL(t){return"-"+t.toLowerCase()}const dg={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"]},qL={};function dv(t,e){const n=qL,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return d3(t,i,o)}function d3(t,e,n){if(WL(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 Yb(t.children,e,n)}return Array.isArray(t)?Yb(t,e,n):""}function Yb(t,e,n){const i=[];let o=-1;for(;++o<t.length;)i[o]=d3(t[o],e,n);return i.join("")}function WL(t){return!!(t&&typeof t=="object")}const Xb=document.createElement("i");function fv(t){const e="&"+t+";";Xb.innerHTML=e;const n=Xb.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,u;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,i.length<1e4)u=Array.from(i),u.unshift(e,n),t.splice(...u);else for(n&&t.splice(e,n);l<i.length;)u=i.slice(l,l+1e4),u.unshift(e,0),t.splice(...u),l+=1e4,e+=1e4}function ri(t,e){return t.length>0?(Hr(t,t.length,0,e),t):e}const Qb={}.hasOwnProperty;function f3(t){const e={};let n=-1;for(;++n<t.length;)GL(e,t[n]);return e}function GL(t,e){let n;for(n in e){const o=(Qb.call(t,n)?t[n]:void 0)||(t[n]={}),l=e[n];let u;if(l)for(u in l){Qb.call(o,u)||(o[u]=[]);const a=l[u];KL(o[u],Array.isArray(a)?a:a?[a]:[])}}}function KL(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 h3(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 wi(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nr=Wo(/[A-Za-z]/),Kn=Wo(/[\dA-Za-z]/),YL=Wo(/[#-'*+\--9=?A-Z^-~]/);function eh(t){return t!==null&&(t<32||t===127)}const e1=Wo(/\d/),XL=Wo(/[\dA-Fa-f]/),QL=Wo(/[!-/:-@[-`{-~]/);function st(t){return t!==null&&t<-2}function Vt(t){return t!==null&&(t<0||t===32)}function kt(t){return t===-2||t===-1||t===32}const Wh=Wo(new RegExp("\\p{P}|\\p{S}","u")),Ua=Wo(/\s/);function Wo(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Nc(t){const e=[];let n=-1,i=0,o=0;for(;++n<t.length;){const l=t.charCodeAt(n);let u="";if(l===37&&Kn(t.charCodeAt(n+1))&&Kn(t.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const a=t.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(u=String.fromCharCode(l,a),o=1):u="�"}else u=String.fromCharCode(l);u&&(e.push(t.slice(i,n),encodeURIComponent(u)),i=n+o+1,u=""),o&&(n+=o,o=0)}return e.join("")+t.slice(i)}function Nt(t,e,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(d){return kt(d)?(t.enter(n),a(d)):e(d)}function a(d){return kt(d)&&l++<o?(t.consume(d),a):(t.exit(n),e(d))}}const ZL={tokenize:JL};function JL(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"),Nt(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),l(a)}function l(a){const d=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(a)}function u(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return st(a)?(t.consume(a),t.exit("chunkText"),l):(t.consume(a),u)}}const e9={tokenize:t9},Zb={tokenize:n9};function t9(t){const e=this,n=[];let i=0,o,l,u;return a;function a(x){if(i<n.length){const k=n[i];return e.containerState=k[1],t.attempt(k[0].continuation,d,f)(x)}return f(x)}function d(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 _(x);if(o.currentConstruct&&o.currentConstruct.concrete)return C(x);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Zb,p,h)(x)}function p(x){return o&&y(),b(i),_(x)}function h(x){return e.parser.lazy[e.now().line]=i!==n.length,u=e.now().offset,C(x)}function _(x){return e.containerState={},t.attempt(Zb,S,C)(x)}function S(x){return i++,n.push([e.currentConstruct,e.containerState]),_(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){v(t.exit("chunkFlow"),!0),b(0),t.consume(x);return}return st(x)?(t.consume(x),v(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(x),w)}function v(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<u&&(!o.events[A][1].end||o.events[A][1].end.offset>u))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 n9(t,e,n){return Nt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hc(t){if(t===null||Vt(t)||Ua(t))return 1;if(Wh(t))return 2}function Gh(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 t1={name:"attention",resolveAll:r9,tokenize:i9};function r9(t,e){let n=-1,i,o,l,u,a,d,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;d=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},_={...t[n][1].start};Jb(h,-d),Jb(_,d),u={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...t[i][1].end}},a={type:d>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:_},l={type:d>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...u.start},end:{...a.end}},t[i][1].end={...u.start},t[n][1].start={...a.end},f=[],t[i][1].end.offset-t[i][1].start.offset&&(f=ri(f,[["enter",t[i][1],e],["exit",t[i][1],e]])),f=ri(f,[["enter",o,e],["enter",u,e],["exit",u,e],["enter",l,e]]),f=ri(f,Gh(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),f=ri(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=ri(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 i9(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=hc(i);let l;return u;function u(d){return l=d,t.enter("attentionSequence"),a(d)}function a(d){if(d===l)return t.consume(d),a;const f=t.exit("attentionSequence"),p=hc(d),h=!p||p===2&&o||n.includes(d),_=!o||o===2&&p||n.includes(i);return f._open=!!(l===42?h:h&&(o||!_)),f._close=!!(l===42?_:_&&(p||!h)),e(d)}}function Jb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const s9={name:"autolink",tokenize:o9};function o9(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 nr(S)?(t.consume(S),u):S===64?n(S):f(S)}function u(S){return S===43||S===45||S===46||Kn(S)?(i=1,a(S)):f(S)}function a(S){return S===58?(t.consume(S),i=0,d):(S===43||S===45||S===46||Kn(S))&&i++<32?(t.consume(S),a):(i=0,f(S))}function d(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||eh(S)?n(S):(t.consume(S),d)}function f(S){return S===64?(t.consume(S),p):YL(S)?(t.consume(S),f):n(S)}function p(S){return Kn(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):_(S)}function _(S){if((S===45||Kn(S))&&i++<63){const C=S===45?_:h;return t.consume(S),C}return n(S)}}const hd={partial:!0,tokenize:a9};function a9(t,e,n){return i;function i(l){return kt(l)?Nt(t,o,"linePrefix")(l):o(l)}function o(l){return l===null||st(l)?e(l):n(l)}}const p3={continuation:{tokenize:c9},exit:u9,name:"blockQuote",tokenize:l9};function l9(t,e,n){const i=this;return o;function o(u){if(u===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(u),t.exit("blockQuoteMarker"),l}return n(u)}function l(u){return kt(u)?(t.enter("blockQuotePrefixWhitespace"),t.consume(u),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(u))}}function c9(t,e,n){const i=this;return o;function o(u){return kt(u)?Nt(t,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return t.attempt(p3,e,n)(u)}}function u9(t){t.exit("blockQuote")}const m3={name:"characterEscape",tokenize:d9};function d9(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 QL(l)?(t.enter("characterEscapeValue"),t.consume(l),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(l)}}const g3={name:"characterReference",tokenize:f9};function f9(t,e,n){const i=this;let o=0,l,u;return a;function a(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),d}function d(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),f):(t.enter("characterReferenceValue"),l=31,u=Kn,p(h))}function f(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),l=6,u=XL,p):(t.enter("characterReferenceValue"),l=7,u=e1,p(h))}function p(h){if(h===59&&o){const _=t.exit("characterReferenceValue");return u===Kn&&!fv(i.sliceSerialize(_))?n(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return u(h)&&o++<l?(t.consume(h),p):n(h)}}const ex={partial:!0,tokenize:p9},tx={concrete:!0,name:"codeFenced",tokenize:h9};function h9(t,e,n){const i=this,o={partial:!0,tokenize:N};let l=0,u=0,a;return d;function d(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?(u++,t.consume(A),p):u<3?n(A):(t.exit("codeFencedFenceSequence"),kt(A)?Nt(t,h,"whitespace")(A):h(A))}function h(A){return A===null||st(A)?(t.exit("codeFencedFence"),i.interrupt?e(A):t.check(ex,w,k)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),_(A))}function _(A){return A===null||st(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(A)):kt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Nt(t,S,"whitespace")(A)):A===96&&A===a?n(A):(t.consume(A),_)}function S(A){return A===null||st(A)?h(A):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||st(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,v)(A)}function v(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),b}function b(A){return l>0&&kt(A)?Nt(t,y,"linePrefix",l+1)(A):y(A)}function y(A){return A===null||st(A)?t.check(ex,w,k)(A):(t.enter("codeFlowValue"),x(A))}function x(A){return A===null||st(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"),I}function I(K){return A.enter("codeFencedFence"),kt(K)?Nt(A,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):V(K)}function V(K){return K===a?(A.enter("codeFencedFenceSequence"),U(K)):T(K)}function U(K){return K===a?(j++,A.consume(K),U):j>=u?(A.exit("codeFencedFenceSequence"),kt(K)?Nt(A,W,"whitespace")(K):W(K)):T(K)}function W(K){return K===null||st(K)?(A.exit("codeFencedFence"),M(K)):T(K)}}}function p9(t,e,n){const i=this;return o;function o(u){return u===null?n(u):(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),l)}function l(u){return i.parser.lazy[i.now().line]?n(u):e(u)}}const fg={name:"codeIndented",tokenize:g9},m9={partial:!0,tokenize:v9};function g9(t,e,n){const i=this;return o;function o(f){return t.enter("codeIndented"),Nt(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?u(f):n(f)}function u(f){return f===null?d(f):st(f)?t.attempt(m9,u,d)(f):(t.enter("codeFlowValue"),a(f))}function a(f){return f===null||st(f)?(t.exit("codeFlowValue"),u(f)):(t.consume(f),a)}function d(f){return t.exit("codeIndented"),e(f)}}function v9(t,e,n){const i=this;return o;function o(u){return i.parser.lazy[i.now().line]?n(u):st(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),o):Nt(t,l,"linePrefix",5)(u)}function l(u){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(u):st(u)?o(u):n(u)}}const _9={name:"codeText",previous:b9,resolve:y9,tokenize:x9};function y9(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 b9(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x9(t,e,n){let i=0,o,l;return u;function u(h){return t.enter("codeText"),t.enter("codeTextSequence"),a(h)}function a(h){return h===96?(t.consume(h),i++,a):(t.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),d):h===96?(l=t.enter("codeTextSequence"),o=0,p(h)):st(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),d):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||st(h)?(t.exit("codeTextData"),d(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 S9{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&&wu(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),wu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),wu(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);wu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);wu(this.left,n.reverse())}}}function wu(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 v3(t){const e={};let n=-1,i,o,l,u,a,d,f;const p=new S9(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"&&(d=i[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,w9(p,n)),n=e[n],f=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(u=p.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=l);else if(!(u[1].type==="linePrefix"||u[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 w9(t,e){const n=t.get(e)[1],i=t.get(e)[2];let o=e-1;const l=[];let u=n._tokenizer;u||(u=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const a=u.events,d=[],f={};let p,h,_=-1,S=n,C=0,w=0;const v=[w];for(;S;){for(;t.get(++o)[1]!==S;);l.push(o),S._tokenizer||(p=i.sliceStream(S),S.next||p.push(null),h&&u.defineSkip(S.start),S._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),S._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),h=S,S=S.next}for(S=n;++_<a.length;)a[_][0]==="exit"&&a[_-1][0]==="enter"&&a[_][1].type===a[_-1][1].type&&a[_][1].start.line!==a[_][1].end.line&&(w=_+1,v.push(w),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(u.events=[],S?(S._tokenizer=void 0,S.previous=void 0):v.pop(),_=v.length;_--;){const b=a.slice(v[_],v[_+1]),y=l.pop();d.push([y,y+b.length-1]),t.splice(y,2,b)}for(d.reverse(),_=-1;++_<d.length;)f[C+d[_][0]]=C+d[_][1],C+=d[_][1]-d[_][0]-1;return f}const C9={resolve:E9,tokenize:A9},k9={partial:!0,tokenize:R9};function E9(t){return v3(t),t}function A9(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):st(a)?t.check(k9,u,l)(a):(t.consume(a),o)}function l(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function u(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function R9(t,e,n){const i=this;return o;function o(u){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Nt(t,l,"linePrefix")}function l(u){if(u===null||st(u))return n(u);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(u):t.interrupt(i.parser.constructs.flow,n,e)(u)}}function _3(t,e,n,i,o,l,u,a,d){const f=d||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),_):b===null||b===32||b===41||eh(b)?n(b):(t.enter(i),t.enter(u),t.enter(a),t.enter("chunkString",{contentType:"string"}),w(b))}function _(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),_(b)):b===null||b===60||st(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||Vt(b))?(t.exit("chunkString"),t.exit(a),t.exit(u),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||eh(b)?n(b):(t.consume(b),b===92?v:w)}function v(b){return b===40||b===41||b===92?(t.consume(b),w):w(b)}}function y3(t,e,n,i,o,l){const u=this;let a=0,d;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&&!d||S===94&&!a&&"_hiddenFootnoteSupport"in u.parser.constructs?n(S):S===93?(t.exit(l),t.enter(o),t.consume(S),t.exit(o),t.exit(i),e):st(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||st(S)||a++>999?(t.exit("chunkString"),p(S)):(t.consume(S),d||(d=!kt(S)),S===92?_:h)}function _(S){return S===91||S===92||S===93?(t.consume(S),a++,h):h(S)}}function b3(t,e,n,i,o,l){let u;return a;function a(_){return _===34||_===39||_===40?(t.enter(i),t.enter(o),t.consume(_),t.exit(o),u=_===40?41:_,d):n(_)}function d(_){return _===u?(t.enter(o),t.consume(_),t.exit(o),t.exit(i),e):(t.enter(l),f(_))}function f(_){return _===u?(t.exit(l),d(u)):_===null?n(_):st(_)?(t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),Nt(t,f,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===u||_===null||st(_)?(t.exit("chunkString"),f(_)):(t.consume(_),_===92?h:p)}function h(_){return _===u||_===92?(t.consume(_),p):p(_)}}function ju(t,e){let n;return i;function i(o){return st(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,i):kt(o)?Nt(t,i,n?"linePrefix":"lineSuffix")(o):e(o)}}const T9={name:"definition",tokenize:D9},N9={partial:!0,tokenize:M9};function D9(t,e,n){const i=this;let o;return l;function l(S){return t.enter("definition"),u(S)}function u(S){return y3.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function a(S){return o=wi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),d):n(S)}function d(S){return Vt(S)?ju(t,f)(S):f(S)}function f(S){return _3(t,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function p(S){return t.attempt(N9,h,h)(S)}function h(S){return kt(S)?Nt(t,_,"whitespace")(S):_(S)}function _(S){return S===null||st(S)?(t.exit("definition"),i.parser.defined.push(o),e(S)):n(S)}}function M9(t,e,n){return i;function i(a){return Vt(a)?ju(t,o)(a):n(a)}function o(a){return b3(t,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return kt(a)?Nt(t,u,"whitespace")(a):u(a)}function u(a){return a===null||st(a)?e(a):n(a)}}const j9={name:"hardBreakEscape",tokenize:O9};function O9(t,e,n){return i;function i(l){return t.enter("hardBreakEscape"),t.consume(l),o}function o(l){return st(l)?(t.exit("hardBreakEscape"),e(l)):n(l)}}const L9={name:"headingAtx",resolve:I9,tokenize:z9};function I9(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 z9(t,e,n){let i=0;return o;function o(p){return t.enter("atxHeading"),l(p)}function l(p){return t.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&i++<6?(t.consume(p),u):p===null||Vt(p)?(t.exit("atxHeadingSequence"),a(p)):n(p)}function a(p){return p===35?(t.enter("atxHeadingSequence"),d(p)):p===null||st(p)?(t.exit("atxHeading"),e(p)):kt(p)?Nt(t,a,"whitespace")(p):(t.enter("atxHeadingText"),f(p))}function d(p){return p===35?(t.consume(p),d):(t.exit("atxHeadingSequence"),a(p))}function f(p){return p===null||p===35||Vt(p)?(t.exit("atxHeadingText"),a(p)):(t.consume(p),f)}}const B9=["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"],nx=["pre","script","style","textarea"],P9={concrete:!0,name:"htmlFlow",resolveTo:U9,tokenize:$9},F9={partial:!0,tokenize:q9},H9={partial:!0,tokenize:V9};function U9(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 $9(t,e,n){const i=this;let o,l,u,a,d;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),_):F===47?(t.consume(F),l=!0,w):F===63?(t.consume(F),o=3,i.interrupt?e:L):nr(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function _(F){return F===45?(t.consume(F),o=2,S):F===91?(t.consume(F),o=5,a=0,C):nr(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 Q="CDATA[";return F===Q.charCodeAt(a++)?(t.consume(F),a===Q.length?i.interrupt?e:V:C):n(F)}function w(F){return nr(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function v(F){if(F===null||F===47||F===62||Vt(F)){const Q=F===47,te=u.toLowerCase();return!Q&&!l&&nx.includes(te)?(o=1,i.interrupt?e(F):V(F)):B9.includes(u.toLowerCase())?(o=6,Q?(t.consume(F),b):i.interrupt?e(F):V(F)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(F):l?y(F):x(F))}return F===45||Kn(F)?(t.consume(F),u+=String.fromCharCode(F),v):n(F)}function b(F){return F===62?(t.consume(F),i.interrupt?e:V):n(F)}function y(F){return kt(F)?(t.consume(F),y):O(F)}function x(F){return F===47?(t.consume(F),O):F===58||F===95||nr(F)?(t.consume(F),k):kt(F)?(t.consume(F),x):O(F)}function k(F){return F===45||F===46||F===58||F===95||Kn(F)?(t.consume(F),k):N(F)}function N(F){return F===61?(t.consume(F),A):kt(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),d=F,M):kt(F)?(t.consume(F),A):T(F)}function M(F){return F===d?(t.consume(F),d=null,j):F===null||st(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||Vt(F)?N(F):(t.consume(F),T)}function j(F){return F===47||F===62||kt(F)?x(F):n(F)}function O(F){return F===62?(t.consume(F),I):n(F)}function I(F){return F===null||st(F)?V(F):kt(F)?(t.consume(F),I):n(F)}function V(F){return F===45&&o===2?(t.consume(F),G):F===60&&o===1?(t.consume(F),Z):F===62&&o===4?(t.consume(F),z):F===63&&o===3?(t.consume(F),L):F===93&&o===5?(t.consume(F),B):st(F)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(F9,H,U)(F)):F===null||st(F)?(t.exit("htmlFlowData"),U(F)):(t.consume(F),V)}function U(F){return t.check(H9,W,H)(F)}function W(F){return t.enter("lineEnding"),t.consume(F),t.exit("lineEnding"),K}function K(F){return F===null||st(F)?U(F):(t.enter("htmlFlowData"),V(F))}function G(F){return F===45?(t.consume(F),L):V(F)}function Z(F){return F===47?(t.consume(F),u="",ee):V(F)}function ee(F){if(F===62){const Q=u.toLowerCase();return nx.includes(Q)?(t.consume(F),z):V(F)}return nr(F)&&u.length<8?(t.consume(F),u+=String.fromCharCode(F),ee):V(F)}function B(F){return F===93?(t.consume(F),L):V(F)}function L(F){return F===62?(t.consume(F),z):F===45&&o===2?(t.consume(F),L):V(F)}function z(F){return F===null||st(F)?(t.exit("htmlFlowData"),H(F)):(t.consume(F),z)}function H(F){return t.exit("htmlFlow"),e(F)}}function V9(t,e,n){const i=this;return o;function o(u){return st(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),l):n(u)}function l(u){return i.parser.lazy[i.now().line]?n(u):e(u)}}function q9(t,e,n){return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(hd,e,n)}}const W9={name:"htmlText",tokenize:G9};function G9(t,e,n){const i=this;let o,l,u;return a;function a(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),d}function d(L){return L===33?(t.consume(L),f):L===47?(t.consume(L),N):L===63?(t.consume(L),x):nr(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):nr(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),_):st(L)?(u=h,Z(L)):(t.consume(L),h)}function _(L){return L===45?(t.consume(L),S):h(L)}function S(L){return L===62?G(L):L===45?_(L):h(L)}function C(L){const z="CDATA[";return L===z.charCodeAt(l++)?(t.consume(L),l===z.length?w:C):n(L)}function w(L){return L===null?n(L):L===93?(t.consume(L),v):st(L)?(u=w,Z(L)):(t.consume(L),w)}function v(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):st(L)?(u=y,Z(L)):(t.consume(L),y)}function x(L){return L===null?n(L):L===63?(t.consume(L),k):st(L)?(u=x,Z(L)):(t.consume(L),x)}function k(L){return L===62?G(L):x(L)}function N(L){return nr(L)?(t.consume(L),A):n(L)}function A(L){return L===45||Kn(L)?(t.consume(L),A):M(L)}function M(L){return st(L)?(u=M,Z(L)):kt(L)?(t.consume(L),M):G(L)}function T(L){return L===45||Kn(L)?(t.consume(L),T):L===47||L===62||Vt(L)?j(L):n(L)}function j(L){return L===47?(t.consume(L),G):L===58||L===95||nr(L)?(t.consume(L),O):st(L)?(u=j,Z(L)):kt(L)?(t.consume(L),j):G(L)}function O(L){return L===45||L===46||L===58||L===95||Kn(L)?(t.consume(L),O):I(L)}function I(L){return L===61?(t.consume(L),V):st(L)?(u=I,Z(L)):kt(L)?(t.consume(L),I):j(L)}function V(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),o=L,U):st(L)?(u=V,Z(L)):kt(L)?(t.consume(L),V):(t.consume(L),W)}function U(L){return L===o?(t.consume(L),o=void 0,K):L===null?n(L):st(L)?(u=U,Z(L)):(t.consume(L),U)}function W(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Vt(L)?j(L):(t.consume(L),W)}function K(L){return L===47||L===62||Vt(L)?j(L):n(L)}function G(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function Z(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),ee}function ee(L){return kt(L)?Nt(t,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return t.enter("htmlTextData"),u(L)}}const hv={name:"labelEnd",resolveAll:Q9,resolveTo:Z9,tokenize:J9},K9={tokenize:eI},Y9={tokenize:tI},X9={tokenize:nI};function Q9(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 Z9(t,e){let n=t.length,i=0,o,l,u,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(u){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"&&(u=n);const d={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[u][1].end}},p={type:"labelText",start:{...t[l+i+2][1].end},end:{...t[u-2][1].start}};return a=[["enter",d,e],["enter",f,e]],a=ri(a,t.slice(l+1,l+i+3)),a=ri(a,[["enter",p,e]]),a=ri(a,Gh(e.parser.constructs.insideSpan.null,t.slice(l+i+4,u-3),e)),a=ri(a,[["exit",p,e],t[u-2],t[u-1],["exit",f,e]]),a=ri(a,t.slice(u+1)),a=ri(a,[["exit",d,e]]),Hr(t,l,t.length,a),t}function J9(t,e,n){const i=this;let o=i.events.length,l,u;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(_){return l?l._inactive?h(_):(u=i.parser.defined.includes(wi(i.sliceSerialize({start:l.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(_),t.exit("labelMarker"),t.exit("labelEnd"),d):n(_)}function d(_){return _===40?t.attempt(K9,p,u?p:h)(_):_===91?t.attempt(Y9,p,u?f:h)(_):u?p(_):h(_)}function f(_){return t.attempt(X9,p,h)(_)}function p(_){return e(_)}function h(_){return l._balanced=!0,n(_)}}function eI(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 Vt(h)?ju(t,l)(h):l(h)}function l(h){return h===41?p(h):_3(t,u,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function u(h){return Vt(h)?ju(t,d)(h):p(h)}function a(h){return n(h)}function d(h){return h===34||h===39||h===40?b3(t,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return Vt(h)?ju(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 tI(t,e,n){const i=this;return o;function o(a){return y3.call(i,t,l,u,"reference","referenceMarker","referenceString")(a)}function l(a){return i.parser.defined.includes(wi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function u(a){return n(a)}}function nI(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 rI={name:"labelStartImage",resolveAll:hv.resolveAll,tokenize:iI};function iI(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"),u):n(a)}function u(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const sI={name:"labelStartLink",resolveAll:hv.resolveAll,tokenize:oI};function oI(t,e,n){const i=this;return o;function o(u){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):e(u)}}const hg={name:"lineEnding",tokenize:aI};function aI(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Nt(t,e,"linePrefix")}}const Lf={name:"thematicBreak",tokenize:lI};function lI(t,e,n){let i=0,o;return l;function l(f){return t.enter("thematicBreak"),u(f)}function u(f){return o=f,a(f)}function a(f){return f===o?(t.enter("thematicBreakSequence"),d(f)):i>=3&&(f===null||st(f))?(t.exit("thematicBreak"),e(f)):n(f)}function d(f){return f===o?(t.consume(f),i++,d):(t.exit("thematicBreakSequence"),kt(f)?Nt(t,a,"whitespace")(f):a(f))}}const Sr={continuation:{tokenize:fI},exit:pI,name:"list",tokenize:dI},cI={partial:!0,tokenize:mI},uI={partial:!0,tokenize:hI};function dI(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,u=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:e1(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(Lf,n,f)(S):f(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),d(S)}return n(S)}function d(S){return e1(S)&&++u<10?(t.consume(S),d):(!i.interrupt||u<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(hd,i.interrupt?n:p,t.attempt(cI,_,h))}function p(S){return i.containerState.initialBlankLine=!0,l++,_(S)}function h(S){return kt(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),_):n(S)}function _(S){return i.containerState.size=l+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(S)}}function fI(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(hd,o,l);function o(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Nt(t,e,"listItemIndent",i.containerState.size+1)(a)}function l(a){return i.containerState.furtherBlankLines||!kt(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(uI,e,u)(a))}function u(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,Nt(t,t.attempt(Sr,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function hI(t,e,n){const i=this;return Nt(t,o,"listItemIndent",i.containerState.size+1);function o(l){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?e(l):n(l)}}function pI(t){t.exit(this.containerState.type)}function mI(t,e,n){const i=this;return Nt(t,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const u=i.events[i.events.length-1];return!kt(l)&&u&&u[1].type==="listItemPrefixWhitespace"?e(l):n(l)}}const rx={name:"setextUnderline",resolveTo:gI,tokenize:vI};function gI(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 u={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",u,e]),t.splice(l+1,0,["exit",t[i][1],e]),t[i][1].end={...t[l][1].end}):t[i][1]=u,t.push(["exit",u,e]),t}function vI(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,u(f)):n(f)}function u(f){return t.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===o?(t.consume(f),a):(t.exit("setextHeadingLineSequence"),kt(f)?Nt(t,d,"lineSuffix")(f):d(f))}function d(f){return f===null||st(f)?(t.exit("setextHeadingLine"),e(f)):n(f)}}const _I={tokenize:yI};function yI(t){const e=this,n=t.attempt(hd,i,t.attempt(this.parser.constructs.flowInitial,o,Nt(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 bI={resolveAll:S3()},xI=x3("string"),SI=x3("text");function x3(t){return{resolveAll:S3(t==="text"?wI:void 0),tokenize:e};function e(n){const i=this,o=this.parser.constructs[t],l=n.attempt(o,u,a);return u;function u(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),d}function d(p){return f(p)?(n.exit("data"),l(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const h=o[p];let _=-1;if(h)for(;++_<h.length;){const S=h[_];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function S3(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 wI(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,u=-1,a=0,d;for(;l--;){const f=o[l];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)a++,u--;if(u)break;u=-1}else if(f===-2)d=!0,a++;else if(f!==-1){l++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const f={type:n===t.length||d||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:i.start._bufferIndex+u,_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:Sr,43:Sr,45:Sr,48:Sr,49:Sr,50:Sr,51:Sr,52:Sr,53:Sr,54:Sr,55:Sr,56:Sr,57:Sr,62:p3},kI={91:T9},EI={[-2]:fg,[-1]:fg,32:fg},AI={35:L9,42:Lf,45:[rx,Lf],60:P9,61:rx,95:Lf,96:tx,126:tx},RI={38:g3,92:m3},TI={[-5]:hg,[-4]:hg,[-3]:hg,33:rI,38:g3,42:t1,60:[s9,W9],91:sI,92:[j9,m3],93:hv,95:t1,96:_9},NI={null:[t1,bI]},DI={null:[42,95]},MI={null:[]},jI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:DI,contentInitial:kI,disable:MI,document:CI,flow:AI,flowInitial:EI,insideSpan:NI,string:RI,text:TI},Symbol.toStringTag,{value:"Module"}));function OI(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 u=[],a=[];const d={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:_,sliceStream:S,write:h};let p=e.tokenize.call(f,d);return e.resolveAll&&l.push(e),f;function h(I){return u=ri(u,I),v(),u[u.length-1]!==null?[]:(T(e,0),f.events=Gh(l,f.events,f),f.events)}function _(I,V){return II(S(I),V)}function S(I){return LI(u,I)}function C(){const{_bufferIndex:I,_index:V,line:U,column:W,offset:K}=i;return{_bufferIndex:I,_index:V,line:U,column:W,offset:K}}function w(I){o[I.line]=I.column,O()}function v(){let I;for(;i._index<u.length;){const V=u[i._index];if(typeof V=="string")for(I=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===I&&i._bufferIndex<V.length;)b(V.charCodeAt(i._bufferIndex));else b(V)}}function b(I){p=p(I)}function y(I){st(I)?(i.line++,i.column=1,i.offset+=I===-3?2:1,O()):I!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=I}function x(I,V){const U=V||{};return U.type=I,U.start=C(),f.events.push(["enter",U,f]),a.push(U),U}function k(I){const V=a.pop();return V.end=C(),f.events.push(["exit",V,f]),V}function N(I,V){T(I,V.from)}function A(I,V){V.restore()}function M(I,V){return U;function U(W,K,G){let Z,ee,B,L;return Array.isArray(W)?H(W):"tokenize"in W?H([W]):z(W);function z(X){return q;function q($){const ne=$!==null&&X[$],ie=$!==null&&X.null,ae=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ae)($)}}function H(X){return Z=X,ee=0,X.length===0?G:F(X[ee])}function F(X){return q;function q($){return L=j(),B=X,X.partial||(f.currentConstruct=X),X.name&&f.parser.constructs.disable.null.includes(X.name)?te():X.tokenize.call(V?Object.assign(Object.create(f),V):f,d,Q,te)($)}}function Q(X){return I(B,L),K}function te(X){return L.restore(),++ee<Z.length?F(Z[ee]):G}}}function T(I,V){I.resolveAll&&!l.includes(I)&&l.push(I),I.resolve&&Hr(f.events,V,f.events.length-V,I.resolve(f.events.slice(V),f)),I.resolveTo&&(f.events=I.resolveTo(f.events,f))}function j(){const I=C(),V=f.previous,U=f.currentConstruct,W=f.events.length,K=Array.from(a);return{from:W,restore:G};function G(){i=I,f.previous=V,f.currentConstruct=U,f.events.length=W,a=K,O()}}function O(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function LI(t,e){const n=e.start._index,i=e.start._bufferIndex,o=e.end._index,l=e.end._bufferIndex;let u;if(n===o)u=[t[n].slice(i,l)];else{if(u=t.slice(n,o),i>-1){const a=u[0];typeof a=="string"?u[0]=a.slice(i):u.shift()}l>0&&u.push(t[o].slice(0,l))}return u}function II(t,e){let n=-1;const i=[];let o;for(;++n<t.length;){const l=t[n];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
542
+ `;break}case-3:{u=`\r
543
+ `;break}case-2:{u=e?" ":" ";break}case-1:{if(!e&&o)continue;u=" ";break}default:u=String.fromCharCode(l)}o=l===-2,i.push(u)}return i.join("")}function zI(t){const i={constructs:f3([jI,...(t||{}).extensions||[]]),content:o(ZL),defined:[],document:o(e9),flow:o(_I),lazy:{},string:o(xI),text:o(SI)};return i;function o(l){return u;function u(a){return OI(i,l,a)}}}function BI(t){for(;!v3(t););return t}const ix=/[\0\t\n\r]/g;function PI(){let t=1,e="",n=!0,i;return o;function o(l,u,a){const d=[];let f,p,h,_,S;for(l=e+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),h=0,e="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(ix.lastIndex=h,f=ix.exec(l),_=f&&f.index!==void 0?f.index:l.length,S=l.charCodeAt(_),!f){e=l.slice(h);break}if(S===10&&h===_&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),h<_&&(d.push(l.slice(h,_)),t+=_-h),S){case 0:{d.push(65533),t++;break}case 9:{for(p=Math.ceil(t/4)*4,d.push(-2);t++<p;)d.push(-1);break}case 10:{d.push(-4),t=1;break}default:i=!0,t=1}h=_+1}return a&&(i&&d.push(-5),e&&d.push(e),d.push(null)),d}}const FI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HI(t){return t.replace(FI,UI)}function UI(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return h3(n.slice(l?2:1),l?16:10)}return fv(n)||t}const w3={}.hasOwnProperty;function $I(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),VI(n)(BI(zI(n).document().write(PI()(t,e,!0))))}function VI(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(it),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(je),blockQuote:l(ie),characterEscape:j,characterReference:j,codeFenced:l(ae),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(ae,u),codeText:l(se,u),codeTextData:j,data:j,codeFlowValue:j,definition:l(ye),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Re),hardBreakEscape:l(Be),hardBreakTrailing:l(Be),htmlFlow:l(De,u),htmlFlowData:j,htmlText:l(De,u),htmlTextData:j,image:l(et),label:u,link:l(it),listItem:l(ot),listItemValue:_,listOrdered:l(ut,h),listUnordered:l(ut),paragraph:l(mt),reference:F,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(je),strong:l(Ze),thematicBreak:l(ue)},exit:{atxHeading:d(),atxHeadingSequence:N,autolink:d(),autolinkEmail:ne,autolinkProtocol:$,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:X,characterReference:q,codeFenced:d(v),codeFencedFence:w,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:d(b),codeText:d(K),codeTextData:O,data:O,definition:d(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:x,emphasis:d(),hardBreakEscape:d(V),hardBreakTrailing:d(V),htmlFlow:d(U),htmlFlowData:O,htmlText:d(W),htmlTextData:O,image:d(Z),label:B,labelText:ee,lineEnding:I,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Q,resourceDestinationString:L,resourceTitleString:z,resource:H,setextHeading:d(T),setextHeadingLineSequence:M,setextHeadingText:A,strong:d(),thematicBreak:d()}};C3(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(de){let xe={type:"root",children:[]};const _e={stack:[xe],tokenStack:[],config:e,enter:a,exit:f,buffer:u,resume:p,data:n},Te=[];let Oe=-1;for(;++Oe<de.length;)if(de[Oe][1].type==="listOrdered"||de[Oe][1].type==="listUnordered")if(de[Oe][0]==="enter")Te.push(Oe);else{const We=Te.pop();Oe=o(de,We,Oe)}for(Oe=-1;++Oe<de.length;){const We=e[de[Oe][0]];w3.call(We,de[Oe][1].type)&&We[de[Oe][1].type].call(Object.assign({sliceSerialize:de[Oe][2].sliceSerialize},_e),de[Oe][1])}if(_e.tokenStack.length>0){const We=_e.tokenStack[_e.tokenStack.length-1];(We[1]||sx).call(_e,void 0,We[0])}for(xe.position={start:Mo(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:Mo(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<e.transforms.length;)xe=e.transforms[Oe](xe)||xe;return xe}function o(de,xe,_e){let Te=xe-1,Oe=-1,We=!1,Fe,He,dt,ft;for(;++Te<=_e;){const ke=de[Te];switch(ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ke[0]==="enter"?Oe++:Oe--,ft=void 0;break}case"lineEndingBlank":{ke[0]==="enter"&&(Fe&&!ft&&!Oe&&!dt&&(dt=Te),ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ft=void 0}if(!Oe&&ke[0]==="enter"&&ke[1].type==="listItemPrefix"||Oe===-1&&ke[0]==="exit"&&(ke[1].type==="listUnordered"||ke[1].type==="listOrdered")){if(Fe){let Ue=Te;for(He=void 0;Ue--;){const ct=de[Ue];if(ct[1].type==="lineEnding"||ct[1].type==="lineEndingBlank"){if(ct[0]==="exit")continue;He&&(de[He][1].type="lineEndingBlank",We=!0),ct[1].type="lineEnding",He=Ue}else if(!(ct[1].type==="linePrefix"||ct[1].type==="blockQuotePrefix"||ct[1].type==="blockQuotePrefixWhitespace"||ct[1].type==="blockQuoteMarker"||ct[1].type==="listItemIndent"))break}dt&&(!He||dt<He)&&(Fe._spread=!0),Fe.end=Object.assign({},He?de[He][1].start:ke[1].end),de.splice(He||Te,0,["exit",Fe,ke[2]]),Te++,_e++}if(ke[1].type==="listItemPrefix"){const Ue={type:"listItem",_spread:!1,start:Object.assign({},ke[1].start),end:void 0};Fe=Ue,de.splice(Te,0,["enter",Ue,ke[2]]),Te++,_e++,dt=void 0,ft=!0}}}return de[xe][1]._spread=We,_e}function l(de,xe){return _e;function _e(Te){a.call(this,de(Te),Te),xe&&xe.call(this,Te)}}function u(){this.stack.push({type:"fragment",children:[]})}function a(de,xe,_e){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([xe,_e||void 0]),de.position={start:Mo(xe.start),end:void 0}}function d(de){return xe;function xe(_e){de&&de.call(this,_e),f.call(this,_e)}}function f(de,xe){const _e=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==de.type&&(xe?xe.call(this,de,Te[0]):(Te[1]||sx).call(this,de,Te[0]));else throw new Error("Cannot close `"+de.type+"` ("+Mu({start:de.start,end:de.end})+"): it’s not open");_e.position.end=Mo(de.end)}function p(){return dv(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function _(de){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function S(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=de}function C(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=de}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/(\r?\n|\r)$/g,"")}function y(de){const xe=this.resume(),_e=this.stack[this.stack.length-1];_e.label=xe,_e.identifier=wi(this.sliceSerialize(de)).toLowerCase()}function x(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function k(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function N(de){const xe=this.stack[this.stack.length-1];if(!xe.depth){const _e=this.sliceSerialize(de).length;xe.depth=_e}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(de){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function j(de){const _e=this.stack[this.stack.length-1].children;let Te=_e[_e.length-1];(!Te||Te.type!=="text")&&(Te=tt(),Te.position={start:Mo(de.start),end:void 0},_e.push(Te)),this.stack.push(Te)}function O(de){const xe=this.stack.pop();xe.value+=this.sliceSerialize(de),xe.position.end=Mo(de.end)}function I(de){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=xe.children[xe.children.length-1];_e.position.end=Mo(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(xe.type)&&(j.call(this,de),O.call(this,de))}function V(){this.data.atHardBreak=!0}function U(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function W(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function K(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function G(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Z(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function ee(de){const xe=this.sliceSerialize(de),_e=this.stack[this.stack.length-2];_e.label=HI(xe),_e.identifier=wi(xe).toLowerCase()}function B(){const de=this.stack[this.stack.length-1],xe=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Te=de.children;_e.children=Te}else _e.alt=xe}function L(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function z(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function Q(de){const xe=this.resume(),_e=this.stack[this.stack.length-1];_e.label=xe,_e.identifier=wi(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function te(de){this.data.characterReferenceType=de.type}function X(de){const xe=this.sliceSerialize(de),_e=this.data.characterReferenceType;let Te;_e?(Te=h3(xe,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=fv(xe);const Oe=this.stack[this.stack.length-1];Oe.value+=Te}function q(de){const xe=this.stack.pop();xe.position.end=Mo(de.end)}function $(de){O.call(this,de);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(de)}function ne(de){O.call(this,de);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(de)}function ie(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function je(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function De(){return{type:"html",value:""}}function et(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function ut(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function ot(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}function Mo(t){return{line:t.line,column:t.column,offset:t.offset}}function C3(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?C3(t,i):qI(t,i)}}function qI(t,e){let n;for(n in e)if(w3.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 sx(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Mu({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Mu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Mu({start:e.start,end:e.end})+") is still open")}function WI(t){const e=this;e.parser=n;function n(i){return $I(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function GI(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 KI(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
544
+ `}]}function YI(t,e){const n=e.value?e.value+`
545
+ `:"",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 XI(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function QI(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function ZI(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),o=Nc(i.toLowerCase()),l=t.footnoteOrder.indexOf(i);let u,a=t.footnoteCounts.get(i);a===void 0?(a=0,t.footnoteOrder.push(i),u=t.footnoteOrder.length):u=l+1,a+=1,t.footnoteCounts.set(i,a);const d={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(u)}]};t.patch(e,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return t.patch(e,f),t.applyData(e,f)}function JI(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 ez(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function k3(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 u=o[o.length-1];return u&&u.type==="text"?u.value+=i:o.push({type:"text",value:i}),o}function tz(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return k3(t,e);const o={src:Nc(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 nz(t,e){const n={src:Nc(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 rz(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 iz(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return k3(t,e);const o={href:Nc(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 sz(t,e){const n={href:Nc(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 oz(t,e,n){const i=t.all(e),o=n?az(n):E3(e),l={},u=[];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")&&u.push({type:"text",value:`
546
+ `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
547
+ `});const f={type:"element",tagName:"li",properties:l,children:u};return t.patch(e,f),t.applyData(e,f)}function az(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=E3(n[i])}return e}function E3(t){const e=t.spread;return e==null?t.children.length>1:e}function lz(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 u=i[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.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 cz(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function uz(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function dz(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function fz(t,e){const n=t.all(e),i=n.shift(),o=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=av(e.children[1]),d=s3(e.children[e.children.length-1]);a&&d&&(u.position={start:a,end:d}),o.push(u)}const l={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(e,l),t.applyData(e,l)}function hz(t,e,n){const i=n?n.children:void 0,l=(i?i.indexOf(e):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,a=u?u.length:e.children.length;let d=-1;const f=[];for(;++d<a;){const h=e.children[d],_={},S=u?u[d]:void 0;S&&(_.align=S);let C={type:"element",tagName:l,properties:_,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 pz(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const ox=9,ax=32;function mz(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),o=0;const l=[];for(;i;)l.push(lx(e.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(e);return l.push(lx(e.slice(o),o>0,!1)),l.join("")}function lx(t,e,n){let i=0,o=t.length;if(e){let l=t.codePointAt(i);for(;l===ox||l===ax;)i++,l=t.codePointAt(i)}if(n){let l=t.codePointAt(o-1);for(;l===ox||l===ax;)o--,l=t.codePointAt(o-1)}return o>i?t.slice(i,o):""}function gz(t,e){const n={type:"text",value:mz(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function vz(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const _z={blockquote:GI,break:KI,code:YI,delete:XI,emphasis:QI,footnoteReference:ZI,heading:JI,html:ez,imageReference:tz,image:nz,inlineCode:rz,linkReference:iz,link:sz,listItem:oz,list:lz,paragraph:cz,root:uz,strong:dz,table:fz,tableCell:pz,tableRow:hz,text:gz,thematicBreak:vz,toml:kf,yaml:kf,definition:kf,footnoteDefinition:kf};function kf(){}const A3=-1,Kh=0,Ou=1,th=2,pv=3,mv=4,gv=5,vv=6,R3=7,T3=8,cx=typeof self=="object"?self:globalThis,yz=(t,e)=>{const n=(o,l)=>(t.set(l,o),o),i=o=>{if(t.has(o))return t.get(o);const[l,u]=e[o];switch(l){case Kh:case A3:return n(u,o);case Ou:{const a=n([],o);for(const d of u)a.push(i(d));return a}case th:{const a=n({},o);for(const[d,f]of u)a[i(d)]=i(f);return a}case pv:return n(new Date(u),o);case mv:{const{source:a,flags:d}=u;return n(new RegExp(a,d),o)}case gv:{const a=n(new Map,o);for(const[d,f]of u)a.set(i(d),i(f));return a}case vv:{const a=n(new Set,o);for(const d of u)a.add(i(d));return a}case R3:{const{name:a,message:d}=u;return n(new cx[a](d),o)}case T3:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:a}=new Uint8Array(u);return n(new DataView(a),u)}}return n(new cx[l](u),o)};return i},ux=t=>yz(new Map,t)(0),Zl="",{toString:bz}={},{keys:xz}=Object,Cu=t=>{const e=typeof t;if(e!=="object"||!t)return[Kh,e];const n=bz.call(t).slice(8,-1);switch(n){case"Array":return[Ou,Zl];case"Object":return[th,Zl];case"Date":return[pv,Zl];case"RegExp":return[mv,Zl];case"Map":return[gv,Zl];case"Set":return[vv,Zl];case"DataView":return[Ou,n]}return n.includes("Array")?[Ou,n]:n.includes("Error")?[R3,n]:[th,n]},Ef=([t,e])=>t===Kh&&(e==="function"||e==="symbol"),Sz=(t,e,n,i)=>{const o=(u,a)=>{const d=i.push(u)-1;return n.set(a,d),d},l=u=>{if(n.has(u))return n.get(u);let[a,d]=Cu(u);switch(a){case Kh:{let p=u;switch(d){case"bigint":a=T3,p=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([A3],u)}return o([a,p],u)}case Ou:{if(d){let _=u;return d==="DataView"?_=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(_=new Uint8Array(u)),o([d,[..._]],u)}const p=[],h=o([a,p],u);for(const _ of u)p.push(l(_));return h}case th:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(e&&"toJSON"in u)return l(u.toJSON());const p=[],h=o([a,p],u);for(const _ of xz(u))(t||!Ef(Cu(u[_])))&&p.push([l(_),l(u[_])]);return h}case pv:return o([a,u.toISOString()],u);case mv:{const{source:p,flags:h}=u;return o([a,{source:p,flags:h}],u)}case gv:{const p=[],h=o([a,p],u);for(const[_,S]of u)(t||!(Ef(Cu(_))||Ef(Cu(S))))&&p.push([l(_),l(S)]);return h}case vv:{const p=[],h=o([a,p],u);for(const _ of u)(t||!Ef(Cu(_)))&&p.push(l(_));return h}}const{message:f}=u;return o([a,{name:d,message:f}],u)};return l},dx=(t,{json:e,lossy:n}={})=>{const i=[];return Sz(!(e||n),!!e,new Map,i)(t),i},nh=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?ux(dx(t,e)):structuredClone(t):(t,e)=>ux(dx(t,e));function wz(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 Cz(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function kz(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||wz,i=t.options.footnoteBackLabel||Cz,o=t.options.footnoteLabel||"Footnotes",l=t.options.footnoteLabelTagName||"h2",u=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let d=-1;for(;++d<t.footnoteOrder.length;){const f=t.footnoteById.get(t.footnoteOrder[d]);if(!f)continue;const p=t.all(f),h=String(f.identifier).toUpperCase(),_=Nc(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(d,S);typeof y=="string"&&(y={type:"text",value:y}),C.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+_+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,S),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...C)}else p.push(...C);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+_},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:{...nh(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
548
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
549
+ `}]}}const Yh=(function(t){if(t==null)return Tz;if(typeof t=="function")return Xh(t);if(typeof t=="object")return Array.isArray(t)?Ez(t):Az(t);if(typeof t=="string")return Rz(t);throw new Error("Expected function, string, or object as test")});function Ez(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Yh(t[n]);return Xh(i);function i(...o){let l=-1;for(;++l<e.length;)if(e[l].apply(this,o))return!0;return!1}}function Az(t){const e=t;return Xh(n);function n(i){const o=i;let l;for(l in t)if(o[l]!==e[l])return!1;return!0}}function Rz(t){return Xh(e);function e(n){return n&&n.type===t}}function Xh(t){return e;function e(n,i,o){return!!(Nz(n)&&t.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function Tz(){return!0}function Nz(t){return t!==null&&typeof t=="object"&&"type"in t}const N3=[],Dz=!0,n1=!1,Mz="skip";function D3(t,e,n,i){let o;typeof e=="function"&&typeof n!="function"?(i=n,n=e):o=e;const l=Yh(o),u=i?-1:1;a(t,void 0,[])();function a(d,f,p){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const S=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(d.type+(S?"<"+S+">":""))+")"})}return _;function _(){let S=N3,C,w,v;if((!e||l(d,f,p[p.length-1]||void 0))&&(S=jz(n(d,p)),S[0]===n1))return S;if("children"in d&&d.children){const b=d;if(b.children&&S[0]!==Mz)for(w=(i?b.children.length:-1)+u,v=p.concat(b);w>-1&&w<b.children.length;){const y=b.children[w];if(C=a(y,w,v)(),C[0]===n1)return C;w=typeof C[1]=="number"?C[1]:w+u}}return S}}}function jz(t){return Array.isArray(t)?t:typeof t=="number"?[Dz,t]:t==null?N3:[t]}function _v(t,e,n,i){let o,l,u;typeof e=="function"&&typeof n!="function"?(l=void 0,u=e,o=n):(l=e,u=n,o=i),D3(t,l,a,o);function a(d,f){const p=f[f.length-1],h=p?p.children.indexOf(d):void 0;return u(d,h,p)}}const r1={}.hasOwnProperty,Oz={};function Lz(t,e){const n=e||Oz,i=new Map,o=new Map,l=new Map,u={..._z,...n.handlers},a={all:f,applyData:zz,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:u,one:d,options:n,patch:Iz,wrap:Pz};return _v(t,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?i:o,_=String(p.identifier).toUpperCase();h.has(_)||h.set(_,p)}}),a;function d(p,h){const _=p.type,S=a.handlers[_];if(r1.call(a.handlers,_)&&S)return S(a,p,h);if(a.options.passThrough&&a.options.passThrough.includes(_)){if("children"in p){const{children:w,...v}=p,b=nh(v);return b.children=a.all(p),b}return nh(p)}return(a.options.unknownHandler||Bz)(a,p,h)}function f(p){const h=[];if("children"in p){const _=p.children;let S=-1;for(;++S<_.length;){const C=a.one(_[S],p);if(C){if(S&&_[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=fx(C.value)),!Array.isArray(C)&&C.type==="element")){const w=C.children[0];w&&w.type==="text"&&(w.value=fx(w.value))}Array.isArray(C)?h.push(...C):h.push(C)}}}return h}}function Iz(t,e){t.position&&(e.position=CL(t))}function zz(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 u="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:u}}n.type==="element"&&l&&Object.assign(n.properties,nh(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Bz(t,e){const n=e.data||{},i="value"in e&&!(r1.call(n,"hProperties")||r1.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 Pz(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
550
+ `});++i<t.length;)i&&n.push({type:"text",value:`
551
+ `}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
552
+ `}),n}function fx(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function hx(t,e){const n=Lz(t,e),i=n.one(t,void 0),o=kz(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
553
+ `},o),l}function Fz(t,e){return t&&"run"in t?async function(n,i){const o=hx(n,{file:i,...e});await t.run(o,i)}:function(n,i){return hx(n,{file:i,...t||e})}}function px(t){if(t)throw t}var pg,mx;function Hz(){if(mx)return pg;mx=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 _;for(_ in f);return typeof _>"u"||t.call(f,_)},u=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 pg=function d(){var f,p,h,_,S,C,w=arguments[0],v=1,b=arguments.length,y=!1;for(typeof w=="boolean"&&(y=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<b;++v)if(f=arguments[v],f!=null)for(p in f)h=a(w,p),_=a(f,p),w!==_&&(y&&_&&(l(_)||(S=o(_)))?(S?(S=!1,C=h&&o(h)?h:[]):C=h&&l(h)?h:{},u(w,{name:p,newValue:d(y,C,_)})):typeof _<"u"&&u(w,{name:p,newValue:_}));return w},pg}var Uz=Hz();const mg=sh(Uz);function i1(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 $z(){const t=[],e={run:n,use:i};return e;function n(...o){let l=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);a(null,...o);function a(d,...f){const p=t[++l];let h=-1;if(d){u(d);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,p?Vz(p,a)(...f):u(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 Vz(t,e){let n;return i;function i(...u){const a=t.length>u.length;let d;a&&u.push(o);try{d=t.apply(this,u)}catch(f){const p=f;if(a&&n)throw p;return o(p)}a||(d&&d.then&&typeof d.then=="function"?d.then(l,o):d instanceof Error?o(d):l(d))}function o(u,...a){n||(n=!0,e(u,...a))}function l(u){o(null,u)}}const Wi={basename:qz,dirname:Wz,extname:Gz,join:Kz,sep:"/"};function qz(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');pd(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 u=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else u<0&&(l=!0,u=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(i=o):(a=-1,i=u));return n===i?i=u:i<0&&(i=t.length),t.slice(n,i)}function Wz(t){if(pd(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 Gz(t){pd(t);let e=t.length,n=-1,i=0,o=-1,l=0,u;for(;e--;){const a=t.codePointAt(e);if(a===47){if(u){i=e+1;break}continue}n<0&&(u=!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 Kz(...t){let e=-1,n;for(;++e<t.length;)pd(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":Yz(n)}function Yz(t){pd(t);const e=t.codePointAt(0)===47;let n=Xz(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Xz(t,e){let n="",i=0,o=-1,l=0,u=-1,a,d;for(;++u<=t.length;){if(u<t.length)a=t.codePointAt(u);else{if(a===47)break;a=47}if(a===47){if(!(o===u-1||l===1))if(o!==u-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(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=u,l=0;continue}}else if(n.length>0){n="",i=0,o=u,l=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(o+1,u):n=t.slice(o+1,u),i=u-o-1;o=u,l=0}else a===46&&l>-1?l++:l=-1}return n}function pd(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Qz={cwd:Zz};function Zz(){return"/"}function s1(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jz(t){if(typeof t=="string")t=new URL(t);else if(!s1(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 eB(t)}function eB(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 gg=["history","path","basename","stem","extname","dirname"];class M3{constructor(e){let n;e?s1(e)?n={path:e}:typeof e=="string"||tB(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Qz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<gg.length;){const l=gg[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)gg.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wi.basename(this.path):void 0}set basename(e){_g(e,"basename"),vg(e,"basename"),this.path=Wi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Wi.dirname(this.path):void 0}set dirname(e){gx(this.basename,"dirname"),this.path=Wi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Wi.extname(this.path):void 0}set extname(e){if(vg(e,"extname"),gx(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=Wi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){s1(e)&&(e=Jz(e)),_g(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Wi.basename(this.path,this.extname):void 0}set stem(e){_g(e,"stem"),vg(e,"stem"),this.path=Wi.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 Yn(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 vg(t,e){if(t&&t.includes(Wi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Wi.sep+"`")}function _g(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function gx(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function tB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const nB=(function(t){const i=this.constructor.prototype,o=i[t],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),rB={}.hasOwnProperty;class yv extends nB{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=$z()}copy(){const e=new yv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(mg(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(xg("data",this.frozen),this.namespace[e]=n,this):rB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xg("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=Af(e),i=this.parser||this.Parser;return yg("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),yg("process",this.parser||this.Parser),bg("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,u){const a=Af(e),d=i.parse(a);i.run(d,a,function(p,h,_){if(p||!h||!_)return f(p);const S=h,C=i.stringify(S,_);oB(C)?_.value=C:_.result=C,f(p,_)});function f(p,h){p||!h?u(p):l?l(h):n(void 0,h)}}}processSync(e){let n=!1,i;return this.freeze(),yg("processSync",this.parser||this.Parser),bg("processSync",this.compiler||this.Compiler),this.process(e,o),_x("processSync","process",n),i;function o(l,u){n=!0,px(l),i=u}}run(e,n,i){vx(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(u,a){const d=Af(n);o.run(e,d,f);function f(p,h,_){const S=h||e;p?a(p):u?u(S):i(void 0,S,_)}}}runSync(e,n){let i=!1,o;return this.run(e,n,l),_x("runSync","run",i),o;function l(u,a){px(u),o=a,i=!0}}stringify(e,n){this.freeze();const i=Af(n),o=this.compiler||this.Compiler;return bg("stringify",o),vx(e),o(e,i)}use(e,...n){const i=this.attachers,o=this.namespace;if(xg("use",this.frozen),e!=null)if(typeof e=="function")d(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):u(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function l(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;d(p,h)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(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=mg(!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 d(f,p){let h=-1,_=-1;for(;++h<i.length;)if(i[h][0]===f){_=h;break}if(_===-1)i.push([f,...p]);else if(p.length>0){let[S,...C]=p;const w=i[_][1];i1(w)&&i1(S)&&(S=mg(!0,w,S)),i[_]=[f,S,...C]}}}}const iB=new yv().freeze();function yg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function bg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function xg(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 vx(t){if(!i1(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function _x(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Af(t){return sB(t)?t:new M3(t)}function sB(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function oB(t){return typeof t=="string"||aB(t)}function aB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yx=[],bx={allowDangerousHtml:!0},cB=/^(https?|ircs?|mailto|xmpp)$/i,uB=[{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 dB(t){const e=fB(t),n=hB(t);return pB(e.runSync(e.parse(n),n),t)}function fB(t){const e=t.rehypePlugins||yx,n=t.remarkPlugins||yx,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...bx}:bx;return iB().use(WI).use(n).use(Fz,i).use(e)}function hB(t){const e=t.children||"",n=new M3;return typeof e=="string"&&(n.value=e),n}function pB(t,e){const n=e.allowedElements,i=e.allowElement,o=e.components,l=e.disallowedElements,u=e.skipHtml,a=e.unwrapDisallowed,d=e.urlTransform||mB;for(const p of uB)Object.hasOwn(e,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+lB+p.id,void 0);return _v(t,f),TL(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(p,h,_){if(p.type==="raw"&&_&&typeof h=="number")return u?_.children.splice(h,1):_.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let S;for(S in dg)if(Object.hasOwn(dg,S)&&Object.hasOwn(p.properties,S)){const C=p.properties[S],w=dg[S];(w===null||w.includes(p.tagName))&&(p.properties[S]=d(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,_)),S&&_&&typeof h=="number")return a&&p.children?_.children.splice(h,1,...p.children):_.children.splice(h,1),h}}}function mB(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||cB.test(t.slice(0,e))?t:""}function xx(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 gB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vB(t,e,n){const o=Yh((n||{}).ignore||[]),l=_B(e);let u=-1;for(;++u<l.length;)D3(t,"text",a);function a(f,p){let h=-1,_;for(;++h<p.length;){const S=p[h],C=_?_.children:void 0;if(o(S,C?C.indexOf(S):void 0,_))return;_=S}if(_)return d(f,p)}function d(f,p){const h=p[p.length-1],_=l[u][0],S=l[u][1];let C=0;const v=h.children.indexOf(f);let b=!1,y=[];_.lastIndex=0;let x=_.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?_.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),!_.global)break;x=_.exec(f.value)}return b?(C<f.value.length&&y.push({type:"text",value:f.value.slice(C)}),h.children.splice(v,1,...y)):y=[f],v+y.length}}function _B(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([yB(o[0]),bB(o[1])])}return e}function yB(t){return typeof t=="string"?new RegExp(gB(t),"g"):t}function bB(t){return typeof t=="function"?t:function(){return t}}const Sg="phrasing",wg=["autolink","link","image","label"];function xB(){return{transforms:[RB],enter:{literalAutolink:wB,literalAutolinkEmail:Cg,literalAutolinkHttp:Cg,literalAutolinkWww:Cg},exit:{literalAutolink:AB,literalAutolinkEmail:EB,literalAutolinkHttp:CB,literalAutolinkWww:kB}}}function SB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sg,notInConstruct:wg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sg,notInConstruct:wg},{character:":",before:"[ps]",after:"\\/",inConstruct:Sg,notInConstruct:wg}]}}function wB(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Cg(t){this.config.enter.autolinkProtocol.call(this,t)}function CB(t){this.config.exit.autolinkProtocol.call(this,t)}function kB(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 EB(t){this.config.exit.autolinkEmail.call(this,t)}function AB(t){this.exit(t)}function RB(t){vB(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),NB]],{ignore:["link","linkReference"]})}function TB(t,e,n,i,o){let l="";if(!j3(o)||(/^w/i.test(e)&&(n=e+n,e="",l="http://"),!DB(n)))return!1;const u=MB(n+i);if(!u[0])return!1;const a={type:"link",title:null,url:l+e+u[0],children:[{type:"text",value:e+u[0]}]};return u[1]?[a,{type:"text",value:u[1]}]:a}function NB(t,e,n,i){return!j3(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function DB(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 MB(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=xx(t,"(");let l=xx(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 j3(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ua(n)||Wh(n))&&(!e||n!==47)}O3.peek=HB;function jB(){this.buffer()}function OB(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function LB(){this.buffer()}function IB(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function zB(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(t)).toLowerCase(),n.label=e}function BB(t){this.exit(t)}function PB(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(t)).toLowerCase(),n.label=e}function FB(t){this.exit(t)}function HB(){return"["}function O3(t,e,n,i){const o=n.createTracker(i);let l=o.move("[^");const u=n.enter("footnoteReference"),a=n.enter("reference");return l+=o.move(n.safe(n.associationId(t),{after:"]",before:l})),a(),u(),l+=o.move("]"),l}function UB(){return{enter:{gfmFootnoteCallString:jB,gfmFootnoteCall:OB,gfmFootnoteDefinitionLabelString:LB,gfmFootnoteDefinition:IB},exit:{gfmFootnoteCallString:zB,gfmFootnoteCall:BB,gfmFootnoteDefinitionLabelString:PB,gfmFootnoteDefinition:FB}}}function $B(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:O3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,u){const a=l.createTracker(u);let d=a.move("[^");const f=l.enter("footnoteDefinition"),p=l.enter("label");return d+=a.move(l.safe(l.associationId(i),{before:d,after:"]"})),p(),d+=a.move("]:"),i.children&&i.children.length>0&&(a.shift(4),d+=a.move((e?`
554
+ `:" ")+l.indentLines(l.containerFlow(i,a.current()),e?L3:VB))),f(),d}}function VB(t,e,n){return e===0?t:L3(t,e,n)}function L3(t,e,n){return(n?"":" ")+t}const qB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];I3.peek=XB;function WB(){return{canContainEols:["delete"],enter:{strikethrough:KB},exit:{strikethrough:YB}}}function GB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qB}],handlers:{delete:I3}}}function KB(t){this.enter({type:"delete",children:[]},t)}function YB(t){this.exit(t)}function I3(t,e,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(t,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),l(),u}function XB(){return"~"}function QB(t){return t.length}function ZB(t,e){const n=e||{},i=(n.align||[]).concat(),o=n.stringLength||QB,l=[],u=[],a=[],d=[];let f=0,p=-1;for(;++p<t.length;){const w=[],v=[];let b=-1;for(t[p].length>f&&(f=t[p].length);++b<t[p].length;){const y=JB(t[p][b]);if(n.alignDelimiters!==!1){const x=o(y);v[b]=x,(d[b]===void 0||x>d[b])&&(d[b]=x)}w.push(y)}u[p]=w,a[p]=v}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<f;)l[h]=Sx(i[h]);else{const w=Sx(i);for(;++h<f;)l[h]=w}h=-1;const _=[],S=[];for(;++h<f;){const w=l[h];let v="",b="";w===99?(v=":",b=":"):w===108?v=":":w===114&&(b=":");let y=n.alignDelimiters===!1?1:Math.max(1,d[h]-v.length-b.length);const x=v+"-".repeat(y)+b;n.alignDelimiters!==!1&&(y=v.length+y+b.length,y>d[h]&&(d[h]=y),S[h]=y),_[h]=x}u.splice(1,0,_),a.splice(1,0,S),p=-1;const C=[];for(;++p<u.length;){const w=u[p],v=a[p];h=-1;const b=[];for(;++h<f;){const y=w[h]||"";let x="",k="";if(n.alignDelimiters!==!1){const N=d[h]-(v[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(`
555
+ `)}function JB(t){return t==null?"":String(t)}function Sx(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 eP(t,e,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const u=n.indentLines(n.containerFlow(t,l.current()),tP);return o(),u}function tP(t,e,n){return">"+(n?"":" ")+t}function nP(t,e){return wx(t,e.inConstruct,!0)&&!wx(t,e.notInConstruct,!1)}function wx(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 Cx(t,e,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
556
+ `&&nP(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
557
+ `}function rP(t,e){const n=String(t);let i=n.indexOf(e),o=i,l=0,u=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>u&&(u=l):l=1,o=i+e.length,i=n.indexOf(e,o);return u}function iP(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 sP(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 oP(t,e,n,i){const o=sP(n),l=t.value||"",u=o==="`"?"GraveAccent":"Tilde";if(iP(t,n)){const h=n.enter("codeIndented"),_=n.indentLines(l,aP);return h(),_}const a=n.createTracker(i),d=o.repeat(Math.max(rP(l,o)+1,3)),f=n.enter("codeFenced");let p=a.move(d);if(t.lang){const h=n.enter(`codeFencedLang${u}`);p+=a.move(n.safe(t.lang,{before:p,after:" ",encode:["`"],...a.current()})),h()}if(t.lang&&t.meta){const h=n.enter(`codeFencedMeta${u}`);p+=a.move(" "),p+=a.move(n.safe(t.meta,{before:p,after:`
558
+ `,encode:["`"],...a.current()})),h()}return p+=a.move(`
559
+ `),l&&(p+=a.move(l+`
560
+ `)),p+=a.move(d),f(),p}function aP(t,e,n){return(n?"":" ")+t}function bv(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 lP(t,e,n,i){const o=bv(n),l=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let a=n.enter("label");const d=n.createTracker(i);let f=d.move("[");return f+=d.move(n.safe(n.associationId(t),{before:f,after:"]",...d.current()})),f+=d.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(a=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":`
561
+ `,...d.current()}))),a(),t.title&&(a=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),a()),u(),f}function cP(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 Gu(t){return"&#x"+t.toString(16).toUpperCase()+";"}function rh(t,e,n){const i=hc(t),o=hc(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}}z3.peek=uP;function z3(t,e,n,i){const o=cP(n),l=n.enter("emphasis"),u=n.createTracker(i),a=u.move(o);let d=u.move(n.containerPhrasing(t,{after:o,before:a,...u.current()}));const f=d.charCodeAt(0),p=rh(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(d=Gu(f)+d.slice(1));const h=d.charCodeAt(d.length-1),_=rh(i.after.charCodeAt(0),h,o);_.inside&&(d=d.slice(0,-1)+Gu(h));const S=u.move(o);return l(),n.attentionEncodeSurroundingInfo={after:_.outside,before:p.outside},a+d+S}function uP(t,e,n){return n.options.emphasis||"*"}function dP(t,e){let n=!1;return _v(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,n1}),!!((!t.depth||t.depth<3)&&dv(t)&&(e.options.setext||n))}function fP(t,e,n,i){const o=Math.max(Math.min(6,t.depth||1),1),l=n.createTracker(i);if(dP(t,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),_=n.containerPhrasing(t,{...l.current(),before:`
562
+ `,after:`
563
+ `});return h(),p(),_+`
564
+ `+(o===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
565
+ `))+1))}const u="#".repeat(o),a=n.enter("headingAtx"),d=n.enter("phrasing");l.move(u+" ");let f=n.containerPhrasing(t,{before:"# ",after:`
566
+ `,...l.current()});return/^[\t ]/.test(f)&&(f=Gu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),a(),f}B3.peek=hP;function B3(t){return t.value||""}function hP(){return"<"}P3.peek=pP;function P3(t,e,n,i){const o=bv(n),l=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let a=n.enter("label");const d=n.createTracker(i);let f=d.move("![");return f+=d.move(n.safe(t.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(a=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":")",...d.current()}))),a(),t.title&&(a=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),a()),f+=d.move(")"),u(),f}function pP(){return"!"}F3.peek=mP;function F3(t,e,n,i){const o=t.referenceType,l=n.enter("imageReference");let u=n.enter("label");const a=n.createTracker(i);let d=a.move("![");const f=n.safe(t.alt,{before:d,after:"]",...a.current()});d+=a.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(t),{before:d,after:"]",...a.current()});return u(),n.stack=p,l(),o==="full"||!f||f!==h?d+=a.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=a.move("]"),d}function mP(){return"!"}H3.peek=gP;function H3(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 u=n.unsafe[l],a=n.compilePattern(u);let d;if(u.atBreak)for(;d=a.exec(i);){let f=d.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(d.index+1)}}return o+i+o}function gP(){return"`"}function U3(t,e){const n=dv(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))}$3.peek=vP;function $3(t,e,n,i){const o=bv(n),l=o==='"'?"Quote":"Apostrophe",u=n.createTracker(i);let a,d;if(U3(t,n)){const p=n.stack;n.stack=[],a=n.enter("autolink");let h=u.move("<");return h+=u.move(n.containerPhrasing(t,{before:h,after:">",...u.current()})),h+=u.move(">"),a(),n.stack=p,h}a=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(t,{before:f,after:"](",...u.current()})),f+=u.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":")",...u.current()}))),d(),t.title&&(d=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),d()),f+=u.move(")"),a(),f}function vP(t,e,n){return U3(t,n)?"<":"["}V3.peek=_P;function V3(t,e,n,i){const o=t.referenceType,l=n.enter("linkReference");let u=n.enter("label");const a=n.createTracker(i);let d=a.move("[");const f=n.containerPhrasing(t,{before:d,after:"]",...a.current()});d+=a.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(t),{before:d,after:"]",...a.current()});return u(),n.stack=p,l(),o==="full"||!f||f!==h?d+=a.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=a.move("]"),d}function _P(){return"["}function xv(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 yP(t){const e=xv(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 bP(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 q3(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 xP(t,e,n,i){const o=n.enter("list"),l=n.bulletCurrent;let u=t.ordered?bP(n):xv(n);const a=t.ordered?u==="."?")":".":yP(n);let d=e&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!t.ordered){const p=t.children?t.children[0]:void 0;if((u==="*"||u==="-")&&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&&(d=!0),q3(n)===u&&p){let h=-1;for(;++h<t.children.length;){const _=t.children[h];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=a),n.bulletCurrent=u;const f=n.containerFlow(t,i);return n.bulletLastUsed=u,n.bulletCurrent=l,o(),f}function SP(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 wP(t,e,n,i){const o=SP(n);let l=n.bulletCurrent||xv(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 u=l.length+1;(o==="tab"||o==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(u=Math.ceil(u/4)*4);const a=n.createTracker(i);a.move(l+" ".repeat(u-l.length)),a.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(t,a.current()),p);return d(),f;function p(h,_,S){return _?(S?"":" ".repeat(u))+h:(S?l:l+" ".repeat(u-l.length))+h}}function CP(t,e,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),u=n.containerPhrasing(t,i);return l(),o(),u}const kP=Yh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function EP(t,e,n,i){return(t.children.some(function(u){return kP(u)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function AP(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}W3.peek=RP;function W3(t,e,n,i){const o=AP(n),l=n.enter("strong"),u=n.createTracker(i),a=u.move(o+o);let d=u.move(n.containerPhrasing(t,{after:o,before:a,...u.current()}));const f=d.charCodeAt(0),p=rh(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(d=Gu(f)+d.slice(1));const h=d.charCodeAt(d.length-1),_=rh(i.after.charCodeAt(0),h,o);_.inside&&(d=d.slice(0,-1)+Gu(h));const S=u.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:_.outside,before:p.outside},a+d+S}function RP(t,e,n){return n.options.strong||"*"}function TP(t,e,n,i){return n.safe(t.value,i)}function NP(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 DP(t,e,n){const i=(q3(n)+(n.options.ruleSpaces?" ":"")).repeat(NP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const G3={blockquote:eP,break:Cx,code:oP,definition:lP,emphasis:z3,hardBreak:Cx,heading:fP,html:B3,image:P3,imageReference:F3,inlineCode:H3,link:$3,linkReference:V3,list:xP,listItem:wP,paragraph:CP,root:EP,strong:W3,text:TP,thematicBreak:DP};function MP(){return{enter:{table:jP,tableData:kx,tableHeader:kx,tableRow:LP},exit:{codeText:IP,table:OP,tableData:kg,tableHeader:kg,tableRow:kg}}}function jP(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 OP(t){this.exit(t),this.data.inTable=void 0}function LP(t){this.enter({type:"tableRow",children:[]},t)}function kg(t){this.exit(t)}function kx(t){this.enter({type:"tableCell",children:[]},t)}function IP(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,zP));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function zP(t,e){return e==="|"?e:t}function BP(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,o=e.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
567
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:u,tableCell:d,tableRow:a}};function u(S,C,w,v){return f(p(S,w,v),S.align)}function a(S,C,w,v){const b=h(S,w,v),y=f([b]);return y.slice(0,y.indexOf(`
568
+ `))}function d(S,C,w,v){const b=w.enter("tableCell"),y=w.enter("phrasing"),x=w.containerPhrasing(S,{...v,before:l,after:l});return y(),b(),x}function f(S,C){return ZB(S,{align:C,alignDelimiters:i,padding:n,stringLength:o})}function p(S,C,w){const v=S.children;let b=-1;const y=[],x=C.enter("table");for(;++b<v.length;)y[b]=h(v[b],C,w);return x(),y}function h(S,C,w){const v=S.children;let b=-1;const y=[],x=C.enter("tableRow");for(;++b<v.length;)y[b]=d(v[b],S,C,w);return x(),y}function _(S,C,w){let v=G3.inlineCode(S,C,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function PP(){return{exit:{taskListCheckValueChecked:Ex,taskListCheckValueUnchecked:Ex,paragraph:HP}}}function FP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UP}}}function Ex(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function HP(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,u;for(;++l<o.length;){const a=o[l];if(a.type==="paragraph"){u=a;break}}u===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 UP(t,e,n,i){const o=t.children[0],l=typeof t.checked=="boolean"&&o&&o.type==="paragraph",u="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);l&&a.move(u);let d=G3.listItem(t,e,n,{...i,...a.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function $P(){return[xB(),UB(),WB(),MP(),PP()]}function VP(t){return{extensions:[SB(),$B(t),GB(),BP(t),FP()]}}const qP={tokenize:QP,partial:!0},K3={tokenize:ZP,partial:!0},Y3={tokenize:JP,partial:!0},X3={tokenize:eF,partial:!0},WP={tokenize:tF,partial:!0},Q3={name:"wwwAutolink",tokenize:YP,previous:J3},Z3={name:"protocolAutolink",tokenize:XP,previous:ek},Ps={name:"emailAutolink",tokenize:KP,previous:tk},es={};function GP(){return{text:es}}let ja=48;for(;ja<123;)es[ja]=Ps,ja++,ja===58?ja=65:ja===91&&(ja=97);es[43]=Ps;es[45]=Ps;es[46]=Ps;es[95]=Ps;es[72]=[Ps,Z3];es[104]=[Ps,Z3];es[87]=[Ps,Q3];es[119]=[Ps,Q3];function KP(t,e,n){const i=this;let o,l;return u;function u(h){return!o1(h)||!tk.call(i,i.previous)||Sv(i.events)?n(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(h))}function a(h){return o1(h)?(t.consume(h),a):h===64?(t.consume(h),d):n(h)}function d(h){return h===46?t.check(WP,p,f)(h):h===45||h===95||Kn(h)?(l=!0,t.consume(h),d):p(h)}function f(h){return t.consume(h),o=!0,d}function p(h){return l&&o&&nr(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):n(h)}}function YP(t,e,n){const i=this;return o;function o(u){return u!==87&&u!==119||!J3.call(i,i.previous)||Sv(i.events)?n(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(qP,t.attempt(K3,t.attempt(Y3,l),n),n)(u))}function l(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(u)}}function XP(t,e,n){const i=this;let o="",l=!1;return u;function u(h){return(h===72||h===104)&&ek.call(i,i.previous)&&!Sv(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),t.consume(h),a):n(h)}function a(h){if(nr(h)&&o.length<5)return o+=String.fromCodePoint(h),t.consume(h),a;if(h===58){const _=o.toLowerCase();if(_==="http"||_==="https")return t.consume(h),d}return n(h)}function d(h){return h===47?(t.consume(h),l?f:(l=!0,d)):n(h)}function f(h){return h===null||eh(h)||Vt(h)||Ua(h)||Wh(h)?n(h):t.attempt(K3,t.attempt(Y3,p),n)(h)}function p(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function QP(t,e,n){let i=0;return o;function o(u){return(u===87||u===119)&&i<3?(i++,t.consume(u),o):u===46&&i===3?(t.consume(u),l):n(u)}function l(u){return u===null?n(u):e(u)}}function ZP(t,e,n){let i,o,l;return u;function u(f){return f===46||f===95?t.check(X3,d,a)(f):f===null||Vt(f)||Ua(f)||f!==45&&Wh(f)?d(f):(l=!0,t.consume(f),u)}function a(f){return f===95?i=!0:(o=i,i=void 0),t.consume(f),u}function d(f){return o||i||!l?n(f):e(f)}}function JP(t,e){let n=0,i=0;return o;function o(u){return u===40?(n++,t.consume(u),o):u===41&&i<n?l(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?t.check(X3,e,l)(u):u===null||Vt(u)||Ua(u)?e(u):(t.consume(u),o)}function l(u){return u===41&&i++,t.consume(u),o}}function eF(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||Vt(a)||Ua(a)?e(a):n(a)}function o(a){return a===null||a===40||a===91||Vt(a)||Ua(a)?e(a):i(a)}function l(a){return nr(a)?u(a):n(a)}function u(a){return a===59?(t.consume(a),i):nr(a)?(t.consume(a),u):n(a)}}function tF(t,e,n){return i;function i(l){return t.consume(l),o}function o(l){return Kn(l)?n(l):e(l)}}function J3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Vt(t)}function ek(t){return!nr(t)}function tk(t){return!(t===47||o1(t))}function o1(t){return t===43||t===45||t===46||t===95||Kn(t)}function Sv(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 nF={tokenize:uF,partial:!0};function rF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:aF,continuation:{tokenize:lF},exit:cF}},text:{91:{name:"gfmFootnoteCall",tokenize:oF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iF,resolveTo:sF}}}}function iF(t,e,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;o--;){const d=i.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return a;function a(d){if(!u||!u._balanced)return n(d);const f=wi(i.sliceSerialize({start:u.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(d):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),e(d))}}function sF(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)},u={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",u,e],["exit",u,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 oF(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,u;return a;function a(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),d}function d(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&&!u||h===null||h===91||Vt(h))return n(h);if(h===93){t.exit("chunkString");const _=t.exit("gfmFootnoteCallString");return o.includes(wi(i.sliceSerialize(_)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return Vt(h)||(u=!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 aF(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,u=0,a;return d;function d(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(u>999||C===93&&!a||C===null||C===91||Vt(C))return n(C);if(C===93){t.exit("chunkString");const w=t.exit("gfmFootnoteDefinitionLabelString");return l=wi(i.sliceSerialize(w)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),_}return Vt(C)||(a=!0),u++,t.consume(C),C===92?h:p}function h(C){return C===91||C===92||C===93?(t.consume(C),u++,p):p(C)}function _(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),o.includes(l)||o.push(l),Nt(t,S,"gfmFootnoteDefinitionWhitespace")):n(C)}function S(C){return e(C)}}function lF(t,e,n){return t.check(hd,e,t.attempt(nF,e,n))}function cF(t){t.exit("gfmFootnoteDefinition")}function uF(t,e,n){const i=this;return Nt(t,o,"gfmFootnoteDefinitionIndent",5);function o(l){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?e(l):n(l)}}function dF(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(u,a){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},h={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},_=[["enter",p,a],["enter",u[f][1],a],["exit",u[f][1],a],["enter",h,a]],S=a.parser.constructs.insideSpan.null;S&&Hr(_,_.length,0,Gh(S,u.slice(f+1,d),a)),Hr(_,_.length,0,[["exit",h,a],["enter",u[d][1],a],["exit",u[d][1],a],["exit",p,a]]),Hr(u,f-1,d-f+3,_),d=f+_.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function l(u,a,d){const f=this.previous,p=this.events;let h=0;return _;function _(C){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(C):(u.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const w=hc(f);if(C===126)return h>1?d(C):(u.consume(C),h++,S);if(h<2&&!n)return d(C);const v=u.exit("strikethroughSequenceTemporary"),b=hc(C);return v._open=!b||b===2&&!!w,v._close=!w||w===2&&!!b,a(C)}}}class fF{constructor(){this.map=[]}add(e,n,i){hF(this,e,n,i)}consume(e){if(this.map.sort(function(l,u){return l[0]-u[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 hF(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 pF(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 mF(){return{flow:{null:{name:"table",tokenize:gF,resolveAll:vF}}}}function gF(t,e,n){const i=this;let o=0,l=0,u;return a;function a(O){let I=i.events.length-1;for(;I>-1;){const W=i.events[I][1].type;if(W==="lineEnding"||W==="linePrefix")I--;else break}const V=I>-1?i.events[I][1].type:null,U=V==="tableHead"||V==="tableRow"?A:d;return U===A&&i.parser.lazy[i.now().line]?n(O):U(O)}function d(O){return t.enter("tableHead"),t.enter("tableRow"),f(O)}function f(O){return O===124||(u=!0,l+=1),p(O)}function p(O){return O===null?n(O):st(O)?l>1?(l=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):n(O):kt(O)?Nt(t,p,"whitespace")(O):(l+=1,u&&(u=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),u=!0,p):(t.enter("data"),h(O)))}function h(O){return O===null||O===124||Vt(O)?(t.exit("data"),p(O)):(t.consume(O),O===92?_:h)}function _(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"),u=!1,kt(O)?Nt(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?v(O):O===124?(u=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),w):N(O)}function w(O){return kt(O)?Nt(t,v,"whitespace")(O):v(O)}function v(O){return O===58?(l+=1,u=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),b):O===45?(l+=1,b(O)):O===null||st(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?(u=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),x):(t.exit("tableDelimiterFiller"),x(O))}function x(O){return kt(O)?Nt(t,k,"whitespace")(O):k(O)}function k(O){return O===124?C(O):O===null||st(O)?!u||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||st(O)?(t.exit("tableRow"),e(O)):kt(O)?Nt(t,M,"whitespace")(O):(t.enter("data"),T(O))}function T(O){return O===null||O===124||Vt(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 vF(t,e){let n=-1,i=!0,o=0,l=[0,0,0,0],u=[0,0,0,0],a=!1,d=0,f,p,h;const _=new fF;for(;++n<t.length;){const S=t[n],C=S[1];S[0]==="enter"?C.type==="tableHead"?(a=!1,d!==0&&(Ax(_,e,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},_.add(n,0,[["enter",f,e]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,h=void 0,l=[0,0,0,0],u=[0,n+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},_.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,u[2]===0&&(l[1]!==0&&(u[0]=u[1],h=Rf(_,e,l,o,void 0,h),l=[0,0,0,0]),u[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(u[0]=u[1],h=Rf(_,e,l,o,void 0,h)),l=u,u=[l[1],n,0,0])):C.type==="tableHead"?(a=!0,d=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(d=n,l[1]!==0?(u[0]=u[1],h=Rf(_,e,l,o,n,h)):u[1]!==0&&(h=Rf(_,e,u,o,n,h)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Ax(_,e,d,f,p),_.consume(e.events),n=-1;++n<e.events.length;){const S=e.events[n];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=pF(e.events,n))}return t}function Rf(t,e,n,i,o,l){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(l.end=Object.assign({},tc(e.events,n[0])),t.add(n[0],0,[["exit",l,e]]));const d=tc(e.events,n[1]);if(l={type:u,start:Object.assign({},d),end:Object.assign({},d)},t.add(n[1],0,[["enter",l,e]]),n[2]!==0){const f=tc(e.events,n[2]),p=tc(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 _=e.events[n[2]],S=e.events[n[3]];if(_[1].end=Object.assign({},S[1].end),_[1].type="chunkText",_[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({},tc(e.events,o)),t.add(o,0,[["exit",l,e]]),l=void 0),l}function Ax(t,e,n,i,o){const l=[],u=tc(e.events,n);o&&(o.end=Object.assign({},u),l.push(["exit",o,e])),i.end=Object.assign({},u),l.push(["exit",i,e]),t.add(n+1,0,l)}function tc(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const _F={name:"tasklistCheck",tokenize:bF};function yF(){return{text:{91:_F}}}function bF(t,e,n){const i=this;return o;function o(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),l)}function l(d){return Vt(d)?(t.enter("taskListCheckValueUnchecked"),t.consume(d),t.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(t.enter("taskListCheckValueChecked"),t.consume(d),t.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(d)}function a(d){return st(d)?e(d):kt(d)?t.check({tokenize:xF},e,n)(d):n(d)}}function xF(t,e,n){return Nt(t,i,"whitespace");function i(o){return o===null?n(o):e(o)}}function SF(t){return f3([GP(),rF(),dF(t),mF(),yF()])}const wF={};function CF(t){const e=this,n=t||wF,i=e.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(SF(n)),l.push($P()),u.push(VP(n))}const kF=D.memo(function(e){const n=ge.c(11),{children:i,className:o,inverted:l}=e,u=l===void 0?!1:l;let a;n[0]!==u?(a={code(S){const{className:C,children:w,...v}=S,b=/language-(\w+)/.exec(C||""),y=b?b[1]:"",x=!y,k=Array.isArray(w)?w.join(""):String(w);return!x&&y?g.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:g.jsx(iv,{theme:u?qu.nightOwl:qu.oneDark,code:k.trim(),language:y,children:EF})}):g.jsx("code",{className:Ee("px-1.5 py-0.5 rounded text-sm font-mono",u?"bg-primary-foreground/20 text-primary-foreground":"bg-muted",C),...v,children:w})},a(S){const{href:C,children:w,...v}=S;return g.jsx("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:Ee("underline underline-offset-2 transition-colors",u?"text-primary-foreground/80 hover:text-primary-foreground":"text-primary hover:text-primary/80"),...v,children:w})},p(S){const{children:C}=S;return g.jsx("p",{className:"last:mb-0 leading-relaxed wrap-break-words",children:C})},ul(S){const{children:C}=S;return g.jsx("ul",{className:"list-outside list-disc pl-8",children:C})},ol(S){const{children:C}=S;return g.jsx("ol",{className:"list-outside list-decimal pl-8",children:C})},li(S){const{children:C,className:w}=S,v=w==null?void 0:w.includes("nested");return g.jsx("li",{className:Ee("leading-snug",v&&"ml-8"),children:C})},h1(S){const{children:C}=S;return g.jsx("h1",{className:"text-lg font-semibold mb-1.5 mt-3 first:mt-0",children:C})},h2(S){const{children:C}=S;return g.jsx("h2",{className:"text-base font-semibold mb-1.5 mt-2.5 first:mt-0",children:C})},h3(S){const{children:C}=S;return g.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:C})},blockquote(S){const{children:C}=S;return g.jsx("blockquote",{className:Ee("border-l-2 pl-3 my-1.5 italic",u?"border-primary-foreground/40 text-primary-foreground/70":"border-muted-foreground/40 text-muted-foreground"),children:C})},strong(S){const{children:C}=S;return g.jsx("strong",{className:Ee("font-semibold",u&&"text-primary-foreground"),children:C})},em(S){const{children:C}=S;return g.jsx("em",{className:"italic",children:C})},hr(){return g.jsx("hr",{className:Ee("my-3",u?"border-primary-foreground/30":"border-border")})},table(S){const{children:C}=S;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:C})})},th(S){const{children:C}=S;return g.jsx("th",{className:Ee("border border-border px-2 py-1.5 text-left font-semibold",u?"bg-primary-foreground/10 text-primary-foreground":"bg-muted"),children:C})},td(S){const{children:C}=S;return g.jsx("td",{className:Ee("border px-2 py-1.5",u?"border-primary-foreground/20":"border-border"),children:C})}},n[0]=u,n[1]=a):a=n[1];const d=a;let f;n[2]!==o?(f=Ee("visualization-container markdown-render overflow-x-auto wrap-break-words break",o),n[2]=o,n[3]=f):f=n[3];let p;n[4]===Symbol.for("react.memo_cache_sentinel")?(p=[CF],n[4]=p):p=n[4];let h;n[5]!==i||n[6]!==d?(h=g.jsx(dB,{remarkPlugins:p,components:d,children:i}),n[5]=i,n[6]=d,n[7]=h):h=n[7];let _;return n[8]!==f||n[9]!==h?(_=g.jsx("div",{className:f,children:h}),n[8]=f,n[9]=h,n[10]=_):_=n[10],_});function EF(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((u,a)=>g.jsx("div",{...o({line:u}),children:u.map((d,f)=>g.jsx("span",{...l({token:d})},f))},a))})}function Rx(t){return t.filter(e=>e.type==="text").map(e=>e.text).join("")}function AF(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 RF(t,e){const n=t.map(u=>({message:u.message,parts:u.parts,isQueued:!1})),i=e.map(u=>({message:{id:u.id,role:"user",sessionId:u.sessionId,createdAt:u.createdAt},parts:[{id:`${u.id}-part`,messageId:u.id,createdAt:u.createdAt,type:"text",text:u.content}],isQueued:!0,queueId:u.id})),o=[...n].sort((u,a)=>u.message.createdAt-a.message.createdAt),l=[...i].sort((u,a)=>u.message.createdAt-a.message.createdAt);return[...o,...l]}function TF(){const t=ge.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(Kx,{className:"size-4 animate-pulse"}),g.jsx("span",{children:"Compacting conversation..."})]}),t[0]=e):e=t[0],e}function NF(){const t=ge.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(u4,{className:"size-4"}),g.jsx("span",{children:"Compaction complete"})]}),t[0]=e):e=t[0],e}function DF(t){const e=ge.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(Iu,{className:"size-3"}),"Compaction Failed"]}),e[0]=l):l=e[0];const u=i||n.error||"Compaction failed. The conversation could not be summarized.";let a;e[1]!==u?(a=g.jsx("p",{className:"text-sm text-destructive/90",children:u}),e[1]=u,e[2]=a):a=e[2];let d;e[3]!==o?(d=o&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:o,className:"mt-2 h-7 text-xs gap-1.5",children:[g.jsx(Xx,{className:"size-3"}),"Retry"]}),e[3]=o,e[4]=d):d=e[4];let f;return e[5]!==a||e[6]!==d?(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,d]})]}),e[5]=a,e[6]=d,e[7]=f):f=e[7],f}function MF(t){const e=ge.c(15),{part:n}=t,[i,o]=D.useState(!1),l=n.overflow?"overflow":n.auto?"auto":"manual";let u;e[0]!==i?(u=()=>o(!i),e[0]=i,e[1]=u):u=e[1];let a;e[2]!==i?(a=i?g.jsx(pc,{className:"size-3"}):g.jsx(Ci,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];const d=l==="overflow"?"Context overflow":l==="auto"?"Auto":"Manual";let f;e[4]!==d?(f=g.jsxs("span",{className:"border-b border-dashed border-muted-foreground/40 pb-px",children:[d," compaction"]}),e[4]=d,e[5]=f):f=e[5];let p;e[6]!==u||e[7]!==a||e[8]!==f?(p=g.jsxs("button",{onClick:u,className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[a,f]}),e[6]=u,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 _;return e[12]!==p||e[13]!==h?(_=g.jsxs("div",{className:"flex flex-col items-center my-4",children:[p,h]}),e[12]=p,e[13]=h,e[14]=_):_=e[14],_}const jF=D.memo(function(e){const n=ge.c(13),{parts:i,pendingPermissions:o,onPermissionResponse:l,onNavigateToSubagent:u,inverted:a}=e,d=a===void 0?!1:a;let f;if(n[0]!==d||n[1]!==u||n[2]!==l||n[3]!==i||n[4]!==o){const h=[...i].sort(IF);let _;n[6]!==d||n[7]!==u||n[8]!==l||n[9]!==o?(_=S=>{switch(S.type){case"text":return g.jsx("div",{className:"min-w-0",children:g.jsx(kF,{inverted:d,children:S.text||"..."})},S.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:S.text},S.id);case"tool":return g.jsx(V7,{part:S,pendingPermissions:o,onPermissionResponse:l,onNavigateToSubagent:u},S.id);case"image":return g.jsx("img",{src:S.url,alt:"",className:"max-w-full rounded-lg mt-2"},S.id);case"file":return g.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-sm",children:S.filename||"unnamed"},S.id);default:return null}},n[6]=d,n[7]=u,n[8]=l,n[9]=o,n[10]=_):_=n[10],f=h.map(_),n[0]=d,n[1]=u,n[2]=l,n[3]=i,n[4]=o,n[5]=f}else f=n[5];let p;return n[11]!==f?(p=g.jsx(g.Fragment,{children:f}),n[11]=f,n[12]=p):p=n[12],p},(t,e)=>{if(t.parts!==e.parts||t.inverted!==e.inverted||t.onPermissionResponse!==e.onPermissionResponse||t.onNavigateToSubagent!==e.onNavigateToSubagent)return!1;if(!t.parts.some(u=>u.type==="tool"&&u.state.status==="pending"))return!0;const i=new Set(t.parts.filter(u=>u.type==="tool").map(u=>u.callId)),o=t.pendingPermissions.filter(u=>i.has(u.toolCallId)),l=e.pendingPermissions.filter(u=>i.has(u.toolCallId));if(o.length!==l.length)return!1;for(let u=0;u<o.length;u++)if(o[u].toolCallId!==l[u].toolCallId)return!1;return!0});function OF(t){const e=ge.c(90),{session:n,messagesWithParts:i,queuedMessages:o,preconfigs:l,prompts:u,models:a,connectedProviderIds:d,connectableProviderIds:f,defaultModel:p,onSendMessage:h,onRemoveFromQueue:_,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,pendingPermissions:v,onPermissionResponse:b,onRename:y,usage:x,modelName:k,onNavigateToSubagent:N,onNavigateBack:A,isStreaming:M,onInterrupt:T,onRevert:j,onFork:O,onCompact:I,isCompacting:V,compactionSuccess:U,onClearCompactionSuccess:W,serverUrl:K,apiToken:G,selectedVariant:Z,variants:ee,inputRef:B}=t,z=!n.parentId&&n.status==="active";let H,F;e[0]!==U||e[1]!==W?(H=()=>{if(U){const _e=setTimeout(()=>{W==null||W()},3e3);return()=>clearTimeout(_e)}},F=[U,W],e[0]=U,e[1]=W,e[2]=H,e[3]=F):(H=e[2],F=e[3]),D.useEffect(H,F);const Q=D.useRef(null),[te,X]=D.useState(!0);let q;e[4]!==i||e[5]!==o?(q=RF(i,o),e[4]=i,e[5]=o,e[6]=q):q=e[6];const $=q;let ne;e[7]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>{X(!0),Q.current&&(Q.current.scrollTop=Q.current.scrollHeight)},e[7]=ne):ne=e[7];let ie;e[8]!==n.id?(ie=[n.id],e[8]=n.id,e[9]=ie):ie=e[9],D.useEffect(ne,ie);let ae;e[10]!==te?(ae=()=>{Q.current&&te&&(Q.current.scrollTop=Q.current.scrollHeight)},e[10]=te,e[11]=ae):ae=e[11];let se;e[12]!==te||e[13]!==i?(se=[i,te],e[12]=te,e[13]=i,e[14]=se):se=e[14],D.useEffect(ae,se);let ye,Re;e[15]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>{const _e=Q.current;if(!_e)return;const Te=()=>{const{scrollHeight:Oe,scrollTop:We,clientHeight:Fe}=_e,He=Oe-We-Fe;X(He<150)};return _e.addEventListener("scroll",Te,{passive:!0}),()=>_e.removeEventListener("scroll",Te)},Re=[],e[15]=ye,e[16]=Re):(ye=e[15],Re=e[16]),D.useEffect(ye,Re);let je;if(e[17]!==i||e[18]!==v||e[19]!==n.id){let _e;e[21]!==i||e[22]!==n.id?(_e=Te=>Te.sessionId!==n.id?!1:!i.some(Oe=>Oe.parts.some(We=>We.type==="tool"&&We.callId===Te.toolCallId)),e[21]=i,e[22]=n.id,e[23]=_e):_e=e[23],je=v.filter(_e),e[17]=i,e[18]=v,e[19]=n.id,e[20]=je}else je=e[20];const Be=je,De=i.length>=4;let et;e[24]!==f||e[25]!==d||e[26]!==p||e[27]!==V||e[28]!==M||e[29]!==k||e[30]!==a||e[31]!==C||e[32]!==S||e[33]!==w||e[34]!==I||e[35]!==T||e[36]!==A||e[37]!==y||e[38]!==l||e[39]!==Z||e[40]!==n||e[41]!==De||e[42]!==x||e[43]!==ee?(et=g.jsx(pO,{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:I,isCompacting:V,canCompact:De,connectedProviderIds:d,connectableProviderIds:f,selectedVariant:Z,variants:ee}),e[24]=f,e[25]=d,e[26]=p,e[27]=V,e[28]=M,e[29]=k,e[30]=a,e[31]=C,e[32]=S,e[33]=w,e[34]=I,e[35]=T,e[36]=A,e[37]=y,e[38]=l,e[39]=Z,e[40]=n,e[41]=De,e[42]=x,e[43]=ee,e[44]=et):et=e[44];let it;e[45]!==V?(it=V&&g.jsx(TF,{}),e[45]=V,e[46]=it):it=e[46];let ut;e[47]!==U?(ut=U&&g.jsx(NF,{}),e[47]=U,e[48]=ut):ut=e[48];let ot;e[49]!==n.status?(ot=n.status==="closed"&&g.jsx(jf,{className:"mx-4 mt-4",children:g.jsx(Of,{children:"This session is archived. You can reopen it from the sidebar."})}),e[49]=n.status,e[50]=ot):ot=e[50];let mt;e[51]!==O||e[52]!==j||e[53]!==$||e[54]!==V||e[55]!==z||e[56]!==i||e[57]!==I||e[58]!==N||e[59]!==b||e[60]!==_||e[61]!==v||e[62]!==n.id?(mt=$.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."})]}):$.map(_e=>{const Te=_e.parts.find(LF);if(X8(_e.message)&&_e.message.mode==="compact_failed")return g.jsx(DF,{message:_e.message,textContent:Rx(_e.parts),onRetry:z&&!V?I:void 0},_e.message.id);if(Te)return g.jsx(MF,{part:Te},_e.message.id);const We=!_e.isQueued&&_e.message.role==="user",Fe=We?AF(_e.message.id,i):null;return g.jsx(mO,{message:_e.message,textContent:Rx(_e.parts),isQueued:_e.isQueued,onRemove:_e.isQueued?()=>_(_e.queueId):void 0,canRevert:We&&Fe!==null,onRevert:Fe?()=>j==null?void 0:j(n.id,Fe):void 0,canFork:We&&Fe!==null,onFork:Fe?()=>O==null?void 0:O(n.id,_e.message.id):void 0,children:_e.parts.length===0?g.jsx("span",{className:"opacity-50",children:"..."}):g.jsx(jF,{parts:_e.parts,pendingPermissions:v,onPermissionResponse:b,onNavigateToSubagent:N,inverted:_e.message.role==="user"})},_e.message.id)}),e[51]=O,e[52]=j,e[53]=$,e[54]=V,e[55]=z,e[56]=i,e[57]=I,e[58]=N,e[59]=b,e[60]=_,e[61]=v,e[62]=n.id,e[63]=mt):mt=e[63];let Ze;e[64]!==b||e[65]!==Be?(Ze=Be.length>0&&g.jsx("div",{className:"mt-4 flex flex-col gap-2",children:Be.map(_e=>{var Oe;const Te=typeof((Oe=_e.args)==null?void 0:Oe.command)=="string"?_e.args.command:JSON.stringify(_e.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:_e.toolName}),g.jsx("span",{className:"text-xs text-muted-foreground",children:_e.permissionType})]}),g.jsx("p",{className:"text-sm",children:_e.message}),g.jsxs(Bo,{children:[g.jsx(Po,{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(Ci,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Fo,{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:Te})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>b(_e.toolCallId,!1,!1),children:"Deny"}),g.jsx(Pe,{variant:"secondary",size:"sm",onClick:()=>b(_e.toolCallId,!0,!1),children:"Approve"}),g.jsx(Pe,{size:"sm",onClick:()=>b(_e.toolCallId,!0,!0),children:"Always Allow"})]})]},_e.toolCallId)})}),e[64]=b,e[65]=Be,e[66]=Ze):Ze=e[66];let tt;e[67]!==mt||e[68]!==Ze?(tt=g.jsx(Rc,{className:"flex-1 min-h-0",ref:Q,children:g.jsxs("div",{className:"p-4",children:[mt,Ze]})}),e[67]=mt,e[68]=Ze,e[69]=tt):tt=e[69];let ue;e[70]!==G||e[71]!==B||e[72]!==V||e[73]!==h||e[74]!==u||e[75]!==K||e[76]!==n.parentId||e[77]!==n.status||e[78]!==n.workspaceId?(ue=n.status==="active"&&!n.parentId&&g.jsx(X7,{ref:B,onSendMessage:h,disabled:V,workspaceId:n.workspaceId,serverUrl:K,apiToken:G,prompts:u}),e[70]=G,e[71]=B,e[72]=V,e[73]=h,e[74]=u,e[75]=K,e[76]=n.parentId,e[77]=n.status,e[78]=n.workspaceId,e[79]=ue):ue=e[79];let de;e[80]!==n.parentId?(de=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(G4,{className:"size-4"}),"This is a subagent session (read-only)"]}),e[80]=n.parentId,e[81]=de):de=e[81];let xe;return e[82]!==et||e[83]!==it||e[84]!==ut||e[85]!==ot||e[86]!==tt||e[87]!==ue||e[88]!==de?(xe=g.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[et,it,ut,ot,tt,ue,de]}),e[82]=et,e[83]=it,e[84]=ut,e[85]=ot,e[86]=tt,e[87]=ue,e[88]=de,e[89]=xe):xe=e[89],xe}function LF(t){return t.type==="compaction"}function IF(t,e){return t.createdAt-e.createdAt}function zF(t){const e=ge.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 u;e[4]!==n?(u=Ee("group/tabs flex gap-2 data-horizontal:flex-col",n),e[4]=n,e[5]=u):u=e[5];let a;return e[6]!==l||e[7]!==i||e[8]!==u?(a=g.jsx(QD,{"data-slot":"tabs","data-orientation":l,className:u,...i}),e[6]=l,e[7]=i,e[8]=u,e[9]=a):a=e[9],a}const BF=_c("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 PF(t){const e=ge.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 u;e[4]!==n||e[5]!==l?(u=Ee(BF({variant:l}),n),e[4]=n,e[5]=l,e[6]=u):u=e[6];let a;return e[7]!==i||e[8]!==u||e[9]!==l?(a=g.jsx(ZD,{"data-slot":"tabs-list","data-variant":l,className:u,...i}),e[7]=i,e[8]=u,e[9]=l,e[10]=a):a=e[10],a}function ku(t){const e=ge.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(JD,{"data-slot":"tabs-trigger",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Eu(t){const e=ge.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(eM,{"data-slot":"tabs-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Tx(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Nx(t){const e=ge.c(29),{permission:n,onRevoke:i}=t,o=!!n.revokedAt,l=o?"outline":"secondary";let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Zx,{className:"size-3","data-icon":"inline-start"}),e[0]=u):u=e[0];let a;e[1]!==n.permissionType||e[2]!==l?(a=g.jsxs(Gn,{variant:l,children:[u,n.permissionType]}),e[1]=n.permissionType,e[2]=l,e[3]=a):a=e[3];let d;e[4]!==o?(d=o&&g.jsx(Gn,{variant:"outline",className:"text-muted-foreground",children:"Revoked"}),e[4]=o,e[5]=d):d=e[5];let f;e[6]!==a||e[7]!==d?(f=g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a,d]}),e[6]=a,e[7]=d,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=Tx(n.grantedAt),e[11]=n.grantedAt,e[12]=h):h=e[12];let _;e[13]!==n.revokedAt?(_=n.revokedAt&&` • Revoked ${Tx(n.revokedAt)}`,e[13]=n.revokedAt,e[14]=_):_=e[14];let S;e[15]!==h||e[16]!==_?(S=g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",h,_]}),e[15]=h,e[16]=_,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(gc,{className:"size-4"})}),e[22]=o,e[23]=i,e[24]=n.id,e[25]=w):w=e[25];let v;return e[26]!==C||e[27]!==w?(v=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]=v):v=e[28],v}function FF(t){const e=ge.c(30),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:u,cancelLabel:a,variant:d,onConfirm:f,onCancel:p}=t,h=u===void 0?"Confirm":u,_=a===void 0?"Cancel":a,S=d===void 0?"default":d;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 v;e[3]!==f||e[4]!==i?(v=()=>{f(),i(!1)},e[3]=f,e[4]=i,e[5]=v):v=e[5];const b=v;let y;e[6]!==o?(y=g.jsx(Ac,{children:o}),e[6]=o,e[7]=y):y=e[7];let x;e[8]!==l?(x=g.jsx(ld,{children:l}),e[8]=l,e[9]=x):x=e[9];let k;e[10]!==y||e[11]!==x?(k=g.jsxs(Ec,{children:[y,x]}),e[10]=y,e[11]=x,e[12]=k):k=e[12];let N;e[13]!==_||e[14]!==w?(N=g.jsx(Pe,{variant:"outline",onClick:w,children:_}),e[13]=_,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(Lh,{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(kc,{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(Cc,{open:n,onOpenChange:i,children:j}),e[26]=i,e[27]=n,e[28]=j,e[29]=O):O=e[29],O}function HF(t){const e=ge.c(48),{provider:n,onConnect:i,onDisconnect:o}=t,[l,u]=D.useState(!1);let a,d;e[0]!==n.connected||e[1]!==n.error?(a=()=>{(n.error||n.connected)&&u(!1)},d=[n.error,n.connected],e[0]=n.connected,e[1]=n.error,e[2]=a,e[3]=d):(a=e[2],d=e[3]),D.useEffect(a,d);let f,p;e[4]!==n.authorizationUrl?(f=()=>{n.authorizationUrl&&u(!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=()=>{u(!0),i()},e[7]=i,e[8]=h):h=e[8];const _=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 v;e[11]!==w?(v=g.jsx("div",{className:w}),e[11]=w,e[12]=v):v=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]!==v?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[v,y]}),e[15]=y,e[16]=v,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]!==_||e[29]!==l||e[30]!==n.authorizationUrl||e[31]!==n.connected?(T=!n.connected&&!n.authorizationUrl&&g.jsxs(Pe,{size:"sm",onClick:_,disabled:l,children:[l?g.jsx(Br,{className:"size-3 animate-spin","data-icon":"inline-start"}):null,"Connect"]}),e[28]=_,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(Lu,{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(M5,{className:"size-3","data-icon":"inline-start"}),"Disconnect"]}),e[36]=C,e[37]=n.connected,e[38]=O):O=e[38];let I;e[39]!==T||e[40]!==j||e[41]!==O?(I=g.jsxs("div",{className:"flex gap-2",children:[T,j,O]}),e[39]=T,e[40]=j,e[41]=O,e[42]=I):I=e[42];let V;return e[43]!==N||e[44]!==A||e[45]!==M||e[46]!==I?(V=g.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border p-4",children:[N,A,M,I]}),e[43]=N,e[44]=A,e[45]=M,e[46]=I,e[47]=V):V=e[47],V}function UF(t){const e=ge.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=tA(n),e[1]=n,e[2]=l):l=e[2];let u;e[3]!==l?(u=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]=u):u=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 d;return e[7]!==u||e[8]!==a?(d=g.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md bg-muted",children:[u,a]}),e[7]=u,e[8]=a,e[9]=d):d=e[9],d}const Dx="0.6.7";function Mx(t){const e=t.trim().match(/^v?(\d+)\.(\d+)\.(\d+)$/);return e?[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]:null}function $F(t,e){const n=Mx(t),i=Mx(e);if(!n&&!i)return 0;if(!n)return-1;if(!i)return 1;for(let o=0;o<3;o++)if(n[o]!==i[o])return n[o]-i[o];return 0}function jx(t,e){return e?$F(t,e)>=0?"up-to-date":"update-available":"unknown"}const nk="rabbyte-tech/jean2",VF=300*1e3,rk=1e4,ih=new Map;function ik(t){const e=ih.get(t);return e?Date.now()-e.timestamp>VF?(ih.delete(t),null):e.value:null}function sk(t,e){ih.set(t,{value:e,timestamp:Date.now()})}function qF(){ih.clear()}async function ok(t,e){const n=new AbortController,i=setTimeout(()=>n.abort(),e);try{return await fetch(t,{signal:n.signal})}finally{clearTimeout(i)}}async function WF(){const t=ik("latest-server");if(t)return t;try{const e=`https://raw.githubusercontent.com/${nk}/refs/heads/main/packages/server/VERSION`,n=await ok(e,rk);if(!n.ok)return null;const i=(await n.text()).trim();return/^\d+\.\d+\.\d+$/.test(i)?(sk("latest-server",i),i):null}catch{return null}}async function GF(){const t=ik("latest-client");if(t)return t;try{const e=`https://api.github.com/repos/${nk}/releases?per_page=20`,n=await ok(e,rk);if(!n.ok)return null;const o=(await n.json()).find(u=>u.tag_name.startsWith("client/")&&!u.prerelease);if(!o)return null;const l=o.tag_name.replace(/^client\/v?/,"");return/^\d+\.\d+\.\d+$/.test(l)?(sk("latest-client",l),l):null}catch{return null}}function KF(t){if(!t)return"";const e=Math.floor((Date.now()-t)/1e3);if(e<10)return"just now";if(e<60)return`${e}s ago`;const n=Math.floor(e/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function Ox(t){const e=ge.c(3),{status:n}=t;if(n==="up-to-date"){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsxs("span",{className:"text-xs text-green-500 flex items-center gap-1",children:[g.jsx("span",{className:"inline-block size-1.5 rounded-full bg-green-500"}),"Up to date"]}),e[0]=o):o=e[0],o}if(n==="update-available"){let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 dark:text-amber-400",children:"Update available"}),e[1]=o):o=e[1],o}let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx("span",{className:"text-xs text-muted-foreground",children:"Unknown"}),e[2]=i):i=e[2],i}function YF({serverUrl:t,enabled:e}){const n=D.useRef(0),[i,o]=D.useState({serverVersion:null,latestServer:null,latestClient:null,loading:!0,lastChecked:null,fetchError:null}),l=D.useCallback(async(d=!1)=>{d&&qF();const f=++n.current;o(p=>({...p,loading:!0,fetchError:null}));try{const p=await Promise.allSettled([t?fetch(`${t.startsWith("http")?t:`http://${t}`}/api/info`).then(C=>C.ok?C.json():null).then(C=>{var w;return(w=C==null?void 0:C.version)!=null?w:null}):Promise.resolve(null),WF(),GF()]);if(n.current!==f)return;const h=p[0].status==="fulfilled"?p[0].value:null,_=p[1].status==="fulfilled"?p[1].value:null,S=p[2].status==="fulfilled"?p[2].value:null;o({serverVersion:h,latestServer:_,latestClient:S,loading:!1,lastChecked:Date.now(),fetchError:null})}catch{if(n.current!==f)return;o(p=>({...p,loading:!1,fetchError:"Unable to check for updates"}))}},[t]);D.useEffect(()=>{e&&l()},[l,e]);const u=jx(Dx,i.latestClient),a=t&&i.serverVersion?jx(i.serverVersion,i.latestServer):"unknown";return g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsxs("div",{children:[g.jsx(ii,{className:"text-sm font-medium",children:"Versions"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Check for updates to client and server"})]}),g.jsx(Yi,{}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-sm font-medium",children:"Client"}),i.loading?g.jsx(ig,{className:"h-5 w-32"}):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",Dx]}),g.jsx(Ox,{status:u})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-sm font-medium",children:"Server"}),i.loading?g.jsx(ig,{className:"h-5 w-32"}):i.serverVersion?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",i.serverVersion]}),g.jsx(Ox,{status:a})]}):g.jsx("span",{className:"text-sm text-muted-foreground",children:"Not connected"})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-sm font-medium",children:"Latest"}),i.loading?g.jsx(ig,{className:"h-5 w-48"}):g.jsxs("span",{className:"text-sm text-muted-foreground",children:[i.latestServer?`v${i.latestServer} (server)`:"",i.latestServer&&i.latestClient&&" · ",i.latestClient?`v${i.latestClient} (client)`:"",!i.latestServer&&!i.latestClient&&"Unknown"]})]})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[i.lastChecked&&!i.loading&&g.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last checked: ",KF(i.lastChecked)]}),g.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>l(!0),disabled:i.loading,className:"ml-auto",children:[g.jsx(La,{className:`size-3.5 ${i.loading?"animate-spin":""}`}),"Check for Updates"]})]})]})}const XF={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 Au(t){const e=ge.c(15),{scheme:n,currentScheme:i,onClick:o}=t,l=n===i,u=XF[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 d=`
569
+ flex flex-col items-center gap-1.5 p-2 rounded-lg border transition-all
570
+ ${l?"border-primary bg-primary/5":"border-border bg-transparent hover:bg-muted/50"}
571
+ `,f=u.label;let p;e[3]!==u.colors?(p=u.colors.map(QF),e[3]=u.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 _;e[7]!==n?(_=g.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:n}),e[7]=n,e[8]=_):_=e[8];let S;return e[9]!==u.label||e[10]!==a||e[11]!==d||e[12]!==h||e[13]!==_?(S=g.jsxs("button",{type:"button",onClick:a,className:d,title:f,children:[h,_]}),e[9]=u.label,e[10]=a,e[11]=d,e[12]=h,e[13]=_,e[14]=S):S=e[14],S}function QF(t,e){return g.jsx("div",{className:`w-4 h-4 rounded-full ${t}`},e)}function ZF(t){var Be;const e=ge.c(227),{open:n,onOpenChange:i,permissions:o,onRefreshPermissions:l,onRevokePermission:u,onRevokeAllPermissions:a,apiToken:d,onLogout:f,providerStatuses:p,onConnectProvider:h,onDisconnectProvider:_,chatFinishSoundEnabled:S,onChatFinishSoundEnabledChange:C,permissionSoundEnabled:w,onPermissionSoundEnabledChange:v,serverUrl:b}=t,{mode:y,scheme:x,setMode:k,setScheme:N}=zE(),[A,M]=D.useState(!1),j=((Be=navigator.userAgentData)==null?void 0:Be.platform)==="macOS"||/mac|iphone|ipad|ipod/i.test(navigator.userAgent)?"⌘":"Ctrl";let O,I,V,U,W,K,G,Z,ee,B,L,z,H,F,Q,te,X,q,$;if(e[0]!==d||e[1]!==S||e[2]!==y||e[3]!==C||e[4]!==h||e[5]!==_||e[6]!==f||e[7]!==i||e[8]!==v||e[9]!==l||e[10]!==u||e[11]!==n||e[12]!==w||e[13]!==o||e[14]!==p||e[15]!==x||e[16]!==b||e[17]!==k||e[18]!==N){const De=[{keys:[j,"1"],description:"Open session list"},{keys:[j,"T"],description:"Open terminal"},{keys:[j,"O"],description:"Toggle overview mode"},{keys:[j,"N"],description:"New session"},{keys:[j,"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 et,it,ut,ot,mt,Ze,tt,ue,de,xe,_e;if(e[38]!==d||e[39]!==S||e[40]!==y||e[41]!==C||e[42]!==f||e[43]!==i||e[44]!==v||e[45]!==l||e[46]!==u||e[47]!==n||e[48]!==w||e[49]!==o||e[50]!==x||e[51]!==b||e[52]!==k||e[53]!==N){const He=o.filter(tH),dt=o.filter(eH);U=Cc,B=n,L=i,V=kc,Z="sm:max-w-[700px] max-h-[80vh]",e[77]===Symbol.for("react.memo_cache_sentinel")?(ee=g.jsxs(Ec,{children:[g.jsx(Ac,{children:"Settings"}),g.jsx(ld,{children:"Manage your preferences and permissions"})]}),e[77]=ee):ee=e[77],I=zF,Q="account",te="mt-4";let ft;e[78]===Symbol.for("react.memo_cache_sentinel")?(ft=g.jsxs(ku,{value:"account",children:[g.jsx(eS,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Account"})]}),e[78]=ft):ft=e[78];let ke;e[79]===Symbol.for("react.memo_cache_sentinel")?(ke=g.jsxs(ku,{value:"appearance",children:[g.jsx(n5,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Appearance"})]}),e[79]=ke):ke=e[79];let Ue,ct;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ue=g.jsx(Zx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),ct=g.jsx("span",{className:"hidden sm:inline",children:"Permissions"}),e[80]=Ue,e[81]=ct):(Ue=e[80],ct=e[81]);const bt=He.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:He.length});let qt;e[82]!==bt?(qt=g.jsxs(ku,{value:"permissions",children:[Ue,ct,bt]}),e[82]=bt,e[83]=qt):qt=e[83];let Ut;e[84]===Symbol.for("react.memo_cache_sentinel")?(Ut=g.jsxs(ku,{value:"providers",children:[g.jsx(V4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Providers"})]}),e[84]=Ut):Ut=e[84];let on;e[85]===Symbol.for("react.memo_cache_sentinel")?(on=g.jsxs(ku,{value:"keybinds",children:[g.jsx(B4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Keybinds"})]}),e[85]=on):on=e[85],e[86]!==qt?(X=g.jsxs(PF,{className:"grid w-full grid-cols-5",children:[ft,ke,qt,Ut,on]}),e[86]=qt,e[87]=X):X=e[87];let Zt,Nn;e[88]===Symbol.for("react.memo_cache_sentinel")?(Zt=g.jsx(ii,{className:"text-sm font-medium",children:"Session"}),Nn=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),e[88]=Zt,e[89]=Nn):(Zt=e[88],Nn=e[89]);let tn;e[90]!==d||e[91]!==f?(tn=g.jsxs("div",{children:[Zt,Nn,d?g.jsx(UF,{token:d,onLogout:f}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]}),e[90]=d,e[91]=f,e[92]=tn):tn=e[92];let Wt;e[93]===Symbol.for("react.memo_cache_sentinel")?(Wt=g.jsx(Yi,{}),e[93]=Wt):Wt=e[93];let un;e[94]!==n||e[95]!==b?(un=g.jsx(YF,{serverUrl:b,enabled:n}),e[94]=n,e[95]=b,e[96]=un):un=e[96],e[97]!==tn||e[98]!==un?(q=g.jsx(Eu,{value:"account",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[tn,Wt,un]})}),e[97]=tn,e[98]=un,e[99]=q):q=e[99];let dn,$n;e[100]===Symbol.for("react.memo_cache_sentinel")?(dn=g.jsx(ii,{className:"text-sm font-medium",children:"Mode"}),$n=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose light, dark, or system theme"}),e[100]=dn,e[101]=$n):(dn=e[100],$n=e[101]);const Ri=y==="light"?"default":"outline";let Dn;e[102]!==k?(Dn=()=>k("light"),e[102]=k,e[103]=Dn):Dn=e[103];let ai;e[104]===Symbol.for("react.memo_cache_sentinel")?(ai=g.jsx(k5,{className:"size-4","data-icon":"inline-start"}),e[104]=ai):ai=e[104];let Xn;e[105]!==Ri||e[106]!==Dn?(Xn=g.jsxs(Pe,{variant:Ri,className:"justify-start",onClick:Dn,children:[ai,"Light"]}),e[105]=Ri,e[106]=Dn,e[107]=Xn):Xn=e[107];const $r=y==="dark"?"default":"outline";let ir;e[108]!==k?(ir=()=>k("dark"),e[108]=k,e[109]=ir):ir=e[109];let Ti;e[110]===Symbol.for("react.memo_cache_sentinel")?(Ti=g.jsx(e5,{className:"size-4","data-icon":"inline-start"}),e[110]=Ti):Ti=e[110];let Cr;e[111]!==$r||e[112]!==ir?(Cr=g.jsxs(Pe,{variant:$r,className:"justify-start",onClick:ir,children:[Ti,"Dark"]}),e[111]=$r,e[112]=ir,e[113]=Cr):Cr=e[113];const sr=y==="system"?"default":"outline";let Et;e[114]!==k?(Et=()=>k("system"),e[114]=k,e[115]=Et):Et=e[115];let Bt;e[116]===Symbol.for("react.memo_cache_sentinel")?(Bt=g.jsx(Z4,{className:"size-4","data-icon":"inline-start"}),e[116]=Bt):Bt=e[116];let an;e[117]!==sr||e[118]!==Et?(an=g.jsxs(Pe,{variant:sr,className:"justify-start",onClick:Et,children:[Bt,"System"]}),e[117]=sr,e[118]=Et,e[119]=an):an=e[119];let vn;e[120]!==Xn||e[121]!==Cr||e[122]!==an?(vn=g.jsxs("div",{children:[dn,$n,g.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[Xn,Cr,an]})]}),e[120]=Xn,e[121]=Cr,e[122]=an,e[123]=vn):vn=e[123];let Ni,Vr;e[124]===Symbol.for("react.memo_cache_sentinel")?(Ni=g.jsx(Yi,{}),Vr=g.jsx(ii,{className:"text-sm font-medium mb-3 block",children:"Notification Sounds"}),e[124]=Ni,e[125]=Vr):(Ni=e[124],Vr=e[125]);let or;e[126]===Symbol.for("react.memo_cache_sentinel")?(or=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(L5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Chat completion"})]}),e[126]=or):or=e[126];let En;e[127]!==S||e[128]!==C?(En=()=>C(!S),e[127]=S,e[128]=C,e[129]=En):En=e[129];const ar=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-primary":"bg-muted"}`,lr=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`;let Mn;e[130]!==lr?(Mn=g.jsx("span",{className:lr}),e[130]=lr,e[131]=Mn):Mn=e[131];let jn;e[132]!==En||e[133]!==ar||e[134]!==Mn?(jn=g.jsxs("div",{className:"flex items-center justify-between",children:[or,g.jsx("button",{type:"button",onClick:En,className:ar,children:Mn})]}),e[132]=En,e[133]=ar,e[134]=Mn,e[135]=jn):jn=e[135];let Qn;e[136]===Symbol.for("react.memo_cache_sentinel")?(Qn=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(z5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Permission requests"})]}),e[136]=Qn):Qn=e[136];let Lt;e[137]!==v||e[138]!==w?(Lt=()=>v(!w),e[137]=v,e[138]=w,e[139]=Lt):Lt=e[139];const li=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${w?"bg-primary":"bg-muted"}`,ts=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${w?"translate-x-6":"translate-x-1"}`;let _n;e[140]!==ts?(_n=g.jsx("span",{className:ts}),e[140]=ts,e[141]=_n):_n=e[141];let Dt;e[142]!==Lt||e[143]!==li||e[144]!==_n?(Dt=g.jsxs("div",{className:"flex items-center justify-between",children:[Qn,g.jsx("button",{type:"button",onClick:Lt,className:li,children:_n})]}),e[142]=Lt,e[143]=li,e[144]=_n,e[145]=Dt):Dt=e[145];let kr;e[146]!==jn||e[147]!==Dt?(kr=g.jsxs("div",{children:[Vr,g.jsxs("div",{className:"flex flex-col gap-3",children:[jn,Dt]})]}),e[146]=jn,e[147]=Dt,e[148]=kr):kr=e[148];let ci,Di,ui;e[149]===Symbol.for("react.memo_cache_sentinel")?(ci=g.jsx(Yi,{}),Di=g.jsx(ii,{className:"text-sm font-medium",children:"Color Scheme"}),ui=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color palette"}),e[149]=ci,e[150]=Di,e[151]=ui):(ci=e[149],Di=e[150],ui=e[151]);let Zn;e[152]!==x||e[153]!==N?(Zn=g.jsxs("div",{children:[Di,ui,g.jsxs("div",{className:"grid grid-cols-5 gap-2",children:[g.jsx(Au,{scheme:"neutral",currentScheme:x,onClick:N}),g.jsx(Au,{scheme:"ocean",currentScheme:x,onClick:N}),g.jsx(Au,{scheme:"forest",currentScheme:x,onClick:N}),g.jsx(Au,{scheme:"sunset",currentScheme:x,onClick:N}),g.jsx(Au,{scheme:"amethyst",currentScheme:x,onClick:N})]})]}),e[152]=x,e[153]=N,e[154]=Zn):Zn=e[154],e[155]!==vn||e[156]!==kr||e[157]!==Zn?($=g.jsx(Eu,{value:"appearance",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[vn,Ni,kr,ci,Zn]})}),e[155]=vn,e[156]=kr,e[157]=Zn,e[158]=$):$=e[158],it=Eu,xe="permissions",_e="mt-4",tt="flex flex-col gap-4";let cr;e[159]===Symbol.for("react.memo_cache_sentinel")?(cr=g.jsxs("div",{children:[g.jsx(ii,{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[159]=cr):cr=e[159];let nn;e[160]===Symbol.for("react.memo_cache_sentinel")?(nn=g.jsx(La,{className:"size-4"}),e[160]=nn):nn=e[160];let Yt;e[161]!==l?(Yt=g.jsx(Pe,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:nn}),e[161]=l,e[162]=Yt):Yt=e[162];const di=He.length>0&&g.jsxs(Pe,{variant:"destructive",size:"sm",onClick:()=>M(!0),children:[g.jsx(gc,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]});e[163]!==Yt||e[164]!==di?(ue=g.jsxs("div",{className:"flex items-center justify-between",children:[cr,g.jsxs("div",{className:"flex gap-2",children:[Yt,di]})]}),e[163]=Yt,e[164]=di,e[165]=ue):ue=e[165],e[166]===Symbol.for("react.memo_cache_sentinel")?(de=g.jsx(Yi,{}),e[166]=de):de=e[166],et=Rc,ut="h-[300px]",ot=He.length===0&&dt.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.']}),mt=He.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 (",He.length,")"]}),He.map(qr=>g.jsx(Nx,{permission:qr,onRevoke:u},qr.id))]}),Ze=dt.length>0&&g.jsxs("div",{children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",dt.length,")"]}),dt.map(qr=>g.jsx(Nx,{permission:qr,onRevoke:u},qr.id))]}),e[38]=d,e[39]=S,e[40]=y,e[41]=C,e[42]=f,e[43]=i,e[44]=v,e[45]=l,e[46]=u,e[47]=n,e[48]=w,e[49]=o,e[50]=x,e[51]=b,e[52]=k,e[53]=N,e[54]=I,e[55]=V,e[56]=U,e[57]=et,e[58]=it,e[59]=Z,e[60]=ee,e[61]=B,e[62]=L,e[63]=ut,e[64]=ot,e[65]=mt,e[66]=Ze,e[67]=tt,e[68]=ue,e[69]=de,e[70]=xe,e[71]=_e,e[72]=Q,e[73]=te,e[74]=X,e[75]=q,e[76]=$}else I=e[54],V=e[55],U=e[56],et=e[57],it=e[58],Z=e[59],ee=e[60],B=e[61],L=e[62],ut=e[63],ot=e[64],mt=e[65],Ze=e[66],tt=e[67],ue=e[68],de=e[69],xe=e[70],_e=e[71],Q=e[72],te=e[73],X=e[74],q=e[75],$=e[76];let Te;e[167]!==et||e[168]!==ut||e[169]!==ot||e[170]!==mt||e[171]!==Ze?(Te=g.jsxs(et,{className:ut,children:[ot,mt,Ze]}),e[167]=et,e[168]=ut,e[169]=ot,e[170]=mt,e[171]=Ze,e[172]=Te):Te=e[172];let Oe;e[173]!==tt||e[174]!==ue||e[175]!==de||e[176]!==Te?(Oe=g.jsxs("div",{className:tt,children:[ue,de,Te]}),e[173]=tt,e[174]=ue,e[175]=de,e[176]=Te,e[177]=Oe):Oe=e[177],e[178]!==it||e[179]!==xe||e[180]!==_e||e[181]!==Oe?(K=g.jsx(it,{value:xe,className:_e,children:Oe}),e[178]=it,e[179]=xe,e[180]=_e,e[181]=Oe,e[182]=K):K=e[182];let We;e[183]===Symbol.for("react.memo_cache_sentinel")?(We=g.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect subscription-based providers to use models without API keys."}),e[183]=We):We=e[183];let Fe;if(e[184]!==h||e[185]!==_||e[186]!==p){let He;e[188]!==h||e[189]!==_?(He=dt=>g.jsx(HF,{provider:dt,onConnect:()=>h(dt.provider),onDisconnect:()=>_(dt.provider)},dt.provider),e[188]=h,e[189]=_,e[190]=He):He=e[190],Fe=p.map(He),e[184]=h,e[185]=_,e[186]=p,e[187]=Fe}else Fe=e[187];e[191]!==Fe?(G=g.jsx(Eu,{value:"providers",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[We,g.jsx("div",{className:"flex flex-col gap-3",children:Fe})]})})}),e[191]=Fe,e[192]=G):G=e[192],O=Eu,H="keybinds",F="mt-4",W="flex flex-col gap-2",z=De.map(JF),e[0]=d,e[1]=S,e[2]=y,e[3]=C,e[4]=h,e[5]=_,e[6]=f,e[7]=i,e[8]=v,e[9]=l,e[10]=u,e[11]=n,e[12]=w,e[13]=o,e[14]=p,e[15]=x,e[16]=b,e[17]=k,e[18]=N,e[19]=O,e[20]=I,e[21]=V,e[22]=U,e[23]=W,e[24]=K,e[25]=G,e[26]=Z,e[27]=ee,e[28]=B,e[29]=L,e[30]=z,e[31]=H,e[32]=F,e[33]=Q,e[34]=te,e[35]=X,e[36]=q,e[37]=$}else O=e[19],I=e[20],V=e[21],U=e[22],W=e[23],K=e[24],G=e[25],Z=e[26],ee=e[27],B=e[28],L=e[29],z=e[30],H=e[31],F=e[32],Q=e[33],te=e[34],X=e[35],q=e[36],$=e[37];let ne;e[193]!==W||e[194]!==z?(ne=g.jsx("div",{className:W,children:z}),e[193]=W,e[194]=z,e[195]=ne):ne=e[195];let ie;e[196]!==O||e[197]!==ne||e[198]!==H||e[199]!==F?(ie=g.jsx(O,{value:H,className:F,children:ne}),e[196]=O,e[197]=ne,e[198]=H,e[199]=F,e[200]=ie):ie=e[200];let ae;e[201]!==I||e[202]!==K||e[203]!==G||e[204]!==ie||e[205]!==Q||e[206]!==te||e[207]!==X||e[208]!==q||e[209]!==$?(ae=g.jsxs(I,{defaultValue:Q,className:te,children:[X,q,$,K,G,ie]}),e[201]=I,e[202]=K,e[203]=G,e[204]=ie,e[205]=Q,e[206]=te,e[207]=X,e[208]=q,e[209]=$,e[210]=ae):ae=e[210];let se;e[211]!==V||e[212]!==Z||e[213]!==ee||e[214]!==ae?(se=g.jsxs(V,{className:Z,children:[ee,ae]}),e[211]=V,e[212]=Z,e[213]=ee,e[214]=ae,e[215]=se):se=e[215];let ye;e[216]!==a?(ye=()=>{a(),M(!1)},e[216]=a,e[217]=ye):ye=e[217];let Re;e[218]!==A||e[219]!==ye?(Re=g.jsx(FF,{open:A,onOpenChange:M,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:ye}),e[218]=A,e[219]=ye,e[220]=Re):Re=e[220];let je;return e[221]!==U||e[222]!==B||e[223]!==L||e[224]!==se||e[225]!==Re?(je=g.jsxs(U,{open:B,onOpenChange:L,children:[se,Re]}),e[221]=U,e[222]=B,e[223]=L,e[224]=se,e[225]=Re,e[226]=je):je=e[226],je}function JF(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 eH(t){return t.revokedAt}function tH(t){return!t.revokedAt}function nH(t){const e=ge.c(6),{status:n}=t;switch(n.status){case"connected":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Gn,{variant:"default",className:"bg-green-600",children:[g.jsx(Ku,{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(Gn,{variant:"secondary",children:[g.jsx(ah,{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(Gn,{variant:"destructive",children:[g.jsx(Du,{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(Gn,{variant:"outline",className:"border-yellow-500 text-yellow-600",children:[g.jsx(Du,{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(Gn,{variant:"outline",className:"border-orange-500 text-orange-600",children:[g.jsx(Du,{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(Gn,{variant:"secondary",children:"Unknown"}),e[5]=i):i=e[5],i}}}function rH({open:t,onOpenChange:e,workspaceId:n,workspacePath:i,serverUrl:o,apiToken:l}){const{fetchWithAuth:u}=ad(),[a,d]=D.useState({}),[f,p]=D.useState(!1),[h,_]=D.useState(null),[S,C]=D.useState(null),w=D.useCallback(async()=>{if(n){p(!0),C(null);try{const k=await u(`/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();d(N.status||{})}catch(k){const N=k instanceof Error?k.message:"Unknown error";C(N)}finally{p(!1)}}},[n,u,o,l]);D.useEffect(()=>{t&&n&&w()},[t,n,w]);const v=async k=>{if(n){_(k);try{if(!(await u(`/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{_(null)}}},b=async k=>{if(n){_(k);try{if(!(await u(`/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{_(null)}}},y=async k=>{if(n){_(k);try{const N=await u(`/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{_(null)}}},x=Object.entries(a);return g.jsx(Cc,{open:t,onOpenChange:e,children:g.jsxs(kc,{className:"sm:max-w-[600px] max-h-[80vh]",children:[g.jsxs(Ec,{children:[g.jsxs(Ac,{className:"flex items-center gap-2",children:[g.jsx(Ia,{className:"size-5"}),"MCP Servers"]}),g.jsx(ld,{children:"Manage Model Context Protocol servers for this workspace"})]}),g.jsxs("div",{className:"mt-4 space-y-4",children:[S&&g.jsxs(jf,{variant:"destructive",children:[g.jsx(Du,{className:"size-4"}),g.jsx(Of,{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(La,{className:`size-4 ${f?"animate-spin":""}`})})]}),g.jsx(Rc,{className:"h-[400px]",children:f&&x.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsx(Br,{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(Ia,{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(Ia,{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(jf,{variant:"destructive",className:"mt-2 py-2",children:g.jsx(Of,{className:"text-xs",children:A.error})}),A.status==="needs_client_registration"&&"error"in A&&g.jsx(jf,{className:"mt-2 py-2 border-orange-500",children:g.jsx(Of,{className:"text-xs",children:A.error})})]})]}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(nH,{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(Br,{className:"size-4 animate-spin"}):g.jsx(c5,{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:()=>v(k),disabled:h===k,children:[h===k?g.jsx(Br,{className:"size-4 animate-spin"}):g.jsx(d5,{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(Br,{className:"size-4 animate-spin"}):g.jsx(Rg,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},k)})})})]})]})})}function Lx(t){const e=ge.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(Br,{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 iH=t=>{const e=ge.c(26),{serverUrl:n,authError:i,retryCount:o,nextRetryIn:l,onRetry:u,onLogout:a}=t;let d,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(tS,{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]=d,e[1]=f):(d=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 _;e[4]!==n?(_=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]=_):_=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(La,{className:"size-4 mr-2","data-icon":"inline-start"}),e[8]=C):C=e[8];let w;e[9]!==u?(w=g.jsxs(Pe,{onClick:u,variant:"default",children:[C,"Retry Now"]}),e[9]=u,e[10]=w):w=e[10];let v;e[11]!==a?(v=g.jsx(Pe,{onClick:a,variant:"ghost",children:"Change Server"}),e[11]=a,e[12]=v):v=e[12];let b;e[13]!==w||e[14]!==v?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[w,v]}),e[13]=w,e[14]=v,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]!==_?(k=g.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[d,f,h,_,x]}),e[22]=x,e[23]=h,e[24]=_,e[25]=k):k=e[25],k};function Ix(t){const e=ge.c(40),{onServerAdded:n,error:i}=t,[o,l]=D.useState(""),[u,a]=D.useState("localhost:8742"),[d,f]=D.useState(""),[p,h]=D.useState(!1),[_,S]=D.useState(null);let C;e[0]!==o||e[1]!==n||e[2]!==d||e[3]!==u?(C=B=>{B.preventDefault();const L=o.trim(),z=u.trim(),H=d.trim();if(!L){S("Please enter a server name");return}if(!z){S("Please enter a server URL");return}if(!H){S("Please enter an API token");return}if(!rS(H)){S("Invalid token format. Token should be 64 hex characters (0-9, a-f).");return}const F=If(z),Q={id:crypto.randomUUID(),name:L,url:F,token:H,createdAt:new Date().toISOString()};n(Q)},e[0]=o,e[1]=n,e[2]=d,e[3]=u,e[4]=C):C=e[4];const w=C;let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=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]=v):v=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=B=>{l(B.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=B=>{a(B.target.value),S(null)},e[11]=N):N=e[11];let A;e[12]!==u?(A=g.jsxs("div",{className:"space-y-2",children:[k,g.jsx("input",{id:"serverUrl",type:"text",value:u,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]=u,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=B=>{f(B.target.value),S(null)},e[15]=j):j=e[15];let O;e[16]!==T||e[17]!==d?(O=g.jsx("input",{id:"token",type:T,value:d,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]=d,e[18]=O):O=e[18];let I;e[19]!==p?(I=()=>h(!p),e[19]=p,e[20]=I):I=e[20];const V=p?"Hide token":"Show token";let U;e[21]!==p?(U=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]=U):U=e[22];let W;e[23]!==I||e[24]!==V||e[25]!==U?(W=g.jsx("button",{type:"button",onClick:I,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":V,children:U}),e[23]=I,e[24]=V,e[25]=U,e[26]=W):W=e[26];let K;e[27]!==O||e[28]!==W?(K=g.jsxs("div",{className:"space-y-2",children:[M,g.jsxs("div",{className:"relative",children:[O,W]})]}),e[27]=O,e[28]=W,e[29]=K):K=e[29];let G;e[30]!==i||e[31]!==_?(G=(_||i)&&g.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:_||i}),e[30]=i,e[31]=_,e[32]=G):G=e[32];let Z;e[33]===Symbol.for("react.memo_cache_sentinel")?(Z=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]=Z):Z=e[33];let ee;return e[34]!==w||e[35]!==K||e[36]!==G||e[37]!==x||e[38]!==A?(ee=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:[v,g.jsxs("form",{onSubmit:w,className:"p-6 space-y-4",children:[x,A,K,G,Z]})]})})}),e[34]=w,e[35]=K,e[36]=G,e[37]=x,e[38]=A,e[39]=ee):ee=e[39],ee}function zx(t){const e=ge.c(17),{onServerSwitch:n,onSelectWorkspace:i}=t,[o,l]=D.useState(!1),u=D.useRef(!1),a=ud(),{quickConnections:d,switchServer:f,removeFromQuickConnections:p,isSwitching:h}=vc(),_=O=>{f(O.serverId)&&(u.current=!0,n==null||n(),O.workspaceId&&i&&i(O.workspaceId))};let S,C;e[0]!==h||e[1]!==o?(S=()=>{!h&&o&&u.current&&(l(!1),u.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,I)=>{O.stopPropagation(),p(I)},e[4]=p,e[5]=w):w=e[5];const v=w,b=()=>g.jsx(X1,{children:g.jsx(Q1,{className:"max-h-[50vh] overflow-y-auto",children:d.length>0?g.jsx(Hu,{heading:"Quick Switch",children:d.map(O=>g.jsxs(sc,{onSelect:()=>_(O),className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ia,{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:I=>v(I,O.id),children:g.jsx(gc,{className:"size-3 text-destructive"})})]},O.id))}):g.jsx(Z1,{className:"py-6",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[g.jsx(Pm,{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(Jj,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Pm,{className:"size-4"})})}),e[6]=O):O=e[6];let I;return e[7]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsx(Hh,{children:g.jsx(Uh,{children:"Quick Switch"})}),e[7]=I):I=e[7],g.jsxs(Ph,{open:o,onOpenChange:l,children:[O,g.jsxs(Fh,{side:"bottom",className:"max-h-[80vh]",children:[I,g.jsx("div",{className:"mt-4",children:b()})]})]})}const y=zh;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(J1,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Pm,{className:"size-4"})})}),e[8]=x):x=e[8];const k=Bh,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 Bx(t){const e=ge.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,u=n==="overview";let a;e[3]!==u?(a=u?g.jsx(U4,{className:"h-4 w-4"}):g.jsx(F4,{className:"h-4 w-4"}),e[3]=u,e[4]=a):a=e[4];let d;e[5]!==a||e[6]!==l?(d=g.jsx($u,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:l,children:a})}),e[5]=a,e[6]=l,e[7]=d):d=e[7];const f=u?"Single workspace":"Overview";let p;e[8]!==f?(p=g.jsx(Vu,{children:f}),e[8]=f,e[9]=p):p=e[9];let h;return e[10]!==d||e[11]!==p?(h=g.jsx(Yf,{children:g.jsxs(Uu,{children:[d,p]})}),e[10]=d,e[11]=p,e[12]=h):h=e[12],h}function sH(t){const e=ge.c(70),{open:n,onOpenChange:i,editServer:o}=t,{prepareForServerAdd:l,addServer:u,editServer:a}=vc(),[d,f]=D.useState(""),[p,h]=D.useState(""),[_,S]=D.useState(""),[C,w]=D.useState(!1),[v,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]!==u||e[6]!==o||e[7]!==y||e[8]!==d||e[9]!==i||e[10]!==l||e[11]!==_||e[12]!==a||e[13]!==p?(N=je=>{je.preventDefault(),b(null);const Be=d.trim(),De=p.trim(),et=_.trim();if(!Be){b("Name is required");return}if(!De){b("Server URL is required");return}if(!et){b("API token is required");return}if(!rS(et)){b("Token must be 64 hexadecimal characters");return}const it=If(De);y?a(o.id,{name:Be,url:it,token:et}):(l(),u(Be,it,et)),i(!1)},e[5]=u,e[6]=o,e[7]=y,e[8]=d,e[9]=i,e[10]=l,e[11]=_,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(Ac,{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(ld,{children:j}),e[17]=j,e[18]=O):O=e[18];let I;e[19]!==T||e[20]!==O?(I=g.jsxs(Ec,{children:[T,O]}),e[19]=T,e[20]=O,e[21]=I):I=e[21];let V;e[22]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsx(ii,{htmlFor:"server-name",children:"Name"}),e[22]=V):V=e[22];let U;e[23]===Symbol.for("react.memo_cache_sentinel")?(U=je=>f(je.target.value),e[23]=U):U=e[23];let W;e[24]!==d?(W=g.jsxs("div",{className:"grid gap-2",children:[V,g.jsx(Mf,{id:"server-name",value:d,onChange:U,placeholder:"My Server"})]}),e[24]=d,e[25]=W):W=e[25];let K;e[26]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsx(ii,{htmlFor:"server-url",children:"Server URL"}),e[26]=K):K=e[26];let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=je=>h(je.target.value),e[27]=G):G=e[27];let Z;e[28]!==p?(Z=g.jsxs("div",{className:"grid gap-2",children:[K,g.jsx(Mf,{id:"server-url",value:p,onChange:G,placeholder:"localhost:8742"})]}),e[28]=p,e[29]=Z):Z=e[29];let ee;e[30]===Symbol.for("react.memo_cache_sentinel")?(ee=g.jsx(ii,{htmlFor:"server-token",children:"API Token"}),e[30]=ee):ee=e[30];const B=C?"text":"password";let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=je=>S(je.target.value),e[31]=L):L=e[31];let z;e[32]!==B||e[33]!==_?(z=g.jsx(Mf,{id:"server-token",type:B,value:_,onChange:L,placeholder:"64-character hex string",className:"pr-10"}),e[32]=B,e[33]=_,e[34]=z):z=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(S4,{className:"size-4 text-muted-foreground"}):g.jsx(C4,{className:"size-4 text-muted-foreground"}),e[37]=C,e[38]=F):F=e[38];let Q;e[39]!==H||e[40]!==F?(Q=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]=Q):Q=e[41];let te;e[42]!==z||e[43]!==Q?(te=g.jsxs("div",{className:"grid gap-2",children:[ee,g.jsxs("div",{className:"relative",children:[z,Q]})]}),e[42]=z,e[43]=Q,e[44]=te):te=e[44];let X;e[45]!==v?(X=v&&g.jsx("p",{className:"text-sm text-destructive",children:v}),e[45]=v,e[46]=X):X=e[46];let q;e[47]!==W||e[48]!==Z||e[49]!==te||e[50]!==X?(q=g.jsxs("div",{className:"grid gap-4 py-4",children:[W,Z,te,X]}),e[47]=W,e[48]=Z,e[49]=te,e[50]=X,e[51]=q):q=e[51];let $;e[52]!==i?($=g.jsx(Pe,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e[52]=i,e[53]=$):$=e[53];const ne=y?"Save":"Add";let ie;e[54]!==ne?(ie=g.jsx(Pe,{type:"submit",children:ne}),e[54]=ne,e[55]=ie):ie=e[55];let ae;e[56]!==$||e[57]!==ie?(ae=g.jsxs(Lh,{children:[$,ie]}),e[56]=$,e[57]=ie,e[58]=ae):ae=e[58];let se;e[59]!==A||e[60]!==q||e[61]!==ae?(se=g.jsxs("form",{onSubmit:A,children:[q,ae]}),e[59]=A,e[60]=q,e[61]=ae,e[62]=se):se=e[62];let ye;e[63]!==se||e[64]!==I?(ye=g.jsxs(kc,{className:"sm:max-w-[425px]",children:[I,se]}),e[63]=se,e[64]=I,e[65]=ye):ye=e[65];let Re;return e[66]!==i||e[67]!==n||e[68]!==ye?(Re=g.jsx(Cc,{open:n,onOpenChange:i,children:ye}),e[66]=i,e[67]=n,e[68]=ye,e[69]=Re):Re=e[69],Re}const oH=400,aH=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window);var Px;const lH=typeof navigator<"u"&&((Px=navigator.platform)==null?void 0:Px.toUpperCase().includes("MAC"))===!0;function cH(){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&&uH(n))return!0;return!1}function uH(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 dH(){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 fH(t){const e=ge.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 u,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{const d=f=>{if(f.isComposing||f.repeat||f.key==="Escape"&&cH())return;const{onCloseFocusedPanel:p,onFocusChatInput:h,onStopStreaming:_,onOpenSidebar:S,onOpenTerminal:C,onNewWindow:w,onNewSession:v,onToggleViewMode:b}=n.current;if(f.shiftKey&&f.key==="Escape"){f.preventDefault(),p();return}if(f.key==="Escape"&&!f.metaKey&&!f.ctrlKey){const N=dH(),A=Date.now(),{lastEscTime:M,armed:T}=l.current,j=A-M;if(N&&T&&j<oH){f.preventDefault(),l.current={lastEscTime:0,armed:!1},_();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(!aH||!lH){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(),v();return}if(k&&f.code==="KeyO"){f.preventDefault(),b();return}}};return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},a=[],e[3]=u,e[4]=a):(u=e[3],a=e[4]),D.useEffect(u,a)}const hH="/assets/chat-finish-Kb8mnIhV.mp3",pH="/assets/chat-permission-BltPnMpz.mp3";function mH(){const t=ge.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(hH));const d=e.current;d.currentTime=0,d.play().catch(vH)}catch(d){const f=d,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(pH));const d=n.current;d.currentTime=0,d.play().catch(gH)}catch(d){const f=d,p=f instanceof Error?f.message:String(f);console.debug("Error initializing permission sound:",p)}},t[1]=l):l=t[1];const u=l;let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a={playChatFinishSound:o,playPermissionSound:u},t[2]=a):a=t[2],a}function gH(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play permission sound:",e)}function vH(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play notification sound:",e)}const _H=(t,e)=>t&&e?`ws://${e}/ws?token=${t}`:null,Eg=t=>t?`http://${t}/api`:null;function yH(t){const e=ge.c(24),{onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseTerminal:l,focusChatInput:u,setTerminalOpen:a,sidebarRef:d,terminalPanelRef:f,onStopStreaming:p}=t,{setOpen:h}=dd();let _;e[0]!==h||e[1]!==d?(_=()=>{h(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=d.current)==null||O.focusSessionPanel()})})},e[0]=h,e[1]=d,e[2]=_):_=e[2];const S=_;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,v=D.useRef(S);let b;e[6]!==S?(b=()=>{v.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=()=>v.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]!==u||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:u,onStopStreaming:p},e[15]=u,e[16]=n,e[17]=i,e[18]=p,e[19]=o,e[20]=A,e[21]=M):M=e[21],fH(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 I=!1;const V=[];return(async()=>{try{const W=await Fy("jean2://accelerator/open-sidebar",()=>{v.current()});if(I){W();return}V.push(W)}catch(W){console.error("Failed to register open-sidebar accelerator listener:",W)}try{const W=await Fy("jean2://accelerator/open-terminal",()=>{y.current()});if(I){W();return}V.push(W)}catch(W){console.error("Failed to register open-terminal accelerator listener:",W)}})(),()=>{I=!0,V.forEach(bH)}},T=[],e[22]=T,e[23]=j):(T=e[22],j=e[23]),D.useEffect(j,T),null}function bH(t){return t()}function xH(){var vd,zc,Bc,Cl,mr,va,Jn,hs,kl,_a,ya;const t=ge.c(424),{servers:e,activeServer:n,addServer:i,removeServer:o,isSwitching:l,clearSwitchingState:u,quickConnections:a,isAddingServerRef:d,prepareForServerAdd:f,removeFromQuickConnectionsByWorkspace:p}=vc();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const[_,S]=D.useState(h);let C;t[1]===Symbol.for("react.memo_cache_sentinel")?(C=[],t[1]=C):C=t[1];const[w,v]=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,I]=D.useState(j);let V;t[5]===Symbol.for("react.memo_cache_sentinel")?(V=new Map,t[5]=V):V=t[5];const U=D.useRef(V),W=D.useRef(0),[K,G]=D.useState(null),Z=D.useRef(null),ee=D.useRef(null),B=D.useRef(null),L=D.useRef(null),z=D.useRef(null),[H,F]=D.useState(!1);let Q;t[6]===Symbol.for("react.memo_cache_sentinel")?(Q=[],t[6]=Q):Q=t[6];const te=D.useRef(Q),[X,q]=D.useState(rU);let $;t[7]===Symbol.for("react.memo_cache_sentinel")?($={promptTokens:0,completionTokens:0,totalTokens:0},t[7]=$):$=t[7];const[ne,ie]=D.useState($),[ae,se]=D.useState("gpt-4o"),[ye,Re]=D.useState(null);let je;t[8]===Symbol.for("react.memo_cache_sentinel")?(je=[],t[8]=je):je=t[8];const[Be,De]=D.useState(je),[et,it]=D.useState("gpt-4o");let ut,ot;t[9]!==ae||t[10]!==Be||t[11]!==ye?(ot=()=>{var Ae;const J=(Ae=Be.find(Ge=>Ge.id===ae))==null?void 0:Ae.variants;ye&&J&&!J[ye]&&Re(null)},ut=[ae,ye,Be],t[9]=ae,t[10]=Be,t[11]=ye,t[12]=ut,t[13]=ot):(ut=t[12],ot=t[13]),D.useEffect(ot,ut);let mt;t[14]===Symbol.for("react.memo_cache_sentinel")?(mt=[],t[14]=mt):mt=t[14];const[Ze,tt]=D.useState(mt),[ue,de]=D.useState(null),[xe,_e]=D.useState(!1),[Te,Oe]=D.useState(!1),[We,Fe]=D.useState(!1),[He,dt]=D.useState(!1),[ft,ke]=D.useState(nU),[Ue,ct]=D.useState(tU),[bt,qt]=D.useState(eU);let Ut;t[15]===Symbol.for("react.memo_cache_sentinel")?(Ut=[],t[15]=Ut):Ut=t[15];const[on,Zt]=D.useState(Ut);let Nn;t[16]===Symbol.for("react.memo_cache_sentinel")?(Nn=[],t[16]=Nn):Nn=t[16];const[tn,Wt]=D.useState(Nn);let un;t[17]===Symbol.for("react.memo_cache_sentinel")?(un={},t[17]=un):un=t[17];const[dn,$n]=D.useState(un);let Ri;t[18]===Symbol.for("react.memo_cache_sentinel")?(Ri=[],t[18]=Ri):Ri=t[18];const[Dn,ai]=D.useState(Ri),[Xn,$r]=D.useState(null),[ir,Ti]=D.useState(!1),[Cr,sr]=D.useState(null),[Et,Bt]=D.useState(!1),[an,vn]=D.useState(0),[Ni,Vr]=D.useState(0),[or,En]=D.useState(0),ar=(vd=k==null?void 0:k.compacting)!=null?vd:!1,[lr,Mn]=D.useState(!1);let jn;t[19]===Symbol.for("react.memo_cache_sentinel")?(jn=new Set,t[19]=jn):jn=t[19];const[Qn,Lt]=D.useState(jn);let li;t[20]===Symbol.for("react.memo_cache_sentinel")?(li=new Set,t[20]=li):li=t[20];const ts=D.useRef(li);let _n;t[21]===Symbol.for("react.memo_cache_sentinel")?(_n=new Map,t[21]=_n):_n=t[21];const Dt=D.useRef(_n),{playChatFinishSound:kr,playPermissionSound:ci}=mH(),Di=D.useRef(!1);let ui;t[22]===Symbol.for("react.memo_cache_sentinel")?(ui=new Set,t[22]=ui):ui=t[22];const Zn=D.useRef(ui);let cr;t[23]===Symbol.for("react.memo_cache_sentinel")?(cr=new Set,t[23]=cr):cr=t[23];const nn=D.useRef(cr);let Yt,di;t[24]!==Ue||t[25]!==kr||t[26]!==_||t[27]!==X?(Yt=()=>{if(!Di.current){Zn.current=new Set(X),Di.current=!0;return}const Ae=[...Zn.current].filter(Ge=>!X.has(Ge));for(const Ge of Ae){if(nn.current.has(Ge))continue;const Ke=_.find(le=>le.id===Ge);if((Ke==null?void 0:Ke.parentId)===null&&Ue){kr();break}}Zn.current=new Set(X);for(const Ge of Ae)nn.current.delete(Ge)},di=[X,kr,_,Ue],t[24]=Ue,t[25]=kr,t[26]=_,t[27]=X,t[28]=Yt,t[29]=di):(Yt=t[28],di=t[29]),D.useEffect(Yt,di);let qr,Fs;t[30]!==ft?(qr=()=>{localStorage.setItem("jean2_sidebar_view",ft)},Fs=[ft],t[30]=ft,t[31]=qr,t[32]=Fs):(qr=t[31],Fs=t[32]),D.useEffect(qr,Fs);let Go,ns;t[33]!==Ue?(Go=()=>{localStorage.setItem("jean2_sound_chat_finish_enabled",String(Ue))},ns=[Ue],t[33]=Ue,t[34]=Go,t[35]=ns):(Go=t[34],ns=t[35]),D.useEffect(Go,ns);let Ka,On;t[36]!==bt?(Ka=()=>{localStorage.setItem("jean2_sound_permission_enabled",String(bt))},On=[bt],t[36]=bt,t[37]=Ka,t[38]=On):(Ka=t[37],On=t[38]),D.useEffect(Ka,On);let Hs;t[39]!==(k==null?void 0:k.id)||t[40]!==M?(Hs=()=>{const J=Object.keys(M).length;if(J<=W.current){W.current=J;return}if(W.current=J,J<=10)return;const Ae=Object.keys(M);for(;Ae.length>10;){let Ge=null,Ke=1/0;for(const le of Ae){if(le===(k==null?void 0:k.id))continue;const me=U.current.get(le);me!==void 0&&me<Ke&&(Ke=me,Ge=le)}if(!Ge)break;U.current.delete(Ge),Ae.splice(Ae.indexOf(Ge),1),T(le=>{if(!(Ge in le))return le;const me={...le};return delete me[Ge],me}),I(le=>{if(!(Ge in le))return le;const me={...le};return delete me[Ge],me})}},t[39]=k==null?void 0:k.id,t[40]=M,t[41]=Hs):Hs=t[41];let Ko;t[42]!==k||t[43]!==M?(Ko=[M,k],t[42]=k,t[43]=M,t[44]=Ko):Ko=t[44],D.useLayoutEffect(Hs,Ko);const Us=D.useRef(null),fi=D.useRef(null),Dc=D.useRef(null),[,Ya]=D.useState(!1),Qe=(zc=n==null?void 0:n.token)!=null?zc:null,Je=(Bc=n==null?void 0:n.url)!=null?Bc:null;let Yo,Xo;t[45]!==K?(Yo=()=>{Z.current=K},Xo=[K],t[45]=K,t[46]=Yo,t[47]=Xo):(Yo=t[46],Xo=t[47]),D.useEffect(Yo,Xo);let $s;t[48]!==(k==null?void 0:k.id)?($s=()=>{var J;ee.current=(J=k==null?void 0:k.id)!=null?J:null},t[48]=k==null?void 0:k.id,t[49]=$s):$s=t[49];let Xa;t[50]!==k?(Xa=[k],t[50]=k,t[51]=Xa):Xa=t[51],D.useEffect($s,Xa);const Qa=D.useRef(null),rs=D.useRef(!1);let ur;t[52]!==i||t[53]!==f?(ur=J=>{f(),i(J.name,J.url,J.token)},t[52]=i,t[53]=f,t[54]=ur):ur=t[54];const Vs=ur;let qs;t[55]!==n||t[56]!==o?(qs=()=>{n&&o(n.id),Z.current&&Z.current.close(),G(null),F(!1),Bt(!1),vn(0),Vr(0)},t[55]=n,t[56]=o,t[57]=qs):qs=t[57];const Jt=qs;let hi;t[58]===Symbol.for("react.memo_cache_sentinel")?(hi=()=>{vn(JH),Bt(!1),Vr(0)},t[58]=hi):hi=t[58];const md=hi;let Ws;t[59]===Symbol.for("react.memo_cache_sentinel")?(Ws=()=>{Z.current&&Z.current.close(),G(null),F(!1),Bt(!1),vn(0),Vr(0),S([]),v([]),N(null),T({}),I({}),U.current.clear(),W.current=0,q(J=>(nn.current=new Set(J),new Set)),ie({promptTokens:0,completionTokens:0,totalTokens:0}),se("gpt-4o"),De([]),tt([]),de(null),Zt([]),Wt([]),$n({}),Dt.current.clear(),En(ZH)},t[59]=Ws):Ws=t[59];const Gs=Ws;let Mi;t[60]!==(n==null?void 0:n.id)||t[61]!==d?(Mi=()=>{var J;(n==null?void 0:n.id)!==Dc.current&&d.current&&(d.current=!1,Dc.current=(J=n==null?void 0:n.id)!=null?J:null,Gs())},t[60]=n==null?void 0:n.id,t[61]=d,t[62]=Mi):Mi=t[62];let dr;t[63]!==n||t[64]!==d?(dr=[n,Gs,d],t[63]=n,t[64]=d,t[65]=dr):dr=t[65],D.useEffect(Mi,dr);let Ks;t[66]!==Qe||t[67]!==Jt?(Ks=async(J,Ae)=>{const Ge=Ae===void 0?{}:Ae;if(!Qe)throw new Error("No API token available");const Ke=new Headers(Ge.headers||{});Ke.set("Authorization",`Bearer ${Qe}`);const le=await fetch(J,{...Ge,signal:Ge.signal,headers:Ke});if(le.status===401)throw $r("Authentication failed. Your token may have been regenerated."),Jt(),new Error("Unauthorized");return le},t[66]=Qe,t[67]=Jt,t[68]=Ks):Ks=t[68];const en=Ks;let Er;t[69]!==M||t[70]!==O?(Er=J=>{const Ae=M[J]||[],Ge=O[J]||{};return Ae.map(Ke=>({message:Ke,parts:(Ge[Ke.id]||[]).sort(QH)}))},t[69]=M,t[70]=O,t[71]=Er):Er=t[71];const Qo=Er;let is;t[72]!==Qe||t[73]!==Jt||t[74]!==Je?(is=()=>{if(!Qe||!Je)return;const J=_H(Qe,Je);if(!J)return;const Ae=new WebSocket(J);return Ae.onopen=()=>{F(!0),$r(null),vn(0),Bt(!1),Wt([]),ee.current&&Ae.send(JSON.stringify({type:"session.resume",sessionId:ee.current})),Ae.send(JSON.stringify({type:"permissions.sync"}))},Ae.onclose=Ge=>{F(!1),(Ge.code===1008||Ge.code===401)&&($r("Authentication failed. Please check your token."),Jt())},Ae.onerror=XH,Ae.onmessage=Ge=>{var le;const Ke=JSON.parse(Ge.data);(le=Qa.current)==null||le.call(Qa,Ke)},G(Ae),()=>Ae.close()},t[72]=Qe,t[73]=Jt,t[74]=Je,t[75]=is):is=t[75];let Zo;t[76]!==Qe||t[77]!==Jt||t[78]!==or||t[79]!==Je?(Zo=[Qe,Je,Jt,or],t[76]=Qe,t[77]=Jt,t[78]=or,t[79]=Je,t[80]=Zo):Zo=t[80],D.useEffect(is,Zo);let ss,os;t[81]!==Qe||t[82]!==H||t[83]!==Et||t[84]!==Je?(ss=()=>{if(Qe&&Je&&!H&&!Et){const J=setTimeout(()=>{H||Bt(!0)},1e4);return()=>clearTimeout(J)}},os=[Qe,Je,H,Et],t[81]=Qe,t[82]=H,t[83]=Et,t[84]=Je,t[85]=ss,t[86]=os):(ss=t[85],os=t[86]),D.useEffect(ss,os);let Jo,yn;t[87]!==Qe||t[88]!==H||t[89]!==Et||t[90]!==an||t[91]!==Je?(Jo=()=>{if(Et&&!H&&Qe&&Je){const J=Math.min(1e3*Math.pow(2,an),3e4);let Ae=Math.floor(J/1e3);Vr(Ae);const Ge=setInterval(()=>{Ae=Ae-1,Vr(Math.max(0,Ae))},1e3),Ke=setTimeout(()=>{vn(YH),En(KH)},J);return()=>{clearInterval(Ge),clearTimeout(Ke)}}},yn=[Et,H,Qe,Je,an],t[87]=Qe,t[88]=H,t[89]=Et,t[90]=an,t[91]=Je,t[92]=Jo,t[93]=yn):(Jo=t[92],yn=t[93]),D.useEffect(Jo,yn);let Wr,as;t[94]!==Qe||t[95]!==Je?(Wr=()=>{const J=()=>{if(document.visibilityState!=="visible")return;const Ae=Z.current;!Ae||!Qe||!Je||(Ae.readyState===WebSocket.OPEN?(Ae.onclose=null,Ae.close(),F(!1),vn(0),Bt(!1),En(GH)):(Ae.readyState===WebSocket.CLOSED||Ae.readyState===WebSocket.CLOSING)&&(F(!1),vn(0),Bt(!1),En(WH)))};return document.addEventListener("visibilitychange",J),()=>document.removeEventListener("visibilitychange",J)},as=[Qe,Je],t[94]=Qe,t[95]=Je,t[96]=Wr,t[97]=as):(Wr=t[96],as=t[97]),D.useEffect(Wr,as);let ji,Za;t[98]!==Qe||t[99]!==Je?(ji=()=>{const J=()=>{if(!Qe||!Je)return;const Ae=Z.current;Ae&&Ae.readyState===WebSocket.OPEN||(F(!1),vn(0),Bt(!1),En(qH))};return window.addEventListener("online",J),()=>window.removeEventListener("online",J)},Za=[Qe,Je],t[98]=Qe,t[99]=Je,t[100]=ji,t[101]=Za):(ji=t[100],Za=t[101]),D.useEffect(ji,Za);let Ys;t[102]!==Qe||t[103]!==u||t[104]!==en||t[105]!==Je?(Ys=()=>{var Ge;if(!Qe||!Je)return;(Ge=Us.current)==null||Ge.abort(),Us.current=new AbortController;const J=Us.current.signal,Ae=Eg(Je);if(Ae)return Ya(!0),Promise.all([en(`${Ae}/sessions`,{signal:J}).then(VH),en(`${Ae}/preconfigs`,{signal:J}).then($H),en(`${Ae}/prompts`,{signal:J}).then(UH),en(`${Ae}/models`,{signal:J}).then(HH),en(`${Ae}/workspaces`,{signal:J}).then(FH),en(`${Ae}/providers`,{signal:J}).then(PH)]).then(Ke=>{const[le,me,Me,rt,Tt,Xr]=Ke;S(le.sessions||[]),v(me.preconfigs||[]),x(Me.prompts||[]),De(rt.models||[]),it(rt.defaultModel||"gpt-4o"),ai(Xr.providers||[]);const Vn=Tt.workspaces||[];if(tt(Vn),fi.current){const In=Vn.find(Qr=>Qr.id===fi.current);In&&de(In),fi.current=null}else{const In=localStorage.getItem("activeWorkspaceId"),Qr=Vn.find(ao=>ao.id===In);de(Qr||Vn[0])}u(),Ya(!1)}).catch(Ke=>{var le;if(Ke.name==="AbortError"){console.log("Fetch aborted due to server switch");return}console.error("Failed to load server data:",Ke),Ya(!1),(le=Ke.message)!=null&&le.includes("Unauthorized")||$r("Failed to connect to server")}),()=>{var Ke;(Ke=Us.current)==null||Ke.abort()}},t[102]=Qe,t[103]=u,t[104]=en,t[105]=Je,t[106]=Ys):Ys=t[106];let Xs;t[107]!==Qe||t[108]!==u||t[109]!==en||t[110]!==or||t[111]!==Je?(Xs=[Qe,Je,en,u,or],t[107]=Qe,t[108]=u,t[109]=en,t[110]=or,t[111]=Je,t[112]=Xs):Xs=t[112],D.useEffect(Ys,Xs);let Oi,ls;t[113]!==ue?(Oi=()=>{ue&&localStorage.setItem("activeWorkspaceId",ue.id)},ls=[ue],t[113]=ue,t[114]=Oi,t[115]=ls):(Oi=t[114],ls=t[115]),D.useEffect(Oi,ls);let ea;t[116]!==en||t[117]!==Je?(ea=async(J,Ae,Ge)=>{const Ke=Eg(Je);if(!Ke)return;const Me=(await(await en(`${Ke}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:J,path:Ae,isVirtual:Ge})})).json()).workspace;return tt(rt=>[...rt,Me]),de(Me),N(null),Me},t[116]=en,t[117]=Je,t[118]=ea):ea=t[118];const Qs=ea;let Ja;t[119]===Symbol.for("react.memo_cache_sentinel")?(Ja=J=>{de(J),N(null)},t[119]=Ja):Ja=t[119];const Qh=Ja;let Zs;t[120]===Symbol.for("react.memo_cache_sentinel")?(Zs=J=>{fi.current=J},t[120]=Zs):Zs=t[120];const gd=Zs;let el;t[121]!==(ue==null?void 0:ue.id)||t[122]!==k||t[123]!==en||t[124]!==p||t[125]!==Je?(el=async J=>{const Ae=Eg(Je);if(!Ae)return;const Ge=await en(`${Ae}/workspaces/${J}`,{method:"DELETE"});if(!Ge.ok){const le=await Ge.json().catch(BH);console.error("Failed to delete workspace:",le.message);return}const{deletedSessions:Ke}=await Ge.json();p(J),k&&(k.workspaceId===J||Ke.includes(k.id))&&N(null),S(le=>le.filter(me=>!Ke.includes(me.id))),T(le=>{const me={...le};return Ke.forEach(Me=>delete me[Me]),me}),I(le=>{const me={...le};return Ke.forEach(Me=>delete me[Me]),me}),Ke.forEach(le=>U.current.delete(le));for(const[le,me]of Dt.current)Ke.includes(me.sessionId)&&Dt.current.delete(le);tt(le=>{const me=le.filter(Me=>Me.id!==J);return(ue==null?void 0:ue.id)===J&&de(me[0]||null),me})},t[121]=ue==null?void 0:ue.id,t[122]=k,t[123]=en,t[124]=p,t[125]=Je,t[126]=el):el=t[126];const ta=el;let tl;t[127]!==Qs||t[128]!==Ze.length?(tl=async()=>{const J=`Workspace ${Ze.length+1}`,Ae=`~/.jean2/workspaces/${crypto.randomUUID()}`;await Qs(J,Ae,!0)},t[127]=Qs,t[128]=Ze.length,t[129]=tl):tl=t[129];const na=tl;let ra;t[130]!==Qs?(ra=async J=>{const Ae=J.split("/").pop()||J.split("\\").pop()||"Workspace";await Qs(Ae,J,!1)},t[130]=Qs,t[131]=ra):ra=t[131];const ia=ra;let nl;t[132]!==(k==null?void 0:k.id)||t[133]!==et||t[134]!==Qn||t[135]!==Be||t[136]!==bt||t[137]!==ci?(nl=J=>{var Ae,Ge,Ke;e:switch(J.type){case"session.created":{S(le=>[J.session,...le]),rs.current&&(N(J.session),T(le=>({...le,[J.session.id]:[]})),I(le=>({...le,[J.session.id]:{}})),ie({promptTokens:0,completionTokens:0,totalTokens:0}),se(J.session.selectedModel||et),Re((Ae=J.session.selectedVariant)!=null?Ae:null),rs.current=!1),U.current.set(J.session.id,Date.now());break e}case"session.resumed":{if(N(J.session),Lt(Me=>{const rt=new Set(Me);return rt.delete(J.session.id),rt}),J.isRunning?q(Me=>{const rt=new Set(Me);return rt.add(J.session.id),rt}):q(Me=>{if(Me.has(J.session.id)){nn.current.add(J.session.id);const rt=new Set(Me);return rt.delete(J.session.id),rt}return Me}),J.messages){T(Me=>({...Me,[J.session.id]:J.messages.map(zH)})),I(Me=>{const rt={...Me};rt[J.session.id]={};for(const Tt of J.messages)rt[J.session.id][Tt.message.id]=Tt.parts;return rt});for(const[Me,rt]of Dt.current)rt.sessionId===J.session.id&&Dt.current.delete(Me);for(const Me of J.messages)for(let rt=0;rt<Me.parts.length;rt++)Dt.current.set(Me.parts[rt].id,{sessionId:J.session.id,messageId:Me.message.id,index:rt})}ie((Ge=J.usage)!=null?Ge:{promptTokens:0,completionTokens:0,totalTokens:0}),se(J.session.selectedModel||et),Re(J.session.selectedVariant||null);const le=J.session.selectedModel||et,me=(Ke=Be.find(Me=>Me.id===le))==null?void 0:Ke.variants;J.session.selectedVariant&&me&&!me[J.session.selectedVariant]&&Re(null),U.current.set(J.session.id,Date.now());break e}case"message.created":{T(le=>({...le,[J.message.sessionId]:[...le[J.message.sessionId]||[],J.message]})),I(le=>({...le,[J.message.sessionId]:{...le[J.message.sessionId],[J.message.id]:[]}})),"status"in J.message&&J.message.status==="streaming"&&(q(le=>{const me=new Set(le);return me.add(J.message.sessionId),me}),Lt(le=>{const me=new Set(le);return me.delete(J.message.sessionId),me}));break e}case"message.updated":{T(le=>({...le,[J.message.sessionId]:(le[J.message.sessionId]||[]).map(me=>me.id===J.message.id?J.message:me)})),"status"in J.message&&J.message.status!=="streaming"&&q(le=>{if(le.has(J.message.sessionId)){const me=new Set(le);return me.delete(J.message.sessionId),me}return le});break e}case"part.created":{I(me=>{const Me=me[J.sessionId]||{},rt=Me[J.part.messageId]||[];return{...me,[J.sessionId]:{...Me,[J.part.messageId]:[...rt,J.part]}}});let le=0;for(const me of Dt.current.values())me.sessionId===J.sessionId&&me.messageId===J.part.messageId&&(le=Math.max(le,me.index+1));Dt.current.set(J.part.id,{sessionId:J.sessionId,messageId:J.part.messageId,index:le});break e}case"part.updated":{const le=Dt.current.get(J.part.id);I(le?me=>{const Me=me[le.sessionId];if(!Me)return me;const rt=Me[le.messageId];if(!rt)return me;const Tt=[...rt];return Tt[le.index]=J.part,{...me,[le.sessionId]:{...Me,[le.messageId]:Tt}}}:me=>{const Me=me[J.sessionId]||{},rt=Me[J.part.messageId]||[];return{...me,[J.sessionId]:{...Me,[J.part.messageId]:rt.map(Tt=>Tt.id===J.part.id?J.part:Tt)}}});break e}case"part.append":{Qn.has(J.sessionId)||q(le=>{if(!le.has(J.sessionId)){const me=new Set(le);return me.add(J.sessionId),me}return le}),I(le=>{const me=Dt.current.get(J.partId);if(!me)return le;const Me=le[me.sessionId];if(!Me)return le;const rt=Me[me.messageId];if(!rt)return le;const Tt=rt[me.index];if(!Tt||Tt.type!=="text"&&Tt.type!=="reasoning")return le;const Xr=[...rt];return Xr[me.index]={...Tt,text:Tt.text+J.delta},{...le,[me.sessionId]:{...Me,[me.messageId]:Xr}}});break e}case"chat.usage":{if(J.sessionId!==(k==null?void 0:k.id))return;ie({promptTokens:J.usage.promptTokens,completionTokens:J.usage.completionTokens,totalTokens:J.usage.totalTokens}),se(J.model);break e}case"error":{console.error("Server error:",J.code,J.message);break e}case"session.closed":{S(le=>le.map(me=>me.id===J.sessionId?{...me,status:"closed"}:me)),T(le=>{const me={...le};return delete me[J.sessionId],me}),I(le=>{const me={...le};return delete me[J.sessionId],me});for(const[le,me]of Dt.current)me.sessionId===J.sessionId&&Dt.current.delete(le);U.current.delete(J.sessionId),(k==null?void 0:k.id)===J.sessionId&&N(null);break e}case"session.reopened":{S(le=>le.map(me=>me.id===J.session.id?J.session:me)),(k==null?void 0:k.id)===J.session.id&&N(J.session);break e}case"session.deleted":{S(le=>le.filter(me=>me.id!==J.sessionId)),T(le=>{const me={...le};return delete me[J.sessionId],me}),I(le=>{const me={...le};return delete me[J.sessionId],me}),Lt(le=>{const me=new Set(le);return me.delete(J.sessionId),me});for(const[le,me]of Dt.current)me.sessionId===J.sessionId&&Dt.current.delete(le);U.current.delete(J.sessionId),(k==null?void 0:k.id)===J.sessionId&&N(null);break e}case"session.updated":{S(le=>le.map(me=>me.id===J.session.id?J.session:me)),(k==null?void 0:k.id)===J.session.id&&(N(J.session),J.session.selectedVariant!==void 0&&Re(J.session.selectedVariant));break e}case"session.renamed":{S(le=>le.map(me=>me.id===J.session.id?J.session:me)),(k==null?void 0:k.id)===J.session.id&&N(J.session);break e}case"permission.list":{Zt(J.permissions);break e}case"permissions.sync":{Wt(le=>{const me=new Set(le.map(IH)),Me=J.approvals.filter(rt=>!me.has(rt.toolCallId)).map(LH);return[...le,...Me]});break e}case"permission.revoked":{Zt(le=>le.map(me=>me.id===J.permissionId?{...me,revokedAt:new Date().toISOString()}:me));break e}case"permission.all_revoked":{Zt(OH);break e}case"permission.request":{const le={toolCallId:J.toolCallId,sessionId:J.sessionId,toolName:J.toolName,args:J.args,permissionType:J.permissionType,permissionKey:J.permissionKey,message:J.message,details:J.details,dangerous:J.dangerous,childSessionId:J.childSessionId,subagentName:J.subagentName};Wt(Me=>[...Me,le]);const me=te.current.find(Me=>Me.id===J.sessionId);(me==null?void 0:me.parentId)===null&&bt&&!ts.current.has(J.toolCallId)&&(ci(),ts.current.add(J.toolCallId));break e}case"permission.granted":{Wt(le=>le.filter(me=>me.toolCallId!==J.toolCallId));break e}case"session.interrupted":{Lt(le=>new Set(le).add(J.sessionId)),nn.current.add(J.sessionId),q(le=>{if(le.has(J.sessionId)){const me=new Set(le);return me.delete(J.sessionId),me}return le}),J.result.cascadedTo.length>0&&console.log(`Session ${J.sessionId} interrupted. Cascaded to:`,J.result.cascadedTo);break e}case"queue.list":{$n(le=>({...le,[J.sessionId]:J.messages}));break e}case"queue.added":{$n(le=>({...le,[J.sessionId]:[...le[J.sessionId]||[],J.message]}));break e}case"queue.removed":{$n(le=>({...le,[J.sessionId]:(le[J.sessionId]||[]).filter(me=>me.id!==J.queueId)}));break e}case"queue.sending":{$n(le=>({...le,[J.sessionId]:(le[J.sessionId]||[]).filter(me=>me.id!==J.queueId)}));break e}case"session.reverted":{console.log(`Session reverted to message ${J.revertedTo.messageId}, removed ${J.removed.messageIds.length} messages`);break e}case"compaction.complete":{J.sessionId===(k==null?void 0:k.id)&&Mn(!0);break e}case"session.forked":{const{forkedSession:le,messages:me}=J;S(Me=>[le,...Me]),T(Me=>({...Me,[le.id]:me.map(jH)})),I(Me=>{const rt={...Me};rt[le.id]={};for(const Tt of me)rt[le.id][Tt.message.id]=Tt.parts;return rt});for(const Me of me)for(let rt=0;rt<Me.parts.length;rt++)Dt.current.set(Me.parts[rt].id,{sessionId:le.id,messageId:Me.message.id,index:rt});N(le),ie({promptTokens:0,completionTokens:0,totalTokens:0}),U.current.set(le.id,Date.now());break e}case"session.state":{T(le=>({...le,[J.sessionId]:J.messages.map(MH)})),I(le=>{const me={...le};me[J.sessionId]={};for(const Me of J.messages)me[J.sessionId][Me.message.id]=Me.parts;return me});for(const[le,me]of Dt.current)me.sessionId===J.sessionId&&Dt.current.delete(le);for(const le of J.messages)for(let me=0;me<le.parts.length;me++)Dt.current.set(le.parts[me].id,{sessionId:J.sessionId,messageId:le.message.id,index:me});nn.current.add(J.sessionId),q(le=>{if(le.has(J.sessionId)){const me=new Set(le);return me.delete(J.sessionId),me}return le}),U.current.set(J.sessionId,Date.now());break e}case"provider.status":{ai(le=>le.find(Me=>Me.provider===J.provider)?le.map(Me=>Me.provider===J.provider?{...Me,connected:J.connected,authorizationUrl:J.authorizationUrl,error:J.error}:Me):[...le,{provider:J.provider,connected:J.connected,authorizationUrl:J.authorizationUrl,error:J.error}]);break e}case"provider.connected":ai(le=>le.map(me=>me.provider===J.provider?{...me,connected:J.connected,connectedAt:J.connectedAt,accountId:J.accountId}:me))}},t[132]=k==null?void 0:k.id,t[133]=et,t[134]=Qn,t[135]=Be,t[136]=bt,t[137]=ci,t[138]=nl):nl=t[138];const rl=nl;let il,Js;t[139]!==_?(il=()=>{te.current=_},Js=[_],t[139]=_,t[140]=il,t[141]=Js):(il=t[140],Js=t[141]),D.useLayoutEffect(il,Js);let sl,ol;t[142]!==rl?(sl=()=>{Qa.current=rl},ol=[rl],t[142]=rl,t[143]=sl,t[144]=ol):(sl=t[143],ol=t[144]),D.useEffect(sl,ol);let al;t[145]!==K?(al=(J,Ae)=>{K&&K.readyState===WebSocket.OPEN&&K.send(JSON.stringify({type:J,...Ae}))},t[145]=K,t[146]=al):al=t[146];const ze=al;let ll;t[147]!==(ue==null?void 0:ue.id)||t[148]!==ze?(ll=(J,Ae)=>{rs.current=!0,ze("session.create",{preconfigId:J,title:Ae,workspaceId:ue==null?void 0:ue.id})},t[147]=ue==null?void 0:ue.id,t[148]=ze,t[149]=ll):ll=t[149];const Li=ll;let cl;t[150]!==(ue==null?void 0:ue.id)||t[151]!==ze||t[152]!==_||t[153]!==Ze?(cl=J=>{Wt(Ge=>Ge.filter(Ke=>Ke.sessionId!==J)),q(Ge=>{if(Ge.size>0)for(const Ke of Ge)nn.current.add(Ke);return new Set}),Mn(!1),U.current.set(J,Date.now());const Ae=_.find(Ge=>Ge.id===J);if(Ae!=null&&Ae.workspaceId&&Ae.workspaceId!==(ue==null?void 0:ue.id)){const Ge=Ze.find(Ke=>Ke.id===Ae.workspaceId);Ge&&de(Ge)}ze("session.resume",{sessionId:J})},t[150]=ue==null?void 0:ue.id,t[151]=ze,t[152]=_,t[153]=Ze,t[154]=cl):cl=t[154];const pi=cl;let ul;t[155]!==ze?(ul=J=>{ze("session.close",{sessionId:J})},t[155]=ze,t[156]=ul):ul=t[156];const sa=ul;let dl;t[157]!==ze?(dl=(J,Ae)=>{ze("session.revert",{sessionId:J,messageId:Ae})},t[157]=ze,t[158]=dl):dl=t[158];const Mc=dl;let fl;t[159]!==ze?(fl=(J,Ae)=>{ze("session.fork",{sessionId:J,messageId:Ae})},t[159]=ze,t[160]=fl):fl=t[160];const oa=fl;let Ii;t[161]!==ze?(Ii=J=>{ze("session.compact",{sessionId:J})},t[161]=ze,t[162]=Ii):Ii=t[162];const jc=Ii;let aa;t[163]!==ze?(aa=J=>{ze("session.reopen",{sessionId:J})},t[163]=ze,t[164]=aa):aa=t[164];const eo=aa;let la;t[165]!==ze?(la=J=>{ze("session.delete",{sessionId:J})},t[165]=ze,t[166]=la):la=t[166];const to=la;let ca;t[167]!==k||t[168]!==ze?(ca=J=>{k&&ze("session.update",{sessionId:k.id,preconfigId:J})},t[167]=k,t[168]=ze,t[169]=ca):ca=t[169];const zi=ca;let hl;t[170]!==k||t[171]!==ze?(hl=(J,Ae)=>{se(J),Re(null),k&&ze("session.update_model",{sessionId:k.id,modelId:J,providerId:Ae})},t[170]=k,t[171]=ze,t[172]=hl):hl=t[172];const Oc=hl;let pl;t[173]!==ae||t[174]!==k||t[175]!==ze?(pl=J=>{k&&(ze("session.update_model",{sessionId:k.id,modelId:k.selectedModel||ae,providerId:k.selectedProvider||"openai",variant:J}),Re(J))},t[173]=ae,t[174]=k,t[175]=ze,t[176]=pl):pl=t[176];const ml=pl;let ua;t[177]!==ze?(ua=(J,Ae)=>{ze("session.rename",{sessionId:J,title:Ae})},t[177]=ze,t[178]=ua):ua=t[178];const Gr=ua;let Bi;t[179]!==k||t[180]!==pi?(Bi=()=>{k!=null&&k.parentId&&pi(k.parentId)},t[179]=k,t[180]=pi,t[181]=Bi):Bi=t[181];const Lc=Bi;let cs;t[182]!==ze?(cs=(J,Ae)=>{ze("queue.add",{sessionId:J,content:Ae})},t[182]=ze,t[183]=cs):cs=t[183];const gl=cs;let da;t[184]!==ze?(da=J=>{ze("queue.remove",{queueId:J})},t[184]=ze,t[185]=da):da=t[185];const fa=da;let no;t[186]!==gl||t[187]!==k||t[188]!==ar||t[189]!==ze||t[190]!==X?(no=J=>{!k||ar||(k.runningAt||X.has(k.id)?gl(k.id,J):ze("chat.message",{sessionId:k.id,content:J}))},t[186]=gl,t[187]=k,t[188]=ar,t[189]=ze,t[190]=X,t[191]=no):no=t[191];const vl=no;let ha;t[192]!==ze?(ha=(J,Ae,Ge)=>{Wt(Ke=>Ke.filter(le=>le.toolCallId!==J)),ze("permission.response",{toolCallId:J,allowed:Ae,alwaysAllow:Ge})},t[192]=ze,t[193]=ha):ha=t[193];const _l=ha;let yl;t[194]!==k||t[195]!==ze?(yl=()=>{k&&ze("session.interrupt",{sessionId:k.id})},t[194]=k,t[195]=ze,t[196]=yl):yl=t[196];const ro=yl;let bl;t[197]!==ue||t[198]!==ze?(bl=()=>{ue&&ze("permission.list",{workspaceId:ue.id})},t[197]=ue,t[198]=ze,t[199]=bl):bl=t[199];const Ic=bl;let xl;t[200]!==ze?(xl=J=>{ze("provider.connect",{provider:J})},t[200]=ze,t[201]=xl):xl=t[201];const Ln=xl;let Pi;t[202]!==ze?(Pi=J=>{ze("provider.disconnect",{provider:J})},t[202]=ze,t[203]=Pi):Pi=t[203];const Sl=Pi;let pa;if(t[204]!==(ue==null?void 0:ue.id)||t[205]!==_){let J;t[207]!==(ue==null?void 0:ue.id)?(J=Ae=>Ae.workspaceId===(ue==null?void 0:ue.id),t[207]=ue==null?void 0:ue.id,t[208]=J):J=t[208],pa=_.filter(J),t[204]=ue==null?void 0:ue.id,t[205]=_,t[206]=pa}else pa=t[206];const io=pa;let ma;if(t[209]!==(n==null?void 0:n.id)||t[210]!==a){let J;t[212]!==(n==null?void 0:n.id)?(J=Ae=>Ae.serverId===(n==null?void 0:n.id)&&Ae.workspaceId,t[212]=n==null?void 0:n.id,t[213]=J):J=t[213],ma=a.filter(J).map(DH),t[209]=n==null?void 0:n.id,t[210]=a,t[211]=ma}else ma=t[211];const us=ma;let so,lt,Fi,fr,Kr,mi,hr,Ar,Yr,gi;if(t[214]!==n||t[215]!==ue||t[216]!==Qe||t[217]!==Xn||t[218]!==sa||t[219]!==jc||t[220]!==lr||t[221]!==H||t[222]!==Et||t[223]!==Li||t[224]!==ae||t[225]!==k||t[226]!==et||t[227]!==ta||t[228]!==us||t[229]!==oa||t[230]!==Qo||t[231]!==ia||t[232]!==na||t[233]!==Vs||t[234]!==ro||t[235]!==Jt||t[236]!==Lc||t[237]!==_l||t[238]!==Gr||t[239]!==ar||t[240]!==l||t[241]!==Be||t[242]!==Ni||t[243]!==tn||t[244]!==to||t[245]!==w||t[246]!==y||t[247]!==Dn||t[248]!==dn||t[249]!==fa||t[250]!==eo||t[251]!==pi||t[252]!==an||t[253]!==Mc||t[254]!==ye||t[255]!==vl||t[256]!==ze||t[257]!==Je||t[258]!==e.length||t[259]!==ne||t[260]!==_||t[261]!==Te||t[262]!==We||t[263]!==ft||t[264]!==X||t[265]!==Oc||t[266]!==zi||t[267]!==ml||t[268]!==io||t[269]!==Ze){const J=k?Qo(k.id):[],Ae=k&&(Cl=ue==null?void 0:ue.name)!=null?Cl:"Jean2";let Ge;t[280]!==w?(Ge=w.filter(NH),t[280]=w,t[281]=Ge):Ge=t[281];const Ke=Ge;let le;t[282]!==((mr=Ke[0])==null?void 0:mr.id)||t[283]!==ze||t[284]!==Ze?(le=ht=>{var _i;de(Ze.find(gr=>gr.id===ht)||null),rs.current=!0;const gt=(_i=Ke[0])==null?void 0:_i.id;ze("session.create",{preconfigId:gt,workspaceId:ht})},t[282]=(va=Ke[0])==null?void 0:va.id,t[283]=ze,t[284]=Ze,t[285]=le):le=t[285];const me=le;let Me;t[286]===Symbol.for("react.memo_cache_sentinel")?(Me=ht=>{ke(ht),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var gt;(gt=z.current)==null||gt.focusSessionPanel()})})},t[286]=Me):Me=t[286];const rt=Me;let Tt,Xr;t[287]===Symbol.for("react.memo_cache_sentinel")?(Tt=()=>Fe(!1),Xr=()=>{var ht;return(ht=B.current)==null?void 0:ht.focus()},t[287]=Tt,t[288]=Xr):(Tt=t[287],Xr=t[288]);let Vn;t[289]!==ue||t[290]!==Li||t[291]!==((Jn=Ke[0])==null?void 0:Jn.id)?(Vn=()=>{var ht;ue&&Li((ht=Ke[0])==null?void 0:ht.id)},t[289]=ue,t[290]=Li,t[291]=(hs=Ke[0])==null?void 0:hs.id,t[292]=Vn):Vn=t[292];let In;t[293]===Symbol.for("react.memo_cache_sentinel")?(In=()=>rt(AH),t[293]=In):In=t[293];let Qr;t[294]!==ro||t[295]!==Vn?(Qr={onCloseTerminal:Tt,focusChatInput:Xr,onNewSession:Vn,onNewWindow:RH,onToggleViewMode:In,setTerminalOpen:Fe,sidebarRef:z,terminalPanelRef:L,onStopStreaming:ro},t[294]=ro,t[295]=Vn,t[296]=Qr):Qr=t[296];const ao=Qr,Pc=!(k!=null&&k.parentId);lt=!!n;const _d=()=>{var ht;return e.length===0?g.jsx(Ix,{onServerAdded:Vs,error:Xn||void 0}):lt?l?g.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:g.jsx(Lx,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!H&&_.length===0?Et?g.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:g.jsx(iH,{serverUrl:Je,authError:Xn,retryCount:an,nextRetryIn:Ni,onRetry:md,onLogout:Jt})}):g.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[g.jsx(Lx,{}),g.jsx(Pe,{variant:"ghost",size:"sm",onClick:Jt,className:"text-muted-foreground",children:"Change Server"})]}):g.jsx(g.Fragment,{children:k?g.jsx(OF,{inputRef:B,session:k,messagesWithParts:J,queuedMessages:dn[k.id]||[],preconfigs:Pc?Ke:w,prompts:y,models:Be,connectedProviderIds:new Set(Dn.filter(EH).map(kH)),connectableProviderIds:new Set(Dn.filter(CH).map(wH)),defaultModel:et,onSendMessage:vl,onRemoveFromQueue:fa,onChangePreconfig:zi,onChangeModel:Oc,onChangeVariant:ml,selectedVariant:ye,variants:(ht=Be.find(gt=>gt.id===ae))==null?void 0:ht.variants,pendingPermissions:tn,onPermissionResponse:_l,onRename:Gr,usage:ne,modelName:ae,onNavigateToSubagent:pi,onNavigateBack:Lc,isStreaming:X.has(k.id)||!!k.runningAt,onInterrupt:ro,onRevert:Mc,onFork:oa,onCompact:J.filter(SH).length>=4?()=>jc(k.id):void 0,isCompacting:ar,compactionSuccess:lr,onClearCompactionSuccess:()=>Mn(!1),serverUrl:Je!=null?Je:void 0,apiToken:Qe!=null?Qe: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(Ix,{onServerAdded:Vs,error:Xn||void 0})};so=l8,Ar=!0,t[297]!==ao?(Yr=g.jsx(yH,{...ao}),t[297]=ao,t[298]=Yr):Yr=t[298],t[299]!==ue||t[300]!==sa||t[301]!==H||t[302]!==Li||t[303]!==me||t[304]!==k||t[305]!==ta||t[306]!==us||t[307]!==ia||t[308]!==na||t[309]!==Gr||t[310]!==lt||t[311]!==tn||t[312]!==to||t[313]!==((kl=Ke[0])==null?void 0:kl.id)||t[314]!==eo||t[315]!==pi||t[316]!==_||t[317]!==ft||t[318]!==X||t[319]!==io||t[320]!==Ze?(gi=lt&&g.jsx(k8,{ref:z,allSessions:_,viewMode:ft,favoritedWorkspaceIds:us,sessions:io,currentSession:k,currentSessionId:(_a=k==null?void 0:k.id)!=null?_a:null,streamingSessionIds:X,connected:H,workspaces:Ze,activeWorkspace:ue,onCreateSession:()=>{var ht;return Li((ht=Ke[0])==null?void 0:ht.id)},onResumeSession:pi,onCloseSession:sa,onReopenSession:eo,onDeleteSession:to,onRenameSession:Gr,onSelectWorkspace:Qh,onCreateVirtualWorkspace:na,onCreatePhysicalWorkspace:ia,onDeleteWorkspace:ta,onOpenSettings:()=>_e(!0),onOpenMCP:()=>dt(!0),onOpenAddServer:()=>Ti(!0),onServerSwitch:Gs,onEscape:()=>{var ht;k&&((ht=B.current)==null||ht.focus())},onCreateSessionInWorkspace:me,pendingPermissions:tn}),t[299]=ue,t[300]=sa,t[301]=H,t[302]=Li,t[303]=me,t[304]=k,t[305]=ta,t[306]=us,t[307]=ia,t[308]=na,t[309]=Gr,t[310]=lt,t[311]=tn,t[312]=to,t[313]=(ya=Ke[0])==null?void 0:ya.id,t[314]=eo,t[315]=pi,t[316]=_,t[317]=ft,t[318]=X,t[319]=io,t[320]=Ze,t[321]=gi):gi=t[321],Fi="flex-1 flex flex-col overflow-hidden",t[322]===Symbol.for("react.memo_cache_sentinel")?(fr={paddingTop:"env(safe-area-inset-top, 0)",paddingBottom:"env(safe-area-inset-bottom, 0)"},t[322]=fr):fr=t[322];let bn;t[323]!==lt?(bn=lt&&g.jsx(Rb,{}),t[323]=lt,t[324]=bn):bn=t[324];let Rr;t[325]!==Ae?(Rr=g.jsx("span",{className:"font-semibold",children:Ae}),t[325]=Ae,t[326]=Rr):Rr=t[326];let Tr;t[327]!==bn||t[328]!==Rr?(Tr=g.jsxs("div",{className:"flex items-center gap-2",children:[bn,Rr]}),t[327]=bn,t[328]=Rr,t[329]=Tr):Tr=t[329];let vi;t[330]!==lt?(vi=lt&&g.jsx(zx,{onServerSwitch:Gs,onSelectWorkspace:gd}),t[330]=lt,t[331]=vi):vi=t[331];let Zr;t[332]!==lt||t[333]!==ft?(Zr=lt&&g.jsx(Bx,{viewMode:ft,onViewModeChange:rt}),t[332]=lt,t[333]=ft,t[334]=Zr):Zr=t[334];let xn;t[335]!==ue||t[336]!==lt||t[337]!==Te?(xn=lt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Oe(!Te),title:Te?"Hide Files":"Show Files",children:g.jsx(Tg,{className:"w-4 h-4"})}),t[335]=ue,t[336]=lt,t[337]=Te,t[338]=xn):xn=t[338];let Sn;t[339]!==ue||t[340]!==lt||t[341]!==We?(Sn=lt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Fe(!We),title:We?"Hide Terminal":"Show Terminal",children:g.jsx(Iy,{className:"w-4 h-4"})}),t[339]=ue,t[340]=lt,t[341]=We,t[342]=Sn):Sn=t[342];let er;t[343]!==vi||t[344]!==Zr||t[345]!==xn||t[346]!==Sn?(er=g.jsxs("div",{className:"flex items-center gap-1",children:[vi,Zr,xn,Sn]}),t[343]=vi,t[344]=Zr,t[345]=xn,t[346]=Sn,t[347]=er):er=t[347],t[348]!==Tr||t[349]!==er?(Kr=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:[Tr,er]}),t[348]=Tr,t[349]=er,t[350]=Kr):Kr=t[350];let zn;t[351]!==lt?(zn=lt&&g.jsx(Rb,{}),t[351]=lt,t[352]=zn):zn=t[352];let Bn;t[353]!==Ae?(Bn=g.jsx("span",{className:"font-semibold",children:Ae}),t[353]=Ae,t[354]=Bn):Bn=t[354];let qn;t[355]!==zn||t[356]!==Bn?(qn=g.jsxs("div",{className:"flex items-center gap-2",children:[zn,Bn]}),t[355]=zn,t[356]=Bn,t[357]=qn):qn=t[357];let ps;t[358]!==lt?(ps=lt&&g.jsx(zx,{onServerSwitch:Gs,onSelectWorkspace:gd}),t[358]=lt,t[359]=ps):ps=t[359];let Hi;t[360]!==lt||t[361]!==ft?(Hi=lt&&g.jsx(Bx,{viewMode:ft,onViewModeChange:rt}),t[360]=lt,t[361]=ft,t[362]=Hi):Hi=t[362];let Ui;t[363]!==ue||t[364]!==lt||t[365]!==Te?(Ui=lt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Oe(!Te),title:Te?"Hide Files":"Show Files",children:g.jsx(Tg,{className:"w-4 h-4"})}),t[363]=ue,t[364]=lt,t[365]=Te,t[366]=Ui):Ui=t[366];let ms;t[367]!==ue||t[368]!==lt||t[369]!==We?(ms=lt&&ue&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Fe(!We),title:We?"Hide Terminal":"Show Terminal",children:g.jsx(Iy,{className:"w-4 h-4"})}),t[367]=ue,t[368]=lt,t[369]=We,t[370]=ms):ms=t[370];let Xt;t[371]!==ps||t[372]!==Hi||t[373]!==Ui||t[374]!==ms?(Xt=g.jsxs("div",{className:"flex items-center gap-2",children:[ps,Hi,Ui,ms]}),t[371]=ps,t[372]=Hi,t[373]=Ui,t[374]=ms,t[375]=Xt):Xt=t[375],t[376]!==qn||t[377]!==Xt?(mi=g.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[qn,Xt]}),t[376]=qn,t[377]=Xt,t[378]=mi):mi=t[378],hr=_d(),t[214]=n,t[215]=ue,t[216]=Qe,t[217]=Xn,t[218]=sa,t[219]=jc,t[220]=lr,t[221]=H,t[222]=Et,t[223]=Li,t[224]=ae,t[225]=k,t[226]=et,t[227]=ta,t[228]=us,t[229]=oa,t[230]=Qo,t[231]=ia,t[232]=na,t[233]=Vs,t[234]=ro,t[235]=Jt,t[236]=Lc,t[237]=_l,t[238]=Gr,t[239]=ar,t[240]=l,t[241]=Be,t[242]=Ni,t[243]=tn,t[244]=to,t[245]=w,t[246]=y,t[247]=Dn,t[248]=dn,t[249]=fa,t[250]=eo,t[251]=pi,t[252]=an,t[253]=Mc,t[254]=ye,t[255]=vl,t[256]=ze,t[257]=Je,t[258]=e.length,t[259]=ne,t[260]=_,t[261]=Te,t[262]=We,t[263]=ft,t[264]=X,t[265]=Oc,t[266]=zi,t[267]=ml,t[268]=io,t[269]=Ze,t[270]=so,t[271]=lt,t[272]=Fi,t[273]=fr,t[274]=Kr,t[275]=mi,t[276]=hr,t[277]=Ar,t[278]=Yr,t[279]=gi}else so=t[270],lt=t[271],Fi=t[272],fr=t[273],Kr=t[274],mi=t[275],hr=t[276],Ar=t[277],Yr=t[278],gi=t[279];let pr;t[379]!==(ue==null?void 0:ue.id)||t[380]!==(ue==null?void 0:ue.name)||t[381]!==(ue==null?void 0:ue.path)||t[382]!==Qe||t[383]!==lt||t[384]!==Je||t[385]!==We?(pr=lt&&g.jsx(K8,{ref:L,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,workspaceName:ue==null?void 0:ue.name,serverUrl:Je!=null?Je:void 0,apiToken:Qe!=null?Qe:void 0,isOpen:We,onClose:()=>Fe(!1)}),t[379]=ue==null?void 0:ue.id,t[380]=ue==null?void 0:ue.name,t[381]=ue==null?void 0:ue.path,t[382]=Qe,t[383]=lt,t[384]=Je,t[385]=We,t[386]=pr):pr=t[386];let ds;t[387]!==pr||t[388]!==Fi||t[389]!==fr||t[390]!==Kr||t[391]!==mi||t[392]!==hr?(ds=g.jsxs("main",{className:Fi,style:fr,children:[Kr,mi,hr,pr]}),t[387]=pr,t[388]=Fi,t[389]=fr,t[390]=Kr,t[391]=mi,t[392]=hr,t[393]=ds):ds=t[393];let fs;t[394]!==(ue==null?void 0:ue.id)||t[395]!==(ue==null?void 0:ue.path)||t[396]!==Qe||t[397]!==Ue||t[398]!==Ln||t[399]!==Sl||t[400]!==Jt||t[401]!==lt||t[402]!==bt||t[403]!==on||t[404]!==Dn||t[405]!==Ic||t[406]!==ze||t[407]!==Je||t[408]!==Te||t[409]!==He||t[410]!==xe?(fs=lt&&g.jsxs(g.Fragment,{children:[g.jsx(j8,{workspaceId:ue==null?void 0:ue.id,serverUrl:Je!=null?Je:void 0,apiToken:Qe!=null?Qe:void 0,isOpen:Te,onClose:()=>Oe(!1)}),g.jsx(ZF,{open:xe,onOpenChange:_e,permissions:on,onRefreshPermissions:Ic,onRevokePermission:J=>{ze("permission.revoke",{permissionId:J})},onRevokeAllPermissions:()=>{ze("permission.revoke_all",{workspaceId:ue==null?void 0:ue.id})},apiToken:Qe,onLogout:Jt,providerStatuses:Dn,onConnectProvider:Ln,onDisconnectProvider:Sl,chatFinishSoundEnabled:Ue,onChatFinishSoundEnabledChange:ct,permissionSoundEnabled:bt,onPermissionSoundEnabledChange:qt,serverUrl:Je}),g.jsx(rH,{open:He,onOpenChange:dt,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,serverUrl:Je!=null?Je:void 0,apiToken:Qe!=null?Qe:void 0})]}),t[394]=ue==null?void 0:ue.id,t[395]=ue==null?void 0:ue.path,t[396]=Qe,t[397]=Ue,t[398]=Ln,t[399]=Sl,t[400]=Jt,t[401]=lt,t[402]=bt,t[403]=on,t[404]=Dn,t[405]=Ic,t[406]=ze,t[407]=Je,t[408]=Te,t[409]=He,t[410]=xe,t[411]=fs):fs=t[411];let ga;t[412]===Symbol.for("react.memo_cache_sentinel")?(ga=J=>{Ti(J),J||sr(null)},t[412]=ga):ga=t[412];let oo;t[413]!==Cr||t[414]!==ir?(oo=g.jsx(sH,{open:ir,onOpenChange:ga,editServer:Cr}),t[413]=Cr,t[414]=ir,t[415]=oo):oo=t[415];let wl;return t[416]!==so||t[417]!==ds||t[418]!==fs||t[419]!==oo||t[420]!==Ar||t[421]!==Yr||t[422]!==gi?(wl=g.jsxs(so,{defaultOpen:Ar,children:[Yr,gi,ds,fs,oo]}),t[416]=so,t[417]=ds,t[418]=fs,t[419]=oo,t[420]=Ar,t[421]=Yr,t[422]=gi,t[423]=wl):wl=t[423],wl}function SH(t){return t.message.role!=="system"}function wH(t){return t.provider}function CH(t){return t.connectable}function kH(t){return t.provider}function EH(t){return t.connected}function AH(t){return t==="overview"?"default":"overview"}function RH(){u1("create_new_window").catch(TH)}function TH(){}function NH(t){return t.mode!=="subagent"}function DH(t){return t.workspaceId}function MH(t){return t.message}function jH(t){return t.message}function OH(t){const e=new Date().toISOString();return t.map(n=>({...n,revokedAt:e}))}function LH(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 IH(t){return t.toolCallId}function zH(t){return t.message}function BH(){return{message:"Failed to delete workspace"}}function PH(t){return t.json()}function FH(t){return t.json()}function HH(t){return t.json()}function UH(t){return t.json()}function $H(t){return t.json()}function VH(t){return t.json()}function qH(t){return t+1}function WH(t){return t+1}function GH(t){return t+1}function KH(t){return t+1}function YH(t){return t+1}function XH(t){console.error("WebSocket error:",t)}function QH(t,e){return t.createdAt-e.createdAt}function ZH(t){return t+1}function JH(t){return t+1}function eU(){const t=localStorage.getItem("jean2_sound_permission_enabled");return t!==null?t==="true":!0}function tU(){const t=localStorage.getItem("jean2_sound_chat_finish_enabled");return t!==null?t==="true":!0}function nU(){return localStorage.getItem("jean2_sidebar_view")||"default"}function rU(){return new Set}function iU(){const t=ge.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(nA,{children:g.jsx(xH,{})}),t[0]=e):e=t[0],e}ME.createRoot(document.getElementById("root")).render(g.jsx(D.StrictMode,{children:g.jsx(IE,{defaultMode:"system",defaultScheme:"neutral",children:g.jsx(iU,{})})}));