@jean2/client 0.6.6 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,571 +0,0 @@
1
- function fE(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 ih(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nm={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 vy;function hE(){if(vy)return vu;vy=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 _y;function pE(){return _y||(_y=1,Nm.exports=hE()),Nm.exports}var g=pE(),Dm={exports:{}},ht={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var yy;function mE(){if(yy)return ht;yy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),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"),y=Symbol.iterator;function S(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||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 _(){}_.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 _;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},R=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 q(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?q(""+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 V=!1;if(z===null)V=!0;else switch(X){case"bigint":case"string":case"number":V=!0;break;case"object":switch(z.$$typeof){case t:case e:V=!0;break;case p:return V=z._init,G(V(z._payload),H,F,Q,te)}}if(V)return te=te(z),V=Q===""?"."+W(z,0):Q,N(te)?(F="",V!=null&&(F=V.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,"$&/")+"/")+V)),H.push(te)),1;V=0;var $=Q===""?".":Q+":";if(N(z))for(var ne=0;ne<z.length;ne++)Q=z[ne],X=$+W(Q,ne),V+=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++),V+=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 V}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 ht.Activity=h,ht.Children=L,ht.Component=b,ht.Fragment=n,ht.Profiler=o,ht.PureComponent=x,ht.StrictMode=i,ht.Suspense=d,ht.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ht.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},ht.cache=function(z){return function(){return z.apply(null,arguments)}},ht.cacheSignal=function(){return null},ht.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)!R.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 V=Array(X),$=0;$<X;$++)V[$]=arguments[$+2];Q.children=V}return j(z.type,te,Q)},ht.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},ht.createElement=function(z,H,F){var Q,te={},X=null;if(H!=null)for(Q in H.key!==void 0&&(X=""+H.key),H)R.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(te[Q]=H[Q]);var V=arguments.length-2;if(V===1)te.children=F;else if(1<V){for(var $=Array(V),ne=0;ne<V;ne++)$[ne]=arguments[ne+2];te.children=$}if(z&&z.defaultProps)for(Q in V=z.defaultProps,V)te[Q]===void 0&&(te[Q]=V[Q]);return j(z,X,te)},ht.createRef=function(){return{current:null}},ht.forwardRef=function(z){return{$$typeof:a,render:z}},ht.isValidElement=I,ht.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:ee}},ht.memo=function(z,H){return{$$typeof:f,type:z,compare:H===void 0?null:H}},ht.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}},ht.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ht.use=function(z){return M.H.use(z)},ht.useActionState=function(z,H,F){return M.H.useActionState(z,H,F)},ht.useCallback=function(z,H){return M.H.useCallback(z,H)},ht.useContext=function(z){return M.H.useContext(z)},ht.useDebugValue=function(){},ht.useDeferredValue=function(z,H){return M.H.useDeferredValue(z,H)},ht.useEffect=function(z,H){return M.H.useEffect(z,H)},ht.useEffectEvent=function(z){return M.H.useEffectEvent(z)},ht.useId=function(){return M.H.useId()},ht.useImperativeHandle=function(z,H,F){return M.H.useImperativeHandle(z,H,F)},ht.useInsertionEffect=function(z,H){return M.H.useInsertionEffect(z,H)},ht.useLayoutEffect=function(z,H){return M.H.useLayoutEffect(z,H)},ht.useMemo=function(z,H){return M.H.useMemo(z,H)},ht.useOptimistic=function(z,H){return M.H.useOptimistic(z,H)},ht.useReducer=function(z,H,F){return M.H.useReducer(z,H,F)},ht.useRef=function(z){return M.H.useRef(z)},ht.useState=function(z){return M.H.useState(z)},ht.useSyncExternalStore=function(z,H,F){return M.H.useSyncExternalStore(z,H,F)},ht.useTransition=function(){return M.H.useTransition()},ht.version="19.2.4",ht}var by;function sh(){return by||(by=1,Dm.exports=mE()),Dm.exports}var D=sh();const ni=ih(D),Ox=fE({__proto__:null,default:ni},[D]);var Mm={exports:{}},_u={},jm={exports:{}},Om={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var xy;function gE(){return xy||(xy=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,y=3,S=!1,C=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,_=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,q());else{var Z=n(f);Z!==null&&K(N,Z.startTime-G)}}var A=!1,M=-1,R=5,j=-1;function O(){return v?!0:!(t.unstable_now()-j<R)}function I(){if(v=!1,A){var G=t.unstable_now();j=G;var Z=!0;try{e:{C=!1,w&&(w=!1,_(M),M=-1),S=!0;var ee=y;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,y=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,y=ee,S=!1}Z=void 0}}finally{Z?q():A=!1}}}var q;if(typeof x=="function")q=function(){x(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,W=U.port2;U.port1.onmessage=I,q=function(){W.postMessage(null)}}else q=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"):R=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(G){switch(y){case 1:case 2:case 3:var Z=3;break;default:Z=y}var ee=y;y=Z;try{return G()}finally{y=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=y;y=G;try{return Z()}finally{y=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?(_(M),M=-1):w=!0,K(N,ee-B))):(G.sortIndex=L,e(d,G),C||S||(C=!0,A||(A=!0,q()))),G},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(G){var Z=y;return function(){var ee=y;y=Z;try{return G.apply(this,arguments)}finally{y=ee}}}})(Om)),Om}var Sy;function vE(){return Sy||(Sy=1,jm.exports=gE()),jm.exports}var Lm={exports:{}},Kn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var wy;function _E(){if(wy)return Kn;wy=1;var t=sh();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 Kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Kn.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)},Kn.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()}},Kn.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))},Kn.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Kn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin),y=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:y,fetchPriority:S}):p==="script"&&i.d.X(d,{crossOrigin:h,integrity:y,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Kn.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)},Kn.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})}},Kn.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)},Kn.requestFormReset=function(d){i.d.r(d)},Kn.unstable_batchedUpdates=function(d,f){return d(f)},Kn.useFormState=function(d,f,p){return u.H.useFormState(d,f,p)},Kn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Kn.version="19.2.4",Kn}var Cy;function Lx(){if(Cy)return Lm.exports;Cy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Lm.exports=_E(),Lm.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var ky;function yE(){if(ky)return _u;ky=1;var t=vE(),e=sh(),n=Lx();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 T=E.alternate;if(T===null){if(m=E.return,m!==null){c=m;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return d(E),r;if(T===m)return d(E),s;T=T.sibling}throw Error(i(188))}if(c.return!==m.return)c=E,m=T;else{for(var P=!1,Y=E.child;Y;){if(Y===c){P=!0,c=E,m=T;break}if(Y===m){P=!0,m=E,c=T;break}Y=Y.sibling}if(!P){for(Y=T.child;Y;){if(Y===c){P=!0,c=T,m=E;break}if(Y===m){P=!0,m=T,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,y=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"),_=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"),R=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function q(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 _: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 R: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),V=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)?F0(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=F0(s),r=H0(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(Q),F(Q,r)}function ne(){H(Q),H(te),H(X)}function ie(r){r.memoizedState!==null&&F(V,r);var s=Q.current,c=H0(s,r.type);s!==c&&(F(te,r),F(Q,c))}function ae(r){te.current===r&&(H(Q),H(te)),V.current===r&&(H(V),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 Pe(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(ge){var pe=ge}Reflect.construct(r,[],we)}else{try{we.call()}catch(ge){pe=ge}r.call(we.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.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 T=m.DetermineComponentFrameRoot(),P=T[0],Y=T[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 Te(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 Pe(r.type,!1);case 11:return Pe(r.type.render,!1);case 1:return Pe(r.type,!0);case 31:return Re("Activity");default:return""}}function tt(r){try{var s="",c=null;do s+=Te(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,ct=t.unstable_scheduleCallback,ot=t.unstable_cancelCallback,pt=t.unstable_shouldYield,Ze=t.unstable_requestPaint,Je=t.unstable_now,ue=t.unstable_getCurrentPriorityLevel,de=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,_e=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Le=t.unstable_IdlePriority,$e=t.log,Ie=t.unstable_setDisableYieldValue,Ve=null,_t=null;function dt(r){if(typeof $e=="function"&&Ie(r),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ve,r)}catch{}}var ke=Math.clz32?Math.clz32:mt,He=Math.log,ut=Math.LN2;function mt(r){return r>>>=0,r===0?32:31-(He(r)/ut|0)|0}var Kt=256,Ut=262144,nn=4194304;function Qt(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 Rn(r,s,c){var m=r.pendingLanes;if(m===0)return 0;var E=0,T=r.suspendedLanes,P=r.pingedLanes;r=r.warmLanes;var Y=m&134217727;return Y!==0?(m=Y&~T,m!==0?E=Qt(m):(P&=Y,P!==0?E=Qt(P):c||(c=Y&~r,c!==0&&(E=Qt(c))))):(Y=m&~T,Y!==0?E=Qt(Y):P!==0?E=Qt(P):c||(c=m&~r,c!==0&&(E=Qt(c)))),E===0?0:s!==0&&s!==E&&(s&T)===0&&(T=E&-E,c=s&-s,T>=c||T===32&&(c&4194048)!==0)?s:E}function on(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 an(){var r=nn;return nn<<=1,(nn&62914560)===0&&(nn=4194304),r}function ln(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function wn(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ei(r,s,c,m,E,T){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 ge=pe[be];ge!==null&&(ge.lane&=-536870913)}c&=~we}m!==0&&Tn(r,m,0),T!==0&&E===0&&r.tag!==0&&(r.suspendedLanes|=T&~(P&~s))}function Tn(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 oi(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 Zn(r,s){var c=s&-s;return c=(c&42)!==0?1:qr(c),(c&(r.suspendedLanes|s))!==0?0:c}function qr(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 or(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Ai(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:uy(r.type))}function Cr(r,s){var c=Z.p;try{return Z.p=r,s()}finally{Z.p=c}}var Nn=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Nn,Bt="__reactProps$"+Nn,pn="__reactContainer$"+Nn,mn="__reactEvents$"+Nn,Zi="__reactListeners$"+Nn,ai="__reactHandles$"+Nn,Vn="__reactResources$"+Nn,Cn="__reactMarker$"+Nn;function Jn(r){delete r[Rt],delete r[Bt],delete r[mn],delete r[Zi],delete r[ai]}function Dn(r){var s=r[Rt];if(s)return s;for(var c=r.parentNode;c;){if(s=c[pn]||c[Rt]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=K0(r);r!==null;){if(c=r[Rt])return c;r=K0(r)}return s}r=c,c=r.parentNode}return null}function ar(r){if(r=r[Rt]||r[pn]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function lr(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function Mn(r){var s=r[Vn];return s||(s=r[Vn]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ot(r){r[Cn]=!0}var cr=new Set,Ri={};function jn(r,s){Lt(r,s),Lt(r+"Capture",s)}function Lt(r,s){for(Ri[r]=s,r=0;r<s.length;r++)cr.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]*$"),li={},Ti={};function Er(r){return it.call(Ti,r)?!0:it.call(li,r)?!1:kr.test(r)?Ti[r]=!0:(li[r]=!0,!1)}function Vr(r,s,c){if(Er(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 er(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 On(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 Ln(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Vo(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Wa(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,T=m.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return E.call(this)},set:function(P){c=""+P,T.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 zs(r){if(!r._valueTracker){var s=Vo(r)?"checked":"value";r._valueTracker=Wa(r,s,""+r[s])}}function Wo(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return r&&(m=Vo(r)?r.checked?"true":"false":r.value),r=m,r!==c?(s.setValue(r),!0):!1}function Ji(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 Ga=/[\n"\\]/g;function In(r){return r.replace(Ga,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Bs(r,s,c,m,E,T,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=""+Ln(s)):r.value!==""+Ln(s)&&(r.value=""+Ln(s)):P!=="submit"&&P!=="reset"||r.removeAttribute("value"),s!=null?Ps(r,P,Ln(s)):c!=null?Ps(r,P,Ln(c)):m!=null&&r.removeAttribute("value"),E==null&&T!=null&&(r.defaultChecked=!!T),E!=null&&(r.checked=E&&typeof E!="function"&&typeof E!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?r.name=""+Ln(Y):r.removeAttribute("name")}function Go(r,s,c,m,E,T,P,Y){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.type=T),s!=null||c!=null){if(!(T!=="submit"&&T!=="reset"||s!=null)){zs(r);return}c=c!=null?""+Ln(c):"",s=s!=null?""+Ln(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),zs(r)}function Ps(r,s,c){s==="number"&&Ji(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function ci(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=""+Ln(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=""+Ln(s),s!==r.value&&(r.value=s),c==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=c!=null?""+Ln(c):""}function Ka(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=Ln(s),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),zs(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 et=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 Ko(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||et.has(s)?s==="float"?r.cssFloat=c:r[s]=(""+c).trim():r[s]=c+"px"}function Yo(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&&Ko(r,E,m)}else for(var T in s)s.hasOwnProperty(T)&&Ko(r,T,s[T])}function Fs(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 Ya=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"]]),Xa=/^[\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 es(r){return Xa.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ur(){}var Hs=null;function Us(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Zt=null,ui=null;function md(r){var s=ar(r);if(s&&(r=s.stateNode)){var c=r[Bt]||null;e:switch(r=s.stateNode,s.type){case"input":if(Bs(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="'+In(""+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));Bs(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&&Wo(m)}break e;case"textarea":Dc(r,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&ci(r,!!c.multiple,s,!1)}}}var $s=!1;function qs(r,s,c){if($s)return r(s,c);$s=!0;try{var m=r(s);return m}finally{if($s=!1,(Zt!==null||ui!==null)&&(Gd(),Zt&&(s=Zt,r=ui,ui=Zt=null,md(s),r)))for(s=0;s<r.length;s++)md(r[s])}}function Ni(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"),Vs=!1;if(dr)try{var Jt={};Object.defineProperty(Jt,"passive",{get:function(){Vs=!0}}),window.addEventListener("test",Jt,Jt),window.removeEventListener("test",Jt,Jt)}catch{Vs=!1}var Ar=null,Xo=null,ts=null;function Qo(){if(ts)return ts;var r,s=Xo,c=s.length,m,E="value"in Ar?Ar.value:Ar.textContent,T=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[T-m];m++);return ts=E.slice(r,1<m?1-m:void 0)}function ns(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 rs(){return!0}function Zo(){return!1}function gn(r){function s(c,m,E,T,P){this._reactName=c,this._targetInst=E,this.type=m,this.nativeEvent=T,this.target=P,this.currentTarget=null;for(var Y in r)r.hasOwnProperty(Y)&&(c=r[Y],this[Y]=c?c(T):T[Y]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?rs:Zo,this.isPropagationStopped=Zo,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=rs)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=rs)},persist:function(){},isPersistent:rs}),s}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=gn(Wr),Di=h({},Wr,{view:0,detail:0}),Qa=gn(Di),Ws,Gs,Mi,ss=h({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xs,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Mi&&(Mi&&r.type==="mousemove"?(Ws=r.screenX-Mi.screenX,Gs=r.screenY-Mi.screenY):Gs=Ws=0,Mi=r),Ws)},movementY:function(r){return"movementY"in r?r.movementY:Gs}}),Jo=gn(ss),Ks=h({},ss,{dataTransfer:0}),Za=gn(Ks),Xh=h({},Di,{relatedTarget:0}),Ys=gn(Xh),gd=h({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ja=gn(gd),ea=h({},Wr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),el=gn(ea),ta=h({},Wr,{data:0}),na=gn(ta),ra={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tl={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"},nl={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rl(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=nl[r])?!!s[r]:!1}function Xs(){return rl}var il=h({},Di,{key:function(r){if(r.key){var s=ra[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ns(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?tl[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xs,charCode:function(r){return r.type==="keypress"?ns(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ns(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),sl=gn(il),ol=h({},ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Be=gn(ol),al=h({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xs}),ji=gn(al),ll=h({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),di=gn(ll),cl=h({},ss,{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}),ia=gn(cl),ul=h({},Wr,{newState:0,oldState:0}),Mc=gn(ul),dl=[9,13,27,32],sa=dr&&"CompositionEvent"in window,Oi=null;dr&&"documentMode"in document&&(Oi=document.documentMode);var jc=dr&&"TextEvent"in window&&!Oi,oa=dr&&(!sa||Oi&&8<Oi&&11>=Oi),Qs=" ",aa=!1;function Zs(r,s){switch(r){case"keyup":return dl.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function la(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Li=!1;function fl(r,s){switch(r){case"compositionend":return la(s);case"keypress":return s.which!==32?null:(aa=!0,Qs);case"textInput":return r=s.data,r===Qs&&aa?null:r;default:return null}}function Oc(r,s){if(Li)return r==="compositionend"||!sa&&Zs(r,s)?(r=Qo(),ts=Xo=Ar=null,Li=!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 oa&&s.locale!=="ko"?null:s.data;default:return null}}var hl={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 pl(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!hl[r.type]:s==="textarea"}function ca(r,s,c,m){Zt?ui?ui.push(m):ui=[m]:Zt=m,s=ef(s,"onChange"),0<s.length&&(c=new is("onChange","change",null,c,m),r.push({event:c,listeners:s}))}var Gr=null,Ii=null;function Lc(r){O0(r,0)}function os(r){var s=lr(r);if(Wo(s))return r}function ml(r,s){if(r==="change")return s}var ua=!1;if(dr){var da;if(dr){var Js="oninput"in document;if(!Js){var gl=document.createElement("div");gl.setAttribute("oninput","return;"),Js=typeof gl.oninput=="function"}da=Js}else da=!1;ua=da&&(!document.documentMode||9<document.documentMode)}function fa(){Gr&&(Gr.detachEvent("onpropertychange",vl),Ii=Gr=null)}function vl(r){if(r.propertyName==="value"&&os(Ii)){var s=[];ca(s,Ii,r,Us(r)),qs(Lc,s)}}function _l(r,s,c){r==="focusin"?(fa(),Gr=s,Ii=c,Gr.attachEvent("onpropertychange",vl)):r==="focusout"&&fa()}function eo(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return os(Ii)}function yl(r,s){if(r==="click")return os(s)}function Ic(r,s){if(r==="input"||r==="change")return os(s)}function bl(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var zn=typeof Object.is=="function"?Object.is:bl;function zi(r,s){if(zn(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)||!zn(r[E],s[E]))return!1}return!0}function xl(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ha(r,s){var c=xl(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=xl(c)}}function to(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?to(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function pa(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Ji(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=Ji(r.document)}return s}function as(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 no=dr&&"documentMode"in document&&11>=document.documentMode,lt=null,Bi=null,fr=null,Kr=!1;function fi(r,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Kr||lt==null||lt!==Ji(m)||(m=lt,"selectionStart"in m&&as(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&&zi(fr,m)||(fr=m,m=ef(Bi,"onSelect"),0<m.length&&(s=new is("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 Rr={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={},hi={};dr&&(hi=document.createElement("div").style,"AnimationEvent"in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),"TransitionEvent"in window||delete Rr.transitionend.transition);function pr(r){if(Yr[r])return Yr[r];if(!Rr[r])return r;var s=Rr[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in hi)return Yr[r]=s[c];return r}var ls=pr("animationend"),cs=pr("animationiteration"),ma=pr("animationstart"),ro=pr("transitionrun"),Sl=pr("transitionstart"),vd=pr("transitioncancel"),zc=pr("transitionend"),Bc=new Map,wl="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(" ");wl.push("scrollEnd");function mr(r,s){Bc.set(r,s),jn(s,[r])}var ga=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)},tr=[],us=0,Cl=0;function va(){for(var r=us,s=Cl=us=0;s<r;){var c=tr[s];tr[s++]=null;var m=tr[s];tr[s++]=null;var E=tr[s];tr[s++]=null;var T=tr[s];if(tr[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}T!==0&&Ge(c,E,T)}}function _a(r,s,c,m){tr[us++]=r,tr[us++]=s,tr[us++]=c,tr[us++]=m,Cl|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function J(r,s,c,m){return _a(r,s,c,m),Ke(r)}function Ae(r,s){return _a(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,T=r.return;T!==null;)T.childLanes|=c,m=T.alternate,m!==null&&(m.childLanes|=c),T.tag===22&&(r=T.stateNode,r===null||r._visibility&1||(E=!0)),r=T,T=T.return;return r.tag===3?(T=r.stateNode,E&&s!==null&&(E=31-ke(c),r=T.hiddenUpdates,m=r[E],m===null?r[E]=[s]:m.push(s),s.lane=c|536870912),T):null}function Ke(r){if(50<ou)throw ou=0,em=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 Wn(r,s,c,m,E,T){var P=0;if(m=r,typeof r=="function")rt(r)&&(P=1);else if(typeof r=="string")P=eE(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=T,r;case w:return Bn(c.children,E,T,s);case v:P=8,E|=24;break;case b:return r=Me(12,c,s,E|2),r.elementType=b,r.lanes=T,r;case N:return r=Me(13,c,s,E),r.elementType=N,r.lanes=T,r;case A:return r=Me(19,c,s,E),r.elementType=A,r.lanes=T,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case x:P=10;break e;case _:P=9;break e;case k:P=11;break e;case M:P=14;break e;case R: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=T,s}function Bn(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 io(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 vn(r,s){if(typeof r=="object"&&r!==null){var c=_d.get(r);return c!==void 0?c:(s={value:r,source:s,stack:tt(s)},_d.set(r,s),s)}return{value:r,source:s,stack:tt(s)}}var Tr=[],Nr=0,pi=null,Zr=0,_n=[],yn=0,nr=null,Pn=1,Fn="";function Gn(r,s){Tr[Nr++]=Zr,Tr[Nr++]=pi,pi=r,Zr=s}function ds(r,s,c){_n[yn++]=Pn,_n[yn++]=Fn,_n[yn++]=nr,nr=r;var m=Pn;r=Fn;var E=32-ke(m)-1;m&=~(1<<E),c+=1;var T=32-ke(s)+E;if(30<T){var P=E-E%5;T=(m&(1<<P)-1).toString(32),m>>=P,E-=P,Pn=1<<32-ke(s)+E|c<<E|m,Fn=T+r}else Pn=1<<T|c<<E|m,Fn=r}function Pi(r){r.return!==null&&(Gn(r,1),ds(r,1,0))}function Fi(r){for(;r===pi;)pi=Tr[--Nr],Tr[Nr]=null,Zr=Tr[--Nr],Tr[Nr]=null;for(;r===nr;)nr=_n[--yn],_n[yn]=null,Fn=_n[--yn],_n[yn]=null,Pn=_n[--yn],_n[yn]=null}function fs(r,s){_n[yn++]=Pn,_n[yn++]=Fn,_n[yn++]=nr,Pn=s.id,Fn=s.overflow,nr=r}var Yt=null,ft=null,gt=!1,mi=null,gr=!1,Qh=Error(i(519));function so(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fc(vn(s,r)),Qh}function xv(r){var s=r.stateNode,c=r.type,m=r.memoizedProps;switch(s[Rt]=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),Go(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),Ka(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||B0(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||so(r,!0)}function Sv(r){for(Yt=r.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:gr=!1;return;case 27:case 3:gr=!0;return;default:Yt=Yt.return}}function kl(r){if(r!==Yt)return!1;if(!gt)return Sv(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")||mm(r.type,r.memoizedProps)),c=!c),c&&ft&&so(r),Sv(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ft=G0(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ft=G0(r)}else s===27?(s=ft,bo(r.type)?(r=bm,bm=null,ft=r):ft=s):ft=Yt?ei(r.stateNode.nextSibling):null;return!0}function ya(){ft=Yt=null,gt=!1}function Zh(){var r=mi;return r!==null&&(br===null?br=r:br.push.apply(br,r),mi=null),r}function Fc(r){mi===null?mi=[r]:mi.push(r)}var Jh=z(null),ba=null,hs=null;function oo(r,s,c){F(Jh,s._currentValue),s._currentValue=c}function ps(r){r._currentValue=Jh.current,H(Jh)}function ep(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 tp(r,s,c,m){var E=r.child;for(E!==null&&(E.return=r);E!==null;){var T=E.dependencies;if(T!==null){var P=E.child;T=T.firstContext;e:for(;T!==null;){var Y=T;T=E;for(var re=0;re<s.length;re++)if(Y.context===s[re]){T.lanes|=c,Y=T.alternate,Y!==null&&(Y.lanes|=c),ep(T.return,c,r),m||(P=null);break e}T=Y.next}}else if(E.tag===18){if(P=E.return,P===null)throw Error(i(341));P.lanes|=c,T=P.alternate,T!==null&&(T.lanes|=c),ep(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 El(r,s,c,m){r=null;for(var E=s,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!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;zn(E.pendingProps.value,P.value)||(r!==null?r.push(Y):r=[Y])}}else if(E===V.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&&tp(s,r,c,m),s.flags|=262144}function yd(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function xa(r){ba=r,hs=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Hn(r){return wv(ba,r)}function bd(r,s){return ba===null&&xa(r),wv(r,s)}function wv(r,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},hs===null){if(r===null)throw Error(i(308));hs=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else hs=hs.next=s;return c}var X3=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()})}},Q3=t.unstable_scheduleCallback,Z3=t.unstable_NormalPriority,cn={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function np(){return{controller:new X3,data:new Map,refCount:0}}function Hc(r){r.refCount--,r.refCount===0&&Q3(Z3,function(){r.controller.abort()})}var Uc=null,rp=0,Al=0,Rl=null;function J3(r,s){if(Uc===null){var c=Uc=[];rp=0,Al=om(),Rl={status:"pending",value:void 0,then:function(m){c.push(m)}}}return rp++,s.then(Cv,Cv),s}function Cv(){if(--rp===0&&Uc!==null){Rl!==null&&(Rl.status="fulfilled");var r=Uc;Uc=null,Al=0,Rl=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function ek(r,s){var c=[],m={status:"pending",value:null,reason:null,then:function(E){c.push(E)}};return r.then(function(){m.status="fulfilled",m.value=s;for(var E=0;E<c.length;E++)(0,c[E])(s)},function(E){for(m.status="rejected",m.reason=E,E=0;E<c.length;E++)(0,c[E])(void 0)}),m}var kv=G.S;G.S=function(r,s){l0=Je(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&J3(r,s),kv!==null&&kv(r,s)};var Sa=z(null);function ip(){var r=Sa.current;return r!==null?r:$t.pooledCache}function xd(r,s){s===null?F(Sa,Sa.current):F(Sa,s.pool)}function Ev(){var r=ip();return r===null?null:{parent:cn._currentValue,pool:r}}var Tl=Error(i(460)),sp=Error(i(474)),Sd=Error(i(542)),wd={then:function(){}};function Av(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Rv(r,s,c){switch(c=r[c],c===void 0?r.push(s):c!==s&&(s.then(ur,ur),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Nv(r),r;default:if(typeof s.status=="string")s.then(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,Nv(r),r}throw Ca=s,Tl}}function wa(r){try{var s=r._init;return s(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Ca=c,Tl):c}}var Ca=null;function Tv(){if(Ca===null)throw Error(i(459));var r=Ca;return Ca=null,r}function Nv(r){if(r===Tl||r===Sd)throw Error(i(483))}var Nl=null,$c=0;function Cd(r){var s=$c;return $c+=1,Nl===null&&(Nl=[]),Rv(Nl,r,s)}function qc(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function kd(r,s){throw s.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Dv(r){function s(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 T(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===R&&wa(nt)===oe.type)?(oe=E(oe,fe.props),qc(oe,fe),oe.return=ce,oe):(oe=Wn(fe.type,fe.key,fe.props,null,ce.mode,Se),qc(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=Bn(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=Wn(oe.type,oe.key,oe.props,null,ce.mode,fe),qc(fe,oe),fe.return=ce,fe;case C:return oe=Pc(oe,ce.mode,fe),oe.return=ce,oe;case R:return oe=wa(oe),we(ce,oe,fe)}if(K(oe)||q(oe))return oe=Bn(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 R:return fe=wa(fe),pe(ce,oe,fe,Se)}if(K(fe)||q(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 ge(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 R:return Se=wa(Se),ge(ce,oe,fe,Se,nt)}if(K(Se)||q(Se))return ce=ce.get(fe)||null,be(oe,ce,Se,nt,null);if(typeof Se.then=="function")return ge(ce,oe,fe,Cd(Se),nt);if(Se.$$typeof===x)return ge(ce,oe,fe,bd(oe,Se),nt);kd(oe,Se)}return null}function Ue(ce,oe,fe,Se){for(var nt=null,Dt=null,Ye=oe,yt=oe=0,At=null;Ye!==null&&yt<fe.length;yt++){Ye.index>yt?(At=Ye,Ye=null):At=Ye.sibling;var Mt=pe(ce,Ye,fe[yt],Se);if(Mt===null){Ye===null&&(Ye=At);break}r&&Ye&&Mt.alternate===null&&s(ce,Ye),oe=T(Mt,oe,yt),Dt===null?nt=Mt:Dt.sibling=Mt,Dt=Mt,Ye=At}if(yt===fe.length)return c(ce,Ye),gt&&Gn(ce,yt),nt;if(Ye===null){for(;yt<fe.length;yt++)Ye=we(ce,fe[yt],Se),Ye!==null&&(oe=T(Ye,oe,yt),Dt===null?nt=Ye:Dt.sibling=Ye,Dt=Ye);return gt&&Gn(ce,yt),nt}for(Ye=m(Ye);yt<fe.length;yt++)At=ge(Ye,ce,yt,fe[yt],Se),At!==null&&(r&&At.alternate!==null&&Ye.delete(At.key===null?yt:At.key),oe=T(At,oe,yt),Dt===null?nt=At:Dt.sibling=At,Dt=At);return r&&Ye.forEach(function(ko){return s(ce,ko)}),gt&&Gn(ce,yt),nt}function at(ce,oe,fe,Se){if(fe==null)throw Error(i(151));for(var nt=null,Dt=null,Ye=oe,yt=oe=0,At=null,Mt=fe.next();Ye!==null&&!Mt.done;yt++,Mt=fe.next()){Ye.index>yt?(At=Ye,Ye=null):At=Ye.sibling;var ko=pe(ce,Ye,Mt.value,Se);if(ko===null){Ye===null&&(Ye=At);break}r&&Ye&&ko.alternate===null&&s(ce,Ye),oe=T(ko,oe,yt),Dt===null?nt=ko:Dt.sibling=ko,Dt=ko,Ye=At}if(Mt.done)return c(ce,Ye),gt&&Gn(ce,yt),nt;if(Ye===null){for(;!Mt.done;yt++,Mt=fe.next())Mt=we(ce,Mt.value,Se),Mt!==null&&(oe=T(Mt,oe,yt),Dt===null?nt=Mt:Dt.sibling=Mt,Dt=Mt);return gt&&Gn(ce,yt),nt}for(Ye=m(Ye);!Mt.done;yt++,Mt=fe.next())Mt=ge(Ye,ce,yt,Mt.value,Se),Mt!==null&&(r&&Mt.alternate!==null&&Ye.delete(Mt.key===null?yt:Mt.key),oe=T(Mt,oe,yt),Dt===null?nt=Mt:Dt.sibling=Mt,Dt=Mt);return r&&Ye.forEach(function(dE){return s(ce,dE)}),gt&&Gn(ce,yt),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===R&&wa(nt)===oe.type){c(ce,oe.sibling),Se=E(oe,fe.props),qc(Se,fe),Se.return=ce,ce=Se;break e}c(ce,oe);break}else s(ce,oe);oe=oe.sibling}fe.type===w?(Se=Bn(fe.props.children,ce.mode,Se,fe.key),Se.return=ce,ce=Se):(Se=Wn(fe.type,fe.key,fe.props,null,ce.mode,Se),qc(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 R:return fe=wa(fe),Ht(ce,oe,fe,Se)}if(K(fe))return Ue(ce,oe,fe,Se);if(q(fe)){if(nt=q(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 Nl=null,nt}catch(Ye){if(Ye===Tl||Ye===Sd)throw Ye;var Dt=Me(29,Ye,null,ce.mode);return Dt.lanes=Se,Dt.return=ce,Dt}finally{}}}var ka=Dv(!0),Mv=Dv(!1),ao=!1;function op(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ap(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 lo(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function co(r,s,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(jt&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 _a(r,m,s,c),Ke(r)}function Vc(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,oi(r,c)}}function lp(r,s){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var P={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};T===null?E=T=P:T=T.next=P,c=c.next}while(c!==null);T===null?E=T=s:T=T.next=s}else E=T=s;c={baseState:m.baseState,firstBaseUpdate:E,lastBaseUpdate:T,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 cp=!1;function Wc(){if(cp){var r=Rl;if(r!==null)throw r}}function Gc(r,s,c,m){cp=!1;var E=r.updateQueue;ao=!1;var T=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?T=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(T!==null){var we=E.baseState;P=0,be=he=re=null,Y=T;do{var pe=Y.lane&-536870913,ge=pe!==Y.lane;if(ge?(Et&pe)===pe:(m&pe)===pe){pe!==0&&pe===Al&&(cp=!0),be!==null&&(be=be.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var Ue=r,at=Y;pe=s;var Ht=c;switch(at.tag){case 1:if(Ue=at.payload,typeof Ue=="function"){we=Ue.call(Ht,we,pe);break e}we=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=at.payload,pe=typeof Ue=="function"?Ue.call(Ht,we,pe):Ue,pe==null)break e;we=h({},we,pe);break e;case 2:ao=!0}}pe=Y.callback,pe!==null&&(r.flags|=64,ge&&(r.flags|=8192),ge=E.callbacks,ge===null?E.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},be===null?(he=be=ge,re=we):be=be.next=ge,P|=pe;if(Y=Y.next,Y===null){if(Y=E.shared.pending,Y===null)break;ge=Y,Y=ge.next,ge.next=null,E.lastBaseUpdate=ge,E.shared.pending=null}}while(!0);be===null&&(re=we),E.baseState=re,E.firstBaseUpdate=he,E.lastBaseUpdate=be,T===null&&(E.shared.lanes=0),mo|=P,r.lanes=P,r.memoizedState=we}}function jv(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function Ov(r,s){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)jv(c[r],s)}var Dl=z(null),Ed=z(0);function Lv(r,s){r=ws,F(Ed,r),F(Dl,s),ws=r|s.baseLanes}function up(){F(Ed,ws),F(Dl,Dl.current)}function dp(){ws=Ed.current,H(Dl),H(Ed)}var Dr=z(null),Jr=null;function uo(r){var s=r.alternate;F(rn,rn.current&1),F(Dr,r),Jr===null&&(s===null||Dl.current!==null||s.memoizedState!==null)&&(Jr=r)}function fp(r){F(rn,rn.current),F(Dr,r),Jr===null&&(Jr=r)}function Iv(r){r.tag===22?(F(rn,rn.current),F(Dr,r),Jr===null&&(Jr=r)):fo()}function fo(){F(rn,rn.current),F(Dr,Dr.current)}function Mr(r){H(Dr),Jr===r&&(Jr=null),H(rn)}var rn=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||_m(c)||ym(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 ms=0,vt=null,Pt=null,un=null,Rd=!1,Ml=!1,Ea=!1,Td=0,Kc=0,jl=null,tk=0;function en(){throw Error(i(321))}function hp(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!zn(r[c],s[c]))return!1;return!0}function pp(r,s,c,m,E,T){return ms=T,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,G.H=r===null||r.memoizedState===null?y_:Tp,Ea=!1,T=c(m,E),Ea=!1,Ml&&(T=Bv(s,c,m,E)),zv(r),T}function zv(r){G.H=Qc;var s=Pt!==null&&Pt.next!==null;if(ms=0,un=Pt=vt=null,Rd=!1,Kc=0,jl=null,s)throw Error(i(300));r===null||dn||(r=r.dependencies,r!==null&&yd(r)&&(dn=!0))}function Bv(r,s,c,m){vt=r;var E=0;do{if(Ml&&(jl=null),Kc=0,Ml=!1,25<=E)throw Error(i(301));if(E+=1,un=Pt=null,r.updateQueue!=null){var T=r.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}G.H=b_,T=s(c,m)}while(Ml);return T}function nk(){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 mp(){var r=Td!==0;return Td=0,r}function gp(r,s,c){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~c}function vp(r){if(Rd){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Rd=!1}ms=0,un=Pt=vt=null,Ml=!1,Kc=Td=0,jl=null}function rr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?vt.memoizedState=un=r:un=un.next=r,un}function sn(){if(Pt===null){var r=vt.alternate;r=r!==null?r.memoizedState:null}else r=Pt.next;var s=un===null?vt.memoizedState:un.next;if(s!==null)un=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},un===null?vt.memoizedState=un=r:un=un.next=r}return un}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yc(r){var s=Kc;return Kc+=1,jl===null&&(jl=[]),r=Rv(jl,r,s),s=vt,(un===null?s.memoizedState:un.next)===null&&(s=s.alternate,G.H=s===null||s.memoizedState===null?y_:Tp),r}function Dd(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Yc(r);if(r.$$typeof===x)return Hn(r)}throw Error(i(438,String(r)))}function _p(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 gs(r,s){return typeof s=="function"?s(r):s}function Md(r){var s=sn();return yp(s,Pt,r)}function yp(r,s,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var E=r.baseQueue,T=m.pending;if(T!==null){if(E!==null){var P=E.next;E.next=T.next,T.next=P}s.baseQueue=E=T,m.pending=null}if(T=r.baseState,E===null)r.memoizedState=T;else{s=E.next;var Y=P=null,re=null,he=s,be=!1;do{var we=he.lane&-536870913;if(we!==he.lane?(Et&we)===we:(ms&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===Al&&(be=!0);else if((ms&pe)===pe){he=he.next,pe===Al&&(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=T):re=re.next=we,vt.lanes|=pe,mo|=pe;we=he.action,Ea&&c(T,we),T=he.hasEagerState?he.eagerState:c(T,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=T):re=re.next=pe,vt.lanes|=we,mo|=we;he=he.next}while(he!==null&&he!==s);if(re===null?P=T:re.next=Y,!zn(T,r.memoizedState)&&(dn=!0,be&&(c=Rl,c!==null)))throw c;r.memoizedState=T,r.baseState=P,r.baseQueue=re,m.lastRenderedState=T}return E===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function bp(r){var s=sn(),c=s.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,E=c.pending,T=s.memoizedState;if(E!==null){c.pending=null;var P=E=E.next;do T=r(T,P.action),P=P.next;while(P!==E);zn(T,s.memoizedState)||(dn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),c.lastRenderedState=T}return[T,m]}function Pv(r,s,c){var m=vt,E=sn(),T=gt;if(T){if(c===void 0)throw Error(i(407));c=c()}else c=s();var P=!zn((Pt||E).memoizedState,c);if(P&&(E.memoizedState=c,dn=!0),E=E.queue,wp(Uv.bind(null,m,E,r),[r]),E.getSnapshot!==s||P||un!==null&&un.memoizedState.tag&1){if(m.flags|=2048,Ol(9,{destroy:void 0},Hv.bind(null,m,E,c,s),null),$t===null)throw Error(i(349));T||(ms&127)!==0||Fv(m,s,c)}return c}function Fv(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 Hv(r,s,c,m){s.value=c,s.getSnapshot=m,$v(s)&&qv(r)}function Uv(r,s,c){return c(function(){$v(s)&&qv(r)})}function $v(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!zn(r,c)}catch{return!0}}function qv(r){var s=Ae(r,2);s!==null&&xr(s,r,2)}function xp(r){var s=rr();if(typeof r=="function"){var c=r;if(r=c(),Ea){dt(!0);try{c()}finally{dt(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:r},s}function Vv(r,s,c,m){return r.baseState=c,yp(r,Pt,typeof m=="function"?m:gs)}function rk(r,s,c,m,E){if(Ld(r))throw Error(i(485));if(r=s.action,r!==null){var T={payload:E,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){T.listeners.push(P)}};G.T!==null?c(!0):T.isTransition=!1,m(T),c=s.pending,c===null?(T.next=s.pending=T,Wv(s,T)):(T.next=c.next,s.pending=c.next=T)}}function Wv(r,s){var c=s.action,m=s.payload,E=r.state;if(s.isTransition){var T=G.T,P={};G.T=P;try{var Y=c(E,m),re=G.S;re!==null&&re(P,Y),Gv(r,s,Y)}catch(he){Sp(r,s,he)}finally{T!==null&&P.types!==null&&(T.types=P.types),G.T=T}}else try{T=c(E,m),Gv(r,s,T)}catch(he){Sp(r,s,he)}}function Gv(r,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){Kv(r,s,m)},function(m){return Sp(r,s,m)}):Kv(r,s,c)}function Kv(r,s,c){s.status="fulfilled",s.value=c,Yv(s),r.state=c,s=r.pending,s!==null&&(c=s.next,c===s?r.pending=null:(c=c.next,s.next=c,Wv(r,c)))}function Sp(r,s,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=c,Yv(s),s=s.next;while(s!==m)}r.action=null}function Yv(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Xv(r,s){return s}function Qv(r,s){if(gt){var c=$t.formState;if(c!==null){e:{var m=vt;if(gt){if(ft){t:{for(var E=ft,T=gr;E.nodeType!==8;){if(!T){E=null;break t}if(E=ei(E.nextSibling),E===null){E=null;break t}}T=E.data,E=T==="F!"||T==="F"?E:null}if(E){ft=ei(E.nextSibling),m=E.data==="F!";break e}}so(m)}m=!1}m&&(s=c[0])}}return c=rr(),c.memoizedState=c.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xv,lastRenderedState:s},c.queue=m,c=g_.bind(null,vt,m),m.dispatch=c,m=xp(!1),T=Rp.bind(null,vt,!1,m.queue),m=rr(),E={state:s,dispatch:null,action:r,pending:null},m.queue=E,c=rk.bind(null,vt,E,T,c),E.dispatch=c,m.memoizedState=r,[s,c,!1]}function Zv(r){var s=sn();return Jv(s,Pt,r)}function Jv(r,s,c){if(s=yp(r,s,Xv)[0],r=Md(gs)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Yc(s)}catch(P){throw P===Tl?Sd:P}else m=s;s=sn();var E=s.queue,T=E.dispatch;return c!==s.memoizedState&&(vt.flags|=2048,Ol(9,{destroy:void 0},ik.bind(null,E,c),null)),[m,T,r]}function ik(r,s){r.action=s}function e_(r){var s=sn(),c=Pt;if(c!==null)return Jv(s,c,r);sn(),s=s.memoizedState,c=sn();var m=c.queue.dispatch;return c.memoizedState=r,[s,m,!1]}function Ol(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 t_(){return sn().memoizedState}function jd(r,s,c,m){var E=rr();vt.flags|=r,E.memoizedState=Ol(1|s,{destroy:void 0},c,m===void 0?null:m)}function Od(r,s,c,m){var E=sn();m=m===void 0?null:m;var T=E.memoizedState.inst;Pt!==null&&m!==null&&hp(m,Pt.memoizedState.deps)?E.memoizedState=Ol(s,T,c,m):(vt.flags|=r,E.memoizedState=Ol(1|s,T,c,m))}function n_(r,s){jd(8390656,8,r,s)}function wp(r,s){Od(2048,8,r,s)}function sk(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 r_(r){var s=sn().memoizedState;return sk({ref:s,nextImpl:r}),function(){if((jt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function i_(r,s){return Od(4,2,r,s)}function s_(r,s){return Od(4,4,r,s)}function o_(r,s){if(typeof s=="function"){r=r();var c=s(r);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function a_(r,s,c){c=c!=null?c.concat([r]):null,Od(4,4,o_.bind(null,s,r),c)}function Cp(){}function l_(r,s){var c=sn();s=s===void 0?null:s;var m=c.memoizedState;return s!==null&&hp(s,m[1])?m[0]:(c.memoizedState=[r,s],r)}function c_(r,s){var c=sn();s=s===void 0?null:s;var m=c.memoizedState;if(s!==null&&hp(s,m[1]))return m[0];if(m=r(),Ea){dt(!0);try{r()}finally{dt(!1)}}return c.memoizedState=[m,s],m}function kp(r,s,c){return c===void 0||(ms&1073741824)!==0&&(Et&261930)===0?r.memoizedState=s:(r.memoizedState=c,r=u0(),vt.lanes|=r,mo|=r,c)}function u_(r,s,c,m){return zn(c,s)?c:Dl.current!==null?(r=kp(r,c,m),zn(r,s)||(dn=!0),r):(ms&42)===0||(ms&1073741824)!==0&&(Et&261930)===0?(dn=!0,r.memoizedState=c):(r=u0(),vt.lanes|=r,mo|=r,s)}function d_(r,s,c,m,E){var T=Z.p;Z.p=T!==0&&8>T?T:8;var P=G.T,Y={};G.T=Y,Rp(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=ek(re,m);Xc(r,s,be,Lr(r))}else Xc(r,s,m,Lr(r))}catch(we){Xc(r,s,{then:function(){},status:"rejected",reason:we},Lr())}finally{Z.p=T,P!==null&&Y.types!==null&&(P.types=Y.types),G.T=P}}function ok(){}function Ep(r,s,c,m){if(r.tag!==5)throw Error(i(476));var E=f_(r).queue;d_(r,E,s,ee,c===null?ok:function(){return h_(r),c(m)})}function f_(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:gs,lastRenderedState:ee},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:c},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function h_(r){var s=f_(r);s.next===null&&(s=r.alternate.memoizedState),Xc(r,s.next.queue,{},Lr())}function Ap(){return Hn(hu)}function p_(){return sn().memoizedState}function m_(){return sn().memoizedState}function ak(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var c=Lr();r=lo(c);var m=co(s,r,c);m!==null&&(xr(m,s,c),Vc(m,s,c)),s={cache:np()},r.payload=s;return}s=s.return}}function lk(r,s,c){var m=Lr();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Ld(r)?v_(s,c):(c=J(r,s,c,m),c!==null&&(xr(c,r,m),__(c,s,m)))}function g_(r,s,c){var m=Lr();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))v_(s,E);else{var T=r.alternate;if(r.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var P=s.lastRenderedState,Y=T(P,c);if(E.hasEagerState=!0,E.eagerState=Y,zn(Y,P))return _a(r,s,E,0),$t===null&&va(),!1}catch{}finally{}if(c=J(r,s,E,m),c!==null)return xr(c,r,m),__(c,s,m),!0}return!1}function Rp(r,s,c,m){if(m={lane:2,revertLane:om(),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 v_(r,s){Ml=Rd=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function __(r,s,c){if((c&4194048)!==0){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,oi(r,c)}}var Qc={readContext:Hn,use:Dd,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};Qc.useEffectEvent=en;var y_={readContext:Hn,use:Dd,useCallback:function(r,s){return rr().memoizedState=[r,s===void 0?null:s],r},useContext:Hn,useEffect:n_,useImperativeHandle:function(r,s,c){c=c!=null?c.concat([r]):null,jd(4194308,4,o_.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=rr();s=s===void 0?null:s;var m=r();if(Ea){dt(!0);try{r()}finally{dt(!1)}}return c.memoizedState=[m,s],m},useReducer:function(r,s,c){var m=rr();if(c!==void 0){var E=c(s);if(Ea){dt(!0);try{c(s)}finally{dt(!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=lk.bind(null,vt,r),[m.memoizedState,r]},useRef:function(r){var s=rr();return r={current:r},s.memoizedState=r},useState:function(r){r=xp(r);var s=r.queue,c=g_.bind(null,vt,s);return s.dispatch=c,[r.memoizedState,c]},useDebugValue:Cp,useDeferredValue:function(r,s){var c=rr();return kp(c,r,s)},useTransition:function(){var r=xp(!1);return r=d_.bind(null,vt,r.queue,!0,!1),rr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,c){var m=vt,E=rr();if(gt){if(c===void 0)throw Error(i(407));c=c()}else{if(c=s(),$t===null)throw Error(i(349));(Et&127)!==0||Fv(m,s,c)}E.memoizedState=c;var T={value:c,getSnapshot:s};return E.queue=T,n_(Uv.bind(null,m,T,r),[r]),m.flags|=2048,Ol(9,{destroy:void 0},Hv.bind(null,m,T,c,s),null),c},useId:function(){var r=rr(),s=$t.identifierPrefix;if(gt){var c=Fn,m=Pn;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=tk++,s="_"+s+"r_"+c.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Ap,useFormState:Qv,useActionState:Qv,useOptimistic:function(r){var s=rr();s.memoizedState=s.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Rp.bind(null,vt,!0,c),c.dispatch=s,[r,s]},useMemoCache:_p,useCacheRefresh:function(){return rr().memoizedState=ak.bind(null,vt)},useEffectEvent:function(r){var s=rr(),c={impl:r};return s.memoizedState=c,function(){if((jt&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},Tp={readContext:Hn,use:Dd,useCallback:l_,useContext:Hn,useEffect:wp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:Md,useRef:t_,useState:function(){return Md(gs)},useDebugValue:Cp,useDeferredValue:function(r,s){var c=sn();return u_(c,Pt.memoizedState,r,s)},useTransition:function(){var r=Md(gs)[0],s=sn().memoizedState;return[typeof r=="boolean"?r:Yc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:Ap,useFormState:Zv,useActionState:Zv,useOptimistic:function(r,s){var c=sn();return Vv(c,Pt,r,s)},useMemoCache:_p,useCacheRefresh:m_};Tp.useEffectEvent=r_;var b_={readContext:Hn,use:Dd,useCallback:l_,useContext:Hn,useEffect:wp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:bp,useRef:t_,useState:function(){return bp(gs)},useDebugValue:Cp,useDeferredValue:function(r,s){var c=sn();return Pt===null?kp(c,r,s):u_(c,Pt.memoizedState,r,s)},useTransition:function(){var r=bp(gs)[0],s=sn().memoizedState;return[typeof r=="boolean"?r:Yc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:Ap,useFormState:e_,useActionState:e_,useOptimistic:function(r,s){var c=sn();return Pt!==null?Vv(c,Pt,r,s):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:_p,useCacheRefresh:m_};b_.useEffectEvent=r_;function Np(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 Dp={enqueueSetState:function(r,s,c){r=r._reactInternals;var m=Lr(),E=lo(m);E.payload=s,c!=null&&(E.callback=c),s=co(r,E,m),s!==null&&(xr(s,r,m),Vc(s,r,m))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var m=Lr(),E=lo(m);E.tag=1,E.payload=s,c!=null&&(E.callback=c),s=co(r,E,m),s!==null&&(xr(s,r,m),Vc(s,r,m))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=Lr(),m=lo(c);m.tag=2,s!=null&&(m.callback=s),s=co(r,m,c),s!==null&&(xr(s,r,c),Vc(s,r,c))}};function x_(r,s,c,m,E,T,P){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,T,P):s.prototype&&s.prototype.isPureReactComponent?!zi(c,m)||!zi(E,T):!0}function S_(r,s,c,m){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==r&&Dp.enqueueReplaceState(s,s.state,null)}function Aa(r,s){var c=s;if("ref"in s){c={};for(var m in s)m!=="ref"&&(c[m]=s[m])}if(r=r.defaultProps){c===s&&(c=h({},c));for(var E in r)c[E]===void 0&&(c[E]=r[E])}return c}function w_(r){ga(r)}function C_(r){console.error(r)}function k_(r){ga(r)}function Id(r,s){try{var c=r.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function E_(r,s,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Mp(r,s,c){return c=lo(c),c.tag=3,c.payload={element:null},c.callback=function(){Id(r,s)},c}function A_(r){return r=lo(r),r.tag=3,r}function R_(r,s,c,m){var E=c.type.getDerivedStateFromError;if(typeof E=="function"){var T=m.value;r.payload=function(){return E(T)},r.callback=function(){E_(s,c,m)}}var P=c.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(r.callback=function(){E_(s,c,m),typeof E!="function"&&(go===null?go=new Set([this]):go.add(this));var Y=m.stack;this.componentDidCatch(m.value,{componentStack:Y!==null?Y:""})})}function ck(r,s,c,m,E){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=c.alternate,s!==null&&El(s,c,E,!0),c=Dr.current,c!==null){switch(c.tag){case 31:case 13:return Jr===null?Kd():c.alternate===null&&tn===0&&(tn=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),rm(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)),rm(r,m,E)),!1}throw Error(i(435,c.tag))}return rm(r,m,E),Kd(),!1}if(gt)return s=Dr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,m!==Qh&&(r=Error(i(422),{cause:m}),Fc(vn(r,c)))):(m!==Qh&&(s=Error(i(423),{cause:m}),Fc(vn(s,c))),r=r.current.alternate,r.flags|=65536,E&=-E,r.lanes|=E,m=vn(m,c),E=Mp(r.stateNode,m,E),lp(r,E),tn!==4&&(tn=2)),!1;var T=Error(i(520),{cause:m});if(T=vn(T,c),su===null?su=[T]:su.push(T),tn!==4&&(tn=2),s===null)return!0;m=vn(m,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,r=E&-E,c.lanes|=r,r=Mp(c.stateNode,m,r),lp(c,r),!1;case 1:if(s=c.type,T=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(go===null||!go.has(T))))return c.flags|=65536,E&=-E,c.lanes|=E,E=A_(E),R_(E,r,c,m),lp(c,E),!1}c=c.return}while(c!==null);return!1}var jp=Error(i(461)),dn=!1;function Un(r,s,c,m){s.child=r===null?Mv(s,null,c,m):ka(s,r.child,c,m)}function T_(r,s,c,m,E){c=c.render;var T=s.ref;if("ref"in m){var P={};for(var Y in m)Y!=="ref"&&(P[Y]=m[Y])}else P=m;return xa(s),m=pp(r,s,c,P,T,E),Y=mp(),r!==null&&!dn?(gp(r,s,E),vs(r,s,E)):(gt&&Y&&Pi(s),s.flags|=1,Un(r,s,m,E),s.child)}function N_(r,s,c,m,E){if(r===null){var T=c.type;return typeof T=="function"&&!rt(T)&&T.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=T,D_(r,s,T,m,E)):(r=Wn(c.type,null,m,s,s.mode,E),r.ref=s.ref,r.return=s,s.child=r)}if(T=r.child,!Hp(r,E)){var P=T.memoizedProps;if(c=c.compare,c=c!==null?c:zi,c(P,m)&&r.ref===s.ref)return vs(r,s,E)}return s.flags|=1,r=Tt(T,m),r.ref=s.ref,r.return=s,s.child=r}function D_(r,s,c,m,E){if(r!==null){var T=r.memoizedProps;if(zi(T,m)&&r.ref===s.ref)if(dn=!1,s.pendingProps=m=T,Hp(r,E))(r.flags&131072)!==0&&(dn=!0);else return s.lanes=r.lanes,vs(r,s,E)}return Op(r,s,c,m,E)}function M_(r,s,c,m){var E=m.children,T=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(T=T!==null?T.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&~T}else m=0,s.child=null;return j_(r,s,T,c,m)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&xd(s,T!==null?T.cachePool:null),T!==null?Lv(s,T):up(),Iv(s);else return m=s.lanes=536870912,j_(r,s,T!==null?T.baseLanes|c:c,c,m)}else T!==null?(xd(s,T.cachePool),Lv(s,T),fo(),s.memoizedState=null):(r!==null&&xd(s,null),up(),fo());return Un(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 j_(r,s,c,m,E){var T=ip();return T=T===null?null:{parent:cn._currentValue,pool:T},s.memoizedState={baseLanes:c,cachePool:T},r!==null&&xd(s,null),up(),Iv(s),r!==null&&El(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 O_(r,s,c){return ka(s,r.child,null,c),r=zd(s,s.pendingProps),r.flags|=2,Mr(s),s.memoizedState=null,r}function uk(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(fp(s),(r=ft)?(r=W0(r,gr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:nr!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},c=io(r),c.return=s,s.child=c,Yt=s,ft=null)):r=null,r===null)throw so(s);return s.lanes=536870912,null}return zd(s,m)}var T=r.memoizedState;if(T!==null){var P=T.dehydrated;if(fp(s),E)if(s.flags&256)s.flags&=-257,s=O_(r,s,c);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(dn||El(r,s,c,!1),E=(c&r.childLanes)!==0,dn||E){if(m=$t,m!==null&&(P=Zn(m,c),P!==0&&P!==T.retryLane))throw T.retryLane=P,Ae(r,P),xr(m,r,P),jp;Kd(),s=O_(r,s,c)}else r=T.treeContext,ft=ei(P.nextSibling),Yt=s,gt=!0,mi=null,gr=!1,r!==null&&fs(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 Op(r,s,c,m,E){return xa(s),c=pp(r,s,c,m,void 0,E),m=mp(),r!==null&&!dn?(gp(r,s,E),vs(r,s,E)):(gt&&m&&Pi(s),s.flags|=1,Un(r,s,c,E),s.child)}function L_(r,s,c,m,E,T){return xa(s),s.updateQueue=null,c=Bv(s,m,c,E),zv(r),m=mp(),r!==null&&!dn?(gp(r,s,T),vs(r,s,T)):(gt&&m&&Pi(s),s.flags|=1,Un(r,s,c,T),s.child)}function I_(r,s,c,m,E){if(xa(s),s.stateNode===null){var T=le,P=c.contextType;typeof P=="object"&&P!==null&&(T=Hn(P)),T=new c(m,T),s.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Dp,s.stateNode=T,T._reactInternals=s,T=s.stateNode,T.props=m,T.state=s.memoizedState,T.refs={},op(s),P=c.contextType,T.context=typeof P=="object"&&P!==null?Hn(P):le,T.state=s.memoizedState,P=c.getDerivedStateFromProps,typeof P=="function"&&(Np(s,c,P,m),T.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(P=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),P!==T.state&&Dp.enqueueReplaceState(T,T.state,null),Gc(s,m,T,E),Wc(),T.state=s.memoizedState),typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(r===null){T=s.stateNode;var Y=s.memoizedProps,re=Aa(c,Y);T.props=re;var he=T.context,be=c.contextType;P=le,typeof be=="object"&&be!==null&&(P=Hn(be));var we=c.getDerivedStateFromProps;be=typeof we=="function"||typeof T.getSnapshotBeforeUpdate=="function",Y=s.pendingProps!==Y,be||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(Y||he!==P)&&S_(s,T,m,P),ao=!1;var pe=s.memoizedState;T.state=pe,Gc(s,m,T,E),Wc(),he=s.memoizedState,Y||pe!==he||ao?(typeof we=="function"&&(Np(s,c,we,m),he=s.memoizedState),(re=ao||x_(s,c,re,m,pe,he,P))?(be||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=he),T.props=m,T.state=he,T.context=P,m=re):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{T=s.stateNode,ap(r,s),P=s.memoizedProps,be=Aa(c,P),T.props=be,we=s.pendingProps,pe=T.context,he=c.contextType,re=le,typeof he=="object"&&he!==null&&(re=Hn(he)),Y=c.getDerivedStateFromProps,(he=typeof Y=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(P!==we||pe!==re)&&S_(s,T,m,re),ao=!1,pe=s.memoizedState,T.state=pe,Gc(s,m,T,E),Wc();var ge=s.memoizedState;P!==we||pe!==ge||ao||r!==null&&r.dependencies!==null&&yd(r.dependencies)?(typeof Y=="function"&&(Np(s,c,Y,m),ge=s.memoizedState),(be=ao||x_(s,c,be,m,pe,ge,re)||r!==null&&r.dependencies!==null&&yd(r.dependencies))?(he||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,ge,re),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,ge,re)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=ge),T.props=m,T.state=ge,T.context=re,m=be):(typeof T.componentDidUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&pe===r.memoizedState||(s.flags|=1024),m=!1)}return T=m,Bd(r,s),m=(s.flags&128)!==0,T||m?(T=s.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:T.render(),s.flags|=1,r!==null&&m?(s.child=ka(s,r.child,null,E),s.child=ka(s,null,c,E)):Un(r,s,c,E),s.memoizedState=T.state,r=s.child):r=vs(r,s,E),r}function z_(r,s,c,m){return ya(),s.flags|=256,Un(r,s,c,m),s.child}var Lp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ip(r){return{baseLanes:r,cachePool:Ev()}}function zp(r,s,c){return r=r!==null?r.childLanes&~c:0,s&&(r|=Or),r}function B_(r,s,c){var m=s.pendingProps,E=!1,T=(s.flags&128)!==0,P;if((P=T)||(P=r!==null&&r.memoizedState===null?!1:(rn.current&2)!==0),P&&(E=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,r===null){if(gt){if(E?uo(s):fo(),(r=ft)?(r=W0(r,gr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:nr!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},c=io(r),c.return=s,s.child=c,Yt=s,ft=null)):r=null,r===null)throw so(s);return ym(r)?s.lanes=32:s.lanes=536870912,null}var Y=m.children;return m=m.fallback,E?(fo(),E=s.mode,Y=Pd({mode:"hidden",children:Y},E),m=Bn(m,E,c,null),Y.return=s,m.return=s,Y.sibling=m,s.child=Y,m=s.child,m.memoizedState=Ip(c),m.childLanes=zp(r,P,c),s.memoizedState=Lp,Zc(null,m)):(uo(s),Bp(s,Y))}var re=r.memoizedState;if(re!==null&&(Y=re.dehydrated,Y!==null)){if(T)s.flags&256?(uo(s),s.flags&=-257,s=Pp(r,s,c)):s.memoizedState!==null?(fo(),s.child=r.child,s.flags|=128,s=null):(fo(),Y=m.fallback,E=s.mode,m=Pd({mode:"visible",children:m.children},E),Y=Bn(Y,E,c,null),Y.flags|=2,m.return=s,Y.return=s,m.sibling=Y,s.child=m,ka(s,r.child,null,c),m=s.child,m.memoizedState=Ip(c),m.childLanes=zp(r,P,c),s.memoizedState=Lp,s=Zc(null,m));else if(uo(s),ym(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=Pp(r,s,c)}else if(dn||El(r,s,c,!1),P=(c&r.childLanes)!==0,dn||P){if(P=$t,P!==null&&(m=Zn(P,c),m!==0&&m!==re.retryLane))throw re.retryLane=m,Ae(r,m),xr(P,r,m),jp;_m(Y)||Kd(),s=Pp(r,s,c)}else _m(Y)?(s.flags|=192,s.child=r.child,s=null):(r=re.treeContext,ft=ei(Y.nextSibling),Yt=s,gt=!0,mi=null,gr=!1,r!==null&&fs(s,r),s=Bp(s,m.children),s.flags|=4096);return s}return E?(fo(),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=Bn(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=Ip(c):(E=Y.cachePool,E!==null?(re=cn._currentValue,E=E.parent!==re?{parent:re,pool:re}:E):E=Ev(),Y={baseLanes:Y.baseLanes|c,cachePool:E}),m.memoizedState=Y,m.childLanes=zp(r,P,c),s.memoizedState=Lp,Zc(r.child,m)):(uo(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 Bp(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 Pp(r,s,c){return ka(s,r.child,null,c),r=Bp(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function P_(r,s,c){r.lanes|=s;var m=r.alternate;m!==null&&(m.lanes|=s),ep(r.return,s,c)}function Fp(r,s,c,m,E,T){var P=r.memoizedState;P===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:E,treeForkCount:T}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=m,P.tail=c,P.tailMode=E,P.treeForkCount=T)}function F_(r,s,c){var m=s.pendingProps,E=m.revealOrder,T=m.tail;m=m.children;var P=rn.current,Y=(P&2)!==0;if(Y?(P=P&1|2,s.flags|=128):P&=1,F(rn,P),Un(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&&P_(r,c,s);else if(r.tag===19)P_(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(E){case"forwards":for(c=s.child,E=null;c!==null;)r=c.alternate,r!==null&&Ad(r)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Fp(s,!1,E,c,T,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}Fp(s,!0,c,null,T,m);break;case"together":Fp(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function vs(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),mo|=s.lanes,(c&s.childLanes)===0)if(r!==null){if(El(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 Hp(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&yd(r)))}function dk(r,s,c){switch(s.tag){case 3:$(s,s.stateNode.containerInfo),oo(s,cn,r.memoizedState.cache),ya();break;case 27:case 5:ie(s);break;case 4:$(s,s.stateNode.containerInfo);break;case 10:oo(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,fp(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(uo(s),s.flags|=128,null):(c&s.child.childLanes)!==0?B_(r,s,c):(uo(s),r=vs(r,s,c),r!==null?r.sibling:null);uo(s);break;case 19:var E=(r.flags&128)!==0;if(m=(c&s.childLanes)!==0,m||(El(r,s,c,!1),m=(c&s.childLanes)!==0),E){if(m)return F_(r,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),F(rn,rn.current),m)break;return null;case 22:return s.lanes=0,M_(r,s,c,s.pendingProps);case 24:oo(s,cn,r.memoizedState.cache)}return vs(r,s,c)}function H_(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps)dn=!0;else{if(!Hp(r,c)&&(s.flags&128)===0)return dn=!1,dk(r,s,c);dn=(r.flags&131072)!==0}else dn=!1,gt&&(s.flags&1048576)!==0&&ds(s,Zr,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(r=wa(s.elementType),s.type=r,typeof r=="function")rt(r)?(m=Aa(r,m),s.tag=1,s=I_(null,s,r,m,c)):(s.tag=0,s=Op(null,s,r,m,c));else{if(r!=null){var E=r.$$typeof;if(E===k){s.tag=11,s=T_(null,s,r,m,c);break e}else if(E===M){s.tag=14,s=N_(null,s,r,m,c);break e}}throw s=W(r)||r,Error(i(306,s,""))}}return s;case 0:return Op(r,s,s.type,s.pendingProps,c);case 1:return m=s.type,E=Aa(m,s.pendingProps),I_(r,s,m,E,c);case 3:e:{if($(s,s.stateNode.containerInfo),r===null)throw Error(i(387));m=s.pendingProps;var T=s.memoizedState;E=T.element,ap(r,s),Gc(s,m,null,c);var P=s.memoizedState;if(m=P.cache,oo(s,cn,m),m!==T.cache&&tp(s,[cn],c,!0),Wc(),m=P.element,T.isDehydrated)if(T={element:m,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){s=z_(r,s,m,c);break e}else if(m!==E){E=vn(Error(i(424)),s),Fc(E),s=z_(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(ft=ei(r.firstChild),Yt=s,gt=!0,mi=null,gr=!0,c=Mv(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ya(),m===E){s=vs(r,s,c);break e}Un(r,s,m,c)}s=s.child}return s;case 26:return Bd(r,s),r===null?(c=Z0(s.type,null,s.pendingProps,null))?s.memoizedState=c:gt||(c=s.type,r=s.pendingProps,m=tf(X.current).createElement(c),m[Rt]=s,m[Bt]=r,$n(m,c,r),Ot(m),s.stateNode=m):s.memoizedState=Z0(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return ie(s),r===null&&gt&&(m=s.stateNode=Y0(s.type,s.pendingProps,X.current),Yt=s,gr=!0,E=ft,bo(s.type)?(bm=E,ft=ei(m.firstChild)):ft=E),Un(r,s,s.pendingProps.children,c),Bd(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&gt&&((E=m=ft)&&(m=Hk(m,s.type,s.pendingProps,gr),m!==null?(s.stateNode=m,Yt=s,ft=ei(m.firstChild),gr=!1,E=!0):E=!1),E||so(s)),ie(s),E=s.type,T=s.pendingProps,P=r!==null?r.memoizedProps:null,m=T.children,mm(E,T)?m=null:P!==null&&mm(E,P)&&(s.flags|=32),s.memoizedState!==null&&(E=pp(r,s,nk,null,null,c),hu._currentValue=E),Bd(r,s),Un(r,s,m,c),s.child;case 6:return r===null&&gt&&((r=c=ft)&&(c=Uk(c,s.pendingProps,gr),c!==null?(s.stateNode=c,Yt=s,ft=null,r=!0):r=!1),r||so(s)),null;case 13:return B_(r,s,c);case 4:return $(s,s.stateNode.containerInfo),m=s.pendingProps,r===null?s.child=ka(s,null,m,c):Un(r,s,m,c),s.child;case 11:return T_(r,s,s.type,s.pendingProps,c);case 7:return Un(r,s,s.pendingProps,c),s.child;case 8:return Un(r,s,s.pendingProps.children,c),s.child;case 12:return Un(r,s,s.pendingProps.children,c),s.child;case 10:return m=s.pendingProps,oo(s,s.type,m.value),Un(r,s,m.children,c),s.child;case 9:return E=s.type._context,m=s.pendingProps.children,xa(s),E=Hn(E),m=m(E),s.flags|=1,Un(r,s,m,c),s.child;case 14:return N_(r,s,s.type,s.pendingProps,c);case 15:return D_(r,s,s.type,s.pendingProps,c);case 19:return F_(r,s,c);case 31:return uk(r,s,c);case 22:return M_(r,s,c,s.pendingProps);case 24:return xa(s),m=Hn(cn),r===null?(E=ip(),E===null&&(E=$t,T=np(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=c),E=T),s.memoizedState={parent:m,cache:E},op(s),oo(s,cn,E)):((r.lanes&c)!==0&&(ap(r,s),Gc(s,null,null,c),Wc()),E=r.memoizedState,T=s.memoizedState,E.parent!==m?(E={parent:m,cache:m},s.memoizedState=E,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=E),oo(s,cn,m)):(m=T.cache,oo(s,cn,m),m!==E.cache&&tp(s,[cn],c,!0))),Un(r,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function _s(r){r.flags|=4}function Up(r,s,c,m,E){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(E&335544128)===E)if(r.stateNode.complete)r.flags|=8192;else if(p0())r.flags|=8192;else throw Ca=wd,sp}else r.flags&=-16777217}function U_(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!ry(s))if(p0())r.flags|=8192;else throw Ca=wd,sp}function Fd(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?an():536870912,r.lanes|=s,Bl|=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 Gt(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 fk(r,s,c){var m=s.pendingProps;switch(Fi(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(s),null;case 1:return Gt(s),null;case 3:return c=s.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ps(cn),ne(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(kl(s)?_s(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Zh())),Gt(s),null;case 26:var E=s.type,T=s.memoizedState;return r===null?(_s(s),T!==null?(Gt(s),U_(s,T)):(Gt(s),Up(s,E,null,m,c))):T?T!==r.memoizedState?(_s(s),Gt(s),U_(s,T)):(Gt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==m&&_s(s),Gt(s),Up(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&&_s(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Gt(s),null}r=Q.current,kl(s)?xv(s):(r=Y0(E,m,c),s.stateNode=r,_s(s))}return Gt(s),null;case 5:if(ae(s),E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&_s(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Gt(s),null}if(T=Q.current,kl(s))xv(s);else{var P=tf(X.current);switch(T){case 1:T=P.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:T=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":T=P.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":T=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":T=P.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof m.is=="string"?P.createElement("select",{is:m.is}):P.createElement("select"),m.multiple?T.multiple=!0:m.size&&(T.size=m.size);break;default:T=typeof m.is=="string"?P.createElement(E,{is:m.is}):P.createElement(E)}}T[Rt]=s,T[Bt]=m;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)T.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=T;e:switch($n(T,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&&_s(s)}}return Gt(s),Up(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,c),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==m&&_s(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(i(166));if(r=X.current,kl(s)){if(r=s.stateNode,c=s.memoizedProps,m=null,E=Yt,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}r[Rt]=s,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||B0(r.nodeValue,c)),r||so(s,!0)}else r=tf(r).createTextNode(m),r[Rt]=s,s.stateNode=r}return Gt(s),null;case 31:if(c=s.memoizedState,r===null||r.memoizedState!==null){if(m=kl(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[Rt]=s}else ya(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Gt(s),r=!1}else c=Zh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return s.flags&256?(Mr(s),s):(Mr(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Gt(s),null;case 13:if(m=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(E=kl(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[Rt]=s}else ya(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Gt(s),E=!1}else E=Zh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=E),E=!0;if(!E)return s.flags&256?(Mr(s),s):(Mr(s),null)}return Mr(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),T=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(T=m.memoizedState.cachePool.pool),T!==E&&(m.flags|=2048)),c!==r&&c&&(s.child.flags|=8192),Fd(s,s.updateQueue),Gt(s),null);case 4:return ne(),r===null&&um(s.stateNode.containerInfo),Gt(s),null;case 10:return ps(s.type),Gt(s),null;case 19:if(H(rn),m=s.memoizedState,m===null)return Gt(s),null;if(E=(s.flags&128)!==0,T=m.rendering,T===null)if(E)Jc(m,!1);else{if(tn!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(T=Ad(r),T!==null){for(s.flags|=128,Jc(m,!1),r=T.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(rn,rn.current&1|2),gt&&Gn(s,m.treeForkCount),s.child}r=r.sibling}m.tail!==null&&Je()>Vd&&(s.flags|=128,E=!0,Jc(m,!1),s.lanes=4194304)}else{if(!E)if(r=Ad(T),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"&&!T.alternate&&!gt)return Gt(s),null}else 2*Je()-m.renderingStartTime>Vd&&c!==536870912&&(s.flags|=128,E=!0,Jc(m,!1),s.lanes=4194304);m.isBackwards?(T.sibling=s.child,s.child=T):(r=m.last,r!==null?r.sibling=T:s.child=T,m.last=T)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Je(),r.sibling=null,c=rn.current,F(rn,E?c&1|2:c&1),gt&&Gn(s,m.treeForkCount),r):(Gt(s),null);case 22:case 23:return Mr(s),dp(),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&&(Gt(s),s.subtreeFlags&6&&(s.flags|=8192)):Gt(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(Sa),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ps(cn),Gt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function hk(r,s){switch(Fi(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ps(cn),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(Mr(s),s.alternate===null)throw Error(i(340));ya()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(Mr(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));ya()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(rn),null;case 4:return ne(),null;case 10:return ps(s.type),null;case 22:case 23:return Mr(s),dp(),r!==null&&H(Sa),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return ps(cn),null;case 25:return null;default:return null}}function $_(r,s){switch(Fi(s),s.tag){case 3:ps(cn),ne();break;case 26:case 27:case 5:ae(s);break;case 4:ne();break;case 31:s.memoizedState!==null&&Mr(s);break;case 13:Mr(s);break;case 19:H(rn);break;case 10:ps(s.type);break;case 22:case 23:Mr(s),dp(),r!==null&&H(Sa);break;case 24:ps(cn)}}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 T=c.create,P=c.inst;m=T(),P.destroy=m}c=c.next}while(c!==E)}}catch(Y){zt(s,s.return,Y)}}function ho(r,s,c){try{var m=s.updateQueue,E=m!==null?m.lastEffect:null;if(E!==null){var T=E.next;m=T;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!==T)}}catch(be){zt(s,s.return,be)}}function q_(r){var s=r.updateQueue;if(s!==null){var c=r.stateNode;try{Ov(s,c)}catch(m){zt(r,r.return,m)}}}function V_(r,s,c){c.props=Aa(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 Hi(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 W_(r){var s=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(E){zt(r,r.return,E)}}function $p(r,s,c){try{var m=r.stateNode;Lk(m,r.type,c,s),m[Bt]=s}catch(E){zt(r,r.return,E)}}function G_(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&bo(r.type)||r.tag===4}function qp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||G_(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&bo(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 Vp(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&&bo(r.type)&&(c=r.stateNode,s=null),r=r.child,r!==null))for(Vp(r,s,c),r=r.sibling;r!==null;)Vp(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&&bo(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 K_(r){var s=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);$n(s,m,c),s[Rt]=r,s[Bt]=c}catch(T){zt(r,r.return,T)}}var ys=!1,fn=!1,Wp=!1,Y_=typeof WeakSet=="function"?WeakSet:Set,kn=null;function pk(r,s){if(r=r.containerInfo,hm=cf,r=pa(r),as(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,T=m.focusNode;m=m.focusOffset;try{c.nodeType,T.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 ge;we!==c||E!==0&&we.nodeType!==3||(Y=P+E),we!==T||m!==0&&we.nodeType!==3||(re=P+m),we.nodeType===3&&(P+=we.nodeValue.length),(ge=we.firstChild)!==null;)pe=we,we=ge;for(;;){if(we===r)break t;if(pe===c&&++he===E&&(Y=P),pe===T&&++be===m&&(re=P),(ge=we.nextSibling)!==null)break;we=pe,pe=we.parentNode}we=ge}c=Y===-1||re===-1?null:{start:Y,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(pm={focusedElem:r,selectionRange:c},cf=!1,kn=s;kn!==null;)if(s=kn,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,kn=r;else for(;kn!==null;){switch(s=kn,T=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&&T!==null){r=void 0,c=s,E=T.memoizedProps,T=T.memoizedState,m=c.stateNode;try{var Ue=Aa(c.type,E);r=m.getSnapshotBeforeUpdate(Ue,T),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)vm(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":vm(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,kn=r;break}kn=s.return}}function X_(r,s,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:xs(r,c),m&4&&eu(5,c);break;case 1:if(xs(r,c),m&4)if(r=c.stateNode,s===null)try{r.componentDidMount()}catch(P){zt(c,c.return,P)}else{var E=Aa(c.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(E,s,r.__reactInternalSnapshotBeforeUpdate)}catch(P){zt(c,c.return,P)}}m&64&&q_(c),m&512&&tu(c,c.return);break;case 3:if(xs(r,c),m&64&&(r=c.updateQueue,r!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{Ov(r,s)}catch(P){zt(c,c.return,P)}}break;case 27:s===null&&m&4&&K_(c);case 26:case 5:xs(r,c),s===null&&m&4&&W_(c),m&512&&tu(c,c.return);break;case 12:xs(r,c);break;case 31:xs(r,c),m&4&&J_(r,c);break;case 13:xs(r,c),m&4&&e0(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=wk.bind(null,c),$k(r,c))));break;case 22:if(m=c.memoizedState!==null||ys,!m){s=s!==null&&s.memoizedState!==null||fn,E=ys;var T=fn;ys=m,(fn=s)&&!T?Ss(r,c,(c.subtreeFlags&8772)!==0):xs(r,c),ys=E,fn=T}break;case 30:break;default:xs(r,c)}}function Q_(r){var s=r.alternate;s!==null&&(r.alternate=null,Q_(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&Jn(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 Xt=null,vr=!1;function bs(r,s,c){for(c=c.child;c!==null;)Z_(r,s,c),c=c.sibling}function Z_(r,s,c){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ve,c)}catch{}switch(c.tag){case 26:fn||Hi(c,s),bs(r,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:fn||Hi(c,s);var m=Xt,E=vr;bo(c.type)&&(Xt=c.stateNode,vr=!1),bs(r,s,c),uu(c.stateNode),Xt=m,vr=E;break;case 5:fn||Hi(c,s);case 6:if(m=Xt,E=vr,Xt=null,bs(r,s,c),Xt=m,vr=E,Xt!==null)if(vr)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(c.stateNode)}catch(T){zt(c,s,T)}else try{Xt.removeChild(c.stateNode)}catch(T){zt(c,s,T)}break;case 18:Xt!==null&&(vr?(r=Xt,q0(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),Wl(r)):q0(Xt,c.stateNode));break;case 4:m=Xt,E=vr,Xt=c.stateNode.containerInfo,vr=!0,bs(r,s,c),Xt=m,vr=E;break;case 0:case 11:case 14:case 15:ho(2,c,s),fn||ho(4,c,s),bs(r,s,c);break;case 1:fn||(Hi(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"&&V_(c,s,m)),bs(r,s,c);break;case 21:bs(r,s,c);break;case 22:fn=(m=fn)||c.memoizedState!==null,bs(r,s,c),fn=m;break;default:bs(r,s,c)}}function J_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Wl(r)}catch(c){zt(s,s.return,c)}}}function e0(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Wl(r)}catch(c){zt(s,s.return,c)}}function mk(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Y_),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Y_),s;default:throw Error(i(435,r.tag))}}function Ud(r,s){var c=mk(r);s.forEach(function(m){if(!c.has(m)){c.add(m);var E=Ck.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],T=r,P=s,Y=P;e:for(;Y!==null;){switch(Y.tag){case 27:if(bo(Y.type)){Xt=Y.stateNode,vr=!1;break e}break;case 5:Xt=Y.stateNode,vr=!1;break e;case 3:case 4:Xt=Y.stateNode.containerInfo,vr=!0;break e}Y=Y.return}if(Xt===null)throw Error(i(160));Z_(T,P,E),Xt=null,vr=!1,T=E.alternate,T!==null&&(T.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)t0(s,r),s=s.sibling}var gi=null;function t0(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&&(ho(3,r,r.return),eu(3,r),ho(5,r,r.return));break;case 1:_r(s,r),yr(r),m&512&&(fn||c===null||Hi(c,c.return)),m&64&&ys&&(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=gi;if(_r(s,r),yr(r),m&512&&(fn||c===null||Hi(c,c.return)),m&4){var T=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":T=E.getElementsByTagName("title")[0],(!T||T[Cn]||T[Rt]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=E.createElement(m),E.head.insertBefore(T,E.querySelector("head > title"))),$n(T,m,c),T[Rt]=r,Ot(T),m=T;break e;case"link":var P=ty("link","href",E).get(m+(c.href||""));if(P){for(var Y=0;Y<P.length;Y++)if(T=P[Y],T.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&T.getAttribute("rel")===(c.rel==null?null:c.rel)&&T.getAttribute("title")===(c.title==null?null:c.title)&&T.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){P.splice(Y,1);break t}}T=E.createElement(m),$n(T,m,c),E.head.appendChild(T);break;case"meta":if(P=ty("meta","content",E).get(m+(c.content||""))){for(Y=0;Y<P.length;Y++)if(T=P[Y],T.getAttribute("content")===(c.content==null?null:""+c.content)&&T.getAttribute("name")===(c.name==null?null:c.name)&&T.getAttribute("property")===(c.property==null?null:c.property)&&T.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&T.getAttribute("charset")===(c.charSet==null?null:c.charSet)){P.splice(Y,1);break t}}T=E.createElement(m),$n(T,m,c),E.head.appendChild(T);break;default:throw Error(i(468,m))}T[Rt]=r,Ot(T),m=T}r.stateNode=m}else ny(E,r.type,r.stateNode);else r.stateNode=ey(E,m,r.memoizedProps);else T!==m?(T===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):T.count--,m===null?ny(E,r.type,r.stateNode):ey(E,m,r.memoizedProps)):m===null&&r.stateNode!==null&&$p(r,r.memoizedProps,c.memoizedProps)}break;case 27:_r(s,r),yr(r),m&512&&(fn||c===null||Hi(c,c.return)),c!==null&&m&4&&$p(r,r.memoizedProps,c.memoizedProps);break;case 5:if(_r(s,r),yr(r),m&512&&(fn||c===null||Hi(c,c.return)),r.flags&32){E=r.stateNode;try{Qe(E,"")}catch(Ue){zt(r,r.return,Ue)}}m&4&&r.stateNode!=null&&(E=r.memoizedProps,$p(r,E,c!==null?c.memoizedProps:E)),m&1024&&(Wp=!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(Ue){zt(r,r.return,Ue)}}break;case 3:if(sf=null,E=gi,gi=nf(s.containerInfo),_r(s,r),gi=E,yr(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Wl(s.containerInfo)}catch(Ue){zt(r,r.return,Ue)}Wp&&(Wp=!1,n0(r));break;case 4:m=gi,gi=nf(r.stateNode.containerInfo),_r(s,r),yr(r),gi=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)&&(qd=Je()),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=ys,be=fn;if(ys=he||E,fn=be||re,_r(s,r),fn=be,ys=he,yr(r),m&8192)e:for(s=r.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(c===null||re||ys||fn||Ra(r)),c=null,s=r;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(T=re.stateNode,E)P=T.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(Ue){zt(re,re.return,Ue)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=E?"":re.memoizedProps}catch(Ue){zt(re,re.return,Ue)}}}else if(s.tag===18){if(c===null){re=s;try{var ge=re.stateNode;E?V0(ge,!0):V0(re.stateNode,!1)}catch(Ue){zt(re,re.return,Ue)}}}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(G_(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var E=c.stateNode,T=qp(r);Hd(r,T,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);Vp(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 n0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;n0(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function xs(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)X_(r,s.alternate,s),s=s.sibling}function Ra(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:ho(4,s,s.return),Ra(s);break;case 1:Hi(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&V_(s,s.return,c),Ra(s);break;case 27:uu(s.stateNode);case 26:case 5:Hi(s,s.return),Ra(s);break;case 22:s.memoizedState===null&&Ra(s);break;case 30:Ra(s);break;default:Ra(s)}r=r.sibling}}function Ss(r,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,E=r,T=s,P=T.flags;switch(T.tag){case 0:case 11:case 15:Ss(E,T,c),eu(4,T);break;case 1:if(Ss(E,T,c),m=T,E=m.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(he){zt(m,m.return,he)}if(m=T,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++)jv(re[E],Y)}catch(he){zt(m,m.return,he)}}c&&P&64&&q_(T),tu(T,T.return);break;case 27:K_(T);case 26:case 5:Ss(E,T,c),c&&m===null&&P&4&&W_(T),tu(T,T.return);break;case 12:Ss(E,T,c);break;case 31:Ss(E,T,c),c&&P&4&&J_(E,T);break;case 13:Ss(E,T,c),c&&P&4&&e0(E,T);break;case 22:T.memoizedState===null&&Ss(E,T,c),tu(T,T.return);break;case 30:break;default:Ss(E,T,c)}s=s.sibling}}function Gp(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 Kp(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 vi(r,s,c,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)r0(r,s,c,m),s=s.sibling}function r0(r,s,c,m){var E=s.flags;switch(s.tag){case 0:case 11:case 15:vi(r,s,c,m),E&2048&&eu(9,s);break;case 1:vi(r,s,c,m);break;case 3:vi(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){vi(r,s,c,m),r=s.stateNode;try{var T=s.memoizedProps,P=T.id,Y=T.onPostCommit;typeof Y=="function"&&Y(P,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(re){zt(s,s.return,re)}}else vi(r,s,c,m);break;case 31:vi(r,s,c,m);break;case 13:vi(r,s,c,m);break;case 23:break;case 22:T=s.stateNode,P=s.alternate,s.memoizedState!==null?T._visibility&2?vi(r,s,c,m):nu(r,s):T._visibility&2?vi(r,s,c,m):(T._visibility|=2,Ll(r,s,c,m,(s.subtreeFlags&10256)!==0||!1)),E&2048&&Gp(P,s);break;case 24:vi(r,s,c,m),E&2048&&Kp(s.alternate,s);break;default:vi(r,s,c,m)}}function Ll(r,s,c,m,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var T=r,P=s,Y=c,re=m,he=P.flags;switch(P.tag){case 0:case 11:case 15:Ll(T,P,Y,re,E),eu(8,P);break;case 23:break;case 22:var be=P.stateNode;P.memoizedState!==null?be._visibility&2?Ll(T,P,Y,re,E):nu(T,P):(be._visibility|=2,Ll(T,P,Y,re,E)),E&&he&2048&&Gp(P.alternate,P);break;case 24:Ll(T,P,Y,re,E),E&&he&2048&&Kp(P.alternate,P);break;default:Ll(T,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&&Gp(m.alternate,m);break;case 24:nu(c,m),E&2048&&Kp(m.alternate,m);break;default:nu(c,m)}s=s.sibling}}var ru=8192;function Il(r,s,c){if(r.subtreeFlags&ru)for(r=r.child;r!==null;)i0(r,s,c),r=r.sibling}function i0(r,s,c){switch(r.tag){case 26:Il(r,s,c),r.flags&ru&&r.memoizedState!==null&&tE(c,gi,r.memoizedState,r.memoizedProps);break;case 5:Il(r,s,c);break;case 3:case 4:var m=gi;gi=nf(r.stateNode.containerInfo),Il(r,s,c),gi=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=ru,ru=16777216,Il(r,s,c),ru=m):Il(r,s,c));break;default:Il(r,s,c)}}function s0(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function 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];kn=m,a0(m,r)}s0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)o0(r),r=r.sibling}function o0(r){switch(r.tag){case 0:case 11:case 15:iu(r),r.flags&2048&&ho(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];kn=m,a0(m,r)}s0(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:ho(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 a0(r,s){for(;kn!==null;){var c=kn;switch(c.tag){case 0:case 11:case 15:ho(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,kn=m;else e:for(c=r;kn!==null;){m=kn;var E=m.sibling,T=m.return;if(Q_(m),m===c){kn=null;break e}if(E!==null){E.return=T,kn=E;break e}kn=T}}}var gk={getCacheForType:function(r){var s=Hn(cn),c=s.data.get(r);return c===void 0&&(c=r(),s.data.set(r,c)),c},cacheSignal:function(){return Hn(cn).controller.signal}},vk=typeof WeakMap=="function"?WeakMap:Map,jt=0,$t=null,wt=null,Et=0,It=0,jr=null,po=!1,zl=!1,Yp=!1,ws=0,tn=0,mo=0,Ta=0,Xp=0,Or=0,Bl=0,su=null,br=null,Qp=!1,qd=0,l0=0,Vd=1/0,Wd=null,go=null,bn=0,vo=null,Pl=null,Cs=0,Zp=0,Jp=null,c0=null,ou=0,em=null;function Lr(){return(jt&2)!==0&&Et!==0?Et&-Et:G.T!==null?om():Ai()}function u0(){if(Or===0)if((Et&536870912)===0||gt){var r=Ut;Ut<<=1,(Ut&3932160)===0&&(Ut=262144),Or=r}else Or=536870912;return r=Dr.current,r!==null&&(r.flags|=32),Or}function xr(r,s,c){(r===$t&&(It===2||It===9)||r.cancelPendingCommit!==null)&&(Fl(r,0),_o(r,Et,Or,!1)),wn(r,c),((jt&2)===0||r!==$t)&&(r===$t&&((jt&2)===0&&(Ta|=c),tn===4&&_o(r,Et,Or,!1)),Ui(r))}function d0(r,s,c){if((jt&6)!==0)throw Error(i(327));var m=!c&&(s&127)===0&&(s&r.expiredLanes)===0||on(r,s),E=m?bk(r,s):nm(r,s,!0),T=m;do{if(E===0){zl&&!m&&_o(r,s,0,!1);break}else{if(c=r.current.alternate,T&&!_k(c)){E=nm(r,s,!1),T=!1;continue}if(E===2){if(T=s,r.errorRecoveryDisabledLanes&T)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&&(Fl(Y,P).flags|=256),P=nm(Y,P,!1),P!==2){if(Yp&&!re){Y.errorRecoveryDisabledLanes|=T,Ta|=T,E=4;break e}T=br,br=E,T!==null&&(br===null?br=T:br.push.apply(br,T))}E=P}if(T=!1,E!==2)continue}}if(E===1){Fl(r,0),_o(r,s,0,!0);break}e:{switch(m=r,T=E,T){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:_o(m,s,Or,!po);break e;case 2:br=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(E=qd+300-Je(),10<E)){if(_o(m,s,Or,!po),Rn(m,0,!0)!==0)break e;Cs=s,m.timeoutHandle=U0(f0.bind(null,m,c,br,Wd,Qp,s,Or,Ta,Bl,po,T,"Throttled",-0,0),E);break e}f0(m,c,br,Wd,Qp,s,Or,Ta,Bl,po,T,null,-0,0)}}break}while(!0);Ui(r)}function f0(r,s,c,m,E,T,P,Y,re,he,be,we,pe,ge){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},i0(s,T,we);var Ue=(T&62914560)===T?qd-Je():(T&4194048)===T?l0-Je():0;if(Ue=nE(we,Ue),Ue!==null){Cs=T,r.cancelPendingCommit=Ue(b0.bind(null,r,s,T,c,m,E,P,Y,re,be,we,null,pe,ge)),_o(r,T,P,!he);return}}b0(r,s,T,c,m,E,P,Y,re)}function _k(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],T=E.getSnapshot;E=E.value;try{if(!zn(T(),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 _o(r,s,c,m){s&=~Xp,s&=~Ta,r.suspendedLanes|=s,r.pingedLanes&=~s,m&&(r.warmLanes|=s),m=r.expirationTimes;for(var E=s;0<E;){var T=31-ke(E),P=1<<T;m[T]=-1,E&=~P}c!==0&&Tn(r,c,s)}function Gd(){return(jt&6)===0?(au(0),!1):!0}function tm(){if(wt!==null){if(It===0)var r=wt.return;else r=wt,hs=ba=null,vp(r),Nl=null,$c=0,r=wt;for(;r!==null;)$_(r.alternate,r),r=r.return;wt=null}}function Fl(r,s){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,Bk(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),Cs=0,tm(),$t=r,wt=c=Tt(r.current,null),Et=s,It=0,jr=null,po=!1,zl=on(r,s),Yp=!1,Bl=Or=Xp=Ta=mo=tn=0,br=su=null,Qp=!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),T=1<<E;s|=r[E],m&=~T}return ws=s,va(),c}function h0(r,s){vt=null,G.H=Qc,s===Tl||s===Sd?(s=Tv(),It=3):s===sp?(s=Tv(),It=4):It=s===jp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,jr=s,wt===null&&(tn=1,Id(r,vn(s,r.current)))}function p0(){var r=Dr.current;return r===null?!0:(Et&4194048)===Et?Jr===null:(Et&62914560)===Et||(Et&536870912)!==0?r===Jr:!1}function m0(){var r=G.H;return G.H=Qc,r===null?Qc:r}function g0(){var r=G.A;return G.A=gk,r}function Kd(){tn=4,po||(Et&4194048)!==Et&&Dr.current!==null||(zl=!0),(mo&134217727)===0&&(Ta&134217727)===0||$t===null||_o($t,Et,Or,!1)}function nm(r,s,c){var m=jt;jt|=2;var E=m0(),T=g0();($t!==r||Et!==s)&&(Wd=null,Fl(r,s)),s=!1;var P=tn;e:do try{if(It!==0&&wt!==null){var Y=wt,re=jr;switch(It){case 8:tm(),P=6;break e;case 3:case 2:case 9:case 6:Dr.current===null&&(s=!0);var he=It;if(It=0,jr=null,Hl(r,Y,re,he),c&&zl){P=0;break e}break;default:he=It,It=0,jr=null,Hl(r,Y,re,he)}}yk(),P=tn;break}catch(be){h0(r,be)}while(!0);return s&&r.shellSuspendCounter++,hs=ba=null,jt=m,G.H=E,G.A=T,wt===null&&($t=null,Et=0,va()),P}function yk(){for(;wt!==null;)v0(wt)}function bk(r,s){var c=jt;jt|=2;var m=m0(),E=g0();$t!==r||Et!==s?(Wd=null,Vd=Je()+500,Fl(r,s)):zl=on(r,s);e:do try{if(It!==0&&wt!==null){s=wt;var T=jr;t:switch(It){case 1:It=0,jr=null,Hl(r,s,T,1);break;case 2:case 9:if(Av(T)){It=0,jr=null,_0(s);break}s=function(){It!==2&&It!==9||$t!==r||(It=7),Ui(r)},T.then(s,s);break e;case 3:It=7;break e;case 4:It=5;break e;case 7:Av(T)?(It=0,jr=null,_0(s)):(It=0,jr=null,Hl(r,s,T,7));break;case 5:var P=null;switch(wt.tag){case 26:P=wt.memoizedState;case 5:case 27:var Y=wt;if(P?ry(P):Y.stateNode.complete){It=0,jr=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,jr=null,Hl(r,s,T,5);break;case 6:It=0,jr=null,Hl(r,s,T,6);break;case 8:tm(),tn=6;break e;default:throw Error(i(462))}}xk();break}catch(be){h0(r,be)}while(!0);return hs=ba=null,G.H=m,G.A=E,jt=c,wt!==null?0:($t=null,Et=0,va(),tn)}function xk(){for(;wt!==null&&!pt();)v0(wt)}function v0(r){var s=H_(r.alternate,r,ws);r.memoizedProps=r.pendingProps,s===null?Yd(r):wt=s}function _0(r){var s=r,c=s.alternate;switch(s.tag){case 15:case 0:s=L_(c,s,s.pendingProps,s.type,void 0,Et);break;case 11:s=L_(c,s,s.pendingProps,s.type.render,s.ref,Et);break;case 5:vp(s);default:$_(c,s),s=wt=Xr(s,ws),s=H_(c,s,ws)}r.memoizedProps=r.pendingProps,s===null?Yd(r):wt=s}function Hl(r,s,c,m){hs=ba=null,vp(s),Nl=null,$c=0;var E=s.return;try{if(ck(r,E,s,c,Et)){tn=1,Id(r,vn(c,r.current)),wt=null;return}}catch(T){if(E!==null)throw wt=E,T;tn=1,Id(r,vn(c,r.current)),wt=null;return}s.flags&32768?(gt||m===1?r=!0:zl||(Et&536870912)!==0?r=!1:(po=r=!0,(m===2||m===9||m===3||m===6)&&(m=Dr.current,m!==null&&m.tag===13&&(m.flags|=16384))),y0(s,r)):Yd(s)}function Yd(r){var s=r;do{if((s.flags&32768)!==0){y0(s,po);return}r=s.return;var c=fk(s.alternate,s,ws);if(c!==null){wt=c;return}if(s=s.sibling,s!==null){wt=s;return}wt=s=r}while(s!==null);tn===0&&(tn=5)}function y0(r,s){do{var c=hk(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);tn=6,wt=null}function b0(r,s,c,m,E,T,P,Y,re){r.cancelPendingCommit=null;do Xd();while(bn!==0);if((jt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(T=s.lanes|s.childLanes,T|=Cl,Ei(r,c,T,P,Y,re),r===$t&&(wt=$t=null,Et=0),Pl=s,vo=r,Cs=c,Zp=T,Jp=E,c0=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,kk(_e,function(){return k0(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=G.T,G.T=null,E=Z.p,Z.p=2,P=jt,jt|=4;try{pk(r,s,c)}finally{jt=P,Z.p=E,G.T=m}}bn=1,x0(),S0(),w0()}}function x0(){if(bn===1){bn=0;var r=vo,s=Pl,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=jt;jt|=4;try{t0(s,r);var T=pm,P=pa(r.containerInfo),Y=T.focusedElem,re=T.selectionRange;if(P!==Y&&Y&&Y.ownerDocument&&to(Y.ownerDocument.documentElement,Y)){if(re!==null&&as(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 ge=pe.getSelection(),Ue=Y.textContent.length,at=Math.min(re.start,Ue),Ht=re.end===void 0?at:Math.min(re.end,Ue);!ge.extend&&at>Ht&&(P=Ht,Ht=at,at=P);var ce=ha(Y,at),oe=ha(Y,Ht);if(ce&&oe&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==oe.node||ge.focusOffset!==oe.offset)){var fe=we.createRange();fe.setStart(ce.node,ce.offset),ge.removeAllRanges(),at>Ht?(ge.addRange(fe),ge.extend(oe.node,oe.offset)):(fe.setEnd(oe.node,oe.offset),ge.addRange(fe))}}}}for(we=[],ge=Y;ge=ge.parentNode;)ge.nodeType===1&&we.push({element:ge,left:ge.scrollLeft,top:ge.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=!!hm,pm=hm=null}finally{jt=E,Z.p=m,G.T=c}}r.current=s,bn=2}}function S0(){if(bn===2){bn=0;var r=vo,s=Pl,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=jt;jt|=4;try{X_(r,s.alternate,s)}finally{jt=E,Z.p=m,G.T=c}}bn=3}}function w0(){if(bn===4||bn===3){bn=0,Ze();var r=vo,s=Pl,c=Cs,m=c0;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?bn=5:(bn=0,Pl=vo=null,C0(r,r.pendingLanes));var E=r.pendingLanes;if(E===0&&(go=null),or(c),s=s.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ve,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 T=r.onRecoverableError,P=0;P<m.length;P++){var Y=m[P];T(Y.value,{componentStack:Y.stack})}}finally{G.T=s,Z.p=E}}(Cs&3)!==0&&Xd(),Ui(r),E=r.pendingLanes,(c&261930)!==0&&(E&42)!==0?r===em?ou++:(ou=0,em=r):ou=0,au(0)}}function C0(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Hc(s)))}function Xd(){return x0(),S0(),w0(),k0()}function k0(){if(bn!==5)return!1;var r=vo,s=Zp;Zp=0;var c=or(Cs),m=G.T,E=Z.p;try{Z.p=32>c?32:c,G.T=null,c=Jp,Jp=null;var T=vo,P=Cs;if(bn=0,Pl=vo=null,Cs=0,(jt&6)!==0)throw Error(i(331));var Y=jt;if(jt|=4,o0(T.current),r0(T,T.current,P,c),jt=Y,au(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ve,T)}catch{}return!0}finally{Z.p=E,G.T=m,C0(r,s)}}function E0(r,s,c){s=vn(c,s),s=Mp(r.stateNode,s,2),r=co(r,s,2),r!==null&&(wn(r,2),Ui(r))}function zt(r,s,c){if(r.tag===3)E0(r,r,c);else for(;s!==null;){if(s.tag===3){E0(s,r,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(go===null||!go.has(m))){r=vn(c,r),c=A_(2),m=co(s,c,2),m!==null&&(R_(c,m,s,r),wn(m,2),Ui(m));break}}s=s.return}}function rm(r,s,c){var m=r.pingCache;if(m===null){m=r.pingCache=new vk;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)||(Yp=!0,E.add(c),r=Sk.bind(null,r,s,c),s.then(r,r))}function Sk(r,s,c){var m=r.pingCache;m!==null&&m.delete(s),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,$t===r&&(Et&c)===c&&(tn===4||tn===3&&(Et&62914560)===Et&&300>Je()-qd?(jt&2)===0&&Fl(r,0):Xp|=c,Bl===Et&&(Bl=0)),Ui(r)}function A0(r,s){s===0&&(s=an()),r=Ae(r,s),r!==null&&(wn(r,s),Ui(r))}function wk(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),A0(r,c)}function Ck(r,s){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,E=r.memoizedState;E!==null&&(c=E.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(s),A0(r,c)}function kk(r,s){return ct(r,s)}var Qd=null,Ul=null,im=!1,Zd=!1,sm=!1,yo=0;function Ui(r){r!==Ul&&r.next===null&&(Ul===null?Qd=Ul=r:Ul=Ul.next=r),Zd=!0,im||(im=!0,Ak())}function au(r,s){if(!sm&&Zd){sm=!0;do for(var c=!1,m=Qd;m!==null;){if(r!==0){var E=m.pendingLanes;if(E===0)var T=0;else{var P=m.suspendedLanes,Y=m.pingedLanes;T=(1<<31-ke(42|r)+1)-1,T&=E&~(P&~Y),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(c=!0,D0(m,T))}else T=Et,T=Rn(m,m===$t?T:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(T&3)===0||on(m,T)||(c=!0,D0(m,T));m=m.next}while(c);sm=!1}}function Ek(){R0()}function R0(){Zd=im=!1;var r=0;yo!==0&&zk()&&(r=yo);for(var s=Je(),c=null,m=Qd;m!==null;){var E=m.next,T=T0(m,s);T===0?(m.next=null,c===null?Qd=E:c.next=E,E===null&&(Ul=c)):(c=m,(r!==0||(T&3)!==0)&&(Zd=!0)),m=E}bn!==0&&bn!==5||au(r),yo!==0&&(yo=0)}function T0(r,s){for(var c=r.suspendedLanes,m=r.pingedLanes,E=r.expirationTimes,T=r.pendingLanes&-62914561;0<T;){var P=31-ke(T),Y=1<<P,re=E[P];re===-1?((Y&c)===0||(Y&m)!==0)&&(E[P]=Wt(Y,s)):re<=s&&(r.expiredLanes|=Y),T&=~Y}if(s=$t,c=Et,c=Rn(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||on(r,c)){if(s=c&-c,s===r.callbackPriority)return s;switch(m!==null&&ot(m),or(c)){case 2:case 8:c=xe;break;case 32:c=_e;break;case 268435456:c=Le;break;default:c=_e}return m=N0.bind(null,r),c=ct(c,m),r.callbackPriority=s,r.callbackNode=c,s}return m!==null&&m!==null&&ot(m),r.callbackPriority=2,r.callbackNode=null,2}function N0(r,s){if(bn!==0&&bn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Xd()&&r.callbackNode!==c)return null;var m=Et;return m=Rn(r,r===$t?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(d0(r,m,s),T0(r,Je()),r.callbackNode!=null&&r.callbackNode===c?N0.bind(null,r):null)}function D0(r,s){if(Xd())return null;d0(r,s,!0)}function Ak(){Pk(function(){(jt&6)!==0?ct(de,Ek):R0()})}function om(){if(yo===0){var r=Al;r===0&&(r=Kt,Kt<<=1,(Kt&261888)===0&&(Kt=256)),yo=r}return yo}function M0(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:es(""+r)}function j0(r,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,r.id&&c.setAttribute("form",r.id),s.parentNode.insertBefore(c,s),r=new FormData(r),c.parentNode.removeChild(c),r}function Rk(r,s,c,m,E){if(s==="submit"&&c&&c.stateNode===E){var T=M0((E[Bt]||null).action),P=m.submitter;P&&(s=(s=P[Bt]||null)?M0(s.formAction):P.getAttribute("formAction"),s!==null&&(T=s,P=null));var Y=new is("action","action",null,m,E);r.push({event:Y,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(yo!==0){var re=P?j0(E,P):new FormData(E);Ep(c,{pending:!0,data:re,method:E.method,action:T},null,re)}}else typeof T=="function"&&(Y.preventDefault(),re=P?j0(E,P):new FormData(E),Ep(c,{pending:!0,data:re,method:E.method,action:T},T,re))},currentTarget:E}]})}}for(var am=0;am<wl.length;am++){var lm=wl[am],Tk=lm.toLowerCase(),Nk=lm[0].toUpperCase()+lm.slice(1);mr(Tk,"on"+Nk)}mr(ls,"onAnimationEnd"),mr(cs,"onAnimationIteration"),mr(ma,"onAnimationStart"),mr("dblclick","onDoubleClick"),mr("focusin","onFocus"),mr("focusout","onBlur"),mr(ro,"onTransitionRun"),mr(Sl,"onTransitionStart"),mr(vd,"onTransitionCancel"),mr(zc,"onTransitionEnd"),Lt("onMouseEnter",["mouseout","mouseover"]),Lt("onMouseLeave",["mouseout","mouseover"]),Lt("onPointerEnter",["pointerout","pointerover"]),Lt("onPointerLeave",["pointerout","pointerover"]),jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jn("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(" "),Dk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function O0(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],E=m.event;m=m.listeners;e:{var T=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!==T&&E.isPropagationStopped())break e;T=Y,E.currentTarget=he;try{T(E)}catch(be){ga(be)}E.currentTarget=null,T=re}else for(P=0;P<m.length;P++){if(Y=m[P],re=Y.instance,he=Y.currentTarget,Y=Y.listener,re!==T&&E.isPropagationStopped())break e;T=Y,E.currentTarget=he;try{T(E)}catch(be){ga(be)}E.currentTarget=null,T=re}}}}function Ct(r,s){var c=s[mn];c===void 0&&(c=s[mn]=new Set);var m=r+"__bubble";c.has(m)||(L0(s,r,2,!1),c.add(m))}function cm(r,s,c){var m=0;s&&(m|=4),L0(c,r,m,s)}var Jd="_reactListening"+Math.random().toString(36).slice(2);function um(r){if(!r[Jd]){r[Jd]=!0,cr.forEach(function(c){c!=="selectionchange"&&(Dk.has(c)||cm(c,!1,r),cm(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Jd]||(s[Jd]=!0,cm("selectionchange",!1,s))}}function L0(r,s,c,m){switch(uy(s)){case 2:var E=sE;break;case 8:E=oE;break;default:E=km}c=E.bind(null,s,c,r),E=void 0,!Vs||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 dm(r,s,c,m,E){var T=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=Dn(Y),P===null)return;if(re=P.tag,re===5||re===6||re===26||re===27){m=T=P;continue e}Y=Y.parentNode}}m=m.return}qs(function(){var he=T,be=Us(c),we=[];e:{var pe=Bc.get(r);if(pe!==void 0){var ge=is,Ue=r;switch(r){case"keypress":if(ns(c)===0)break e;case"keydown":case"keyup":ge=sl;break;case"focusin":Ue="focus",ge=Ys;break;case"focusout":Ue="blur",ge=Ys;break;case"beforeblur":case"afterblur":ge=Ys;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":ge=Jo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=Za;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=ji;break;case ls:case cs:case ma:ge=Ja;break;case zc:ge=di;break;case"scroll":case"scrollend":ge=Qa;break;case"wheel":ge=ia;break;case"copy":case"cut":case"paste":ge=el;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=Be;break;case"toggle":case"beforetoggle":ge=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=Ni(oe,ce),Se!=null&&at.push(cu(oe,Se,fe))),Ht)break;oe=oe.return}0<at.length&&(pe=new ge(pe,Ue,null,c,be),we.push({event:pe,listeners:at}))}}if((s&7)===0){e:{if(pe=r==="mouseover"||r==="pointerover",ge=r==="mouseout"||r==="pointerout",pe&&c!==Hs&&(Ue=c.relatedTarget||c.fromElement)&&(Dn(Ue)||Ue[pn]))break e;if((ge||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(Ue=c.relatedTarget||c.toElement,ge=he,Ue=Ue?Dn(Ue):null,Ue!==null&&(Ht=l(Ue),at=Ue.tag,Ue!==Ht||at!==5&&at!==27&&at!==6)&&(Ue=null)):(ge=null,Ue=he),ge!==Ue)){if(at=Jo,Se="onMouseLeave",ce="onMouseEnter",oe="mouse",(r==="pointerout"||r==="pointerover")&&(at=Be,Se="onPointerLeave",ce="onPointerEnter",oe="pointer"),Ht=ge==null?pe:lr(ge),fe=Ue==null?pe:lr(Ue),pe=new at(Se,oe+"leave",ge,c,be),pe.target=Ht,pe.relatedTarget=fe,Se=null,Dn(be)===he&&(at=new at(ce,oe+"enter",Ue,c,be),at.target=fe,at.relatedTarget=Ht,Se=at),Ht=Se,ge&&Ue)t:{for(at=Mk,ce=ge,oe=Ue,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;ge!==null&&I0(we,pe,ge,at,!1),Ue!==null&&Ht!==null&&I0(we,Ht,Ue,at,!0)}}e:{if(pe=he?lr(he):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var Dt=ml;else if(pl(pe))if(ua)Dt=Ic;else{Dt=eo;var Ye=_l}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?he&&Fs(he.elementType)&&(Dt=ml):Dt=yl;if(Dt&&(Dt=Dt(r,he))){ca(we,Dt,c,be);break e}Ye&&Ye(r,pe,he),r==="focusout"&&he&&pe.type==="number"&&he.memoizedProps.value!=null&&Ps(pe,"number",pe.value)}switch(Ye=he?lr(he):window,r){case"focusin":(pl(Ye)||Ye.contentEditable==="true")&&(lt=Ye,Bi=he,fr=null);break;case"focusout":fr=Bi=lt=null;break;case"mousedown":Kr=!0;break;case"contextmenu":case"mouseup":case"dragend":Kr=!1,fi(we,c,be);break;case"selectionchange":if(no)break;case"keydown":case"keyup":fi(we,c,be)}var yt;if(sa)e:{switch(r){case"compositionstart":var At="onCompositionStart";break e;case"compositionend":At="onCompositionEnd";break e;case"compositionupdate":At="onCompositionUpdate";break e}At=void 0}else Li?Zs(r,c)&&(At="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(At="onCompositionStart");At&&(oa&&c.locale!=="ko"&&(Li||At!=="onCompositionStart"?At==="onCompositionEnd"&&Li&&(yt=Qo()):(Ar=be,Xo="value"in Ar?Ar.value:Ar.textContent,Li=!0)),Ye=ef(he,At),0<Ye.length&&(At=new na(At,r,null,c,be),we.push({event:At,listeners:Ye}),yt?At.data=yt:(yt=la(c),yt!==null&&(At.data=yt)))),(yt=jc?fl(r,c):Oc(r,c))&&(At=ef(he,"onBeforeInput"),0<At.length&&(Ye=new na("onBeforeInput","beforeinput",null,c,be),we.push({event:Ye,listeners:At}),Ye.data=yt)),Rk(we,r,he,c,be)}O0(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,T=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||T===null||(E=Ni(r,c),E!=null&&m.unshift(cu(r,E,T)),E=Ni(r,s),E!=null&&m.push(cu(r,E,T))),r.tag===3)return m;r=r.return}return[]}function Mk(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function I0(r,s,c,m,E){for(var T=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=Ni(c,T),he!=null&&P.unshift(cu(c,he,re))):E||(he=Ni(c,T),he!=null&&P.push(cu(c,he,re)))),c=c.return}P.length!==0&&r.push({event:s,listeners:P})}var jk=/\r\n?/g,Ok=/\u0000|\uFFFD/g;function z0(r){return(typeof r=="string"?r:""+r).replace(jk,`
49
- `).replace(Ok,"")}function B0(r,s){return s=z0(s),z0(r)===s}function Ft(r,s,c,m,E,T){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":er(r,"class",m);break;case"tabIndex":er(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":er(r,c,m);break;case"style":Yo(r,m,T);break;case"data":if(s!=="object"){er(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=es(""+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 T=="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=es(""+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=es(""+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),Vr(r,"popover",m);break;case"xlinkActuate":On(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":On(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":On(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":On(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":On(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":On(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":On(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":On(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":On(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Vr(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=Ya.get(c)||c,Vr(r,c,m))}}function fm(r,s,c,m,E,T){switch(c){case"style":Yo(r,m,T);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(!Ri.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(E=c.endsWith("Capture"),s=c.slice(2,E?c.length-7:void 0),T=r[Bt]||null,T=T!=null?T[c]:null,typeof T=="function"&&r.removeEventListener(s,T,E),typeof m=="function")){typeof T!="function"&&T!==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,""):Vr(r,c,m)}}}function $n(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,T;for(T in c)if(c.hasOwnProperty(T)){var P=c[T];if(P!=null)switch(T){case"src":m=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Ft(r,s,T,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=T=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":T=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)}}Go(r,T,Y,re,he,P,E,!1);return;case"select":Ct("invalid",r),m=P=T=null;for(E in c)if(c.hasOwnProperty(E)&&(Y=c[E],Y!=null))switch(E){case"value":T=Y;break;case"defaultValue":P=Y;break;case"multiple":m=Y;default:Ft(r,s,E,Y,c,null)}s=T,c=P,r.multiple=!!m,s!=null?ci(r,!!m,s,!1):c!=null&&ci(r,!!m,c,!0);return;case"textarea":Ct("invalid",r),T=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":T=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(91));break;default:Ft(r,s,P,Y,c,null)}Ka(r,m,E,T);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(Fs(s)){for(be in c)c.hasOwnProperty(be)&&(m=c[be],m!==void 0&&fm(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 Lk(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,T=null,P=null,Y=null,re=null,he=null,be=null;for(ge in c){var we=c[ge];if(c.hasOwnProperty(ge)&&we!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":re=we;default:m.hasOwnProperty(ge)||Ft(r,s,ge,null,m,we)}}for(var pe in m){var ge=m[pe];if(we=c[pe],m.hasOwnProperty(pe)&&(ge!=null||we!=null))switch(pe){case"type":T=ge;break;case"name":E=ge;break;case"checked":he=ge;break;case"defaultChecked":be=ge;break;case"value":P=ge;break;case"defaultValue":Y=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(i(137,s));break;default:ge!==we&&Ft(r,s,pe,ge,m,we)}}Bs(r,P,Y,re,he,be,T,E);return;case"select":ge=P=Y=pe=null;for(T in c)if(re=c[T],c.hasOwnProperty(T)&&re!=null)switch(T){case"value":break;case"multiple":ge=re;default:m.hasOwnProperty(T)||Ft(r,s,T,null,m,re)}for(E in m)if(T=m[E],re=c[E],m.hasOwnProperty(E)&&(T!=null||re!=null))switch(E){case"value":pe=T;break;case"defaultValue":Y=T;break;case"multiple":P=T;default:T!==re&&Ft(r,s,E,T,m,re)}s=Y,c=P,m=ge,pe!=null?ci(r,!!c,pe,!1):!!m!=!!c&&(s!=null?ci(r,!!c,s,!0):ci(r,!!c,c?[]:"",!1));return;case"textarea":ge=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],T=c[P],m.hasOwnProperty(P)&&(E!=null||T!=null))switch(P){case"value":pe=E;break;case"defaultValue":ge=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:E!==T&&Ft(r,s,P,E,m,T)}Dc(r,pe,ge);return;case"option":for(var Ue in c)if(pe=c[Ue],c.hasOwnProperty(Ue)&&pe!=null&&!m.hasOwnProperty(Ue))switch(Ue){case"selected":r.selected=!1;break;default:Ft(r,s,Ue,null,m,pe)}for(re in m)if(pe=m[re],ge=c[re],m.hasOwnProperty(re)&&pe!==ge&&(pe!=null||ge!=null))switch(re){case"selected":r.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Ft(r,s,re,pe,m,ge)}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],ge=c[he],m.hasOwnProperty(he)&&pe!==ge&&(pe!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,s));break;default:Ft(r,s,he,pe,m,ge)}return;default:if(Fs(s)){for(var Ht in c)pe=c[Ht],c.hasOwnProperty(Ht)&&pe!==void 0&&!m.hasOwnProperty(Ht)&&fm(r,s,Ht,void 0,m,pe);for(be in m)pe=m[be],ge=c[be],!m.hasOwnProperty(be)||pe===ge||pe===void 0&&ge===void 0||fm(r,s,be,pe,m,ge);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],ge=c[we],!m.hasOwnProperty(we)||pe===ge||pe==null&&ge==null||Ft(r,s,we,pe,m,ge)}function P0(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ik(){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],T=E.transferSize,P=E.initiatorType,Y=E.duration;if(T&&Y&&P0(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&&P0(we)&&(re=re.responseEnd,P+=be*(re<Y?1:(Y-he)/(re-he)))}if(--m,s+=8*(T+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 hm=null,pm=null;function tf(r){return r.nodeType===9?r:r.ownerDocument}function F0(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H0(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function mm(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 gm=null;function zk(){var r=window.event;return r&&r.type==="popstate"?r===gm?!1:(gm=r,!0):(gm=null,!1)}var U0=typeof setTimeout=="function"?setTimeout:void 0,Bk=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,Pk=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(r){return $0.resolve(null).then(r).catch(Fk)}:U0;function Fk(r){setTimeout(function(){throw r})}function bo(r){return r==="head"}function q0(r,s){var c=s,m=0;do{var E=c.nextSibling;if(r.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(E),Wl(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 T=c.firstChild;T;){var P=T.nextSibling,Y=T.nodeName;T[Cn]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&T.rel.toLowerCase()==="stylesheet"||c.removeChild(T),T=P}}else c==="body"&&uu(r.ownerDocument.body);c=E}while(c);Wl(s)}function V0(r,s){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function vm(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":vm(c),Jn(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function Hk(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[Cn])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(T=r.getAttribute("rel"),T==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(T!==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(T=r.getAttribute("src"),(T!==(E.src==null?null:E.src)||r.getAttribute("type")!==(E.type==null?null:E.type)||r.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&T&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var T=E.name==null?null:""+E.name;if(E.type==="hidden"&&r.getAttribute("name")===T)return r}else return r;if(r=ei(r.nextSibling),r===null)break}return null}function Uk(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 W0(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 _m(r){return r.data==="$?"||r.data==="$~"}function ym(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function $k(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 bm=null;function G0(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(s===0)return ei(r.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}r=r.nextSibling}return null}function K0(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return r;s--}else c!=="/$"&&c!=="/&"||s++}r=r.previousSibling}return null}function Y0(r,s,c){switch(s=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]);Jn(r)}var ti=new Map,X0=new Set;function nf(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ks=Z.d;Z.d={f:qk,r:Vk,D:Wk,C:Gk,L:Kk,m:Yk,X:Qk,S:Xk,M:Zk};function qk(){var r=ks.f(),s=Gd();return r||s}function Vk(r){var s=ar(r);s!==null&&s.tag===5&&s.type==="form"?h_(s):ks.r(r)}var $l=typeof document>"u"?null:document;function Q0(r,s,c){var m=$l;if(m&&typeof s=="string"&&s){var E=In(s);E='link[rel="'+r+'"][href="'+E+'"]',typeof c=="string"&&(E+='[crossorigin="'+c+'"]'),X0.has(E)||(X0.add(E),r={rel:r,crossOrigin:c,href:s},m.querySelector(E)===null&&(s=m.createElement("link"),$n(s,"link",r),Ot(s),m.head.appendChild(s)))}}function Wk(r){ks.D(r),Q0("dns-prefetch",r,null)}function Gk(r,s){ks.C(r,s),Q0("preconnect",r,s)}function Kk(r,s,c){ks.L(r,s,c);var m=$l;if(m&&r&&s){var E='link[rel="preload"][as="'+In(s)+'"]';s==="image"&&c&&c.imageSrcSet?(E+='[imagesrcset="'+In(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(E+='[imagesizes="'+In(c.imageSizes)+'"]')):E+='[href="'+In(r)+'"]';var T=E;switch(s){case"style":T=ql(r);break;case"script":T=Vl(r)}ti.has(T)||(r=h({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:r,as:s},c),ti.set(T,r),m.querySelector(E)!==null||s==="style"&&m.querySelector(du(T))||s==="script"&&m.querySelector(fu(T))||(s=m.createElement("link"),$n(s,"link",r),Ot(s),m.head.appendChild(s)))}}function Yk(r,s){ks.m(r,s);var c=$l;if(c&&r){var m=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+In(m)+'"][href="'+In(r)+'"]',T=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=Vl(r)}if(!ti.has(T)&&(r=h({rel:"modulepreload",href:r},s),ti.set(T,r),c.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(fu(T)))return}m=c.createElement("link"),$n(m,"link",r),Ot(m),c.head.appendChild(m)}}}function Xk(r,s,c){ks.S(r,s,c);var m=$l;if(m&&r){var E=Mn(m).hoistableStyles,T=ql(r);s=s||"default";var P=E.get(T);if(!P){var Y={loading:0,preload:null};if(P=m.querySelector(du(T)))Y.loading=5;else{r=h({rel:"stylesheet",href:r,"data-precedence":s},c),(c=ti.get(T))&&xm(r,c);var re=P=m.createElement("link");Ot(re),$n(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(T,P)}}}function Qk(r,s){ks.X(r,s);var c=$l;if(c&&r){var m=Mn(c).hoistableScripts,E=Vl(r),T=m.get(E);T||(T=c.querySelector(fu(E)),T||(r=h({src:r,async:!0},s),(s=ti.get(E))&&Sm(r,s),T=c.createElement("script"),Ot(T),$n(T,"link",r),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function Zk(r,s){ks.M(r,s);var c=$l;if(c&&r){var m=Mn(c).hoistableScripts,E=Vl(r),T=m.get(E);T||(T=c.querySelector(fu(E)),T||(r=h({src:r,async:!0,type:"module"},s),(s=ti.get(E))&&Sm(r,s),T=c.createElement("script"),Ot(T),$n(T,"link",r),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function Z0(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=Mn(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 T=Mn(E).hoistableStyles,P=T.get(r);if(P||(E=E.ownerDocument||E,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(r,P),(T=E.querySelector(du(r)))&&!T._p&&(P.instance=T,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),T||Jk(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=Vl(c),c=Mn(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="'+In(r)+'"'}function du(r){return'link[rel="stylesheet"]['+r+"]"}function J0(r){return h({},r,{"data-precedence":r.precedence,precedence:null})}function Jk(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}),$n(s,"link",c),Ot(s),r.head.appendChild(s))}function Vl(r){return'[src="'+In(r)+'"]'}function fu(r){return"script[async]"+r}function ey(r,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var m=r.querySelector('style[data-href~="'+In(c.href)+'"]');if(m)return s.instance=m,Ot(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"),Ot(m),$n(m,"style",E),rf(m,c.precedence,r),s.instance=m;case"stylesheet":E=ql(c.href);var T=r.querySelector(du(E));if(T)return s.state.loading|=4,s.instance=T,Ot(T),T;m=J0(c),(E=ti.get(E))&&xm(m,E),T=(r.ownerDocument||r).createElement("link"),Ot(T);var P=T;return P._p=new Promise(function(Y,re){P.onload=Y,P.onerror=re}),$n(T,"link",m),s.state.loading|=4,rf(T,c.precedence,r),s.instance=T;case"script":return T=Vl(c.src),(E=r.querySelector(fu(T)))?(s.instance=E,Ot(E),E):(m=c,(E=ti.get(T))&&(m=h({},c),Sm(m,E)),r=r.ownerDocument||r,E=r.createElement("script"),Ot(E),$n(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,T=E,P=0;P<m.length;P++){var Y=m[P];if(Y.dataset.precedence===s)T=Y;else if(T!==E)break}T?T.parentNode.insertBefore(r,T.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(r,s.firstChild))}function xm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function Sm(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 ty(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 T=c[E];if(!(T[Cn]||T[Rt]||r==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var P=T.getAttribute(s)||"";P=r+P;var Y=m.get(P);Y?Y.push(T):m.set(P,[T])}}return m}function ny(r,s,c){r=r.ownerDocument||r,r.head.insertBefore(c,s==="title"?r.querySelector("head > title"):null)}function eE(r,s,c){if(c===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return r=s.disabled,typeof s.precedence=="string"&&r==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ry(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function tE(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),T=s.querySelector(du(E));if(T){s=T._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=T,Ot(T);return}T=s.ownerDocument||s,m=J0(m),(E=ti.get(E))&&xm(m,E),T=T.createElement("link"),Ot(T);var P=T;P._p=new Promise(function(Y,re){P.onload=Y,P.onerror=re}),$n(T,"link",m),c.instance=T}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 wm=0;function nE(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 T=r.unsuspend;r.unsuspend=null,T()}},6e4+s);0<r.imgBytes&&wm===0&&(wm=62500*Ik());var E=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&lf(r,r.stylesheets),r.unsuspend)){var T=r.unsuspend;r.unsuspend=null,T()}},(r.imgBytes>wm?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(rE,r),af=null,of.call(r))}function rE(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]"),T=0;T<E.length;T++){var P=E[T];(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"),T=c.get(P)||m,T===m&&c.set(null,E),c.set(P,E),this.count++,m=of.bind(this),E.addEventListener("load",m),E.addEventListener("error",m),T?T.parentNode.insertBefore(E,T.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 iE(r,s,c,m,E,T,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=ln(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ln(0),this.hiddenUpdates=ln(null),this.identifierPrefix=m,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function iy(r,s,c,m,E,T,P,Y,re,he,be,we){return r=new iE(r,s,c,P,re,he,be,we,Y),s=1,T===!0&&(s|=24),T=Me(3,null,null,s),r.current=T,T.stateNode=r,s=np(),s.refCount++,r.pooledCache=s,s.refCount++,T.memoizedState={element:m,isDehydrated:c,cache:s},op(T),r}function sy(r){return r?(r=le,r):le}function oy(r,s,c,m,E,T){E=sy(E),m.context===null?m.context=E:m.pendingContext=E,m=lo(s),m.payload={element:c},T=T===void 0?null:T,T!==null&&(m.callback=T),c=co(r,m,s),c!==null&&(xr(c,r,s),Vc(c,r,s))}function ay(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function Cm(r,s){ay(r,s),(r=r.alternate)&&ay(r,s)}function ly(r){if(r.tag===13||r.tag===31){var s=Ae(r,67108864);s!==null&&xr(s,r,67108864),Cm(r,67108864)}}function cy(r){if(r.tag===13||r.tag===31){var s=Lr();s=qr(s);var c=Ae(r,s);c!==null&&xr(c,r,s),Cm(r,s)}}var cf=!0;function sE(r,s,c,m){var E=G.T;G.T=null;var T=Z.p;try{Z.p=2,km(r,s,c,m)}finally{Z.p=T,G.T=E}}function oE(r,s,c,m){var E=G.T;G.T=null;var T=Z.p;try{Z.p=8,km(r,s,c,m)}finally{Z.p=T,G.T=E}}function km(r,s,c,m){if(cf){var E=Em(m);if(E===null)dm(r,s,m,uf,c),dy(r,m);else if(lE(E,r,s,c,m))m.stopPropagation();else if(dy(r,m),s&4&&-1<aE.indexOf(r)){for(;E!==null;){var T=ar(E);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var P=Qt(T.pendingLanes);if(P!==0){var Y=T;for(Y.pendingLanes|=2,Y.entangledLanes|=2;P;){var re=1<<31-ke(P);Y.entanglements[1]|=re,P&=~re}Ui(T),(jt&6)===0&&(Vd=Je()+500,au(0))}}break;case 31:case 13:Y=Ae(T,2),Y!==null&&xr(Y,T,2),Gd(),Cm(T,2)}if(T=Em(m),T===null&&dm(r,s,m,uf,c),T===E)break;E=T}E!==null&&m.stopPropagation()}else dm(r,s,m,null,c)}}function Em(r){return r=Us(r),Am(r)}var uf=null;function Am(r){if(uf=null,r=Dn(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 uy(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ue()){case de:return 2;case xe:return 8;case _e:case Ne:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Rm=!1,xo=null,So=null,wo=null,pu=new Map,mu=new Map,Co=[],aE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dy(r,s){switch(r){case"focusin":case"focusout":xo=null;break;case"dragenter":case"dragleave":So=null;break;case"mouseover":case"mouseout":wo=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,T){return r===null||r.nativeEvent!==T?(r={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:T,targetContainers:[E]},s!==null&&(s=ar(s),s!==null&&ly(s)),r):(r.eventSystemFlags|=m,s=r.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),r)}function lE(r,s,c,m,E){switch(s){case"focusin":return xo=gu(xo,r,s,c,m,E),!0;case"dragenter":return So=gu(So,r,s,c,m,E),!0;case"mouseover":return wo=gu(wo,r,s,c,m,E),!0;case"pointerover":var T=E.pointerId;return pu.set(T,gu(pu.get(T)||null,r,s,c,m,E)),!0;case"gotpointercapture":return T=E.pointerId,mu.set(T,gu(mu.get(T)||null,r,s,c,m,E)),!0}return!1}function fy(r){var s=Dn(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(){cy(c)});return}}else if(s===31){if(s=a(c),s!==null){r.blockedOn=s,Cr(r.priority,function(){cy(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function df(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=Em(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Hs=m,c.target.dispatchEvent(m),Hs=null}else return s=ar(c),s!==null&&ly(s),r.blockedOn=c,!1;s.shift()}return!0}function hy(r,s,c){df(r)&&c.delete(s)}function cE(){Rm=!1,xo!==null&&df(xo)&&(xo=null),So!==null&&df(So)&&(So=null),wo!==null&&df(wo)&&(wo=null),pu.forEach(hy),mu.forEach(hy)}function ff(r,s){r.blockedOn===s&&(r.blockedOn=null,Rm||(Rm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,cE)))}var hf=null;function py(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(Am(m||c)===null)continue;break}var T=ar(c);T!==null&&(r.splice(s,3),s-=3,Ep(T,{pending:!0,data:E,method:c.method,action:m},m,E))}}))}function Wl(r){function s(re){return ff(re,r)}xo!==null&&ff(xo,r),So!==null&&ff(So,r),wo!==null&&ff(wo,r),pu.forEach(s),mu.forEach(s);for(var c=0;c<Co.length;c++){var m=Co[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<Co.length&&(c=Co[0],c.blockedOn===null);)fy(c),c.blockedOn===null&&Co.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var E=c[m],T=c[m+1],P=E[Bt]||null;if(typeof T=="function")P||py(c);else if(P){var Y=null;if(T&&T.hasAttribute("formAction")){if(E=T,P=T[Bt]||null)Y=P.formAction;else if(Am(E)!==null)continue}else Y=P.action;typeof Y=="function"?c[m+1]=Y:(c.splice(m,3),m-=3),py(c)}}}function my(){function r(T){T.canIntercept&&T.info==="react-transition"&&T.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 T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.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 Tm(r){this._internalRoot=r}pf.prototype.render=Tm.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var c=s.current,m=Lr();oy(c,m,r,s,null,null)},pf.prototype.unmount=Tm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;oy(r.current,2,null,r,null,null),Gd(),s[pn]=null}};function pf(r){this._internalRoot=r}pf.prototype.unstable_scheduleHydration=function(r){if(r){var s=Ai();r={blockedOn:null,target:r,priority:s};for(var c=0;c<Co.length&&s!==0&&s<Co[c].priority;c++);Co.splice(c,0,r),c===0&&fy(r)}};var gy=e.version;if(gy!=="19.2.4")throw Error(i(527,gy,"19.2.4"));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 uE={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{Ve=mf.inject(uE),_t=mf}catch{}}return _u.createRoot=function(r,s){if(!o(r))throw Error(i(299));var c=!1,m="",E=w_,T=C_,P=k_;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(E=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=iy(r,1,!1,null,null,c,m,null,E,T,P,my),r[pn]=s.current,um(r),new Tm(s)},_u.hydrateRoot=function(r,s,c){if(!o(r))throw Error(i(299));var m=!1,E="",T=w_,P=C_,Y=k_,re=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(E=c.identifierPrefix),c.onUncaughtError!==void 0&&(T=c.onUncaughtError),c.onCaughtError!==void 0&&(P=c.onCaughtError),c.onRecoverableError!==void 0&&(Y=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=iy(r,1,!0,s,c!=null?c:null,m,E,re,T,P,Y,my),s.context=sy(null),c=s.current,m=Lr(),m=qr(m),E=lo(m),E.callback=null,co(c,E,m),c=m,s.current.lanes=c,wn(s,c),Ui(s),r[pn]=s.current,um(r),new pf(s)},_u.version="19.2.4",_u}var Ey;function bE(){if(Ey)return Mm.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(),Mm.exports=yE(),Mm.exports}var xE=bE();const Ay="jean2-theme",s1="neutral",Ix="system",SE={mode:Ix,scheme:s1,setMode:()=>null,setScheme:()=>null,resolvedMode:"dark"},zx=D.createContext(SE);function wE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ry(t){return t==="system"?wE():t}function CE(t){const e=localStorage.getItem(Ay);if(!e||!["light","dark","system"].includes(e))return null;const i={mode:e,scheme:s1};return localStorage.setItem(t,JSON.stringify(i)),localStorage.removeItem(Ay),i}function kE({children:t,defaultMode:e=Ix,defaultScheme:n=s1,storageKey:i="jean2-theme-settings",...o}){const[l,u]=D.useState(()=>{const S=CE(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(()=>Ry(l.mode)),f=D.useCallback((S,C)=>{const w=window.document.documentElement,v=Ry(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]),y={mode:l.mode,scheme:l.scheme,setMode:p,setScheme:h,resolvedMode:a};return g.jsx(zx.Provider,{...o,value:y,children:t})}const EE=()=>{const t=D.useContext(zx);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var Im={exports:{}},zm={};/**
50
- * @license React
51
- * react-compiler-runtime.production.js
52
- *
53
- * Copyright (c) Meta Platforms, Inc. and affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */var Ty;function AE(){if(Ty)return zm;Ty=1;var t=sh().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return zm.c=function(e){return t.H.useMemoCache(e)},zm}var Ny;function RE(){return Ny||(Ny=1,Im.exports=AE()),Im.exports}var ve=RE();/**
58
- * @license lucide-react v0.577.0 - ISC
59
- *
60
- * This source code is licensed under the ISC license.
61
- * See the LICENSE file in the root directory of this source tree.
62
- */const Bx=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
63
- * @license lucide-react v0.577.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const TE=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 NE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
73
- * @license lucide-react v0.577.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const Dy=t=>{const e=NE(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 DE={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 ME=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 jE=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,...DE,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:Bx("lucide",o),...!l&&!ME(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 ze=(t,e)=>{const n=D.forwardRef(({className:i,...o},l)=>D.createElement(jE,{ref:l,iconNode:e,className:Bx(`lucide-${TE(Dy(t))}`,`lucide-${t}`,i),...o}));return n.displayName=Dy(t),n};/**
98
- * @license lucide-react v0.577.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const OE=[["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"}]],LE=ze("archive",OE);/**
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 IE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],zE=ze("arrow-left",IE);/**
108
- * @license lucide-react v0.577.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const BE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],PE=ze("bot",BE);/**
113
- * @license lucide-react v0.577.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const FE=[["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"}]],kg=ze("box",FE);/**
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 HE=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],My=ze("brain",HE);/**
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 UE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ns=ze("check",UE);/**
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 $E=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pc=ze("chevron-down",$E);/**
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 qE=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],VE=ze("chevron-left",qE);/**
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 WE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Si=ze("chevron-right",WE);/**
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 GE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],KE=ze("chevron-up",GE);/**
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 YE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Px=ze("chevrons-up-down",YE);/**
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 XE=[["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=ze("circle-alert",XE);/**
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 QE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ku=ze("circle-check-big",QE);/**
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 ZE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],JE=ze("circle-check",ZE);/**
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 e4=[["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"}]],oh=ze("circle-x",e4);/**
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 t4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],n4=ze("circle",t4);/**
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 r4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Fx=ze("clock",r4);/**
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 i4=[["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"}]],s4=ze("cog",i4);/**
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 o4=[["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=ze("copy",o4);/**
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 a4=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],jy=ze("cpu",a4);/**
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 l4=[["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"}]],Hx=ze("ellipsis",l4);/**
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 c4=[["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"}]],Eg=ze("external-link",c4);/**
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 u4=[["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"}]],d4=ze("eye-off",u4);/**
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 f4=[["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"}]],h4=ze("eye",f4);/**
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 p4=[["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"}]],m4=ze("file-pen",p4);/**
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 g4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],o1=ze("file-text",g4);/**
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 v4=[["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"}]],$i=ze("file",v4);/**
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 _4=[["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"}]],Ag=ze("folder-open",_4);/**
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 y4=[["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"}]],Rs=ze("folder",y4);/**
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 b4=[["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"}]],x4=ze("git-branch",b4);/**
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 S4=[["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"}]],w4=ze("hard-drive",S4);/**
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 C4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],k4=ze("info",C4);/**
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 E4=[["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"}]],A4=ze("keyboard",E4);/**
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 R4=[["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"}]],T4=ze("layout-grid",R4);/**
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 N4=[["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"}]],D4=ze("layout-list",N4);/**
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 M4=[["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"}]],j4=ze("link-2",M4);/**
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 O4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Pr=ze("loader-circle",O4);/**
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 L4=[["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"}]],I4=ze("lock",L4);/**
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 z4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],B4=ze("message-square",z4);/**
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 P4=[["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"}]],Ux=ze("minimize-2",P4);/**
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 F4=[["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"}]],H4=ze("monitor",F4);/**
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 U4=[["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"}]],$4=ze("moon",U4);/**
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 q4=[["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"}]],V4=ze("palette",q4);/**
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 W4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],G4=ze("panel-left",W4);/**
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 K4=[["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"}]],$x=ze("pause",K4);/**
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 Y4=[["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"}]],X4=ze("pencil",Y4);/**
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 Q4=[["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"}]],Z4=ze("plug-zap",Q4);/**
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 J4=[["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"}]],e5=ze("plug",J4);/**
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 t5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],mc=ze("plus",t5);/**
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 n5=[["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"}]],nc=ze("refresh-cw",n5);/**
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 r5=[["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"}]],qx=ze("rotate-ccw",r5);/**
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 i5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],a1=ze("search",i5);/**
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 s5=[["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"}]],o5=ze("send",s5);/**
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 a5=[["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"}]],Oa=ze("server",a5);/**
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 l5=[["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"}]],Vx=ze("settings",l5);/**
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 c5=[["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"}]],Wx=ze("shield",c5);/**
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 u5=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Oy=ze("square-terminal",u5);/**
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 d5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Gx=ze("square",d5);/**
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 f5=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ly=ze("star",f5);/**
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 h5=[["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"}]],p5=ze("sun",h5);/**
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 m5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Iy=ze("terminal",m5);/**
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 g5=[["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=ze("trash-2",g5);/**
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 v5=[["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=ze("triangle-alert",v5);/**
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 _5=[["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"}]],y5=ze("undo-2",_5);/**
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 b5=[["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"}]],x5=ze("unplug",b5);/**
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 S5=[["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"}]],Kx=ze("user",S5);/**
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 w5=[["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"}]],C5=ze("volume-2",w5);/**
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 k5=[["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"}]],E5=ze("volume-x",k5);/**
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 A5=[["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"}]],Yx=ze("wifi-off",A5);/**
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 R5=[["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"}]],T5=ze("wifi",R5);/**
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 N5=[["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"}]],D5=ze("wrench",N5);/**
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 M5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ts=ze("x",M5);/**
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 j5=[["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"}]],Bm=ze("zap",j5);function O5(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function l1(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var zy;(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"})(zy||(zy={}));async function L5(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await l1("plugin:event|unlisten",{event:t,eventId:e})}async function By(t,e,n){var i;const o=(i=void 0)!==null&&i!==void 0?i:{kind:"Any"};return l1("plugin:event|listen",{event:t,target:o,handler:O5(e)}).then(l=>async()=>L5(t,l))}const Fr={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function As(){try{const t=localStorage.getItem(Fr.SERVERS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading saved servers from localStorage:",t),[]}}function I5(t){return As().find(n=>n.id===t)||null}function z5(t){try{const e=As();e.push(t),localStorage.setItem(Fr.SERVERS,JSON.stringify(e))}catch(e){console.error("Error saving server to localStorage:",e)}}function B5(t,e){try{const n=As(),i=n.findIndex(o=>o.id===t);if(i===-1){console.error("Server not found:",t);return}n[i]={...n[i],...e},localStorage.setItem(Fr.SERVERS,JSON.stringify(n))}catch(n){console.error("Error updating server in localStorage:",n)}}function P5(t){try{const n=As().filter(u=>u.id!==t);localStorage.setItem(Fr.SERVERS,JSON.stringify(n));const o=yi().filter(u=>u.serverId!==t);localStorage.setItem(Fr.QUICK_CONNECTIONS,JSON.stringify(o)),Xx()===t&&localStorage.removeItem(Fr.ACTIVE_SERVER_ID)}catch(e){console.error("Error deleting server from localStorage:",e)}}function Xx(){try{return localStorage.getItem(Fr.ACTIVE_SERVER_ID)}catch(t){return console.error("Error reading active server ID from localStorage:",t),null}}function Pm(t){try{localStorage.setItem(Fr.ACTIVE_SERVER_ID,t)}catch(e){console.error("Error setting active server ID in localStorage:",e)}}function Py(){const t=Xx();return t?I5(t):null}function yi(){try{const t=localStorage.getItem(Fr.QUICK_CONNECTIONS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading quick connections from localStorage:",t),[]}}function F5(t){const e=yi(),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(Fr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(o){console.error("Error saving quick connection to localStorage:",o)}return i}function H5(t){try{const n=yi().filter(i=>i.id!==t);localStorage.setItem(Fr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connection from localStorage:",e)}}function U5(t){try{const n=yi().filter(i=>i.workspaceId!==t);localStorage.setItem(Fr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connections for workspace from localStorage:",e)}}function $5(t){try{const e=yi(),n=new Map(e.map(i=>[i.id,i]));t.forEach((i,o)=>{const l=n.get(i);l&&(l.order=o)}),localStorage.setItem(Fr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(e){console.error("Error reordering quick connections in localStorage:",e)}}function Qx(t){return/^[a-f0-9]{64}$/.test(t)}function q5(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 Zx=D.createContext(null),V5=t=>{const e=ve.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,y]=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=As(),te=Py(),X=yi();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 _=b;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=(Q,te,X)=>{const V=If(te),$={id:crypto.randomUUID(),name:Q,url:V,token:X,createdAt:new Date().toISOString()};return z5($),l(As()),Pm($.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)}};B5(Q,X),l(As()),(u==null?void 0:u.id)===Q&&a(Py())},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(P5(Q),l(As()),te){const X=As(),V=X.length>0?X[0]:null;V?(Pm(V.id),a(V)):a(null)}p(yi())},e[8]=u==null?void 0:u.id,e[9]=M):M=e[9];const R=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&&y(!1),y(!0),S.current=setTimeout(()=>{Pm(Q);const te=o.find(X=>X.id===Q)||null;a(te),y(!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=()=>{y(!1)},e[14]=I):I=e[14];const q=I;let U;e[15]===Symbol.for("react.memo_cache_sentinel")?(U=(Q,te,X,V)=>{F5({serverId:Q,serverName:te,workspaceId:X,workspaceName:V}),p(yi())},e[15]=U):U=e[15];const W=U;let K;e[16]===Symbol.for("react.memo_cache_sentinel")?(K=Q=>{H5(Q),p(yi())},e[16]=K):K=e[16];const G=K;let Z;e[17]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{U5(Q),p(yi())},e[17]=Z):Z=e[17];const ee=Z;let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=Q=>{$5(Q),p(yi())},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]!==R||e[24]!==o||e[25]!==O?(z={servers:o,activeServer:u,quickConnections:f,isSwitching:h,isAddingServerRef:C,prepareForServerAdd:_,addServer:k,editServer:A,removeServer:R,switchServer:O,clearSwitchingState:q,addToQuickConnections:W,removeFromQuickConnections:G,removeFromQuickConnectionsByWorkspace:ee,reorderQuick:L},e[19]=u,e[20]=A,e[21]=h,e[22]=f,e[23]=R,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(Zx.Provider,{value:H,children:n}),e[27]=n,e[28]=H,e[29]=F):F=e[29],F},vc=()=>{const t=D.useContext(Zx);if(t===null)throw new Error("useServerContext must be used within a ServerProvider");return t};function Jx(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=Jx(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ah(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Jx(t))&&(i&&(i+=" "),i+=e);return i}const Fy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hy=ah,_c=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Hy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,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 y=Fy(p)||Fy(h);return o[f][y]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,y]=p;return y===void 0||(f[h]=y),f},{}),d=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:h,className:y,...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,y]:f},[]);return Hy(t,u,d,n==null?void 0:n.class,n==null?void 0:n.className)};var Yu=Lx();const W5=ih(Yu);function Uy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ds(...t){return e=>{let n=!1;const i=t.map(o=>{const l=Uy(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():Uy(t[o],null)}}}}function St(...t){return D.useCallback(Ds(...t),t)}function Mo(t){const e=G5(t),n=D.forwardRef((i,o)=>{const{children:l,...u}=i,a=D.Children.toArray(l),d=a.find(Y5);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=Mo("Slot");function G5(t){const e=D.forwardRef((n,i)=>{const{children:o,...l}=n;if(D.isValidElement(o)){const u=Q5(o),a=X5(l,o.props);return o.type!==D.Fragment&&(a.ref=i?Ds(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 eS=Symbol("radix.slottable");function K5(t){const e=({children:n})=>g.jsx(g.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=eS,e}function Y5(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===eS}function X5(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 Q5(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 Z5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xe=Z5.reduce((t,e)=>{const n=Mo(`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 tS(t,e){t&&Yu.flushSync(()=>t.dispatchEvent(e))}var nS=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"}),J5="VisuallyHidden",rS=D.forwardRef((t,e)=>g.jsx(Xe.span,{...t,ref:e,style:{...nS,...t.style}}));rS.displayName=J5;var eA=rS;function tA(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 $r(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:y,children:S,...C}=h,w=((b=y==null?void 0:y[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,y){var w;const S=((w=y==null?void 0:y[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,nA(o,...e)]}function nA(...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 c1(t){const e=t+"CollectionProvider",[n,i]=$r(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:v,children:b}=w,_=ni.useRef(null),x=ni.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:x,collectionRef:_,children:b})};u.displayName=e;const a=t+"CollectionSlot",d=Mo(a),f=ni.forwardRef((w,v)=>{const{scope:b,children:_}=w,x=l(a,b),k=St(v,x.collectionRef);return g.jsx(d,{ref:k,children:_})});f.displayName=a;const p=t+"CollectionItemSlot",h="data-radix-collection-item",y=Mo(p),S=ni.forwardRef((w,v)=>{const{scope:b,children:_,...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(y,{[h]:"",ref:N,children:_})});S.displayName=p;function C(w){const v=l(t+"CollectionConsumer",w);return ni.useCallback(()=>{const _=v.collectionRef.current;if(!_)return[];const x=Array.from(_.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 Oe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}var En=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},rA=Ox[" useInsertionEffect ".trim().toString()]||En;function Ms({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[o,l,u]=iA({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 y=sA(p)?p(t):p;y!==t&&((h=u.current)==null||h.call(u,y))}else l(p)},[a,t,l,u]);return[d,f]}function iA({defaultProp:t,onChange:e}){const[n,i]=D.useState(t),o=D.useRef(n),l=D.useRef(e);return rA(()=>{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 sA(t){return typeof t=="function"}function oA(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var An=t=>{const{present:e,children:n}=t,i=aA(e),o=typeof n=="function"?n({present:i.isPresent}):D.Children.only(n),l=St(i.ref,lA(o));return typeof n=="function"||i.isPresent?D.cloneElement(o,{ref:l}):null};An.displayName="Presence";function aA(t){const[e,n]=D.useState(),i=D.useRef(null),o=D.useRef(t),l=D.useRef("none"),u=t?"mounted":"unmounted",[a,d]=oA(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]),En(()=>{const f=i.current,p=o.current;if(p!==t){const y=l.current,S=gf(f);t?d("MOUNT"):S==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&y!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),En(()=>{var f;if(e){let p;const h=(f=e.ownerDocument.defaultView)!=null?f:window,y=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",y),e.addEventListener("animationend",y),()=>{h.clearTimeout(p),e.removeEventListener("animationstart",S),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}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 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=Ox[" useId ".trim().toString()]||(()=>{}),uA=0;function Sn(t){const[e,n]=D.useState(cA());return En(()=>{n(i=>i!=null?i:String(uA++))},[t]),e?`radix-${e}`:""}var lh="Collapsible",[dA]=$r(lh),[fA,u1]=dA(lh),iS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:o,disabled:l,onOpenChange:u,...a}=t,[d,f]=Ms({prop:i,defaultProp:o!=null?o:!1,onChange:u,caller:lh});return g.jsx(fA,{scope:n,disabled:l,contentId:Sn(),open:d,onOpenToggle:D.useCallback(()=>f(p=>!p),[f]),children:g.jsx(Xe.div,{"data-state":f1(d),"data-disabled":l?"":void 0,...a,ref:e})})});iS.displayName=lh;var sS="CollapsibleTrigger",oS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,o=u1(sS,n);return g.jsx(Xe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":f1(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:e,onClick:Oe(t.onClick,o.onOpenToggle)})});oS.displayName=sS;var d1="CollapsibleContent",aS=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=u1(d1,t.__scopeCollapsible);return g.jsx(An,{present:n||o.open,children:({present:l})=>g.jsx(hA,{...i,ref:e,present:l})})});aS.displayName=d1;var hA=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:o,...l}=t,u=u1(d1,n),[a,d]=D.useState(i),f=D.useRef(null),p=St(e,f),h=D.useRef(0),y=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 _=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(_)},[]),En(()=>{const _=f.current;if(_){b.current=b.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const x=_.getBoundingClientRect();h.current=x.height,S.current=x.width,v.current||(_.style.transitionDuration=b.current.transitionDuration,_.style.animationName=b.current.animationName),d(i)}},[u.open,i]),g.jsx(Xe.div,{"data-state":f1(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...l,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:w&&o})});function f1(t){return t?"open":"closed"}var pA=iS,mA=D.createContext(void 0);function Qu(t){const e=D.useContext(mA);return t||e||"ltr"}function qn(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 gA(t,e=globalThis==null?void 0:globalThis.document){const n=qn(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 vA="DismissableLayer",Rg="dismissableLayer.update",_A="dismissableLayer.pointerDownOutside",yA="dismissableLayer.focusOutside",$y,lS=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(lS),[p,h]=D.useState(null),y=(M=p==null?void 0:p.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,S]=D.useState({}),C=St(e,R=>h(R)),w=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(v),_=p?w.indexOf(p):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=_>=b,N=SA(R=>{const j=R.target,O=[...f.branches].some(I=>I.contains(j));!k||O||(o==null||o(R),u==null||u(R),R.defaultPrevented||a==null||a())},y),A=wA(R=>{const j=R.target;[...f.branches].some(I=>I.contains(j))||(l==null||l(R),u==null||u(R),R.defaultPrevented||a==null||a())},y);return gA(R=>{_===f.layers.size-1&&(i==null||i(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},y),D.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($y=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),qy(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=$y)}},[p,y,n,f]),D.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),qy())},[p,f]),D.useEffect(()=>{const R=()=>S({});return document.addEventListener(Rg,R),()=>document.removeEventListener(Rg,R)},[]),g.jsx(Xe.div,{...d,ref:C,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Oe(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(t.onPointerDownCapture,N.onPointerDownCapture)})});yc.displayName=vA;var bA="DismissableLayerBranch",xA=D.forwardRef((t,e)=>{const n=D.useContext(lS),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})});xA.displayName=bA;function SA(t,e=globalThis==null?void 0:globalThis.document){const n=qn(t),i=D.useRef(!1),o=D.useRef(()=>{});return D.useEffect(()=>{const l=a=>{if(a.target&&!i.current){let d=function(){cS(_A,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 wA(t,e=globalThis==null?void 0:globalThis.document){const n=qn(t),i=D.useRef(!1);return D.useEffect(()=>{const o=l=>{l.target&&!i.current&&cS(yA,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function qy(){const t=new CustomEvent(Rg);document.dispatchEvent(t)}function cS(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?tS(o,l):o.dispatchEvent(l)}var Fm="focusScope.autoFocusOnMount",Hm="focusScope.autoFocusOnUnmount",Vy={bubbles:!1,cancelable:!0},CA="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=qn(o),p=qn(l),h=D.useRef(null),y=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:No(h.current,{select:!0})},v=function(x){if(S.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||No(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const N of x)N.removedNodes.length>0&&No(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",v);const _=new MutationObserver(b);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",v),_.disconnect()}}},[i,a,S.paused]),D.useEffect(()=>{if(a){Gy.add(S);const w=document.activeElement;if(!a.contains(w)){const b=new CustomEvent(Fm,Vy);a.addEventListener(Fm,f),a.dispatchEvent(b),b.defaultPrevented||(kA(NA(uS(a)),{select:!0}),document.activeElement===w&&No(a))}return()=>{a.removeEventListener(Fm,f),setTimeout(()=>{const b=new CustomEvent(Hm,Vy);a.addEventListener(Hm,p),a.dispatchEvent(b),b.defaultPrevented||No(w!=null?w:document.body,{select:!0}),a.removeEventListener(Hm,p),Gy.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 _=w.currentTarget,[x,k]=EA(_);x&&k?!w.shiftKey&&b===k?(w.preventDefault(),n&&No(x,{select:!0})):w.shiftKey&&b===x&&(w.preventDefault(),n&&No(k,{select:!0})):b===_&&w.preventDefault()}},[n,i,S.paused]);return g.jsx(Xe.div,{tabIndex:-1,...u,ref:y,onKeyDown:C})});Zu.displayName=CA;function kA(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(No(i,{select:e}),document.activeElement!==n)return}function EA(t){const e=uS(t),n=Wy(e,t),i=Wy(e.reverse(),t);return[n,i]}function uS(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Wy(t,e){for(const n of t)if(!AA(n,{upTo:e}))return n}function AA(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 RA(t){return t instanceof HTMLInputElement&&"select"in t}function No(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&RA(t)&&e&&t.select()}}var Gy=TA();function TA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Ky(t,e),t.unshift(e)},remove(e){var n;t=Ky(t,e),(n=t[0])==null||n.resume()}}}function Ky(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function NA(t){return t.filter(e=>e.tagName!=="A")}var DA="Portal",bc=D.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[o,l]=D.useState(!1);En(()=>l(!0),[]);const u=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return u?W5.createPortal(g.jsx(Xe.div,{...i,ref:e}),u):null});bc.displayName=DA;var Um=0;function ch(){D.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!=null?e:Yy()),document.body.insertAdjacentElement("beforeend",(n=t[1])!=null?n:Yy()),Um++,()=>{Um===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Um--}},[])}function Yy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Vi=function(){return Vi=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},Vi.apply(this,arguments)};function dS(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 MA(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",jA="with-scroll-bars-hidden",OA="--removed-body-scroll-bar-size";function $m(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function LA(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 IA=typeof window<"u"?D.useLayoutEffect:D.useEffect,Xy=new WeakMap;function zA(t,e){var n=LA(null,function(i){return t.forEach(function(o){return $m(o,i)})});return IA(function(){var i=Xy.get(n);if(i){var o=new Set(i),l=new Set(t),u=n.current;o.forEach(function(a){l.has(a)||$m(a,null)}),l.forEach(function(a){o.has(a)||$m(a,u)})}Xy.set(n,t)},[t]),n}function BA(t){return t}function PA(t,e){e===void 0&&(e=BA);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 FA(t){t===void 0&&(t={});var e=PA(null);return e.options=Vi({async:!0,ssr:!1},t),e}var fS=function(t){var e=t.sideCar,n=dS(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,Vi({},n))};fS.isSideCarExport=!0;function HA(t,e){return t.useMedium(e),fS}var hS=FA(),qm=function(){},uh=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,y=t.sideCar,S=t.noRelative,C=t.noIsolation,w=t.inert,v=t.allowPinchZoom,b=t.as,_=b===void 0?"div":b,x=t.gapMode,k=dS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,A=zA([n,e]),M=Vi(Vi({},k),o);return D.createElement(D.Fragment,null,p&&D.createElement(N,{sideCar:hS,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),Vi(Vi({},M),{ref:A})):D.createElement(_,Vi({},M,{className:d,ref:A}),a))});uh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};uh.classNames={fullWidth:Nf,zeroRight:Tf};var UA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $A(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=UA();return e&&t.setAttribute("nonce",e),t}function qA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function VA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var WA=function(){var t=0,e=null;return{add:function(n){t==0&&(e=$A())&&(qA(e,n),VA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},GA=function(){var t=WA();return function(e,n){D.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},pS=function(){var t=GA(),e=function(n){var i=n.styles,o=n.dynamic;return t(i,o),null};return e},KA={left:0,top:0,right:0,gap:0},Vm=function(t){return parseInt(t||"",10)||0},YA=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[Vm(n),Vm(i),Vm(o)]},XA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return KA;var e=YA(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])}},QA=pS(),rc="data-scroll-locked",ZA=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(jA,` {
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(OA,": ").concat(a,`px;
498
- }
499
- `)},Qy=function(){var t=parseInt(document.body.getAttribute(rc)||"0",10);return isFinite(t)?t:0},JA=function(){D.useEffect(function(){return document.body.setAttribute(rc,(Qy()+1).toString()),function(){var t=Qy()-1;t<=0?document.body.removeAttribute(rc):document.body.setAttribute(rc,t.toString())}},[])},eR=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,o=i===void 0?"margin":i;JA();var l=D.useMemo(function(){return XA(o)},[o]);return D.createElement(QA,{styles:ZA(l,!e,o,n?"":"!important")})},Tg=!1;if(typeof window<"u")try{var vf=Object.defineProperty({},"passive",{get:function(){return Tg=!0,!0}});window.addEventListener("test",vf,vf),window.removeEventListener("test",vf,vf)}catch{Tg=!1}var Gl=Tg?{passive:!1}:!1,tR=function(t){return t.tagName==="TEXTAREA"},mS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!tR(t)&&n[e]==="visible")},nR=function(t){return mS(t,"overflowY")},rR=function(t){return mS(t,"overflowX")},Zy=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=gS(t,i);if(o){var l=vS(t,i),u=l[1],a=l[2];if(u>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},iR=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},sR=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},gS=function(t,e){return t==="v"?nR(e):rR(e)},vS=function(t,e){return t==="v"?iR(e):sR(e)},oR=function(t,e){return t==="h"&&e==="rtl"?-1:1},aR=function(t,e,n,i,o){var l=oR(t,window.getComputedStyle(e).direction),u=l*i,a=n.target,d=e.contains(a),f=!1,p=u>0,h=0,y=0;do{if(!a)break;var S=vS(t,a),C=S[0],w=S[1],v=S[2],b=w-v-l*C;(C||b)&&gS(t,a)&&(h+=b,y+=C);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&a!==document.body||d&&(e.contains(a)||e===a));return(p&&Math.abs(h)<1||!p&&Math.abs(y)<1)&&(f=!0),f},_f=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jy=function(t){return[t.deltaX,t.deltaY]},eb=function(t){return t&&"current"in t?t.current:t},lR=function(t,e){return t[0]===e[0]&&t[1]===e[1]},cR=function(t){return`
500
- .block-interactivity-`.concat(t,` {pointer-events: none;}
501
- .allow-interactivity-`).concat(t,` {pointer-events: all;}
502
- `)},uR=0,Kl=[];function dR(t){var e=D.useRef([]),n=D.useRef([0,0]),i=D.useRef(),o=D.useState(uR++)[0],l=D.useState(pS)[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=MA([t.lockRef.current],(t.shards||[]).map(eb),!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),_=n.current,x="deltaX"in w?w.deltaX:_[0]-b[0],k="deltaY"in w?w.deltaY:_[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 R=window.getSelection(),j=R&&R.anchorNode,O=j?j===A||j.contains(A):!1;if(O)return!1;var I=Zy(M,A);if(!I)return!0;if(I?N=M:(N=M==="v"?"h":"v",I=Zy(M,A)),!I)return!1;if(!i.current&&"changedTouches"in w&&(x||k)&&(i.current=N),!N)return!0;var q=i.current||N;return aR(q,v,w,q==="h"?x:k)},[]),d=D.useCallback(function(w){var v=w;if(!(!Kl.length||Kl[Kl.length-1]!==l)){var b="deltaY"in v?Jy(v):_f(v),_=e.current.filter(function(N){return N.name===v.type&&(N.target===v.target||v.target===N.shadowParent)&&lR(N.delta,b)})[0];if(_&&_.should){v.cancelable&&v.preventDefault();return}if(!_){var x=(u.current.shards||[]).map(eb).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,_){var x={name:w,delta:v,target:b,should:_,shadowParent:fR(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,Jy(w),w.target,a(w,t.lockRef.current))},[]),y=D.useCallback(function(w){f(w.type,_f(w),w.target,a(w,t.lockRef.current))},[]);D.useEffect(function(){return Kl.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",d,Gl),document.addEventListener("touchmove",d,Gl),document.addEventListener("touchstart",p,Gl),function(){Kl=Kl.filter(function(w){return w!==l}),document.removeEventListener("wheel",d,Gl),document.removeEventListener("touchmove",d,Gl),document.removeEventListener("touchstart",p,Gl)}},[]);var S=t.removeScrollBar,C=t.inert;return D.createElement(D.Fragment,null,C?D.createElement(l,{styles:cR(o)}):null,S?D.createElement(eR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function fR(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const hR=HA(hS,dR);var Ju=D.forwardRef(function(t,e){return D.createElement(uh,Vi({},t,{ref:e,sideCar:hR}))});Ju.classNames=uh.classNames;var pR=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Yl=new WeakMap,yf=new WeakMap,bf={},Wm=0,_S=function(t){return t&&(t.host||_S(t.parentNode))},mR=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=_S(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})},gR=function(t,e,n,i){var o=mR(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(y){if(a.has(y))p(y);else try{var S=y.getAttribute(i),C=S!==null&&S!=="false",w=(Yl.get(y)||0)+1,v=(l.get(y)||0)+1;Yl.set(y,w),l.set(y,v),u.push(y),w===1&&C&&yf.set(y,!0),v===1&&y.setAttribute(n,"true"),C||y.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",y,b)}})};return p(e),a.clear(),Wm++,function(){u.forEach(function(h){var y=Yl.get(h)-1,S=l.get(h)-1;Yl.set(h,y),l.set(h,S),y||(yf.has(h)||h.removeAttribute(i),yf.delete(h)),S||h.removeAttribute(n)}),Wm--,Wm||(Yl=new WeakMap,Yl=new WeakMap,yf=new WeakMap,bf={})}},dh=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),o=pR(t);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),gR(i,o,n,"aria-hidden")):function(){return null}},fh="Dialog",[yS]=$r(fh),[vR,ki]=yS(fh),bS=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]=Ms({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:fh});return g.jsx(vR,{scope:e,triggerRef:a,contentRef:d,contentId:Sn(),titleId:Sn(),descriptionId:Sn(),open:f,onOpenChange:p,onOpenToggle:D.useCallback(()=>p(h=>!h),[p]),modal:u,children:n})};bS.displayName=fh;var xS="DialogTrigger",SS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ki(xS,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":m1(o.open),...i,ref:l,onClick:Oe(t.onClick,o.onOpenToggle)})});SS.displayName=xS;var h1="DialogPortal",[_R,wS]=yS(h1,{forceMount:void 0}),CS=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:o}=t,l=ki(h1,e);return g.jsx(_R,{scope:e,forceMount:n,children:D.Children.map(i,u=>g.jsx(An,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:u})}))})};CS.displayName=h1;var zf="DialogOverlay",kS=D.forwardRef((t,e)=>{const n=wS(zf,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=ki(zf,t.__scopeDialog);return l.modal?g.jsx(An,{present:i||l.open,children:g.jsx(bR,{...o,ref:e})}):null});kS.displayName=zf;var yR=Mo("DialogOverlay.RemoveScroll"),bR=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ki(zf,n);return g.jsx(Ju,{as:yR,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Xe.div,{"data-state":m1(o.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),La="DialogContent",ES=D.forwardRef((t,e)=>{const n=wS(La,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=ki(La,t.__scopeDialog);return g.jsx(An,{present:i||l.open,children:l.modal?g.jsx(xR,{...o,ref:e}):g.jsx(SR,{...o,ref:e})})});ES.displayName=La;var xR=D.forwardRef((t,e)=>{const n=ki(La,t.__scopeDialog),i=D.useRef(null),o=St(e,n.contentRef,i);return D.useEffect(()=>{const l=i.current;if(l)return dh(l)},[]),g.jsx(AS,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,l=>{const u=l.detail.originalEvent,a=u.button===0&&u.ctrlKey===!0;(u.button===2||a)&&l.preventDefault()}),onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault())})}),SR=D.forwardRef((t,e)=>{const n=ki(La,t.__scopeDialog),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(AS,{...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()}})}),AS=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=t,a=ki(La,n),d=D.useRef(null),f=St(e,d);return ch(),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":m1(a.open),...u,ref:f,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(wR,{titleId:a.titleId}),g.jsx(kR,{contentRef:d,descriptionId:a.descriptionId})]})]})}),p1="DialogTitle",RS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ki(p1,n);return g.jsx(Xe.h2,{id:o.titleId,...i,ref:e})});RS.displayName=p1;var TS="DialogDescription",NS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ki(TS,n);return g.jsx(Xe.p,{id:o.descriptionId,...i,ref:e})});NS.displayName=TS;var DS="DialogClose",MS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=ki(DS,n);return g.jsx(Xe.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});MS.displayName=DS;function m1(t){return t?"open":"closed"}var jS="DialogTitleWarning",[HH,OS]=tA(jS,{contentName:La,titleName:p1,docsSlug:"dialog"}),wR=({titleId:t})=>{const e=OS(jS),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},CR="DialogDescriptionWarning",kR=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OS(CR).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},g1=bS,ER=SS,v1=CS,_1=kS,y1=ES,LS=RS,IS=NS,hh=MS;function AR(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 RR(t){const[e,n]=D.useState(void 0);return En(()=>{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 TR=["top","right","bottom","left"],jo=Math.min,Br=Math.max,Bf=Math.round,xf=Math.floor,Gi=t=>({x:t,y:t}),NR={left:"right",right:"left",bottom:"top",top:"bottom"};function Ng(t,e,n){return Br(t,jo(e,n))}function js(t,e){return typeof t=="function"?t(e):t}function Os(t){return t.split("-")[0]}function xc(t){return t.split("-")[1]}function b1(t){return t==="x"?"y":"x"}function x1(t){return t==="y"?"height":"width"}function Wi(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function S1(t){return b1(Wi(t))}function DR(t,e,n){n===void 0&&(n=!1);const i=xc(t),o=S1(t),l=x1(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 MR(t){const e=Pf(t);return[Dg(t),e,Dg(e)]}function Dg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const tb=["left","right"],nb=["right","left"],jR=["top","bottom"],OR=["bottom","top"];function LR(t,e,n){switch(t){case"top":case"bottom":return n?e?nb:tb:e?tb:nb;case"left":case"right":return e?jR:OR;default:return[]}}function IR(t,e,n,i){const o=xc(t);let l=LR(Os(t),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),e&&(l=l.concat(l.map(Dg)))),l}function Pf(t){const e=Os(t);return NR[e]+t.slice(e.length)}function zR(t){return{top:0,right:0,bottom:0,left:0,...t}}function zS(t){return typeof t!="number"?zR(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 rb(t,e,n){let{reference:i,floating:o}=t;const l=Wi(e),u=S1(e),a=x1(u),d=Os(e),f=l==="y",p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,y=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]-=y*(n&&f?-1:1);break;case"end":S[u]+=y*(n&&f?-1:1);break}return S}async function BR(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:y=!1,padding:S=0}=js(e,t),C=zS(S),v=a[y?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})),_=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:_,offsetParent:x,strategy:d}):_);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 PR=50,FR=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,a=u.detectOverflow?u:{...u,detectOverflow:BR},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}=rb(f,i,d),y=i,S=0;const C={};for(let w=0;w<l.length;w++){const v=l[w];if(!v)continue;const{name:b,fn:_}=v,{x,y:k,data:N,reset:A}=await _({x:p,y:h,initialPlacement:i,placement:y,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<PR&&(S++,typeof A=="object"&&(A.placement&&(y=A.placement),A.rects&&(f=A.rects===!0?await u.getElementRects({reference:t,floating:e,strategy:o}):A.rects),{x:p,y:h}=rb(f,y,d)),w=-1)}return{x:p,y:h,placement:y,strategy:o,middlewareData:C}},HR=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}=js(t,e)||{};if(f==null)return{};const h=zS(p),y={x:n,y:i},S=S1(o),C=x1(S),w=await u.getDimensions(f),v=S==="y",b=v?"top":"left",_=v?"bottom":"right",x=v?"clientHeight":"clientWidth",k=l.reference[C]+l.reference[S]-y[S]-l.floating[C],N=y[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 R=k/2-N/2,j=M/2-w[C]/2-1,O=jo(h[b],j),I=jo(h[_],j),q=O,U=M-w[C]-I,W=M/2-w[C]/2+R,K=Ng(q,W,U),G=!d.arrow&&xc(o)!=null&&W!==K&&l.reference[C]/2-(W<q?O:I)-w[C]/2<0,Z=G?W<q?W-q:W-U:0;return{[S]:y[S]+Z,data:{[S]:K,centerOffset:W-K-Z,...G&&{alignmentOffset:Z}},reset:G}}}),UR=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:y,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,...v}=js(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const b=Os(o),_=Wi(a),x=Os(a)===a,k=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=y||(x||!w?[Pf(a)]:MR(a)),A=C!=="none";!y&&A&&N.push(...IR(a,w,C,k));const M=[a,...N],R=await d.detectOverflow(e,v),j=[];let O=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&j.push(R[b]),h){const W=DR(o,u,k);j.push(R[W[0]],R[W[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(W=>W<=0)){var I,q;const W=(((I=l.flip)==null?void 0:I.index)||0)+1,K=M[W];if(K&&(!(h==="alignment"?_!==Wi(K):!1)||O.every(ee=>Wi(ee.placement)===_?ee.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:K}};let G=(q=O.filter(Z=>Z.overflows[0]<=0).sort((Z,ee)=>Z.overflows[1]-ee.overflows[1])[0])==null?void 0:q.placement;if(!G)switch(S){case"bestFit":{var U;const Z=(U=O.filter(ee=>{if(A){const B=Wi(ee.placement);return B===_||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 ib(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function sb(t){return TR.some(e=>t[e]>=0)}const $R=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:o="referenceHidden",...l}=js(t,e);switch(o){case"referenceHidden":{const u=await i.detectOverflow(e,{...l,elementContext:"reference"}),a=ib(u,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:sb(a)}}}case"escaped":{const u=await i.detectOverflow(e,{...l,altBoundary:!0}),a=ib(u,n.floating);return{data:{escapedOffsets:a,escaped:sb(a)}}}default:return{}}}}},BS=new Set(["left","top"]);async function qR(t,e){const{placement:n,platform:i,elements:o}=t,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=Os(n),a=xc(n),d=Wi(n)==="y",f=BS.has(u)?-1:1,p=l&&d?-1:1,h=js(e,t);let{mainAxis:y,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:y*f}:{x:y*f,y:S*p}}const VR=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 qR(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}}}}},WR=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:x}=b;return{x:_,y:x}}},...f}=js(t,e),p={x:n,y:i},h=await l.detectOverflow(e,f),y=Wi(Os(o)),S=b1(y);let C=p[S],w=p[y];if(u){const b=S==="y"?"top":"left",_=S==="y"?"bottom":"right",x=C+h[b],k=C-h[_];C=Ng(x,C,k)}if(a){const b=y==="y"?"top":"left",_=y==="y"?"bottom":"right",x=w+h[b],k=w-h[_];w=Ng(x,w,k)}const v=d.fn({...e,[S]:C,[y]:w});return{...v,data:{x:v.x-n,y:v.y-i,enabled:{[S]:u,[y]:a}}}}}},GR=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}=js(t,e),p={x:n,y:i},h=Wi(o),y=b1(h);let S=p[y],C=p[h];const w=js(a,e),v=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const x=y==="y"?"height":"width",k=l.reference[y]-l.floating[x]+v.mainAxis,N=l.reference[y]+l.reference[x]-v.mainAxis;S<k?S=k:S>N&&(S=N)}if(f){var b,_;const x=y==="y"?"width":"height",k=BS.has(Os(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:((_=u.offset)==null?void 0:_[h])||0)-(k?v.crossAxis:0);C<N?C=N:C>A&&(C=A)}return{[y]:S,[h]:C}}}},KR=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}=js(t,e),p=await u.detectOverflow(e,f),h=Os(o),y=xc(o),S=Wi(o)==="y",{width:C,height:w}=l.floating;let v,b;h==="top"||h==="bottom"?(v=h,b=y===(await(u.isRTL==null?void 0:u.isRTL(a.floating))?"start":"end")?"left":"right"):(b=h,v=y==="end"?"top":"bottom");const _=w-p.top-p.bottom,x=C-p.left-p.right,k=jo(w-p[v],_),N=jo(C-p[b],x),A=!e.middlewareData.shift;let M=k,R=N;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(M=_),A&&!y){const O=Br(p.left,0),I=Br(p.right,0),q=Br(p.top,0),U=Br(p.bottom,0);S?R=C-2*(O!==0||I!==0?O+I:Br(p.left,p.right)):M=w-2*(q!==0||U!==0?q+U:Br(p.top,p.bottom))}await d({...e,availableWidth:R,availableHeight:M});const j=await u.getDimensions(a.floating);return C!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function ph(){return typeof window<"u"}function Sc(t){return PS(t)?(t.nodeName||"").toLowerCase():"#document"}function Hr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Yi(t){var e;return(e=(PS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function PS(t){return ph()?t instanceof Node||t instanceof Hr(t).Node:!1}function wi(t){return ph()?t instanceof Element||t instanceof Hr(t).Element:!1}function Ls(t){return ph()?t instanceof HTMLElement||t instanceof Hr(t).HTMLElement:!1}function ob(t){return!ph()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hr(t).ShadowRoot}function ed(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=Ci(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function YR(t){return/^(table|td|th)$/.test(Sc(t))}function mh(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const XR=/transform|translate|scale|rotate|perspective|filter/,QR=/paint|layout|strict|content/,Na=t=>!!t&&t!=="none";let Gm;function w1(t){const e=wi(t)?Ci(t):t;return Na(e.transform)||Na(e.translate)||Na(e.scale)||Na(e.rotate)||Na(e.perspective)||!C1()&&(Na(e.backdropFilter)||Na(e.filter))||XR.test(e.willChange||"")||QR.test(e.contain||"")}function ZR(t){let e=Oo(t);for(;Ls(e)&&!lc(e);){if(w1(e))return e;if(mh(e))return null;e=Oo(e)}return null}function C1(){return Gm==null&&(Gm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gm}function lc(t){return/^(html|body|#document)$/.test(Sc(t))}function Ci(t){return Hr(t).getComputedStyle(t)}function gh(t){return wi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Oo(t){if(Sc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ob(t)&&t.host||Yi(t);return ob(e)?e.host:e}function FS(t){const e=Oo(t);return lc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ls(e)&&ed(e)?e:FS(e)}function zu(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=FS(t),l=o===((i=t.ownerDocument)==null?void 0:i.body),u=Hr(o);if(l){const a=Mg(u);return e.concat(u,u.visualViewport||[],ed(o)?o:[],a&&n?zu(a):[])}else return e.concat(o,zu(o,[],n))}function Mg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function HS(t){const e=Ci(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=Ls(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 k1(t){return wi(t)?t:t.contextElement}function ic(t){const e=k1(t);if(!Ls(e))return Gi(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:l}=HS(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 JR=Gi(0);function US(t){const e=Hr(t);return!C1()||!e.visualViewport?JR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function eT(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Hr(t)?!1:e}function Ia(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=k1(t);let u=Gi(1);e&&(i?wi(i)&&(u=ic(i)):u=ic(t));const a=eT(l,n,i)?US(l):Gi(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 y=Hr(l),S=i&&wi(i)?Hr(i):i;let C=y,w=Mg(C);for(;w&&i&&S!==C;){const v=ic(w),b=w.getBoundingClientRect(),_=Ci(w),x=b.left+(w.clientLeft+parseFloat(_.paddingLeft))*v.x,k=b.top+(w.clientTop+parseFloat(_.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,h*=v.y,d+=x,f+=k,C=Hr(w),w=Mg(C)}}return Ff({width:p,height:h,x:d,y:f})}function vh(t,e){const n=gh(t).scrollLeft;return e?e.left+n:Ia(Yi(t)).left+n}function $S(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-vh(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function tT(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const l=o==="fixed",u=Yi(i),a=e?mh(e.floating):!1;if(i===u||a&&l)return n;let d={scrollLeft:0,scrollTop:0},f=Gi(1);const p=Gi(0),h=Ls(i);if((h||!h&&!l)&&((Sc(i)!=="body"||ed(u))&&(d=gh(i)),h)){const S=Ia(i);f=ic(i),p.x=S.x+i.clientLeft,p.y=S.y+i.clientTop}const y=u&&!h&&!l?$S(u,d):Gi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-d.scrollTop*f.y+p.y+y.y}}function nT(t){return Array.from(t.getClientRects())}function rT(t){const e=Yi(t),n=gh(t),i=t.ownerDocument.body,o=Br(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),l=Br(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+vh(t);const a=-n.scrollTop;return Ci(i).direction==="rtl"&&(u+=Br(e.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:a}}const ab=25;function iT(t,e){const n=Hr(t),i=Yi(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=C1();(!p||p&&e==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const f=vh(i);if(f<=0){const p=i.ownerDocument,h=p.body,y=getComputedStyle(h),S=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-S);C<=ab&&(l-=C)}else f<=ab&&(l+=f);return{width:l,height:u,x:a,y:d}}function sT(t,e){const n=Ia(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,l=Ls(t)?ic(t):Gi(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 lb(t,e,n){let i;if(e==="viewport")i=iT(t,n);else if(e==="document")i=rT(Yi(t));else if(wi(e))i=sT(e,n);else{const o=US(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Ff(i)}function qS(t,e){const n=Oo(t);return n===e||!wi(n)||lc(n)?!1:Ci(n).position==="fixed"||qS(n,e)}function oT(t,e){const n=e.get(t);if(n)return n;let i=zu(t,[],!1).filter(a=>wi(a)&&Sc(a)!=="body"),o=null;const l=Ci(t).position==="fixed";let u=l?Oo(t):t;for(;wi(u)&&!lc(u);){const a=Ci(u),d=w1(u);!d&&a.position==="fixed"&&(o=null),(l?!d&&!o:!d&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ed(u)&&!d&&qS(t,u))?i=i.filter(p=>p!==u):o=a,u=Oo(u)}return e.set(t,i),i}function aT(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const u=[...n==="clippingAncestors"?mh(e)?[]:oT(e,this._c):[].concat(n),i],a=lb(e,u[0],o);let d=a.top,f=a.right,p=a.bottom,h=a.left;for(let y=1;y<u.length;y++){const S=lb(e,u[y],o);d=Br(S.top,d),f=jo(S.right,f),p=jo(S.bottom,p),h=Br(S.left,h)}return{width:f-h,height:p-d,x:h,y:d}}function lT(t){const{width:e,height:n}=HS(t);return{width:e,height:n}}function cT(t,e,n){const i=Ls(e),o=Yi(e),l=n==="fixed",u=Ia(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const d=Gi(0);function f(){d.x=vh(o)}if(i||!i&&!l)if((Sc(e)!=="body"||ed(o))&&(a=gh(e)),i){const S=Ia(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?$S(o,a):Gi(0),h=u.left+a.scrollLeft-d.x-p.x,y=u.top+a.scrollTop-d.y-p.y;return{x:h,y,width:u.width,height:u.height}}function Km(t){return Ci(t).position==="static"}function cb(t,e){if(!Ls(t)||Ci(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Yi(t)===n&&(n=n.ownerDocument.body),n}function VS(t,e){const n=Hr(t);if(mh(t))return n;if(!Ls(t)){let o=Oo(t);for(;o&&!lc(o);){if(wi(o)&&!Km(o))return o;o=Oo(o)}return n}let i=cb(t,e);for(;i&&YR(i)&&Km(i);)i=cb(i,e);return i&&lc(i)&&Km(i)&&!w1(i)?n:i||ZR(t)||n}const uT=async function(t){const e=this.getOffsetParent||VS,n=this.getDimensions,i=await n(t.floating);return{reference:cT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function dT(t){return Ci(t).direction==="rtl"}const fT={convertOffsetParentRelativeRectToViewportRelativeRect:tT,getDocumentElement:Yi,getClippingRect:aT,getOffsetParent:VS,getElementRects:uT,getClientRects:nT,getDimensions:lT,getScale:ic,isElement:wi,isRTL:dT};function WS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function hT(t,e){let n=null,i;const o=Yi(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:y,height:S}=f;if(a||e(),!y||!S)return;const C=xf(h),w=xf(o.clientWidth-(p+y)),v=xf(o.clientHeight-(h+S)),b=xf(p),x={rootMargin:-C+"px "+-w+"px "+-v+"px "+-b+"px",threshold:Br(0,jo(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&&!WS(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 pT(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=k1(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?hT(f,n):null;let y=-1,S=null;u&&(S=new ResizeObserver(b=>{let[_]=b;_&&_.target===f&&S&&e&&(S.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=S)==null||x.observe(e)})),n()}),f&&!d&&S.observe(f),e&&S.observe(e));let C,w=d?Ia(t):null;d&&v();function v(){const b=Ia(t);w&&!WS(w,b)&&n(),w=b,C=requestAnimationFrame(v)}return n(),()=>{var b;p.forEach(_=>{o&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),h==null||h(),(b=S)==null||b.disconnect(),S=null,d&&cancelAnimationFrame(C)}}const mT=VR,gT=WR,vT=UR,_T=KR,yT=$R,ub=HR,bT=GR,xT=(t,e,n)=>{const i=new Map,o={platform:fT,...n},l={...o.platform,_c:i};return FR(t,e,{...o,platform:l})};var ST=typeof document<"u",wT=function(){},Df=ST?D.useLayoutEffect:wT;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 GS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function db(t,e){const n=GS(t);return Math.round(e*n)/n}function Ym(t){const e=D.useRef(t);return Df(()=>{e.current=t}),e}function CT(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}),[y,S]=D.useState(i);Hf(y,i)||S(i);const[C,w]=D.useState(null),[v,b]=D.useState(null),_=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),R=D.useRef(p),j=d!=null,O=Ym(d),I=Ym(o),q=Ym(f),U=D.useCallback(()=>{if(!A.current||!M.current)return;const ee={placement:e,strategy:n,middleware:y};I.current&&(ee.platform=I.current),xT(A.current,M.current,ee).then(B=>{const L={...B,isPositioned:q.current!==!1};W.current&&!Hf(R.current,L)&&(R.current=L,Yu.flushSync(()=>{h(L)}))})},[y,e,n,I,q]);Df(()=>{f===!1&&R.current.isPositioned&&(R.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:_,setFloating:x}),[_,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=db(G.floating,p.x),L=db(G.floating,p.y);return a?{...ee,transform:"translate("+B+"px, "+L+"px)",...GS(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 kT=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:o}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?ub({element:i.current,padding:o}).fn(n):{}:i?ub({element:i,padding:o}).fn(n):{}}}},ET=(t,e)=>{const n=mT(t);return{name:n.name,fn:n.fn,options:[t,e]}},AT=(t,e)=>{const n=gT(t);return{name:n.name,fn:n.fn,options:[t,e]}},RT=(t,e)=>({fn:bT(t).fn,options:[t,e]}),TT=(t,e)=>{const n=vT(t);return{name:n.name,fn:n.fn,options:[t,e]}},NT=(t,e)=>{const n=_T(t);return{name:n.name,fn:n.fn,options:[t,e]}},DT=(t,e)=>{const n=yT(t);return{name:n.name,fn:n.fn,options:[t,e]}},MT=(t,e)=>{const n=kT(t);return{name:n.name,fn:n.fn,options:[t,e]}};var jT="Arrow",KS=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"})})});KS.displayName=jT;var OT=KS,E1="Popper",[YS,Po]=$r(E1),[LT,XS]=YS(E1),QS=t=>{const{__scopePopper:e,children:n}=t,[i,o]=D.useState(null);return g.jsx(LT,{scope:e,anchor:i,onAnchorChange:o,children:n})};QS.displayName=E1;var ZS="PopperAnchor",JS=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...o}=t,l=XS(ZS,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})});JS.displayName=ZS;var A1="PopperContent",[IT,zT]=YS(A1),e2=D.forwardRef((t,e)=>{var V,$,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:y=!1,updatePositionStrategy:S="optimized",onPlaced:C,...w}=t,v=XS(A1,n),[b,_]=D.useState(null),x=St(e,je=>_(je)),[k,N]=D.useState(null),A=RR(k),M=(V=A==null?void 0:A.width)!=null?V:0,R=($=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],q=I.length>0,U={padding:O,boundary:I.filter(PT),altBoundary:q},{refs:W,floatingStyles:K,placement:G,isPositioned:Z,middlewareData:ee}=CT({strategy:"fixed",placement:j,whileElementsMounted:(...je)=>pT(...je,{animationFrame:S==="always"}),elements:{reference:v.anchor},middleware:[ET({mainAxis:o+R,alignmentAxis:u}),d&&AT({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?RT():void 0,...U}),d&&TT({...U}),NT({...U,apply:({elements:je,rects:Pe,availableWidth:Te,availableHeight:tt})=>{const{width:it,height:ct}=Pe.reference,ot=je.floating.style;ot.setProperty("--radix-popper-available-width",`${Te}px`),ot.setProperty("--radix-popper-available-height",`${tt}px`),ot.setProperty("--radix-popper-anchor-width",`${it}px`),ot.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),k&&MT({element:k,padding:a}),FT({arrowWidth:M,arrowHeight:R}),y&&DT({strategy:"referenceHidden",...U})]}),[B,L]=r2(G),z=qn(C);En(()=>{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 En(()=>{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(IT,{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"}})})})});e2.displayName=A1;var t2="PopperArrow",BT={top:"bottom",right:"left",bottom:"top",left:"right"},n2=D.forwardRef(function(e,n){const{__scopePopper:i,...o}=e,l=zT(t2,i),u=BT[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(OT,{...o,ref:n,style:{...o.style,display:"block"}})})});n2.displayName=t2;function PT(t){return t!==null}var FT=t=>({name:"transformOrigin",options:t,fn(e){var v,b,_,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]=r2(n),h={start:"0%",center:"50%",end:"100%"}[p],y=((_=(b=o.arrow)==null?void 0:b.x)!=null?_: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:`${y}px`,w=`${-d}px`):f==="top"?(C=u?h:`${y}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 r2(t){const[e,n="center"]=t.split("-");return[e,n]}var _h=QS,td=JS,yh=e2,bh=n2,Xm="rovingFocusGroup.onEntryFocus",HT={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[jg,i2,UT]=c1(nd),[$T,xh]=$r(nd,[UT]),[qT,VT]=$T(nd),s2=D.forwardRef((t,e)=>g.jsx(jg.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(jg.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx(WT,{...t,ref:e})})}));s2.displayName=nd;var WT=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,y=D.useRef(null),S=St(e,y),C=Qu(l),[w,v]=Ms({prop:u,defaultProp:a!=null?a:null,onChange:d,caller:nd}),[b,_]=D.useState(!1),x=qn(f),k=i2(n),N=D.useRef(!1),[A,M]=D.useState(0);return D.useEffect(()=>{const R=y.current;if(R)return R.addEventListener(Xm,x),()=>R.removeEventListener(Xm,x)},[x]),g.jsx(qT,{scope:n,orientation:i,dir:C,loop:o,currentTabStopId:w,onItemFocus:D.useCallback(R=>v(R),[v]),onItemShiftTab:D.useCallback(()=>_(!0),[]),onFocusableItemAdd:D.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:D.useCallback(()=>M(R=>R-1),[]),children:g.jsx(Xe.div,{tabIndex:b||A===0?-1:0,"data-orientation":i,...h,ref:S,style:{outline:"none",...t.style},onMouseDown:Oe(t.onMouseDown,()=>{N.current=!0}),onFocus:Oe(t.onFocus,R=>{const j=!N.current;if(R.target===R.currentTarget&&j&&!b){const O=new CustomEvent(Xm,HT);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const I=k().filter(G=>G.focusable),q=I.find(G=>G.active),U=I.find(G=>G.id===w),K=[q,U,...I].filter(Boolean).map(G=>G.ref.current);l2(K,p)}}N.current=!1}),onBlur:Oe(t.onBlur,()=>_(!1))})})}),o2="RovingFocusGroupItem",a2=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:u,...a}=t,d=Sn(),f=l||d,p=VT(o2,n),h=p.currentTabStopId===f,y=i2(n),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:w}=p;return D.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),g.jsx(jg.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:Oe(t.onMouseDown,v=>{i?p.onItemFocus(f):v.preventDefault()}),onFocus:Oe(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:Oe(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=YT(v,p.orientation,p.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=y().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?XT(x,k+1):x.slice(k+1)}setTimeout(()=>l2(x))}}),children:typeof u=="function"?u({isCurrentTabStop:h,hasTabStop:w!=null}):u})})});a2.displayName=o2;var GT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function KT(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function YT(t,e,n){const i=KT(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return GT[i]}function l2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function XT(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var c2=s2,u2=a2,Og=["Enter"," "],QT=["ArrowDown","PageUp","Home"],d2=["ArrowUp","PageDown","End"],ZT=[...QT,...d2],JT={ltr:[...Og,"ArrowRight"],rtl:[...Og,"ArrowLeft"]},e6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rd="Menu",[Bu,t6,n6]=c1(rd),[Ha,f2]=$r(rd,[n6,Po,xh]),Sh=Po(),h2=xh(),[r6,Ua]=Ha(rd),[i6,id]=Ha(rd),p2=t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:o,onOpenChange:l,modal:u=!0}=t,a=Sh(e),[d,f]=D.useState(null),p=D.useRef(!1),h=qn(l),y=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(_h,{...a,children:g.jsx(r6,{scope:e,open:n,onOpenChange:h,content:d,onContentChange:f,children:g.jsx(i6,{scope:e,onClose:D.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:y,modal:u,children:i})})})};p2.displayName=rd;var s6="MenuAnchor",R1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=Sh(n);return g.jsx(td,{...o,...i,ref:e})});R1.displayName=s6;var T1="MenuPortal",[o6,m2]=Ha(T1,{forceMount:void 0}),g2=t=>{const{__scopeMenu:e,forceMount:n,children:i,container:o}=t,l=Ua(T1,e);return g.jsx(o6,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};g2.displayName=T1;var ii="MenuContent",[a6,N1]=Ha(ii),v2=D.forwardRef((t,e)=>{const n=m2(ii,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=Ua(ii,t.__scopeMenu),u=id(ii,t.__scopeMenu);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(An,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:u.modal?g.jsx(l6,{...o,ref:e}):g.jsx(c6,{...o,ref:e})})})})}),l6=D.forwardRef((t,e)=>{const n=Ua(ii,t.__scopeMenu),i=D.useRef(null),o=St(e,i);return D.useEffect(()=>{const l=i.current;if(l)return dh(l)},[]),g.jsx(D1,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),c6=D.forwardRef((t,e)=>{const n=Ua(ii,t.__scopeMenu);return g.jsx(D1,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),u6=Mo("MenuContent.ScrollLock"),D1=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:y,onDismiss:S,disableOutsideScroll:C,...w}=t,v=Ua(ii,n),b=id(ii,n),_=Sh(n),x=h2(n),k=t6(n),[N,A]=D.useState(null),M=D.useRef(null),R=St(e,M,v.onContentChange),j=D.useRef(0),O=D.useRef(""),I=D.useRef(0),q=D.useRef(null),U=D.useRef("right"),W=D.useRef(0),K=C?Ju:D.Fragment,G=C?{as:u6,allowPinchZoom:!0}:void 0,Z=B=>{var V,$;const L=O.current+B,z=k().filter(ne=>!ne.disabled),H=document.activeElement,F=(V=z.find(ne=>ne.ref.current===H))==null?void 0:V.textValue,Q=z.map(ne=>ne.textValue),te=S6(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),[]),ch();const ee=D.useCallback(B=>{var z,H;return U.current===((z=q.current)==null?void 0:z.side)&&C6(B,(H=q.current)==null?void 0:H.area)},[]);return g.jsx(a6,{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=>{q.current=B},[]),children:g.jsx(K,{...G,children:g.jsx(Zu,{asChild:!0,trapped:o,onMountAutoFocus:Oe(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:y,onDismiss:S,children:g.jsx(c2,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:Oe(d,B=>{b.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(yh,{role:"menu","aria-orientation":"vertical","data-state":j2(v.open),"data-radix-menu-content":"",dir:b.dir,..._,...w,ref:R,style:{outline:"none",...w.style},onKeyDown:Oe(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||!ZT.includes(B.key))return;B.preventDefault();const X=k().filter(V=>!V.disabled).map(V=>V.ref.current);d2.includes(B.key)&&X.reverse(),b6(X)}),onBlur:Oe(t.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:Oe(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}}))})})})})})})});v2.displayName=ii;var d6="MenuGroup",M1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{role:"group",...i,ref:e})});M1.displayName=d6;var f6="MenuLabel",_2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{...i,ref:e})});_2.displayName=f6;var Uf="MenuItem",fb="menu.itemSelect",wh=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:i,...o}=t,l=D.useRef(null),u=id(Uf,t.__scopeMenu),a=N1(Uf,t.__scopeMenu),d=St(e,l),f=D.useRef(!1),p=()=>{const h=l.current;if(!n&&h){const y=new CustomEvent(fb,{bubbles:!0,cancelable:!0});h.addEventListener(fb,S=>i==null?void 0:i(S),{once:!0}),tS(h,y),y.defaultPrevented?f.current=!1:u.onClose()}};return g.jsx(y2,{...o,ref:d,disabled:n,onClick:Oe(t.onClick,p),onPointerDown:h=>{var y;(y=t.onPointerDown)==null||y.call(t,h),f.current=!0},onPointerUp:Oe(t.onPointerUp,h=>{var y;f.current||(y=h.currentTarget)==null||y.click()}),onKeyDown:Oe(t.onKeyDown,h=>{const y=a.searchRef.current!=="";n||y&&h.key===" "||Og.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});wh.displayName=Uf;var y2=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=t,u=N1(Uf,n),a=h2(n),d=D.useRef(null),f=St(e,d),[p,h]=D.useState(!1),[y,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:y,children:g.jsx(u2,{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:Oe(t.onPointerMove,Pu(C=>{i?u.onItemLeave(C):(u.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(t.onPointerLeave,Pu(C=>u.onItemLeave(C))),onFocus:Oe(t.onFocus,()=>h(!0)),onBlur:Oe(t.onBlur,()=>h(!1))})})})}),h6="MenuCheckboxItem",b2=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:i,...o}=t;return g.jsx(k2,{scope:t.__scopeMenu,checked:n,children:g.jsx(wh,{role:"menuitemcheckbox","aria-checked":$f(n)?"mixed":n,...o,ref:e,"data-state":O1(n),onSelect:Oe(o.onSelect,()=>i==null?void 0:i($f(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b2.displayName=h6;var x2="MenuRadioGroup",[p6,m6]=Ha(x2,{value:void 0,onValueChange:()=>{}}),S2=D.forwardRef((t,e)=>{const{value:n,onValueChange:i,...o}=t,l=qn(i);return g.jsx(p6,{scope:t.__scopeMenu,value:n,onValueChange:l,children:g.jsx(M1,{...o,ref:e})})});S2.displayName=x2;var w2="MenuRadioItem",C2=D.forwardRef((t,e)=>{const{value:n,...i}=t,o=m6(w2,t.__scopeMenu),l=n===o.value;return g.jsx(k2,{scope:t.__scopeMenu,checked:l,children:g.jsx(wh,{role:"menuitemradio","aria-checked":l,...i,ref:e,"data-state":O1(l),onSelect:Oe(i.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});C2.displayName=w2;var j1="MenuItemIndicator",[k2,g6]=Ha(j1,{checked:!1}),E2=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:i,...o}=t,l=g6(j1,n);return g.jsx(An,{present:i||$f(l.checked)||l.checked===!0,children:g.jsx(Xe.span,{...o,ref:e,"data-state":O1(l.checked)})})});E2.displayName=j1;var v6="MenuSeparator",A2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Xe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});A2.displayName=v6;var _6="MenuArrow",R2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=Sh(n);return g.jsx(bh,{...o,...i,ref:e})});R2.displayName=_6;var y6="MenuSub",[UH,T2]=Ha(y6),Ru="MenuSubTrigger",N2=D.forwardRef((t,e)=>{const n=Ua(Ru,t.__scopeMenu),i=id(Ru,t.__scopeMenu),o=T2(Ru,t.__scopeMenu),l=N1(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(R1,{asChild:!0,...f,children:g.jsx(y2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":j2(n.open),...t,ref:Ds(e,o.onTriggerChange),onClick:h=>{var y;(y=t.onClick)==null||y.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(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:Oe(t.onPointerLeave,Pu(h=>{var S,C;p();const y=(S=n.content)==null?void 0:S.getBoundingClientRect();if(y){const w=(C=n.content)==null?void 0:C.dataset.side,v=w==="right",b=v?-5:5,_=y[v?"left":"right"],x=y[v?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:_,y:y.top},{x,y:y.top},{x,y: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:Oe(t.onKeyDown,h=>{var S;const y=l.searchRef.current!=="";t.disabled||y&&h.key===" "||JT[i.dir].includes(h.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),h.preventDefault())})})})});N2.displayName=Ru;var D2="MenuSubContent",M2=D.forwardRef((t,e)=>{const n=m2(ii,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=Ua(ii,t.__scopeMenu),u=id(ii,t.__scopeMenu),a=T2(D2,t.__scopeMenu),d=D.useRef(null),f=St(e,d);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(An,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:g.jsx(D1,{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:Oe(t.onFocusOutside,p=>{p.target!==a.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Oe(t.onEscapeKeyDown,p=>{u.onClose(),p.preventDefault()}),onKeyDown:Oe(t.onKeyDown,p=>{var S;const h=p.currentTarget.contains(p.target),y=e6[u.dir].includes(p.key);h&&y&&(l.onOpenChange(!1),(S=a.trigger)==null||S.focus(),p.preventDefault())})})})})})});M2.displayName=D2;function j2(t){return t?"open":"closed"}function $f(t){return t==="indeterminate"}function O1(t){return $f(t)?"indeterminate":t?"checked":"unchecked"}function b6(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function x6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function S6(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=x6(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 w6(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,y=d.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function C6(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return w6(n,e)}function Pu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var k6=p2,E6=R1,A6=g2,R6=v2,T6=M1,N6=_2,D6=wh,M6=b2,j6=S2,O6=C2,L6=E2,I6=A2,z6=R2,B6=N2,P6=M2,Ch="DropdownMenu",[F6]=$r(Ch,[f2]),sr=f2(),[H6,O2]=F6(Ch),L2=t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:u,modal:a=!0}=t,d=sr(e),f=D.useRef(null),[p,h]=Ms({prop:o,defaultProp:l!=null?l:!1,onChange:u,caller:Ch});return g.jsx(H6,{scope:e,triggerId:Sn(),triggerRef:f,contentId:Sn(),open:p,onOpenChange:h,onOpenToggle:D.useCallback(()=>h(y=>!y),[h]),modal:a,children:g.jsx(k6,{...d,open:p,onOpenChange:h,dir:i,modal:a,children:n})})};L2.displayName=Ch;var I2="DropdownMenuTrigger",z2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=t,l=O2(I2,n),u=sr(n);return g.jsx(E6,{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:Ds(e,l.triggerRef),onPointerDown:Oe(t.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(l.onOpenToggle(),l.open||a.preventDefault())}),onKeyDown:Oe(t.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&l.onOpenToggle(),a.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});z2.displayName=I2;var U6="DropdownMenuPortal",B2=t=>{const{__scopeDropdownMenu:e,...n}=t,i=sr(e);return g.jsx(A6,{...i,...n})};B2.displayName=U6;var P2="DropdownMenuContent",F2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=O2(P2,n),l=sr(n),u=D.useRef(!1);return g.jsx(R6,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:e,onCloseAutoFocus:Oe(t.onCloseAutoFocus,a=>{var d;u.current||(d=o.triggerRef.current)==null||d.focus(),u.current=!1,a.preventDefault()}),onInteractOutside:Oe(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)"}})});F2.displayName=P2;var $6="DropdownMenuGroup",q6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(T6,{...o,...i,ref:e})});q6.displayName=$6;var V6="DropdownMenuLabel",W6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(N6,{...o,...i,ref:e})});W6.displayName=V6;var G6="DropdownMenuItem",H2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(D6,{...o,...i,ref:e})});H2.displayName=G6;var K6="DropdownMenuCheckboxItem",Y6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(M6,{...o,...i,ref:e})});Y6.displayName=K6;var X6="DropdownMenuRadioGroup",Q6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(j6,{...o,...i,ref:e})});Q6.displayName=X6;var Z6="DropdownMenuRadioItem",J6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(O6,{...o,...i,ref:e})});J6.displayName=Z6;var eN="DropdownMenuItemIndicator",tN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(L6,{...o,...i,ref:e})});tN.displayName=eN;var nN="DropdownMenuSeparator",rN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(I6,{...o,...i,ref:e})});rN.displayName=nN;var iN="DropdownMenuArrow",sN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(z6,{...o,...i,ref:e})});sN.displayName=iN;var oN="DropdownMenuSubTrigger",aN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(B6,{...o,...i,ref:e})});aN.displayName=oN;var lN="DropdownMenuSubContent",cN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=sr(n);return g.jsx(P6,{...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)"}})});cN.displayName=lN;var uN=L2,dN=z2,fN=B2,hN=F2,pN=H2,mN="Label",U2=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())}}));U2.displayName=mN;var gN=U2;function Lg(t,[e,n]){return Math.min(n,Math.max(e,t))}var kh="Popover",[$2]=$r(kh,[Po]),sd=Po(),[vN,Fo]=$2(kh),q2=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,y]=Ms({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:kh});return g.jsx(_h,{...a,children:g.jsx(vN,{scope:e,contentId:Sn(),triggerRef:d,open:h,onOpenChange:y,onOpenToggle:D.useCallback(()=>y(S=>!S),[y]),hasCustomAnchor:f,onCustomAnchorAdd:D.useCallback(()=>p(!0),[]),onCustomAnchorRemove:D.useCallback(()=>p(!1),[]),modal:u,children:n})})};q2.displayName=kh;var V2="PopoverAnchor",W2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Fo(V2,n),l=sd(n),{onCustomAnchorAdd:u,onCustomAnchorRemove:a}=o;return D.useEffect(()=>(u(),()=>a()),[u,a]),g.jsx(td,{...l,...i,ref:e})});W2.displayName=V2;var G2="PopoverTrigger",K2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Fo(G2,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":J2(o.open),...i,ref:u,onClick:Oe(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:g.jsx(td,{asChild:!0,...l,children:a})});K2.displayName=G2;var L1="PopoverPortal",[_N,yN]=$2(L1,{forceMount:void 0}),Y2=t=>{const{__scopePopover:e,forceMount:n,children:i,container:o}=t,l=Fo(L1,e);return g.jsx(_N,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};Y2.displayName=L1;var cc="PopoverContent",X2=D.forwardRef((t,e)=>{const n=yN(cc,t.__scopePopover),{forceMount:i=n.forceMount,...o}=t,l=Fo(cc,t.__scopePopover);return g.jsx(An,{present:i||l.open,children:l.modal?g.jsx(xN,{...o,ref:e}):g.jsx(SN,{...o,ref:e})})});X2.displayName=cc;var bN=Mo("PopoverContent.RemoveScroll"),xN=D.forwardRef((t,e)=>{const n=Fo(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 dh(u)},[]),g.jsx(Ju,{as:bN,allowPinchZoom:!0,children:g.jsx(Q2,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,u=>{var a;u.preventDefault(),l.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(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:Oe(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),SN=D.forwardRef((t,e)=>{const n=Fo(cc,t.__scopePopover),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(Q2,{...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()}})}),Q2=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,y=Fo(cc,n),S=sd(n);return ch(),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:()=>y.onOpenChange(!1),children:g.jsx(yh,{"data-state":J2(y.open),role:"dialog",id:y.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)"}})})})}),Z2="PopoverClose",wN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Fo(Z2,n);return g.jsx(Xe.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});wN.displayName=Z2;var CN="PopoverArrow",kN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=sd(n);return g.jsx(bh,{...o,...i,ref:e})});kN.displayName=CN;function J2(t){return t?"open":"closed"}var EN=q2,AN=W2,RN=K2,TN=Y2,NN=X2,I1="Progress",z1=100,[DN]=$r(I1),[MN,jN]=DN(I1),ew=D.forwardRef((t,e)=>{const{__scopeProgress:n,value:i=null,max:o,getValueLabel:l=ON,...u}=t;(o||o===0)&&!hb(o)&&console.error(LN(`${o}`,"Progress"));const a=hb(o)?o:z1;i!==null&&!pb(i,a)&&console.error(IN(`${i}`,"Progress"));const d=pb(i,a)?i:null,f=qf(d)?l(d,a):void 0;return g.jsx(MN,{scope:n,value:d,max:a,children:g.jsx(Xe.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":qf(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":rw(d,a),"data-value":d!=null?d:void 0,"data-max":a,...u,ref:e})})});ew.displayName=I1;var tw="ProgressIndicator",nw=D.forwardRef((t,e)=>{var l;const{__scopeProgress:n,...i}=t,o=jN(tw,n);return g.jsx(Xe.div,{"data-state":rw(o.value,o.max),"data-value":(l=o.value)!=null?l:void 0,"data-max":o.max,...i,ref:e})});nw.displayName=tw;function ON(t,e){return`${Math.round(t/e*100)}%`}function rw(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function qf(t){return typeof t=="number"}function hb(t){return qf(t)&&!isNaN(t)&&t>0}function pb(t,e){return qf(t)&&!isNaN(t)&&t<=e&&t>=0}function LN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${z1}\`.`}function IN(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 ${z1} if no \`max\` prop is set)
509
- - \`null\` or \`undefined\` if the progress is indeterminate.
510
-
511
- Defaulting to \`null\`.`}var zN=ew,BN=nw;function PN(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var B1="ScrollArea",[iw]=$r(B1),[FN,si]=iw(B1),sw=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,y]=D.useState(null),[S,C]=D.useState(null),[w,v]=D.useState(null),[b,_]=D.useState(0),[x,k]=D.useState(0),[N,A]=D.useState(!1),[M,R]=D.useState(!1),j=St(e,I=>d(I)),O=Qu(o);return g.jsx(FN,{scope:n,type:i,dir:O,scrollHideDelay:l,scrollArea:a,viewport:f,onViewportChange:p,content:h,onContentChange:y,scrollbarX:S,onScrollbarXChange:C,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:v,scrollbarYEnabled:M,onScrollbarYEnabledChange:R,onCornerWidthChange:_,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}})})});sw.displayName=B1;var ow="ScrollAreaViewport",aw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:o,...l}=t,u=si(ow,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})})]})});aw.displayName=ow;var Xi="ScrollAreaScrollbar",lw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Xi,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(HN,{...i,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(UN,{...i,ref:e,forceMount:n}):o.type==="auto"?g.jsx(cw,{...i,ref:e,forceMount:n}):o.type==="always"?g.jsx(P1,{...i,ref:e}):null});lw.displayName=Xi;var HN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Xi,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(An,{present:n||l,children:g.jsx(cw,{"data-state":l?"visible":"hidden",...i,ref:e})})}),UN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Xi,t.__scopeScrollArea),l=t.orientation==="horizontal",u=Ah(()=>d("SCROLL_END"),100),[a,d]=PN("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 y=()=>{const S=f[p];h!==S&&(d("SCROLL"),u()),h=S};return f.addEventListener("scroll",y),()=>f.removeEventListener("scroll",y)}},[o.viewport,l,d,u]),g.jsx(An,{present:n||a!=="hidden",children:g.jsx(P1,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:Oe(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Oe(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cw=D.forwardRef((t,e)=>{const n=si(Xi,t.__scopeScrollArea),{forceMount:i,...o}=t,[l,u]=D.useState(!1),a=t.orientation==="horizontal",d=Ah(()=>{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(An,{present:i||l,children:g.jsx(P1,{"data-state":l?"visible":"hidden",...o,ref:e})})}),P1=D.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,o=si(Xi,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=pw(a.viewport,a.content),p={...i,sizes:a,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:y=>l.current=y,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:y=>u.current=y};function h(y,S){return KN(y,u.current,a,S)}return n==="horizontal"?g.jsx($N,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollLeft,S=mb(y,a,o.dir);l.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollLeft=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollLeft=h(y,o.dir))}}):n==="vertical"?g.jsx(qN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollTop,S=mb(y,a);l.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollTop=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollTop=h(y))}}):null}),$N=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=si(Xi,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(dw,{"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":Eh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollLeft+p.deltaX;t.onWheelScroll(y),gw(y,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)}})}})}),qN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=si(Xi,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(dw,{"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":Eh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollTop+p.deltaY;t.onWheelScroll(y),gw(y,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)}})}})}),[VN,uw]=iw(Xi),dw=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,...y}=t,S=si(Xi,n),[C,w]=D.useState(null),v=St(e,j=>w(j)),b=D.useRef(null),_=D.useRef(""),x=S.viewport,k=i.content-i.viewport,N=qn(p),A=qn(d),M=Ah(h,10);function R(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(VN,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:qn(l),onThumbPointerUp:qn(u),onThumbPositionChange:A,onThumbPointerDown:qn(a),children:g.jsx(Xe.div,{...y,ref:v,style:{position:"absolute",...y.style},onPointerDown:Oe(t.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),b.current=C.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),R(j))}),onPointerMove:Oe(t.onPointerMove,R),onPointerUp:Oe(t.onPointerUp,j=>{const O=j.target;O.hasPointerCapture(j.pointerId)&&O.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=_.current,S.viewport&&(S.viewport.style.scrollBehavior=""),b.current=null})})})}),Vf="ScrollAreaThumb",fw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=uw(Vf,t.__scopeScrollArea);return g.jsx(An,{present:n||o.hasThumb,children:g.jsx(WN,{ref:e,...i})})}),WN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...o}=t,l=si(Vf,n),u=uw(Vf,n),{onThumbPositionChange:a}=u,d=St(e,h=>u.onThumbChange(h)),f=D.useRef(void 0),p=Ah(()=>{f.current&&(f.current(),f.current=void 0)},100);return D.useEffect(()=>{const h=l.viewport;if(h){const y=()=>{if(p(),!f.current){const S=YN(h,a);f.current=S,a()}};return a(),h.addEventListener("scroll",y),()=>h.removeEventListener("scroll",y)}},[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:Oe(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:Oe(t.onPointerUp,u.onThumbPointerUp)})});fw.displayName=Vf;var F1="ScrollAreaCorner",hw=D.forwardRef((t,e)=>{const n=si(F1,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?g.jsx(GN,{...t,ref:e}):null});hw.displayName=F1;var GN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,o=si(F1,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 pw(t,e){const n=t/e;return isNaN(n)?0:n}function Eh(t){const e=pw(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function KN(t,e,n,i="ltr"){const o=Eh(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 mw([d,f],h)(t)}function mb(t,e,n="ltr"){const i=Eh(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=Lg(t,d);return mw([0,u],[0,a])(f)}function mw(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 gw(t,e){return t>0&&t<e}var YN=(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 Ah(t,e){const n=qn(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=qn(e);En(()=>{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 XN=sw,QN=aw,ZN=hw,JN=[" ","Enter","ArrowUp","ArrowDown"],eD=[" ","Enter"],za="Select",[Rh,Th,tD]=c1(za),[wc]=$r(za,[tD,Po]),Nh=Po(),[nD,Ho]=wc(za),[rD,iD]=wc(za),vw=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:y,required:S,form:C}=t,w=Nh(e),[v,b]=D.useState(null),[_,x]=D.useState(null),[k,N]=D.useState(!1),A=Qu(f),[M,R]=Ms({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:za}),[j,O]=Ms({prop:u,defaultProp:a,onChange:d,caller:za}),I=D.useRef(null),q=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(_h,{...w,children:g.jsxs(nD,{required:S,scope:e,trigger:v,onTriggerChange:b,valueNode:_,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:Sn(),value:j,onValueChange:O,open:M,onOpenChange:R,dir:A,triggerPointerDownPosRef:I,disabled:y,children:[g.jsx(Rh.Provider,{scope:e,children:g.jsx(rD,{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})}),q?g.jsxs(Hw,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:j,onChange:G=>O(G.target.value),disabled:y,form:C,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from(U)]},K):null]})})};vw.displayName=za;var _w="SelectTrigger",yw=D.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...o}=t,l=Nh(n),u=Ho(_w,n),a=u.disabled||i,d=St(e,u.onTriggerChange),f=Th(n),p=D.useRef("touch"),[h,y,S]=$w(w=>{const v=f().filter(x=>!x.disabled),b=v.find(x=>x.value===u.value),_=qw(v,w,b);_!==void 0&&u.onValueChange(_.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":Uw(u.value)?"":void 0,...o,ref:d,onClick:Oe(o.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&C(w)}),onPointerDown:Oe(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:Oe(o.onKeyDown,w=>{const v=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(v&&w.key===" ")&&JN.includes(w.key)&&(C(),w.preventDefault())})})})});yw.displayName=_w;var bw="SelectValue",xw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:u="",...a}=t,d=Ho(bw,n),{onValueNodeHasChildrenChange:f}=d,p=l!==void 0,h=St(e,d.onValueNodeChange);return En(()=>{f(p)},[f,p]),g.jsx(Xe.span,{...a,ref:h,style:{pointerEvents:"none"},children:Uw(d.value)?g.jsx(g.Fragment,{children:u}):l})});xw.displayName=bw;var sD="SelectIcon",Sw=D.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...o}=t;return g.jsx(Xe.span,{"aria-hidden":!0,...o,ref:e,children:i||"▼"})});Sw.displayName=sD;var oD="SelectPortal",ww=t=>g.jsx(bc,{asChild:!0,...t});ww.displayName=oD;var Ba="SelectContent",Cw=D.forwardRef((t,e)=>{const n=Ho(Ba,t.__scopeSelect),[i,o]=D.useState();if(En(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?Yu.createPortal(g.jsx(kw,{scope:t.__scopeSelect,children:g.jsx(Rh.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(Ew,{...t,ref:e})});Cw.displayName=Ba;var _i=10,[kw,Uo]=wc(Ba),aD="SelectContentImpl",lD=Mo("SelectContent.RemoveScroll"),Ew=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:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v,...b}=t,_=Ho(Ba,n),[x,k]=D.useState(null),[N,A]=D.useState(null),M=St(e,V=>k(V)),[R,j]=D.useState(null),[O,I]=D.useState(null),q=Th(n),[U,W]=D.useState(!1),K=D.useRef(!1);D.useEffect(()=>{if(x)return dh(x)},[x]),ch();const G=D.useCallback(V=>{const[$,...ne]=q().map(se=>se.ref.current),[ie]=ne.slice(-1),ae=document.activeElement;for(const se of V)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},[q,N]),Z=D.useCallback(()=>G([R,x]),[G,R,x]);D.useEffect(()=>{U&&Z()},[U,Z]);const{onOpenChange:ee,triggerPointerDownPosRef:B}=_;D.useEffect(()=>{if(x){let V={x:0,y:0};const $=ie=>{var ae,se,ye,Re;V={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=>{V.x<=10&&V.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 V=()=>ee(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[ee]);const[L,z]=$w(V=>{const $=q().filter(ae=>!ae.disabled),ne=$.find(ae=>ae.ref.current===document.activeElement),ie=qw($,V,ne);ie&&setTimeout(()=>ie.ref.current.focus())}),H=D.useCallback((V,$,ne)=>{const ie=!K.current&&!ne;(_.value!==void 0&&_.value===$||ie)&&(j(V),ie&&(K.current=!0))},[_.value]),F=D.useCallback(()=>x==null?void 0:x.focus(),[x]),Q=D.useCallback((V,$,ne)=>{const ie=!K.current&&!ne;(_.value!==void 0&&_.value===$||ie)&&I(V)},[_.value]),te=i==="popper"?Ig:Aw,X=te===Ig?{side:a,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v}:{};return g.jsx(kw,{scope:n,content:x,viewport:N,onViewportChange:A,itemRefCallback:H,selectedItem:R,onItemLeave:F,itemTextRefCallback:Q,focusSelectedItem:Z,selectedItemText:O,position:i,isPositioned:U,searchRef:L,children:g.jsx(Ju,{as:lD,allowPinchZoom:!0,children:g.jsx(Zu,{asChild:!0,trapped:_.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:Oe(o,V=>{var $;($=_.trigger)==null||$.focus({preventScroll:!0}),V.preventDefault()}),children:g.jsx(yc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:g.jsx(te,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:V=>V.preventDefault(),...b,...X,onPlaced:()=>W(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Oe(b.onKeyDown,V=>{const $=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!$&&V.key.length===1&&z(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let ie=q().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(V.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const ae=V.target,se=ie.indexOf(ae);ie=ie.slice(se+1)}setTimeout(()=>G(ie)),V.preventDefault()}})})})})})})});Ew.displayName=aD;var cD="SelectItemAlignedPosition",Aw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...o}=t,l=Ho(Ba,n),u=Uo(Ba,n),[a,d]=D.useState(null),[f,p]=D.useState(null),h=St(e,M=>p(M)),y=Th(n),S=D.useRef(!1),C=D.useRef(!0),{viewport:w,selectedItem:v,selectedItemText:b,focusSelectedItem:_}=u,x=D.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&f&&w&&v&&b){const M=l.trigger.getBoundingClientRect(),R=f.getBoundingClientRect(),j=l.valueNode.getBoundingClientRect(),O=b.getBoundingClientRect();if(l.dir!=="rtl"){const ae=O.left-R.left,se=j.left-ae,ye=M.left-se,Re=M.width+ye,je=Math.max(Re,R.width),Pe=window.innerWidth-_i,Te=Lg(se,[_i,Math.max(_i,Pe-je)]);a.style.minWidth=Re+"px",a.style.left=Te+"px"}else{const ae=R.right-O.right,se=window.innerWidth-j.right-ae,ye=window.innerWidth-M.right-se,Re=M.width+ye,je=Math.max(Re,R.width),Pe=window.innerWidth-_i,Te=Lg(se,[_i,Math.max(_i,Pe-je)]);a.style.minWidth=Re+"px",a.style.right=Te+"px"}const I=y(),q=window.innerHeight-_i*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-_i,te=q-Q,X=v.offsetHeight/2,V=v.offsetTop+X,$=K+G+V,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=`${_i}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=q+"px",i==null||i(),requestAnimationFrame(()=>S.current=!0)}},[y,l.trigger,l.valueNode,a,f,w,v,b,l.dir,i]);En(()=>x(),[x]);const[k,N]=D.useState();En(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const A=D.useCallback(M=>{M&&C.current===!0&&(x(),_==null||_(),C.current=!1)},[x,_]);return g.jsx(dD,{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}})})})});Aw.displayName=cD;var uD="SelectPopperPosition",Ig=D.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=_i,...l}=t,u=Nh(n);return g.jsx(yh,{...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)"}})});Ig.displayName=uD;var[dD,H1]=wc(Ba,{}),zg="SelectViewport",Rw=D.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...o}=t,l=Uo(zg,n),u=H1(zg,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(Rh.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:Oe(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=u;if(y!=null&&y.current&&h){const S=Math.abs(d.current-p.scrollTop);if(S>0){const C=window.innerHeight-_i*2,w=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),b=Math.max(w,v);if(b<C){const _=b+S,x=Math.min(C,_),k=_-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})})})]})});Rw.displayName=zg;var Tw="SelectGroup",[fD,hD]=wc(Tw),Nw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=Sn();return g.jsx(fD,{scope:n,id:o,children:g.jsx(Xe.div,{role:"group","aria-labelledby":o,...i,ref:e})})});Nw.displayName=Tw;var Dw="SelectLabel",Mw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=hD(Dw,n);return g.jsx(Xe.div,{id:o.id,...i,ref:e})});Mw.displayName=Dw;var Gf="SelectItem",[pD,jw]=wc(Gf),Ow=D.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...u}=t,a=Ho(Gf,n),d=Uo(Gf,n),f=a.value===i,[p,h]=D.useState(l!=null?l:""),[y,S]=D.useState(!1),C=St(e,_=>{var x;return(x=d.itemRefCallback)==null?void 0:x.call(d,_,i,o)}),w=Sn(),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(pD,{scope:n,value:i,disabled:o,textId:w,isSelected:f,onItemTextChange:D.useCallback(_=>{h(x=>{var k;return x||((k=_==null?void 0:_.textContent)!=null?k:"").trim()})},[]),children:g.jsx(Rh.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:g.jsx(Xe.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:C,onFocus:Oe(u.onFocus,()=>S(!0)),onBlur:Oe(u.onBlur,()=>S(!1)),onClick:Oe(u.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:Oe(u.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:Oe(u.onPointerDown,_=>{v.current=_.pointerType}),onPointerMove:Oe(u.onPointerMove,_=>{var x;v.current=_.pointerType,o?(x=d.onItemLeave)==null||x.call(d):v.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(u.onPointerLeave,_=>{var x;_.currentTarget===document.activeElement&&((x=d.onItemLeave)==null||x.call(d))}),onKeyDown:Oe(u.onKeyDown,_=>{var k;((k=d.searchRef)==null?void 0:k.current)!==""&&_.key===" "||(eD.includes(_.key)&&b(),_.key===" "&&_.preventDefault())})})})})});Ow.displayName=Gf;var Tu="SelectItemText",Lw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,...l}=t,u=Ho(Tu,n),a=Uo(Tu,n),d=jw(Tu,n),f=iD(Tu,n),[p,h]=D.useState(null),y=St(e,b=>h(b),d.onItemTextChange,b=>{var _;return(_=a.itemTextRefCallback)==null?void 0:_.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 En(()=>(w(C),()=>v(C)),[w,v,C]),g.jsxs(g.Fragment,{children:[g.jsx(Xe.span,{id:d.textId,...l,ref:y}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Yu.createPortal(l.children,u.valueNode):null]})});Lw.displayName=Tu;var Iw="SelectItemIndicator",zw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return jw(Iw,n).isSelected?g.jsx(Xe.span,{"aria-hidden":!0,...i,ref:e}):null});zw.displayName=Iw;var Bg="SelectScrollUpButton",Bw=D.forwardRef((t,e)=>{const n=Uo(Bg,t.__scopeSelect),i=H1(Bg,t.__scopeSelect),[o,l]=D.useState(!1),u=St(e,i.onScrollButtonChange);return En(()=>{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(Fw,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Bw.displayName=Bg;var Pg="SelectScrollDownButton",Pw=D.forwardRef((t,e)=>{const n=Uo(Pg,t.__scopeSelect),i=H1(Pg,t.__scopeSelect),[o,l]=D.useState(!1),u=St(e,i.onScrollButtonChange);return En(()=>{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(Fw,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});Pw.displayName=Pg;var Fw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=t,l=Uo("SelectScrollButton",n),u=D.useRef(null),a=Th(n),d=D.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return D.useEffect(()=>()=>d(),[d]),En(()=>{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:Oe(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Oe(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Oe(o.onPointerLeave,()=>{d()})})}),mD="SelectSeparator",gD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return g.jsx(Xe.div,{"aria-hidden":!0,...i,ref:e})});gD.displayName=mD;var Fg="SelectArrow",vD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=Nh(n),l=Ho(Fg,n),u=Uo(Fg,n);return l.open&&u.position==="popper"?g.jsx(bh,{...o,...i,ref:e}):null});vD.displayName=Fg;var _D="SelectBubbleInput",Hw=D.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const o=D.useRef(null),l=St(i,o),u=AR(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:{...nS,...n.style},ref:l,defaultValue:e})});Hw.displayName=_D;function Uw(t){return t===""||t===void 0}function $w(t){const e=qn(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 qw(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=yD(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 yD(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var bD=vw,xD=yw,SD=xw,wD=Sw,CD=ww,kD=Cw,ED=Rw,AD=Nw,RD=Mw,TD=Ow,ND=Lw,DD=zw,MD=Bw,jD=Pw,OD="Separator",gb="horizontal",LD=["horizontal","vertical"],Vw=D.forwardRef((t,e)=>{const{decorative:n,orientation:i=gb,...o}=t,l=ID(i)?i:gb,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})});Vw.displayName=OD;function ID(t){return LD.includes(t)}var zD=Vw,Dh="Tabs",[BD]=$r(Dh,[xh]),Ww=xh(),[PD,U1]=BD(Dh),Gw=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,y]=Ms({prop:i,onChange:o,defaultProp:l!=null?l:"",caller:Dh});return g.jsx(PD,{scope:n,baseId:Sn(),value:h,onValueChange:y,orientation:u,dir:p,activationMode:d,children:g.jsx(Xe.div,{dir:p,"data-orientation":u,...f,ref:e})})});Gw.displayName=Dh;var Kw="TabsList",Yw=D.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...o}=t,l=U1(Kw,n),u=Ww(n);return g.jsx(c2,{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})})});Yw.displayName=Kw;var Xw="TabsTrigger",Qw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=t,u=U1(Xw,n),a=Ww(n),d=eC(u.baseId,i),f=tC(u.baseId,i),p=i===u.value;return g.jsx(u2,{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:Oe(t.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?u.onValueChange(i):h.preventDefault()}),onKeyDown:Oe(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&u.onValueChange(i)}),onFocus:Oe(t.onFocus,()=>{const h=u.activationMode!=="manual";!p&&!o&&h&&u.onValueChange(i)})})})});Qw.displayName=Xw;var Zw="TabsContent",Jw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...u}=t,a=U1(Zw,n),d=eC(a.baseId,i),f=tC(a.baseId,i),p=i===a.value,h=D.useRef(p);return D.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),g.jsx(An,{present:o||p,children:({present:y})=>g.jsx(Xe.div,{"data-state":p?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":d,hidden:!y,id:f,tabIndex:0,...u,ref:e,style:{...t.style,animationDuration:h.current?"0s":void 0},children:y&&l})})});Jw.displayName=Zw;function eC(t,e){return`${t}-trigger-${e}`}function tC(t,e){return`${t}-content-${e}`}var FD=Gw,HD=Yw,UD=Qw,$D=Jw,[Mh]=$r("Tooltip",[Po]),jh=Po(),nC="TooltipProvider",qD=700,Hg="tooltip.open",[VD,$1]=Mh(nC),rC=t=>{const{__scopeTooltip:e,delayDuration:n=qD,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(VD,{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})};rC.displayName=nC;var Fu="Tooltip",[WD,od]=Mh(Fu),iC=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:o,onOpenChange:l,disableHoverableContent:u,delayDuration:a}=t,d=$1(Fu,t.__scopeTooltip),f=jh(e),[p,h]=D.useState(null),y=Sn(),S=D.useRef(0),C=u!=null?u:d.disableHoverableContent,w=a!=null?a:d.delayDuration,v=D.useRef(!1),[b,_]=Ms({prop:i,defaultProp:o!=null?o:!1,onChange:M=>{M?(d.onOpen(),document.dispatchEvent(new CustomEvent(Hg))):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,_(!0)},[_]),N=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_(!1)},[_]),A=D.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{v.current=!0,_(!0),S.current=0},w)},[w,_]);return D.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(_h,{...f,children:g.jsx(WD,{scope:e,contentId:y,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})})};iC.displayName=Fu;var Ug="TooltipTrigger",sC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=od(Ug,n),l=$1(Ug,n),u=jh(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:Oe(t.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Oe(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Oe(t.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oe(t.onFocus,()=>{f.current||o.onOpen()}),onBlur:Oe(t.onBlur,o.onClose),onClick:Oe(t.onClick,o.onClose)})})});sC.displayName=Ug;var q1="TooltipPortal",[GD,KD]=Mh(q1,{forceMount:void 0}),oC=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:o}=t,l=od(q1,e);return g.jsx(GD,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(bc,{asChild:!0,container:o,children:i})})})};oC.displayName=q1;var dc="TooltipContent",aC=D.forwardRef((t,e)=>{const n=KD(dc,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=t,u=od(dc,t.__scopeTooltip);return g.jsx(An,{present:i||u.open,children:u.disableHoverableContent?g.jsx(lC,{side:o,...l,ref:e}):g.jsx(YD,{side:o,...l,ref:e})})}),YD=D.forwardRef((t,e)=>{const n=od(dc,t.__scopeTooltip),i=$1(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,y=D.useCallback(()=>{a(null),h(!1)},[h]),S=D.useCallback((C,w)=>{const v=C.currentTarget,b={x:C.clientX,y:C.clientY},_=JD(b,v.getBoundingClientRect()),x=eM(b,_),k=tM(w.getBoundingClientRect()),N=rM([...x,...k]);a(N),h(!0)},[h]);return D.useEffect(()=>()=>y(),[y]),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,y]),D.useEffect(()=>{if(u){const C=w=>{const v=w.target,b={x:w.clientX,y:w.clientY},_=(d==null?void 0:d.contains(v))||(p==null?void 0:p.contains(v)),x=!nM(b,u);_?y():x&&(y(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,f,y]),g.jsx(lC,{...t,ref:l})}),[XD,QD]=Mh(Fu,{isInside:!1}),ZD=K5("TooltipContent"),lC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...a}=t,d=od(dc,n),f=jh(n),{onClose:p}=d;return D.useEffect(()=>(document.addEventListener(Hg,p),()=>document.removeEventListener(Hg,p)),[p]),D.useEffect(()=>{if(d.trigger){const h=y=>{const S=y.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(yh,{"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(ZD,{children:i}),g.jsx(XD,{scope:n,isInside:!0,children:g.jsx(eA,{id:d.contentId,role:"tooltip",children:o||i})})]})})});aC.displayName=dc;var cC="TooltipArrow",uC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=jh(n);return QD(cC,n).isInside?null:g.jsx(bh,{...o,...i,ref:e})});uC.displayName=cC;function JD(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 eM(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 tM(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 nM(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,y=d.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function rM(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),iM(e)}function iM(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 sM=rC,oM=iC,aM=sC,lM=oC,cM=aC,uM=uC;const dM=(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},fM=(t,e)=>({classGroupId:t,validator:e}),dC=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Kf="-",vb=[],hM="arbitrary..",pM=t=>{const e=gM(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return mM(u);const a=u.split(Kf),d=a[0]===""&&a.length>1?1:0;return fC(a,d,e)},getConflictingClassGroupIds:(u,a)=>{if(a){const d=i[u],f=n[u];return d?f?dM(f,d):d:f||vb}return n[u]||vb}}},fC=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const f=fC(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}},mM=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?hM+i:void 0})(),gM=t=>{const{theme:e,classGroups:n}=t;return vM(n,e)},vM=(t,e)=>{const n=dC();for(const i in t){const o=t[i];V1(o,n,i,e)}return n},V1=(t,e,n,i)=>{const o=t.length;for(let l=0;l<o;l++){const u=t[l];_M(u,e,n,i)}},_M=(t,e,n,i)=>{if(typeof t=="string"){yM(t,e,n);return}if(typeof t=="function"){bM(t,e,n,i);return}xM(t,e,n,i)},yM=(t,e,n)=>{const i=t===""?e:hC(e,t);i.classGroupId=n},bM=(t,e,n,i)=>{if(SM(t)){V1(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(fM(n,t))},xM=(t,e,n,i)=>{const o=Object.entries(t),l=o.length;for(let u=0;u<l;u++){const[a,d]=o[u];V1(d,hC(e,a),n,i)}},hC=(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=dC(),n.nextPart.set(u,a)),n=a}return n},SM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,wM=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)}}},$g="!",_b=":",CM=[],yb=(t,e,n,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),kM=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===_b){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 y=h,S=!1;h.endsWith($g)?(y=h.slice(0,-1),S=!0):h.startsWith($g)&&(y=h.slice(1),S=!0);const C=f&&f>d?f-d:void 0;return yb(l,S,y,C)};if(e){const o=e+_b,l=i;i=u=>u.startsWith(o)?l(u.slice(o.length)):yb(CM,!1,u,void 0,!0)}if(n){const o=i;i=l=>n({className:l,parseClassName:o})}return i},EM=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}},AM=t=>({cache:wM(t.cacheSize),parseClassName:kM(t),sortModifiers:EM(t),...pM(t)}),RM=/\s+/,TM=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],a=t.trim().split(RM);let d="";for(let f=a.length-1;f>=0;f-=1){const p=a[f],{isExternal:h,modifiers:y,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?"":y.length===1?y[0]:l(y).join(":"),x=S?_+$g:_,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},NM=(...t)=>{let e=0,n,i,o="";for(;e<t.length;)(n=t[e++])&&(i=pC(n))&&(o&&(o+=" "),o+=i);return o},pC=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=pC(t[i]))&&(n&&(n+=" "),n+=e);return n},DM=(t,...e)=>{let n,i,o,l;const u=d=>{const f=e.reduce((p,h)=>h(p),t());return n=AM(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=TM(d,n);return o(d,p),p};return l=u,(...d)=>l(NM(...d))},MM=[],xn=t=>{const e=n=>n[t]||MM;return e.isThemeGetter=!0,e},mC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,OM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LM=/\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$/,IM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Eo=t=>jM.test(t),xt=t=>!!t&&!Number.isNaN(Number(t)),Ao=t=>!!t&&Number.isInteger(Number(t)),Qm=t=>t.endsWith("%")&&xt(t.slice(0,-1)),Es=t=>OM.test(t),vC=()=>!0,PM=t=>LM.test(t)&&!IM.test(t),W1=()=>!1,FM=t=>zM.test(t),HM=t=>BM.test(t),UM=t=>!qe(t)&&!We(t),$M=t=>$o(t,bC,W1),qe=t=>mC.test(t),Da=t=>$o(t,xC,PM),bb=t=>$o(t,QM,xt),qM=t=>$o(t,wC,vC),VM=t=>$o(t,SC,W1),xb=t=>$o(t,_C,W1),WM=t=>$o(t,yC,HM),Sf=t=>$o(t,CC,FM),We=t=>gC.test(t),yu=t=>$a(t,xC),GM=t=>$a(t,SC),Sb=t=>$a(t,_C),KM=t=>$a(t,bC),YM=t=>$a(t,yC),wf=t=>$a(t,CC,!0),XM=t=>$a(t,wC,!0),$o=(t,e,n)=>{const i=mC.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},$a=(t,e,n=!1)=>{const i=gC.exec(t);return i?i[1]?e(i[1]):n:!1},_C=t=>t==="position"||t==="percentage",yC=t=>t==="image"||t==="url",bC=t=>t==="length"||t==="size"||t==="bg-size",xC=t=>t==="length",QM=t=>t==="number",SC=t=>t==="family-name",wC=t=>t==="number"||t==="weight",CC=t=>t==="shadow",ZM=()=>{const t=xn("color"),e=xn("font"),n=xn("text"),i=xn("font-weight"),o=xn("tracking"),l=xn("leading"),u=xn("breakpoint"),a=xn("container"),d=xn("spacing"),f=xn("radius"),p=xn("shadow"),h=xn("inset-shadow"),y=xn("text-shadow"),S=xn("drop-shadow"),C=xn("blur"),w=xn("perspective"),v=xn("aspect"),b=xn("ease"),_=xn("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(),We,qe],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],R=()=>[We,qe,d],j=()=>[Eo,"full","auto",...R()],O=()=>[Ao,"none","subgrid",We,qe],I=()=>["auto",{span:["full",Ao,We,qe]},Ao,We,qe],q=()=>[Ao,"auto",We,qe],U=()=>["auto","min","max","fr",We,qe],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...R()],Z=()=>[Eo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],ee=()=>[Eo,"screen","full","dvw","lvw","svw","min","max","fit",...R()],B=()=>[Eo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],L=()=>[t,We,qe],z=()=>[...k(),Sb,xb,{position:[We,qe]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",KM,$M,{size:[We,qe]}],Q=()=>[Qm,yu,Da],te=()=>["","none","full",f,We,qe],X=()=>["",xt,yu,Da],V=()=>["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,Qm,Sb,xb],ie=()=>["","none",C,We,qe],ae=()=>["none",xt,We,qe],se=()=>["none",xt,We,qe],ye=()=>[xt,We,qe],Re=()=>[Eo,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Es],breakpoint:[Es],color:[vC],container:[Es],"drop-shadow":[Es],ease:["in","out","in-out"],font:[UM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Es],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Es],shadow:[Es],spacing:["px",xt],text:[Es],"text-shadow":[Es],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Eo,qe,We,v]}],container:["container"],columns:[{columns:[xt,qe,We,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:[Ao,"auto",We,qe]}],basis:[{basis:[Eo,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,Eo,"auto","initial","none",qe]}],grow:[{grow:["",xt,We,qe]}],shrink:[{shrink:["",xt,We,qe]}],order:[{order:[Ao,"first","last","none",We,qe]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"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:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],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":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"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,Da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,XM,qM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qm,qe]}],"font-family":[{font:[GM,VM,e]}],"font-features":[{"font-features":[qe]}],"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,We,qe]}],"line-clamp":[{"line-clamp":[xt,"none",We,bb]}],leading:[{leading:[l,...R()]}],"list-image":[{"list-image":["none",We,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",We,qe]}],"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:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",We,Da]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[xt,"auto",We,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We,qe]}],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",We,qe]}],"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"]},Ao,We,qe],radial:["",We,qe],conic:[Ao,We,qe]},YM,WM]}],"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:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"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:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,We,qe]}],"outline-w":[{outline:["",xt,yu,Da]}],"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,Da]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",y,wf,Sf]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[xt,We,qe]}],"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":[We,qe]}],"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",We,qe]}],filter:[{filter:["","none",We,qe]}],blur:[{blur:ie()}],brightness:[{brightness:[xt,We,qe]}],contrast:[{contrast:[xt,We,qe]}],"drop-shadow":[{"drop-shadow":["","none",S,wf,Sf]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",xt,We,qe]}],"hue-rotate":[{"hue-rotate":[xt,We,qe]}],invert:[{invert:["",xt,We,qe]}],saturate:[{saturate:[xt,We,qe]}],sepia:[{sepia:["",xt,We,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",We,qe]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[xt,We,qe]}],"backdrop-contrast":[{"backdrop-contrast":[xt,We,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,We,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,We,qe]}],"backdrop-invert":[{"backdrop-invert":["",xt,We,qe]}],"backdrop-opacity":[{"backdrop-opacity":[xt,We,qe]}],"backdrop-saturate":[{"backdrop-saturate":[xt,We,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,We,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",We,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",We,qe]}],ease:[{ease:["linear","initial",b,We,qe]}],delay:[{delay:[xt,We,qe]}],animate:[{animate:["none",_,We,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,We,qe]}],"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:[We,qe,"","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",We,qe]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",We,qe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[xt,yu,Da,bb]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JM=DM(ZM);function Ee(...t){return JM(ah(t))}const e8=_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 Fe(t){const e=ve.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(e8({variant:a,size:d,className:n})),e[6]=n,e[7]=d,e[8]=a,e[9]=h):h=e[9];let y;return e[10]!==p||e[11]!==i||e[12]!==d||e[13]!==h||e[14]!==a?(y=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]=y):y=e[15],y}function ad(){const t=ve.c(1),e=t8;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={fetchWithAuth:e},t[0]=n):n=t[0],n}async function t8(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 n8(...t){return t.map((e,n)=>n===0?e.replace(/\/+$/,""):e.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function Cc(t){const e=ve.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(g1,{"data-slot":"dialog",...n}),e[2]=n,e[3]=i):i=e[3],i}function r8(t){const e=ve.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(v1,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function i8(t){const e=ve.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(hh,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=i):i=e[3],i}function s8(t){const e=ve.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(_1,{"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=ve.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(s8,{}),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(hh,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(Fe,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[g.jsx(Ts,{}),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(r8,{children:[a,g.jsxs(y1,{"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=ve.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 Oh(t){const e=ve.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(hh,{asChild:!0,children:g.jsx(Fe,{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=ve.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(LS,{"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=ve.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(IS,{"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=ve.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=ve.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(QN,{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(o8,{}),p=g.jsx(ZN,{}),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(XN,{"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 o8(t){const e=ve.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(fw,{"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(lw,{"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 a8({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,y]=D.useState(0),[S,C]=D.useState(null),[w,v]=D.useState(""),[b,_]=D.useState(!1),[x,k]=D.useState([]),[N,A]=D.useState(!1),M=D.useRef(null),R=D.useRef(null),{fetchWithAuth:j}=ad(),{activeServer:O}=vc(),I=D.useCallback(async Q=>{var te;p(!0),C(null),y(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}),V=await X.json();if(!X.ok)throw new Error(V.message||"Failed to browse directory");const $=V.files.filter(ne=>ne.type==="directory");d($),u(V.currentPath),_((te=V.isRoot)!=null?te:!1)}catch(X){C(X instanceof Error?X.message:"Failed to load directory"),d([])}finally{p(!1)}},[j,O]),q=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||""),q())},[t,i,I,q]),D.useEffect(()=>{y(0)},[w]);const U=a.filter(Q=>Q.name.toLowerCase().includes(w.toLowerCase())),W=(F=U[h])!=null?F:null,K=D.useCallback(Q=>n8(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 V=X.files.filter($=>$.type==="directory");d(V),u(X.currentPath),_((Q=X.isRoot)!=null?Q:!1),y(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(),y(te=>Math.min(te+1,U.length-1));break;case"ArrowRight":U[h]&&(Q.preventDefault(),L(U[h]));break;case"ArrowUp":Q.preventDefault(),y(te=>Math.max(te-1,0));break;case"Enter":Q.preventDefault(),B();break;case"Escape":w&&(Q.preventDefault(),v(""));break}};D.useEffect(()=>{if(R.current&&U.length>0){const Q=R.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(Fe,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:ee,disabled:f||!l||b,children:g.jsx(VE,{className:"w-4 h-4"})}),x.length>1&&g.jsxs("div",{className:"relative",children:[g.jsx(Fe,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:()=>A(Q=>!Q),disabled:f,children:g.jsx(w4,{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(Rs,{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(a1,{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(Pr,{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(Fe,{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(Rs,{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:R,children:U.map((Q,te)=>g.jsxs("button",{onClick:()=>y(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(Rs,{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(Ns,{className:"w-4 h-4 text-primary"})]},Q.path))})}),S&&g.jsx("p",{className:"text-xs text-destructive",children:S})]}),g.jsxs(Oh,{children:[g.jsx(Fe,{variant:"outline",onClick:()=>e(!1),children:"Cancel"}),g.jsx(Fe,{onClick:B,disabled:!G||f,children:Z?"Use This Folder":"Add Selected Folder"})]})]})})}function qg(t){const e=ve.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,y=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 _;e[10]!==h?(_=g.jsx(i8,{asChild:!0,children:g.jsx(Fe,{variant:"outline",children:h})}),e[10]=h,e[11]=_):_=e[11];const x=y==="destructive"?"destructive":"default";let k;e[12]!==p||e[13]!==C||e[14]!==x?(k=g.jsx(Fe,{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]!==_?(N=g.jsxs(Oh,{children:[_,k]}),e[16]=k,e[17]=_,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 kC(t){const e=ve.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(uN,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}function EC(t){const e=ve.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(dN,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function AC(t){const e=ve.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(fN,{children:g.jsx(hN,{"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=ve.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(pN,{"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 wb=1,l8=.9,c8=.8,u8=.17,Zm=.1,Jm=.999,d8=.9999,f8=.99,h8=/[\\\/_+.#"@\[\(\{&]/,p8=/[\\\/_+.#"@\[\(\{&]/g,m8=/[\s-]/,RC=/[\s-]/g;function Vg(t,e,n,i,o,l,u){if(l===e.length)return o===t.length?wb:f8;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,y,S,C;f>=0;)h=Vg(t,e,n,i,f+1,l+1,u),h>p&&(f===o?h*=wb:h8.test(t.charAt(f-1))?(h*=c8,S=t.slice(o,f-1).match(p8),S&&o>0&&(h*=Math.pow(Jm,S.length))):m8.test(t.charAt(f-1))?(h*=l8,C=t.slice(o,f-1).match(RC),C&&o>0&&(h*=Math.pow(Jm,C.length))):(h*=u8,o>0&&(h*=Math.pow(Jm,f-o))),t.charAt(f)!==e.charAt(l)&&(h*=d8)),(h<Zm&&n.charAt(f-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(f-1)!==i.charAt(l))&&(y=Vg(t,e,n,i,f+1,l+2,u),y*Zm>h&&(h=y*Zm)),h>p&&(p=h),f=n.indexOf(d,f+1);return u[a]=p,p}function Cb(t){return t.toLowerCase().replace(RC," ")}function g8(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Vg(t,e,Cb(t),Cb(e),0,0,{})}var bu='[cmdk-group=""]',eg='[cmdk-group-items=""]',v8='[cmdk-group-heading=""]',TC='[cmdk-item=""]',kb=`${TC}:not([aria-disabled="true"])`,Wg="cmdk-item-select",Zl="data-value",_8=(t,e,n)=>g8(t,e,n),NC=D.createContext(void 0),cd=()=>D.useContext(NC),DC=D.createContext(void 0),G1=()=>D.useContext(DC),MC=D.createContext(void 0),jC=D.forwardRef((t,e)=>{let n=Jl(()=>{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=Jl(()=>new Set),o=Jl(()=>new Map),l=Jl(()=>new Map),u=Jl(()=>new Set),a=OC(t),{label:d,children:f,value:p,onValueChange:h,filter:y,shouldFilter:S,loop:C,disablePointerSelection:w=!1,vimBindings:v=!0,...b}=t,_=Sn(),x=Sn(),k=Sn(),N=D.useRef(null),A=T8();Pa(()=>{if(p!==void 0){let H=p.trim();n.current.value=H,M.emit()}},[p]),Pa(()=>{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,V,$;if(!Object.is(n.current[H],F)){if(n.current[H]=F,H==="search")q(),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(_))==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:"";($=(V=a.current).onValueChange)==null||$.call(V,ne);return}}M.emit()}},emit:()=>{u.current.forEach(H=>H())}}),[]),R=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,()=>{q(),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,()=>{q(),(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:_,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:_8;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),V=0;X.forEach($=>{let ne=H.get($);V=Math.max(ne,V)}),F.push([te,V])});let Q=N.current;K().sort((te,X)=>{var V,$;let ne=te.getAttribute("id"),ie=X.getAttribute("id");return((V=H.get(ie))!=null?V:0)-(($=H.get(ne))!=null?$:0)}).forEach(te=>{let X=te.closest(eg);X?X.appendChild(te.parentElement===X?te:te.closest(`${eg} > *`)):Q.appendChild(te.parentElement===Q?te:te.closest(`${eg} > *`))}),F.sort((te,X)=>X[1]-te[1]).forEach(te=>{var X;let V=(X=N.current)==null?void 0:X.querySelector(`${bu}[${Zl}="${encodeURIComponent(te[0])}"]`);V==null||V.parentElement.appendChild(V)})}function I(){let H=K().find(Q=>Q.getAttribute("aria-disabled")!=="true"),F=H==null?void 0:H.getAttribute(Zl);M.setState("value",F||void 0)}function q(){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 V of i.current){let $=(F=(H=l.current.get(V))==null?void 0:H.value)!=null?F:"",ne=(te=(Q=l.current.get(V))==null?void 0:Q.keywords)!=null?te:[],ie=j($,ne);n.current.filtered.items.set(V,ie),ie>0&&X++}for(let[V,$]of o.current)for(let ne of $)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(V);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(v8))==null||Q.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function W(){var H;return(H=N.current)==null?void 0:H.querySelector(`${TC}[aria-selected="true"]`)}function K(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(kb))||[])}function G(H){let F=K()[H];F&&M.setState("value",F.getAttribute(Zl))}function Z(H){var F;let Q=W(),te=K(),X=te.findIndex($=>$===Q),V=te[X+H];(F=a.current)!=null&&F.loop&&(V=X+H<0?te[te.length-1]:X+H===te.length?te[0]:te[X+H]),V&&M.setState("value",V.getAttribute(Zl))}function ee(H){let F=W(),Q=F==null?void 0:F.closest(bu),te;for(;Q&&!te;)Q=H>0?A8(Q,bu):R8(Q,bu),te=Q==null?void 0:Q.querySelector(kb);te?M.setState("value",te.getAttribute(Zl)):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(Wg);te.dispatchEvent(X)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:D8},d),Lh(t,H=>D.createElement(DC.Provider,{value:M},D.createElement(NC.Provider,{value:R},H))))}),y8=D.forwardRef((t,e)=>{var n,i;let o=Sn(),l=D.useRef(null),u=D.useContext(MC),a=cd(),d=OC(t),f=(i=(n=d.current)==null?void 0:n.forceMount)!=null?i:u==null?void 0:u.forceMount;Pa(()=>{if(!f)return a.item(o,u==null?void 0:u.id)},[f]);let p=LC(o,l,[t.value,t.children,l],t.keywords),h=G1(),y=Lo(A=>A.value&&A.value===p.current),S=Lo(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(Wg,C),()=>A.removeEventListener(Wg,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:_,forceMount:x,keywords:k,...N}=t;return D.createElement(Xe.div,{ref:Ds(l,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!y,"data-disabled":!!v,"data-selected":!!y,onPointerMove:v||a.getDisablePointerSelection()?void 0:w,onClick:v?void 0:C},t.children)}),b8=D.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:o,...l}=t,u=Sn(),a=D.useRef(null),d=D.useRef(null),f=Sn(),p=cd(),h=Lo(S=>o||p.filter()===!1?!0:S.search?S.filtered.groups.has(u):!0);Pa(()=>p.group(u),[]),LC(u,a,[t.value,t.heading,d]);let y=D.useMemo(()=>({id:u,forceMount:o}),[o]);return D.createElement(Xe.div,{ref:Ds(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),Lh(t,S=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},D.createElement(MC.Provider,{value:y},S))))}),x8=D.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,o=D.useRef(null),l=Lo(u=>!u.search);return!n&&!l?null:D.createElement(Xe.div,{ref:Ds(o,e),...i,"cmdk-separator":"",role:"separator"})}),S8=D.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,o=t.value!=null,l=G1(),u=Lo(f=>f.search),a=Lo(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)}})}),w8=D.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...o}=t,l=D.useRef(null),u=D.useRef(null),a=Lo(f=>f.selectedItemId),d=cd();return D.useEffect(()=>{if(u.current&&l.current){let f=u.current,p=l.current,h,y=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let S=f.offsetHeight;p.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(f),()=>{cancelAnimationFrame(h),y.unobserve(f)}}},[]),D.createElement(Xe.div,{ref:Ds(l,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:d.listId},Lh(t,f=>D.createElement("div",{ref:Ds(u,d.listInnerRef),"cmdk-list-sizer":""},f)))}),C8=D.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:l,container:u,...a}=t;return D.createElement(g1,{open:n,onOpenChange:i},D.createElement(v1,{container:u},D.createElement(_1,{"cmdk-overlay":"",className:o}),D.createElement(y1,{"aria-label":t.label,"cmdk-dialog":"",className:l},D.createElement(jC,{ref:e,...a}))))}),k8=D.forwardRef((t,e)=>Lo(n=>n.filtered.count===0)?D.createElement(Xe.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),E8=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},Lh(t,u=>D.createElement("div",{"aria-hidden":!0},u)))}),qa=Object.assign(jC,{List:w8,Item:y8,Input:S8,Group:b8,Separator:x8,Dialog:C8,Empty:k8,Loading:E8});function A8(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function R8(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function OC(t){let e=D.useRef(t);return Pa(()=>{e.current=t}),e}var Pa=typeof window>"u"?D.useEffect:D.useLayoutEffect;function Jl(t){let e=D.useRef();return e.current===void 0&&(e.current=t()),e}function Lo(t){let e=G1(),n=()=>t(e.snapshot());return D.useSyncExternalStore(e.subscribe,n,n)}function LC(t,e,n,i=[]){let o=D.useRef(),l=cd();return Pa(()=>{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(Zl,a),o.current=a}),o}var T8=()=>{let[t,e]=D.useState(),n=Jl(()=>new Map);return Pa(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,o)=>{n.current.set(i,o),e({})}};function N8(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Lh({asChild:t,children:e},n){return t&&D.isValidElement(e)?D.cloneElement(N8(e),{ref:e.ref},n(e.props.children)):n(e)}var D8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function M8(t){const e=ve.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 j8(t){const e=ve.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 O8=_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 L8(t){const e=ve.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(O8({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:I8,...i}),e[7]=l,e[8]=i,e[9]=u,e[10]=a):a=e[10],a}function I8(t){var e,n;t.target.closest("button")||(n=(e=t.currentTarget.parentElement)==null?void 0:e.querySelector("input"))==null||n.focus()}function K1(t){const e=ve.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(qa,{"data-slot":"command",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function IC(t){const e=ve.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(qa.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(L8,{children:g.jsx(a1,{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(j8,{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 Y1(t){const e=ve.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(qa.List,{"data-slot":"command-list",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function X1(t){const e=ve.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(qa.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=ve.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(qa.Group,{"data-slot":"command-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function zC(t){const e=ve.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(qa.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=ve.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(Ns,{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(qa.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 Ih(t){const e=ve.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(EN,{"data-slot":"popover",...n}),e[2]=n,e[3]=i):i=e[3],i}function Q1(t){const e=ve.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(RN,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function zh(t){const e=ve.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(TN,{children:g.jsx(NN,{"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 z8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(AN,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=i):i=e[3],i}function B8(t){const e=ve.c(59),{workspaces:n,activeWorkspace:i,onSelectWorkspace:o,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:u,isWorkspaceFavorited:a,onToggleFavorite:d,onDeleteWorkspace:f}=t,[p,h]=D.useState(!1),[y,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(kg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Rs,{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 _;e[2]!==b?(_=g.jsx("span",{className:"truncate",children:b}),e[2]=b,e[3]=_):_=e[3];let x;e[4]!==v||e[5]!==_?(x=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[v,_]}),e[4]=v,e[5]=_,e[6]=x):x=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(Px,{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(Q1,{asChild:!0,children:g.jsxs(Fe,{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(IC,{placeholder:"Search workspace..."}),e[11]=A):A=e[11];let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(X1,{children:"No workspace found."}),e[12]=M):M=e[12];let R;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=V=>g.jsxs(sc,{showCheck:!1,onSelect:()=>{o(V),h(!1)},children:[g.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[V.isVirtual?g.jsx(kg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Rs,{className:"size-4 flex-shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate",children:V.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(V.id,V.name)},title:a(V.id)?"Remove from favorites":"Add to favorites",children:a(V.id)?g.jsx(Ly,{className:"size-4 fill-primary text-primary"}):g.jsx(Ly,{className:"size-4 text-muted-foreground"})}),g.jsx(Ns,{className:Ee("size-4",(i==null?void 0:i.id)===V.id?"opacity-100":"opacity-0")}),g.jsxs(kC,{children:[g.jsx(EC,{asChild:!0,children:g.jsxs("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:P8,children:[g.jsx(Hx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Workspace actions"})]})}),g.jsx(AC,{align:"end",children:g.jsxs(Nu,{onClick:$=>{$.stopPropagation(),w(V)},className:"text-destructive focus:text-destructive",children:[g.jsx(gc,{className:"size-4"}),"Delete workspace"]})})]})]})]},V.id),e[19]=i==null?void 0:i.id,e[20]=a,e[21]=o,e[22]=d,e[23]=X):X=e[23],R=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]=R}else R=e[18];let j;e[24]!==R?(j=g.jsx(Hu,{heading:"Workspaces",children:R}),e[24]=R,e[25]=j):j=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(zC,{}),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 q;e[29]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(mc,{className:"size-4","data-icon":"inline-start"}),e[29]=q):q=e[29];let U;e[30]!==I?(U=g.jsxs(sc,{onSelect:I,children:[q,"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(Rs,{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(zh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(K1,{children:[A,g.jsxs(Y1,{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(Ih,{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]!==y||e[45]!==ee?(B=g.jsx(a8,{open:y,onOpenChange:S,onSelect:ee,title:"Select Workspace Folder"}),e[44]=y,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(qg,{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 P8(t){return t.stopPropagation()}function F8(t){const e=ve.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(Oa,{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 y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(Px,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[3]=y):y=e[3];let S;e[4]!==o||e[5]!==h?(S=g.jsx(Q1,{asChild:!0,children:g.jsxs(Fe,{variant:"outline",role:"combobox","aria-expanded":o,"aria-label":"Select server",className:"w-full justify-between h-9",children:[h,y]})}),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(IC,{placeholder:"Search server..."}),e[7]=C):C=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(X1,{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 R;e[14]!==(a==null?void 0:a.id)||e[15]!==i||e[16]!==d?(R=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(Oa,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:j.name})]}),g.jsx(Ns,{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]=R):R=e[17],v=u.map(R),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 _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(zC,{}),e[20]=_):_=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(zh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(K1,{children:[C,g.jsxs(Y1,{className:"max-h-[50vh] overflow-y-auto",children:[w,b,_,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(Ih,{open:o,onOpenChange:l,children:[S,A]}),e[29]=o,e[30]=A,e[31]=S,e[32]=M):M=e[32],M}const tg=640,ng=1300;function ud(){const t=ve.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: ${tg-1}px)`),u=()=>{n(window.innerWidth<tg)};return l.addEventListener("change",u),n(window.innerWidth<tg),()=>l.removeEventListener("change",u)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function H8(){const t=ve.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 Do(t){const e=ve.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(zD,{"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 Bh(t){const e=ve.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(g1,{"data-slot":"sheet",...n}),e[2]=n,e[3]=i):i=e[3],i}function U8(t){const e=ve.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(ER,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function $8(t){const e=ve.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(v1,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function q8(t){const e=ve.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(_1,{"data-slot":"sheet-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ph(t){const e=ve.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(q8,{}),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 y;e[10]!==d?(y=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]=y):y=e[11];const S=y;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(hh,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(Fe,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[g.jsx(Ts,{}),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($8,{children:[p,g.jsxs(y1,{"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 Fh(t){const e=ve.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 Hh(t){const e=ve.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(LS,{"data-slot":"sheet-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function V8(t){const e=ve.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(IS,{"data-slot":"sheet-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Yf(t){const e=ve.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(sM,{"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=ve.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(oM,{"data-slot":"tooltip",...n}),e[2]=n,e[3]=i):i=e[3],i}function $u(t){const e=ve.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(aM,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function qu(t){const e=ve.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(uM,{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(lM,{children:g.jsxs(cM,{"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 W8="sidebar_state",G8=3600*24*7,K8="16rem",Y8="18rem",X8="3rem",BC=D.createContext(null);function dd(){const t=D.useContext(BC);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Q8(t){const e=ve.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,y]=D.useState(!1),[S,C]=D.useState(f),w=o!=null?o:S;let v;e[8]!==w||e[9]!==u?(v=q=>{const U=typeof q=="function"?q(w):q;u?u(U):C(U),document.cookie=`${W8}=${U}; path=/; max-age=${G8}`},e[8]=w,e[9]=u,e[10]=v):v=e[10];const b=v;let _;e[11]!==p||e[12]!==b?(_=()=>p?y(J8):b(Z8),e[11]=p,e[12]=b,e[13]=_):_=e[13];const x=_,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:y,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":K8,"--sidebar-width-icon":X8,...a},e[21]=a,e[22]=M):M=e[22];const R=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]!==R||e[28]!==j?(O=g.jsx("div",{"data-slot":"sidebar-wrapper",style:R,className:j,...l,children:n}),e[25]=n,e[26]=l,e[27]=R,e[28]=j,e[29]=O):O=e[29];let I;return e[30]!==A||e[31]!==O?(I=g.jsx(BC.Provider,{value:A,children:O}),e[30]=A,e[31]=O,e[32]=I):I=e[32],I}function Z8(t){return!t}function J8(t){return!t}function ej(t){const e=ve.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:y,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(y){let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={"--sidebar-width":Y8},e[14]=O):O=e[14];let I;e[15]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsxs(Fh,{className:"sr-only",children:[g.jsx(Hh,{children:"Sidebar"}),g.jsx(V8,{children:"Displays the mobile sidebar."})]}),e[15]=I):I=e[15];let q;e[16]!==n?(q=g.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[16]=n,e[17]=q):q=e[17];let U;e[18]!==o||e[19]!==f||e[20]!==q?(U=g.jsxs(Ph,{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,q]}),e[18]=o,e[19]=f,e[20]=q,e[21]=U):U=e[21];let W;return e[22]!==C||e[23]!==l||e[24]!==w||e[25]!==U?(W=g.jsx(Bh,{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 _;e[27]!==b?(_=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]=_):_=e[28];let x;e[29]!==_?(x=g.jsx("div",{"data-slot":"sidebar-gap",className:_}),e[29]=_,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 R;e[37]!==l||e[38]!==f||e[39]!==M||e[40]!==N?(R=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]=R):R=e[41];let j;return e[42]!==f||e[43]!==S||e[44]!==R||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,R]}),e[42]=f,e[43]=S,e[44]=R,e[45]=v,e[46]=x,e[47]=p,e[48]=j):j=e[48],j}function Eb(t){const e=ve.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(G4,{}),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(Fe,{"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 tj(t){const e=ve.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 nj(t){const e=ve.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 rj(t){const e=ve.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(Do,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const ij=D.forwardRef((t,e)=>{const n=ve.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=ve.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=ve.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=ve.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 tc(t){const e=ve.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 ja(t){const e=ve.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 sj=_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=ve.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,y=a===void 0?"default":a,S=f?Xu:"button",{isMobile:C,state:w}=dd();let v;e[8]!==n||e[9]!==y||e[10]!==h?(v=Ee(sj({variant:h,size:y}),n),e[8]=n,e[9]=y,e[10]=h,e[11]=v):v=e[11];let b;e[12]!==S||e[13]!==p||e[14]!==i||e[15]!==y||e[16]!==v?(b=g.jsx(S,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":y,"data-active":p,className:v,...i}),e[12]=S,e[13]=p,e[14]=i,e[15]=y,e[16]=v,e[17]=b):b=e[17];const _=b;if(!d)return _;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]!==_?(x=g.jsx($u,{asChild:!0,children:_}),e[20]=_,e[21]=x):x=e[21];const k=w!=="collapsed"||C;let N;e[22]!==k||e[23]!==d?(N=g.jsx(qu,{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 oj(t){const e=ve.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 aj(t){const e=ve.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 Io(t){const e=ve.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(pA,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=i):i=e[3],i}function zo(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(oS,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Bo(t){const e=ve.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(aS,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=i):i=e[3],i}function lj(t,e){const n=ve.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 Ab=ni.memo(function(e){const n=ve.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(EC,{asChild:!0,children:g.jsxs(oj,{showOnHover:!0,children:[g.jsx(Hx,{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(X4,{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 y;n[5]!==i||n[6]!==a||n[7]!==d||n[8]!==u?(y=i?g.jsxs(g.Fragment,{children:[g.jsxs(Nu,{onClick:u,children:[g.jsx(qx,{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(Ts,{className:"size-4"}),"Archive"]}),n[5]=i,n[6]=a,n[7]=d,n[8]=u,n[9]=y):y=n[9];let S;return n[10]!==h||n[11]!==y?(S=g.jsxs(kC,{children:[f,g.jsxs(AC,{align:"end",children:[h,y]})]}),n[10]=h,n[11]=y,n[12]=S):S=n[12],S}),Rb=ni.memo(function(e){const n=ve.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(Pr,{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(oh,{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($x,{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}),Gg=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[y,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]),_=b.length>0,x=e.status==="closed",k=D.useRef(!1);D.useEffect(()=>{y&&v.current?k.current||(v.current.focus(),v.current.select(),k.current=!0):k.current=!1},[y]),D.useEffect(()=>{y||w(e.title||"")},[y,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||"")},R=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),q=O||e.subagentStatus==="running"||!!e.runningAt,{isFlashing:U}=lj(e.id,q);return _?g.jsx(Yf,{delayDuration:300,children:g.jsx(Io,{defaultOpen:i||j,className:"group/collapsible",children:g.jsxs(ja,{children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx(zo,{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(Si,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),y?g.jsx("input",{ref:v,type:"text",value:C,onChange:W=>w(W.target.value),onKeyDown:R,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(Rb,{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(qu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:y,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]}),g.jsx(Bo,{children:g.jsx(aj,{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(ja,{children:g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:"shrink-0 size-7 p-1"}),y?g.jsx("input",{ref:v,type:"text",value:C,onChange:W=>w(W.target.value),onKeyDown:R,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(Rb,{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(qu,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:y,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]})})})}),cj=_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 Yn(t){const e=ve.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(cj({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 uj=ni.memo(function(e){const n=ve.c(45),{allSessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,favoritedWorkspaceIds:d,workspaces:f,activeWorkspace:p,onSelectWorkspace:h,onResumeSession:y,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRenameSession:v,onCreateSessionInWorkspace:b,connected:_}=e;let x;if(n[0]!==d||n[1]!==f){const j=new Map(f.map(dj));x=d.map(O=>j.get(O)).filter(fj),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(hj);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]!==_||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]!==y||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]!==_||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]!==y||n[38]!==h||n[39]!==a||n[40]!==u||n[41]!==A?(j=O=>{const I=O.id===(p==null?void 0:p.id),q=(o==null?void 0:o.workspaceId)===O.id,U=A.get(O.id)||[];return g.jsx(Io,{defaultOpen:I,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(zo,{className:"flex items-center justify-between w-full",onClick:()=>h(O),children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),O.isVirtual?g.jsx(kg,{className:"size-3.5"}):g.jsx(Rs,{className:"size-3.5"}),g.jsx("span",{className:q?"truncate text-sidebar-foreground font-medium":"truncate",children:O.name})]}),g.jsx(Yn,{variant:"secondary",children:U.length})]})}),g.jsx(Bo,{children:g.jsxs(Zf,{children:[g.jsx(tc,{children:g.jsx(ja,{children:g.jsxs(oc,{onClick:()=>b(O.id),disabled:!_,className:"w-full",children:[g.jsx(mc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),g.jsx(rj,{}),g.jsx(tc,{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(Gg,{session:W,allSessions:i,isActive:(o==null?void 0:o.id)===W.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:y,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]=_,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]=y,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]=_,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]=y,n[21]=h,n[22]=a,n[23]=u,n[24]=A,n[25]=M}else M=n[25];let R;return n[43]!==M?(R=g.jsx(g.Fragment,{children:M}),n[43]=M,n[44]=R):R=n[44],R});function dj(t){return[t.id,t]}function fj(t){return t!==void 0}function hj(t,e){return new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}const pj=D.forwardRef((t,e)=>{const n=ve.c(92),{sessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,connected:d,workspaces:f,activeWorkspace:p,allSessions:h,viewMode:y,favoritedWorkspaceIds:S,onCreateSession:C,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRenameSession:x,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,onDeleteWorkspace:M,onCreateSessionInWorkspace:R,onOpenSettings:j,onOpenMCP:O,onOpenAddServer:I,onServerSwitch:q,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 mt;const ke=ee.current;if(!ke)return;const He=Array.from(ke.querySelectorAll('[data-sidebar="menu-button"]'));if(He.length===0){ke.focus();return}const ut=He.find(Kt=>Kt.getAttribute("data-session-id")===B.current);ut?ut.focus():(mt=He[0])==null||mt.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,nn,Qt,Rn,on;const He=ee.current;if(!He)return;const ut=document.activeElement;if(ut instanceof HTMLInputElement||ut instanceof HTMLTextAreaElement||ut instanceof HTMLElement&&ut.contentEditable==="true")return;const mt=Array.from(He.querySelectorAll('[data-sidebar="menu-button"]')),Kt=mt.indexOf(document.activeElement);e:switch(ke.key){case"ArrowDown":{ke.preventDefault();const Wt=Kt<mt.length-1?Kt+1:0;(Ut=mt[Wt])==null||Ut.focus();break e}case"ArrowUp":{ke.preventDefault();const Wt=Kt>0?Kt-1:mt.length-1;(nn=mt[Wt])==null||nn.focus();break e}case"ArrowRight":{const Wt=(Qt=document.activeElement)==null?void 0:Qt.parentElement;if(!Wt)break e;const an=Wt.querySelector('button[aria-label="Toggle child sessions"]');if(!an)break e;const ln=Wt.closest("[data-state]");(ln==null?void 0:ln.dataset.state)==="closed"&&(ke.preventDefault(),an.click());break e}case"ArrowLeft":{const Wt=(Rn=document.activeElement)==null?void 0:Rn.parentElement;if(!Wt)break e;const an=Wt.querySelector('button[aria-label="Toggle child sessions"]');if(!an)break e;const ln=Wt.closest("[data-state]");(ln==null?void 0:ln.dataset.state)==="open"&&(ke.preventDefault(),an.click());break e}case"Enter":{document.activeElement instanceof HTMLButtonElement&&document.activeElement.click();break e}case"Escape":ke.preventDefault(),(on=document.activeElement)==null||on.blur(),U==null||U()}},n[6]=U,n[7]=X):X=n[7];const V=X;let $,ne;if(n[8]!==i){const ke=i.filter(mj);$=ke.filter(gj),ne=ke.filter(vj),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(He=>He.workspaceId===ke&&He.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,He)=>{if(!Z)return;const ut=W.find(mt=>mt.workspaceId===ke&&mt.serverId===Z.id);ut?G(ut.id):K(Z.id,Z.name,ke,He)},n[17]=Z,n[18]=K,n[19]=W,n[20]=G,n[21]=je):je=n[21];const Pe=je;let Te;n[22]!==I||n[23]!==q?(Te=g.jsx(F8,{onOpenAddServer:I,onServerSwitch:q}),n[22]=I,n[23]=q,n[24]=Te):Te=n[24];let tt;n[25]!==p||n[26]!==Pe||n[27]!==Re||n[28]!==A||n[29]!==N||n[30]!==M||n[31]!==k||n[32]!==y||n[33]!==f?(tt=y!=="overview"&&g.jsx(B8,{workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,isWorkspaceFavorited:Re,onToggleFavorite:Pe,onDeleteWorkspace:M}),n[25]=p,n[26]=Pe,n[27]=Re,n[28]=A,n[29]=N,n[30]=M,n[31]=k,n[32]=y,n[33]=f,n[34]=tt):tt=n[34];let it;n[35]!==Te||n[36]!==tt?(it=g.jsxs("div",{className:"p-2 space-y-2",children:[Te,tt]}),n[35]=Te,n[36]=tt,n[37]=it):it=n[37];let ct;n[38]!==d||n[39]!==C||n[40]!==y?(ct=y!=="overview"&&g.jsx(tc,{children:g.jsx(ja,{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]=y,n[41]=ct):ct=n[41];let ot;n[42]!==it||n[43]!==ct?(ot=g.jsxs(tj,{children:[it,ct]}),n[42]=it,n[43]=ct,n[44]=ot):ot=n[44];let pt;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]!==R||n[55]!==_||n[56]!==x||n[57]!==b||n[58]!==w||n[59]!==k||n[60]!==a||n[61]!==i||n[62]!==u||n[63]!==y||n[64]!==f?(pt=y==="overview"?g.jsx(uj,{allSessions:h,currentSession:o,currentSessionId:l,streamingSessionIds:u,favoritedWorkspaceIds:S,workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRenameSession:x,onCreateSessionInWorkspace:R,connected:d,pendingPermissions:a}):g.jsxs(g.Fragment,{children:[ae.length>0&&g.jsx(Io,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(zo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),g.jsx(Yn,{variant:"secondary",children:ae.length})]})}),g.jsx(Bo,{children:g.jsx(Zf,{children:g.jsx(tc,{children:ae.map(ke=>g.jsx(Gg,{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:_,onRename:x},ke.id))})})})]})}),se.length>0&&g.jsx(Io,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Xf,{children:[g.jsx(Qf,{asChild:!0,children:g.jsxs(zo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),g.jsx(Yn,{variant:"secondary",children:se.length})]})}),g.jsx(Bo,{children:g.jsx(Zf,{children:g.jsx(tc,{children:se.map(ke=>g.jsx(Gg,{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:_,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]=R,n[55]=_,n[56]=x,n[57]=b,n[58]=w,n[59]=k,n[60]=a,n[61]=i,n[62]=u,n[63]=y,n[64]=f,n[65]=pt):pt=n[65];let Ze;n[66]!==V||n[67]!==pt?(Ze=g.jsx(ij,{ref:ee,tabIndex:-1,onKeyDown:V,className:"outline-none",children:pt}),n[66]=V,n[67]=pt,n[68]=Ze):Ze=n[68];let Je;n[69]!==d?(Je=d?g.jsx(T5,{className:"size-3.5 text-success"}):g.jsx(Yx,{className:"size-3.5 text-destructive"}),n[69]=d,n[70]=Je):Je=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]!==Je||n[74]!==de?(xe=g.jsx(ja,{children:g.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[Je,de]})}),n[73]=Je,n[74]=de,n[75]=xe):xe=n[75];let _e,Ne;n[76]===Symbol.for("react.memo_cache_sentinel")?(_e=g.jsx(Oa,{className:"size-4","data-icon":"inline-start"}),Ne=g.jsx("span",{children:"MCP Servers"}),n[76]=_e,n[77]=Ne):(_e=n[76],Ne=n[77]);let Le;n[78]!==O?(Le=g.jsx(ja,{children:g.jsxs(oc,{onClick:O,children:[_e,Ne]})}),n[78]=O,n[79]=Le):Le=n[79];let $e,Ie;n[80]===Symbol.for("react.memo_cache_sentinel")?($e=g.jsx(Vx,{className:"size-4","data-icon":"inline-start"}),Ie=g.jsx("span",{children:"Settings"}),n[80]=$e,n[81]=Ie):($e=n[80],Ie=n[81]);let Ve;n[82]!==j?(Ve=g.jsx(ja,{children:g.jsx("div",{className:"flex items-center gap-1",children:g.jsxs(oc,{onClick:j,children:[$e,Ie]})})}),n[82]=j,n[83]=Ve):Ve=n[83];let _t;n[84]!==xe||n[85]!==Le||n[86]!==Ve?(_t=g.jsx(nj,{className:"pb-4",children:g.jsxs(tc,{children:[xe,Le,Ve]})}),n[84]=xe,n[85]=Le,n[86]=Ve,n[87]=_t):_t=n[87];let dt;return n[88]!==ot||n[89]!==Ze||n[90]!==_t?(dt=g.jsxs(ej,{collapsible:"offcanvas",children:[ot,Ze,_t]}),n[88]=ot,n[89]=Ze,n[90]=_t,n[91]=dt):dt=n[91],dt});function mj(t){return!t.parentId}function gj(t){return t.status==="active"}function vj(t){return t.status==="closed"}const _j={".ts":{icon:$i,color:"text-blue-500"},".tsx":{icon:$i,color:"text-blue-500"},".js":{icon:$i,color:"text-yellow-500"},".jsx":{icon:$i,color:"text-yellow-500"},".json":{icon:$i,color:"text-yellow-600"},".md":{icon:$i,color:"text-gray-500"},".css":{icon:$i,color:"text-purple-500"},".html":{icon:$i,color:"text-orange-500"}};function PC({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,y]=D.useState([]),[S,C]=D.useState(!1),[w,v]=D.useState(!1),b=n?`${n}/${t.path}`:t.path,_=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();y(O.files||[]),v(!0)}catch(j){console.error("Failed to load children:",j)}finally{C(!1)}}},k=j=>{p(j),j&&_&&x()},N=()=>{!_&&o&&o({...t,path:b})},A=t.extension?_j[t.extension]:null,M=_?f?Ag:Rs:(A==null?void 0:A.icon)||$i,R=_?"text-amber-500":(A==null?void 0:A.color)||"text-muted-foreground";return _?g.jsxs(Io,{open:f,onOpenChange:k,children:[g.jsx(zo,{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(Pr,{className:"w-3 h-3 animate-spin shrink-0"}):g.jsx(Si,{className:Ee("w-3 h-3 shrink-0 transition-transform",f&&"rotate-90")}),g.jsx(M,{className:Ee("w-4 h-4 shrink-0",R)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}),g.jsx(Bo,{children:h.map(j=>g.jsx(PC,{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",R)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}function Tb({workspaceId:t,serverUrl:e,apiToken:n,onFileSelect:i,showHidden:o=!0}){const[l,u]=D.useState([]),[a,d]=D.useState(""),[f,p]=D.useState(!0),[h,y]=D.useState(null),{fetchWithAuth:S}=ad(),C=D.useCallback(async()=>{p(!0),y(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){y(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(Pr,{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(Fe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(nc,{className:"w-3 h-3"})})]}):l.length===0?g.jsxs("div",{className:"p-4 text-sm text-muted-foreground",children:["Empty workspace",g.jsx(Fe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(nc,{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(Fe,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:C,children:g.jsx(nc,{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(PC,{entry:w,workspaceId:t,parentPath:a,depth:0,onFileSelect:i,showHidden:o,serverUrl:e,apiToken:n},w.path))})})})]})}function yj(t){const e=ve.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[y,S]=D.useState(h),[C,w]=D.useState(!1),[v,b]=D.useState(i),{fetchWithAuth:_}=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]!==_||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 _(`/api/workspaces/${n}/files?search=${encodeURIComponent(v)}&showHidden=${p}`,{signal:G.signal},{serverUrl:d,token:f}).then(xj).then(Z=>{if(K!==x.current)return;const ee=Z.files||[];S(ee),u(ee)}).catch(bj).finally(()=>{K===x.current&&w(!1)}),()=>G.abort()},M=[n,v,u,p,_,d,f],e[4]=f,e[5]=v,e[6]=_,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(Pr,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}),e[14]=K):K=e[14],K}if(y.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 R;if(e[17]!==y||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(Rs,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):g.jsx($i,{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],R=y.map(K),e[17]=y,e[18]=l,e[19]=o,e[20]=R}else R=e[20];const j=y.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 q;e[26]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[26]=q):q=e[26];let U;e[27]!==y.length||e[28]!==j?(U=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[y.length," result",j," •",O," navigate",I," select",q," close"]}),e[27]=y.length,e[28]=j,e[29]=U):U=e[29];let W;return e[30]!==U||e[31]!==R?(W=g.jsxs("div",{className:"p-1",children:[R,U]}),e[30]=U,e[31]=R,e[32]=W):W=e[32],W}function bj(t){t.name!=="AbortError"&&console.error("File search failed:",t)}function xj(t){return t.json()}function Sj(t){const e=ve.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=q=>!q&&u(),e[0]=u,e[1]=k):k=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(Fh,{className:"sr-only",children:g.jsx(Hh,{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(Ts,{className:"w-4 h-4"}),e[4]=M):M=e[4];let R;e[5]!==u?(R=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[A,g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:u,children:M})]}),e[5]=u,e[6]=R):R=e[6];let j;e[7]!==o||e[8]!==i||e[9]!==n?(j=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[7]=o,e[8]=i,e[9]=n,e[10]=j):j=e[10];let O;e[11]!==R||e[12]!==j?(O=g.jsxs(Ph,{side:"right",className:"w-72 p-0 bg-sidebar [&>button]:hidden",children:[N,R,j]}),e[11]=R,e[12]=j,e[13]=O):O=e[13];let I;return e[14]!==l||e[15]!==k||e[16]!==O?(I=g.jsx(Bh,{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 y;e[22]!==h?(y=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]=y):y=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(Ts,{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(Fe,{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(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[29]=o,e[30]=i,e[31]=n,e[32]=b):b=e[32];let _;e[33]!==b||e[34]!==y||e[35]!==v?(_=g.jsxs("div",{className:y,style:S,children:[v,b]}),e[33]=b,e[34]=y,e[35]=v,e[36]=_):_=e[36];let x;return e[37]!==_||e[38]!==p?(x=g.jsxs(g.Fragment,{children:[p,_]}),e[37]=_,e[38]=p,e[39]=x):x=e[39],x}var rg={exports:{}},Nb;function wj(){return Nb||(Nb=1,(function(t,e){(function(n,i){t.exports=i()})(globalThis,(()=>(()=>{var n={4567:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=d(9042),y=d(9924),S=d(844),C=d(4725),w=d(2585),v=d(3656);let b=a.AccessibilityManager=class extends S.Disposable{constructor(_,x,k,N){super(),this._terminal=_,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 y.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(_){for(let x=0;x<_;x++)this._handleChar(" ")}_handleChar(_){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==_&&(this._charsToAnnounce+=_):this._charsToAnnounce+=_,_===`
513
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(_){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(_)||this._charsToConsume.push(_)}_refreshRows(_,x){this._liveRegionDebouncer.refresh(_,x,this._terminal.rows)}_renderRows(_,x){const k=this._terminal.buffer,N=k.lines.length.toString();for(let A=_;A<=x;A++){const M=k.lines.get(k.ydisp+A),R=[],j=(M==null?void 0:M.translateToString(!0,void 0,void 0,R))||"",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,R)),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(_,x){const k=_.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||_.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 R=this._createAccessibilityTreeNode();this._rowElements.unshift(R),this._rowContainer.insertAdjacentElement("afterbegin",R)}else{const R=this._createAccessibilityTreeNode();this._rowElements.push(R),this._rowContainer.appendChild(R)}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(),_.preventDefault(),_.stopImmediatePropagation()}_handleSelectionChange(){var j,O;if(this._rowElements.length===0)return;const _=document.getSelection();if(!_)return;if(_.isCollapsed)return void(this._rowContainer.contains(_.anchorNode)&&this._terminal.clearSelection());if(!_.anchorNode||!_.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:_.anchorNode,offset:_.anchorOffset},k={node:_.focusNode,offset:_.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:q})=>{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=q<K.length?K[q]:K.slice(-1)[0]+1;return G>=this._terminal.cols&&(++W,G=0),{row:W,column:G}},M=A(x),R=A(k);if(M&&R){if(M.row>R.row||M.row===R.row&&M.column>=R.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(R.row-M.row)*this._terminal.cols-M.column+R.column)}}_handleResize(_){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>_;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const _=this._coreBrowserService.mainDocument.createElement("div");return _.setAttribute("role","listitem"),_.tabIndex=-1,this._refreshRowDimensions(_),_}_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 _=0;_<this._terminal.rows;_++)this._refreshRowDimensions(this._rowElements[_])}}_refreshRowDimensions(_){_.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(y){return y.replace(/\r?\n/g,"\r")}function f(y,S){return S?"\x1B[200~"+y+"\x1B[201~":y}function p(y,S,C,w){y=f(y=d(y),C.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(y,!0),S.value=""}function h(y,S,C){const w=C.getBoundingClientRect(),v=y.clientX-w.left-10,b=y.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(y,S){y.clipboardData&&y.clipboardData.setData("text/plain",S.selectionText),y.preventDefault()},a.handlePasteEvent=function(y,S,C,w){y.stopPropagation(),y.clipboardData&&p(y.clipboardData.getData("text/plain"),S,C,w)},a.paste=p,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(y,S,C,w,v){h(y,S,C),v&&w.rightClickSelect(y),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,y){this._css.set(p,h,y)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,y){this._color.set(p,h,y)}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 y=!1;return{dispose:()=>{y||(y=!0,d.removeEventListener(f,p,h))}}}},3551:function(u,a,d){var f=this&&this.__decorate||function(b,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=d(3656),y=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,_,x,k,N){super(),this._element=b,this._mouseService=_,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 y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.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 _=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!_)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&&_.x===this._lastBufferCell.x&&_.y===this._lastBufferCell.y||(this._handleHover(_),this._lastBufferCell=_)}_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,_){var k,N;this._activeProviderReplies&&_||((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())_?(N=this._activeProviderReplies)!=null&&N.get(A)&&(x=this._checkLinkProviderResult(A,b,x)):M.provideLinks(b.y,(R=>{var O,I;if(this._isMouseOut)return;const j=R==null?void 0:R.map((q=>({link:q})));(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,_){const x=new Set;for(let k=0;k<_.size;k++){const N=_.get(k);if(N)for(let A=0;A<N.length;A++){const M=N[A],R=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=R;O<=j;O++){if(x.has(O)){N.splice(A--,1);break}x.add(O)}}}}_checkLinkProviderResult(b,_,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((R=>this._linkAtPosition(R.link,_)));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 R=(A=this._activeProviderReplies.get(M))==null?void 0:A.find((j=>this._linkAtPosition(j.link,_)));if(R){x=!0,this._handleNewLink(R);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const _=this._positionFromMouseEvent(b,this._element,this._mouseService);_&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,_)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,_){this._currentLink&&this._lastMouseEvent&&(!b||!_||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.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 _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._linkAtPosition(b.link,_)&&(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,_,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),_.hover&&_.hover(x,_.text)}_fireUnderlineEvent(b,_){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);(_?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,_,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),_.leave&&_.leave(x,_.text)}_linkAtPosition(b,_){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*this._bufferService.cols+_.x;return x<=N&&N<=k}_positionFromMouseEvent(b,_,x){const k=x.getCoords(b,_,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,_,x,k,N){return{x1:b,y1:_,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,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);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,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=d(511),y=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 _=[],x=this._optionsService.rawOptions.linkHandler,k=new h.CellData,N=b.getTrimmedLength();let A=-1,M=-1,R=!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}R=k.extended.urlId!==A}else M!==-1&&(R=!0);if(R||M!==-1&&O===N-1){const I=(j=this._oscLinkService.getLinkData(A))==null?void 0:j.uri;if(I){const q={start:{x:M+1,y:w},end:{x:O+(R||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||_.push({text:I,range:q,activate:(W,K)=>x?x.activate(W,K,q):C(0,K),hover:(W,K)=>{var G;return(G=x==null?void 0:x.hover)==null?void 0:G.call(x,W,K,q)},leave:(W,K)=>{var G;return(G=x==null?void 0:x.leave)==null?void 0:G.call(x,W,K,q)}})}R=!1,k.hasExtendedAttrs()&&k.extended.urlId?(M=O,A=k.extended.urlId):(M=-1,A=-1)}}v(_)}};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,y.IBufferService),p(1,y.IOptionsService),p(2,y.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),y=d(9042),S=d(3730),C=d(1680),w=d(3107),v=d(5744),b=d(2950),_=d(1296),x=d(428),k=d(4269),N=d(5114),A=d(8934),M=d(3230),R=d(9312),j=d(4725),O=d(6731),I=d(8055),q=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 q.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(V={}){super(V),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(V){if(this._themeService)for(const $ of V){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(V){V?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(V){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var V;return(V=this.textarea)==null?void 0:V.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 V=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(V);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 V=$=>(0,f.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",V)),this.register((0,p.addDisposableDomListener)(this.element,"paste",V)),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",(V=>this._keyUp(V)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(V=>this._keyDown(V)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(V=>this._keyPress(V)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(V=>this._compositionHelper.compositionupdate(V)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(V=>this._inputEvent(V)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(V){var ne,ie,ae;if(!V)throw new Error("Terminal requires a parent element.");if(V.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=V.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"),V.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",y.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=V.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(R.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(_.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const V=this,$=this.element;function ne(se){const ye=V._mouseService.getMouseReportCoords(se,V.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(V._customWheelEventHandler&&V._customWheelEventHandler(se)===!1||V.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)&&V.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 Pe=0;Pe<Math.abs(ye);Pe++)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(V,$){var ne;(ne=this._renderService)==null||ne.refreshRows(V,$)}updateCursorStyle(V){var $;($=this._selectionService)!=null&&$.shouldColumnSelect(V)?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(V,$,ne=0){var ie;ne===1?(super.scrollLines(V,$,ne),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(V)}paste(V){(0,f.paste)(V,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(V){this._customKeyEventHandler=V}attachCustomWheelEventHandler(V){this._customWheelEventHandler=V}registerLinkProvider(V){return this._linkProviderService.registerLinkProvider(V)}registerCharacterJoiner(V){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(V);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(V){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(V)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(V){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+V)}registerDecoration(V){return this._decorationService.registerDecoration(V)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(V,$,ne){this._selectionService.setSelection(V,$,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 V;(V=this._selectionService)==null||V.clearSelection()}selectAll(){var V;(V=this._selectionService)==null||V.selectAll()}selectLines(V,$){var ne;(ne=this._selectionService)==null||ne.selectLines(V,$)}_keyDown(V){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(V)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&V.altKey;if(!$&&!this._compositionHelper.keydown(V))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||V.key!=="Dead"&&V.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,ee.evaluateKeyboardEvent)(V,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(V),ne.type===3||ne.type===2){const ie=this.rows-1;return this.scrollLines(ne.type===2?-ie:ie),this.cancel(V,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,V)||(ne.cancel&&this.cancel(V,!0),!ne.key||!!(V.key&&!V.ctrlKey&&!V.altKey&&!V.metaKey&&V.key.length===1&&V.key.charCodeAt(0)>=65&&V.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:V}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||V.altKey||V.ctrlKey?this.cancel(V,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(V,$){const ne=V.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||V.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||V.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?ne:ne&&(!$.keyCode||$.keyCode>47)}_keyUp(V){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(V)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(V)||this.focus(),this.updateCursorStyle(V),this._keyPressHandled=!1)}_keyPress(V){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(V)===!1)return!1;if(this.cancel(V),V.charCode)$=V.charCode;else if(V.which===null||V.which===void 0)$=V.keyCode;else{if(V.which===0||V.charCode===0)return!1;$=V.which}return!(!$||(V.altKey||V.ctrlKey||V.metaKey)&&!this._isThirdLevelShift(this.browser,V)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:V}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(V){if(V.data&&V.inputType==="insertText"&&(!V.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=V.data;return this.coreService.triggerDataEvent($,!0),this.cancel(V),!0}return!1}resize(V,$){V!==this.cols||$!==this.rows?super.resize(V,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(V,$){var ne,ie;(ne=this._charSizeService)==null||ne.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var V;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}),(V=this.viewport)==null||V.reset(),this.refresh(0,this.rows-1)}}reset(){var $,ne;this.options.rows=this.rows,this.options.cols=this.cols;const V=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=V,this.refresh(0,this.rows-1)}clearTextureAtlas(){var V;(V=this._renderService)==null||V.clearTextureAtlas()}_reportFocus(){var V;(V=this.element)!=null&&V.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(V){if(this._renderService)switch(V){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(V,$){if(this.options.cancelEvents||$)return V.preventDefault(),V.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 y=h-this._lastRefreshMs,S=this._debounceThresholdMS-y;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,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=d(3656),y=d(4725),S=d(8460),C=d(844),w=d(2585);let v=a.Viewport=class extends C.Disposable{constructor(b,_,x,k,N,A,M,R){super(),this._viewportElement=b,this._scrollArea=_,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(R.colors),this.register(R.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 _=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==_&&(this._lastRecordedBufferHeight=_,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 _=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:_,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,_){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(_<0&&this._viewportElement.scrollTop!==0||_>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)}handleWheel(b){const _=this._getPixelsScrolled(b);return _!==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+_:this._smoothScrollState.target+=_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=_,this._bubbleScroll(b,_))}scrollLines(b){if(b!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const _=b*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+_,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 _=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?_*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._currentRowHeight*this._bufferService.rows),_}getBufferElements(b,_){var R;let x,k="";const N=[],A=_!=null?_: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=(R=M.get(j+1))==null?void 0:R.isWrapped;if(k+=O.translateToString(!I),!I||j===M.length-1){const q=document.createElement("div");q.textContent=k,N.push(q),k.length>0&&(x=q),k=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let _=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(_/=this._currentRowHeight+0,this._wheelPartialScroll+=_,_=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._bufferService.rows),_}_applyScrollModifier(b,_){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&_.altKey||x==="ctrl"&&_.ctrlKey||x==="shift"&&_.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 _=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,_!==0&&(this._viewportElement.scrollTop+=_,this._bubbleScroll(b,_))}};a.Viewport=v=f([p(2,w.IBufferService),p(3,w.IOptionsService),p(4,y.ICharSizeService),p(5,y.IRenderService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],v)},3107:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);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,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=d(4725),y=d(844),S=d(2585);let C=a.BufferDecorationRenderer=class extends y.Disposable{constructor(w,v,b,_,x){super(),this._screenElement=w,this._bufferService=v,this._coreBrowserService=b,this._decorationService=_,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,y.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 _,x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((_=w==null?void 0:w.options)==null?void 0:_.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 _;if(!v)return;const b=(_=w.options.x)!=null?_: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,R=arguments.length,j=R<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=(R<3?M(j):R>3?M(k,N,j):M(k,N))||j);return R>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),y=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 _=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,k,N,A,M,R,j){var I;super(),this._viewportElement=x,this._screenElement=k,this._bufferService=N,this._decorationService=A,this._renderService=M,this._optionsService=R,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 q;(q=this._canvas)==null||q.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const x=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);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=_=f([p(2,C.IBufferService),p(3,C.IDecorationService),p(4,y.IRenderService),p(5,C.IOptionsService),p(6,y.ICoreBrowserService)],_)},2950:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);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,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=d(4725),y=d(2585),S=d(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,v,b,_,x,k){this._textarea=w,this._compositionView=v,this._bufferService=b,this._optionsService=_,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,_=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=_+"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=_+"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,y.IBufferService),p(3,y.IOptionsService),p(4,y.ICoreService),p(5,h.IRenderService)],C)},9806:(u,a)=>{function d(f,p,h){const y=h.getBoundingClientRect(),S=f.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),w=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-y.left-C,p.clientY-y.top-w]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(f,p,h,y,S,C,w,v,b){if(!C)return;const _=d(f,p,h);return _?(_[0]=Math.ceil((_[0]+(b?w/2:0))/w),_[1]=Math.ceil(_[1]/v),_[0]=Math.min(Math.max(_[0],1),y+(b?1:0)),_[1]=Math.min(Math.max(_[1],1),S),_):void 0}},9504:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=d(2584);function p(v,b,_,x){const k=v-h(v,_),N=b-h(b,_),A=Math.abs(k-N)-(function(M,R,j){let O=0;const I=M-h(M,j),q=R-h(R,j);for(let U=0;U<Math.abs(I-q);U++){const W=y(M,R)==="A"?-1:1,K=j.buffer.lines.get(I+W*U);K!=null&&K.isWrapped&&O++}return O})(v,b,_);return w(A,C(y(v,b),x))}function h(v,b){let _=0,x=b.buffer.lines.get(v),k=x==null?void 0:x.isWrapped;for(;k&&v>=0&&v<b.rows;)_++,x=b.buffer.lines.get(--v),k=x==null?void 0:x.isWrapped;return _}function y(v,b){return v>b?"A":"B"}function S(v,b,_,x,k,N){let A=v,M=b,R="";for(;A!==_||M!==x;)A+=k?1:-1,k&&A>N.cols-1?(R+=N.buffer.translateBufferLineToString(M,!1,v,A),A=0,v=0,M++):!k&&A<0&&(R+=N.buffer.translateBufferLineToString(M,!1,0,v+1),A=N.cols-1,v=A,M--);return R+N.buffer.translateBufferLineToString(M,!1,v,A)}function C(v,b){const _=b?"O":"[";return f.C0.ESC+_+v}function w(v,b){v=Math.floor(v);let _="";for(let x=0;x<v;x++)_+=b;return _}a.moveToCellSequence=function(v,b,_,x){const k=_.buffer.x,N=_.buffer.y;if(!_.buffer.hasScrollback)return(function(R,j,O,I,q,U){return p(j,I,q,U).length===0?"":w(S(R,j,R,j-h(j,q),!1,q).length,C("D",U))})(k,N,0,b,_,x)+p(N,b,_,x)+(function(R,j,O,I,q,U){let W;W=p(j,I,q,U).length>0?I-h(I,q):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"})(R,j,O,I,q,U);return w(S(R,W,O,K,G==="C",q).length,C(G,U))})(k,N,v,b,_,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(R,j){return j.cols-R})(N>b?v:k,_)+(M-1)*_.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),y=d(2550),S=d(2223),C=d(6171),w=d(6052),v=d(4725),b=d(8055),_=d(8460),x=d(844),k=d(2585),N="xterm-dom-renderer-owner-",A="xterm-rows",M="xterm-fg-",R="xterm-bg-",j="xterm-focus",O="xterm-selection";let I=1,q=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 _.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 y.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} .${R}${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} .${R}${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 V=X+L.ydisp,$=this._rowElements[X],ne=L.lines.get(V);if(!$||!ne)break;$.replaceChildren(...this._rowFactory.createRow(ne,V,V===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=q=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)],q)},3787:function(u,a,d){var f=this&&this.__decorate||function(A,M,R,j){var O,I=arguments.length,q=I<3?M:j===null?j=Object.getOwnPropertyDescriptor(M,R):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(A,M,R,j);else for(var U=A.length-1;U>=0;U--)(O=A[U])&&(q=(I<3?O(q):I>3?O(M,R,q):O(M,R))||q);return I>3&&q&&Object.defineProperty(M,R,q),q},p=this&&this.__param||function(A,M){return function(R,j){M(R,j,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=d(2223),y=d(643),S=d(511),C=d(2585),w=d(8055),v=d(4725),b=d(4269),_=d(6171),x=d(3734);let k=a.DomRendererRowFactory=class{constructor(A,M,R,j,O,I,q){this._document=A,this._characterJoinerService=M,this._optionsService=R,this._coreBrowserService=j,this._coreService=O,this._decorationService=I,this._themeService=q,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,M,R){this._selectionStart=A,this._selectionEnd=M,this._columnSelectMode=R}createRow(A,M,R,j,O,I,q,U,W,K,G){const Z=[],ee=this._characterJoinerService.getJoinedCharacters(M),B=this._themeService.colors;let L,z=A.getNoBgTrimmedLength();R&&z<I+1&&(z=I+1);let H=0,F="",Q=0,te=0,X=0,V=!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,Pe=ye,Te=this._workCell;if(ee.length>0&&ye===ee[0][0]){je=!0;const Ie=ee.shift();Te=new b.JoinedCellData(this._workCell,A.translateToString(!0,Ie[0],Ie[1]),Ie[1]-Ie[0]),Pe=Ie[1]-1,Re=Te.getWidth()}const tt=this._isCellInSelection(ye,M),it=R&&ye===I,ct=se&&ye>=K&&ye<=G;let ot=!1;this._decorationService.forEachDecorationAtCell(ye,M,void 0,(Ie=>{ot=!0}));let pt=Te.getChars()||y.WHITESPACE_CELL_CHAR;if(pt===" "&&(Te.isUnderline()||Te.isOverline())&&(pt=" "),ie=Re*U-W.get(pt,Te.isBold(),Te.isItalic()),L){if(H&&(tt&&ne||!tt&&!ne&&Te.bg===Q)&&(tt&&ne&&B.selectionForeground||Te.fg===te)&&Te.extended.ext===X&&ct===V&&ie===$&&!it&&!je&&!ot){Te.isInvisible()?F+=y.WHITESPACE_CELL_CHAR:F+=pt,H++;continue}H&&(L.textContent=F),L=this._document.createElement("span"),H=0,F=""}else L=this._document.createElement("span");if(Q=Te.bg,te=Te.fg,X=Te.extended.ext,V=ct,$=ie,ne=tt,je&&I>=ye&&I<=Pe&&(I=ye),!this._coreService.isCursorHidden&&it&&this._coreService.isCursorInitialized){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)q&&ae.push("xterm-cursor-blink"),ae.push(j==="bar"?"xterm-cursor-bar":j==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ae.push("xterm-cursor-outline");break;case"block":ae.push("xterm-cursor-block");break;case"bar":ae.push("xterm-cursor-bar");break;case"underline":ae.push("xterm-cursor-underline")}}if(Te.isBold()&&ae.push("xterm-bold"),Te.isItalic()&&ae.push("xterm-italic"),Te.isDim()&&ae.push("xterm-dim"),F=Te.isInvisible()?y.WHITESPACE_CELL_CHAR:Te.getChars()||y.WHITESPACE_CELL_CHAR,Te.isUnderline()&&(ae.push(`xterm-underline-${Te.extended.underlineStyle}`),F===" "&&(F=" "),!Te.isUnderlineColorDefault()))if(Te.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(Te.getUnderlineColor()).join(",")})`;else{let Ie=Te.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Te.isBold()&&Ie<8&&(Ie+=8),L.style.textDecorationColor=B.ansi[Ie].css}Te.isOverline()&&(ae.push("xterm-overline"),F===" "&&(F=" ")),Te.isStrikethrough()&&ae.push("xterm-strikethrough"),ct&&(L.style.textDecoration="underline");let Ze=Te.getFgColor(),Je=Te.getFgColorMode(),ue=Te.getBgColor(),de=Te.getBgColorMode();const xe=!!Te.isInverse();if(xe){const Ie=Ze;Ze=ue,ue=Ie;const Ve=Je;Je=de,de=Ve}let _e,Ne,Le,$e=!1;switch(this._decorationService.forEachDecorationAtCell(ye,M,void 0,(Ie=>{Ie.options.layer!=="top"&&$e||(Ie.backgroundColorRGB&&(de=50331648,ue=Ie.backgroundColorRGB.rgba>>8&16777215,_e=Ie.backgroundColorRGB),Ie.foregroundColorRGB&&(Je=50331648,Ze=Ie.foregroundColorRGB.rgba>>8&16777215,Ne=Ie.foregroundColorRGB),$e=Ie.options.layer==="top")})),!$e&&tt&&(_e=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,ue=_e.rgba>>8&16777215,de=50331648,$e=!0,B.selectionForeground&&(Je=50331648,Ze=B.selectionForeground.rgba>>8&16777215,Ne=B.selectionForeground)),$e&&ae.push("xterm-decoration-top"),de){case 16777216:case 33554432:Le=B.ansi[ue],ae.push(`xterm-bg-${ue}`);break;case 50331648:Le=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?(Le=B.foreground,ae.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Le=B.background}switch(_e||Te.isDim()&&(_e=w.color.multiplyOpacity(Le,.5)),Je){case 16777216:case 33554432:Te.isBold()&&Ze<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ze+=8),this._applyMinimumContrast(L,Le,B.ansi[Ze],Te,_e,void 0)||ae.push(`xterm-fg-${Ze}`);break;case 50331648:const Ie=w.channels.toColor(Ze>>16&255,Ze>>8&255,255&Ze);this._applyMinimumContrast(L,Le,Ie,Te,_e,Ne)||this._addStyle(L,`color:#${N(Ze.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Le,B.foreground,Te,_e,Ne)||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=Pe}return L&&H&&(L.textContent=F),Z}_applyMinimumContrast(A,M,R,j,O,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,_.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const q=this._getContrastCache(j);let U;if(O||I||(U=q.getColor(M.rgba,R.rgba)),U===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);U=w.color.ensureContrastRatio(O||M,I||R,W),q.setColor((O||M).rgba,(I||R).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 R=this._selectionStart,j=this._selectionEnd;return!(!R||!j)&&(this._columnSelectMode?R[0]<=j[0]?A>=R[0]&&M>=R[1]&&A<j[0]&&M<=j[1]:A<R[0]&&M>=R[1]&&A>=j[0]&&M<=j[1]:M>R[1]&&M<j[1]||R[1]===j[1]&&M===R[1]&&A>=R[0]&&A<j[0]||R[1]<j[1]&&M===j[1]&&A<j[0]||R[1]<j[1]&&M===R[1]&&A>=R[0])}};function N(A,M,R){for(;A.length<R;)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 y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.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,y,S],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(y),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 y=d;f&&(y+="B"),p&&(y+="I");let S=this._holey.get(y);if(S===void 0){let C=0;f&&(C|=1),p&&(C|=2),S=this._measure(d,C),S>0&&this._holey.set(y,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,y,S){return h===1&&y>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,y=0){return(p-(2*Math.round(h)-y))%(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,y,S=!1){if(this.selectionStart=h,this.selectionEnd=y,!h||!y||h[0]===y[0]&&h[1]===y[1])return void this.clear();const C=p.buffers.active.ydisp,w=h[1]-C,v=y[1]-C,b=Math.max(w,0),_=Math.min(v,p.rows-1);b>=p.rows||_<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=w,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=_,this.startCol=h[0],this.endCol=y[0])}isCellSelected(p,h,y){return!!this.hasSelection&&(y-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&y>=this.viewportCappedStartRow&&h<this.endCol&&y<=this.viewportCappedEndRow:h<this.startCol&&y>=this.viewportCappedStartRow&&h>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===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(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=d(2585),y=d(8460),S=d(844);let C=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(_,x,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(_,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const _=this._measureStrategy.measure();_.width===this.width&&_.height===this.height||(this.width=_.width,this.height=_.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,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=d(3734),y=d(643),S=d(511),C=d(2585);class w extends h.AttributeData{constructor(_,x,k){super(),this.content=0,this.combinedData="",this.fg=_.fg,this.bg=_.bg,this.combinedData=x,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(_){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=w;let v=a.CharacterJoinerService=class FC{constructor(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(_){const x={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(x),x.id}deregister(_){for(let x=0;x<this._characterJoiners.length;x++)if(this._characterJoiners[x].id===_)return this._characterJoiners.splice(x,1),!0;return!1}getJoinedCharacters(_){if(this._characterJoiners.length===0)return[];const x=this._bufferService.buffer.lines.get(_);if(!x||x.length===0)return[];const k=[],N=x.translateToString(!0);let A=0,M=0,R=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 q=this._getJoinedRanges(N,R,M,x,A);for(let U=0;U<q.length;U++)k.push(q[U])}A=I,R=M,j=this._workCell.fg,O=this._workCell.bg}M+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const I=this._getJoinedRanges(N,R,M,x,A);for(let q=0;q<I.length;q++)k.push(I[q])}return k}_getJoinedRanges(_,x,k,N,A){const M=_.substring(x,k);let R=[];try{R=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++)FC._mergeRanges(R,O[I])}catch(O){console.error(O)}return this._stringRangesToCellRanges(R,N,A),R}_stringRangesToCellRanges(_,x,k){let N=0,A=!1,M=0,R=_[N];if(R){for(let j=k;j<this._bufferService.cols;j++){const O=x.getWidth(j),I=x.getString(j).length||y.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!A&&R[0]<=M&&(R[0]=j,A=!0),R[1]<=M){if(R[1]=j,R=_[++N],!R)break;R[0]<=M?(R[0]=j,A=!0):A=!1}M+=I}}R&&(R[1]=this._bufferService.cols)}}static _mergeRanges(_,x){let k=!1;for(let N=0;N<_.length;N++){const A=_[N];if(k){if(x[1]<=A[0])return _[N-1][1]=x[1],_;if(x[1]<=A[1])return _[N-1][1]=Math.max(x[1],A[1]),_.splice(N,1),_;_.splice(N,1),N--}else{if(x[1]<=A[0])return _.splice(N,0,x),_;if(x[1]<=A[1])return A[0]=Math.min(x[0],A[0]),_;x[0]<A[1]&&(A[0]=Math.min(x[0],A[0]),k=!0)}}return k?_[_.length-1][1]=x[1]:_.push(x),_}};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 y 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((_=>this._screenDprMonitor.setWindow(_)))),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=y;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(y){return this.linkProviders.push(y),{dispose:()=>{const S=this.linkProviders.indexOf(y);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 _,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--)(_=C[N])&&(k=(x<3?_(k):x>3?_(w,v,k):_(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),y=d(9806);let S=a.MouseService=class{constructor(C,w){this._renderService=C,this._charSizeService=w}getCoords(C,w,v,b,_){return(0,y.getCoords)(window,C,w,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,_)}getMouseReportCoords(C,w){const v=(0,y.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(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=d(6193),y=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(_,x,k,N,A,M,R,j){super(),this._rowCount=_,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)),R),this.register(this._renderDebouncer),this.register(R.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(R.window,x),this.register(R.onWindowChange((O=>this._registerIntersectionObserver(O,x))))}_registerIntersectionObserver(_,x){if("IntersectionObserver"in _){const k=new _.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});k.observe(x),this._observerDisposable.value=(0,C.toDisposable)((()=>k.disconnect()))}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,x,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,x,this._rowCount))}_renderRows(_,x){this._renderer.value&&(_=Math.min(_,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(_,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:_,end:x}),this._onRender.fire({start:_,end:x}),this._isNextRenderRedrawOnly=!0)}resize(_,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(_){this._renderer.value=_,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,x;this._renderer.value&&((x=(_=this._renderer.value).clearTextureAtlas)==null||x.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var k;return(k=this._renderer.value)==null?void 0:k.handleResize(_,x)})):this._renderer.value.handleResize(_,x),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)==null||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)==null||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)==null||_.handleFocus()}handleSelectionChanged(_,x,k){var N;this._selectionState.start=_,this._selectionState.end=x,this._selectionState.columnSelectMode=k,(N=this._renderer.value)==null||N.handleSelectionChanged(_,x,k)}handleCursorMove(){var _;(_=this._renderer.value)==null||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)==null||_.clear()}};a.RenderService=b=f([p(2,v.IOptionsService),p(3,y.ICharSizeService),p(4,v.IDecorationService),p(5,v.IBufferService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],b)},9312:function(u,a,d){var f=this&&this.__decorate||function(R,j,O,I){var q,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(R,j,O,I);else for(var K=R.length-1;K>=0;K--)(q=R[K])&&(W=(U<3?q(W):U>3?q(j,O,W):q(j,O))||W);return U>3&&W&&Object.defineProperty(j,O,W),W},p=this&&this.__param||function(R,j){return function(O,I){j(O,I,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=d(9806),y=d(9504),S=d(456),C=d(4725),w=d(8460),v=d(844),b=d(6114),_=d(4841),x=d(511),k=d(2585),N=" ",A=new RegExp(N,"g");let M=a.SelectionService=class extends v.Disposable{constructor(R,j,O,I,q,U,W,K,G){super(),this._element=R,this._screenElement=j,this._linkifier=O,this._bufferService=I,this._coreService=q,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 R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!R||!j||R[0]===j[0]&&R[1]===j[1])}get selectionText(){const R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!R||!j)return"";const O=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(R[0]===j[0])return"";const q=R[0]<j[0]?R[0]:j[0],U=R[0]<j[0]?j[0]:R[0];for(let W=R[1];W<=j[1];W++){const K=O.translateBufferLineToString(W,!0,q,U);I.push(K)}}else{const q=R[1]===j[1]?j[0]:void 0;I.push(O.translateBufferLineToString(R[1],!0,R[0],q));for(let U=R[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(R[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((q=>q.replace(A," "))).join(b.isWindows?`\r
516
- `:`
517
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(R){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&R&&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(R){const j=this._getMouseBufferCoords(R),O=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(O&&I&&j)&&this._areCoordsInSelection(j,O,I)}isCellInSelection(R,j){const O=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!O||!I)&&this._areCoordsInSelection([R,j],O,I)}_areCoordsInSelection(R,j,O){return R[1]>j[1]&&R[1]<O[1]||j[1]===O[1]&&R[1]===j[1]&&R[0]>=j[0]&&R[0]<O[0]||j[1]<O[1]&&R[1]===O[1]&&R[0]<O[0]||j[1]<O[1]&&R[1]===j[1]&&R[0]>=j[0]}_selectWordAtCursor(R,j){var q,U;const O=(U=(q=this._linkifier.currentLink)==null?void 0:q.link)==null?void 0:U.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,_.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(R);return!!I&&(this._selectWordAt(I,j),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(R,j){this._model.clearSelection(),R=Math.max(R,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,R],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()}_handleTrim(R){this._model.handleTrim(R)&&this.refresh()}_getMouseBufferCoords(R){const j=this._mouseService.getCoords(R,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j}_getMouseEventScrollAmount(R){let j=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,R,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(R){return b.isMac?R.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:R.shiftKey}handleMouseDown(R){if(this._mouseDownTimeStamp=R.timeStamp,(R.button!==2||!this.hasSelection)&&R.button===0){if(!this._enabled){if(!this.shouldForceSelection(R))return;R.stopPropagation()}R.preventDefault(),this._dragScrollAmount=0,this._enabled&&R.shiftKey?this._handleIncrementalClick(R):R.detail===1?this._handleSingleClick(R):R.detail===2?this._handleDoubleClick(R):R.detail===3&&this._handleTripleClick(R),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(R){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(R))}_handleSingleClick(R){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(R)?3:0,this._model.selectionStart=this._getMouseBufferCoords(R),!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(R){this._selectWordAtCursor(R,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(R){const j=this._getMouseBufferCoords(R);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))}shouldColumnSelect(R){return R.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(R){if(R.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(R),!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(R),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 R=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(R.ydisp+this._bufferService.rows,R.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=R.ydisp),this.refresh()}}_handleMouseUp(R){const j=R.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&R.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(R,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const I=(0,y.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd,O=!(!R||!j||R[0]===j[0]&&R[1]===j[1]);O?R&&j&&(this._oldSelectionStart&&this._oldSelectionEnd&&R[0]===this._oldSelectionStart[0]&&R[1]===this._oldSelectionStart[1]&&j[0]===this._oldSelectionEnd[0]&&j[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(R,j,O)):this._oldHasSelection&&this._fireOnSelectionChange(R,j,O)}_fireOnSelectionChange(R,j,O){this._oldSelectionStart=R,this._oldSelectionEnd=j,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(R){this.clearSelection(),this._trimListener.dispose(),this._trimListener=R.activeBuffer.lines.onTrim((j=>this._handleTrim(j)))}_convertViewportColToCharacterIndex(R,j){let O=j;for(let I=0;j>=I;I++){const q=R.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:q>1&&j!==I&&(O+=q-1)}return O}setSelection(R,j,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[R,j],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(R){this._isClickInSelection(R)||(this._selectWordAtCursor(R,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(R,j,O=!0,I=!0){if(R[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,U=q.lines.get(R[1]);if(!U)return;const W=q.translateBufferLineToString(R[1],!1);let K=this._convertViewportColToCharacterIndex(U,R[0]),G=K;const Z=R[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=R[0],te=R[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 V=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,Q--):V>1&&(L+=V-1,K-=V-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 V=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,te++):V>1&&(z+=V-1,G+=V-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=q.lines.get(R[1]-1);if(Q&&U.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const te=this._getWordAt([this._bufferService.cols-1,R[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=q.lines.get(R[1]+1);if(Q!=null&&Q.isWrapped&&Q.getCodePoint(0)!==32){const te=this._getWordAt([0,R[1]+1],!1,!1,!0);te&&(F+=te.length)}}return{start:H,length:F}}}_selectWordAt(R,j){const O=this._getWordAt(R,j);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,R[1]--;this._model.selectionStart=[O.start,R[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(R){const j=this._getWordAt(R,!0);if(j){let O=R[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(R){return R.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(R.getChars())>=0}_selectLineAt(R){const j=this._bufferService.buffer.getWrappedRangeForLine(R),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,_.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,R,j,O){var I,q=arguments.length,U=q<3?R:O===null?O=Object.getOwnPropertyDescriptor(R,j):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(M,R,j,O);else for(var W=M.length-1;W>=0;W--)(I=M[W])&&(U=(q<3?I(U):q>3?I(R,j,U):I(R,j))||U);return q>3&&U&&Object.defineProperty(R,j,U),U},p=this&&this.__param||function(M,R){return function(j,O){R(j,O,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),y=d(8055),S=d(8460),C=d(844),w=d(2585),v=y.css.toColor("#ffffff"),b=y.css.toColor("#000000"),_=y.css.toColor("#ffffff"),x=y.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],R=[0,95,135,175,215,255];for(let j=0;j<216;j++){const O=R[j/36%6|0],I=R[j/6%6|0],q=R[j%6];M.push({css:y.channels.toCss(O,I,q),rgba:y.channels.toRgba(O,I,q)})}for(let j=0;j<24;j++){const O=8+10*j;M.push({css:y.channels.toCss(O,O,O),rgba:y.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:_,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:y.color.blend(b,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:y.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 R=this._colors;if(R.foreground=A(M.foreground,v),R.background=A(M.background,b),R.cursor=A(M.cursor,_),R.cursorAccent=A(M.cursorAccent,x),R.selectionBackgroundTransparent=A(M.selectionBackground,k),R.selectionBackgroundOpaque=y.color.blend(R.background,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundTransparent=A(M.selectionInactiveBackground,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundOpaque=y.color.blend(R.background,R.selectionInactiveBackgroundTransparent),R.selectionForeground=M.selectionForeground?A(M.selectionForeground,y.NULL_COLOR):void 0,R.selectionForeground===y.NULL_COLOR&&(R.selectionForeground=void 0),y.color.isOpaque(R.selectionBackgroundTransparent)&&(R.selectionBackgroundTransparent=y.color.opacity(R.selectionBackgroundTransparent,.3)),y.color.isOpaque(R.selectionInactiveBackgroundTransparent)&&(R.selectionInactiveBackgroundTransparent=y.color.opacity(R.selectionInactiveBackgroundTransparent,.3)),R.ansi=a.DEFAULT_ANSI_COLORS.slice(),R.ansi[0]=A(M.black,a.DEFAULT_ANSI_COLORS[0]),R.ansi[1]=A(M.red,a.DEFAULT_ANSI_COLORS[1]),R.ansi[2]=A(M.green,a.DEFAULT_ANSI_COLORS[2]),R.ansi[3]=A(M.yellow,a.DEFAULT_ANSI_COLORS[3]),R.ansi[4]=A(M.blue,a.DEFAULT_ANSI_COLORS[4]),R.ansi[5]=A(M.magenta,a.DEFAULT_ANSI_COLORS[5]),R.ansi[6]=A(M.cyan,a.DEFAULT_ANSI_COLORS[6]),R.ansi[7]=A(M.white,a.DEFAULT_ANSI_COLORS[7]),R.ansi[8]=A(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),R.ansi[9]=A(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),R.ansi[10]=A(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),R.ansi[11]=A(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),R.ansi[12]=A(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),R.ansi[13]=A(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),R.ansi[14]=A(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),R.ansi[15]=A(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const j=Math.min(R.ansi.length-16,M.extendedAnsi.length);for(let O=0;O<j;O++)R.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 R=0;R<this._restoreColors.ansi.length;++R)this._colors.ansi[R]=this._restoreColors.ansi[R]}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,R){if(M!==void 0)try{return y.css.toColor(M)}catch{}return R}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 y in f)h[y]=p<=1?f[y]:f[y]&&d(f[y],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 y,S,C,w,v;function b(x){const k=x.toString(16);return k.length<2?"0"+k:k}function _(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)}}})(y||(a.channels=y={})),(function(x){function k(N,A){return h=Math.round(255*A),[d,f,p]=v.toChannels(N.rgba),{css:y.toCss(d,f,p,h),rgba:y.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,R=A.rgba>>16&255,j=A.rgba>>8&255,O=N.rgba>>24&255,I=N.rgba>>16&255,q=N.rgba>>8&255;return d=O+Math.round((M-O)*h),f=I+Math.round((R-I)*h),p=q+Math.round((j-q)*h),{css:y.toCss(d,f,p),rgba:y.toRgba(d,f,p)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,A,M){const R=v.ensureContrastRatio(N.rgba,A.rgba,M);if(R)return y.toColor(R>>24&255,R>>16&255,R>>8&255)},x.opaque=function(N){const A=(255|N.rgba)>>>0;return[d,f,p]=v.toChannels(A),{css:y.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),y.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),y.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]))),y.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:y.toRgba(d,f,p,h),css:A}}})(C||(a.css=C={})),(function(x){function k(N,A,M){const R=N/255,j=A/255,O=M/255;return .2126*(R<=.03928?R/12.92:Math.pow((R+.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,R){const j=A>>24&255,O=A>>16&255,I=A>>8&255;let q=M>>24&255,U=M>>16&255,W=M>>8&255,K=_(w.relativeLuminance2(q,U,W),w.relativeLuminance2(j,O,I));for(;K<R&&(q>0||U>0||W>0);)q-=Math.max(0,Math.ceil(.1*q)),U-=Math.max(0,Math.ceil(.1*U)),W-=Math.max(0,Math.ceil(.1*W)),K=_(w.relativeLuminance2(q,U,W),w.relativeLuminance2(j,O,I));return(q<<24|U<<16|W<<8|255)>>>0}function N(A,M,R){const j=A>>24&255,O=A>>16&255,I=A>>8&255;let q=M>>24&255,U=M>>16&255,W=M>>8&255,K=_(w.relativeLuminance2(q,U,W),w.relativeLuminance2(j,O,I));for(;K<R&&(q<255||U<255||W<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),U=Math.min(255,U+Math.ceil(.1*(255-U))),W=Math.min(255,W+Math.ceil(.1*(255-W))),K=_(w.relativeLuminance2(q,U,W),w.relativeLuminance2(j,O,I));return(q<<24|U<<16|W<<8|255)>>>0}x.blend=function(A,M){if(h=(255&M)/255,h===1)return M;const R=M>>24&255,j=M>>16&255,O=M>>8&255,I=A>>24&255,q=A>>16&255,U=A>>8&255;return d=I+Math.round((R-I)*h),f=q+Math.round((j-q)*h),p=U+Math.round((O-U)*h),y.toRgba(d,f,p)},x.ensureContrastRatio=function(A,M,R){const j=w.relativeLuminance(A>>8),O=w.relativeLuminance(M>>8);if(_(j,O)<R){if(O<j){const U=k(A,M,R),W=_(j,w.relativeLuminance(U>>8));if(W<R){const K=N(A,M,R);return W>_(j,w.relativeLuminance(K>>8))?U:K}return U}const I=N(A,M,R),q=_(j,w.relativeLuminance(I>>8));if(q<R){const U=k(A,M,R);return q>_(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=_},8969:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=d(844),p=d(2585),h=d(4348),y=d(7866),S=d(744),C=d(7302),w=d(6975),v=d(8460),b=d(1753),_=d(1480),x=d(7994),k=d(9282),N=d(5435),A=d(5981),M=d(2660);let R=!1;class j extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var q;(q=this._onScrollApi)==null||q.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 q in I)this.optionsService.options[q]=I[q]}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(y.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(_.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((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new A.WriteBuffer(((q,U)=>this._inputHandler.parse(q,U)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,q){this._writeBuffer.write(I,q)}writeSync(I,q){this._logService.logLevel<=p.LogLevelEnum.WARN&&!R&&(this._logService.warn("writeSync is unreliable and will be removed soon."),R=!0),this._writeBuffer.writeSync(I,q)}input(I,q=!0){this.coreService.triggerDataEvent(I,q)}resize(I,q){isNaN(I)||isNaN(q)||(I=Math.max(I,S.MINIMUM_COLS),q=Math.max(q,S.MINIMUM_ROWS),this._bufferService.resize(I,q))}scroll(I,q=!1){this._bufferService.scroll(I,q)}scrollLines(I,q,U){this._bufferService.scrollLines(I,q,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 q=I-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(I,q){return this._inputHandler.registerEscHandler(I,q)}registerDcsHandler(I,q){return this._inputHandler.registerDcsHandler(I,q)}registerCsiHandler(I,q){return this._inputHandler.registerCsiHandler(I,q)}registerOscHandler(I,q){return this._inputHandler.registerOscHandler(I,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?I=q.backend==="conpty"&&q.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 q of I)q.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),y=d(7116),S=d(2015),C=d(844),w=d(482),v=d(8437),b=d(8460),_=d(643),x=d(511),k=d(3734),N=d(2585),A=d(1480),M=d(6242),R=d(6351),j=d(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function q(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,V=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=V,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 y.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 R.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),V=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);V<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(V,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,V=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 Pe=Q[String.fromCharCode(H)];Pe&&(H=Pe.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(V){const Pe=ie;let Te=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(Pe,Te,0,je,!1);Te<X;)Pe.setCellFromCodepoint(Te++,0,1,ne)}else if(this._activeBuffer.x=X-1,F===2)continue}if(Re&&this._activeBuffer.x){const Pe=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-Pe,H,F);for(let Te=F-je;--Te>=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,_.NULL_CELL_CODE,_.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=>!q(z.params[0],this._optionsService.rawOptions.windowOptions)||L(z)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new R.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 V=X;for(let $=1;$<z;++$)te.copyWithin(V,0,X),V+=X;return this.print(te,0,V),!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,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.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:V,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(V===$):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(!q(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,y.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(O[B[0]],y.CHARSETS[B[1]]||y.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,y){this._data[p]||(this._data[p]={}),this._data[p][h]=y}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,y,S){this._data.get(f,p)||this._data.set(f,p,new d),this._data.get(f,p).set(h,y,S)}get(f,p,h,y){var S;return(S=this._data.get(f,p))==null?void 0:S.get(h,y)}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 y=p+h>>1;const S=this._getKey(this._array[y]);if(S>f)h=y-1;else{if(!(S<f)){for(;y>0&&this._getKey(this._array[y-1])===f;)y--;return y}p=y+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(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}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),y=h==null?void 0:h.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&y&&(S.isWrapped=y[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&y[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,y=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=y}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),y=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(_,x,k){this._hasScrollback=_,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=y.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(_){return _?(this._nullCell.fg=_.fg,this._nullCell.bg=_.bg,this._nullCell.extended=_.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(_){return _?(this._whitespaceCell.fg=_.fg,this._whitespaceCell.bg=_.bg,this._whitespaceCell.extended=_.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(_,x){return new y.BufferLine(this._bufferService.cols,this.getNullCell(_),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const _=this.ybase+this.y-this.ydisp;return _>=0&&_<this._rows}_getCorrectBufferLength(_){if(!this._hasScrollback)return _;const x=_+this._optionsService.rawOptions.scrollback;return x>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:x}fillViewportRows(_){if(this.lines.length===0){_===void 0&&(_=y.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(_))}}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(_,x){const k=this.getNullCell(y.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<_)for(let R=0;R<this.lines.length;R++)N+=+this.lines.get(R).resize(_,k);let M=0;if(this._rows<x)for(let R=this._rows;R<x;R++)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 y.BufferLine(_,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 y.BufferLine(_,k)));else for(let R=this._rows;R>x;R--)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 R=this.lines.length-A;R>0&&(this.lines.trimStart(R),this.ybase=Math.max(this.ybase-R,0),this.ydisp=Math.max(this.ydisp-R,0),this.savedY=Math.max(this.savedY-R,0)),this.lines.maxLength=A}this.x=Math.min(this.x,_-1),this.y=Math.min(this.y,x-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,_-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(_,x),this._cols>_))for(let M=0;M<this.lines.length;M++)N+=+this.lines.get(M).resize(_,k);this._cols=_,this._rows=x,this._memoryCleanupQueue.clear(),N>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let _=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,_=!1);let x=0;for(;this._memoryCleanupPosition<this.lines.length;)if(x+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),x>100)return!0;return _}get _isReflowEnabled(){const _=this._optionsService.rawOptions.windowsPty;return _&&_.buildNumber?this._hasScrollback&&_.backend==="conpty"&&_.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(_,x){this._cols!==_&&(_>this._cols?this._reflowLarger(_,x):this._reflowSmaller(_,x))}_reflowLarger(_,x){const k=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,_,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(k.length>0){const N=(0,S.reflowLargerCreateNewLayout)(this.lines,k);(0,S.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(_,x,N.countRemoved)}}_reflowLargerAdjustViewport(_,x,k){const N=this.getNullCell(y.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 y.BufferLine(_,N))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-k,0)}_reflowSmaller(_,x){const k=this.getNullCell(y.DEFAULT_ATTR_DATA),N=[];let A=0;for(let M=this.lines.length-1;M>=0;M--){let R=this.lines.get(M);if(!R||!R.isWrapped&&R.getTrimmedLength()<=_)continue;const j=[R];for(;R.isWrapped&&M>0;)R=this.lines.get(--M),j.unshift(R);const O=this.ybase+this.y;if(O>=M&&O<M+j.length)continue;const I=j[j.length-1].getTrimmedLength(),q=(0,S.reflowSmallerGetNewLineLengths)(j,this._cols,_),U=q.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(y.DEFAULT_ATTR_DATA,!0);K.push(H)}K.length>0&&(N.push({start:M+j.length+A,newLines:K}),A+=K.length),j.push(...K);let G=q.length-1,Z=q[G];Z===0&&(G--,Z=q[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=q[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++)q[z]<_&&j[z].setCell(q[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=[],R=[];for(let G=0;G<this.lines.length;G++)R.push(this.lines.get(G));const j=this.lines.length;let O=j-1,I=0,q=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(q&&q.start>O+U){for(let Z=q.newLines.length-1;Z>=0;Z--)this.lines.set(G--,q.newLines[Z]);G++,M.push({index:O+1,amount:q.newLines.length}),U+=q.newLines.length,q=N[++I]}else this.lines.set(G,R[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(_,x,k=0,N){const A=this.lines.get(_);return A?A.translateToString(x,k,N):""}getWrappedRangeForLine(_){let x=_,k=_;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(_){for(_!=null?this.tabs[_]||(_=this.prevStop(_)):(this.tabs={},_=0);_<this._cols;_+=this._optionsService.rawOptions.tabStopWidth)this.tabs[_]=!0}prevStop(_){for(_==null&&(_=this.x);!this.tabs[--_]&&_>0;);return _>=this._cols?this._cols-1:_<0?0:_}nextStop(_){for(_==null&&(_=this.x);!this.tabs[++_]&&_<this._cols;);return _>=this._cols?this._cols-1:_<0?0:_}clearMarkers(_){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].line===_&&(this.markers[x].dispose(),this.markers.splice(x--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].dispose(),this.markers.splice(_--,1);this._isClearing=!1}addMarker(_){const x=new v.Marker(_);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(_){this._isClearing||this.markers.splice(this.markers.indexOf(_),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),y=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class C{constructor(v,b,_=!1){this.isWrapped=_,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],_=2097151&b;return[this._data[3*v+1],2097152&b?this._combined[v]:_?(0,y.stringFromCodePoint)(_):"",b>>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):_]}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,y.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,_,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|_<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,_){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,y.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,y.stringFromCodePoint)(2097151&x)+(0,y.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,_&&(x&=-12582913,x|=_<<22),this._data[3*v+0]=x}insertCells(v,b,_){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),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,_)}else for(let x=v;x<this.length;++x)this.setCell(x,_);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,_)}deleteCells(v,b,_){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,_)}else for(let x=v;x<this.length;++x)this.setCell(x,_);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,_)}replaceCells(v,b,_,x=!1){if(x)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,_),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,_);v<b&&v<this.length;)this.isProtected(v)||this.setCell(v,_),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,_);v<b&&v<this.length;)this.setCell(v++,_)}resize(v,b){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const _=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*_)this._data=new Uint32Array(this._data.buffer,0,_);else{const x=new Uint32Array(_);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,_);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*_*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 _=0;_<this.length;++_)this.isProtected(_)||this.setCell(_,v);else{this._combined={},this._extendedAttrs={};for(let _=0;_<this.length;++_)this.setCell(_,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,_,x,k){const N=v._data;if(k)for(let M=x-1;M>=0;M--){for(let R=0;R<3;R++)this._data[3*(_+M)+R]=N[3*(b+M)+R];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[_+M]=v._extendedAttrs[b+M])}else for(let M=0;M<x;M++){for(let R=0;R<3;R++)this._data[3*(_+M)+R]=N[3*(b+M)+R];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[_+M]=v._extendedAttrs[b+M])}const A=Object.keys(v._combined);for(let M=0;M<A.length;M++){const R=parseInt(A[M],10);R>=b&&(this._combined[R-b+_]=v._combined[R])}}translateToString(v,b,_,x){b=b!=null?b:0,_=_!=null?_:this.length,v&&(_=Math.min(_,this.getTrimmedLength())),x&&(x.length=0);let k="";for(;b<_;){const N=this._data[3*b+0],A=2097151&N,M=2097152&N?this._combined[b]:A?(0,y.stringFromCodePoint)(A):h.WHITESPACE_CELL_CHAR;if(k+=M,x)for(let R=0;R<M.length;++R)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 y=!f[p].hasContent(h-1)&&f[p].getWidth(h-1)===1,S=f[p+1].getWidth(0)===2;return y&&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,y,S){const C=[];for(let w=0;w<f.length-1;w++){let v=w,b=f.get(++v);if(!b.isWrapped)continue;const _=[f.get(w)];for(;v<f.length&&b.isWrapped;)_.push(b),b=f.get(++v);if(y>=w&&y<v){w+=_.length-1;continue}let x=0,k=d(_,x,p),N=1,A=0;for(;N<_.length;){const R=d(_,N,p),j=R-A,O=h-k,I=Math.min(j,O);_[x].copyCellsFrom(_[N],A,k,I,!1),k+=I,k===h&&(x++,k=0),A+=I,A===R&&(N++,A=0),k===0&&x!==0&&_[x-1].getWidth(h-1)===2&&(_[x].copyCellsFrom(_[x-1],h-1,k++,1,!1),_[x-1].setCell(h-1,S))}_[x].replaceCells(k,h,S);let M=0;for(let R=_.length-1;R>0&&(R>x||_[R].getTrimmedLength()===0);R--)M++;M>0&&(C.push(w+_.length-M),C.push(M)),w+=_.length-1}return C},a.reflowLargerCreateNewLayout=function(f,p){const h=[];let y=0,S=p[y],C=0;for(let w=0;w<f.length;w++)if(S===w){const v=p[++y];f.onDeleteEmitter.fire({index:w-C,amount:v}),w+=v-1,C+=v,S=p[++y]}else h.push(w);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,p){const h=[];for(let y=0;y<p.length;y++)h.push(f.get(p[y]));for(let y=0;y<h.length;y++)f.set(y,h[y]);f.length=p.length},a.reflowSmallerGetNewLineLengths=function(f,p,h){const y=[],S=f.map(((b,_)=>d(f,_,p))).reduce(((b,_)=>b+_));let C=0,w=0,v=0;for(;v<S;){if(S-v<h){y.push(S-v);break}C+=h;const b=d(f,w,p);C>b&&(C-=b,w++);const _=f[w].getWidth(C-1)===2;_&&C--;const x=_?h-1:h;y.push(x),v+=x}return y},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 y 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=y},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 y 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 y;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=y},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,y,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=y?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?w.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?w.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(w.key=y?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=y?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=y?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=y?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=y?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":y?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:w.key=v?f.C0.ESC+"[1;"+(v+1)+"F":y?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],_=b==null?void 0:b[h.shiftKey?1:0];if(_)w.key=f.C0.ESC+_;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 y=f;y<p;++y){let S=d[y];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,y=0;if(this._interim){const S=d.charCodeAt(y++);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=y;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,y,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 R=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=R-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||(R===2?N<128?b--:f[w++]=N:R===3?N<2048||N>=55296&&N<=57343||N===65279||(f[w++]=N):N<65536||N>1114111||(f[w++]=N)),this.interim.fill(0)}const _=p-4;let x=b;for(;x<p;){for(;!(!(x<_)||128&(h=d[x])||128&(y=d[x+1])||128&(S=d[x+2])||128&(C=d[x+3]));)f[w++]=h,f[w++]=y,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(y=d[x++],(192&y)!=128){x--;continue}if(v=(31&h)<<6|63&y,v<128){x--;continue}f[w++]=v}else if((240&h)==224){if(x>=p)return this.interim[0]=h,w;if(y=d[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=d[x++],(192&S)!=128){x--;continue}if(v=(15&h)<<12|(63&y)<<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(y=d[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=d[x++],(192&S)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,this.interim[2]=S,w;if(C=d[x++],(192&C)!=128){x--;continue}if(v=(7&h)<<18|(63&y)<<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 y;a.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let S=0;S<p.length;++S)y.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?y[S]:(function(C,w){let v,b=0,_=w.length-1;if(C<w[0][0]||C>w[_][1])return!1;for(;_>=b;)if(v=b+_>>1,C>w[v][1])b=v+1;else{if(!(C<w[v][0]))return!0;_=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 _=this._callbacks[this._bufferOffset];if(_&&_(),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,y){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(y){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 y=h.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const S=d.exec(y);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(y.indexOf("#")===0&&(y=y.slice(1),f.exec(y)&&[3,6,9,12].includes(y.length))){const S=y.length/3,C=[0,0,0];for(let w=0;w<3;++w){const v=parseInt(y.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,y=16){const[S,C,w]=h;return`rgb:${p(S,y)}/${p(C,y)}/${p(w,y)}`}},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),y=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}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=y,this._ident=0}hook(C,w){if(this.reset(),this._ident=C,this._active=this._handlers[C]||y,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,_=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=w,_=this._stack.fallThrough,this._stack.paused=!1),!_&&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=y,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),y=d(6351);class S{constructor(b){this.table=new Uint8Array(b)}setDefault(b,_){this.table.fill(b<<4|_)}add(b,_,x,k){this.table[_<<8|b]=x<<4|k}addMany(b,_,x,k){for(let N=0;N<b.length;N++)this.table[_<<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,R)=>R)),_=(M,R)=>b.slice(M,R),x=_(32,127),k=_(0,24);k.push(25),k.push.apply(k,_(28,32));const N=_(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(_(128,144),A,3,0),v.addMany(_(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(_(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(_(64,127),3,7,0),v.addMany(_(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(_(48,60),4,8,4),v.addMany(_(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(_(32,64),6,0,6),v.add(127,6,0,6),v.addMany(_(64,127),6,0,0),v.addMany(_(32,48),3,9,5),v.addMany(_(32,48),5,9,5),v.addMany(_(48,64),5,0,6),v.addMany(_(64,127),5,7,0),v.addMany(_(32,48),4,9,5),v.addMany(_(32,48),1,9,2),v.addMany(_(32,48),2,9,2),v.addMany(_(48,127),2,10,0),v.addMany(_(48,80),1,10,0),v.addMany(_(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(_(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(_(28,32),9,0,9),v.addMany(_(32,48),9,9,12),v.addMany(_(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(k,11,0,11),v.addMany(_(32,128),11,0,11),v.addMany(_(28,32),11,0,11),v.addMany(k,10,0,10),v.add(127,10,0,10),v.addMany(_(28,32),10,0,10),v.addMany(_(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(_(32,48),10,9,12),v.addMany(k,12,0,12),v.add(127,12,0,12),v.addMany(_(28,32),12,0,12),v.addMany(_(32,48),12,9,12),v.addMany(_(48,64),12,0,11),v.addMany(_(64,127),12,12,13),v.addMany(_(64,127),10,12,13),v.addMany(_(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=(_,x,k)=>{},this._executeHandlerFb=_=>{},this._csiHandlerFb=(_,x)=>{},this._escHandlerFb=_=>{},this._errorHandlerFb=_=>_,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 y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,_=[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(_[0]>k||k>_[1])throw new Error(`final must be in range ${_[0]} .. ${_[1]}`);return x<<=8,x|=k,x}identToString(b){const _=[];for(;b;)_.push(String.fromCharCode(255&b)),b>>=8;return _.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,_){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const k=this._escHandlers[x];return k.push(_),{dispose:()=>{const N=k.indexOf(_);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,_){this._executeHandlers[b.charCodeAt(0)]=_}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,_){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const k=this._csiHandlers[x];return k.push(_),{dispose:()=>{const N=k.indexOf(_);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,_){return this._dcsParser.registerHandler(this._identifier(b),_)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,_){return this._oscParser.registerHandler(b,_)}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,_,x,k,N){this._parseStack.state=b,this._parseStack.handlers=_,this._parseStack.handlerPos=x,this._parseStack.transition=k,this._parseStack.chunkPos=N}parse(b,_,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 R=this._parseStack.handlers;let j=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&j>-1){for(;j>=0&&(k=R[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=R[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 R=M;R<_;++R){switch(N=b[R],A=this._transitions.table[this.currentState<<8|(N<160?N:C)],A>>4){case 2:for(let U=R+1;;++U){if(U>=_||(N=b[U])<32||N>126&&N<C){this._printHandler(b,R,U),R=U-1;break}if(++U>=_||(N=b[U])<32||N>126&&N<C){this._printHandler(b,R,U),R=U-1;break}if(++U>=_||(N=b[U])<32||N>126&&N<C){this._printHandler(b,R,U),R=U-1;break}if(++U>=_||(N=b[U])<32||N>126&&N<C){this._printHandler(b,R,U),R=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:R,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,R),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(++R<_&&(N=b[R])>47&&N<60);R--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let q=I?I.length-1:-1;for(;q>=0&&(k=I[q](),k!==!0);q--)if(k instanceof Promise)return this._preserveStack(4,I,q,A,R),k;q<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=R+1;;++U)if(U>=_||(N=b[U])===24||N===26||N===27||N>127&&N<C){this._dcsParser.put(b,R,U),R=U-1;break}break;case 14:if(k=this._dcsParser.unhook(N!==24&&N!==26),k)return this._preserveStack(6,[],0,A,R),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=R+1;;U++)if(U>=_||(N=b[U])<32||N>127&&N<C){this._oscParser.put(b,R,U),R=U-1;break}break;case 6:if(k=this._oscParser.end(N!==24&&N!==26),k)return this._preserveStack(5,[],0,A,R),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(y,S){this._handlers[y]===void 0&&(this._handlers[y]=[]);const C=this._handlers[y];return C.push(S),{dispose:()=>{const w=C.indexOf(S);w!==-1&&C.splice(w,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].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 y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,S,C){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(y,S,C);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(y,S,C))}start(){this.reset(),this._state=1}put(y,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const w=y[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(y,S,C)}}end(y,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(y),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",y);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,S,C){this._hitLimit||(this._data+=(0,p.utf32ToString)(y,S,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let S=!1;if(this._hitLimit)S=!1;else if(y&&(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 y=new f;if(!h.length)return y;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)y.addSubParam(C[w]);else y.addParam(C)}return y}constructor(h=32,y=32){if(this.maxLength=h,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(y),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 y=0;y<this.length;++y){h.push(this.params[y]);const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];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 y=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-y>0?this._subParams.subarray(y,S):null}getSubParamsAll(){const h={};for(let y=0;y<this.length;++y){const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];C-S>0&&(h[y]=this._subParams.slice(S,C))}return h}addDigit(h){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[y-1];S[y-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,y){this._buffer=h,this.type=y}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 y=this._buffer.lines.get(h);if(y)return new f.BufferLineApiView(y)}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,y){return this._line.translateToString(p,h,y)}}},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 y 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=y},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,_,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,_):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,b,_,x);else for(var M=v.length-1;M>=0;M--)(k=v[M])&&(A=(N<3?k(A):N>3?k(b,_,A):k(b,_))||A);return N>3&&A&&Object.defineProperty(b,_,A),A},p=this&&this.__param||function(v,b){return function(_,x){b(_,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=d(8460),y=d(844),S=d(5295),C=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let w=a.BufferService=class extends y.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 _=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=_.getBlankLine(v,b),this._cachedBlankLine=x),x.isWrapped=b;const k=_.ybase+_.scrollTop,N=_.ybase+_.scrollBottom;if(_.scrollTop===0){const A=_.lines.isFull;N===_.lines.length-1?A?_.lines.recycle().copyFrom(x):_.lines.push(x.clone()):_.lines.splice(N+1,0,x.clone()),A?this.isUserScrolling&&(_.ydisp=Math.max(_.ydisp-1,0)):(_.ybase++,this.isUserScrolling||_.ydisp++)}else{const A=N-k+1;_.lines.shiftElements(k+1,A-1,-1),_.lines.set(N,x.clone())}this.isUserScrolling||(_.ydisp=_.ybase),this._onScroll.fire(_.ydisp)}scrollLines(v,b,_){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,R=arguments.length,j=R<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=(R<3?M(j):R>3?M(k,N,j):M(k,N))||j);return R>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),y=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 _=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 y.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=_=f([p(0,h.IBufferService),p(1,h.ICoreService)],_)},6975:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=d(1439),y=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(_,x,k){super(),this._bufferService=_,this._logService=x,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.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(_,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 "${_}"`,(()=>_.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(_)}triggerBinaryEvent(_){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${_}"`,(()=>_.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(_))}};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),y=d(6106);let S=0,C=0;class w extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList((_=>_==null?void 0:_.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(_){if(_.marker.isDisposed)return;const x=new v(_);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 _ of this._decorations.values())_.dispose();this._decorations.clear()}*getDecorationsAtCell(_,x,k){var M,R,j;let N=0,A=0;for(const O of this._decorations.getKeyIterator(x))N=(M=O.options.x)!=null?M:0,A=N+((R=O.options.width)!=null?R:1),_>=N&&_<A&&(!k||((j=O.options.layer)!=null?j:"bottom")===k)&&(yield O)}forEachDecorationAtCell(_,x,k,N){this._decorations.forEachByKey(x,(A=>{var M,R,j;S=(M=A.options.x)!=null?M:0,C=S+((R=A.options.width)!=null?R:1),_>=S&&_<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(_){super(),this.options=_,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=_.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(y,S){this._services.set(y,S)}getService(y){return this._services.get(y)}createInstance(y,...S){const C=(0,p.getServiceDependencies)(y).sort(((b,_)=>b.index-_.index)),w=[];for(const b of C){const _=this._services.get(b.id);if(!_)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${b.id}.`);w.push(_)}const v=C.length>0?C[0].index:S.length;if(S.length!==v)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${v+1} conflicts with ${S.length} static arguments`);return new y(...S,...w)}}},7866:function(u,a,d){var f=this&&this.__decorate||function(v,b,_,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,_):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,b,_,x);else for(var M=v.length-1;M>=0;M--)(k=v[M])&&(A=(N<3?k(A):N>3?k(b,_,A):k(b,_))||A);return N>3&&A&&Object.defineProperty(b,_,A),A},p=this&&this.__param||function(v,b){return function(_,x){b(_,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(844),y=d(2585),S={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let C,w=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=y.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,_){this._evalLazyOptionalParams(_),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,..._)}trace(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.TRACE&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.trace.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}debug(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.debug.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}info(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.INFO&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.info.bind(this._optionsService.options.logger))!=null?x:console.info,v,b)}warn(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.WARN&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.warn.bind(this._optionsService.options.logger))!=null?x:console.warn,v,b)}error(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.ERROR&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.error.bind(this._optionsService.options.logger))!=null?x:console.error,v,b)}};a.LogService=w=f([p(0,y.IOptionsService)],w),a.setTraceLogger=function(v){C=v},a.traceCall=function(v,b,_){if(typeof _.value!="function")throw new Error("not supported");const x=_.value;_.value=function(...k){if(C.logLevel!==y.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 y=["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 _=w[b];v[b]=this._sanitizeAndValidateOption(b,_)}catch(_){console.error(_)}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,_)=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);_=this._sanitizeAndValidateOption(b,_),this.rawOptions[b]!==_&&(this.rawOptions[b]=_,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const _={get:w.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,_)}}_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=y.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,_=arguments.length,x=_<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=(_<3?b(x):_>3?b(C,w,x):b(C,w))||x);return _>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 y=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 _=C.addMarker(C.ybase+C.y),x={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(x,_))),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=y=f([p(0,h.IBufferService)],y)},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(y,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,y,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 _=S.charCodeAt(b);if(55296<=_&&_<=56319){if(++b>=v)return C+this.wcwidth(_);const N=S.charCodeAt(b);56320<=N&&N<=57343?_=1024*(_-55296)+N-56320+65536:C+=this.wcwidth(N)}const x=this.charProperties(_,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),y=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 _=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:_.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 y.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 _="none";switch(this._core.coreMouseService.activeProtocol){case"X10":_="x10";break;case"VT200":_="vt200";break;case"DRAG":_="drag";break;case"ANY":_="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:_,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const _ in b)this._publicOptions[_]=b[_]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,_=!0){this._core.input(b,_)}resize(b,_){this._verifyIntegers(b,_),this._core.resize(b,_)}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 _,x,k;return this._checkProposedApi(),this._verifyPositiveIntegers((_=b.x)!=null?_:0,(x=b.width)!=null?x:0,(k=b.height)!=null?k:0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,_,x){this._verifyIntegers(b,_,x),this._core.select(b,_,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,_){this._verifyIntegers(b,_),this._core.selectLines(b,_)}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,_){this._core.write(b,_)}writeln(b,_){this._core.write(b),this._core.write(`\r
519
- `,_)}paste(b){this._core.paste(b)}refresh(b,_){this._verifyIntegers(b,_),this._core.refresh(b,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return a}_verifyIntegers(...b){for(const _ of b)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const _ of b)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}u.Terminal=w})(),l})()))})(rg)),rg.exports}var Cj=wj(),ig={exports:{}},Db;function kj(){return Db||(Db=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const l=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(l._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,l=o._renderService.dimensions;if(l.css.cell.width===0||l.css.cell.height===0)return;const 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"))),y=f-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-u;return{cols:Math.max(2,Math.floor(y/l.css.cell.width)),rows:Math.max(1,Math.floor(h/l.css.cell.height))}}}})(),n})()))})(ig)),ig.exports}var Ej=kj(),sg={exports:{}},Mb;function Aj(){return Mb||(Mb=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),y=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(y.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,h,y,S={}){this._terminal=p,this._regex=h,this._handler=y,this._options=S}provideLinks(p,h){const y=f.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(y))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(y,S)=>{if(this._options.hover){const{range:C}=h;this._options.hover(y,S,C)}},h)))}};class f{static computeLink(h,y,S,C){const w=new RegExp(y.source,(y.flags||"")+"g"),[v,b]=f._getWindowedLineStrings(h-1,S),_=v.join("");let x;const k=[];for(;x=w.exec(_);){const N=x[0];if(!d(N))continue;const[A,M]=f._mapStrIdx(S,b,0,x.index),[R,j]=f._mapStrIdx(S,A,M,N.length);if(A===-1||M===-1||R===-1||j===-1)continue;const O={start:{x:M+1,y:A+1},end:{x:j,y:R+1}};k.push({range:O,text:N,activate:C})}return k}static _getWindowedLineStrings(h,y){let S,C=h,w=h,v=0,b="";const _=[];if(S=y.buffer.active.getLine(h)){const x=S.translateToString(!0);if(S.isWrapped&&x[0]!==" "){for(v=0;(S=y.buffer.active.getLine(--C))&&v<2048&&(b=S.translateToString(!0),v+=b.length,_.push(b),S.isWrapped&&b.indexOf(" ")===-1););_.reverse()}for(_.push(x),v=0;(S=y.buffer.active.getLine(++w))&&S.isWrapped&&v<2048&&(b=S.translateToString(!0),v+=b.length,_.push(b),b.indexOf(" ")===-1););}return[_,C]}static _mapStrIdx(h,y,S,C){const w=h.buffer.active,v=w.getNullCell();let b=S;for(;C;){const _=w.getLine(y);if(!_)return[-1,-1];for(let x=b;x<_.length;++x){_.getCell(x,v);const k=v.getChars();if(v.getWidth()&&(C-=k.length||1,x===_.length-1&&k==="")){const N=w.getLine(y+1);N&&N.isWrapped&&(N.getCell(0,v),v.getWidth()===2&&(C+=1))}if(C<0)return[y,x]}y++,b=0}return[y,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 y=window.open();if(y){try{y.opener=null}catch{}y.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,y=h.urlRegex||d;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,y,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),l})()))})(sg)),sg.exports}var Rj=Aj();const Ro={INPUT:1,RESIZE:2,CLOSE:3,OUTPUT:4,EXIT:5,ERROR:6,INIT_ACK:7,TITLE:8};function og(t,e){const n=new Uint8Array(1+e.length);return n[0]=t,n.set(e,1),n}function Tj(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),y=D.useRef(e.onExit),S=D.useRef(e.onSessionInit),C=D.useRef(e.onTitleChange);D.useEffect(()=>{h.current=e.onStatusChange,y.current=e.onExit,S.current=e.onSessionInit,C.current=e.onTitleChange});const w=D.useRef(n),v=D.useRef(i),b=D.useRef(o),_=D.useRef(e.serverSessionId);D.useEffect(()=>{w.current=n,v.current=i,b.current=o,_.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=_.current,q=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(q);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 Ro.OUTPUT:{const X=new TextDecoder().decode(Z);(ee=l.current)==null||ee.write(X);break}case Ro.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=y.current)==null||L.call(y,X),U.close();break}case Ro.ERROR:{const{message:X}=JSON.parse(new TextDecoder().decode(Z));x("disconnected"),(z=l.current)==null||z.writeln(`\r
521
- [Error: ${X}]`);break}case Ro.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=y.current)==null||Q.call(y,X.exitCode)):x("connected");break}case Ro.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 Cj.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 Ej.FitAddon,q=new Rj.WebLinksAddon;O.loadAddon(I),O.loadAddon(q);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(og(Ro.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(og(Ro.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()},[]),R=D.useCallback(()=>{var O;const j=a.current;if(j){try{j.send(og(Ro.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:R}}const Nj=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:y,focus:S}=Tj(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(()=>y())});return w.observe(C),()=>{w.disconnect()}},[y]),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(()=>y()))},100);return()=>{clearInterval(b)}},[y]),g.jsx("div",{ref:p,className:"w-full h-full",onFocus:S})});function Dj(){const t=ve.c(2),[e,n]=D.useState(Mj);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 Mj(){return{height:typeof window<"u"?window.innerHeight:0,offsetTop:0,scale:1}}const jj=5,Oj=300,Lj=200,Ij=.7,zj=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=Dj(),[h,y]=D.useState(new Map),[S,C]=D.useState(new Map),[w,v]=D.useState(Oj),b=D.useRef(!1),_=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)<jj,O=D.useCallback(async X=>{if(!(!o||!l||k.current.has(X))){k.current.add(X);try{const V=await fetch(`http://${o}/api/workspaces/${X}/terminals`,{headers:{Authorization:`Bearer ${l}`}});if(!V.ok)return;const $=await V.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"}));y(ie=>{var je;const ae=(je=ie.get(X))!=null?je:[],se=new Set(ae.map(Pe=>Pe.serverSessionId).filter(Boolean)),ye=ne.filter(Pe=>!se.has(Pe.serverSessionId));if(ye.length===0)return ie;if(ae.length>0){for(const Pe of ye)fetch(`http://${o}/api/workspaces/${X}/terminals/${Pe.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(V){console.log("[TerminalPanel] fetchExistingSessions FAILED",V)}finally{k.current.delete(X)}}},[o,l]);D.useEffect(()=>{!e||!u||O(e)},[e,u,O]);const I=D.useCallback((X,V)=>{y($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,status:V}:ye);se.some(ye=>ye.id===X)&&ne.set(ie,se)}return ne})},[]),q=D.useCallback((X,V)=>{y($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,serverSessionId:V.sessionId,title:V.title||ye.title}:ye);se.some(ye=>ye.id===X)&&ne.set(ie,se)}return ne})},[]),U=D.useCallback((X,V)=>{y($=>{const ne=new Map($);for(const[ie,ae]of ne.entries()){const se=ae.map(ye=>ye.id===X?{...ye,title:V}: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"};y(V=>{var ie;const $=new Map(V),ne=(ie=$.get(e))!=null?ie:[];return $.set(e,[...ne,X]),$}),C(V=>{const $=new Map(V);return $.set(e,X.id),$})},[e,n,j]),K=D.useCallback(X=>{const V=[...h.values()].flat().find($=>$.id===X);V!=null&&V.serverSessionId&&o&&l&&fetch(`http://${o}/api/workspaces/${V.workspaceId}/terminals/${V.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{}),y($=>{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 V;if(!e||!n||!u)return;((V=h.get(e))!=null?V:[]).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 V="touches"in X?X.touches[0].clientY:X.clientY;_.current=V,x.current=w;const $=ie=>{if(!b.current)return;const ae="touches"in ie?ie.touches[0].clientY:ie.clientY,se=_.current-ae,ye=window.innerHeight*Ij,Re=Math.min(Math.max(x.current+se,Lj),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(V=>{const $=new Map(V);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:V=>{V.stopPropagation(),K(X.id)},children:g.jsx(Ts,{className:"w-3 h-3"})})]},X.id)),j&&g.jsx(Fe,{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(Bj,{tab:X,serverUrl:o,apiToken:l,onStatusChange:V=>I(X.id,V),onSessionInit:V=>q(X.id,V),onTitleChange:V=>U(X.id,V),onTerminalRef:V=>{V?N.current.set(X.id,V):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 V=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(Bh,{open:u,onOpenChange:$=>!$&&a(),children:g.jsxs(Ph,{side:"top",className:"p-0 bg-background [&>button]:hidden flex flex-col",style:{height:V},children:[g.jsx(Fh,{className:"sr-only",children:g.jsx(Hh,{children:"Terminal"})}),g.jsxs("div",{className:"flex items-center justify-between p-2 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Iy,{className:"w-4 h-4"}),g.jsx("span",{className:"font-semibold text-sm",children:"Terminal"})]}),g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Ts,{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(Iy,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("span",{className:"font-medium text-xs text-muted-foreground",children:"Terminal"})]}),g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Ts,{className:"w-3.5 h-3.5"})})]}),z(),H()]})]})});function Bj(t){const e=ve.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 y;e[0]!==u||e[1]!==l||e[2]!==a?(y=()=>{f.current=l,p.current=u,h.current=a},e[0]=u,e[1]=l,e[2]=a,e[3]=y):y=e[3],D.useEffect(y);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 _=b;let x;return e[7]!==o||e[8]!==d||e[9]!==i||e[10]!==n.serverSessionId||e[11]!==n.workspacePath?(x=g.jsx(Nj,{ref:d,serverUrl:i,apiToken:o,cwd:n.workspacePath,serverSessionId:n.serverSessionId,onStatusChange:C,onSessionInit:v,onTitleChange:_}),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 Pj(t){return t.role==="assistant"}const Fj=_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=ve.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(Fj({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=ve.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 Hj(t){const e=ve.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(BN,{"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(zN,{"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 Uj(t){return t>=60?"critical":t>=40?"warning":"normal"}function $j(t){const e=ve.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 y;e[3]!==h?(y=Uj(h),e[3]=h,e[4]=y):y=e[4];const S=y;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 q;e[9]!==O||e[10]!==I?(q=g.jsxs("span",{className:"text-xs font-mono",children:[O,"/",I]}),e[9]=O,e[10]=I,e[11]=q):q=e[11];let U;e[12]===Symbol.for("react.memo_cache_sentinel")?(U=g.jsx($u,{asChild:!0,children:g.jsx(k4,{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(qu,{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]!==q?(K=g.jsxs("div",{className:"flex items-center gap-1.5",children:[q,W]}),e[15]=W,e[16]=q,e[17]=K):K=e[17],K}let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens:"}),e[18]=C):C=e[18];let w;e[19]!==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 _=S==="critical"&&"[&>div]:bg-destructive",x=S==="warning"&&"[&>div]:bg-warning",k=S==="normal"&&"[&>div]:bg-primary";let N;e[26]!==_||e[27]!==x||e[28]!==k?(N=Ee("h-1 w-20",_,x,k),e[26]=_,e[27]=x,e[28]=k,e[29]=N):N=e[29];let A;e[30]!==h||e[31]!==N?(A=g.jsx(Hj,{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 R;e[35]!==A||e[36]!==M?(R=g.jsxs("div",{className:"flex items-center gap-2",children:[A,M]}),e[35]=A,e[36]=M,e[37]=R):R=e[37];let j;return e[38]!==b||e[39]!==R?(j=g.jsx("div",{className:"flex items-center gap-3",children:g.jsxs("div",{className:"flex flex-col gap-1",children:[b,R]})}),e[38]=b,e[39]=R,e[40]=j):j=e[40],j}function Z1(t){const e=ve.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(bD,{"data-slot":"select",...n}),e[2]=n,e[3]=i):i=e[3],i}function qj(t){const e=ve.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(AD,{"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=ve.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(SD,{"data-slot":"select-value",...n}),e[2]=n,e[3]=i):i=e[3],i}function J1(t){const e=ve.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(wD,{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(xD,{"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 ev(t){const e=ve.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 y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(Wj,{}),e[9]=y):y=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(ED,{"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(Gj,{}),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(CD,{children:g.jsxs(kD,{"data-slot":"select-content","data-align-trigger":f,className:h,position:a,align:d,...o,children:[y,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 Vj(t){const e=ve.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(RD,{"data-slot":"select-label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Uh(t){const e=ve.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(DD,{children:g.jsx(Ns,{className:"pointer-events-none"})})}),e[6]=u):u=e[6];let a;e[7]!==n?(a=g.jsx(ND,{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(TD,{"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 Wj(t){const e=ve.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(KE,{}),e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==o?(u=g.jsx(MD,{"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 Gj(t){const e=ve.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(jD,{"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 bi(t){const e=ve.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(gN,{"data-slot":"label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Kj(t){switch(t){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function Yj(t){const e=ve.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 y,S,C,w,v,b,_,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 R=n.reduce(Xj,{});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(bi,{className:"text-xs text-muted-foreground",children:I?g.jsx(jy,{className:"size-3.5"}):"Model:"}),e[20]=h,e[21]=I,e[22]=k):k=e[22],S=Z1,w=i||"",v=O,b=l;const q=h?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[180px] h-8 text-sm";let U;e[23]!==h?(U=h&&g.jsxs(g.Fragment,{children:[g.jsx(jy,{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]!==q||e[28]!==U||e[29]!==W?(_=g.jsxs(J1,{className:q,children:[U,W]}),e[27]=q,e[28]=U,e[29]=W,e[30]=_):_=e[30],y=ev,C=Object.entries(R).map(K=>{const[G,Z]=K;return g.jsxs(qj,{children:[g.jsx(Vj,{children:G}),Z.map(ee=>g.jsx(Uh,{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:Kj(ee.tier)}),(f==null?void 0:f.has(ee.providerId))&&(d==null?void 0:d.has(ee.providerId))&&g.jsx(Yn,{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(Yn,{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]=y,e[9]=S,e[10]=C,e[11]=w,e[12]=v,e[13]=b,e[14]=_,e[15]=x,e[16]=k}else y=e[8],S=e[9],C=e[10],w=e[11],v=e[12],b=e[13],_=e[14],x=e[15],k=e[16];let N;e[31]!==y||e[32]!==C?(N=g.jsx(y,{children:C}),e[31]=y,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]!==_?(A=g.jsxs(S,{value:w,onValueChange:v,disabled:b,children:[_,N]}),e[34]=S,e[35]=N,e[36]=w,e[37]=v,e[38]=b,e[39]=_,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 Xj(t,e){return t[e.providerName]||(t[e.providerName]=[]),t[e.providerName].push(e),t}const Qj={low:"Low",medium:"Medium",high:"High",xhigh:"X-High",minimal:"Minimal",max:"Max"};function Zj(t){return Qj[t]||t.charAt(0).toUpperCase()+t.slice(1)}function Jj(t){const e=ve.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,y,S,C,w,v,b,_,x,k;if(e[0]!==l||e[1]!==f||e[2]!==o||e[3]!==i||e[4]!==p||e[5]!==n){const R=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(bi,{className:"text-xs text-muted-foreground",children:p?g.jsx(My,{className:"size-3.5"}):"Thinking:"}),e[18]=f,e[19]=p,e[20]=S):S=e[20],y=Z1,v=i||"__none__",b=O,_=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 q;e[21]!==f?(q=f&&g.jsxs(g.Fragment,{children:[g.jsx(My,{className:"size-4"}),g.jsx(fc,{className:"sr-only"})]}),e[21]=f,e[22]=q):q=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]!==q||e[27]!==U?(x=g.jsxs(J1,{className:I,children:[q,U]}),e[25]=I,e[26]=q,e[27]=U,e[28]=x):x=e[28],h=ev,e[29]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Uh,{value:"__none__",children:"Default"}),e[29]=C):C=e[29],w=R.map(eO),e[0]=l,e[1]=f,e[2]=o,e[3]=i,e[4]=p,e[5]=n,e[6]=h,e[7]=y,e[8]=S,e[9]=C,e[10]=w,e[11]=v,e[12]=b,e[13]=_,e[14]=x,e[15]=k}else h=e[6],y=e[7],S=e[8],C=e[9],w=e[10],v=e[11],b=e[12],_=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]!==y||e[35]!==N||e[36]!==v||e[37]!==b||e[38]!==_||e[39]!==x?(A=g.jsxs(y,{value:v,onValueChange:b,disabled:_,children:[x,N]}),e[34]=y,e[35]=N,e[36]=v,e[37]=b,e[38]=_,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 eO(t){return g.jsx(Uh,{value:t,children:Zj(t)},t)}function tO(t){const e=ve.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(bi,{className:"text-xs text-muted-foreground",children:p?g.jsx(s4,{className:"size-3.5"}):"Config:"}),e[0]=f,e[1]=p,e[2]=h):h=e[2];const y=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(Vx,{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(J1,{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(nO),e[11]=n,e[12]=b):b=e[12];let _;e[13]!==b?(_=g.jsx(ev,{children:b}),e[13]=b,e[14]=_):_=e[14];let x;e[15]!==l||e[16]!==o||e[17]!==_||e[18]!==y||e[19]!==v?(x=g.jsxs(Z1,{value:y,onValueChange:o,disabled:l,children:[v,_]}),e[15]=l,e[16]=o,e[17]=_,e[18]=y,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 nO(t){return g.jsxs(Uh,{value:t.id,children:[t.name,t.isDefault&&g.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},t.id)}function rO(t){var Ie;const e=ve.c(104),{session:n,preconfigs:i,models:o,usage:l,modelName:u,onChangePreconfig:a,onChangeModel:d,onChangeVariant:f,onRename:p,onNavigateBack:h,isStreaming:y,onInterrupt:S,onCompact:C,isCompacting:w,canCompact:v,connectedProviderIds:b,connectableProviderIds:_,selectedVariant:x,variants:k}=t,[N,A]=D.useState(!1),[M,R]=D.useState(n.title||""),j=D.useRef(null),O=ud(),I=H8();let q,U;e[0]!==N?(q=()=>{N&&j.current&&(j.current.focus(),j.current.select())},U=[N],e[0]=N,e[1]=q,e[2]=U):(q=e[1],U=e[2]),D.useEffect(q,U);let W;e[3]!==n.title?(W=()=>{R(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 Ve=M.trim();Ve&&Ve!==n.title&&p(n.id,Ve),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=Ve=>{Ve.key==="Enter"?Z():Ve.key==="Escape"&&(R(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||((Ie=i.find(Ve=>Ve.id===n.preconfigId))==null?void 0:Ie.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 Ve;e[21]!==z?(Ve=_t=>_t.id===z,e[21]=z,e[22]=Ve):Ve=e[22],H=o.find(Ve),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(Fe,{variant:"ghost",size:"sm",onClick:h,className:"h-7",children:[g.jsx(zE,{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:Ve=>R(Ve.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 V;e[33]!==n.id?(V=n.id.slice(0,8),e[33]=n.id,e[34]=V):V=e[34];let $;e[35]!==V?($=g.jsx(Yn,{variant:"outline",className:"font-mono text-xs",children:V}),e[35]=V,e[36]=$):$=e[36];let ne;e[37]!==n.status?(ne=n.status==="closed"&&g.jsxs(Yn,{variant:"secondary",children:[g.jsx(LE,{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(Do,{}),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($j,{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(Do,{orientation:"vertical",className:"hidden sm:block"}),e[52]=ye):ye=e[52];const Re=n.status==="closed"||!!n.parentId;let je;e[53]!==_||e[54]!==b||e[55]!==I||e[56]!==O||e[57]!==o||e[58]!==d||e[59]!==z||e[60]!==Re?(je=g.jsx(Yj,{models:o,selectedModelId:z,onChangeModel:d,disabled:Re,compact:I,iconOnly:O,connectedProviderIds:b,connectableProviderIds:_}),e[53]=_,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 Pe=n.status==="closed"||!!n.parentId;let Te;e[62]!==I||e[63]!==O||e[64]!==f||e[65]!==x||e[66]!==Pe||e[67]!==k?(Te=g.jsx(Jj,{variants:k,selectedVariant:x,onChangeVariant:f,disabled:Pe,compact:I,iconOnly:O}),e[62]=I,e[63]=O,e[64]=f,e[65]=x,e[66]=Pe,e[67]=k,e[68]=Te):Te=e[68];const tt=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]!==tt?(it=g.jsx(tO,{preconfigs:i,selectedPreconfigId:n.preconfigId,onChangePreconfig:a,disabled:tt,compact:I,iconOnly:O}),e[69]=I,e[70]=O,e[71]=a,e[72]=i,e[73]=n.preconfigId,e[74]=tt,e[75]=it):it=e[75];let ct;e[76]===Symbol.for("react.memo_cache_sentinel")?(ct=g.jsx(Do,{orientation:"vertical",className:"hidden sm:block"}),e[76]=ct):ct=e[76];let ot;e[77]!==v||e[78]!==I||e[79]!==w||e[80]!==y||e[81]!==C?(ot=C&&g.jsxs(g.Fragment,{children:[g.jsxs(Fe,{variant:"outline",size:I?"icon":"sm",onClick:C,disabled:y||w||!v,title:w?"Compacting...":"Compact older messages",children:[g.jsx(Ux,{className:"size-4"}),!I&&g.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),g.jsx(Do,{orientation:"vertical",className:"hidden sm:block"})]}),e[77]=v,e[78]=I,e[79]=w,e[80]=y,e[81]=C,e[82]=ot):ot=e[82];const pt=y?"destructive":"outline",Ze=I?"icon":"sm",Je=!S,ue=y?"":"opacity-60 hover:opacity-100",de=y?"Interrupt operation":"Interrupt (no active operation)";let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=g.jsx(Gx,{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 Ne;e[86]!==S||e[87]!==pt||e[88]!==Ze||e[89]!==Je||e[90]!==ue||e[91]!==de||e[92]!==_e?(Ne=g.jsxs(Fe,{variant:pt,size:Ze,onClick:S,disabled:Je,className:ue,title:de,children:[xe,_e]}),e[86]=S,e[87]=pt,e[88]=Ze,e[89]=Je,e[90]=ue,e[91]=de,e[92]=_e,e[93]=Ne):Ne=e[93];let Le;e[94]!==se||e[95]!==je||e[96]!==Te||e[97]!==it||e[98]!==ot||e[99]!==Ne?(Le=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,Te,it,ct,ot,Ne]}),e[94]=se,e[95]=je,e[96]=Te,e[97]=it,e[98]=ot,e[99]=Ne,e[100]=Le):Le=e[100];let $e;return e[101]!==ie||e[102]!==Le?($e=g.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[ie,ae,Le]}),e[101]=ie,e[102]=Le,e[103]=$e):$e=e[103],$e}function iO(t){const e=ve.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,y=d===void 0?!1:d,S=p===void 0?!1:p,[C,w]=D.useState(!1),[v,b]=D.useState(!1),[_,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 R;e[2]!==M?(R=Ee("flex flex-col gap-1 mb-4 animate-slide-up min-w-0",M),e[2]=M,e[3]=R):R=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]!==y||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:[y&&a&&g.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>b(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Revert to this point",children:g.jsx(y5,{className:"size-3"})}),S&&f&&g.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>x(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Fork from this point",children:g.jsx(x4,{className:"size-3"})}),g.jsx(Fe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ns,{className:"size-3"}):g.jsx(Lu,{className:"size-3"})})]}),g.jsx(Kx,{className:"size-3"}),n.role]}):g.jsxs(g.Fragment,{children:[g.jsx(PE,{className:"size-3"}),n.role,g.jsx(Fe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ns,{className:"size-3"}):g.jsx(Lu,{className:"size-3"})})]}),e[6]=S,e[7]=y,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 q;e[16]!==O||e[17]!==I?(q=g.jsx("div",{className:O,children:I}),e[16]=O,e[17]=I,e[18]=q):q=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(Fx,{className:"size-3 animate-pulse"}),g.jsx("span",{children:"Pending"})]}),u&&g.jsx(Fe,{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(Ts,{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(qg,{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]!==_||e[38]!==L?(z=g.jsx(qg,{open:_,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]=_,e[38]=L,e[39]=z):z=e[39];let H;return e[40]!==q||e[41]!==Z||e[42]!==B||e[43]!==z||e[44]!==R?(H=g.jsxs("div",{className:R,children:[q,Z,B,z]}),e[40]=q,e[41]=Z,e[42]=B,e[43]=z,e[44]=R,e[45]=H):H=e[45],H}var sO=Object.create,$h=Object.defineProperty,oO=Object.defineProperties,aO=Object.getOwnPropertyDescriptor,lO=Object.getOwnPropertyDescriptors,HC=Object.getOwnPropertyNames,Jf=Object.getOwnPropertySymbols,cO=Object.getPrototypeOf,tv=Object.prototype.hasOwnProperty,UC=Object.prototype.propertyIsEnumerable,jb=(t,e,n)=>e in t?$h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ki=(t,e)=>{for(var n in e||(e={}))tv.call(e,n)&&jb(t,n,e[n]);if(Jf)for(var n of Jf(e))UC.call(e,n)&&jb(t,n,e[n]);return t},qh=(t,e)=>oO(t,lO(e)),$C=(t,e)=>{var n={};for(var i in t)tv.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&&UC.call(t,i)&&(n[i]=t[i]);return n},uO=(t,e)=>function(){return e||(0,t[HC(t)[0]])((e={exports:{}}).exports,e),e.exports},dO=(t,e)=>{for(var n in e)$h(t,n,{get:e[n],enumerable:!0})},fO=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of HC(e))!tv.call(t,o)&&o!==n&&$h(t,o,{get:()=>e[o],enumerable:!(i=aO(e,o))||i.enumerable});return t},hO=(t,e,n)=>(n=t!=null?sO(cO(t)):{},fO(!t||!t.__esModule?$h(n,"default",{value:t,enumerable:!0}):n,t)),pO=uO({"../../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,_;switch(u.util.type(w)){case"Object":if(_=u.util.objId(w),v[_])return v[_];b={},v[_]=b;for(var x in w)w.hasOwnProperty(x)&&(b[x]=C(w[x],v));return b;case"Array":return _=u.util.objId(w),v[_]?v[_]:(b=[],v[_]=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 _=C.classList;if(_.contains(w))return!0;if(_.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 _=b[C],x={};for(var k in _)if(_.hasOwnProperty(k)){if(k==w)for(var N in v)v.hasOwnProperty(N)&&(x[N]=v[N]);v.hasOwnProperty(k)||(x[k]=_[k])}var A=b[C];return b[C]=x,u.languages.DFS(u.languages,function(M,R){R===A&&M!=C&&(this[M]=x)}),x},DFS:function C(w,v,b,_){_=_||{};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"&&!_[x(N)]?(_[x(N)]=!0,C(N,v,null,_)):A==="Array"&&!_[x(N)]&&(_[x(N)]=!0,C(N,v,k,_))}}},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 _=new p;return h(_,_.head,C),f(C,_,w,_.head,0),S(_)},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,_;_=v[b++];)_(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 _={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(_.classes,x):_.classes.push(x)),u.hooks.run("wrap",_);var k="";for(var N in _.attributes)k+=" "+N+'="'+(_.attributes[N]||"").replace(/"/g,"&quot;")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+k+">"+_.content+"</"+_.tag+">"};function d(C,w,v,b){C.lastIndex=w;var _=C.exec(v);if(_&&b&&_[1]){var x=_[1].length;_.index+=x,_[0]=_[0].slice(x)}return _}function f(C,w,v,b,_,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],R=M.inside,j=!!M.lookbehind,O=!!M.greedy,I=M.alias;if(O&&!M.pattern.global){var q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,q+"g")}for(var U=M.pattern||M,W=b.next,K=_;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 V=W.prev;Q&&(V=h(w,V,Q),K+=Q.length),y(w,V,Z);var $=new a(k,R?u.tokenize(F,R):F,I,F);if(W=h(w,V,$),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,_={value:v,prev:w,next:b};return w.next=_,b.prev=_,C.length++,_}function y(C,w,v){for(var b=w.next,_=0;_<v&&b!==C.tail;_++)b=b.next;w.next=b,b.prev=w,C.length-=_}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=hO(pO());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 y=0,S=h.length;y<S;y++){var C,w=h[y];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,y=f.classes.length;h<y;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,_){var x;return(_=_.toLowerCase())[0]==="#"?(x=_[1]==="x"?parseInt(_.slice(2),16):Number(_.slice(1)),d(x)):a[_]||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=y(/^\($/,/^\)$/);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=y(/^\{$/,/^\}$/);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 y(C,w){for(var v=1,b=n;b<e.length;b++){var _=e[b],x=_.content;if(_.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,y){if(t.languages[h])return{pattern:RegExp("((?:"+y+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,y,S){return h={code:h,grammar:y,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,y,S){var v=t.tokenize(h,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),C=0,w={},v=a(v.map(function(_){if(typeof _=="string")return _;for(var x,k,_=_.content;h.indexOf((k=C++,x="___"+S.toUpperCase()+"_"+k+"___"))!==-1;);return w[x]=_,x}).join(""),y,S),b=Object.keys(w);return C=0,(function _(x){for(var k=0;k<x.length;k++){if(C>=b.length)return;var N,A,M,R,j,O,I,q=x[k];typeof q=="string"||typeof q.content=="string"?(N=b[C],(I=(O=typeof q=="string"?q:q.content).indexOf(N))!==-1&&(++C,A=O.substring(0,I),j=w[N],M=void 0,(R={})["interpolation-punctuation"]=o,(R=t.tokenize(j,R)).length===3&&((M=[1,1]).push.apply(M,a(R[1],t.languages.javascript,"javascript")),R.splice.apply(R,M)),M=new t.Token("interpolation",R,i.alias,j),R=O.substring(I+N.length),j=[],A&&j.push(A),j.push(M),R&&(_(O=[R]),j.push.apply(j,O)),typeof q=="string"?(x.splice.apply(x,[k,1].concat(j)),k+=j.length-1):q.content=j)):(I=q.content,Array.isArray(I)?_(I):_([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 y(S){for(var C=0,w=S.length;C<w;C++){var v,b,_,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,_=t.languages[x])&&(v[1]=d(b,_,x))):y(v):typeof v!="string"&&y([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],y=!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--:y=!0),(y||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(y=a(h),p<d.length-1&&(typeof d[p+1]=="string"||d[p+1].type==="plain-text")&&(y+=a(d[p+1]),d.splice(p+1,1)),0<p&&(typeof d[p-1]=="string"||d[p-1].type==="plain-text")&&(y=a(d[p-1])+y,d.splice(p-1,1),p--),d[p]=new t.Token("plain-text",y,null,y)),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 Vu={};dO(Vu,{dracula:()=>gO,duotoneDark:()=>_O,duotoneLight:()=>bO,github:()=>SO,gruvboxMaterialDark:()=>QO,gruvboxMaterialLight:()=>JO,jettwaveDark:()=>$O,jettwaveLight:()=>VO,nightOwl:()=>CO,nightOwlLight:()=>EO,oceanicNext:()=>RO,okaidia:()=>NO,oneDark:()=>GO,oneLight:()=>YO,palenight:()=>MO,shadesOfPurple:()=>OO,synthwave84:()=>IO,ultramin:()=>BO,vsDark:()=>qC,vsLight:()=>HO});var mO={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)"}}]},gO=mO,vO={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"}}]},_O=vO,yO={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"}}]},bO=yO,xO={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"}}]},SO=xO,wO={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)"}}]},CO=wO,kO={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)"}}]},EO=kO,Ir={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},AO={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Ir.keyword}},{types:["attr-value"],style:{color:Ir.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Ir.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Ir.primitive}},{types:["boolean"],style:{color:Ir.boolean}},{types:["tag"],style:{color:Ir.tag}},{types:["string"],style:{color:Ir.string}},{types:["punctuation"],style:{color:Ir.string}},{types:["selector","char","builtin","inserted"],style:{color:Ir.char}},{types:["function"],style:{color:Ir.function}},{types:["operator","entity","url","variable"],style:{color:Ir.variable}},{types:["keyword"],style:{color:Ir.keyword}},{types:["atrule","class-name"],style:{color:Ir.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},RO=AO,TO={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"}}]},NO=TO,DO={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)"}}]},MO=DO,jO={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)"}}]},OO=jO,LO={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"}}]},IO=LO,zO={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)"}}]},BO=zO,PO={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)"}}]},qC=PO,FO={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)"}}]},HO=FO,UO={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"}}]},$O=UO,qO={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"}}]},VO=qO,WO={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%)"}}]},GO=WO,KO={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%)"}}]},YO=KO,XO={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"}}]},QO=XO,ZO={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"}}]},JO=ZO,e7=t=>D.useCallback(e=>{var n=e,{className:i,style:o,line:l}=n,u=$C(n,["className","style","line"]);const a=qh(Ki({},u),{className:ah("token-line",i)});return typeof t=="object"&&"plain"in t&&(a.style=t.plain),typeof o=="object"&&(a.style=Ki(Ki({},a.style||{}),o)),a},[t]),t7=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=$C(i,["token","className","style"]);const d=qh(Ki({},a),{className:ah("token",...o.types,l),children:o.content,style:e(o)});return u!=null&&(d.style=Ki(Ki({},d.style||{}),u)),d},[e])},n7=/\r\n|\r|\n/,Ob=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)},Lb=(t,e)=>{const n=t.length;return n>0&&t[n-1]===e?t:t.concat(e)},r7=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 y=n[u][l];if(typeof y=="string"?(p=u>0?p:["plain"],f=y):(p=Lb(p,y.type),y.alias&&(p=Lb(p,y.alias)),f=y.content),typeof f!="string"){u++,e.push(p),n.push(f),i.push(0),o.push(f.length);continue}const S=f.split(n7),C=S.length;a.push({types:p,content:S[0]});for(let w=1;w<C;w++)Ob(a),d.push(a=[]),a.push({types:p,content:S[w]})}u--,e.pop(),n.pop(),i.pop(),o.pop()}return Ob(a),d},Ib=r7,i7=({prism:t,code:e,grammar:n,language:i})=>D.useMemo(()=>{if(n==null)return Ib([e]);const o={code:e,grammar:n,language:i,tokens:[]};return t.hooks.run("before-tokenize",o),o.tokens=t.tokenize(e,n),t.hooks.run("after-tokenize",o),Ib(o.tokens)},[e,n,i,t]),s7=(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=Ki(Ki({},o[d]),a);o[d]=f}),o},{});return i.root=n,i.plain=qh(Ki({},n),{backgroundColor:void 0}),i},o7=s7,a7=({children:t,language:e,code:n,theme:i,prism:o})=>{const l=e.toLowerCase(),u=o7(i,l),a=e7(u),d=t7(u),f=o.languages[l],p=i7({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})},nv=t=>D.createElement(a7,qh(Ki({},t),{prism:t.prism||Ce,theme:t.theme||qC,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 l7(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(function(e){const n=ve.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 y=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,_=l!=null?l:"";let x;n[8]!==_?(x=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:_}),n[8]=_,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"&&"-",R=i==="context"&&" ";let j;n[12]!==b||n[13]!==A||n[14]!==M||n[15]!==R?(j=g.jsxs("span",{className:b,children:[A,M,R]}),n[12]=b,n[13]=A,n[14]=M,n[15]=R,n[16]=j):j=n[16];let O;n[17]!==o||n[18]!==a?(O=g.jsx(nv,{theme:Vu.oneDark,code:o,language:a,children:u7}),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 q;return n[23]!==x||n[24]!==N||n[25]!==I||n[26]!==y?(q=g.jsxs("div",{className:y,children:[x,N,I]}),n[23]=x,n[24]=N,n[25]=I,n[26]=y,n[27]=q):q=n[27],q}),VC=D.memo(function(e){const n=ve.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||l7(o),n[0]=o,n[1]=l,n[2]=p):p=n[2];const h=p;let y;n[3]!==d?(y=()=>f(!d),n[3]=d,n[4]=y):y=n[4];let S;n[5]!==d?(S=d?g.jsx(pc,{className:"size-3"}):g.jsx(Si,{className:"size-3"}),n[5]=d,n[6]=S):S=n[6];let C;n[7]!==y||n[8]!==S?(C=g.jsx("button",{onClick:y,className:"px-1 py-1 hover:bg-muted rounded",children:S}),n[7]=y,n[8]=S,n[9]=C):C=n[9];let w;n[10]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(o1,{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 _;n[16]!==C||n[17]!==v||n[18]!==b?(_=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]=_):_=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,R)=>g.jsx(c7,{...M,language:h},R))},A))}),n[20]=d,n[21]=i,n[22]=h,n[23]=x):x=n[23];let k;return n[24]!==_||n[25]!==x?(k=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[_,x]})}),n[24]=_,n[25]=x,n[26]=k):k=n[26],k});function u7(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 d7=20;function f7(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 h7=D.memo(t=>{const e=ve.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||f7(i),e[2]=o,e[3]=i,e[4]=h):h=e[4];const y=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 _;e[11]!==f?(_=f?g.jsx(pc,{className:"size-3"}):g.jsx(Si,{className:"size-3"}),e[11]=f,e[12]=_):_=e[12];let x;e[13]!==b||e[14]!==_?(x=g.jsx("button",{onClick:b,className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:_}),e[13]=b,e[14]=_,e[15]=x):x=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(o1,{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(Ns,{className:"size-3"}),"Created"]}),e[22]=l,e[23]=M):M=e[23];let R;e[24]!==N||e[25]!==A||e[26]!==M||e[27]!==x?(R=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]=R):R=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,d7);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]!==y||e[35]!==O?(I=g.jsx("div",{style:j,children:g.jsx(nv,{theme:Vu.oneDark,code:n,language:y,children:O})}),e[33]=n,e[34]=y,e[35]=O,e[36]=I):I=e[36];let q;return e[37]!==R||e[38]!==I?(q=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[R,I]})}),e[37]=R,e[38]=I,e[39]=q):q=e[39],q});function p7(t){const e=ve.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 m7={edit:m4,plus:mc,trash:gc,search:a1};function g7(t){const e=ve.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 v7(t){const e=ve.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 y;e[11]!==p?(y=p.map(_7),e[11]=p,e[12]=y):y=e[12];let S;return e[13]!==h||e[14]!==y?(S=g.jsxs("div",{className:"flex flex-col gap-3",children:[h,y]}),e[13]=h,e[14]=y,e[15]=S):S=e[15],S}function _7(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=m7[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(y7)})]},e)}function y7(t,e){return g.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[g.jsx(o1,{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(g7,{text:t.path})]},e)}function b7(t){const e=ve.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 y;e[9]!==o||e[10]!==i?(y=(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]=y):y=e[11];let S;return e[12]!==h||e[13]!==y?(S=g.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[h,y]}),e[12]=h,e[13]=y,e[14]=S):S=e[14],S}const x7={pending:{icon:n4,color:"text-muted-foreground"},in_progress:{icon:Pr,color:"text-warning",animate:!0},completed:{icon:Ku,color:"text-success"},cancelled:{icon:oh,color:"text-destructive"}},S7={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function w7(t){const e=ve.c(13),{title:n,items:i}=t;if(i.length===0)return null;let o;e[0]!==i?(o=i.filter(A7),e[0]=i,e[1]=o):o=e[1];const l=o.length;i.filter(E7),i.filter(k7);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(C7),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 C7(t,e){const n=x7[t.status],i=n.icon,o=S7[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 k7(t){return t.status==="pending"}function E7(t){return t.status==="in_progress"}function A7(t){return t.status==="completed"}const R7=D.memo(function(e){const n=ve.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(VC,{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(T7),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(h7,{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(v7,{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(p7,{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(b7,{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(w7,{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 T7(t,e){return g.jsx(VC,{path:t.path,hunks:t.hunks,language:t.language,additions:t.additions,deletions:t.deletions,matchInfo:t.matchInfo},`${t.path}-${e}`)}function N7(t){switch(t){case"pending":return g.jsx(Fx,{className:"size-3 text-warning"});case"running":return g.jsx(Pr,{className:"size-3 text-warning animate-spin"});case"completed":return g.jsx(Ku,{className:"size-3 text-success"});case"error":return g.jsx(oh,{className:"size-3 text-destructive"});case"interrupted":return g.jsx($x,{className:"size-3 text-warning"});default:return null}}function D7(t){if(t&&typeof t=="object"&&"_visualization"in t)return t._visualization}const M7=(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},j7=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?D7(f.output):void 0,y=p==="pending"?n.find(_=>_.toolCallId===e.callId):void 0,S=y?typeof((b=y.args)==null?void 0:b.command)=="string"?y.args.command:JSON.stringify(y.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 _=typeof f.output=="string"?f.output:JSON.stringify(f.output,null,2);await navigator.clipboard.writeText(_),d(!0),setTimeout(()=>d(!1),2e3)}},v=(()=>{try{const _=JSON.stringify(f.input);return _.length>50?_.slice(0,47)+"...":_}catch{return String(f.input)}})();return g.jsxs("div",{className:"my-1",children:[g.jsxs(Io,{open:l,onOpenChange:u,children:[g.jsx(zo,{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(Si,{className:"size-4 text-muted-foreground"}),g.jsx(D5,{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:[N7(p),C&&o&&g.jsxs(Fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:_=>{_.stopPropagation(),o(C)},title:"View session",children:[g.jsx(Eg,{className:"size-3"}),g.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),g.jsx(Bo,{children:g.jsxs("div",{className:"pl-5 pb-2 flex flex-col gap-2",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Input"}),g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(f.input,null,2)})]}),(p==="running"||p==="completed")&&C&&o&&g.jsxs(Fe,{variant:"outline",className:"w-full",size:"sm",onClick:()=>o(C),children:[g.jsx(Eg,{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(Fe,{variant:"ghost",size:"icon",onClick:w,className:"size-6",children:a?g.jsx(Ns,{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"&&y&&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(Yn,{variant:"outline",className:"text-warning border-warning",children:y.permissionType}),g.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:y.permissionKey})]}),y.message&&g.jsx("p",{className:"text-sm",children:y.message}),y.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(Io,{children:[g.jsx(zo,{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(Si,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Bo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words overflow-wrap-break",children:S})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Fe,{variant:"outline",size:"sm",onClick:()=>i(e.callId,!1,!1),children:"Deny"}),g.jsx(Fe,{variant:"secondary",size:"sm",onClick:()=>i(e.callId,!0,!1),children:"Approve"}),g.jsx(Fe,{size:"sm",onClick:()=>i(e.callId,!0,!0),children:"Always Allow"})]})]}),p==="completed"&&h&&g.jsx("div",{className:"mt-2",children:g.jsx(R7,{visualization:h})})]})},M7);function O7(t){const e=ve.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=_=>_.name.toLowerCase().includes(i.toLowerCase()),e[8]=i,e[9]=v):v=e[9],u=n.filter(v),u.length===0){let _;e[10]!==i?(_=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No prompts matching "/',i,'"']}),e[10]=i,e[11]=_):_=e[11],f=_;break e}a="p-1";let b;e[12]!==l||e[13]!==o?(b=(_,x)=>g.jsxs("button",{onClick:()=>l(_),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(B4,{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:["/",_.name]}),g.jsx("div",{className:"text-xs text-muted-foreground truncate",children:_.description})]})]},_.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 y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[16]=y):y=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",y," 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 L7(t){const e=ve.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(_=>[..._,b]),u(!1),o(""),b},e[1]=p):p=e[1];const h=p,y=I7;let S;e[2]!==d?(S=v=>{const b=/@([^\s@]+)/g,_=[];let x;for(;(x=b.exec(v))!==null;){const k=x[1];d.some(N=>N.path===k)&&!_.some(N=>N.path===k)&&_.push({type:"file",path:k,display:k.split("/").pop()||k})}return _},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:y,extractMentions:C},e[4]=C,e[5]=d,e[6]=i,e[7]=l,e[8]=w):w=e[8],w}function I7(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 z7(t,e){return e?t.content.includes("ARG")?t.content.replace("ARG",e):`${t.content}
538
- ${e}`:t.content}function B7(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 P7=D.forwardRef(function(e,n){const i=ve.c(90),{onSendMessage:o,disabled:l,isStreaming:u,onStopStreaming:a,placeholder:d,workspaceId:f,serverUrl:p,apiToken:h,prompts:y}=e,S=d===void 0?"Type a message...":d;let C;i[0]!==y?(C=y===void 0?[]:y,i[0]=y,i[1]=C):C=i[1];const w=C,[v,b]=D.useState(""),[_,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,R]=D.useState(0),[j,O]=D.useState("none"),[I,q]=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}=L7(Z);let Q;i[7]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{R(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 V;i[13]!==v?(V=[v],i[13]=v,i[14]=V):V=i[14],D.useEffect(X,V);let $;if(i[15]!==I||i[16]!==w){let ke;i[18]!==I?(ke=He=>He.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 He=ke.target.value,ut=ke.target.selectionStart||0;b(He),x(ut);const mt=He.lastIndexOf("/",ut);if(mt!==-1){const Ut=mt>0?He[mt-1]:`
539
- `,nn=He.slice(mt+1,ut);if((Ut===`
540
- `||Ut===" "||Ut==="")&&!nn.includes(" ")){q(nn),O("prompts");return}}const Kt=He.lastIndexOf("@",ut);if(Kt!==-1){const Ut=He.slice(Kt+1,ut);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]!==_||i[24]!==H||i[25]!==v||i[26]!==F||i[27]!==z?(Re=ke=>{const He=H(ke),ut=F(v,_,He);b(ut.text),O("none"),z(!1),A([]),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(ut.cursorPos,ut.cursorPos))},0)},i[23]=_,i[24]=H,i[25]=v,i[26]=F,i[27]=z,i[28]=Re):Re=i[28];const je=Re;let Pe;i[29]!==_||i[30]!==v?(Pe=ke=>{const He=v.lastIndexOf("/",_),ut=v.slice(0,He),mt=v.slice(He+1),Kt=mt.indexOf(" "),Ut=Kt!==-1?mt.slice(Kt):"",nn=`${ut}/${ke.name}${Ut}`,Qt=He+1+ke.name.length+0;b(nn),O("none"),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(Qt,Qt))},0)},i[29]=_,i[30]=v,i[31]=Pe):Pe=i[31];const Te=Pe;let tt;i[32]!==l||i[33]!==v||i[34]!==o||i[35]!==w?(tt=ke=>{if(ke==null||ke.preventDefault(),!v.trim()||l)return;const He=B7(v);if(He){const ut=w.find(mt=>mt.name===He.command);if(ut){const mt=z7(ut,He.rest);o(mt),b("");return}}o(v.trim()),b("")},i[32]=l,i[33]=v,i[34]=o,i[35]=w,i[36]=tt):tt=i[36];const it=tt;let ct;i[37]!==N||i[38]!==ne||i[39]!==je||i[40]!==Te||i[41]!==it||i[42]!==M||i[43]!==z||i[44]!==ae||i[45]!==ie?(ct=ke=>{if(!ke.nativeEvent.isComposing){if(ie&&ne.length>0)switch(ke.key){case"ArrowDown":{ke.preventDefault(),R(He=>Math.min(He+1,ne.length-1));return}case"ArrowUp":{ke.preventDefault(),R(F7);return}case"Enter":{if(ke.shiftKey)return;ke.preventDefault(),ne[M]&&Te(ne[M]);return}case"Tab":{ke.preventDefault(),ne[M]&&Te(ne[M]);return}case"Escape":{ke.preventDefault(),O("none");return}}if(ae&&N.length>0)switch(ke.key){case"ArrowDown":{ke.preventDefault(),R(He=>Math.min(He+1,N.length-1));return}case"ArrowUp":{ke.preventDefault(),R(H7);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]=Te,i[41]=it,i[42]=M,i[43]=z,i[44]=ae,i[45]=ie,i[46]=ct):ct=i[46];const ot=ct;let pt;i[47]===Symbol.for("react.memo_cache_sentinel")?(pt=ke=>{A(ke)},i[47]=pt):pt=i[47];const Ze=pt;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 He;i[49]===Symbol.for("react.memo_cache_sentinel")?(He=g.jsx(Gx,{className:"size-4","data-icon":"inline-start"}),i[49]=He):He=i[49];let ut;return i[50]!==a?(ut=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(Fe,{variant:"outline",size:"sm",onClick:a,children:[He,"Stop"]})]})}),i[50]=a,i[51]=ut):ut=i[51],ut}const Je=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(z8,{asChild:!0,children:g.jsx(M8,{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]!==Te||i[64]!==I||i[65]!==w||i[66]!==ee||i[67]!==M||i[68]!==p||i[69]!==ae||i[70]!==f?(_e=g.jsx(zh,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:U7,onCloseAutoFocus:$7,children:ae?g.jsx(yj,{workspaceId:f||"",searchQuery:ee,selectedIndex:M,onSelect:je,onFilesChange:Ze,serverUrl:p,apiToken:h}):g.jsx(O7,{prompts:w,query:I,selectedIndex:M,onSelect:Te})}),i[61]=h,i[62]=je,i[63]=Te,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 Ne;i[72]!==Je||i[73]!==ue||i[74]!==xe||i[75]!==_e?(Ne=g.jsx("div",{className:"flex-1 relative",children:g.jsxs(Ih,{open:Je,onOpenChange:ue,children:[xe,_e]})}),i[72]=Je,i[73]=ue,i[74]=xe,i[75]=_e,i[76]=Ne):Ne=i[76];let Le;i[77]!==l||i[78]!==v?(Le=!v.trim()||l,i[77]=l,i[78]=v,i[79]=Le):Le=i[79];let $e;i[80]===Symbol.for("react.memo_cache_sentinel")?($e=g.jsx(o5,{className:"size-4"}),i[80]=$e):$e=i[80];let Ie;i[81]!==Le?(Ie=g.jsx(Fe,{type:"submit",disabled:Le,size:"default",className:"h-11",children:$e}),i[81]=Le,i[82]=Ie):Ie=i[82];let Ve;i[83]!==Ne||i[84]!==Ie?(Ve=g.jsxs("div",{className:"flex gap-3 items-end",children:[Ne,Ie]}),i[83]=Ne,i[84]=Ie,i[85]=Ve):Ve=i[85];let _t;i[86]===Symbol.for("react.memo_cache_sentinel")?(_t=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]=_t):_t=i[86];let dt;return i[87]!==it||i[88]!==Ve?(dt=g.jsxs("form",{onSubmit:it,className:"p-4 border-t border-border bg-card",children:[Ve,_t]}),i[87]=it,i[88]=Ve,i[89]=dt):dt=i[89],dt});function F7(t){return Math.max(t-1,0)}function H7(t){return Math.max(t-1,0)}function U7(t){return t.preventDefault()}function $7(t){return t.preventDefault()}function q7(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const V7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,W7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G7={};function zb(t,e){return(G7.jsx?W7:V7).test(t)}const K7=/[ \t\n\f\r]/g;function Y7(t){return typeof t=="object"?t.type==="text"?Bb(t.value):!1:Bb(t)}function Bb(t){return t.replace(K7,"")===""}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 WC(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 Kg(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 X7=0;const bt=Va(),hn=Va(),Yg=Va(),De=Va(),Vt=Va(),ac=Va(),zr=Va();function Va(){return 2**++X7}const Xg=Object.freeze(Object.defineProperty({__proto__:null,boolean:bt,booleanish:hn,commaOrSpaceSeparated:zr,commaSeparated:ac,number:De,overloadedBoolean:Yg,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),ag=Object.keys(Xg);class rv extends wr{constructor(e,n,i,o){let l=-1;if(super(e,n),Pb(this,"space",o),typeof i=="number")for(;++l<ag.length;){const u=ag[l];Pb(this,ag[l],(i&Xg[u])===Xg[u])}}}rv.prototype.defined=!0;function Pb(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 rv(i,t.transform(t.attributes||{},i),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),e[i]=l,n[Kg(i)]=i,n[Kg(l.attribute)]=i}return new fd(e,n,t.space)}const GC=Tc({properties:{ariaActiveDescendant:null,ariaAtomic:hn,ariaAutoComplete:null,ariaBusy:hn,ariaChecked:hn,ariaColCount:De,ariaColIndex:De,ariaColSpan:De,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:hn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:hn,ariaFlowTo:Vt,ariaGrabbed:hn,ariaHasPopup:null,ariaHidden:hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:De,ariaLive:null,ariaModal:hn,ariaMultiLine:hn,ariaMultiSelectable:hn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:De,ariaPressed:hn,ariaReadOnly:hn,ariaRelevant:null,ariaRequired:hn,ariaRoleDescription:Vt,ariaRowCount:De,ariaRowIndex:De,ariaRowSpan:De,ariaSelected:hn,ariaSetSize:De,ariaSort:null,ariaValueMax:De,ariaValueMin:De,ariaValueNow:De,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function KC(t,e){return e in t?t[e]:e}function YC(t,e){return KC(t,e.toLowerCase())}const Q7=Tc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ac,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:bt,allowPaymentRequest:bt,allowUserMedia:bt,alt:null,as:null,async:bt,autoCapitalize:null,autoComplete:Vt,autoFocus:bt,autoPlay:bt,blocking:Vt,capture:null,charSet:null,checked:bt,cite:null,className:Vt,cols:De,colSpan:null,content:null,contentEditable:hn,controls:bt,controlsList:Vt,coords:De|ac,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bt,defer:bt,dir:null,dirName:null,disabled:bt,download:Yg,draggable:hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bt,formTarget:null,headers:Vt,height:De,hidden:Yg,high:De,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:bt,inputMode:null,integrity:null,is:null,isMap:bt,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:bt,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bt,low:De,manifest:null,max:null,maxLength:De,media:null,method:null,min:null,minLength:De,multiple:bt,muted:bt,name:null,nonce:null,noModule:bt,noValidate:bt,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:bt,optimum:De,pattern:null,ping:Vt,placeholder:null,playsInline:bt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bt,referrerPolicy:null,rel:Vt,required:bt,reversed:bt,rows:De,rowSpan:De,sandbox:Vt,scope:null,scoped:bt,seamless:bt,selected:bt,shadowRootClonable:bt,shadowRootDelegatesFocus:bt,shadowRootMode:null,shape:null,size:De,sizes:null,slot:null,span:De,spellCheck:hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:De,step:null,style:null,tabIndex:De,target:null,title:null,translate:null,type:null,typeMustMatch:bt,useMap:null,value:hn,width:De,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:De,borderColor:null,bottomMargin:De,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bt,declare:bt,event:null,face:null,frame:null,frameBorder:null,hSpace:De,leftMargin:De,link:null,longDesc:null,lowSrc:null,marginHeight:De,marginWidth:De,noResize:bt,noHref:bt,noShade:bt,noWrap:bt,object:null,profile:null,prompt:null,rev:null,rightMargin:De,rules:null,scheme:null,scrolling:hn,standby:null,summary:null,text:null,topMargin:De,valueType:null,version:null,vAlign:null,vLink:null,vSpace:De,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bt,disableRemotePlayback:bt,prefix:null,property:null,results:De,security:null,unselectable:null},space:"html",transform:YC}),Z7=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:zr,accentHeight:De,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:De,amplitude:De,arabicForm:null,ascent:De,attributeName:null,attributeType:null,azimuth:De,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:De,by:null,calcMode:null,capHeight:De,className:Vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:De,diffuseConstant:De,direction:null,display:null,dur:null,divisor:De,dominantBaseline:null,download:bt,dx:null,dy:null,edgeMode:null,editable:null,elevation:De,enableBackground:null,end:null,event:null,exponent:De,externalResourcesRequired:null,fill:null,fillOpacity:De,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ac,g2:ac,glyphName:ac,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:De,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:De,horizOriginX:De,horizOriginY:De,id:null,ideographic:De,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:De,k:De,k1:De,k2:De,k3:De,k4:De,kernelMatrix:zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:De,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:De,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:De,overlineThickness:De,paintOrder:null,panose1:null,path:null,pathLength:De,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:De,pointsAtY:De,pointsAtZ:De,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zr,rev:zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zr,requiredFeatures:zr,requiredFonts:zr,requiredFormats:zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:De,specularExponent:De,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:De,strikethroughThickness:De,string:null,stroke:null,strokeDashArray:zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:De,strokeOpacity:De,strokeWidth:null,style:null,surfaceScale:De,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zr,tabIndex:De,tableValues:null,target:null,targetX:De,targetY:De,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:De,underlineThickness:De,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:De,values:null,vAlphabetic:De,vMathematical:De,vectorEffect:null,vHanging:De,vIdeographic:De,version:null,vertAdvY:De,vertOriginX:De,vertOriginY:De,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:De,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:KC}),XC=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()}}),QC=Tc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:YC}),ZC=Tc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),J7={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"},eL=/[A-Z]/g,Fb=/-[a-z]/g,tL=/^data[-\w.:]+$/i;function nL(t,e){const n=Kg(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"&&tL.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Fb,iL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Fb.test(l)){let u=l.replace(eL,rL);u.charAt(0)!=="-"&&(u="-"+u),e="data"+u}}o=rv}return new o(i,e)}function rL(t){return"-"+t.toLowerCase()}function iL(t){return t.charAt(1).toUpperCase()}const sL=WC([GC,Q7,XC,QC,ZC],"html"),iv=WC([GC,Z7,XC,QC,ZC],"svg");function oL(t){return t.join(" ").trim()}var Xl={},lg,Hb;function aL(){if(Hb)return lg;Hb=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="",y="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 _=1,x=1;function k(W){var K=W.match(e);K&&(_+=K.length);var G=W.lastIndexOf(d);x=~G?W.length-G:x+W.length}function N(){var W={line:_,column:x};return function(K){return K.position=new A(W),j(),K}}function A(W){this.start=W,this.end={line:_,column:x},this.source=b.source}A.prototype.content=v;function M(W){var K=new Error(b.source+":"+_+":"+x+": "+W);if(K.reason=W,K.filename=b.source,K.line=_,K.column=x,K.source=v,!b.silent)throw K}function R(W){var K=W.exec(v);if(K){var G=K[0];return k(G),v=v.slice(G.length),K}}function j(){R(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:y,comment:G})}}function q(){var W=N(),K=R(i);if(K){if(I(),!R(o))return M("property missing ':'");var G=R(l),Z=W({type:S,property:w(K[0].replace(t,h)),value:G?w(G[0].replace(t,h)):h});return R(u),Z}}function U(){var W=[];O(W);for(var K;K=q();)K!==!1&&(W.push(K),O(W));return W}return j(),U()}function w(v){return v?v.replace(a,h):h}return lg=C,lg}var Ub;function lL(){if(Ub)return Xl;Ub=1;var t=Xl&&Xl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.default=n;const e=t(aL());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 Xl}var xu={},$b;function cL(){if($b)return xu;$b=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,qb;function uL(){if(qb)return Su;qb=1;var t=Su&&Su.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},e=t(lL()),n=cL();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 dL=uL();const fL=ih(dL),JC=e3("end"),sv=e3("start");function e3(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 hL(t){const e=sv(t),n=JC(t);if(e&&n)return{start:e,end:n}}function Mu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vb(t.position):"start"in t||"end"in t?Vb(t):"line"in t||"column"in t?Qg(t):""}function Qg(t){return Wb(t&&t.line)+":"+Wb(t&&t.column)}function Vb(t){return Qg(t&&t.start)+"-"+Qg(t&&t.end)}function Wb(t){return t&&typeof t=="number"?t:1}class Qn 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}}Qn.prototype.file="";Qn.prototype.name="";Qn.prototype.reason="";Qn.prototype.message="";Qn.prototype.stack="";Qn.prototype.column=void 0;Qn.prototype.line=void 0;Qn.prototype.ancestors=void 0;Qn.prototype.cause=void 0;Qn.prototype.fatal=void 0;Qn.prototype.place=void 0;Qn.prototype.ruleId=void 0;Qn.prototype.source=void 0;const ov={}.hasOwnProperty,pL=new Map,mL=/[A-Z]/g,gL=new Set(["table","tbody","thead","tfoot","tr"]),vL=new Set(["td","th"]),t3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _L(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=EL(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=kL(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"?iv:sL,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=n3(o,t,void 0);return l&&typeof l!="string"?l:o.create(t,o.Fragment,{children:l||void 0},void 0)}function n3(t,e,n){if(e.type==="element")return yL(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return bL(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return SL(t,e,n);if(e.type==="mdxjsEsm")return xL(t,e);if(e.type==="root")return wL(t,e,n);if(e.type==="text")return CL(t,e)}function yL(t,e,n){const i=t.schema;let o=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=iv,t.schema=o),t.ancestors.push(e);const l=i3(t,e.tagName,!1),u=AL(t,e);let a=lv(t,e);return gL.has(e.tagName)&&(a=a.filter(function(d){return typeof d=="string"?!Y7(d):!0})),r3(t,u,l,e),av(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function bL(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 xL(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Wu(t,e.position)}function SL(t,e,n){const i=t.schema;let o=i;e.name==="svg"&&i.space==="html"&&(o=iv,t.schema=o),t.ancestors.push(e);const l=e.name===null?t.Fragment:i3(t,e.name,!0),u=RL(t,e),a=lv(t,e);return r3(t,u,l,e),av(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function wL(t,e,n){const i={};return av(i,lv(t,e)),t.create(e,t.Fragment,i,n)}function CL(t,e){return e.value}function r3(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function av(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function kL(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 EL(t,e){return n;function n(i,o,l,u){const a=Array.isArray(l.children),d=sv(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 AL(t,e){const n={};let i,o;for(o in e.properties)if(o!=="children"&&ov.call(e.properties,o)){const l=TL(t,o,e.properties[o]);if(l){const[u,a]=l;t.tableCellAlignToStyle&&u==="align"&&typeof a=="string"&&vL.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 RL(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 lv(t,e){const n=[];let i=-1;const o=t.passKeys?new Map:pL;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=n3(t,l,u);a!==void 0&&n.push(a)}return n}function TL(t,e,n){const i=nL(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?q7(n):oL(n)),i.property==="style"){let o=typeof n=="object"?n:NL(t,String(n));return t.stylePropertyNameCase==="css"&&(o=DL(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&i.space?J7[i.property]||i.property:i.attribute,n]}}function NL(t,e){try{return fL(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,o=new Qn("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=t3+"#cannot-parse-style-attribute",o}}function i3(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=zb(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=zb(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const o=i.value;return ov.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 Qn("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=t3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DL(t){const e={};let n;for(n in t)ov.call(t,n)&&(e[ML(n)]=t[n]);return e}function ML(t){let e=t.replace(mL,jL);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function jL(t){return"-"+t.toLowerCase()}const cg={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"]},OL={};function cv(t,e){const n=OL,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return s3(t,i,o)}function s3(t,e,n){if(LL(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Gb(t.children,e,n)}return Array.isArray(t)?Gb(t,e,n):""}function Gb(t,e,n){const i=[];let o=-1;for(;++o<t.length;)i[o]=s3(t[o],e,n);return i.join("")}function LL(t){return!!(t&&typeof t=="object")}const Kb=document.createElement("i");function uv(t){const e="&"+t+";";Kb.innerHTML=e;const n=Kb.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Ur(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?(Ur(t,t.length,0,e),t):e}const Yb={}.hasOwnProperty;function o3(t){const e={};let n=-1;for(;++n<t.length;)IL(e,t[n]);return e}function IL(t,e){let n;for(n in e){const o=(Yb.call(t,n)?t[n]:void 0)||(t[n]={}),l=e[n];let u;if(l)for(u in l){Yb.call(o,u)||(o[u]=[]);const a=l[u];zL(o[u],Array.isArray(a)?a:a?[a]:[])}}}function zL(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);Ur(t,0,0,i)}function a3(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 xi(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ir=qo(/[A-Za-z]/),Xn=qo(/[\dA-Za-z]/),BL=qo(/[#-'*+\--9=?A-Z^-~]/);function eh(t){return t!==null&&(t<32||t===127)}const Zg=qo(/\d/),PL=qo(/[\dA-Fa-f]/),FL=qo(/[!-/:-@[-`{-~]/);function st(t){return t!==null&&t<-2}function qt(t){return t!==null&&(t<0||t===32)}function kt(t){return t===-2||t===-1||t===32}const Vh=qo(new RegExp("\\p{P}|\\p{S}","u")),Fa=qo(/\s/);function qo(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&&Xn(t.charCodeAt(n+1))&&Xn(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 HL={tokenize:UL};function UL(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 $L={tokenize:qL},Xb={tokenize:VL};function qL(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&&_();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 Ur(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 y(x);if(o.currentConstruct&&o.currentConstruct.concrete)return C(x);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Xb,p,h)(x)}function p(x){return o&&_(),b(i),y(x)}function h(x){return e.parser.lazy[e.now().line]=i!==n.length,u=e.now().offset,C(x)}function y(x){return e.containerState={},t.attempt(Xb,S,C)(x)}function S(x){return i++,n.push([e.currentConstruct,e.containerState]),y(x)}function C(x){if(x===null){o&&_(),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 R=M,j,O;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){if(j){O=e.events[R][1].end;break}j=!0}for(b(i),A=M;A<e.events.length;)e.events[A][1].end={...O},A++;Ur(e.events,R+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 _(){o.write([null]),l=void 0,o=void 0,e.containerState._closeFlow=void 0}}function VL(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||qt(t)||Fa(t))return 1;if(Vh(t))return 2}function Wh(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 Jg={name:"attention",resolveAll:WL,tokenize:GL};function WL(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},y={...t[n][1].start};Qb(h,-d),Qb(y,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:y},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,Wh(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,Ur(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 GL(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),y=!o||o===2&&p||n.includes(i);return f._open=!!(l===42?h:h&&(o||!y)),f._close=!!(l===42?y:y&&(p||!h)),e(d)}}function Qb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const KL={name:"autolink",tokenize:YL};function YL(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 ir(S)?(t.consume(S),u):S===64?n(S):f(S)}function u(S){return S===43||S===45||S===46||Xn(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||Xn(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):BL(S)?(t.consume(S),f):n(S)}function p(S){return Xn(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):y(S)}function y(S){if((S===45||Xn(S))&&i++<63){const C=S===45?y:h;return t.consume(S),C}return n(S)}}const hd={partial:!0,tokenize:XL};function XL(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 l3={continuation:{tokenize:ZL},exit:JL,name:"blockQuote",tokenize:QL};function QL(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 ZL(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(l3,e,n)(u)}}function JL(t){t.exit("blockQuote")}const c3={name:"characterEscape",tokenize:e9};function e9(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 FL(l)?(t.enter("characterEscapeValue"),t.consume(l),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(l)}}const u3={name:"characterReference",tokenize:t9};function t9(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=Xn,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=PL,p):(t.enter("characterReferenceValue"),l=7,u=Zg,p(h))}function p(h){if(h===59&&o){const y=t.exit("characterReferenceValue");return u===Xn&&!uv(i.sliceSerialize(y))?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 Zb={partial:!0,tokenize:r9},Jb={concrete:!0,name:"codeFenced",tokenize:n9};function n9(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(Zb,w,k)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(A))}function y(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),y)}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,_,"linePrefix",l+1)(A):_(A)}function _(A){return A===null||st(A)?t.check(Zb,w,k)(A):(t.enter("codeFlowValue"),x(A))}function x(A){return A===null||st(A)?(t.exit("codeFlowValue"),_(A)):(t.consume(A),x)}function k(A){return t.exit("codeFenced"),e(A)}function N(A,M,R){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,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):q(K)}function q(K){return K===a?(A.enter("codeFencedFenceSequence"),U(K)):R(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)):R(K)}function W(K){return K===null||st(K)?(A.exit("codeFencedFence"),M(K)):R(K)}}}function r9(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 ug={name:"codeIndented",tokenize:s9},i9={partial:!0,tokenize:o9};function s9(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(i9,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 o9(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 a9={name:"codeText",previous:c9,resolve:l9,tokenize:u9};function l9(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 c9(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function u9(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 d9{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 d3(t){const e={};let n=-1,i,o,l,u,a,d,f;const p=new d9(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,f9(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 Ur(t,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function f9(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,y=-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;++y<a.length;)a[y][0]==="exit"&&a[y-1][0]==="enter"&&a[y][1].type===a[y-1][1].type&&a[y][1].start.line!==a[y][1].end.line&&(w=y+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(),y=v.length;y--;){const b=a.slice(v[y],v[y+1]),_=l.pop();d.push([_,_+b.length-1]),t.splice(_,2,b)}for(d.reverse(),y=-1;++y<d.length;)f[C+d[y][0]]=C+d[y][1],C+=d[y][1]-d[y][0]-1;return f}const h9={resolve:m9,tokenize:g9},p9={partial:!0,tokenize:v9};function m9(t){return d3(t),t}function g9(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(p9,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 v9(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 f3(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),y):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 y(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),y(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||qt(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 h3(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?y:h)}function y(S){return S===91||S===92||S===93?(t.consume(S),a++,h):h(S)}}function p3(t,e,n,i,o,l){let u;return a;function a(y){return y===34||y===39||y===40?(t.enter(i),t.enter(o),t.consume(y),t.exit(o),u=y===40?41:y,d):n(y)}function d(y){return y===u?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),e):(t.enter(l),f(y))}function f(y){return y===u?(t.exit(l),d(u)):y===null?n(y):st(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),Nt(t,f,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===u||y===null||st(y)?(t.exit("chunkString"),f(y)):(t.consume(y),y===92?h:p)}function h(y){return y===u||y===92?(t.consume(y),p):p(y)}}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 _9={name:"definition",tokenize:b9},y9={partial:!0,tokenize:x9};function b9(t,e,n){const i=this;let o;return l;function l(S){return t.enter("definition"),u(S)}function u(S){return h3.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function a(S){return o=xi(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 qt(S)?ju(t,f)(S):f(S)}function f(S){return f3(t,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function p(S){return t.attempt(y9,h,h)(S)}function h(S){return kt(S)?Nt(t,y,"whitespace")(S):y(S)}function y(S){return S===null||st(S)?(t.exit("definition"),i.parser.defined.push(o),e(S)):n(S)}}function x9(t,e,n){return i;function i(a){return qt(a)?ju(t,o)(a):n(a)}function o(a){return p3(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 S9={name:"hardBreakEscape",tokenize:w9};function w9(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 C9={name:"headingAtx",resolve:k9,tokenize:E9};function k9(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"},Ur(t,i,n-i+1,[["enter",o,e],["enter",l,e],["exit",l,e],["exit",o,e]])),t}function E9(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||qt(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||qt(p)?(t.exit("atxHeadingText"),a(p)):(t.consume(p),f)}}const A9=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ex=["pre","script","style","textarea"],R9={concrete:!0,name:"htmlFlow",resolveTo:D9,tokenize:M9},T9={partial:!0,tokenize:O9},N9={partial:!0,tokenize:j9};function D9(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 M9(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),y):F===47?(t.consume(F),l=!0,w):F===63?(t.consume(F),o=3,i.interrupt?e:L):ir(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function y(F){return F===45?(t.consume(F),o=2,S):F===91?(t.consume(F),o=5,a=0,C):ir(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:q:C):n(F)}function w(F){return ir(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function v(F){if(F===null||F===47||F===62||qt(F)){const Q=F===47,te=u.toLowerCase();return!Q&&!l&&ex.includes(te)?(o=1,i.interrupt?e(F):q(F)):A9.includes(u.toLowerCase())?(o=6,Q?(t.consume(F),b):i.interrupt?e(F):q(F)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(F):l?_(F):x(F))}return F===45||Xn(F)?(t.consume(F),u+=String.fromCharCode(F),v):n(F)}function b(F){return F===62?(t.consume(F),i.interrupt?e:q):n(F)}function _(F){return kt(F)?(t.consume(F),_):O(F)}function x(F){return F===47?(t.consume(F),O):F===58||F===95||ir(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||Xn(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):R(F)}function M(F){return F===d?(t.consume(F),d=null,j):F===null||st(F)?n(F):(t.consume(F),M)}function R(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||qt(F)?N(F):(t.consume(F),R)}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)?q(F):kt(F)?(t.consume(F),I):n(F)}function q(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(T9,H,U)(F)):F===null||st(F)?(t.exit("htmlFlowData"),U(F)):(t.consume(F),q)}function U(F){return t.check(N9,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"),q(F))}function G(F){return F===45?(t.consume(F),L):q(F)}function Z(F){return F===47?(t.consume(F),u="",ee):q(F)}function ee(F){if(F===62){const Q=u.toLowerCase();return ex.includes(Q)?(t.consume(F),z):q(F)}return ir(F)&&u.length<8?(t.consume(F),u+=String.fromCharCode(F),ee):q(F)}function B(F){return F===93?(t.consume(F),L):q(F)}function L(F){return F===62?(t.consume(F),z):F===45&&o===2?(t.consume(F),L):q(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 j9(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 O9(t,e,n){return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(hd,e,n)}}const L9={name:"htmlText",tokenize:I9};function I9(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):ir(L)?(t.consume(L),R):n(L)}function f(L){return L===45?(t.consume(L),p):L===91?(t.consume(L),l=0,C):ir(L)?(t.consume(L),_):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),y):st(L)?(u=h,Z(L)):(t.consume(L),h)}function y(L){return L===45?(t.consume(L),S):h(L)}function S(L){return L===62?G(L):L===45?y(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 _(L){return L===null||L===62?G(L):st(L)?(u=_,Z(L)):(t.consume(L),_)}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 ir(L)?(t.consume(L),A):n(L)}function A(L){return L===45||Xn(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 R(L){return L===45||Xn(L)?(t.consume(L),R):L===47||L===62||qt(L)?j(L):n(L)}function j(L){return L===47?(t.consume(L),G):L===58||L===95||ir(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||Xn(L)?(t.consume(L),O):I(L)}function I(L){return L===61?(t.consume(L),q):st(L)?(u=I,Z(L)):kt(L)?(t.consume(L),I):j(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),o=L,U):st(L)?(u=q,Z(L)):kt(L)?(t.consume(L),q):(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||qt(L)?j(L):(t.consume(L),W)}function K(L){return L===47||L===62||qt(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 dv={name:"labelEnd",resolveAll:F9,resolveTo:H9,tokenize:U9},z9={tokenize:$9},B9={tokenize:q9},P9={tokenize:V9};function F9(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&&Ur(t,0,t.length,n),t}function H9(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,Wh(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]]),Ur(t,l,t.length,a),t}function U9(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(y){return l?l._inactive?h(y):(u=i.parser.defined.includes(xi(i.sliceSerialize({start:l.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),d):n(y)}function d(y){return y===40?t.attempt(z9,p,u?p:h)(y):y===91?t.attempt(B9,p,u?f:h)(y):u?p(y):h(y)}function f(y){return t.attempt(P9,p,h)(y)}function p(y){return e(y)}function h(y){return l._balanced=!0,n(y)}}function $9(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 qt(h)?ju(t,l)(h):l(h)}function l(h){return h===41?p(h):f3(t,u,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function u(h){return qt(h)?ju(t,d)(h):p(h)}function a(h){return n(h)}function d(h){return h===34||h===39||h===40?p3(t,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return qt(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 q9(t,e,n){const i=this;return o;function o(a){return h3.call(i,t,l,u,"reference","referenceMarker","referenceString")(a)}function l(a){return i.parser.defined.includes(xi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function u(a){return n(a)}}function V9(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 W9={name:"labelStartImage",resolveAll:dv.resolveAll,tokenize:G9};function G9(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 K9={name:"labelStartLink",resolveAll:dv.resolveAll,tokenize:Y9};function Y9(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 dg={name:"lineEnding",tokenize:X9};function X9(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:Q9};function Q9(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:tI},exit:rI,name:"list",tokenize:eI},Z9={partial:!0,tokenize:iI},J9={partial:!0,tokenize:nI};function eI(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:Zg(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 Zg(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(Z9,y,h))}function p(S){return i.containerState.initialBlankLine=!0,l++,y(S)}function h(S){return kt(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),y):n(S)}function y(S){return i.containerState.size=l+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(S)}}function tI(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(J9,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 nI(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 rI(t){t.exit(this.containerState.type)}function iI(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 tx={name:"setextUnderline",resolveTo:sI,tokenize:oI};function sI(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 oI(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 aI={tokenize:lI};function lI(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(h9,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 cI={resolveAll:g3()},uI=m3("string"),dI=m3("text");function m3(t){return{resolveAll:g3(t==="text"?fI: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 y=-1;if(h)for(;++y<h.length;){const S=h[y];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function g3(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 fI(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 hI={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:l3},pI={91:_9},mI={[-2]:ug,[-1]:ug,32:ug},gI={35:C9,42:Lf,45:[tx,Lf],60:R9,61:tx,95:Lf,96:Jb,126:Jb},vI={38:u3,92:c3},_I={[-5]:dg,[-4]:dg,[-3]:dg,33:W9,38:u3,42:Jg,60:[KL,L9],91:K9,92:[S9,c3],93:dv,95:Jg,96:a9},yI={null:[Jg,cI]},bI={null:[42,95]},xI={null:[]},SI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bI,contentInitial:pI,disable:xI,document:hI,flow:gI,flowInitial:mI,insideSpan:yI,string:vI,text:_I},Symbol.toStringTag,{value:"Module"}));function wI(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:_,enter:x,exit:k,interrupt:M(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:C,parser:t,previous:null,sliceSerialize:y,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?[]:(R(e,0),f.events=Wh(l,f.events,f),f.events)}function y(I,q){return kI(S(I),q)}function S(I){return CI(u,I)}function C(){const{_bufferIndex:I,_index:q,line:U,column:W,offset:K}=i;return{_bufferIndex:I,_index:q,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 q=u[i._index];if(typeof q=="string")for(I=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===I&&i._bufferIndex<q.length;)b(q.charCodeAt(i._bufferIndex));else b(q)}}function b(I){p=p(I)}function _(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,q){const U=q||{};return U.type=I,U.start=C(),f.events.push(["enter",U,f]),a.push(U),U}function k(I){const q=a.pop();return q.end=C(),f.events.push(["exit",q,f]),q}function N(I,q){R(I,q.from)}function A(I,q){q.restore()}function M(I,q){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 V;function V($){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 V;function V($){return L=j(),B=X,X.partial||(f.currentConstruct=X),X.name&&f.parser.constructs.disable.null.includes(X.name)?te():X.tokenize.call(q?Object.assign(Object.create(f),q):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 R(I,q){I.resolveAll&&!l.includes(I)&&l.push(I),I.resolve&&Ur(f.events,q,f.events.length-q,I.resolve(f.events.slice(q),f)),I.resolveTo&&(f.events=I.resolveTo(f.events,f))}function j(){const I=C(),q=f.previous,U=f.currentConstruct,W=f.events.length,K=Array.from(a);return{from:W,restore:G};function G(){i=I,f.previous=q,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 CI(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 kI(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 EI(t){const i={constructs:o3([SI,...(t||{}).extensions||[]]),content:o(HL),defined:[],document:o($L),flow:o(aI),lazy:{},string:o(uI),text:o(dI)};return i;function o(l){return u;function u(a){return wI(i,l,a)}}}function AI(t){for(;!d3(t););return t}const nx=/[\0\t\n\r]/g;function RI(){let t=1,e="",n=!0,i;return o;function o(l,u,a){const d=[];let f,p,h,y,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(nx.lastIndex=h,f=nx.exec(l),y=f&&f.index!==void 0?f.index:l.length,S=l.charCodeAt(y),!f){e=l.slice(h);break}if(S===10&&h===y&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),h<y&&(d.push(l.slice(h,y)),t+=y-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=y+1}return a&&(i&&d.push(-5),e&&d.push(e),d.push(null)),d}}const TI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NI(t){return t.replace(TI,DI)}function DI(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return a3(n.slice(l?2:1),l?16:10)}return uv(n)||t}const v3={}.hasOwnProperty;function MI(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),jI(n)(AI(EI(n).document().write(RI()(t,e,!0))))}function jI(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(Pe),hardBreakTrailing:l(Pe),htmlFlow:l(Te,u),htmlFlowData:j,htmlText:l(Te,u),htmlTextData:j,image:l(tt),label:u,link:l(it),listItem:l(ot),listItemValue:y,listOrdered:l(ct,h),listUnordered:l(ct),paragraph:l(pt),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:V,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:_,definitionTitleString:x,emphasis:d(),hardBreakEscape:d(q),hardBreakTrailing:d(q),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(R),setextHeadingLineSequence:M,setextHeadingText:A,strong:d(),thematicBreak:d()}};_3(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},Ne=[];let Le=-1;for(;++Le<de.length;)if(de[Le][1].type==="listOrdered"||de[Le][1].type==="listUnordered")if(de[Le][0]==="enter")Ne.push(Le);else{const $e=Ne.pop();Le=o(de,$e,Le)}for(Le=-1;++Le<de.length;){const $e=e[de[Le][0]];v3.call($e,de[Le][1].type)&&$e[de[Le][1].type].call(Object.assign({sliceSerialize:de[Le][2].sliceSerialize},_e),de[Le][1])}if(_e.tokenStack.length>0){const $e=_e.tokenStack[_e.tokenStack.length-1];($e[1]||rx).call(_e,void 0,$e[0])}for(xe.position={start:To(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:To(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<e.transforms.length;)xe=e.transforms[Le](xe)||xe;return xe}function o(de,xe,_e){let Ne=xe-1,Le=-1,$e=!1,Ie,Ve,_t,dt;for(;++Ne<=_e;){const ke=de[Ne];switch(ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ke[0]==="enter"?Le++:Le--,dt=void 0;break}case"lineEndingBlank":{ke[0]==="enter"&&(Ie&&!dt&&!Le&&!_t&&(_t=Ne),dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dt=void 0}if(!Le&&ke[0]==="enter"&&ke[1].type==="listItemPrefix"||Le===-1&&ke[0]==="exit"&&(ke[1].type==="listUnordered"||ke[1].type==="listOrdered")){if(Ie){let He=Ne;for(Ve=void 0;He--;){const ut=de[He];if(ut[1].type==="lineEnding"||ut[1].type==="lineEndingBlank"){if(ut[0]==="exit")continue;Ve&&(de[Ve][1].type="lineEndingBlank",$e=!0),ut[1].type="lineEnding",Ve=He}else if(!(ut[1].type==="linePrefix"||ut[1].type==="blockQuotePrefix"||ut[1].type==="blockQuotePrefixWhitespace"||ut[1].type==="blockQuoteMarker"||ut[1].type==="listItemIndent"))break}_t&&(!Ve||_t<Ve)&&(Ie._spread=!0),Ie.end=Object.assign({},Ve?de[Ve][1].start:ke[1].end),de.splice(Ve||Ne,0,["exit",Ie,ke[2]]),Ne++,_e++}if(ke[1].type==="listItemPrefix"){const He={type:"listItem",_spread:!1,start:Object.assign({},ke[1].start),end:void 0};Ie=He,de.splice(Ne,0,["enter",He,ke[2]]),Ne++,_e++,_t=void 0,dt=!0}}}return de[xe][1]._spread=$e,_e}function l(de,xe){return _e;function _e(Ne){a.call(this,de(Ne),Ne),xe&&xe.call(this,Ne)}}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:To(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(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==de.type&&(xe?xe.call(this,de,Ne[0]):(Ne[1]||rx).call(this,de,Ne[0]));else throw new Error("Cannot close `"+de.type+"` ("+Mu({start:de.start,end:de.end})+"): it’s not open");_e.position.end=To(de.end)}function p(){return cv(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(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 _(de){const xe=this.resume(),_e=this.stack[this.stack.length-1];_e.label=xe,_e.identifier=xi(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 R(){this.data.setextHeadingSlurpLineEnding=void 0}function j(de){const _e=this.stack[this.stack.length-1].children;let Ne=_e[_e.length-1];(!Ne||Ne.type!=="text")&&(Ne=Je(),Ne.position={start:To(de.start),end:void 0},_e.push(Ne)),this.stack.push(Ne)}function O(de){const xe=this.stack.pop();xe.value+=this.sliceSerialize(de),xe.position.end=To(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=To(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 q(){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=NI(xe),_e.identifier=xi(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 Ne=de.children;_e.children=Ne}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=xi(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 Ne;_e?(Ne=a3(xe,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=uv(xe);const Le=this.stack[this.stack.length-1];Le.value+=Ne}function V(de){const xe=this.stack.pop();xe.position.end=To(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 Pe(){return{type:"break"}}function Te(){return{type:"html",value:""}}function tt(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function ct(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 pt(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}function To(t){return{line:t.line,column:t.column,offset:t.offset}}function _3(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?_3(t,i):OI(t,i)}}function OI(t,e){let n;for(n in e)if(v3.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function rx(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+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 LI(t){const e=this;e.parser=n;function n(i){return MI(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function II(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 zI(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
544
- `}]}function BI(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 PI(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function FI(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function HI(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 UI(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 $I(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function y3(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 qI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return y3(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 VI(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 WI(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 GI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return y3(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 KI(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 YI(t,e,n){const i=t.all(e),o=n?XI(n):b3(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 XI(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=b3(n[i])}return e}function b3(t){const e=t.spread;return e==null?t.children.length>1:e}function QI(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 ZI(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function JI(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function ez(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function tz(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=sv(e.children[1]),d=JC(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 nz(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],y={},S=u?u[d]:void 0;S&&(y.align=S);let C={type:"element",tagName:l,properties:y,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 rz(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const ix=9,sx=32;function iz(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),o=0;const l=[];for(;i;)l.push(ox(e.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(e);return l.push(ox(e.slice(o),o>0,!1)),l.join("")}function ox(t,e,n){let i=0,o=t.length;if(e){let l=t.codePointAt(i);for(;l===ix||l===sx;)i++,l=t.codePointAt(i)}if(n){let l=t.codePointAt(o-1);for(;l===ix||l===sx;)o--,l=t.codePointAt(o-1)}return o>i?t.slice(i,o):""}function sz(t,e){const n={type:"text",value:iz(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function oz(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const az={blockquote:II,break:zI,code:BI,delete:PI,emphasis:FI,footnoteReference:HI,heading:UI,html:$I,imageReference:qI,image:VI,inlineCode:WI,linkReference:GI,link:KI,listItem:YI,list:QI,paragraph:ZI,root:JI,strong:ez,table:tz,tableCell:rz,tableRow:nz,text:sz,thematicBreak:oz,toml:kf,yaml:kf,definition:kf,footnoteDefinition:kf};function kf(){}const x3=-1,Gh=0,Ou=1,th=2,fv=3,hv=4,pv=5,mv=6,S3=7,w3=8,ax=typeof self=="object"?self:globalThis,lz=(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 Gh:case x3: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 fv:return n(new Date(u),o);case hv:{const{source:a,flags:d}=u;return n(new RegExp(a,d),o)}case pv:{const a=n(new Map,o);for(const[d,f]of u)a.set(i(d),i(f));return a}case mv:{const a=n(new Set,o);for(const d of u)a.add(i(d));return a}case S3:{const{name:a,message:d}=u;return n(new ax[a](d),o)}case w3: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 ax[l](u),o)};return i},lx=t=>lz(new Map,t)(0),Ql="",{toString:cz}={},{keys:uz}=Object,Cu=t=>{const e=typeof t;if(e!=="object"||!t)return[Gh,e];const n=cz.call(t).slice(8,-1);switch(n){case"Array":return[Ou,Ql];case"Object":return[th,Ql];case"Date":return[fv,Ql];case"RegExp":return[hv,Ql];case"Map":return[pv,Ql];case"Set":return[mv,Ql];case"DataView":return[Ou,n]}return n.includes("Array")?[Ou,n]:n.includes("Error")?[S3,n]:[th,n]},Ef=([t,e])=>t===Gh&&(e==="function"||e==="symbol"),dz=(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 Gh:{let p=u;switch(d){case"bigint":a=w3,p=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([x3],u)}return o([a,p],u)}case Ou:{if(d){let y=u;return d==="DataView"?y=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(u)),o([d,[...y]],u)}const p=[],h=o([a,p],u);for(const y of u)p.push(l(y));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 y of uz(u))(t||!Ef(Cu(u[y])))&&p.push([l(y),l(u[y])]);return h}case fv:return o([a,u.toISOString()],u);case hv:{const{source:p,flags:h}=u;return o([a,{source:p,flags:h}],u)}case pv:{const p=[],h=o([a,p],u);for(const[y,S]of u)(t||!(Ef(Cu(y))||Ef(Cu(S))))&&p.push([l(y),l(S)]);return h}case mv:{const p=[],h=o([a,p],u);for(const y of u)(t||!Ef(Cu(y)))&&p.push(l(y));return h}}const{message:f}=u;return o([a,{name:d,message:f}],u)};return l},cx=(t,{json:e,lossy:n}={})=>{const i=[];return dz(!(e||n),!!e,new Map,i)(t),i},nh=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?lx(cx(t,e)):structuredClone(t):(t,e)=>lx(cx(t,e));function fz(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 hz(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function pz(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||fz,i=t.options.footnoteBackLabel||hz,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(),y=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 _=typeof n=="string"?n:n(d,S);typeof _=="string"&&(_={type:"text",value:_}),C.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+y+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,S),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const _=v.children[v.children.length-1];_&&_.type==="text"?_.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-"+y},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 Kh=(function(t){if(t==null)return _z;if(typeof t=="function")return Yh(t);if(typeof t=="object")return Array.isArray(t)?mz(t):gz(t);if(typeof t=="string")return vz(t);throw new Error("Expected function, string, or object as test")});function mz(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Kh(t[n]);return Yh(i);function i(...o){let l=-1;for(;++l<e.length;)if(e[l].apply(this,o))return!0;return!1}}function gz(t){const e=t;return Yh(n);function n(i){const o=i;let l;for(l in t)if(o[l]!==e[l])return!1;return!0}}function vz(t){return Yh(e);function e(n){return n&&n.type===t}}function Yh(t){return e;function e(n,i,o){return!!(yz(n)&&t.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function _z(){return!0}function yz(t){return t!==null&&typeof t=="object"&&"type"in t}const C3=[],bz=!0,e1=!1,xz="skip";function k3(t,e,n,i){let o;typeof e=="function"&&typeof n!="function"?(i=n,n=e):o=e;const l=Kh(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(y,"name",{value:"node ("+(d.type+(S?"<"+S+">":""))+")"})}return y;function y(){let S=C3,C,w,v;if((!e||l(d,f,p[p.length-1]||void 0))&&(S=Sz(n(d,p)),S[0]===e1))return S;if("children"in d&&d.children){const b=d;if(b.children&&S[0]!==xz)for(w=(i?b.children.length:-1)+u,v=p.concat(b);w>-1&&w<b.children.length;){const _=b.children[w];if(C=a(_,w,v)(),C[0]===e1)return C;w=typeof C[1]=="number"?C[1]:w+u}}return S}}}function Sz(t){return Array.isArray(t)?t:typeof t=="number"?[bz,t]:t==null?C3:[t]}function gv(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),k3(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 t1={}.hasOwnProperty,wz={};function Cz(t,e){const n=e||wz,i=new Map,o=new Map,l=new Map,u={...az,...n.handlers},a={all:f,applyData:Ez,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:u,one:d,options:n,patch:kz,wrap:Rz};return gv(t,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?i:o,y=String(p.identifier).toUpperCase();h.has(y)||h.set(y,p)}}),a;function d(p,h){const y=p.type,S=a.handlers[y];if(t1.call(a.handlers,y)&&S)return S(a,p,h);if(a.options.passThrough&&a.options.passThrough.includes(y)){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||Az)(a,p,h)}function f(p){const h=[];if("children"in p){const y=p.children;let S=-1;for(;++S<y.length;){const C=a.one(y[S],p);if(C){if(S&&y[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=ux(C.value)),!Array.isArray(C)&&C.type==="element")){const w=C.children[0];w&&w.type==="text"&&(w.value=ux(w.value))}Array.isArray(C)?h.push(...C):h.push(C)}}}return h}}function kz(t,e){t.position&&(e.position=hL(t))}function Ez(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 Az(t,e){const n=e.data||{},i="value"in e&&!(t1.call(n,"hProperties")||t1.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 Rz(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 ux(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function dx(t,e){const n=Cz(t,e),i=n.one(t,void 0),o=pz(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 Tz(t,e){return t&&"run"in t?async function(n,i){const o=dx(n,{file:i,...e});await t.run(o,i)}:function(n,i){return dx(n,{file:i,...t||e})}}function fx(t){if(t)throw t}var fg,hx;function Nz(){if(hx)return fg;hx=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):e.call(f)==="[object Array]"},l=function(f){if(!f||e.call(f)!=="[object Object]")return!1;var p=t.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&t.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var y;for(y in f);return typeof y>"u"||t.call(f,y)},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 fg=function d(){var f,p,h,y,S,C,w=arguments[0],v=1,b=arguments.length,_=!1;for(typeof w=="boolean"&&(_=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),y=a(f,p),w!==y&&(_&&y&&(l(y)||(S=o(y)))?(S?(S=!1,C=h&&o(h)?h:[]):C=h&&l(h)?h:{},u(w,{name:p,newValue:d(_,C,y)})):typeof y<"u"&&u(w,{name:p,newValue:y}));return w},fg}var Dz=Nz();const hg=ih(Dz);function n1(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 Mz(){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?jz(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 jz(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 qi={basename:Oz,dirname:Lz,extname:Iz,join:zz,sep:"/"};function Oz(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 Lz(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 Iz(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 zz(...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?".":Bz(n)}function Bz(t){pd(t);const e=t.codePointAt(0)===47;let n=Pz(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Pz(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 Fz={cwd:Hz};function Hz(){return"/"}function r1(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Uz(t){if(typeof t=="string")t=new URL(t);else if(!r1(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 $z(t)}function $z(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 pg=["history","path","basename","stem","extname","dirname"];class E3{constructor(e){let n;e?r1(e)?n={path:e}:typeof e=="string"||qz(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Fz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<pg.length;){const l=pg[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)pg.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?qi.basename(this.path):void 0}set basename(e){gg(e,"basename"),mg(e,"basename"),this.path=qi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?qi.dirname(this.path):void 0}set dirname(e){px(this.basename,"dirname"),this.path=qi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?qi.extname(this.path):void 0}set extname(e){if(mg(e,"extname"),px(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){r1(e)&&(e=Uz(e)),gg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?qi.basename(this.path,this.extname):void 0}set stem(e){gg(e,"stem"),mg(e,"stem"),this.path=qi.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 Qn(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 mg(t,e){if(t&&t.includes(qi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+qi.sep+"`")}function gg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function px(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function qz(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Vz=(function(t){const i=this.constructor.prototype,o=i[t],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),Wz={}.hasOwnProperty;class vv extends Vz{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=Mz()}copy(){const e=new vv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(hg(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(yg("data",this.frozen),this.namespace[e]=n,this):Wz.call(this.namespace,e)&&this.namespace[e]||void 0:e?(yg("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 vg("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),vg("process",this.parser||this.Parser),_g("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,y){if(p||!h||!y)return f(p);const S=h,C=i.stringify(S,y);Yz(C)?y.value=C:y.result=C,f(p,y)});function f(p,h){p||!h?u(p):l?l(h):n(void 0,h)}}}processSync(e){let n=!1,i;return this.freeze(),vg("processSync",this.parser||this.Parser),_g("processSync",this.compiler||this.Compiler),this.process(e,o),gx("processSync","process",n),i;function o(l,u){n=!0,fx(l),i=u}}run(e,n,i){mx(e),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(u,a){const d=Af(n);o.run(e,d,f);function f(p,h,y){const S=h||e;p?a(p):u?u(S):i(void 0,S,y)}}}runSync(e,n){let i=!1,o;return this.run(e,n,l),gx("runSync","run",i),o;function l(u,a){fx(u),o=a,i=!0}}stringify(e,n){this.freeze();const i=Af(n),o=this.compiler||this.Compiler;return _g("stringify",o),mx(e),o(e,i)}use(e,...n){const i=this.attachers,o=this.namespace;if(yg("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=hg(!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,y=-1;for(;++h<i.length;)if(i[h][0]===f){y=h;break}if(y===-1)i.push([f,...p]);else if(p.length>0){let[S,...C]=p;const w=i[y][1];n1(w)&&n1(S)&&(S=hg(!0,w,S)),i[y]=[f,S,...C]}}}}const Gz=new vv().freeze();function vg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function _g(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function yg(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mx(t){if(!n1(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function gx(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Af(t){return Kz(t)?t:new E3(t)}function Kz(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Yz(t){return typeof t=="string"||Xz(t)}function Xz(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Qz="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vx=[],_x={allowDangerousHtml:!0},Zz=/^(https?|ircs?|mailto|xmpp)$/i,Jz=[{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 eB(t){const e=tB(t),n=nB(t);return rB(e.runSync(e.parse(n),n),t)}function tB(t){const e=t.rehypePlugins||vx,n=t.remarkPlugins||vx,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,..._x}:_x;return Gz().use(LI).use(n).use(Tz,i).use(e)}function nB(t){const e=t.children||"",n=new E3;return typeof e=="string"&&(n.value=e),n}function rB(t,e){const n=e.allowedElements,i=e.allowElement,o=e.components,l=e.disallowedElements,u=e.skipHtml,a=e.unwrapDisallowed,d=e.urlTransform||iB;for(const p of Jz)Object.hasOwn(e,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Qz+p.id,void 0);return gv(t,f),_L(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(p,h,y){if(p.type==="raw"&&y&&typeof h=="number")return u?y.children.splice(h,1):y.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let S;for(S in cg)if(Object.hasOwn(cg,S)&&Object.hasOwn(p.properties,S)){const C=p.properties[S],w=cg[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,y)),S&&y&&typeof h=="number")return a&&p.children?y.children.splice(h,1,...p.children):y.children.splice(h,1),h}}}function iB(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||Zz.test(t.slice(0,e))?t:""}function yx(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(e);for(;o!==-1;)i++,o=n.indexOf(e,o+e.length);return i}function sB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oB(t,e,n){const o=Kh((n||{}).ignore||[]),l=aB(e);let u=-1;for(;++u<l.length;)k3(t,"text",a);function a(f,p){let h=-1,y;for(;++h<p.length;){const S=p[h],C=y?y.children:void 0;if(o(S,C?C.indexOf(S):void 0,y))return;y=S}if(y)return d(f,p)}function d(f,p){const h=p[p.length-1],y=l[u][0],S=l[u][1];let C=0;const v=h.children.indexOf(f);let b=!1,_=[];y.lastIndex=0;let x=y.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?y.lastIndex=k+1:(C!==k&&_.push({type:"text",value:f.value.slice(C,k)}),Array.isArray(A)?_.push(...A):A&&_.push(A),C=k+x[0].length,b=!0),!y.global)break;x=y.exec(f.value)}return b?(C<f.value.length&&_.push({type:"text",value:f.value.slice(C)}),h.children.splice(v,1,..._)):_=[f],v+_.length}}function aB(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([lB(o[0]),cB(o[1])])}return e}function lB(t){return typeof t=="string"?new RegExp(sB(t),"g"):t}function cB(t){return typeof t=="function"?t:function(){return t}}const bg="phrasing",xg=["autolink","link","image","label"];function uB(){return{transforms:[vB],enter:{literalAutolink:fB,literalAutolinkEmail:Sg,literalAutolinkHttp:Sg,literalAutolinkWww:Sg},exit:{literalAutolink:gB,literalAutolinkEmail:mB,literalAutolinkHttp:hB,literalAutolinkWww:pB}}}function dB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bg,notInConstruct:xg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bg,notInConstruct:xg},{character:":",before:"[ps]",after:"\\/",inConstruct:bg,notInConstruct:xg}]}}function fB(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Sg(t){this.config.enter.autolinkProtocol.call(this,t)}function hB(t){this.config.exit.autolinkProtocol.call(this,t)}function pB(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 mB(t){this.config.exit.autolinkEmail.call(this,t)}function gB(t){this.exit(t)}function vB(t){oB(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_B],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yB]],{ignore:["link","linkReference"]})}function _B(t,e,n,i,o){let l="";if(!A3(o)||(/^w/i.test(e)&&(n=e+n,e="",l="http://"),!bB(n)))return!1;const u=xB(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 yB(t,e,n,i){return!A3(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function bB(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 xB(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const o=yx(t,"(");let l=yx(t,")");for(;i!==-1&&o>l;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[t,n]}function A3(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Fa(n)||Vh(n))&&(!e||n!==47)}R3.peek=NB;function SB(){this.buffer()}function wB(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function CB(){this.buffer()}function kB(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function EB(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xi(this.sliceSerialize(t)).toLowerCase(),n.label=e}function AB(t){this.exit(t)}function RB(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xi(this.sliceSerialize(t)).toLowerCase(),n.label=e}function TB(t){this.exit(t)}function NB(){return"["}function R3(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 DB(){return{enter:{gfmFootnoteCallString:SB,gfmFootnoteCall:wB,gfmFootnoteDefinitionLabelString:CB,gfmFootnoteDefinition:kB},exit:{gfmFootnoteCallString:EB,gfmFootnoteCall:AB,gfmFootnoteDefinitionLabelString:RB,gfmFootnoteDefinition:TB}}}function MB(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:R3},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?T3:jB))),f(),d}}function jB(t,e,n){return e===0?t:T3(t,e,n)}function T3(t,e,n){return(n?"":" ")+t}const OB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];N3.peek=PB;function LB(){return{canContainEols:["delete"],enter:{strikethrough:zB},exit:{strikethrough:BB}}}function IB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:OB}],handlers:{delete:N3}}}function zB(t){this.enter({type:"delete",children:[]},t)}function BB(t){this.exit(t)}function N3(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 PB(){return"~"}function FB(t){return t.length}function HB(t,e){const n=e||{},i=(n.align||[]).concat(),o=n.stringLength||FB,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 _=UB(t[p][b]);if(n.alignDelimiters!==!1){const x=o(_);v[b]=x,(d[b]===void 0||x>d[b])&&(d[b]=x)}w.push(_)}u[p]=w,a[p]=v}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<f;)l[h]=bx(i[h]);else{const w=bx(i);for(;++h<f;)l[h]=w}h=-1;const y=[],S=[];for(;++h<f;){const w=l[h];let v="",b="";w===99?(v=":",b=":"):w===108?v=":":w===114&&(b=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[h]-v.length-b.length);const x=v+"-".repeat(_)+b;n.alignDelimiters!==!1&&(_=v.length+_+b.length,_>d[h]&&(d[h]=_),S[h]=_),y[h]=x}u.splice(1,0,y),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 _=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&&_==="")&&(n.delimiterStart!==!1||h)&&b.push(" "),n.alignDelimiters!==!1&&b.push(x),b.push(_),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 UB(t){return t==null?"":String(t)}function bx(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function $B(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()),qB);return o(),u}function qB(t,e,n){return">"+(n?"":" ")+t}function VB(t,e){return xx(t,e.inConstruct,!0)&&!xx(t,e.notInConstruct,!1)}function xx(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function Sx(t,e,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
556
- `&&VB(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
557
- `}function WB(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 GB(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 KB(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 YB(t,e,n,i){const o=KB(n),l=t.value||"",u=o==="`"?"GraveAccent":"Tilde";if(GB(t,n)){const h=n.enter("codeIndented"),y=n.indentLines(l,XB);return h(),y}const a=n.createTracker(i),d=o.repeat(Math.max(WB(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 XB(t,e,n){return(n?"":" ")+t}function _v(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 QB(t,e,n,i){const o=_v(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 ZB(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}}D3.peek=JB;function D3(t,e,n,i){const o=ZB(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),y=rh(i.after.charCodeAt(0),h,o);y.inside&&(d=d.slice(0,-1)+Gu(h));const S=u.move(o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+d+S}function JB(t,e,n){return n.options.emphasis||"*"}function eP(t,e){let n=!1;return gv(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,e1}),!!((!t.depth||t.depth<3)&&cv(t)&&(e.options.setext||n))}function tP(t,e,n,i){const o=Math.max(Math.min(6,t.depth||1),1),l=n.createTracker(i);if(eP(t,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),y=n.containerPhrasing(t,{...l.current(),before:`
562
- `,after:`
563
- `});return h(),p(),y+`
564
- `+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.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}M3.peek=nP;function M3(t){return t.value||""}function nP(){return"<"}j3.peek=rP;function j3(t,e,n,i){const o=_v(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 rP(){return"!"}O3.peek=iP;function O3(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 iP(){return"!"}L3.peek=sP;function L3(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 sP(){return"`"}function I3(t,e){const n=cv(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))}z3.peek=oP;function z3(t,e,n,i){const o=_v(n),l=o==='"'?"Quote":"Apostrophe",u=n.createTracker(i);let a,d;if(I3(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 oP(t,e,n){return I3(t,n)?"<":"["}B3.peek=aP;function B3(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 aP(){return"["}function yv(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 lP(t){const e=yv(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 cP(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 P3(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 uP(t,e,n,i){const o=n.enter("list"),l=n.bulletCurrent;let u=t.ordered?cP(n):yv(n);const a=t.ordered?u==="."?")":".":lP(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),P3(n)===u&&p){let h=-1;for(;++h<t.children.length;){const y=t.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.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 dP(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 fP(t,e,n,i){const o=dP(n);let l=n.bulletCurrent||yv(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,y,S){return y?(S?"":" ".repeat(u))+h:(S?l:l+" ".repeat(u-l.length))+h}}function hP(t,e,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),u=n.containerPhrasing(t,i);return l(),o(),u}const pP=Kh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mP(t,e,n,i){return(t.children.some(function(u){return pP(u)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function gP(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}F3.peek=vP;function F3(t,e,n,i){const o=gP(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),y=rh(i.after.charCodeAt(0),h,o);y.inside&&(d=d.slice(0,-1)+Gu(h));const S=u.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+d+S}function vP(t,e,n){return n.options.strong||"*"}function _P(t,e,n,i){return n.safe(t.value,i)}function yP(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 bP(t,e,n){const i=(P3(n)+(n.options.ruleSpaces?" ":"")).repeat(yP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const H3={blockquote:$B,break:Sx,code:YB,definition:QB,emphasis:D3,hardBreak:Sx,heading:tP,html:M3,image:j3,imageReference:O3,inlineCode:L3,link:z3,linkReference:B3,list:uP,listItem:fP,paragraph:hP,root:mP,strong:F3,text:_P,thematicBreak:bP};function xP(){return{enter:{table:SP,tableData:wx,tableHeader:wx,tableRow:CP},exit:{codeText:kP,table:wP,tableData:wg,tableHeader:wg,tableRow:wg}}}function SP(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 wP(t){this.exit(t),this.data.inTable=void 0}function CP(t){this.enter({type:"tableRow",children:[]},t)}function wg(t){this.exit(t)}function wx(t){this.enter({type:"tableCell",children:[]},t)}function kP(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,EP));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function EP(t,e){return e==="|"?e:t}function AP(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:y,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),_=f([b]);return _.slice(0,_.indexOf(`
568
- `))}function d(S,C,w,v){const b=w.enter("tableCell"),_=w.enter("phrasing"),x=w.containerPhrasing(S,{...v,before:l,after:l});return _(),b(),x}function f(S,C){return HB(S,{align:C,alignDelimiters:i,padding:n,stringLength:o})}function p(S,C,w){const v=S.children;let b=-1;const _=[],x=C.enter("table");for(;++b<v.length;)_[b]=h(v[b],C,w);return x(),_}function h(S,C,w){const v=S.children;let b=-1;const _=[],x=C.enter("tableRow");for(;++b<v.length;)_[b]=d(v[b],S,C,w);return x(),_}function y(S,C,w){let v=H3.inlineCode(S,C,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function RP(){return{exit:{taskListCheckValueChecked:Cx,taskListCheckValueUnchecked:Cx,paragraph:NP}}}function TP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DP}}}function Cx(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function NP(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 DP(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=H3.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 MP(){return[uB(),DB(),LB(),xP(),RP()]}function jP(t){return{extensions:[dB(),MB(t),IB(),AP(t),TP()]}}const OP={tokenize:FP,partial:!0},U3={tokenize:HP,partial:!0},$3={tokenize:UP,partial:!0},q3={tokenize:$P,partial:!0},LP={tokenize:qP,partial:!0},V3={name:"wwwAutolink",tokenize:BP,previous:G3},W3={name:"protocolAutolink",tokenize:PP,previous:K3},Is={name:"emailAutolink",tokenize:zP,previous:Y3},Qi={};function IP(){return{text:Qi}}let Ma=48;for(;Ma<123;)Qi[Ma]=Is,Ma++,Ma===58?Ma=65:Ma===91&&(Ma=97);Qi[43]=Is;Qi[45]=Is;Qi[46]=Is;Qi[95]=Is;Qi[72]=[Is,W3];Qi[104]=[Is,W3];Qi[87]=[Is,V3];Qi[119]=[Is,V3];function zP(t,e,n){const i=this;let o,l;return u;function u(h){return!i1(h)||!Y3.call(i,i.previous)||bv(i.events)?n(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(h))}function a(h){return i1(h)?(t.consume(h),a):h===64?(t.consume(h),d):n(h)}function d(h){return h===46?t.check(LP,p,f)(h):h===45||h===95||Xn(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&&ir(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):n(h)}}function BP(t,e,n){const i=this;return o;function o(u){return u!==87&&u!==119||!G3.call(i,i.previous)||bv(i.events)?n(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(OP,t.attempt(U3,t.attempt($3,l),n),n)(u))}function l(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(u)}}function PP(t,e,n){const i=this;let o="",l=!1;return u;function u(h){return(h===72||h===104)&&K3.call(i,i.previous)&&!bv(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),t.consume(h),a):n(h)}function a(h){if(ir(h)&&o.length<5)return o+=String.fromCodePoint(h),t.consume(h),a;if(h===58){const y=o.toLowerCase();if(y==="http"||y==="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)||qt(h)||Fa(h)||Vh(h)?n(h):t.attempt(U3,t.attempt($3,p),n)(h)}function p(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function FP(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 HP(t,e,n){let i,o,l;return u;function u(f){return f===46||f===95?t.check(q3,d,a)(f):f===null||qt(f)||Fa(f)||f!==45&&Vh(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 UP(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(q3,e,l)(u):u===null||qt(u)||Fa(u)?e(u):(t.consume(u),o)}function l(u){return u===41&&i++,t.consume(u),o}}function $P(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||qt(a)||Fa(a)?e(a):n(a)}function o(a){return a===null||a===40||a===91||qt(a)||Fa(a)?e(a):i(a)}function l(a){return ir(a)?u(a):n(a)}function u(a){return a===59?(t.consume(a),i):ir(a)?(t.consume(a),u):n(a)}}function qP(t,e,n){return i;function i(l){return t.consume(l),o}function o(l){return Xn(l)?n(l):e(l)}}function G3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||qt(t)}function K3(t){return!ir(t)}function Y3(t){return!(t===47||i1(t))}function i1(t){return t===43||t===45||t===46||t===95||Xn(t)}function bv(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 VP={tokenize:JP,partial:!0};function WP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:XP,continuation:{tokenize:QP},exit:ZP}},text:{91:{name:"gfmFootnoteCall",tokenize:YP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GP,resolveTo:KP}}}}function GP(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=xi(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 KP(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 YP(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||qt(h))return n(h);if(h===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return o.includes(xi(i.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return qt(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 XP(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||qt(C))return n(C);if(C===93){t.exit("chunkString");const w=t.exit("gfmFootnoteDefinitionLabelString");return l=xi(i.sliceSerialize(w)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return qt(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 y(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 QP(t,e,n){return t.check(hd,e,t.attempt(VP,e,n))}function ZP(t){t.exit("gfmFootnoteDefinition")}function JP(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 eF(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)},y=[["enter",p,a],["enter",u[f][1],a],["exit",u[f][1],a],["enter",h,a]],S=a.parser.constructs.insideSpan.null;S&&Ur(y,y.length,0,Wh(S,u.slice(f+1,d),a)),Ur(y,y.length,0,[["exit",h,a],["enter",u[d][1],a],["exit",u[d][1],a],["exit",p,a]]),Ur(u,f-1,d-f+3,y),d=f+y.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 y;function y(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 tF{constructor(){this.map=[]}add(e,n,i){nF(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 nF(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 rF(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 iF(){return{flow:{null:{name:"table",tokenize:sF,resolveAll:oF}}}}function sF(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 q=I>-1?i.events[I][1].type:null,U=q==="tableHead"||q==="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||qt(O)?(t.exit("data"),p(O)):(t.consume(O),O===92?y:h)}function y(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"),_(O)):N(O)}function _(O){return O===45?(t.consume(O),_):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"),R(O))}function R(O){return O===null||O===124||qt(O)?(t.exit("data"),M(O)):(t.consume(O),O===92?j:R)}function j(O){return O===92||O===124?(t.consume(O),R):R(O)}}function oF(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 y=new tF;for(;++n<t.length;){const S=t[n],C=S[1];S[0]==="enter"?C.type==="tableHead"?(a=!1,d!==0&&(kx(y,e,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.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)},y.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(y,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(y,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(y,e,l,o,n,h)):u[1]!==0&&(h=Rf(y,e,u,o,n,h)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&kx(y,e,d,f,p),y.consume(e.events),n=-1;++n<e.events.length;){const S=e.events[n];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=rF(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({},ec(e.events,n[0])),t.add(n[0],0,[["exit",l,e]]));const d=ec(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=ec(e.events,n[2]),p=ec(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 y=e.events[n[2]],S=e.events[n[3]];if(y[1].end=Object.assign({},S[1].end),y[1].type="chunkText",y[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({},ec(e.events,o)),t.add(o,0,[["exit",l,e]]),l=void 0),l}function kx(t,e,n,i,o){const l=[],u=ec(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 ec(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const aF={name:"tasklistCheck",tokenize:cF};function lF(){return{text:{91:aF}}}function cF(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 qt(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:uF},e,n)(d):n(d)}}function uF(t,e,n){return Nt(t,i,"whitespace");function i(o){return o===null?n(o):e(o)}}function dF(t){return o3([IP(),WP(),eF(t),iF(),lF()])}const fF={};function hF(t){const e=this,n=t||fF,i=e.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(dF(n)),l.push(MP()),u.push(jP(n))}const pF=D.memo(function(e){const n=ve.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||""),_=b?b[1]:"",x=!_,k=Array.isArray(w)?w.join(""):String(w);return!x&&_?g.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:g.jsx(nv,{theme:u?Vu.nightOwl:Vu.oneDark,code:k.trim(),language:_,children:mF})}):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=[hF],n[4]=p):p=n[4];let h;n[5]!==i||n[6]!==d?(h=g.jsx(eB,{remarkPlugins:p,components:d,children:i}),n[5]=i,n[6]=d,n[7]=h):h=n[7];let y;return n[8]!==f||n[9]!==h?(y=g.jsx("div",{className:f,children:h}),n[8]=f,n[9]=h,n[10]=y):y=n[10],y});function mF(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 Ex(t){return t.filter(e=>e.type==="text").map(e=>e.text).join("")}function gF(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 vF(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 _F(){const t=ve.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(Ux,{className:"size-4 animate-pulse"}),g.jsx("span",{children:"Compacting conversation..."})]}),t[0]=e):e=t[0],e}function yF(){const t=ve.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(JE,{className:"size-4"}),g.jsx("span",{children:"Compaction complete"})]}),t[0]=e):e=t[0],e}function bF(t){const e=ve.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(Fe,{variant:"outline",size:"sm",onClick:o,className:"mt-2 h-7 text-xs gap-1.5",children:[g.jsx(qx,{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 xF(t){const e=ve.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(Si,{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 y;return e[12]!==p||e[13]!==h?(y=g.jsxs("div",{className:"flex flex-col items-center my-4",children:[p,h]}),e[12]=p,e[13]=h,e[14]=y):y=e[14],y}const SF=D.memo(function(e){const n=ve.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(kF);let y;n[6]!==d||n[7]!==u||n[8]!==l||n[9]!==o?(y=S=>{switch(S.type){case"text":return g.jsx("div",{className:"min-w-0",children:g.jsx(pF,{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(j7,{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]=y):y=n[10],f=h.map(y),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 wF(t){const e=ve.c(90),{session:n,messagesWithParts:i,queuedMessages:o,preconfigs:l,prompts:u,models:a,connectedProviderIds:d,connectableProviderIds:f,defaultModel:p,onSendMessage:h,onRemoveFromQueue:y,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,pendingPermissions:v,onPermissionResponse:b,onRename:_,usage:x,modelName:k,onNavigateToSubagent:N,onNavigateBack:A,isStreaming:M,onInterrupt:R,onRevert:j,onFork:O,onCompact:I,isCompacting:q,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 V;e[4]!==i||e[5]!==o?(V=vF(i,o),e[4]=i,e[5]=o,e[6]=V):V=e[6];const $=V;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 Ne=()=>{const{scrollHeight:Le,scrollTop:$e,clientHeight:Ie}=_e,Ve=Le-$e-Ie;X(Ve<150)};return _e.addEventListener("scroll",Ne,{passive:!0}),()=>_e.removeEventListener("scroll",Ne)},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=Ne=>Ne.sessionId!==n.id?!1:!i.some(Le=>Le.parts.some($e=>$e.type==="tool"&&$e.callId===Ne.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 Pe=je,Te=i.length>=4;let tt;e[24]!==f||e[25]!==d||e[26]!==p||e[27]!==q||e[28]!==M||e[29]!==k||e[30]!==a||e[31]!==C||e[32]!==S||e[33]!==w||e[34]!==I||e[35]!==R||e[36]!==A||e[37]!==_||e[38]!==l||e[39]!==Z||e[40]!==n||e[41]!==Te||e[42]!==x||e[43]!==ee?(tt=g.jsx(rO,{session:n,preconfigs:l,models:a,defaultModel:p,usage:x,modelName:k,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,onRename:_,onNavigateBack:A,isStreaming:M,onInterrupt:R,onCompact:I,isCompacting:q,canCompact:Te,connectedProviderIds:d,connectableProviderIds:f,selectedVariant:Z,variants:ee}),e[24]=f,e[25]=d,e[26]=p,e[27]=q,e[28]=M,e[29]=k,e[30]=a,e[31]=C,e[32]=S,e[33]=w,e[34]=I,e[35]=R,e[36]=A,e[37]=_,e[38]=l,e[39]=Z,e[40]=n,e[41]=Te,e[42]=x,e[43]=ee,e[44]=tt):tt=e[44];let it;e[45]!==q?(it=q&&g.jsx(_F,{}),e[45]=q,e[46]=it):it=e[46];let ct;e[47]!==U?(ct=U&&g.jsx(yF,{}),e[47]=U,e[48]=ct):ct=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 pt;e[51]!==O||e[52]!==j||e[53]!==$||e[54]!==q||e[55]!==z||e[56]!==i||e[57]!==I||e[58]!==N||e[59]!==b||e[60]!==y||e[61]!==v||e[62]!==n.id?(pt=$.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 Ne=_e.parts.find(CF);if(Pj(_e.message)&&_e.message.mode==="compact_failed")return g.jsx(bF,{message:_e.message,textContent:Ex(_e.parts),onRetry:z&&!q?I:void 0},_e.message.id);if(Ne)return g.jsx(xF,{part:Ne},_e.message.id);const $e=!_e.isQueued&&_e.message.role==="user",Ie=$e?gF(_e.message.id,i):null;return g.jsx(iO,{message:_e.message,textContent:Ex(_e.parts),isQueued:_e.isQueued,onRemove:_e.isQueued?()=>y(_e.queueId):void 0,canRevert:$e&&Ie!==null,onRevert:Ie?()=>j==null?void 0:j(n.id,Ie):void 0,canFork:$e&&Ie!==null,onFork:Ie?()=>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(SF,{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]=q,e[55]=z,e[56]=i,e[57]=I,e[58]=N,e[59]=b,e[60]=y,e[61]=v,e[62]=n.id,e[63]=pt):pt=e[63];let Ze;e[64]!==b||e[65]!==Pe?(Ze=Pe.length>0&&g.jsx("div",{className:"mt-4 flex flex-col gap-2",children:Pe.map(_e=>{var Le;const Ne=typeof((Le=_e.args)==null?void 0:Le.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(Io,{children:[g.jsx(zo,{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(Si,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Bo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words",children:Ne})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Fe,{variant:"outline",size:"sm",onClick:()=>b(_e.toolCallId,!1,!1),children:"Deny"}),g.jsx(Fe,{variant:"secondary",size:"sm",onClick:()=>b(_e.toolCallId,!0,!1),children:"Approve"}),g.jsx(Fe,{size:"sm",onClick:()=>b(_e.toolCallId,!0,!0),children:"Always Allow"})]})]},_e.toolCallId)})}),e[64]=b,e[65]=Pe,e[66]=Ze):Ze=e[66];let Je;e[67]!==pt||e[68]!==Ze?(Je=g.jsx(Rc,{className:"flex-1 min-h-0",ref:Q,children:g.jsxs("div",{className:"p-4",children:[pt,Ze]})}),e[67]=pt,e[68]=Ze,e[69]=Je):Je=e[69];let ue;e[70]!==G||e[71]!==B||e[72]!==q||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(P7,{ref:B,onSendMessage:h,disabled:q,workspaceId:n.workspaceId,serverUrl:K,apiToken:G,prompts:u}),e[70]=G,e[71]=B,e[72]=q,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(I4,{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]!==tt||e[83]!==it||e[84]!==ct||e[85]!==ot||e[86]!==Je||e[87]!==ue||e[88]!==de?(xe=g.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[tt,it,ct,ot,Je,ue,de]}),e[82]=tt,e[83]=it,e[84]=ct,e[85]=ot,e[86]=Je,e[87]=ue,e[88]=de,e[89]=xe):xe=e[89],xe}function CF(t){return t.type==="compaction"}function kF(t,e){return t.createdAt-e.createdAt}function EF(t){const e=ve.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(FD,{"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 AF=_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 RF(t){const e=ve.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(AF({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(HD,{"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=ve.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(UD,{"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=ve.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($D,{"data-slot":"tabs-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ax(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Rx(t){const e=ve.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(Wx,{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(Yn,{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(Yn,{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=Ax(n.grantedAt),e[11]=n.grantedAt,e[12]=h):h=e[12];let y;e[13]!==n.revokedAt?(y=n.revokedAt&&` • Revoked ${Ax(n.revokedAt)}`,e[13]=n.revokedAt,e[14]=y):y=e[14];let S;e[15]!==h||e[16]!==y?(S=g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",h,y]}),e[15]=h,e[16]=y,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(Fe,{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 TF(t){const e=ve.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,y=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 _;e[6]!==o?(_=g.jsx(Ac,{children:o}),e[6]=o,e[7]=_):_=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]!==_||e[11]!==x?(k=g.jsxs(Ec,{children:[_,x]}),e[10]=_,e[11]=x,e[12]=k):k=e[12];let N;e[13]!==y||e[14]!==w?(N=g.jsx(Fe,{variant:"outline",onClick:w,children:y}),e[13]=y,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(Fe,{variant:A,onClick:b,children:h}),e[16]=h,e[17]=b,e[18]=A,e[19]=M):M=e[19];let R;e[20]!==M||e[21]!==N?(R=g.jsxs(Oh,{children:[N,M]}),e[20]=M,e[21]=N,e[22]=R):R=e[22];let j;e[23]!==R||e[24]!==k?(j=g.jsxs(kc,{className:"sm:max-w-[425px]",children:[k,R]}),e[23]=R,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 NF(t){const e=ve.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 y=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 _;e[13]!==b?(_=g.jsx("span",{className:"text-sm font-medium",children:b}),e[13]=b,e[14]=_):_=e[14];let x;e[15]!==_||e[16]!==v?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[v,_]}),e[15]=_,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 R;e[28]!==y||e[29]!==l||e[30]!==n.authorizationUrl||e[31]!==n.connected?(R=!n.connected&&!n.authorizationUrl&&g.jsxs(Fe,{size:"sm",onClick:y,disabled:l,children:[l?g.jsx(Pr,{className:"size-3 animate-spin","data-icon":"inline-start"}):null,"Connect"]}),e[28]=y,e[29]=l,e[30]=n.authorizationUrl,e[31]=n.connected,e[32]=R):R=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(Fe,{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(Fe,{variant:"destructive",size:"sm",onClick:C,children:[g.jsx(x5,{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]!==R||e[40]!==j||e[41]!==O?(I=g.jsxs("div",{className:"flex gap-2",children:[R,j,O]}),e[39]=R,e[40]=j,e[41]=O,e[42]=I):I=e[42];let q;return e[43]!==N||e[44]!==A||e[45]!==M||e[46]!==I?(q=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]=q):q=e[47],q}function DF(t){const e=ve.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=q5(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(Fe,{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 MF={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=ve.c(15),{scheme:n,currentScheme:i,onClick:o}=t,l=n===i,u=MF[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(jF),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 y;e[7]!==n?(y=g.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:n}),e[7]=n,e[8]=y):y=e[8];let S;return e[9]!==u.label||e[10]!==a||e[11]!==d||e[12]!==h||e[13]!==y?(S=g.jsxs("button",{type:"button",onClick:a,className:d,title:f,children:[h,y]}),e[9]=u.label,e[10]=a,e[11]=d,e[12]=h,e[13]=y,e[14]=S):S=e[14],S}function jF(t,e){return g.jsx("div",{className:`w-4 h-4 rounded-full ${t}`},e)}function OF(t){var je;const e=ve.c(218),{open:n,onOpenChange:i,permissions:o,onRefreshPermissions:l,onRevokePermission:u,onRevokeAllPermissions:a,apiToken:d,onLogout:f,providerStatuses:p,onConnectProvider:h,onDisconnectProvider:y,chatFinishSoundEnabled:S,onChatFinishSoundEnabledChange:C,permissionSoundEnabled:w,onPermissionSoundEnabledChange:v}=t,{mode:b,scheme:_,setMode:x,setScheme:k}=EE(),[N,A]=D.useState(!1),R=((je=navigator.userAgentData)==null?void 0:je.platform)==="macOS"||/mac|iphone|ipad|ipod/i.test(navigator.userAgent)?"⌘":"Ctrl";let j,O,I,q,U,W,K,G,Z,ee,B,L,z,H,F,Q,te,X,V;if(e[0]!==d||e[1]!==S||e[2]!==b||e[3]!==C||e[4]!==h||e[5]!==y||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]!==_||e[16]!==x||e[17]!==k){const Pe=[{keys:[R,"1"],description:"Open session list"},{keys:[R,"T"],description:"Open terminal"},{keys:[R,"O"],description:"Toggle overview mode"},{keys:[R,"N"],description:"New session"},{keys:[R,"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 Te,tt,it,ct,ot,pt,Ze,Je,ue,de,xe;if(e[37]!==d||e[38]!==S||e[39]!==b||e[40]!==C||e[41]!==f||e[42]!==i||e[43]!==v||e[44]!==l||e[45]!==u||e[46]!==n||e[47]!==w||e[48]!==o||e[49]!==_||e[50]!==x||e[51]!==k){const Ie=o.filter(zF),Ve=o.filter(IF);q=Cc,ee=n,B=i,I=kc,G="sm:max-w-[700px] max-h-[80vh]",e[75]===Symbol.for("react.memo_cache_sentinel")?(Z=g.jsxs(Ec,{children:[g.jsx(Ac,{children:"Settings"}),g.jsx(ld,{children:"Manage your preferences and permissions"})]}),e[75]=Z):Z=e[75],O=EF,F="account",Q="mt-4";let _t;e[76]===Symbol.for("react.memo_cache_sentinel")?(_t=g.jsxs(ku,{value:"account",children:[g.jsx(Kx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Account"})]}),e[76]=_t):_t=e[76];let dt;e[77]===Symbol.for("react.memo_cache_sentinel")?(dt=g.jsxs(ku,{value:"appearance",children:[g.jsx(V4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Appearance"})]}),e[77]=dt):dt=e[77];let ke,He;e[78]===Symbol.for("react.memo_cache_sentinel")?(ke=g.jsx(Wx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),He=g.jsx("span",{className:"hidden sm:inline",children:"Permissions"}),e[78]=ke,e[79]=He):(ke=e[78],He=e[79]);const ut=Ie.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:Ie.length});let mt;e[80]!==ut?(mt=g.jsxs(ku,{value:"permissions",children:[ke,He,ut]}),e[80]=ut,e[81]=mt):mt=e[81];let Kt;e[82]===Symbol.for("react.memo_cache_sentinel")?(Kt=g.jsxs(ku,{value:"providers",children:[g.jsx(j4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Providers"})]}),e[82]=Kt):Kt=e[82];let Ut;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ut=g.jsxs(ku,{value:"keybinds",children:[g.jsx(A4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Keybinds"})]}),e[83]=Ut):Ut=e[83],e[84]!==mt?(te=g.jsxs(RF,{className:"grid w-full grid-cols-5",children:[_t,dt,mt,Kt,Ut]}),e[84]=mt,e[85]=te):te=e[85];let nn,Qt;e[86]===Symbol.for("react.memo_cache_sentinel")?(nn=g.jsx(bi,{className:"text-sm font-medium",children:"Session"}),Qt=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),e[86]=nn,e[87]=Qt):(nn=e[86],Qt=e[87]),e[88]!==d||e[89]!==f?(X=g.jsx(Eu,{value:"account",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[nn,Qt,d?g.jsx(DF,{token:d,onLogout:f}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]})})}),e[88]=d,e[89]=f,e[90]=X):X=e[90];let Rn,on;e[91]===Symbol.for("react.memo_cache_sentinel")?(Rn=g.jsx(bi,{className:"text-sm font-medium",children:"Mode"}),on=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose light, dark, or system theme"}),e[91]=Rn,e[92]=on):(Rn=e[91],on=e[92]);const Wt=b==="light"?"default":"outline";let an;e[93]!==x?(an=()=>x("light"),e[93]=x,e[94]=an):an=e[94];let ln;e[95]===Symbol.for("react.memo_cache_sentinel")?(ln=g.jsx(p5,{className:"size-4","data-icon":"inline-start"}),e[95]=ln):ln=e[95];let wn;e[96]!==Wt||e[97]!==an?(wn=g.jsxs(Fe,{variant:Wt,className:"justify-start",onClick:an,children:[ln,"Light"]}),e[96]=Wt,e[97]=an,e[98]=wn):wn=e[98];const Ei=b==="dark"?"default":"outline";let Tn;e[99]!==x?(Tn=()=>x("dark"),e[99]=x,e[100]=Tn):Tn=e[100];let oi;e[101]===Symbol.for("react.memo_cache_sentinel")?(oi=g.jsx($4,{className:"size-4","data-icon":"inline-start"}),e[101]=oi):oi=e[101];let Zn;e[102]!==Ei||e[103]!==Tn?(Zn=g.jsxs(Fe,{variant:Ei,className:"justify-start",onClick:Tn,children:[oi,"Dark"]}),e[102]=Ei,e[103]=Tn,e[104]=Zn):Zn=e[104];const qr=b==="system"?"default":"outline";let or;e[105]!==x?(or=()=>x("system"),e[105]=x,e[106]=or):or=e[106];let Ai;e[107]===Symbol.for("react.memo_cache_sentinel")?(Ai=g.jsx(H4,{className:"size-4","data-icon":"inline-start"}),e[107]=Ai):Ai=e[107];let Cr;e[108]!==qr||e[109]!==or?(Cr=g.jsxs(Fe,{variant:qr,className:"justify-start",onClick:or,children:[Ai,"System"]}),e[108]=qr,e[109]=or,e[110]=Cr):Cr=e[110];let Nn;e[111]!==wn||e[112]!==Zn||e[113]!==Cr?(Nn=g.jsxs("div",{children:[Rn,on,g.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[wn,Zn,Cr]})]}),e[111]=wn,e[112]=Zn,e[113]=Cr,e[114]=Nn):Nn=e[114];let Rt,Bt;e[115]===Symbol.for("react.memo_cache_sentinel")?(Rt=g.jsx(Do,{}),Bt=g.jsx(bi,{className:"text-sm font-medium mb-3 block",children:"Notification Sounds"}),e[115]=Rt,e[116]=Bt):(Rt=e[115],Bt=e[116]);let pn;e[117]===Symbol.for("react.memo_cache_sentinel")?(pn=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(C5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Chat completion"})]}),e[117]=pn):pn=e[117];let mn;e[118]!==S||e[119]!==C?(mn=()=>C(!S),e[118]=S,e[119]=C,e[120]=mn):mn=e[120];const Zi=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-primary":"bg-muted"}`,ai=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`;let Vn;e[121]!==ai?(Vn=g.jsx("span",{className:ai}),e[121]=ai,e[122]=Vn):Vn=e[122];let Cn;e[123]!==mn||e[124]!==Zi||e[125]!==Vn?(Cn=g.jsxs("div",{className:"flex items-center justify-between",children:[pn,g.jsx("button",{type:"button",onClick:mn,className:Zi,children:Vn})]}),e[123]=mn,e[124]=Zi,e[125]=Vn,e[126]=Cn):Cn=e[126];let Jn;e[127]===Symbol.for("react.memo_cache_sentinel")?(Jn=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(E5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Permission requests"})]}),e[127]=Jn):Jn=e[127];let Dn;e[128]!==v||e[129]!==w?(Dn=()=>v(!w),e[128]=v,e[129]=w,e[130]=Dn):Dn=e[130];const ar=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${w?"bg-primary":"bg-muted"}`,lr=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${w?"translate-x-6":"translate-x-1"}`;let Mn;e[131]!==lr?(Mn=g.jsx("span",{className:lr}),e[131]=lr,e[132]=Mn):Mn=e[132];let Ot;e[133]!==Dn||e[134]!==ar||e[135]!==Mn?(Ot=g.jsxs("div",{className:"flex items-center justify-between",children:[Jn,g.jsx("button",{type:"button",onClick:Dn,className:ar,children:Mn})]}),e[133]=Dn,e[134]=ar,e[135]=Mn,e[136]=Ot):Ot=e[136];let cr;e[137]!==Cn||e[138]!==Ot?(cr=g.jsxs("div",{children:[Bt,g.jsxs("div",{className:"flex flex-col gap-3",children:[Cn,Ot]})]}),e[137]=Cn,e[138]=Ot,e[139]=cr):cr=e[139];let Ri,jn,Lt;e[140]===Symbol.for("react.memo_cache_sentinel")?(Ri=g.jsx(Do,{}),jn=g.jsx(bi,{className:"text-sm font-medium",children:"Color Scheme"}),Lt=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color palette"}),e[140]=Ri,e[141]=jn,e[142]=Lt):(Ri=e[140],jn=e[141],Lt=e[142]);let kr;e[143]!==_||e[144]!==k?(kr=g.jsxs("div",{children:[jn,Lt,g.jsxs("div",{className:"grid grid-cols-5 gap-2",children:[g.jsx(Au,{scheme:"neutral",currentScheme:_,onClick:k}),g.jsx(Au,{scheme:"ocean",currentScheme:_,onClick:k}),g.jsx(Au,{scheme:"forest",currentScheme:_,onClick:k}),g.jsx(Au,{scheme:"sunset",currentScheme:_,onClick:k}),g.jsx(Au,{scheme:"amethyst",currentScheme:_,onClick:k})]})]}),e[143]=_,e[144]=k,e[145]=kr):kr=e[145],e[146]!==Nn||e[147]!==cr||e[148]!==kr?(V=g.jsx(Eu,{value:"appearance",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[Nn,Rt,cr,Ri,kr]})}),e[146]=Nn,e[147]=cr,e[148]=kr,e[149]=V):V=e[149],tt=Eu,de="permissions",xe="mt-4",Ze="flex flex-col gap-4";let li;e[150]===Symbol.for("react.memo_cache_sentinel")?(li=g.jsxs("div",{children:[g.jsx(bi,{className:"text-sm font-medium",children:"Always-allowed Operations"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Tools you've approved to run without asking"})]}),e[150]=li):li=e[150];let Ti;e[151]===Symbol.for("react.memo_cache_sentinel")?(Ti=g.jsx(nc,{className:"size-4"}),e[151]=Ti):Ti=e[151];let Er;e[152]!==l?(Er=g.jsx(Fe,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:Ti}),e[152]=l,e[153]=Er):Er=e[153];const Vr=Ie.length>0&&g.jsxs(Fe,{variant:"destructive",size:"sm",onClick:()=>A(!0),children:[g.jsx(gc,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]});e[154]!==Er||e[155]!==Vr?(Je=g.jsxs("div",{className:"flex items-center justify-between",children:[li,g.jsxs("div",{className:"flex gap-2",children:[Er,Vr]})]}),e[154]=Er,e[155]=Vr,e[156]=Je):Je=e[156],e[157]===Symbol.for("react.memo_cache_sentinel")?(ue=g.jsx(Do,{}),e[157]=ue):ue=e[157],Te=Rc,it="h-[300px]",ct=Ie.length===0&&Ve.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.']}),ot=Ie.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 (",Ie.length,")"]}),Ie.map(er=>g.jsx(Rx,{permission:er,onRevoke:u},er.id))]}),pt=Ve.length>0&&g.jsxs("div",{children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",Ve.length,")"]}),Ve.map(er=>g.jsx(Rx,{permission:er,onRevoke:u},er.id))]}),e[37]=d,e[38]=S,e[39]=b,e[40]=C,e[41]=f,e[42]=i,e[43]=v,e[44]=l,e[45]=u,e[46]=n,e[47]=w,e[48]=o,e[49]=_,e[50]=x,e[51]=k,e[52]=O,e[53]=I,e[54]=q,e[55]=Te,e[56]=tt,e[57]=G,e[58]=Z,e[59]=ee,e[60]=B,e[61]=it,e[62]=ct,e[63]=ot,e[64]=pt,e[65]=Ze,e[66]=Je,e[67]=ue,e[68]=de,e[69]=xe,e[70]=F,e[71]=Q,e[72]=te,e[73]=X,e[74]=V}else O=e[52],I=e[53],q=e[54],Te=e[55],tt=e[56],G=e[57],Z=e[58],ee=e[59],B=e[60],it=e[61],ct=e[62],ot=e[63],pt=e[64],Ze=e[65],Je=e[66],ue=e[67],de=e[68],xe=e[69],F=e[70],Q=e[71],te=e[72],X=e[73],V=e[74];let _e;e[158]!==Te||e[159]!==it||e[160]!==ct||e[161]!==ot||e[162]!==pt?(_e=g.jsxs(Te,{className:it,children:[ct,ot,pt]}),e[158]=Te,e[159]=it,e[160]=ct,e[161]=ot,e[162]=pt,e[163]=_e):_e=e[163];let Ne;e[164]!==Ze||e[165]!==Je||e[166]!==ue||e[167]!==_e?(Ne=g.jsxs("div",{className:Ze,children:[Je,ue,_e]}),e[164]=Ze,e[165]=Je,e[166]=ue,e[167]=_e,e[168]=Ne):Ne=e[168],e[169]!==tt||e[170]!==de||e[171]!==xe||e[172]!==Ne?(W=g.jsx(tt,{value:de,className:xe,children:Ne}),e[169]=tt,e[170]=de,e[171]=xe,e[172]=Ne,e[173]=W):W=e[173];let Le;e[174]===Symbol.for("react.memo_cache_sentinel")?(Le=g.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect subscription-based providers to use models without API keys."}),e[174]=Le):Le=e[174];let $e;if(e[175]!==h||e[176]!==y||e[177]!==p){let Ie;e[179]!==h||e[180]!==y?(Ie=Ve=>g.jsx(NF,{provider:Ve,onConnect:()=>h(Ve.provider),onDisconnect:()=>y(Ve.provider)},Ve.provider),e[179]=h,e[180]=y,e[181]=Ie):Ie=e[181],$e=p.map(Ie),e[175]=h,e[176]=y,e[177]=p,e[178]=$e}else $e=e[178];e[182]!==$e?(K=g.jsx(Eu,{value:"providers",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[Le,g.jsx("div",{className:"flex flex-col gap-3",children:$e})]})})}),e[182]=$e,e[183]=K):K=e[183],j=Eu,z="keybinds",H="mt-4",U="flex flex-col gap-2",L=Pe.map(LF),e[0]=d,e[1]=S,e[2]=b,e[3]=C,e[4]=h,e[5]=y,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]=_,e[16]=x,e[17]=k,e[18]=j,e[19]=O,e[20]=I,e[21]=q,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]=V}else j=e[18],O=e[19],I=e[20],q=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],V=e[36];let $;e[184]!==U||e[185]!==L?($=g.jsx("div",{className:U,children:L}),e[184]=U,e[185]=L,e[186]=$):$=e[186];let ne;e[187]!==j||e[188]!==$||e[189]!==z||e[190]!==H?(ne=g.jsx(j,{value:z,className:H,children:$}),e[187]=j,e[188]=$,e[189]=z,e[190]=H,e[191]=ne):ne=e[191];let ie;e[192]!==O||e[193]!==W||e[194]!==K||e[195]!==ne||e[196]!==F||e[197]!==Q||e[198]!==te||e[199]!==X||e[200]!==V?(ie=g.jsxs(O,{defaultValue:F,className:Q,children:[te,X,V,W,K,ne]}),e[192]=O,e[193]=W,e[194]=K,e[195]=ne,e[196]=F,e[197]=Q,e[198]=te,e[199]=X,e[200]=V,e[201]=ie):ie=e[201];let ae;e[202]!==I||e[203]!==G||e[204]!==Z||e[205]!==ie?(ae=g.jsxs(I,{className:G,children:[Z,ie]}),e[202]=I,e[203]=G,e[204]=Z,e[205]=ie,e[206]=ae):ae=e[206];let se;e[207]!==a?(se=()=>{a(),A(!1)},e[207]=a,e[208]=se):se=e[208];let ye;e[209]!==N||e[210]!==se?(ye=g.jsx(TF,{open:N,onOpenChange:A,title:"Revoke All Permissions",description:"This will revoke all always-allowed permissions for this workspace. You'll need to approve these tools again when they're used.",confirmLabel:"Revoke All",variant:"destructive",onConfirm:se}),e[209]=N,e[210]=se,e[211]=ye):ye=e[211];let Re;return e[212]!==q||e[213]!==ee||e[214]!==B||e[215]!==ae||e[216]!==ye?(Re=g.jsxs(q,{open:ee,onOpenChange:B,children:[ae,ye]}),e[212]=q,e[213]=ee,e[214]=B,e[215]=ae,e[216]=ye,e[217]=Re):Re=e[217],Re}function LF(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 IF(t){return t.revokedAt}function zF(t){return!t.revokedAt}function BF(t){const e=ve.c(6),{status:n}=t;switch(n.status){case"connected":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Yn,{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(Yn,{variant:"secondary",children:[g.jsx(oh,{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(Yn,{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(Yn,{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(Yn,{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(Yn,{variant:"secondary",children:"Unknown"}),e[5]=i):i=e[5],i}}}function PF({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,y]=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){y(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{y(null)}}},b=async k=>{if(n){y(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{y(null)}}},_=async k=>{if(n){y(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{y(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(Oa,{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(Fe,{variant:"outline",size:"sm",onClick:w,disabled:f,children:g.jsx(nc,{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(Pr,{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(Oa,{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(Oa,{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(BF,{status:A})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",children:[A.status==="connected"&&g.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>b(k),disabled:h===k,children:[h===k?g.jsx(Pr,{className:"size-4 animate-spin"}):g.jsx(Z4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Disconnect"})]}),(A.status==="disabled"||A.status==="failed")&&g.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>v(k),disabled:h===k,children:[h===k?g.jsx(Pr,{className:"size-4 animate-spin"}):g.jsx(e5,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Connect"})]}),A.status==="needs_auth"&&g.jsxs(Fe,{variant:"default",size:"sm",onClick:()=>_(k),disabled:h===k,children:[h===k?g.jsx(Pr,{className:"size-4 animate-spin"}):g.jsx(Eg,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},k)})})})]})]})})}function Tx(t){const e=ve.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(Pr,{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 FF=t=>{const e=ve.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(Yx,{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 y;e[4]!==n?(y=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]=y):y=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(nc,{className:"size-4 mr-2","data-icon":"inline-start"}),e[8]=C):C=e[8];let w;e[9]!==u?(w=g.jsxs(Fe,{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(Fe,{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 _;e[16]!==o?(_=o>0&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retry attempt: ",o]}),e[16]=o,e[17]=_):_=e[17];let x;e[18]!==b||e[19]!==_||e[20]!==S?(x=g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[S,b,_]}),e[18]=b,e[19]=_,e[20]=S,e[21]=x):x=e[21];let k;return e[22]!==x||e[23]!==h||e[24]!==y?(k=g.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[d,f,h,y,x]}),e[22]=x,e[23]=h,e[24]=y,e[25]=k):k=e[25],k};function Nx(t){const e=ve.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),[y,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(!Qx(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 _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=B=>{l(B.target.value),S(null)},e[7]=_):_=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:_,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 R=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]!==R||e[17]!==d?(O=g.jsx("input",{id:"token",type:R,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]=R,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 q=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]!==q||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":q,children:U}),e[23]=I,e[24]=q,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]!==y?(G=(y||i)&&g.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:y||i}),e[30]=i,e[31]=y,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 Dx(t){const e=ve.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(),y=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(K1,{children:g.jsx(Y1,{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:()=>y(O),className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Oa,{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(X1,{className:"py-6",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[g.jsx(Bm,{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(U8,{asChild:!0,children:g.jsx(Fe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Bm,{className:"size-4"})})}),e[6]=O):O=e[6];let I;return e[7]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsx(Fh,{children:g.jsx(Hh,{children:"Quick Switch"})}),e[7]=I):I=e[7],g.jsxs(Bh,{open:o,onOpenChange:l,children:[O,g.jsxs(Ph,{side:"bottom",className:"max-h-[80vh]",children:[I,g.jsx("div",{className:"mt-4",children:b()})]})]})}const _=Ih;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(Q1,{asChild:!0,children:g.jsx(Fe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Bm,{className:"size-4"})})}),e[8]=x):x=e[8];const k=zh,N="w-[300px] p-0",A="start",M=b();let R;e[9]!==k||e[10]!==M?(R=g.jsx(k,{className:N,align:A,children:M}),e[9]=k,e[10]=M,e[11]=R):R=e[11];let j;return e[12]!==_||e[13]!==o||e[14]!==x||e[15]!==R?(j=g.jsxs(_,{open:o,onOpenChange:l,children:[x,R]}),e[12]=_,e[13]=o,e[14]=x,e[15]=R,e[16]=j):j=e[16],j}function Mx(t){const e=ve.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(D4,{className:"h-4 w-4"}):g.jsx(T4,{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(Fe,{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(qu,{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 HF(t){const e=ve.c(70),{open:n,onOpenChange:i,editServer:o}=t,{prepareForServerAdd:l,addServer:u,editServer:a}=vc(),[d,f]=D.useState(""),[p,h]=D.useState(""),[y,S]=D.useState(""),[C,w]=D.useState(!1),[v,b]=D.useState(null),_=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]!==_||e[8]!==d||e[9]!==i||e[10]!==l||e[11]!==y||e[12]!==a||e[13]!==p?(N=je=>{je.preventDefault(),b(null);const Pe=d.trim(),Te=p.trim(),tt=y.trim();if(!Pe){b("Name is required");return}if(!Te){b("Server URL is required");return}if(!tt){b("API token is required");return}if(!Qx(tt)){b("Token must be 64 hexadecimal characters");return}const it=If(Te);_?a(o.id,{name:Pe,url:it,token:tt}):(l(),u(Pe,it,tt)),i(!1)},e[5]=u,e[6]=o,e[7]=_,e[8]=d,e[9]=i,e[10]=l,e[11]=y,e[12]=a,e[13]=p,e[14]=N):N=e[14];const A=N,M=_?"Edit Server":"Add Server";let R;e[15]!==M?(R=g.jsx(Ac,{children:M}),e[15]=M,e[16]=R):R=e[16];const j=_?"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]!==R||e[20]!==O?(I=g.jsxs(Ec,{children:[R,O]}),e[19]=R,e[20]=O,e[21]=I):I=e[21];let q;e[22]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(bi,{htmlFor:"server-name",children:"Name"}),e[22]=q):q=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:[q,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(bi,{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(bi,{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]!==y?(z=g.jsx(Mf,{id:"server-token",type:B,value:y,onChange:L,placeholder:"64-character hex string",className:"pr-10"}),e[32]=B,e[33]=y,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(d4,{className:"size-4 text-muted-foreground"}):g.jsx(h4,{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 V;e[47]!==W||e[48]!==Z||e[49]!==te||e[50]!==X?(V=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]=V):V=e[51];let $;e[52]!==i?($=g.jsx(Fe,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e[52]=i,e[53]=$):$=e[53];const ne=_?"Save":"Add";let ie;e[54]!==ne?(ie=g.jsx(Fe,{type:"submit",children:ne}),e[54]=ne,e[55]=ie):ie=e[55];let ae;e[56]!==$||e[57]!==ie?(ae=g.jsxs(Oh,{children:[$,ie]}),e[56]=$,e[57]=ie,e[58]=ae):ae=e[58];let se;e[59]!==A||e[60]!==V||e[61]!==ae?(se=g.jsxs("form",{onSubmit:A,children:[V,ae]}),e[59]=A,e[60]=V,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 UF=400,$F=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window);var jx;const qF=typeof navigator<"u"&&((jx=navigator.platform)==null?void 0:jx.toUpperCase().includes("MAC"))===!0;function VF(){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&&WF(n))return!0;return!1}function WF(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 GF(){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 KF(t){const e=ve.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"&&VF())return;const{onCloseFocusedPanel:p,onFocusChatInput:h,onStopStreaming:y,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=GF(),A=Date.now(),{lastEscTime:M,armed:R}=l.current,j=A-M;if(N&&R&&j<UF){f.preventDefault(),l.current={lastEscTime:0,armed:!1},y();return}if(N){l.current={lastEscTime:A,armed:!0};return}f.preventDefault(),h();return}const _=f.target,x=_.tagName==="INPUT"||_.tagName==="TEXTAREA"||_.isContentEditable,k=f.metaKey||f.ctrlKey;if(!(x&&!k)){if(!$F||!qF){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 YF="/assets/chat-finish-Kb8mnIhV.mp3",XF="/assets/chat-permission-BltPnMpz.mp3";function QF(){const t=ve.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(YF));const d=e.current;d.currentTime=0,d.play().catch(JF)}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(XF));const d=n.current;d.currentTime=0,d.play().catch(ZF)}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 ZF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play permission sound:",e)}function JF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play notification sound:",e)}const eH=(t,e)=>t&&e?`ws://${e}/ws?token=${t}`:null,Cg=t=>t?`http://${t}/api`:null;function tH(t){const e=ve.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 y;e[0]!==h||e[1]!==d?(y=()=>{h(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=d.current)==null||O.focusSessionPanel()})})},e[0]=h,e[1]=d,e[2]=y):y=e[2];const S=y;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 _=D.useRef(w);let x;e[8]!==w?(x=()=>{_.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=()=>_.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],KF(M);let R,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 q=[];return(async()=>{try{const W=await By("jean2://accelerator/open-sidebar",()=>{v.current()});if(I){W();return}q.push(W)}catch(W){console.error("Failed to register open-sidebar accelerator listener:",W)}try{const W=await By("jean2://accelerator/open-terminal",()=>{_.current()});if(I){W();return}q.push(W)}catch(W){console.error("Failed to register open-terminal accelerator listener:",W)}})(),()=>{I=!0,q.forEach(nH)}},R=[],e[22]=R,e[23]=j):(R=e[22],j=e[23]),D.useEffect(j,R),null}function nH(t){return t()}function rH(){var vd,zc,Bc,wl,mr,ga,tr,us,Cl,va,_a;const t=ve.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[y,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[_,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,R]=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 q;t[5]===Symbol.for("react.memo_cache_sentinel")?(q=new Map,t[5]=q):q=t[5];const U=D.useRef(q),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,V]=D.useState(PH);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[Pe,Te]=D.useState(je),[tt,it]=D.useState("gpt-4o");let ct,ot;t[9]!==ae||t[10]!==Pe||t[11]!==ye?(ot=()=>{var Ae;const J=(Ae=Pe.find(Ge=>Ge.id===ae))==null?void 0:Ae.variants;ye&&J&&!J[ye]&&Re(null)},ct=[ae,ye,Pe],t[9]=ae,t[10]=Pe,t[11]=ye,t[12]=ct,t[13]=ot):(ct=t[12],ot=t[13]),D.useEffect(ot,ct);let pt;t[14]===Symbol.for("react.memo_cache_sentinel")?(pt=[],t[14]=pt):pt=t[14];const[Ze,Je]=D.useState(pt),[ue,de]=D.useState(null),[xe,_e]=D.useState(!1),[Ne,Le]=D.useState(!1),[$e,Ie]=D.useState(!1),[Ve,_t]=D.useState(!1),[dt,ke]=D.useState(BH),[He,ut]=D.useState(zH),[mt,Kt]=D.useState(IH);let Ut;t[15]===Symbol.for("react.memo_cache_sentinel")?(Ut=[],t[15]=Ut):Ut=t[15];const[nn,Qt]=D.useState(Ut);let Rn;t[16]===Symbol.for("react.memo_cache_sentinel")?(Rn=[],t[16]=Rn):Rn=t[16];const[on,Wt]=D.useState(Rn);let an;t[17]===Symbol.for("react.memo_cache_sentinel")?(an={},t[17]=an):an=t[17];const[ln,wn]=D.useState(an);let Ei;t[18]===Symbol.for("react.memo_cache_sentinel")?(Ei=[],t[18]=Ei):Ei=t[18];const[Tn,oi]=D.useState(Ei),[Zn,qr]=D.useState(null),[or,Ai]=D.useState(!1),[Cr,Nn]=D.useState(null),[Rt,Bt]=D.useState(!1),[pn,mn]=D.useState(0),[Zi,ai]=D.useState(0),[Vn,Cn]=D.useState(0),Jn=(vd=k==null?void 0:k.compacting)!=null?vd:!1,[Dn,ar]=D.useState(!1);let lr;t[19]===Symbol.for("react.memo_cache_sentinel")?(lr=new Set,t[19]=lr):lr=t[19];const[Mn,Ot]=D.useState(lr);let cr;t[20]===Symbol.for("react.memo_cache_sentinel")?(cr=new Set,t[20]=cr):cr=t[20];const Ri=D.useRef(cr);let jn;t[21]===Symbol.for("react.memo_cache_sentinel")?(jn=new Map,t[21]=jn):jn=t[21];const Lt=D.useRef(jn),{playChatFinishSound:kr,playPermissionSound:li}=QF(),Ti=D.useRef(!1);let Er;t[22]===Symbol.for("react.memo_cache_sentinel")?(Er=new Set,t[22]=Er):Er=t[22];const Vr=D.useRef(Er);let er;t[23]===Symbol.for("react.memo_cache_sentinel")?(er=new Set,t[23]=er):er=t[23];const On=D.useRef(er);let Ln,Vo;t[24]!==He||t[25]!==kr||t[26]!==y||t[27]!==X?(Ln=()=>{if(!Ti.current){Vr.current=new Set(X),Ti.current=!0;return}const Ae=[...Vr.current].filter(Ge=>!X.has(Ge));for(const Ge of Ae){if(On.current.has(Ge))continue;const Ke=y.find(le=>le.id===Ge);if((Ke==null?void 0:Ke.parentId)===null&&He){kr();break}}Vr.current=new Set(X);for(const Ge of Ae)On.current.delete(Ge)},Vo=[X,kr,y,He],t[24]=He,t[25]=kr,t[26]=y,t[27]=X,t[28]=Ln,t[29]=Vo):(Ln=t[28],Vo=t[29]),D.useEffect(Ln,Vo);let Wa,zs;t[30]!==dt?(Wa=()=>{localStorage.setItem("jean2_sidebar_view",dt)},zs=[dt],t[30]=dt,t[31]=Wa,t[32]=zs):(Wa=t[31],zs=t[32]),D.useEffect(Wa,zs);let Wo,Ji;t[33]!==He?(Wo=()=>{localStorage.setItem("jean2_sound_chat_finish_enabled",String(He))},Ji=[He],t[33]=He,t[34]=Wo,t[35]=Ji):(Wo=t[34],Ji=t[35]),D.useEffect(Wo,Ji);let Ga,In;t[36]!==mt?(Ga=()=>{localStorage.setItem("jean2_sound_permission_enabled",String(mt))},In=[mt],t[36]=mt,t[37]=Ga,t[38]=In):(Ga=t[37],In=t[38]),D.useEffect(Ga,In);let Bs;t[39]!==(k==null?void 0:k.id)||t[40]!==M?(Bs=()=>{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),R(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]=Bs):Bs=t[41];let Go;t[42]!==k||t[43]!==M?(Go=[M,k],t[42]=k,t[43]=M,t[44]=Go):Go=t[44],D.useLayoutEffect(Bs,Go);const Ps=D.useRef(null),ci=D.useRef(null),Dc=D.useRef(null),[,Ka]=D.useState(!1),Qe=(zc=n==null?void 0:n.token)!=null?zc:null,et=(Bc=n==null?void 0:n.url)!=null?Bc:null;let Ko,Yo;t[45]!==K?(Ko=()=>{Z.current=K},Yo=[K],t[45]=K,t[46]=Ko,t[47]=Yo):(Ko=t[46],Yo=t[47]),D.useEffect(Ko,Yo);let Fs;t[48]!==(k==null?void 0:k.id)?(Fs=()=>{var J;ee.current=(J=k==null?void 0:k.id)!=null?J:null},t[48]=k==null?void 0:k.id,t[49]=Fs):Fs=t[49];let Ya;t[50]!==k?(Ya=[k],t[50]=k,t[51]=Ya):Ya=t[51],D.useEffect(Fs,Ya);const Xa=D.useRef(null),es=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 Hs=ur;let Us;t[55]!==n||t[56]!==o?(Us=()=>{n&&o(n.id),Z.current&&Z.current.close(),G(null),F(!1),Bt(!1),mn(0),ai(0)},t[55]=n,t[56]=o,t[57]=Us):Us=t[57];const Zt=Us;let ui;t[58]===Symbol.for("react.memo_cache_sentinel")?(ui=()=>{mn(LH),Bt(!1),ai(0)},t[58]=ui):ui=t[58];const md=ui;let $s;t[59]===Symbol.for("react.memo_cache_sentinel")?($s=()=>{Z.current&&Z.current.close(),G(null),F(!1),Bt(!1),mn(0),ai(0),S([]),v([]),N(null),R({}),I({}),U.current.clear(),W.current=0,V(J=>(On.current=new Set(J),new Set)),ie({promptTokens:0,completionTokens:0,totalTokens:0}),se("gpt-4o"),Te([]),Je([]),de(null),Qt([]),Wt([]),wn({}),Lt.current.clear(),Cn(OH)},t[59]=$s):$s=t[59];const qs=$s;let Ni;t[60]!==(n==null?void 0:n.id)||t[61]!==d?(Ni=()=>{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,qs())},t[60]=n==null?void 0:n.id,t[61]=d,t[62]=Ni):Ni=t[62];let dr;t[63]!==n||t[64]!==d?(dr=[n,qs,d],t[63]=n,t[64]=d,t[65]=dr):dr=t[65],D.useEffect(Ni,dr);let Vs;t[66]!==Qe||t[67]!==Zt?(Vs=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 qr("Authentication failed. Your token may have been regenerated."),Zt(),new Error("Unauthorized");return le},t[66]=Qe,t[67]=Zt,t[68]=Vs):Vs=t[68];const Jt=Vs;let Ar;t[69]!==M||t[70]!==O?(Ar=J=>{const Ae=M[J]||[],Ge=O[J]||{};return Ae.map(Ke=>({message:Ke,parts:(Ge[Ke.id]||[]).sort(jH)}))},t[69]=M,t[70]=O,t[71]=Ar):Ar=t[71];const Xo=Ar;let ts;t[72]!==Qe||t[73]!==Zt||t[74]!==et?(ts=()=>{if(!Qe||!et)return;const J=eH(Qe,et);if(!J)return;const Ae=new WebSocket(J);return Ae.onopen=()=>{F(!0),qr(null),mn(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)&&(qr("Authentication failed. Please check your token."),Zt())},Ae.onerror=MH,Ae.onmessage=Ge=>{var le;const Ke=JSON.parse(Ge.data);(le=Xa.current)==null||le.call(Xa,Ke)},G(Ae),()=>Ae.close()},t[72]=Qe,t[73]=Zt,t[74]=et,t[75]=ts):ts=t[75];let Qo;t[76]!==Qe||t[77]!==Zt||t[78]!==Vn||t[79]!==et?(Qo=[Qe,et,Zt,Vn],t[76]=Qe,t[77]=Zt,t[78]=Vn,t[79]=et,t[80]=Qo):Qo=t[80],D.useEffect(ts,Qo);let ns,rs;t[81]!==Qe||t[82]!==H||t[83]!==Rt||t[84]!==et?(ns=()=>{if(Qe&&et&&!H&&!Rt){const J=setTimeout(()=>{H||Bt(!0)},1e4);return()=>clearTimeout(J)}},rs=[Qe,et,H,Rt],t[81]=Qe,t[82]=H,t[83]=Rt,t[84]=et,t[85]=ns,t[86]=rs):(ns=t[85],rs=t[86]),D.useEffect(ns,rs);let Zo,gn;t[87]!==Qe||t[88]!==H||t[89]!==Rt||t[90]!==pn||t[91]!==et?(Zo=()=>{if(Rt&&!H&&Qe&&et){const J=Math.min(1e3*Math.pow(2,pn),3e4);let Ae=Math.floor(J/1e3);ai(Ae);const Ge=setInterval(()=>{Ae=Ae-1,ai(Math.max(0,Ae))},1e3),Ke=setTimeout(()=>{mn(DH),Cn(NH)},J);return()=>{clearInterval(Ge),clearTimeout(Ke)}}},gn=[Rt,H,Qe,et,pn],t[87]=Qe,t[88]=H,t[89]=Rt,t[90]=pn,t[91]=et,t[92]=Zo,t[93]=gn):(Zo=t[92],gn=t[93]),D.useEffect(Zo,gn);let Wr,is;t[94]!==Qe||t[95]!==et?(Wr=()=>{const J=()=>{if(document.visibilityState!=="visible")return;const Ae=Z.current;!Ae||!Qe||!et||(Ae.readyState===WebSocket.OPEN?(Ae.onclose=null,Ae.close(),F(!1),mn(0),Bt(!1),Cn(TH)):(Ae.readyState===WebSocket.CLOSED||Ae.readyState===WebSocket.CLOSING)&&(F(!1),mn(0),Bt(!1),Cn(RH)))};return document.addEventListener("visibilitychange",J),()=>document.removeEventListener("visibilitychange",J)},is=[Qe,et],t[94]=Qe,t[95]=et,t[96]=Wr,t[97]=is):(Wr=t[96],is=t[97]),D.useEffect(Wr,is);let Di,Qa;t[98]!==Qe||t[99]!==et?(Di=()=>{const J=()=>{if(!Qe||!et)return;const Ae=Z.current;Ae&&Ae.readyState===WebSocket.OPEN||(F(!1),mn(0),Bt(!1),Cn(AH))};return window.addEventListener("online",J),()=>window.removeEventListener("online",J)},Qa=[Qe,et],t[98]=Qe,t[99]=et,t[100]=Di,t[101]=Qa):(Di=t[100],Qa=t[101]),D.useEffect(Di,Qa);let Ws;t[102]!==Qe||t[103]!==u||t[104]!==Jt||t[105]!==et?(Ws=()=>{var Ge;if(!Qe||!et)return;(Ge=Ps.current)==null||Ge.abort(),Ps.current=new AbortController;const J=Ps.current.signal,Ae=Cg(et);if(Ae)return Ka(!0),Promise.all([Jt(`${Ae}/sessions`,{signal:J}).then(EH),Jt(`${Ae}/preconfigs`,{signal:J}).then(kH),Jt(`${Ae}/prompts`,{signal:J}).then(CH),Jt(`${Ae}/models`,{signal:J}).then(wH),Jt(`${Ae}/workspaces`,{signal:J}).then(SH),Jt(`${Ae}/providers`,{signal:J}).then(xH)]).then(Ke=>{const[le,me,Me,rt,Tt,Xr]=Ke;S(le.sessions||[]),v(me.preconfigs||[]),x(Me.prompts||[]),Te(rt.models||[]),it(rt.defaultModel||"gpt-4o"),oi(Xr.providers||[]);const Wn=Tt.workspaces||[];if(Je(Wn),ci.current){const Bn=Wn.find(Qr=>Qr.id===ci.current);Bn&&de(Bn),ci.current=null}else{const Bn=localStorage.getItem("activeWorkspaceId"),Qr=Wn.find(io=>io.id===Bn);de(Qr||Wn[0])}u(),Ka(!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),Ka(!1),(le=Ke.message)!=null&&le.includes("Unauthorized")||qr("Failed to connect to server")}),()=>{var Ke;(Ke=Ps.current)==null||Ke.abort()}},t[102]=Qe,t[103]=u,t[104]=Jt,t[105]=et,t[106]=Ws):Ws=t[106];let Gs;t[107]!==Qe||t[108]!==u||t[109]!==Jt||t[110]!==Vn||t[111]!==et?(Gs=[Qe,et,Jt,u,Vn],t[107]=Qe,t[108]=u,t[109]=Jt,t[110]=Vn,t[111]=et,t[112]=Gs):Gs=t[112],D.useEffect(Ws,Gs);let Mi,ss;t[113]!==ue?(Mi=()=>{ue&&localStorage.setItem("activeWorkspaceId",ue.id)},ss=[ue],t[113]=ue,t[114]=Mi,t[115]=ss):(Mi=t[114],ss=t[115]),D.useEffect(Mi,ss);let Jo;t[116]!==Jt||t[117]!==et?(Jo=async(J,Ae,Ge)=>{const Ke=Cg(et);if(!Ke)return;const Me=(await(await Jt(`${Ke}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:J,path:Ae,isVirtual:Ge})})).json()).workspace;return Je(rt=>[...rt,Me]),de(Me),N(null),Me},t[116]=Jt,t[117]=et,t[118]=Jo):Jo=t[118];const Ks=Jo;let Za;t[119]===Symbol.for("react.memo_cache_sentinel")?(Za=J=>{de(J),N(null)},t[119]=Za):Za=t[119];const Xh=Za;let Ys;t[120]===Symbol.for("react.memo_cache_sentinel")?(Ys=J=>{ci.current=J},t[120]=Ys):Ys=t[120];const gd=Ys;let Ja;t[121]!==(ue==null?void 0:ue.id)||t[122]!==k||t[123]!==Jt||t[124]!==p||t[125]!==et?(Ja=async J=>{const Ae=Cg(et);if(!Ae)return;const Ge=await Jt(`${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))),R(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 Lt.current)Ke.includes(me.sessionId)&&Lt.current.delete(le);Je(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]=Jt,t[124]=p,t[125]=et,t[126]=Ja):Ja=t[126];const ea=Ja;let el;t[127]!==Ks||t[128]!==Ze.length?(el=async()=>{const J=`Workspace ${Ze.length+1}`,Ae=`~/.jean2/workspaces/${crypto.randomUUID()}`;await Ks(J,Ae,!0)},t[127]=Ks,t[128]=Ze.length,t[129]=el):el=t[129];const ta=el;let na;t[130]!==Ks?(na=async J=>{const Ae=J.split("/").pop()||J.split("\\").pop()||"Workspace";await Ks(Ae,J,!1)},t[130]=Ks,t[131]=na):na=t[131];const ra=na;let tl;t[132]!==(k==null?void 0:k.id)||t[133]!==tt||t[134]!==Mn||t[135]!==Pe||t[136]!==mt||t[137]!==li?(tl=J=>{var Ae,Ge,Ke;e:switch(J.type){case"session.created":{S(le=>[J.session,...le]),es.current&&(N(J.session),R(le=>({...le,[J.session.id]:[]})),I(le=>({...le,[J.session.id]:{}})),ie({promptTokens:0,completionTokens:0,totalTokens:0}),se(J.session.selectedModel||tt),Re((Ae=J.session.selectedVariant)!=null?Ae:null),es.current=!1),U.current.set(J.session.id,Date.now());break e}case"session.resumed":{if(N(J.session),Ot(Me=>{const rt=new Set(Me);return rt.delete(J.session.id),rt}),J.isRunning?V(Me=>{const rt=new Set(Me);return rt.add(J.session.id),rt}):V(Me=>{if(Me.has(J.session.id)){On.current.add(J.session.id);const rt=new Set(Me);return rt.delete(J.session.id),rt}return Me}),J.messages){R(Me=>({...Me,[J.session.id]:J.messages.map(yH)})),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 Lt.current)rt.sessionId===J.session.id&&Lt.current.delete(Me);for(const Me of J.messages)for(let rt=0;rt<Me.parts.length;rt++)Lt.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||tt),Re(J.session.selectedVariant||null);const le=J.session.selectedModel||tt,me=(Ke=Pe.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":{R(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"&&(V(le=>{const me=new Set(le);return me.add(J.message.sessionId),me}),Ot(le=>{const me=new Set(le);return me.delete(J.message.sessionId),me}));break e}case"message.updated":{R(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"&&V(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 Lt.current.values())me.sessionId===J.sessionId&&me.messageId===J.part.messageId&&(le=Math.max(le,me.index+1));Lt.current.set(J.part.id,{sessionId:J.sessionId,messageId:J.part.messageId,index:le});break e}case"part.updated":{const le=Lt.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":{Mn.has(J.sessionId)||V(le=>{if(!le.has(J.sessionId)){const me=new Set(le);return me.add(J.sessionId),me}return le}),I(le=>{const me=Lt.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)),R(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 Lt.current)me.sessionId===J.sessionId&&Lt.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)),R(le=>{const me={...le};return delete me[J.sessionId],me}),I(le=>{const me={...le};return delete me[J.sessionId],me}),Ot(le=>{const me=new Set(le);return me.delete(J.sessionId),me});for(const[le,me]of Lt.current)me.sessionId===J.sessionId&&Lt.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":{Qt(J.permissions);break e}case"permissions.sync":{Wt(le=>{const me=new Set(le.map(_H)),Me=J.approvals.filter(rt=>!me.has(rt.toolCallId)).map(vH);return[...le,...Me]});break e}case"permission.revoked":{Qt(le=>le.map(me=>me.id===J.permissionId?{...me,revokedAt:new Date().toISOString()}:me));break e}case"permission.all_revoked":{Qt(gH);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&&mt&&!Ri.current.has(J.toolCallId)&&(li(),Ri.current.add(J.toolCallId));break e}case"permission.granted":{Wt(le=>le.filter(me=>me.toolCallId!==J.toolCallId));break e}case"session.interrupted":{Ot(le=>new Set(le).add(J.sessionId)),On.current.add(J.sessionId),V(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":{wn(le=>({...le,[J.sessionId]:J.messages}));break e}case"queue.added":{wn(le=>({...le,[J.sessionId]:[...le[J.sessionId]||[],J.message]}));break e}case"queue.removed":{wn(le=>({...le,[J.sessionId]:(le[J.sessionId]||[]).filter(me=>me.id!==J.queueId)}));break e}case"queue.sending":{wn(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)&&ar(!0);break e}case"session.forked":{const{forkedSession:le,messages:me}=J;S(Me=>[le,...Me]),R(Me=>({...Me,[le.id]:me.map(mH)})),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++)Lt.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":{R(le=>({...le,[J.sessionId]:J.messages.map(pH)})),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 Lt.current)me.sessionId===J.sessionId&&Lt.current.delete(le);for(const le of J.messages)for(let me=0;me<le.parts.length;me++)Lt.current.set(le.parts[me].id,{sessionId:J.sessionId,messageId:le.message.id,index:me});On.current.add(J.sessionId),V(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":{oi(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":oi(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]=tt,t[134]=Mn,t[135]=Pe,t[136]=mt,t[137]=li,t[138]=tl):tl=t[138];const nl=tl;let rl,Xs;t[139]!==y?(rl=()=>{te.current=y},Xs=[y],t[139]=y,t[140]=rl,t[141]=Xs):(rl=t[140],Xs=t[141]),D.useLayoutEffect(rl,Xs);let il,sl;t[142]!==nl?(il=()=>{Xa.current=nl},sl=[nl],t[142]=nl,t[143]=il,t[144]=sl):(il=t[143],sl=t[144]),D.useEffect(il,sl);let ol;t[145]!==K?(ol=(J,Ae)=>{K&&K.readyState===WebSocket.OPEN&&K.send(JSON.stringify({type:J,...Ae}))},t[145]=K,t[146]=ol):ol=t[146];const Be=ol;let al;t[147]!==(ue==null?void 0:ue.id)||t[148]!==Be?(al=(J,Ae)=>{es.current=!0,Be("session.create",{preconfigId:J,title:Ae,workspaceId:ue==null?void 0:ue.id})},t[147]=ue==null?void 0:ue.id,t[148]=Be,t[149]=al):al=t[149];const ji=al;let ll;t[150]!==(ue==null?void 0:ue.id)||t[151]!==Be||t[152]!==y||t[153]!==Ze?(ll=J=>{Wt(Ge=>Ge.filter(Ke=>Ke.sessionId!==J)),V(Ge=>{if(Ge.size>0)for(const Ke of Ge)On.current.add(Ke);return new Set}),ar(!1),U.current.set(J,Date.now());const Ae=y.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)}Be("session.resume",{sessionId:J})},t[150]=ue==null?void 0:ue.id,t[151]=Be,t[152]=y,t[153]=Ze,t[154]=ll):ll=t[154];const di=ll;let cl;t[155]!==Be?(cl=J=>{Be("session.close",{sessionId:J})},t[155]=Be,t[156]=cl):cl=t[156];const ia=cl;let ul;t[157]!==Be?(ul=(J,Ae)=>{Be("session.revert",{sessionId:J,messageId:Ae})},t[157]=Be,t[158]=ul):ul=t[158];const Mc=ul;let dl;t[159]!==Be?(dl=(J,Ae)=>{Be("session.fork",{sessionId:J,messageId:Ae})},t[159]=Be,t[160]=dl):dl=t[160];const sa=dl;let Oi;t[161]!==Be?(Oi=J=>{Be("session.compact",{sessionId:J})},t[161]=Be,t[162]=Oi):Oi=t[162];const jc=Oi;let oa;t[163]!==Be?(oa=J=>{Be("session.reopen",{sessionId:J})},t[163]=Be,t[164]=oa):oa=t[164];const Qs=oa;let aa;t[165]!==Be?(aa=J=>{Be("session.delete",{sessionId:J})},t[165]=Be,t[166]=aa):aa=t[166];const Zs=aa;let la;t[167]!==k||t[168]!==Be?(la=J=>{k&&Be("session.update",{sessionId:k.id,preconfigId:J})},t[167]=k,t[168]=Be,t[169]=la):la=t[169];const Li=la;let fl;t[170]!==k||t[171]!==Be?(fl=(J,Ae)=>{se(J),Re(null),k&&Be("session.update_model",{sessionId:k.id,modelId:J,providerId:Ae})},t[170]=k,t[171]=Be,t[172]=fl):fl=t[172];const Oc=fl;let hl;t[173]!==ae||t[174]!==k||t[175]!==Be?(hl=J=>{k&&(Be("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]=Be,t[176]=hl):hl=t[176];const pl=hl;let ca;t[177]!==Be?(ca=(J,Ae)=>{Be("session.rename",{sessionId:J,title:Ae})},t[177]=Be,t[178]=ca):ca=t[178];const Gr=ca;let Ii;t[179]!==k||t[180]!==di?(Ii=()=>{k!=null&&k.parentId&&di(k.parentId)},t[179]=k,t[180]=di,t[181]=Ii):Ii=t[181];const Lc=Ii;let os;t[182]!==Be?(os=(J,Ae)=>{Be("queue.add",{sessionId:J,content:Ae})},t[182]=Be,t[183]=os):os=t[183];const ml=os;let ua;t[184]!==Be?(ua=J=>{Be("queue.remove",{queueId:J})},t[184]=Be,t[185]=ua):ua=t[185];const da=ua;let Js;t[186]!==ml||t[187]!==k||t[188]!==Jn||t[189]!==Be||t[190]!==X?(Js=J=>{!k||Jn||(k.runningAt||X.has(k.id)?ml(k.id,J):Be("chat.message",{sessionId:k.id,content:J}))},t[186]=ml,t[187]=k,t[188]=Jn,t[189]=Be,t[190]=X,t[191]=Js):Js=t[191];const gl=Js;let fa;t[192]!==Be?(fa=(J,Ae,Ge)=>{Wt(Ke=>Ke.filter(le=>le.toolCallId!==J)),Be("permission.response",{toolCallId:J,allowed:Ae,alwaysAllow:Ge})},t[192]=Be,t[193]=fa):fa=t[193];const vl=fa;let _l;t[194]!==k||t[195]!==Be?(_l=()=>{k&&Be("session.interrupt",{sessionId:k.id})},t[194]=k,t[195]=Be,t[196]=_l):_l=t[196];const eo=_l;let yl;t[197]!==ue||t[198]!==Be?(yl=()=>{ue&&Be("permission.list",{workspaceId:ue.id})},t[197]=ue,t[198]=Be,t[199]=yl):yl=t[199];const Ic=yl;let bl;t[200]!==Be?(bl=J=>{Be("provider.connect",{provider:J})},t[200]=Be,t[201]=bl):bl=t[201];const zn=bl;let zi;t[202]!==Be?(zi=J=>{Be("provider.disconnect",{provider:J})},t[202]=Be,t[203]=zi):zi=t[203];const xl=zi;let ha;if(t[204]!==(ue==null?void 0:ue.id)||t[205]!==y){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],ha=y.filter(J),t[204]=ue==null?void 0:ue.id,t[205]=y,t[206]=ha}else ha=t[206];const to=ha;let pa;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],pa=a.filter(J).map(hH),t[209]=n==null?void 0:n.id,t[210]=a,t[211]=pa}else pa=t[211];const as=pa;let no,lt,Bi,fr,Kr,fi,hr,Rr,Yr,hi;if(t[214]!==n||t[215]!==ue||t[216]!==Qe||t[217]!==Zn||t[218]!==ia||t[219]!==jc||t[220]!==Dn||t[221]!==H||t[222]!==Rt||t[223]!==ji||t[224]!==ae||t[225]!==k||t[226]!==tt||t[227]!==ea||t[228]!==as||t[229]!==sa||t[230]!==Xo||t[231]!==ra||t[232]!==ta||t[233]!==Hs||t[234]!==eo||t[235]!==Zt||t[236]!==Lc||t[237]!==vl||t[238]!==Gr||t[239]!==Jn||t[240]!==l||t[241]!==Pe||t[242]!==Zi||t[243]!==on||t[244]!==Zs||t[245]!==w||t[246]!==_||t[247]!==Tn||t[248]!==ln||t[249]!==da||t[250]!==Qs||t[251]!==di||t[252]!==pn||t[253]!==Mc||t[254]!==ye||t[255]!==gl||t[256]!==Be||t[257]!==et||t[258]!==e.length||t[259]!==ne||t[260]!==y||t[261]!==Ne||t[262]!==$e||t[263]!==dt||t[264]!==X||t[265]!==Oc||t[266]!==Li||t[267]!==pl||t[268]!==to||t[269]!==Ze){const J=k?Xo(k.id):[],Ae=k&&(wl=ue==null?void 0:ue.name)!=null?wl:"Jean2";let Ge;t[280]!==w?(Ge=w.filter(fH),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]!==Be||t[284]!==Ze?(le=ft=>{var mi;de(Ze.find(gr=>gr.id===ft)||null),es.current=!0;const gt=(mi=Ke[0])==null?void 0:mi.id;Be("session.create",{preconfigId:gt,workspaceId:ft})},t[282]=(ga=Ke[0])==null?void 0:ga.id,t[283]=Be,t[284]=Ze,t[285]=le):le=t[285];const me=le;let Me;t[286]===Symbol.for("react.memo_cache_sentinel")?(Me=ft=>{ke(ft),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=()=>Ie(!1),Xr=()=>{var ft;return(ft=B.current)==null?void 0:ft.focus()},t[287]=Tt,t[288]=Xr):(Tt=t[287],Xr=t[288]);let Wn;t[289]!==ue||t[290]!==ji||t[291]!==((tr=Ke[0])==null?void 0:tr.id)?(Wn=()=>{var ft;ue&&ji((ft=Ke[0])==null?void 0:ft.id)},t[289]=ue,t[290]=ji,t[291]=(us=Ke[0])==null?void 0:us.id,t[292]=Wn):Wn=t[292];let Bn;t[293]===Symbol.for("react.memo_cache_sentinel")?(Bn=()=>rt(cH),t[293]=Bn):Bn=t[293];let Qr;t[294]!==eo||t[295]!==Wn?(Qr={onCloseTerminal:Tt,focusChatInput:Xr,onNewSession:Wn,onNewWindow:uH,onToggleViewMode:Bn,setTerminalOpen:Ie,sidebarRef:z,terminalPanelRef:L,onStopStreaming:eo},t[294]=eo,t[295]=Wn,t[296]=Qr):Qr=t[296];const io=Qr,Pc=!(k!=null&&k.parentId);lt=!!n;const _d=()=>{var ft;return e.length===0?g.jsx(Nx,{onServerAdded:Hs,error:Zn||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(Tx,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!H&&y.length===0?Rt?g.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:g.jsx(FF,{serverUrl:et,authError:Zn,retryCount:pn,nextRetryIn:Zi,onRetry:md,onLogout:Zt})}):g.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[g.jsx(Tx,{}),g.jsx(Fe,{variant:"ghost",size:"sm",onClick:Zt,className:"text-muted-foreground",children:"Change Server"})]}):g.jsx(g.Fragment,{children:k?g.jsx(wF,{inputRef:B,session:k,messagesWithParts:J,queuedMessages:ln[k.id]||[],preconfigs:Pc?Ke:w,prompts:_,models:Pe,connectedProviderIds:new Set(Tn.filter(lH).map(aH)),connectableProviderIds:new Set(Tn.filter(oH).map(sH)),defaultModel:tt,onSendMessage:gl,onRemoveFromQueue:da,onChangePreconfig:Li,onChangeModel:Oc,onChangeVariant:pl,selectedVariant:ye,variants:(ft=Pe.find(gt=>gt.id===ae))==null?void 0:ft.variants,pendingPermissions:on,onPermissionResponse:vl,onRename:Gr,usage:ne,modelName:ae,onNavigateToSubagent:di,onNavigateBack:Lc,isStreaming:X.has(k.id)||!!k.runningAt,onInterrupt:eo,onRevert:Mc,onFork:sa,onCompact:J.filter(iH).length>=4?()=>jc(k.id):void 0,isCompacting:Jn,compactionSuccess:Dn,onClearCompactionSuccess:()=>ar(!1),serverUrl:et!=null?et: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(Nx,{onServerAdded:Hs,error:Zn||void 0})};no=Q8,Rr=!0,t[297]!==io?(Yr=g.jsx(tH,{...io}),t[297]=io,t[298]=Yr):Yr=t[298],t[299]!==ue||t[300]!==ia||t[301]!==H||t[302]!==ji||t[303]!==me||t[304]!==k||t[305]!==ea||t[306]!==as||t[307]!==ra||t[308]!==ta||t[309]!==Gr||t[310]!==lt||t[311]!==on||t[312]!==Zs||t[313]!==((Cl=Ke[0])==null?void 0:Cl.id)||t[314]!==Qs||t[315]!==di||t[316]!==y||t[317]!==dt||t[318]!==X||t[319]!==to||t[320]!==Ze?(hi=lt&&g.jsx(pj,{ref:z,allSessions:y,viewMode:dt,favoritedWorkspaceIds:as,sessions:to,currentSession:k,currentSessionId:(va=k==null?void 0:k.id)!=null?va:null,streamingSessionIds:X,connected:H,workspaces:Ze,activeWorkspace:ue,onCreateSession:()=>{var ft;return ji((ft=Ke[0])==null?void 0:ft.id)},onResumeSession:di,onCloseSession:ia,onReopenSession:Qs,onDeleteSession:Zs,onRenameSession:Gr,onSelectWorkspace:Xh,onCreateVirtualWorkspace:ta,onCreatePhysicalWorkspace:ra,onDeleteWorkspace:ea,onOpenSettings:()=>_e(!0),onOpenMCP:()=>_t(!0),onOpenAddServer:()=>Ai(!0),onServerSwitch:qs,onEscape:()=>{var ft;k&&((ft=B.current)==null||ft.focus())},onCreateSessionInWorkspace:me,pendingPermissions:on}),t[299]=ue,t[300]=ia,t[301]=H,t[302]=ji,t[303]=me,t[304]=k,t[305]=ea,t[306]=as,t[307]=ra,t[308]=ta,t[309]=Gr,t[310]=lt,t[311]=on,t[312]=Zs,t[313]=(_a=Ke[0])==null?void 0:_a.id,t[314]=Qs,t[315]=di,t[316]=y,t[317]=dt,t[318]=X,t[319]=to,t[320]=Ze,t[321]=hi):hi=t[321],Bi="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 vn;t[323]!==lt?(vn=lt&&g.jsx(Eb,{}),t[323]=lt,t[324]=vn):vn=t[324];let Tr;t[325]!==Ae?(Tr=g.jsx("span",{className:"font-semibold",children:Ae}),t[325]=Ae,t[326]=Tr):Tr=t[326];let Nr;t[327]!==vn||t[328]!==Tr?(Nr=g.jsxs("div",{className:"flex items-center gap-2",children:[vn,Tr]}),t[327]=vn,t[328]=Tr,t[329]=Nr):Nr=t[329];let pi;t[330]!==lt?(pi=lt&&g.jsx(Dx,{onServerSwitch:qs,onSelectWorkspace:gd}),t[330]=lt,t[331]=pi):pi=t[331];let Zr;t[332]!==lt||t[333]!==dt?(Zr=lt&&g.jsx(Mx,{viewMode:dt,onViewModeChange:rt}),t[332]=lt,t[333]=dt,t[334]=Zr):Zr=t[334];let _n;t[335]!==ue||t[336]!==lt||t[337]!==Ne?(_n=lt&&ue&&g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:()=>Le(!Ne),title:Ne?"Hide Files":"Show Files",children:g.jsx(Ag,{className:"w-4 h-4"})}),t[335]=ue,t[336]=lt,t[337]=Ne,t[338]=_n):_n=t[338];let yn;t[339]!==ue||t[340]!==lt||t[341]!==$e?(yn=lt&&ue&&g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:()=>Ie(!$e),title:$e?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[339]=ue,t[340]=lt,t[341]=$e,t[342]=yn):yn=t[342];let nr;t[343]!==pi||t[344]!==Zr||t[345]!==_n||t[346]!==yn?(nr=g.jsxs("div",{className:"flex items-center gap-1",children:[pi,Zr,_n,yn]}),t[343]=pi,t[344]=Zr,t[345]=_n,t[346]=yn,t[347]=nr):nr=t[347],t[348]!==Nr||t[349]!==nr?(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:[Nr,nr]}),t[348]=Nr,t[349]=nr,t[350]=Kr):Kr=t[350];let Pn;t[351]!==lt?(Pn=lt&&g.jsx(Eb,{}),t[351]=lt,t[352]=Pn):Pn=t[352];let Fn;t[353]!==Ae?(Fn=g.jsx("span",{className:"font-semibold",children:Ae}),t[353]=Ae,t[354]=Fn):Fn=t[354];let Gn;t[355]!==Pn||t[356]!==Fn?(Gn=g.jsxs("div",{className:"flex items-center gap-2",children:[Pn,Fn]}),t[355]=Pn,t[356]=Fn,t[357]=Gn):Gn=t[357];let ds;t[358]!==lt?(ds=lt&&g.jsx(Dx,{onServerSwitch:qs,onSelectWorkspace:gd}),t[358]=lt,t[359]=ds):ds=t[359];let Pi;t[360]!==lt||t[361]!==dt?(Pi=lt&&g.jsx(Mx,{viewMode:dt,onViewModeChange:rt}),t[360]=lt,t[361]=dt,t[362]=Pi):Pi=t[362];let Fi;t[363]!==ue||t[364]!==lt||t[365]!==Ne?(Fi=lt&&ue&&g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:()=>Le(!Ne),title:Ne?"Hide Files":"Show Files",children:g.jsx(Ag,{className:"w-4 h-4"})}),t[363]=ue,t[364]=lt,t[365]=Ne,t[366]=Fi):Fi=t[366];let fs;t[367]!==ue||t[368]!==lt||t[369]!==$e?(fs=lt&&ue&&g.jsx(Fe,{variant:"ghost",size:"icon-sm",onClick:()=>Ie(!$e),title:$e?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[367]=ue,t[368]=lt,t[369]=$e,t[370]=fs):fs=t[370];let Yt;t[371]!==ds||t[372]!==Pi||t[373]!==Fi||t[374]!==fs?(Yt=g.jsxs("div",{className:"flex items-center gap-2",children:[ds,Pi,Fi,fs]}),t[371]=ds,t[372]=Pi,t[373]=Fi,t[374]=fs,t[375]=Yt):Yt=t[375],t[376]!==Gn||t[377]!==Yt?(fi=g.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[Gn,Yt]}),t[376]=Gn,t[377]=Yt,t[378]=fi):fi=t[378],hr=_d(),t[214]=n,t[215]=ue,t[216]=Qe,t[217]=Zn,t[218]=ia,t[219]=jc,t[220]=Dn,t[221]=H,t[222]=Rt,t[223]=ji,t[224]=ae,t[225]=k,t[226]=tt,t[227]=ea,t[228]=as,t[229]=sa,t[230]=Xo,t[231]=ra,t[232]=ta,t[233]=Hs,t[234]=eo,t[235]=Zt,t[236]=Lc,t[237]=vl,t[238]=Gr,t[239]=Jn,t[240]=l,t[241]=Pe,t[242]=Zi,t[243]=on,t[244]=Zs,t[245]=w,t[246]=_,t[247]=Tn,t[248]=ln,t[249]=da,t[250]=Qs,t[251]=di,t[252]=pn,t[253]=Mc,t[254]=ye,t[255]=gl,t[256]=Be,t[257]=et,t[258]=e.length,t[259]=ne,t[260]=y,t[261]=Ne,t[262]=$e,t[263]=dt,t[264]=X,t[265]=Oc,t[266]=Li,t[267]=pl,t[268]=to,t[269]=Ze,t[270]=no,t[271]=lt,t[272]=Bi,t[273]=fr,t[274]=Kr,t[275]=fi,t[276]=hr,t[277]=Rr,t[278]=Yr,t[279]=hi}else no=t[270],lt=t[271],Bi=t[272],fr=t[273],Kr=t[274],fi=t[275],hr=t[276],Rr=t[277],Yr=t[278],hi=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]!==et||t[385]!==$e?(pr=lt&&g.jsx(zj,{ref:L,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,workspaceName:ue==null?void 0:ue.name,serverUrl:et!=null?et:void 0,apiToken:Qe!=null?Qe:void 0,isOpen:$e,onClose:()=>Ie(!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]=et,t[385]=$e,t[386]=pr):pr=t[386];let ls;t[387]!==pr||t[388]!==Bi||t[389]!==fr||t[390]!==Kr||t[391]!==fi||t[392]!==hr?(ls=g.jsxs("main",{className:Bi,style:fr,children:[Kr,fi,hr,pr]}),t[387]=pr,t[388]=Bi,t[389]=fr,t[390]=Kr,t[391]=fi,t[392]=hr,t[393]=ls):ls=t[393];let cs;t[394]!==(ue==null?void 0:ue.id)||t[395]!==(ue==null?void 0:ue.path)||t[396]!==Qe||t[397]!==He||t[398]!==zn||t[399]!==xl||t[400]!==Zt||t[401]!==lt||t[402]!==mt||t[403]!==nn||t[404]!==Tn||t[405]!==Ic||t[406]!==Be||t[407]!==et||t[408]!==Ne||t[409]!==Ve||t[410]!==xe?(cs=lt&&g.jsxs(g.Fragment,{children:[g.jsx(Sj,{workspaceId:ue==null?void 0:ue.id,serverUrl:et!=null?et:void 0,apiToken:Qe!=null?Qe:void 0,isOpen:Ne,onClose:()=>Le(!1)}),g.jsx(OF,{open:xe,onOpenChange:_e,permissions:nn,onRefreshPermissions:Ic,onRevokePermission:J=>{Be("permission.revoke",{permissionId:J})},onRevokeAllPermissions:()=>{Be("permission.revoke_all",{workspaceId:ue==null?void 0:ue.id})},apiToken:Qe,onLogout:Zt,providerStatuses:Tn,onConnectProvider:zn,onDisconnectProvider:xl,chatFinishSoundEnabled:He,onChatFinishSoundEnabledChange:ut,permissionSoundEnabled:mt,onPermissionSoundEnabledChange:Kt}),g.jsx(PF,{open:Ve,onOpenChange:_t,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,serverUrl:et!=null?et: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]=He,t[398]=zn,t[399]=xl,t[400]=Zt,t[401]=lt,t[402]=mt,t[403]=nn,t[404]=Tn,t[405]=Ic,t[406]=Be,t[407]=et,t[408]=Ne,t[409]=Ve,t[410]=xe,t[411]=cs):cs=t[411];let ma;t[412]===Symbol.for("react.memo_cache_sentinel")?(ma=J=>{Ai(J),J||Nn(null)},t[412]=ma):ma=t[412];let ro;t[413]!==Cr||t[414]!==or?(ro=g.jsx(HF,{open:or,onOpenChange:ma,editServer:Cr}),t[413]=Cr,t[414]=or,t[415]=ro):ro=t[415];let Sl;return t[416]!==no||t[417]!==ls||t[418]!==cs||t[419]!==ro||t[420]!==Rr||t[421]!==Yr||t[422]!==hi?(Sl=g.jsxs(no,{defaultOpen:Rr,children:[Yr,hi,ls,cs,ro]}),t[416]=no,t[417]=ls,t[418]=cs,t[419]=ro,t[420]=Rr,t[421]=Yr,t[422]=hi,t[423]=Sl):Sl=t[423],Sl}function iH(t){return t.message.role!=="system"}function sH(t){return t.provider}function oH(t){return t.connectable}function aH(t){return t.provider}function lH(t){return t.connected}function cH(t){return t==="overview"?"default":"overview"}function uH(){l1("create_new_window").catch(dH)}function dH(){}function fH(t){return t.mode!=="subagent"}function hH(t){return t.workspaceId}function pH(t){return t.message}function mH(t){return t.message}function gH(t){const e=new Date().toISOString();return t.map(n=>({...n,revokedAt:e}))}function vH(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 _H(t){return t.toolCallId}function yH(t){return t.message}function bH(){return{message:"Failed to delete workspace"}}function xH(t){return t.json()}function SH(t){return t.json()}function wH(t){return t.json()}function CH(t){return t.json()}function kH(t){return t.json()}function EH(t){return t.json()}function AH(t){return t+1}function RH(t){return t+1}function TH(t){return t+1}function NH(t){return t+1}function DH(t){return t+1}function MH(t){console.error("WebSocket error:",t)}function jH(t,e){return t.createdAt-e.createdAt}function OH(t){return t+1}function LH(t){return t+1}function IH(){const t=localStorage.getItem("jean2_sound_permission_enabled");return t!==null?t==="true":!0}function zH(){const t=localStorage.getItem("jean2_sound_chat_finish_enabled");return t!==null?t==="true":!0}function BH(){return localStorage.getItem("jean2_sidebar_view")||"default"}function PH(){return new Set}function FH(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(V5,{children:g.jsx(rH,{})}),t[0]=e):e=t[0],e}xE.createRoot(document.getElementById("root")).render(g.jsx(D.StrictMode,{children:g.jsx(kE,{defaultMode:"system",defaultScheme:"neutral",children:g.jsx(FH,{})})}));